Connected components beat projection for estimating text height before OCR
A pre-OCR check that decides whether to upscale a screenshot needs an estimate of text height in pixels, and two simple OpenCV methods were compared. On clean Chinese text both stayed within about 2 px of the true height up to 30 px, but above that projection ran slightly high, while on English projection measured the full line, around 1.37 times the cap height. On a bordered table screenshot projection returned 559 px against 23 px for connected components. Accuracy of two OCR recognizers falls sharply below roughly 12 px, so an estimator a few pixels off near that threshold can misclassify an image. These results come from deliberately clean, single-font samples on one Mac and do not cover compression, noise, or complex layouts.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in