Matlab Code For Number Plate Recognition

4/17/2018
Matlab Code For Number Plate Recognition 4,6/5 6540reviews
Matlab Code For Number Plate Recognition

Automatic Number Plate Recognition using OCR. Learn more about anpr, ocr, digital image processing, lpr, license plate Image Processing Toolbox. Code in matlab.

This program takes snapshot of car license number plate and then recognize the text on it. It is based on the very elementary technique of templates matching. The algorithm takes an input image of the number plate (number plate should be dominant in the image) and after filtering the image, it performs region based operations.

Then it tries to capture the characters regions in a processed binary image and with the aid of template matching outputs the string of number plate characters. Contact us for your projects at info@matlab.com.pk.

For number plate extraction you have to follow this algorithm(I used this in my project) 1. Find Histogram variation horizontally(by using imhist) 2.

Find the part of histogram where you get maximum variation and get x1 and x2 value. Crop that image horizontally by using value of x1 and x2. Repeat same process for vertical cropping. Explanation: In order to remove unnecessary information from the image, it requires only edges of the image to work.

For detection of the edges, we make use of a built-in MATLAB function. But first we convert the original image to grayscale image. This grayscale image is converted to binary image by determining a threshold for different intensities in the image. After binarization only, edge detection algorithm can be used. Here we have used ‘ROBERTS’. After extensive testing, it seemed our application the best.

Then to determine the region of license plate we have done horizontal and vertical edge processing. First the horizontal histogram is calculated by traversing each column of an image. The algorithm starts traversing with the second pixel from the top of each column of image matrix.

The difference between second and first pixel is calculated. If the difference exceeds certain threshold, it is added to total sum of differences. It traverses until the end of the column and the total sum of differences between neighbouring pixels are calculated. At the end, a matrix of the column-wise sum is created. The same process is carried out for vertical histogram. In this case, instead of columns, rows are processed. After calculating horizontal and vertical histogram we have calculated a threshold value which is 0. Drivers Mpx En5038a Winxp. 434 times of maximum horizontal histogram value.

Our next step for extraction is cropping the area of interest i.e. Number plate area. For cropping we first crop original image horizontally and then vertically. In horizontal cropping we process image matrix column wise and compare its horizontal histogram value with the predefined threshold value. If certain value in horizontal histogram is more than threshold we mark it as our starting point for cropping and continue until threshold value we find-less than that is our end point. In this process we get many areas which have value more than threshold so we store all starting and end point in a matrix and compare width of each area, width is calculated difference of starting and end point.

After that we find set of that staring and end point which map largest width. Then we crop image horizontally by using that starting and end point. This new horizontally cropped image is processed for vertical cropping. In vertical cropping we use same threshold comparison method but only difference is that this time we process image matrix row wise and compare threshold value with vertical histogram values. Again we get different sets of vertical start and end point again we find that set which map largest height and crop image by using that vertical start and end point.