Dear people,
I trained Tesseract for my font (FE-Schrift: http://de.wikipedia.org/wiki/FE-Schrift ) and I’m getting very bad results. I am using Tesseract 3.01 under Windows.
In this image:
https://docs.google.com/file/d/0BxkuvS_LuBAzeFNZUVA1cThLMG8/edit?usp=sharing
Where text is SAA5298 I’m getting SM529B, this is being done from inside a program and I know that the “M” from the result is the result of the “AA” of the source. So, Tesseract is making a very bad segmentation of these two characters, and even they are very good separated, as you can see. Do you have an idea about why is this happening ? In the other hand, is there a way to give tesseract a hint for this (e.g., telling it the character width).
The other problem is with this one:
https://docs.google.com/file/d/0BxkuvS_LuBAzbFk3OXNjaDR1Q1E/edit?usp=sharing
Where text is LDA6244, Tesseract is recognizing a “5” instead of a “6”, even when the image is very good.
Here is my fonts training file:
https://docs.google.com/file/d/0BxkuvS_LuBAzczZhd21IcVlNSTQ/edit?usp=sharing
Here is my box file:
https://docs.google.com/file/d/0BxkuvS_LuBAzQV94NWdLT1VUcjQ/edit?usp=sharing
Here is my .traineddata file:
https://docs.google.com/file/d/0BxkuvS_LuBAzbkNzUmtDcE8zbjA/edit?usp=sharing
And here is a .cmd file for testing these 2 images:
https://docs.google.com/file/d/0BxkuvS_LuBAzUVVfSDhVdEUtRjA/edit?usp=sharing
Thanks,
Dear people,
I trained Tesseract for my font (FE-Schrift: http://de.wikipedia.org/wiki/FE-Schrift ) and I’m getting very bad results. I am using Tesseract 3.01 under Windows.
In this image:
https://docs.google.com/file/d/0BxkuvS_LuBAzczZhd21IcVlNSTQ/edit?usp=sharing
Where text is SAA5298 I’m getting SM529B, this is being done from inside a program and I know that the “M” from the result is the result of the “AA” of the source. So, Tesseract is making a very bad segmentation of these two characters, and even they are very good separated, as you can see. Do you have an idea about why is this happening ? In the other hand, is there a way to give tesseract a hint for this (e.g., telling it the character width).
The other problem is with this one:
https://docs.google.com/file/d/0BxkuvS_LuBAzbFk3OXNjaDR1Q1E/edit?usp=sharing
Where text is LDA6244, Tesseract is recognizing a “5” instead of a “6”, even when the image is very good.
Here is my fonts training file:
https://docs.google.com/file/d/0BxkuvS_LuBAzLV8yVkt4OTd5Sk0/edit?usp=sharing
Here is my box file:
https://docs.google.com/file/d/0BxkuvS_LuBAzbkNzUmtDcE8zbjA/edit?usp=sharing
Here is my .traineddata file:
https://docs.google.com/file/d/0BxkuvS_LuBAzQV94NWdLT1VUcjQ/edit?usp=sharing
#include <api/resultiterator.h> ... tess_api.SetVariable("save_blob_choices", "T"); ... tesseract::ResultIterator* it = tess_api.GetIterator(); do { char* uval = it->GetUTF8Text(tesseract::RIL_SYMBOL); cout<<uval<<"("<<it->Confidence(tesseract::RIL_SYMBOL)<<"){"; tesseract::ChoiceIterator ci(*it); do { const char* val = ci.GetUTF8Text(); cout<<" "<<(val == NULL ? "#" : val)<<" "<<ci.Confidence(); } while (ci.Next()); cout<<"}"; } while (it->Next(tesseract::RIL_SYMBOL));
Hi Dmitri,
Many thanks for your help.
I’ve tried with PageSegMode in PSM_SINGLE_BLOCK_VERT_TEXT and surprisingly I got very good results.
But then I switched from Tesseract 3.01 to 3.02 (revision 724) and the behavior of tesseract changed significantly, not for good in my case. It began to detect two characters in the same character, one in a higher position and another in a lower position.
So I tested calling tesseract for each char (PSM_SINGLE_CHAR ), as I do the segmentation by myself. The results on some characters were ok but in some others it detected the inner contours of characters like Q as a character (please see the red rectangle on this image https://docs.google.com/file/d/0BxkuvS_LuBAzeDJQRWg2aHBnNFU/edit?usp=sharing )
Do you have any suggestions on this ?
I’ve been thinking that perhaps there could be a variable to restrict tesseract a little ( http://www.sk-spell.sk.cx/tesseract-ocr-parameters-in-302-version ) but the list is so wide that discourages me.
I also have been thinking in doing something with RunAdaptiveClassifier which is exposed by the API, but I’m not sure if that function could serve to make OCR of a single char.
The main particularity of my case of use is that I already have the text segmented, so I wonder that it should be easy. That’s why I think that perhaps I’m making a big error in some part.
Best regards,
Andres
You received this message because you are subscribed to a topic in the Google Groups "tesseract-ocr" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tesseract-ocr/et7bS5QRf2o/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to tesseract-oc...@googlegroups.com.