title: Auto-cropping image with detection of crop-lines
body: <p>I am working on a project, which is Android app that uses camera to capture a photo of some ticket and does OCR recognition for only a part of it. I have no previous experience in image processing, but I know it must be some kind of tricky way, because Android applications have small RAM limits. </p>
  
  <p>I have not enough reputation points to post images so I give URLs to it.</p>
  
  <p>Below, I attach image before any processing:</p>
  
  <p><img src="https://i.stack.imgur.com/BtxU3.jpg" alt="enter image description here"></p>
  
  <p>My aim is to automatically detect these lines of (---) and crop it so that final image look like this one:</p>
  
  <p><img src="https://i.stack.imgur.com/4J4WW.jpg" alt="enter image description here"></p>
  
  <p>What's more - it's important to stay open-source and do it without sending photo to some external image processing service.</p>