Thresholding outside ROI
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
for the whole image you can calculate mean and stddev with cv2.meanStdDev than threshold to have your
binaryMean
andbinaryStdDev
than use the ROI to clear unwanted pixel. If ROI is aRect
you can dobinaryImg(ROI)=0
. Real question is how do you consider mean and stddev for those pixels around the borders of the ROI ?please tell me how to use c2.meanStdDev? Is it like m,s = cv2.meanStdDev(img)?