How would I detect horizontal-black lines using ImageMagick?

Posted by Zando on Stack Overflow See other posts from Stack Overflow or by Zando
Published on 2010-04-14T21:02:45Z Indexed on 2010/04/14 21:03 UTC
Read the original article Hit count: 279

So I have what is essentially a spreadsheet in TIFF format. There is some uniformity to it...for example, all the column widths are the same. I want to de-limit this sheet by those known-column widths and basically create lots of little graphic files, one for each cell, and run OCR on them and store it into a database. The problem is that the horizontal lines are not all the same height, so I need to use some kind of graphics library command to check if every pixel across is the same color (i.e. black). And if so, then I know I've reached the height-delimiter for a cell. How would I go about doing that? (I'm using RMagick)

© Stack Overflow or respective owner

Related posts about ruby

Related posts about image-processing