Two Wheel Vehicle License Plate Detection System with Image
Abdullah Sani and Dhea Ade Rahmadani
Department of Electrical Engineering, Politeknik Negeri Batam, Batam, Indonesia
Keywords: Image Processing, Vehicle License Plate Detection, K-Nearest Neighbor
Abstract: Image processing is a method used to process images into a digital form, which serves to improve and improve
the quality of an image. One of its utilization is to detect the license plate of the vehicle that enters the campus
area. Currently for the identification of vehicle license plates in the parking area of Politeknik Negeri Batam
Campus still use the manual system that is, when the vehicle enters the parking area then the parking attendant
only gives the card. Thus, there is no data storage of vehicles coming into the parking area such as vehicle
license plate recording. With the license plate detection system using image processing techniques can
facilitate the process of checking the license plate of incoming vehicles by mounting the camera to check the
license plate number, as well as using the method K-Nearest Neighbor to recognize each character that is on
the license plate automatically, this method has an accuracy level of about 84.5% in 80 characters.
In this modern era, the development of science and
technology that is progressing in all areas has a
positive impact on people's lives. With advances in
the field of technology, more and more new
technologies are emerging. One of the technologies
that develop in the field of digital image processing.
Image processing is a method for the processing of
images (Image) into digital form for a specific
purpose that serves to improve and improve the
quality of an image to provide information in the form
of objects detected on an image (Triyandil, 2014).
One of its applications is to identify the license plate
number that is entered in an institution such as a
parking area campus near a postal park. In general, to
recognize the license plate number that enters the
campus parking area still use the manual system that
is, when the vehicle enters the parking area, the
parking attendant gives the card and there is no data
storage of incoming vehicles such as vehicle license
plate registration. The way is ineffective and will
complicate the process of identification of vehicles
entering the parking area. The manual parking system
will consume a lot of time and energy (Nur Taufiq,
Meanwhile, Santra et al. (2019) implemented
Signal to noise ratio, PSNER and mean square error
to computed each capture image after detection. The
objective of implementation is to primarily detect
moving vehicle. Others researcher Muhammad Tahir
Qadri, Muhammad Asif et al. (Qadri, 2009)
implemented Automatic Number Plate Recognition
(ANPR) as an image processing system to detect the
vehicle number (license) plate to identify the vehicle.
The system captures the vehicle image and then
extraction them using image segmentation. By using
optical recognition technique to recognize each
character in the license plate.
K Mahesh Babu, M V Raghunadh et al. (Babu,
2016) implemented the template matching method to
recognize the characters in vehicle license plate. The
researcher conducted four major steps to detect the
character as follows: preprocessing of capture image,
extracting license number plate region, segmentation
and characters recognition.
In this paper, made a system that facilitates the
process of checking the license plate of the incoming
vehicle, by mounting the camera to detect the license
plate of the vehicle. The detection process begins with
data retrieval with the camera mounted (Budianto,
2015). This vehicle license plate check, able to
recognize the character of letters and numbers found
on the license plate that enters the parking area using
the image processing method and K-Nearest
Neighbor which can be useful as a verification of the
Sani, A. and Rahmadani, D.
Two Wheel Vehicle License Plate Detection System with Image Processing.
DOI: 10.5220/0010351900750080
In Proceedings of the 3rd International Conference on Applied Engineering (ICAE 2020), pages 75-80
ISBN: 978-989-758-520-3
2021 by SCITEPRESS Science and Technology Publications, Lda. All rights reserved
identity of the vehicle number when entering the
parking area of the campus more efficient and simple.
2.1 Digital Image Processing
Digital image processing is a process of processing
and analysis of two-dimensional image imagery that
uses computers, aiming to improve the image quality
for easy interpretation by humans or machines
(computers) (Sari, 2014). A digital image can be
represented by a matrix of two dimensions f (x, Y)
consisting of M for columns and N for rows, which
between the column and row intersection is also
called the pixel or the smallest element of an image.
There are several types of digital imagery that are
often used namely, RGB image, binary image, and
grayscale image.
RGB Image
RGB image is a color image which consists of three
basic colors, namely Red (R), Green (G), and Blue
(B). Each basic color has its own intensity with a
value range from 0 to 255 (8 bits) (Sari, 2014) as
shown in Figure 1 is an example of an RGB image on
a vehicle plate.
Gray Image Concept
Gray imagery is a digital image processing that takes
the value of the different degrees of the sensitivity of
each pixel. Where a pixel is represented by a range of
values from 0 to 255, a value of 0 represents for the
minimum intensity or image condition in a dark state
and the 255 value represents for maximum or light
intensity. We can see in Figure 2 is the result of the
gray image.
Figure 1: RGB image.
Figure 2: Gray image.
Image Binarization Concepts
Image Binarization is a process that aims to change
the intensity value of an image to 2 values of 0 and 1.
Each pixel consists of only a black color of 0 and a
white color worth 1 (Kusumanto, 2011). To do this
process used threshold can be adjusted value
according to the wishes (Setiawan, 2015). The image
binarization is often used in research studies using
segmentation and morphology processing processes.
Figure 3 is the result of an image binarization.
Canny Edge Detection
Canny edge detection is a filter process used to detect
edges of an image. Canny edge detection was
developed by John F. Canny in 1986. The method of
canny edge detection is used to look for a contour that
is considered a vehicle number plate. Figure 4 is the
result of an image binarization.
2.2 Connected Component
Connected components are a collection of pixels of
the same value, and that are interconnected with each
other through pixel connectivity, i.e. all pixels in the
connected component have the same pixel intensity
value, in some ways connected. Once all the groups
have been specified, each pixel is labeled with a gray
or color labeling according to the component set. This
method is used in the process of character detection on
vehicle number plates, in Connected Component
methods. The process of analysis of imagery objects
such as calculating the area, height, or width of the
object, from the candidate object to be carried out a
rule Filtration that represents a license plate.
Filtration can be done by doing calculations to
determine the area of an object that has been labeled
(Ruslianto, 2011).
Figure 3: Image binarization.
Figure 4: Canny edge detection.
ICAE 2020 - The International Conference on Applied Engineering
2.3 K-Nearest Neighbor
K-Nearest Neighbor is a method that uses a
supervised algorithm were the results of a new query
are classified based on the majority of categories on
the KNN. The function of KNN is to classify the
characters of letters and numbers found on the motor
plates. KNN sets the class label type on most K-
nearest patterns on the data train to be utilized, the
similarity of patterns in the data train must be defined
first (Tauchid, 2015). K is the number of closest
neighbors. The number of neighbors is a core
determining factor. The way the KNN works is if P1
is the core, then next performs a label prediction and
looks for the closest point K with P1 then classifies
the points with the highest number of neighbors in
that area. Each class has a value that represents its
respective class. Most values will be taken as
predictions. For example, K = 4, the closest point in
Class A, Class B, Class B, Class B so that the highest
value is in class B Then the prediction result of the
new data is Class B as shown in Figure 5.
The KNN on the OpenCV function uses a flatten
image to be a single row/one column array. Each
dataset will be training to see the pattern of each
character which will then be used as a comparison for
the character recognition of the trial as can be seen in
Figure 6.
Figure 5: KNN Concept.
The object to be detected by the camera is a two-
wheeled vehicle license plate. Images that are capture
by the camera will be processed by the computer
using the K-Nearest Neighbor method, then the
detection result is displayed on the computer layer. A
more detailed process can be seen in Figure 7.
Figure 7 presents the way the overall system
works. The system itself is divided from 4 stages,
namely pre-processing image, plate detection,
character segmentation, character recognition. At pre-
After that, the process to detect the plate part of
the motor vehicle by using canny edge detection.
Then from an edge image that is already in the get
filtered out based on the form contours. The shape of
the contours considered a plate is a rectangular shape.
When the plate is detected, the next process is to crop
the plate containing the character. If the plate is not
detected it will be done detection of the character
directly from the image that is capture with the
The third stage is character segmentation, at this
stage using the Connected Component method to
separate the plates and characters. With the connected
component method, each BLOB will be labeled and
filtered by area as well as the size of the blob height
and width. A blob Area smaller than 150 pixels is not
considered a character. Subsequent blob-categorized
characters must be eligible where the vertical height
is greater than the horizontal width. The height and
width ratios should not exceed 0.2 of the height and
width of the captured image.
From the results of the already filtered blob will
be selected eight BLOB ones whose positions are
most parallel. Then the character is sorted into an
array shape and will be compared and recognizable
one the character.
The next stage uses the K-Nearest Neighbor
(KNN) method for character recognition. Each
character that has been separated will be matched by
this method.
Figure 6: Diagram block system.
Object Detection
Two Wheel Vehicle License Plate Detection System with Image Processing
Figure 7: Flowchart system.
3.1 Testing
This test is conducted to find out if the tool can detect
the plates and characters on the license plate of the
vehicle that is tested on the daytime conditions with a
range of Lux value 1000-7000 using the Lux meter.
The data retrieval process on this test is done as
Vehicles made for testing are motors.
Maximum image capture distance of 1meter.
Sampling Place: Outdoor (Campus Park)
Taken with a webcam.
This research is conducted with several testing stages
i.e. sample image capture testing based on daytime
conditions and distance of retrievals, vehicle plate
detection testing, character segmentation testing, and
plate character recognition testing.
Figure 8: Sampling object.
4.1 Image Sampling Testing
At sampling testing was conducted by taking an
image with daylight conditions using a webcam with
a resolution of 1600 x 896 pixels and the test distance
performed on this sampling is a maximum of 1 meter.
4.2 Vehicle Plate Detection Test Result
On the plate, detection testing conducted trials with 5
different vehicles as presented in Table 1. The results
of the number plate detection test that successfully
detected the platform precisely from 5 samples in
Table I are as many as 4 samples. In the detected plate
will appear as a green rectangle on the sample image.
License plates can be detected if the plate has an
unbroken outline and has a rectangular contour that is
clear as Figure 11. As for the sample that failed to be
caused by the discovery of the contour that connects
and rectangular shape in the image, as shown in
Figure 12.
Figure 9: Plate sample 1.
Figure 10: Plate sample 2.
ICAE 2020 - The International Conference on Applied Engineering
Table 1: Character recognition results.
Figure 11: Detectable plates.
Figure 12: Undetectable plates.
4.3 Character Segmentation Testing
Segmentation is done with 2 cases. First, if the plate
is detected, the character will be detected using crop
plate results as input in the character detection
function. For the first case, the results are obtained as
can be seen in Figure 13-15/
second case is if not detected plate or plate
detected has no character inside of it as shown in
Figure 14. In this case, the character segmentation
will appear using the original image.
Figure 13: (a), (b), (c) Detectable plates.
Figure 14: Undetectable plates.
Figure 15: Character segmentation.
4.4 Character Recognition Testing
In the testing of the character recognition test with
some samples such as Table 2. The test result of Table
2 obtained an accuracy rate of 87.5% from 64
characters. For characters that fail to be detected due
to several factors such as joining the Blob of the
character with another object blob, the detected letters
are too bold compared to the trained dataset.
Two Wheel Vehicle License Plate Detection System with Image Processing
Table 2: Character Recognition Results
Based on the test results of the motor plate detection
of the success rate depends on the shape of the
rectangular contour found, when the plate image has
a clear contour line and not cut off, then the number
plate will be detected accurately. Also, the light
affects the image quality results captured by the
camera. The higher the light then the more noise is
The results of the character segmentation trial
success level are already quite accurate using the
connected component method. With an accurate rate
of about 80- 90% in separating part of the character
part on the number plate.
For the results of the character recognition trials
with the method K-Nearest neighbour level of
accuracy in 80 characters is 84.5%. Character
recognition using the K- Nearest neighbour method in
a proven application can be applied. Although overall
the success rate of 10 samples of motors taken with
changing light conditions with the assumption of
errors that can be tolerated as much as one character.
Babu, K. M., Raghunadh, M. V., 2016. Vehicle number
plate detection and recognition using bounding box
method. In International Conference on Advanced
Communication Control and Computing Technologies
(ICACCCT), Ramanathapuram, pp. 106-110. IEEE.
Budianto, A., Adji T. B., Hartanto, R., 2015. Deteksi
Nomor Kendaraan Dengan Metode Connected
Component Dan SVM. Journal TIM Darmajaya.
Kusumanto, A. N. T. R. D., 2011. Pengolahan Citra Digital
Untuk Mendeteksi Obyek Menggunakan Pengolahan
Warna Model Normalisasi Rgb. In Seminar Nasional
Teknologi Informasi & Komunikasi Terapan..
Nur Taufiq, A. H. R. I. M 2012. Sistem Pengenalan Plat
Nomor Polisi Kendaraan Bermotor Dengan
Menggunakan Metode Jaringan Saraf Tiruan
Perambatan Balik, Universitas Diponegoro: Electro
Qadri, M. T., Asif, M., 2009. Automatic Number Plate
Recognition System for Vehicle Identification Using
Optical Character Recognition. In International
Conference on Education Technology and Computer,
Singapore, 2009, pp. 335-338, IEEE.
Ruslianto, A. H. I., 2011. Pengenalan Karakter Plat Nomor
Mobil Secara. Indonesian Journal of Electronics and
Instrumentation Sytems.
Santra, S., Roy, S., Sardar, P., Deyasi, A., 2019. Real-Time
Vehicle Detection from Captured Images. In
International Conference on Opto-Electronics and
Applied Optics (Optronix), Kolkata, India, 2019, pp. 1-
4. IEEE.
Sari, S. N. D., Fadlil, A., 2014. Sistem Identifikasi Citra
Jahe Menggunakan Jarak CzekanowskI. Jurnal Sarjana
Teknik Informatika..
Setiawan, C. P. H. M., 2015. Pengenalan Plat Nomor
Kendaraan Menggunakan Neural Network. Tugas
Akhir, Politeknik Negeri Batam.
Tauchid, N. A., Rumani, R., Irawan, B., 2015. Analisis
Performansi Metode KNN (K-Nearest Neighbor)
Untuk Pengenalan Karakter Pada Plat Nomor
Kendaraan Di Raspberry Pi. Jurnal e- Proceeding of
Triyandil, J. A. D., 2014. Sistem Otomatisasi Gerbang
Dengan Pengolahan Citra Membaca Nomor Plat
Kendaraan, Skripsi Universitas Komputer Indonesia.,
Bandung, jawa barat, Universitas Komputer Indonesia.
ICAE 2020 - The International Conference on Applied Engineering