title: Improve the quality by applying adaptive threshold in javacv/opencv ?
body: <p>I'm try to improve my image quality by applying following shareholding to input image.</p>
  
  <pre><code>        CvSize sz = cvSize(img.width(), img.height());
          IplImage gry = cvCreateImage(sz, img.depth(), 1);
          cvCvtColor(img, gry, CV_BGR2GRAY);
          cvAdaptiveThreshold(gry, gry, 255, CV_ADAPTIVE_THRESH_MEAN_C, CV_THRESH_BINARY_INV, 5, 4);
  </code></pre>
  
  <p>This is my input file</p>
  
  <p><img src="https://i.stack.imgur.com/mX5h6.jpg" alt="enter image description here"></p>
  
  <p>by applying threshold I need to draw all the lines in white and all other areas in black but in my out put there are some missing lines. So please can some one explain how to overcome with this problem ?</p>
  
  <p>This is my out put after applying above threshold.</p>
  
  <p><img src="https://i.stack.imgur.com/CxMz5.png" alt="enter image description here"></p>