If you are not sure if you have a single line or a single block use psm 6. See tesseract --help-extra
Psm 6 generally works fine for single lines too. If you have full pages and single lines mixed you need a pre processing step (threshold, morphology, etc.) to understand what psm is the correct one. Il giorno ven 20 set 2019 alle ore 10:54 'Sandra M.' via tesseract-ocr < [email protected]> ha scritto: > I realized that it also occurs for strings without the symbol. The image > given below for example returns an empty string as well. But in this case, > it is recognized correctly with config='--psm 7' But unfortunately I > cannot presume generally for this case that it is only one line text. Maybe > the problem is because it is no word given in the dictionary? I found out > that it is possible to enable the dictionary and to get back the single > letters with the highest accuracy, but I did not get how to do this. I > tried it with this config: > > text = pytesseract.image_to_string(gray, config='load_system_dawg=0') > > but it didn't imporove anything and I'm even not sure if I applied it > correctly... > > [image: googleforum.png] > > > > Am Donnerstag, 19. September 2019 19:36:32 UTC+2 schrieb zdenop: >> >> >> please provide image for testing. >> >> Zdenko >> > -- > You received this message because you are subscribed to the Google Groups > "tesseract-ocr" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/tesseract-ocr/ebbdd84b-0928-43b1-a0d8-d7c9308f7616%40googlegroups.com > <https://groups.google.com/d/msgid/tesseract-ocr/ebbdd84b-0928-43b1-a0d8-d7c9308f7616%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "tesseract-ocr" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/tesseract-ocr/CAMgOLLwrPVC4JBOWK4d6UsGQSicOJ8FQsm1XPp0Fe2YsPk74hw%40mail.gmail.com.

