tesseract: Page numbers not detected in various cases
Environment
- Tesseract Version: Various,
4.1.1,5.0.0 v20201231 - Platform: Linux, 64 bit
Current Behavior:
In some cases, Tesseract fully automatic page segmentation does not pick up page numbers that are quite visible. Here is an example (as hocr result viewer):
I have taken the liberty of hosting some images with this problem here (and can attempt to surface more if that is helpful):
https://archive.org/~merlijn/tesseract-pagenumbers/
I don’t believe that the problem is related to binarisation. I’ve tried to run the Java viewer (https://tesseract-ocr.github.io/tessdoc/ViewerDebugging.html) to look at the results, but didn’t become much wiser, as it simply shows the page numbers not being picked up.
Expected Behavior:
Tesseract picks up the page number as well.
About this issue
- Original URL
- State: open
- Created 3 years ago
- Comments: 30 (18 by maintainers)
I made some progress. It looks like in the example of https://archive.org/~merlijn/tesseract-pagenumbers/sim_biblical-theology-bulletin_spring-1990_20_1_0004.jpg with default segmentation - the ‘3’ is never accepted as a blob that is text. I found out that this is the case because the blob disappears after the call to
TidyBlobs():In particular, the call to
block->DeleteUnownedNoise();is what removes the 3. Commenting that call makes the ‘3’ visible in the blobs, but of course this doesn’t help since it wasn’t detected by the column finder, per the hint in that function:// Deletes noise blobs from all lists where not owned by a ColPartition.So somehow it is not picked up by the page segmentation. The “Image blobs” window shows this:
And:
So red indicates it is seen as noise, indeed. Deletetable noise looks as follows:
So this means the ‘3’ both doesn’t have an “owner” (presumably the ColPartition mentioned earlier) and also has region type noise. There are several places in the code that set the
BRT_NOISEvalue, so going over those seems like the next logical step.