title: Adaptive thresholding on image causing data loss
body: <p>I am determining adaptive threshold using OTSU and then using determined threshold to convert image to black &amp; white. On this processed image I want to carry out further steps of determining density of each circle, but my black &amp; white image is over corrected and resulting in data loss. Any suggestions on how to tweak adaptive threshold.</p>
  
  <pre><code>im_gray = cv2.imread(img, cv2.CV_LOAD_IMAGE_GRAYSCALE)
  (thresh, im_bw) = cv2.threshold(im_gray, 128, 255, cv2.THRESH_BINARY | cv2.THRESH_OTSU)
  img_bw = cv2.threshold(im_gray, thresh, 255, cv2.THRESH_BINARY)[1]
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/59frQ.png" alt="enter image description here">
  <img src="https://i.stack.imgur.com/DKBMM.png" alt="enter image description here"></p>