title: Using python and PIL how can I grab a block of text in an image?
body: <p>I have an image (*.png) which contains two blocks of text. I am trying to grab each block of text individually using the python imaging library (PIL) in python27. </p>
  
  <p>I have tried to blur the image and then find the edges of the blurred block so that I can then recover the boundaries of each block (for use later with "crop"). However when I blur the image (I've tried several iterations) the "find_edges" filter simply seems to grab the edges of each character. </p>
  
  <pre><code>pic = Image.open("a.jpg")
  out = pic.filter(ImageFilter.BLUR)
  out = out.filter(ImageFilter.FIND_EDGES)
  </code></pre>
  
  <p>I guess I'm looking for something similar the photoshop "Magnetic Lasso Tool" Any idea what approach may be better?</p>