Tesseract OCR confuses g as 9 - ocr

I have trying to OCR an imagen to text but it confuses the letter g with 9.
Any idea?
Thank you.

Related

What is the problem with this attention plot and how to rectify it? This is from Tacotron-2's synthesizer for multi speaker TTS

I don't understand why is this happening, here I am trying to train the Tacotron model for Hindi Text to Speech, The alignment is great but the horizontal yellow line, don't exactly understand why is this present.
I would rather expect just a straight line for y = x but here the yellow part is extra please help me out in what this problem is exactly and how to rectify it.

Tesseract OCR Pitch Text

I have a question about some terminology when it comes to optical character recognition software, specifically the Tesseract OCR engine.
I am reading an article on the Tesseract OCR engine, and it frequently mentions something called Fixed pitch text, and I am not entirely sure what that means. I am assuming pitch is the space that a line of text occupies, but that does not really make sense in the context of the article I am reading.
This is a sentence from the article that uses this wording:
Blobs are organized into text lines, and the lines and regions are analyzed for fixed pitch or proportional text.
I have looked online for some definition of this, but most articles on OCR just use it with no explanation. I am guessing this means it is a pretty simple/common term.
If anybody cares, the article I am reading is called "An Overview of the Tesseract OCR Engine", written by Ray Smith.
When first trying to find text in an image, Tesseract will identify possible regions where the text is present with blobs. Once possible regions where text could be present have been identified, Tesseract then looks to see if those regions contain "fixed pitch." Basically, this means that it's trying to figure out if the regions that it found earlier actually contain text. The fixed pitch is the different types of vectors that are used to create a certain letter or word, and Tesseract looks for those to analyze what letter or word it is looking at in an image.

Tesseract Number Recognition from image

tesseract ../spliced-time.png spliced-time -l eng --psm 13 --oem 3 txt pdf hocr
Gives me a result of: Al
I am confused if there is more I should be doing, or what would be the best approach for an image like this where the font and alignment should be generally the same. Just the numbers would be different. I was looking at opencv as well, but I feel as though this image shouldnt be that hard with maybe some extra work, or configuration or training to recognize the numbers well.
Image Attachment:

Tesseracts handles similar Pictures completely different

I was just playing around a little with Tesseract as I noticed some strange behavior of the program, which I can’t explain myself. Firstly I gave tesseract this preprocessed Picture1 but it didn’t understand any letter.
Then I put this one in and guess what it gave me?
Neuinitialisierung des automatischen
Karten-Updates erforderlich. Aktuellste
The exact letters and words, every single letter was correct!
So can anybody tell me why it didn't got the text in the first picture.
(btw. I preprocessed the two pictures in the absolut same way)
Thanks in advance!

achieve better recognition results via training tesseract

I have a question regarding achieving better recognition results with tesseract. I am using tesseract to recognize serial numbers. The serial numbes consist of only one font-type, characters A-Z, 0-9 and occur in different sizes and lengths.
At the moment I am able to recognize about 40% of the serial number images correct. Images are taken via mobile phone camera. Therefore the image quality isn't the best.
Special problem characters are 8/B, 5/6. Since I am recognizing only serial numbers, I am not using any dictionary improvements and every character is recognized independently.
My question is: Does someone has already experience in achieving better recognition results with training tesseract? How many images would be needed to be able to get good results.
For training tesseract should I use printed and afterwards photographed serial numbers, or should I use original digital serial numbers, without printing and photographing?
Maybe somebody has already experience in that kind of area.
Regarding training tesseract: I have already trained tesseract with some images. Therefore I have printed all characters in different sizes, photographed and labeled them correctly. Example training photo of the character 5
Is this a good/bad training example? Since I only want to recognize single characters without any dependency, I though I don't have to use words for training.
Actual I only have trained with 3 of these images for the characters B 8 6 5 which doesn't result in a better recognition in comparison with the original english (eng) tesseract database.
best regards,
Christoph
I am currently working on a Sikuli application using Tesseract to read text (Strings and numbers) from screenshots. I found that the best way to achieve accuracy was to process the screenshot before performing the OCR on it. However, most of the text I am reading is green text-on black background, making this my preferred solution. I used Scalr's method within BufferedImage to increase the size of the image:
BufferedImage bufImg = Scalr.resize(...)
which instantly yielded more accurate results with black text on gray background. I then used BufferedImage's options BufferedImage.TYPE_BYTE_GRAY and BufferedImage.TYPE_BYTE_BINARY when creating a new BufferedImage to process the Image to grayscale and black/white, respectively.
Following these steps brought Tesseract's accuracy from a 30% to around an 85% when dealing with green text on black background, and a really-close-to-100% accuracy when dealing with normal black text on white background. (sometimes letters within a word are mistaken by numbers i.e. hel10)
I hope this helps!