My problem concerns the text position detection in a scan. My goal is to find the bounding boxes of the text.

img = Import@"1.png";
res = TextRecognize[img, "Line", "BoundingBox"];
HighlightImage[img, {"Boundary", res}]

source image is here, there are 7 images or here is the first image

As you can see in the following picture, the result is not good enough. How can I make all the bounding boxes accurate?


  • $\begingroup$ You should consider setting the Language->"Chinese" and taking a look at RecognitionPrior. $\endgroup$ – Carl Lange May 24 at 8:21
  • $\begingroup$ @Carl In Text Detection not Recognize, it seems, Language->"Chinese" is useless, I've tried that $\endgroup$ – HyperGroups May 24 at 9:06
  • $\begingroup$ I think TextRecognize just uses Tesseract and thus it is pretty limited. Try to just use Tesseract and tweak it. If you can do that, then you can try to tweak options of TextRecognize. And if you can't, and you think it is a bug in Tesseract, you can send a bug report to them. But most probably they just say it is not a bug, but a feature (happened to me back in 2016) $\endgroup$ – Rolf Mertig May 24 at 21:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.