Continued - Vehicle Subscription Card Detection

Continuing this topic:

What are good car license plate detection algorithms?

I developed my methods of image manipulation to emphasize the license plate as much as possible, and overall I am pleased with this, here are two examples.

alt text

alt text

Now the hardest part is actually detecting the license plate. I know that there are several methods for detecting boundaries, but my math is pretty poor, so I cannot translate some complex formulas into code.

My idea so far is to iterate over each pixel inside the image (for a loop based on img width and height). From this, compare each pixel with the list of colors from which the algorithm is checked to see between the white number plate and black text. If true, these pixels are embedded in the new bitmap in memory, then OCR scanning is performed after this pattern is no longer detected.

I would be grateful for the data entry, as this may be a wrong idea, too slow or intense.

thank

+9
c # image computer-vision gdi + object-detection
Jan 18 '11 at 17:32
source share
3 answers

Your method of “looking to see if the colors between the white plate and the black text match” basically searches for areas where the pixel intensity changes from black to white and vice versa many times. Edge detection can do pretty much the same thing. However, implementing your own methods is still a good idea, because you will learn a lot in this process. Heck, why not get around and compare the results of your method with the finished edge compilation algorithm?

At some point, you will need to have a binary image, for example, with black pixels corresponding to a non-symbol label, and white pixels corresponding to an is-a-character label. Perhaps the easiest way is to use the threshold function. But it will work well if the characters have already been emphasized in some way.

As mentioned in your other thread, you can do this using the black hat operator, which leads to something like this:

image after black hat operation

If you have a threshold image higher, say, with the Otsu method (which automatically determines the global threshold level), you will get the following:

alt text

There are several ways to clear this image. For example, you can find connected components and throw away those that are too small, too large, too wide, or too tall to be a character:

alt text

Since the characters in your image are relatively large and fully connected, this method works well.

You can then filter out the remaining components based on the properties of the neighbors until you get the required number of components (= number of characters). If you want to recognize a character, you can calculate the functions for each character and enter them in the classifier, which is usually created with supervised learning.

All of the above steps are just one way to do this, of course.

By the way, I generated the images above using OpenCV + Python, which is a great combination for computer vision.

+5
Jan 18 '11 at 10:00
source share

Color, which looks good, will present quite complex problems with shading and lighting. It depends on how much you want to make it reliable, but in real cases you have to deal with such problems.

I did a road study (see my profile page and see a sample here) and found that real road frames are very noisy in terms of lighting conditions and your colors can change from brown to white for the yellow back plate.

Most algorithms use line detection and try to find a box with an aspect ratio in the acceptable range.

I suggest you conduct a literature review on this issue, but this was done back in 1993 (if I remember correctly), so there will be thousands of articles.

This is a fairly scientific domain, so the algorithm will not solve it, and you will need numerous stages of preprocessing / post-processing.

In short, my suggestion is to use the Hough transform to search for strings, and then try to find rectangles that can create an acceptable aspect ratio.

Harris's detection feature can provide important edges, but if the car is light, it won't work.

+3
Jan 18 '11 at 17:48
source share

If you have a lot of samples, you can try out the face detection method developed by Paul Viola and Michael Jones. This is good for face recognition, perhaps it will be good with license plate detection (especially in combination with some other method).

+1
Jan 19 2018-11-11T00:
source share



All Articles