4
votes

I am planning the attributes of a camera that I need for a computer vision system. I have to detect some alphanumeric areas in the image and then convert them with an OCR using Tesseract and OpenCV. A typical example could be license plate recognition on the motorway (but in my project the speed is no issue).

To estimate the camera resolution, the distance and focal length of the lens I need to know which could be the minimum height in pixel of the text in order to get a reliable OCR conversion.

With the thin lens equation I got a relation between my text height in mm and text height in pixel. Changing the camera distance or the focal length I get different heights in pixel of my text (from 10 pixels till 40 pixels)

Of course I would prefer a character height of 40 pixels, but this is also the most expensive solution.

For this reason I would like to know if the OpenCV and Tesseract library set some constraints for a minimum reliable size of the text for a good recognition. I have read that different commercial OCR recommends a character size between 25 and 40 pixels. Could be this range applied to Tesseract/OpenCV too?

I made a couple of tests with smaller character size (15 px) too and the OCR worked very well, but of course there were ideal conditions of light, contrast and background color.

1

1 Answers

3
votes

Most license plate reading (ALPR) algorithms use edge information and classification to decide a particular symbol ( alpha numeric or other language symbols ). Given this, the edges need to be well defined in thickness and with sufficient contrast.

As mentioned by the OP commercial ALPR algorithms recommend atleast 20 pixels for character height. This will make sure that the edges are atleast x pixels for most standard font types that are used for license plates. Here is an example of a license plate with character height of around 25 pixels - the edges are atleast 3 pixels wide. Having well defined edges will help most ALPR algorithms. Although excess sharpness does not necessarily help increase ALPR performance as some amount of blurring is anyway carried out to remove noise, before edges and connected components are detected.

License plate image with standard font

The higher contrast (improved lighting conditions) and optimum resolution of the image (character size of atleast 20 pixels but not too high) will help improve the speed of the ALPR algorithm.