title: openCV AdaptiveThreshold versus Otsu Threshold. ROI
body: <p>I'm tried to use both of the methods but it seems like Adaptive threshold seems to be giving a better result. I used </p>
  
  <pre><code> cvSmooth( temp, dst,CV_GAUSSIAN,9,9, 0);
  </code></pre>
  
  <p>on the original image then only i used the threshold. </p>
  
  <p>Is there anything I can tweak with the Otsu method to make the image better like adaptive thresholding? And 1 more thing, there are some unwanted fingerprint residue on the side, any idea how i can dispose them off? </p>
  
  <p>I read from a journal that by comparing the percentage of the white pixels in a self-defined square, I can get the ROI. However this method requires me to have a threshold value which can be found using OTSU method but I'm not too sure about AdaptiveThresholding. </p>
  
  <pre><code>cvAdaptiveThreshold( temp, dst, 255,CV_ADAPTIVE_THRESH_MEAN_C,CV_THRESH_BINARY,13, 1 );
  </code></pre>
  
  <p>Result :</p>
  
  <p><img src="https://i.imgur.com/pojeLRZ.png" alt="original"><img src="https://i.imgur.com/Z8tMArI.png" alt="adaptive"></p>
  
  <pre><code>cvThreshold(temp, dst, 0, 255, CV_THRESH_BINARY | CV_THRESH_OTSU);
  </code></pre>
  
  <p><img src="https://i.imgur.com/3kkDbm8.png" alt="original">
  <img src="https://i.imgur.com/ptM4tpS.png" alt="otsu"></p>