Thresholding outside ROI

asked 2015-12-22 03:29:50 -0500

Hi everyone I am new to opencv python. I have to find the threshold using mean and stddev for the pixels outside the ROI. How do I do that, please anyone can help me with the code? Thanks

edit retag flag offensive close merge delete

Comments

for the whole image you can calculate mean and stddev with cv2.meanStdDev than threshold to have your binaryMean and binaryStdDev than use the ROI to clear unwanted pixel. If ROI is a Rect you can do binaryImg(ROI)=0. Real question is how do you consider mean and stddev for those pixels around the borders of the ROI ?

pklab gravatar imagepklab ( 2015-12-22 05:07:21 -0500 )edit

please tell me how to use c2.meanStdDev? Is it like m,s = cv2.meanStdDev(img)?

Manohar gravatar imageManohar ( 2015-12-23 03:09:18 -0500 )edit