Vehicle number plate recognition using matlab:

Vehicle number plate recognition is the process by which the characters on a number plate are recognised. This is done using matlab.

Installing project in your pc:

  1. You need to first have matlab in your pc. Download matlab from this link if you don’t have matlab.
  2. Then, clone the project from here.
  1. After cloning, unzip the file. Run “ number_plate_det.m ” in the matlab.
  1. When you run the code, you need to select the image of the number plate. There are sample images in the “test images” folder. 
  1. We need to select the required image when we run the code. Then project runs and the characters are stored in “number_Plate.txt”.

Code explanation : 

We need to first select the image which we want to check for. After selecting the image, the image is first resized to 300 X 500. Then the image is converted to gray scale image.

 After conversion, the grayscale image is then converted into binary image using im2bw, and then the noise in the image (objects lesser than 50 px) will be removed, and a black and white image, with lesser noise is produced.Let this image be img1.

After that, considering characters as noise, they are removed an image (let it be img2). Then img2 is removed from img1, which creates an image with characters and some noise. After this, objects fewer than 200 px will be removed, which removes noise completely.

Then, finally, this image will be compared with training data, and for every character detected, a rectangular box is drawn. 

Each detected character in the rectangular box will be shown one after another and the total will be stored in totalLetters.

Finally each character will be compared and if there is more than 40% match with the training dataset, the character will be stored in the final_output matrix.

Finally, output is copied in number_plate.txt

Once we run the code, the following processes appears: 

Image selection :

Converting to black and white image :

Noise reduction :

Detecting Characters :

Saving to a txt file :

Conclusion:

Using this project, we got to know how characters on the number plate can be detected using matlab. 

There are many people, who are violating traffic rules day by day. It is becoming quite difficult for traffic officers to catch and punish the violators. Since this is a very cheap process, it can be set up in main centers of the city, according to the convenience, and violators can be punished easily.