How to improve the sharpness of an image for OCR

Just starting out? Need help? Post your questions and find answers here.
loulou2522
Enthusiast
Enthusiast
Posts: 553
Joined: Tue Oct 14, 2014 12:09 pm

How to improve the sharpness of an image for OCR

Post by loulou2522 »

I'm looking for a way to improve the sharpness of an image so that I can process it with Tesseract to extract the text. Does anyone have a solution?
Thanks
User avatar
Tenaja
Addict
Addict
Posts: 1959
Joined: Tue Nov 09, 2010 10:15 pm

Re: How to improve the sharpness of an image for OCR

Post by Tenaja »

For a single file, load it into Paint.Net and adjust contrast...
sorry, can't help with the code, but pdn is open source (I think), so viewing the code might get you a solution.
User avatar
SPH
Enthusiast
Enthusiast
Posts: 596
Joined: Tue Jan 04, 2011 6:21 pm

Re: How to improve the sharpness of an image for OCR

Post by SPH »

I'm curious : post your pic here. I want to see it :!:

!i!i!i!i!i!i!i!i!i!
!i!i!i!i!i!i!
!i!i!i!
//// Informations ////
Portable LENOVO ideapad 110-17ACL 64 bits
Version de PB : 6.12LTS - 64 bits
DarkDragon
Addict
Addict
Posts: 2347
Joined: Mon Jun 02, 2003 9:16 am
Location: Germany
Contact:

Re: How to improve the sharpness of an image for OCR

Post by DarkDragon »

Tesseract often needs images of a certain size. You might want to resize your input image a bit. Smaller texts may not be recognized. Sharpness is usually not the problem. Most deep learning methods are also vulnerable to single pixel changes. So don't totally trust the textual output of any OCR.
bye,
Daniel
Post Reply