Tuesday, December 3, 2024

Vehicle Number Plate Detection Using MATLAB

efy tested sani theoThe project presented here can be used to detect a vehicle’s number plate from the images stored in a database. That is, it aims at detecting the license plate of a vehicle and then extracting the information regarding that vehicle using MATLAB software, as shown in Fig. 1.

Vehicle number plate detected by the software
Fig. 1: Vehicle number plate detected by the software

The purpose of motor vehicle registration by a government authority is to establish a link between the vehicle and its owner or user. The registration number is generally alphanumeric and it uniquely identifies the vehicle within the issuing authority’s database. These number plates can be of different colours, fonts, and sizes depending upon the country and their rules.

This project can be used in the following areas:

- Advertisement -
  1. Analysis of city traffic during peak hours
  2. Automation of weigh-in-motion systems
  3. Enhanced vehicle theft prevention
  4. Effective enforcement of traffic rules
  5. Flexible and automatic vehicle entry and exit from a car parking area
  6. Car parking management system
  7. Improved security for the car parking operators

Further, this project can be used for vehicle license plate detection at interstate borders, airports, and harbours. The elements considered in this project include the following:

Number plate detection. Both front and back number plates of a vehicle are considered for detection.

- Advertisement -

Text extraction from the detected number plate. It can extract the text of only one vehicle number plate at a time.

No random images (cat, dog, etc) have been used for training purposes while designing the system.

Testing procedure

First, install MATLAB version 2014a or later on your system. Store the vehicle_number_plate.m MATLAB source code file in a folder. Make sure that the vehicle number plate image file is present in the source code folder.

  1. Run MATLAB from the desktop.
  2. Open the vehicle_number_plate.m file and click on the Run menu button. It will prompt you to select an image file in .jpg format.
  3. Select an image file with a vehicle number plate. In this example we have used the vehicle1.jpg file.

The program will output the image, as shown in Fig. 1. If the output vehicle number plate is not properly displayed on the screen, you can change the parameters of the input arguments BW3=medfilt2(BW3,[ ]) in the code, as shown in Fig. 2.

Screenshot of MATLAB editor window
Fig. 2: Screenshot of MATLAB editor window

Download Source Code


Pankaj A. Raut is an electronics hobbyist. His interests include computer vision, robotics, optics, computational photography, and social computing

7 COMMENTS

SHARE YOUR THOUGHTS & COMMENTS

EFY Prime

Unique DIY Projects

Electronics News

Truly Innovative Electronics

Latest DIY Videos

Electronics Components

Electronics Jobs

Calculators For Electronics

×