I try to use both methods, but the Adaptive Threshold seems to give a better result. I used
cvSmooth( temp, dst,CV_GAUSSIAN,9,9, 0);
in the original image, then only I used the threshold.
Is there anything I can configure with the Otsu method to make the image better than the adaptive threshold? And one more thing, there are some unwanted fingerprints on the side, any idea how I can get rid of them?
I read from a magazine that by comparing the percentage of white pixels in a self-defined square, I can get an ROI. However, this method requires that I have a threshold value that can be found using the OTSU method, but I'm not too sure about AdaptiveThresholding.
cvAdaptiveThreshold( temp, dst, 255,CV_ADAPTIVE_THRESH_MEAN_C,CV_THRESH_BINARY,13, 1 );
Result:


cvThreshold(temp, dst, 0, 255, CV_THRESH_BINARY | CV_THRESH_OTSU);


c ++ opencv roi threshold
user3396218
source share