Edge Detection of documents

Sep 30, 2011 at 4:01 PM

Hi,

I need to be able to detect the edges of a document that is scanned in from a flatbed scanner. I looked at the edge detection functions in your toolkit and they are awesome, but I need a simply version to just detect the outer edge. Any ideas?

Thanks,

Brian

Sep 30, 2011 at 6:14 PM

There are a couple of different ways to do what you want. The first thing that pops into my mind is shape recognition. For something like that, you could use AForge or something of that sort. That's probably the easiest once you've figured out AForge (for instance, here's something on glyph detection but it would be a similar concept http://www.codeproject.com/KB/graphics/ar3d.aspx). Another option is to simply find continuous lines (or near continuous) after running an edge detection algorithm and figure out what the largest box is. It sort of depends on the quality of the scans though if that would work (lots of noise may cause the edges to not be apparent, if the contrast isn't that great the edges might not show up, etc.). All of that being said, I don't know of any out of the box solution.

James

Sep 30, 2011 at 9:24 PM

Thanks for the input. I will check them out.

Brian