Reputation: 36394
I was working with PIL, OpenCV and OCR readers to read texts from Images. The biggest problem I faced is when it comes to Image processing to make texts sharp enough for easier/accurate extraction by the OCR reader.
For that, I thought of increasing the contrast/brightness and do a histogram equlization using PIL but that didn't help the cause either.
So, what would you suggest to do to make the texts appear sharper for better text extraction?
Upvotes: 2
Views: 5409
Reputation: 43620
PIL has sharpen and edge enhancing filters. Is this what you want? An example image showing what you are dealing with would be helpful.
Your image has an uneven background color which may be causing problems. Try looking at this solution to create a nice leveled b&w image.
But the black collar is also going to cause problems and you should look at ways of cropping it out.
That said, I get reasonable improvements with a simple PIL SHARPEN filter:
tesseract results after SHARPEN filter:
From what I've learned looking inside people, ^ I've decided human beings are somewhere ` between a hurricane and an ice cube} in some respects, permanently mysterious, but in others- with enough science and careful probingeentirely ' scrutabler It would be as foolish to think we have reached the limits of human knowledge as it is to 3 think we could ever know everything. There is still room enough to get better, to ask questions of i even the dead, to learn from knowing when our i simple certainties are wrong.
And results without filter:
From what I've learned lnnkmg wade maple} Fve deculed lunnuan wlng;. el'. .y.w.r-a' is
between a luurrlctuvr null llva la
All.' a.I ll respects, permanently unyst:-rwnt
Ml ln ms. re with enough scaena) and turutul pmlulng l~m.rely scrutable. It would he as loallsla to thank we have reached the llmlts of human knowledge as lt ls to think we could ever know everything. There ls still room enough to get better, to ask quesuons of ` even the dead, to learn from knowmg when our simple certeindes are wrong.
Upvotes: 2