:: AForge.NET Framework :: Articles :: Forums ::

Detecting text first-letter and last on paper

Forum to discuss AForge.NET Framework, its features, API, how-tos, etc.

Detecting text first-letter and last on paper

Postby Wude » Sun Jul 26, 2015 1:50 am


I'm trying to get the first letter and last letter from the text on a paper image.
So far, reading other topics, I have tried to:
1) Convert image to grayscale
2) Binarize image
3) Invert image (so the text becomes white)
4) Use BlobCounter

On this last step (BlobCounter) I'm really lost. When I threshold the image that I'm using, corners of the paper are black too. So when I invert the image, text and corners are white.
The problem is, this image will be uploaded by any user after taking a photo of the paper. So maybe one of them uploads the image only showing the text content, or with corners of the paper included like myself.

Is there any way I could ignore these paper corners and get only the part where the text is placed?

Thank you
Posts: 1
Joined: Sun Jul 26, 2015 1:42 am

Return to AForge.NET Framework