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.
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.
pic = Image.open("a.jpg")
out = pic.filter(ImageFilter.BLUR)
out = out.filter(ImageFilter.FIND_EDGES)
I guess I'm looking for something similar the photoshop "Magnetic Lasso Tool" Any idea what approach may be better?