This is the webpage containing information about a small project I have been working on for a couple of days now. It's simply a small C program using image processing and computer vision techniques in order to read a licence plate number from a given picture. I try to not use any libraries (like OpenCV, Tesseract, etc) to hopefully gain some understanding and knowledge in this field. Using these libraries is probably what you should do in order to get something that would work very well, but it is not the purpose of ELP. I want to see how far I can realistically go by myself with the time constraints that I have.
The current state
As of now, the program reads a ppm image. That image should only contain the isolated licence plate. It should not contain any details about pixels surrounding the plate. The program then applies a combination of image processing techniques in order to get an image that would eventually be suitable for OCR (which stands for Optical Character Recognition). This final step is the step that actually deduces the plate number from the numbers and letters that compose it. ELP is not yet ready for basic OCR, but it is close.
The next steps
Here is a small description of what is to be done next in order for the plate to be ready for optical character recognition.
At this point, simple thresholding has been applied to the test image to convert the image into a binary image. This means that every pixel in the image is either purely white or purely black. In my case, black pixels will usually be the pixels that represent the data that we are interested in, like a plate number. White pixels are just considered to be background level.
Now, two histograms have to be calculated from that image. One of them is a histogram of the amount of black pixels present in every row of pixels. With this information, we can calculate how many black pixels are present in each row with respect to white pixels. If we combine this information with vertical proportions at which we expect to find a plate number, then we can (hopefully) crop the image vertically to isolate the plate number.
The other histogram is the same thing as with the first histogram. We calculate the number of black pixels for each column, calculate a ratio, compare that with horizontal proportions, and we should be able to isolate the plate number horizontally as well. The result should be something usable for OCR.
Closing
I will be updating the information on this page as the project moves forward. I might eventually make a full guide describing ideas and concepts to help other people learn about image processing and computer vision in the world of plate recognition. In the next page update, I will add a section describing side quests that I would need to go for in order to make the program more optimized and more accurate.
You can see the source code here. You can leave feedback, information, or recommendations if you want.