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 t开发者_C百科here. 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!!!
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++.
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.
精彩评论