Question

I have a scanned image of a book page and i need to crop this scan for leaving only page area. I tried to use AForge to detect page borders, but it doesn't work because the space which i need to crop may contain little "light" areas (due to scanner quality) and edge detector detects borders there. That's why this is bad idea as for me.

Could you recommend something?

P.S. Please don't tell me to use non-free libraries.

===========================================================

I've figured it out. Thanks guys for your attention!!!

Was it helpful?

Solution 2

Thanks for your help. I've figured it out. The code you can find here. Though text is in ukrainian the code should be understandable. It uses FreeImage (I had problems with greyscaling images using standart .Net Framework options, so I'm greyscaling using FreeImage assembly) and AForge.NET.

OTHER TIPS

You need the coordinates of the page edges. There is an open-source project http://outliner.codeplex.com/ that makes vectorization of the edges. But this project is written in C++.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top