MATLAB Code For Reading Car Plate Number

by admin in , , , on July 25, 2020
  • gallery-image
  • gallery-image
  • gallery-image


This code reads the car license plate using a simple User Interface (UI). You only need to select the car image and the code does the rest of recognition. The interface looks as in the following image:


If you are testing some other number plate images (than that we inserted for you) make sure that the image is not blurred, no reflection of light from any character, number plate should be dominant, prominent, and distinct in the image. If the number plate is from other (Karachi) city or country then please modify the code as mentioned in the comments of .m files accordingly. In the used plates, there are ‘6’ characters on every number plate. If you are running for other than ‘6’ please modify accordingly in ‘controlling.m’ and ‘guessthesix.m’ files.
If the character is touching the boundary of plate or each other, extraction will not be successful as with the image “pic7”. Plate should not be fancy i.e the characters should all along a single line. Furthermore, the characters should be conventional ones. For example in the image “carplate1” character ‘2’ is not conventional so it prints ‘Z’ instead of ‘2’.
The characters of “pic5” are not evident so program is unable to extract the characters.


  1. I have tested the algorithm on the MATLAB Version (R2019b).
  2. Copy all the files (.m files and image files) from the folder ‘Number_Plate_Extraction’ in the current directory of MATLAB or where MATLAB can locate in its path.
  3. Ten(10) images are supplied for the testing of the algorithm.
  4. Run the file named ‘numberPlateExtraction’ on the command prompt.
  5. I have set the image ‘car3.jpg’ in “imread” function. If the other nine images are to be tested modify the “imread” command in the “numberPlateExtraction” file as follows:

f=imread(‘carplate2.jpg’); and so on


The function “readLetter” is modified from the function supplied with the OCR algorithm found in MATHWORK Toolbox.


Click here.



0 Sale

Share Now!

Release Information

  • Price


  • Released

    July 25, 2020

  • Last Updated

    July 25, 2020

  • File Included

    Matlab Files and Pictures

  • File Size

    2.11 Mb

  • Compatible With

    Matlab R19

Share Your Valuable Opinions