title: Easy ways to detect and crop blocks (paragraphs) of text out of image?
body: <p>I have done some research on the subject, but I think my question is significantly different from what has been asked before.</p>
  
  <p>My PhD thesis deals with OCR-ing an old dictionary and converting the result into an XML-like database automatically. This part I have figured out. However, I'd like to enrich the final result by displaying a fragment of scan used for each entry/headword. As the dictionary is almost 9000 pages long, doing it manually is out of the question.</p>
  
  <p>This is how a random page looks: <a href="https://i.imgur.com/X2mPZr0.png" rel="noreferrer">http://i.imgur.com/X2mPZr0.png</a></p>
  
  <p>As each entry always equals one paragraph, I would like to find a way to split every image into rectangles with text (no OCR needed) as separate files, like this (without drawing the rectangles):
  <a href="https://i.imgur.com/CWtQD6Q.png" rel="noreferrer">http://i.imgur.com/CWtQD6Q.png</a></p>
  
  <p>The good thing is that the scans I have are identical in shape and size, and similar in terms of margins/text alignment. Every paragraph always has an identation, too.</p>
  
  <p>The bad thing is that I am mostly a linguist and not much of a programmer. Most of my experience is with Ruby, XML and CSS. And that some paragraphs are only one-line long.</p>
  
  <p>I am aware of some ways do to a similar thing:</p>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/4606274/algorithm-to-detect-presence-of-text-on-image">Algorithm to detect presence of text on image</a></li>
  <li><a href="http://www.danvk.org/2015/01/07/finding-blocks-of-text-in-an-image-using-python-opencv-and-numpy.html" rel="noreferrer">http://www.danvk.org/2015/01/07/finding-blocks-of-text-in-an-image-using-python-opencv-and-numpy.html</a></li>
  <li><a href="http://answers.opencv.org/question/27411/use-opencv-to-detect-text-blocks-send-to-tesseract-ios/" rel="noreferrer">http://answers.opencv.org/question/27411/use-opencv-to-detect-text-blocks-send-to-tesseract-ios/</a></li>
  <li><a href="https://github.com/kanaadp/iReader" rel="noreferrer">https://github.com/kanaadp/iReader</a></li>
  </ul>
  
  <p>but they are require significant amount of time for me to learn (especially that I have 0 knowledge in Python) and I don't know if they allow not only for text detection, but also paragraph detection.</p>
  
  <p>Any input/suggestion on the matter would be greatly appreciated, especially newbie-friendly.</p>