Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
873 views
in Technique[技术] by (71.8m points)

ocr - Tesseract does not recognize single characters

How to represent:

  1. Create new image with paint (any size)
  2. Add letter A to this image
  3. Try to recognize -> tesseract will not find any letters
  4. Copy-paste this letter 5-6 times to this image
  5. Try to recognize -> tesseract will find all the letters

Why?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

You must set the "page segmentation mode" to "single char".

For example, in Android you do the following:

api.setPageSegMode(TessBaseAPI.pageSegMode.PSM_SINGLE_CHAR);

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

56.9k users

...