Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Remove all non black pixels from image
Message
De
27/12/2013 12:59:29
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
 
À
27/12/2013 06:06:40
Emerson Reed
Folhamatic Tecnologia Em Sistemas
Americana - São Paulo, Brésil
Information générale
Forum:
Visual FoxPro
Catégorie:
Photos et traitement d'images
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01590997
Message ID:
01591017
Vues:
59
>Hi Al.
>I'm using an OCR DLL to extract the text from an images.
>The text in these images are always black. The black color is only used in the text part.
>So, to improve the OCR results, I need to remove all non black pixels or change them to white, and save this "new image".

You may want to reduce the image to a single bitmap. First off, what you think is black is just close to black but not exactly so.

Any decent image manipulation program has this option (reduce bitmap, posterize) or perhaps a luminance graph where you can adjust the curve to enhance the contrast. I'm doing such things in Gimp (freebie, open source) and the results look fine to me... but it's not me who it has to look good for, it's the OCR software. And I'm sure the software is already deciding its best based on the difference between the lighter and darker areas, no matter how far from white and dark they are. You may try posterizing and submit the result to your OCR, but I'm not sure it would help it. What's more important for OCR is that the light is uniform, so that the whites on one side of the page are not as dark as the blacks on the other side; that the resolution is sufficient; that the print is sufficiently different from the paper (just try scanning the ingredients on a chocolate wrapper... turquoise on purple in 4px font).

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform