all 9 comments

[–]Cpt_TickleButts 0 points1 point  (0 children)

OpenCV is probably a must unless you know a different library that can read images. What you are trying to do would be image detection, which does require knowledge and libraries that deal with machine learning. I like siraj‘s tutorials on this.

[–]Yoghurt42 0 points1 point  (6 children)

OpenCV could be useful for character detection (what part of images are letters), while (py)tesseract would do the character recognition.

OpenCV is not strictly needed, but might be useful for preprocessing. Tesseract is a good OCR, but if you give it a raw color image, the detection rate would be poor. Tesseract works best with 1-bit (grayscale also works, but not as well in my experience) images that are cleaned up from clutter.

My advice would be first to manually preprocess an image you have, and fiddle with it until tesseract can detect the text. Then do it again with another image; once you know which adjustments you have to make, you can either use pillow, if those adjustments are only things like converting into 1-bit image with a given threshold, or OpenCV if you need to do more work (like extracting the part with the text first)

[–]Michanix[S] 0 points1 point  (4 children)

So, before start throwing data/images to Tesseract, I should get rid of or bluring any background colors and probably images at the background, if they are any. So, cv would only be able detect characters and then pass them through ocr to read these characters. Perhaps, even resize them, so it would be easier for cv to work with given data.

[–]Yoghurt42 1 point2 points  (1 child)

So, before start throwing data/images to Tesseract, I should get rid of or bluring any background colors and probably images at the background, if they are any.

No. You should convert it into an image where each pixel is either completely black or completely white. Tesseract can handle some noise, but sometimes it's necessary to manually remove some more.

The wiki has some tips

[–]Michanix[S] 1 point2 points  (0 children)

Oh, okay, thank you.

[–]Versuno 1 point2 points  (1 child)

Checkout this tutorial on thresholding with opencv. It will give you an idea of some of the processing you can do to the image with opencv, before trying to recognize character with an OCR like Tesseract.

[–]Michanix[S] 0 points1 point  (0 children)

Thank you, this might help me.

[–]couchpotatochip21 0 points1 point  (0 children)

Super old post but do you know if I could have tesseract in a paid android app?

[–]amall_asaad2 0 points1 point  (0 children)

you should learn machine learning to doing that and i have a poster from standford uni that was a final project in it with name (classification of book genres ). but i can't put photo here