OCR: Small Text Segmentation

Problem

I am creating a (very) simple OCR engine. Since I am trying to classify very small (pixel sizes) characters, I have some difficulty segmenting. Here is an example after the best image threshold:

image of problematic segmentation on 63 :

What i tried

Error Detection :

  • large horizontal size of segments. It works mostly, but does not work (false positive) for a few larger characters.
  • classify and reject for a low score. It seems a little wasteful.

Error correction :

  • add pixels vertically (vertical histogram), find the minimum. He cuts many segments in the wrong place, in many patterns.

What I have not tried yet

  • Attempt to classify all possible segmentation points (pixels). It would be very wasteful and it would be difficult to expand for a segment with 3 characters.
  • I read into morphology of approaches to turn symbols into mathematical curves, but I don’t know, really know where to start, or if it's worth the effort

Where to go from here?

I have no idea. Hence this question :)

+7
source share
2 answers

Sit back and close your eyes halfway.

63 :-)

Now, if it were just for the computer!

This is painfully close to what double patterning does (or doesn't?) In silicone masks.

I would suggest oversampling (doubling or increasing the number of pixels in each axis), filtering (possibly a low pass or possibly a passband where the passband is the spatial frequency of the line), a second threshold value until they are separated. Expensive, therefore, apply only in problem areas.

+6
source

Recover your problem so you don't need segmentation.

Indeed, for this scale, I think you are better off investing in other approaches. For example, if you recognize text (you?), You can use line information (character height). There are not many fonts that can be used for small (but readable) characters. My approach is an algorithm that scans lines in scan lines (from left to right, takes pixels from top to bottom) and tries to find correlations between trained text and scan points (n, n-1 ... nx)

And you probably need the information that I also get in shades of gray, so it's better not to create threshold values.

+3
source

All Articles