title: How to improve threshold image result OpenCV Java Android
body: <p>Iam using OpenCVAndroid for thresholding images following is code and result</p>
  
  <p><a href="https://i.stack.imgur.com/kjNob.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kjNob.png" alt="Image captured from device"></a></p>
  
  <p>Following methods from OpenCV used</p>
  
  <pre><code>      Bitmap bitmap = MediaStore.Images.Media.getBitmap(getContentResolver(), selectedImage);
        Mat imageMat = new Mat();
        Utils.bitmapToMat(bitmap, imageMat);
        Imgproc.cvtColor(imageMat, imageMat, Imgproc.COLOR_BGR2GRAY);
        Imgproc.threshold(imageMat, imageMat, 120, 255,Imgproc.THRESH_BINARY);
        Utils.matToBitmap(imageMat, bitmap);
  </code></pre>
  
  <p>got following result</p>
  
  <p><a href="https://i.stack.imgur.com/mnoQR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mnoQR.png" alt="enter image description here"></a></p>
  
  <p>How can i improve my result, in order to get location of lines running across the pouch in the image??</p>