pISSN: 2723 - 6609 e-ISSN: 2745-5254
Vol. 5, No. 9 September 2024 http://jist.publikasiindonesia.id/
Jurnal Indonesia Sosial Teknologi, Vol. 5, No. 9, September 2024 3369
Application of OCR Technology for License Plate Detection
and Yolo V8 for Car Counting
Rizki Muhammad Ridwan
1*
, Muhammad Aththar Musyaffa
2
, Kurniawan Azis
3
,
Sony Sumaryo
4
, Azam Zamhuri
5
Universitas Telkom Bandung, Indonesia
Email:
1*
2
,
3
4
,
5
*Correspondence
ABSTRACT
Keywords: object
detection; optical
character recognition;
facial recognition;
automatic license plate
recognition; smart camera.
The development of urban mobility and the growth of the
number of motor vehicles has created significant security
challenges in security management in residential
environments, parking areas, and office areas. In this
context, the use of Automatic License Plate Recognition
(ALPR) technology and object detection emerged as
potential solutions. Through the implementation of a smart
camera system equipped with license plate detection and
object detection, this research aims to reduce the risk of
human error in maintaining safety and preventing the loss of
users' vehicles. In answering this problem, this research
offers a solution in the form of the development of a smart
camera system that can detect the presence of vehicles and
recognize license plates with a high level of accuracy.
Through the integration of ALPR and object detection, this
system is expected to overcome obstacles that arise in
residential, office, and parking lot environments, improve
efficiency, and effectively prevent vehicles from changing
hands. The implementation of automatic bars, access cards,
and integrated CCTV surveillance will further strengthen
security. With the results of the research, the proposed smart
camera system has succeeded in achieving a vehicle and
license plate detection accuracy level of above 90%. The
quantitative and qualitative data collected supports the
effectiveness of this solution in improving the safety and
comfort of the area. In conclusion, this research makes a
positive contribution to facing security challenges in cities
through the use of advanced technology, opening up the
potential for widespread application in the context of urban
mobility that continues to grow.
Rizki Muhammad Ridwan, Muhammad Aththar Musyaffa, Kurniawan Azis, Sony Sumaryo,
Azam Zamhuri
Jurnal Indonesia Sosial Teknologi, Vol. 5, No. 9, September 2024 3370
Introduction
Motor vehicles are one of the important elements in the increasing urban mobility
rapid urbanization and population growth. (Aulia et al., 2019). The rapid growth of urban
mobility and the number of motor vehicles pose security challenges in residential areas,
offices, and parking lots. License plates are a form of identity for every vehicle, both
motorcycles and cars. Vehicle license plates consist of a combination of letters and
numbers, where each letter and number contains information about the provincial code
and the area code where the vehicle is registered.
Advances in AI have allowed us to develop systems that can mimic humans' ability
to recognize objects. One example is object detection, where computers can be trained to
find and identify specific objects in images, such as vehicle license plates. This training
process involves providing a large amount of data to the computer to learn to recognize
the distinctive features of the object it wants to detect (Samek, 2017). Object detection
determines the existence of an object, its scope, and its location on the image. Detection
objects identify the class of objects present in the database that have been trained. Object
detection begins with the recognition of an object. It can be treated as second-class object
recognition, where one class represents an object class and another class represents a non-
object class. Object detection is divided into two, namely soft detection and hard
detection. Soft detection can only detect the presence of an object whereas hard detection
detects the presence of an object and the location of the object on the image. Object
detection is usually done by searching each part of the image to localize the part, which
is photometric or whose geometry matches the target object in the database training. This
can be achieved by scanning the object template across the image in different locations,
scales, and rotations, and detection is declared if the similarity between the template and
the image is high enough. The similarity between the template and the image region can
be measured by their correlation. Recent years have proven that image-based detection
objects are sensitive to training data. (Jalled & Voronkov, 2016).
Object detection is a technique in artificial intelligence that allows computers to
identify specific objects in images or videos. This process involves training a computer
model using a large amount of data. One of the important applications of object detection
is Optical Character Recognition (OCR) which aims to convert text in images into a
computer-readable format. (Zhao et al., 2019).
This vehicle license plate detection is known as Automatic License Plate
Recognition (ALPR) technology, ALPR is a technology used to detect and recognize the
character of vehicle license plates, and this technology has been implemented in daily life
(Galahartlambang et al., 2023) The method used to take license plate objects in a vehicle
image is the Deep Learning method. Deep Learning has become a hot topic in recent
years, some of fx which are used to create object detection and face detection (Winarno
et al., 2020). YOLO (You Only Look Once) (Andwiyan et al., 2021), as one of the leading
object detection algorithms, has proven to be effective in a wide range of applications,
including vehicle detection (Garg & Phadke, 2023) YOLO is capable of producing fast
Application of OCR Technology for License Plate Detection and Yolo V8 for Car Counting
Jurnal Indonesia Sosial Teknologi, Vol. 5, No. 9, September 2024 3371
and accurate results, which is crucial in real-time applications (Zou et al., 2023) (Wang
et al., 2023).
In this study, a method is used in terms of detection in real time. The method used
is YOLO (You Only Look Once). The YOLO method is one of the state-of-the-art
methods for the detection of objects in real-time conditions. YOLO is a detector with a
unified model that predicts bounding boxes and class probabilities directly on a full image
in one evaluation. The YOLO base model can process images at 45 FPS (frames per
second) in real-time conditions. However, the YOLO method is still far from perfect to
be applied to autonomous driving, because errors that can occur in the size of the
bounding box lead to limited determination of the distance of the detected object [22].
There are several studies as considerations in this study, the following previous research
related to this study that has been conducted previously explains the implementation of
the YOLO method to detect people. The basis of the YOLO method used is YOLO with
7 convolutional layers, they built a human action recognition system using the YOLO
method. The dataset used is the Lyris Human Activities dataset, which is a video-shaped
dataset. The model used takes the input frame after a certain period and assigns a label
based on a single frame, describing the application of Fast YOLO to the detection of
objects embedded in videos in real-time using the Pascal VOC 2007 dataset. Although
YOLOv2 can achieve real-time performance on powerful GPUs, it is still a challenge to
utilize it on devices with limited computing power and memory. Fast YOLO is proposed
by accelerating YOLOv2, to reduce power consumption on the device.
For this study, car calculation and car detection will use the YOLO method because
this method has good speed and accuracy in detecting objects. To carry out the process
of retrieving license plate data from the image will be carried out using Optical Character
Recognition (OCR) which generates text from the captured image. At this time, the
implementation of OCR has been simplified with the help of the Tesseract OCR library
and the accuracy level is also relatively high. This process is carried out to retrieve the
license plate serial code which will later be stored in the database. Face Detection will
use the Haar Cascades method as it offers a compact and efficient method for detecting
faces. (Shinde et al., 2018).
The purpose of this research is to develop and implement a smart camera system
that can detect vehicles, license plates, and face detectors and calculate the number of
vehicle arrivals and departures in parking areas, and residential and office areas. In
addition, this research aims to improve the level of security in residential areas, offices,
and parking areas by providing additional protection through vehicle and license plate
detection. This is expected to prevent illegal parking practices and related criminal acts.
In addition, the objectives of this project also include modernization of the security
system area, optimization of identification accuracy, and provision of accurate
information. By presenting real-time data on the number of vehicles entering and exiting,
the project is expected to improve efficiency and enable real-time monitoring for quick
response to emergencies. Another goal is to provide a higher level of security.
Furthermore, this project aims to optimize the use of parking facilities by monitoring
Rizki Muhammad Ridwan, Muhammad Aththar Musyaffa, Kurniawan Azis, Sony Sumaryo,
Azam Zamhuri
Jurnal Indonesia Sosial Teknologi, Vol. 5, No. 9, September 2024 3372
capacity and managing parking spaces efficiently. Through the achievement of these
goals, it is hoped that this research can make a positive contribution to efficient parking
management and improve safety in parking areas, housing, and offices.
Research Methods
Research Stages
This stage is carried out for the creation of system designs and program creation
flows that will be used as guidelines or guides in conducting research. The design can be
in the form of program flows, steps, or flowcharts. (Alhaq et al., 2021). The following
Figure 1 shows a more detailed overview of the stages of the research methodology.
Figure 1. Research Stages
Data Collection
This data collection was carried out directly at the Buah Batu Housing Gate and
Cherry Field Complex. There are 2 stages of data collection, namely by video recording
and in real-time. When the data has been stored, the data processing stage will be carried
out.
Data Processing
Object Detection
The following are the stages of data processing of the Object Detection subsystem:
Figure 2. Object Detection Block Diagram
The image that has been obtained from the camera sensor is further processed by
the system using machine learning to carry out the detection process by pre-processing
the video per frame, then with data training to match the frames to be detected, then if the
object is detected, object annotation will be carried out to determine the detection
performance with a scope of 0%-99%, after which the detection results will be entered
into the next process, namely the classification process.
The measurement method is carried out by determining the CNN accuracy model,
determining the threshold intersection over union (IoU) to obtain detection accuracy,
evaluating performance per frame to achieve detection stability per FPS, and validating
to calculate the accuracy and recall of the vehicle's object detection capability.
1. Use the training dataset to train the vehicle detection model.
Application of OCR Technology for License Plate Detection and Yolo V8 for Car Counting
Jurnal Indonesia Sosial Teknologi, Vol. 5, No. 9, September 2024 3373
2. Calculate the IoU between the detection result and the ground truth to determine the
appropriate IoU threshold to obtain accurate results.
3. Measure FPS during testing to determine the limits of hardware performance and
ensure detection speed meets real-time requirements.
4. Using validation data to calculate precision and recall and perform sensitivity analysis
to model parameter variations.
Pre-Trained Data In the pre-processing stage of the data, the important step to take
is to make all the datasets into a size of 640 x 640 pixels, the size of 640 x 640 pixels is
chosen as a compromise between good image quality and computational efficiency during
training and conclusion. Furthermore, the dataset that has been manually annotated is
divided into two parts, namely training data and test data. As many as 80% of the total
dataset is used as training data, while the remaining 20% is used as test data. This division
is important to objectively evaluate the model's performance on data that has not been
seen before during training. (Garg & Phadke, 2023).
Vehicle License Plate Detection
The vehicle license plate detection process begins with the input of an image
containing the vehicle and license plate. This input is then processed video per frame.
Each frame is processed separately to detect license plates. Furthermore, character
segmentation is carried out to identify and separate the characters on the license plate
from the background. After that, the identified characters are extracted character traits,
which involves capturing important information such as pixel shape, size, intensity,
training layers, or machine learning models using the results of the feature extraction.
This training process aims to build a model that can recognize license plate characters
accurately. After the model is trained, it will be used to detect license plates on each
frame. The model is used to recognize the characters on the license plate, and the detection
results from each frame are collected. The final output is object classification information,
which is text that represents the vehicle's license plate number.
The Optical Character Recognition (OCR) process is simple: Imagine we have a
photo that contains text. OCR will work like a detective trying to make sense of the
writing. The process can be divided into several stages:
1. Choosing a Photo: First, we select the photo we want to read the text on. These photos
are usually in .bmp or .jpg format.
2. Cleaning Photos: Just like cleaning the house before guests arrive, photos also need to
be cleaned. This stage aims to remove unimportant parts, such as smudges or doodles,
to make the writing clearer.
3. Separating the Writing: Once the photo is clean, we will separate each letter or number
into different parts. It's like separating the fruits from the basket.
4. Equalize Size: Each letter or number that has been separated will be equalized in size
and thickness. This is so that the computer can more easily compare it with existing
data.
Rizki Muhammad Ridwan, Muhammad Aththar Musyaffa, Kurniawan Azis, Sony Sumaryo,
Azam Zamhuri
Jurnal Indonesia Sosial Teknologi, Vol. 5, No. 9, September 2024 3374
5. Finding Distinctiveness: Each letter or number has its distinctive characteristic. This
stage aims to find the distinctive features of each letter or number that has been
separated.
6. Recognizing Letters: The features that have been found will be compared to the data
already on the computer. That way, the computer can guess what letters or numbers
are in the photo.
Pre-processing methods
1. Unsharp Mask
The unsharp mask technique works by increasing the contrast between the edges of
the object and the surrounding area, making the image look sharper and more detailed.
This method is very useful for reducing the effect of blur on images, especially on photos
taken in low light conditions or camera movement. (Dar & Mittal, 2020).
2. Grayscale
Converting an image to grayscale can reduce the complexity of image processing,
as each pixel has only one intensity value, which is grayscale. This is very beneficial for
reducing the computing load.
3. Histogram Equalization
Histogram equalization is a technique to sharpen the contrast of an image. By
sharpening the contrast in the image to be used, it will be easier to capture the information
in the image and the result will be better when compared to the image before processing
(Mau, 2016). This is because when an image is applied to histogram equalization, the
intensity of a pixel in the image will be evenly distributed which will make the image
quality better. (Azam, 2016).
4. Median Filtering
Median filtering is an effective method of removing noise in an image without
removing important details. This method works by replacing the pixel value with the
median value of its neighbor so that random noise can be reduced.
5. Gaussian Blur
Gaussian blur is a technique used to smooth an image by averaging the value of the
surrounding pixels. This method is often used to reduce noise and unwanted details before
the segmentation or binarization process.
6. Otsu Binarization
Otsu binaryization is an automated method of converting grayscale images into
binary (black and white) images. This method optimally determines the threshold value
based on the distribution of pixel intensity in the image, resulting in good segmentation
between the object and the background.
7. Dilation
Dilation is a morphological operation used to zoom in on objects in an image. This
operation is useful for filling small holes in objects and connecting disconnected parts of
objects.
Application of OCR Technology for License Plate Detection and Yolo V8 for Car Counting
Jurnal Indonesia Sosial Teknologi, Vol. 5, No. 9, September 2024 3375
Results and Discussion
Data Collection
Data was obtained from cars entering and exiting the gate of the Buah Batu Housing
and Cherry Field Complex.
Figure 4. Object Detection Data Collection
Figure 5. License Plate Detection Data Collection
Data Processing
1. Object Detection
This vehicle detection and counting system uses cameras to capture traffic video
and process frames in real time to detect and count the number of vehicles crossing a
certain line. The system utilizes the YOLO V8 model for object detection and tracking
algorithms to track detected vehicles from frame to frame. The code also includes a
feature to store images of detected vehicles and calculate vehicle detection times.
YOLO v8 was used in this study because it offers improved performance and better
accuracy compared to previous versions. The model is designed to be faster and more
efficient, enabling real-time object detection with low latency, which is essential for
vehicle detection and counting applications. With more advanced neural network
architecture and better data augmentation techniques, YOLO v8 can identify objects more
precisely and accurately. In addition, better generalization capabilities and compatibility
with the latest technologies make YOLO v8 more flexible and easy to use, making it an
ideal choice for this research.
Table 1
Training Results
EP and
Box_
loss
Obj_l us
Cls_
Loss
Precision
Recall
mAP_0.
5:0.95
Rizki Muhammad Ridwan, Muhammad Aththar Musyaffa, Kurniawan Azis, Sony Sumaryo,
Azam Zamhuri
Jurnal Indonesia Sosial Teknologi, Vol. 5, No. 9, September 2024 3376
1
0.874
5
0.336
177
0.301
361
0.529
893
0.612
314
0.44608
0
2
1.446
348
0.669
926
0.366
049
0.486
774
0.407
225v
0.47640
1
3
1.224
577
0.674
360
0.304
363
0.524
420
0.406
874
0.35363
1
4
1.088
737
0.739
463
0.250
935
0.621
485
0.491
841
0.33573
1
5
0.648
120
0.798
532
0.269
102
0.583
086
0.538
615
0.35308
2
300
0.054
854
0.060
002
0.028
556
0.811
487
0.826
173
0.53140
7
Figure 6 Training Results Graph
The table above shows the results of training the YOLOv8 model for 300 epochs,
In the initial epoch the values of Box loss, Obj_loss, and Cls_loss were 0.874540,
0.336177, 0.301361 respectively and in the last epoch, the values of the training results
showed a consistent decrease Where in the 300th epoch the values were 0.054854,
0.060002, 0.028556. Meanwhile, Precision, Recall, mAP_0.5, and mAP_0.5:0.95 showed
a consistent increase from 0.529893, 0.612314, 0.586869, 0.446080 to 0.811487,
0.826173, 0.746705, 0.531407. This shows that the model has achieved quite good and
stable performance in detecting objects with a high level of accuracy.
Vehicle License Plate Detection
a. OCR-Based Vehicle License Plate Detection System
Application of OCR Technology for License Plate Detection and Yolo V8 for Car Counting
Jurnal Indonesia Sosial Teknologi, Vol. 5, No. 9, September 2024 3377
The system is designed to automatically recognize and read vehicle license plates
using Optical Character Recognition (OCR) technology. OCR allows the system to
convert the text contained in an image or video into digital data that can be processed by
a computer
b. System Working Principle
This system works in the following ways:
1. Image Acquisition: The camera captures images of the vehicle's license plates from a
distance of at least 1 meter. The camera position is arranged in such a way that the
entire entrance area can be captured clearly.
2. Pre-processing: The captured image will be processed to improve the quality of the
image and make the character recognition process easier.
3. License Plate Detection: The system will detect the presence of license plates on the
image using an object detection algorithm.
4. Character Recognition: Once the license plate is detected, OCR will be used to
recognize the characters on the license plate.
5. Output: The character recognition results will be displayed or stored in the database.
Reasons to Use OCR
OCR was chosen because of its excellent ability to recognize text from images. This
technology has developed rapidly and is widely used in a wide range of applications.
Some of the advantages of OCR include:
a. High Accuracy: Modern OCR can recognize text with very high accuracy, even in
less-than-ideal image conditions.
b. Speed: The character recognition process can be done in real-time.
c. Flexibility: OCR can be used to recognize different types of fonts and languages.
Using Roboflow for Data Labeling
To train an object detection model, pre-labeled training data is required. In this
study, the Roboflow platform is used to carry out the data labeling process. Roboflow
provides a user-friendly interface and features that make the labeling process easy, such
as:
a. Labeling: Users can easily label objects in images, such as marking areas of license
plates.
b. Bounding Box: Roboflow automatically generates a bounding box to delimit the area
of an object that has been labeled.
c. Dataset Management: Roboflow allows users to easily manage datasets, including
organizing, filtering, and exporting data.
Rizki Muhammad Ridwan, Muhammad Aththar Musyaffa, Kurniawan Azis, Sony Sumaryo,
Azam Zamhuri
Jurnal Indonesia Sosial Teknologi, Vol. 5, No. 9, September 2024 3378
Figure 7. Labeling on license plates
OCR and Object Detection Integration
By combining OCR technology and object detection, the system can perform a
more complex task, which is not only detecting the presence of a vehicle but also
accurately recognizing the vehicle's license plate.
Testing
1. Object Detection
Testing was carried out at the CherryField Complex security post when vehicles
entered and exited the housing.
Test Results
The following are the test results of the object detection subsystem with moderate
light conditions in the afternoon using YOLO V8.
Figure 8. Real-time test results Figure 9. CCTV Recording Video Testing Results
Figure 10. Vehicle Detection Results
Figure 9 shows the results of the model prediction in the experimental video. Which
contains a vehicle that passes through the security gate. Boxes mark detected objects with
labels that provide information about the object's category and object prediction
Application of OCR Technology for License Plate Detection and Yolo V8 for Car Counting
Jurnal Indonesia Sosial Teknologi, Vol. 5, No. 9, September 2024 3379
confidence. This visualization allows a qualitative evaluation of the model's performance
in detecting and classifying objects in real-time conditions.
Table 2
Description of the detection results
Vehi
cle
Information
Counter Results
1
Detected
1
2
Detected
2
3
Detected
3
4
Detected
4
5
Detected
5
6
Detected
6
7
Detected
7
8
Detected
8
9
Detected
9
10
Detected 2 times due to noise
10, 11
11
Detected 2 times due to noise
12, 13
12
Detected
14
13
Detected
15
14
Detected
16
15
Detected
17
16
Detected
18
17
Detected
19
In the table, it was found that the number of vehicles that passed through the
entrance was 17 vehicles at the time of data collection.
Vehicle License Plate Detection
Application of the method on the image
1. Unsharp Mask
In this study, images taken through PiCamera will be applied with an unsharp mask
to sharpen the image quality so that it can be processed better in the future by the program.
Figure 11. Examples of images taken by CCTV cameras
Figure 12. Example of an image after the application of Unsharp Mask
2. Grayscale
Rizki Muhammad Ridwan, Muhammad Aththar Musyaffa, Kurniawan Azis, Sony Sumaryo,
Azam Zamhuri
Jurnal Indonesia Sosial Teknologi, Vol. 5, No. 9, September 2024 3380
After the program has obtained the license plate image in the initial image,
grayscale will be applied to ease the computational process that must be carried out by
CCTV at the next stage.
Figure 13. Image to grayscale conversion
3. Histogram Equalization
Once the license plate image is converted to grayscale, the program will apply an
equalization histogram to increase the contrast in the image.
Figure 14. Results of the application of histogram equalization
4. Gaussian Blur + Otsu Binarization
Next, the image will be converted into binary so that it can be read by Tesseract
OCR. However, before converting the image to binary, Gaussian Blur will be done on the
image first to reduce the noise in the image before converting it to binary.
Fig15. Image to binary conversion results
Figure 16. Test Results Figure 17. Test Results
Table 3
Test Results
Actual License
Plate
License Plate
Detected
Detection
Accuracy
Detection Results
Application of OCR Technology for License Plate Detection and Yolo V8 for Car Counting
Jurnal Indonesia Sosial Teknologi, Vol. 5, No. 9, September 2024 3381
D 1867 VBI
D 1867 Vei
88%
D 1322 VDE
D 1322 VDE
100%
D 1898 VZB
D 1898 VZB
100%
D 1474 IWA
D 1474 IWA
100%
D 1650 YCS
D 1650 YCS
100%
B 2980 KGW
B 2980 KGW
100%
Analysis of the Test Results of the Object Detection Sub-System
The tests carried out on the Object Detection Sub System showed quite satisfactory
results, where the system successfully detected the vehicle as expected. However, there
are several obstacles related to noise or interference in data that cause double detection in
vehicles. This is mainly due to the high speed of the vehicle. When the vehicle is traveling
at high speed, the frames per second of the camera are not able to capture the image
enough, resulting in a shadow or blur effect. As a result, the object detection system
interprets the shadow as a separate object, thus counting the vehicle twice or more.
Factors Affecting System Performance
Some of the factors that affect the performance of this object detection system
include:
1. Vehicle Speed: Vehicles traveling at high speeds tend to produce blurry images,
making it difficult to distinguish between one vehicle and another.
2. Camera Quality: Camera resolution and low frame rate rates can affect the quality of
the images produced.
3. Lighting: Poor lighting conditions, such as dim or too bright light, can interfere with
the detection process.
4. Detection Algorithm: The performance of the object detection algorithm, in this case
YOLOv8, also has a significant impact on the detection accuracy.
YOLOv8 Model Training Results
The YOLOv8 model was trained using 300 epochs. The training results showed a
significant increase in the mAP (mean Average Precision) value, which indicates an
improvement in the model's ability to detect objects. However, there is still room for
improvement, especially in reducing the number of false positives. The discussion of the
analysis results shows that the YOLOv8 model training was carried out for 300 epochs
with initial results Box_loss 0.874540, Obj_Loss 0.336177, Cls_Loss 0.301361,
Precision 0.529893, Recall 0.612314, mAP_0.5 0.586869, mAP_0.5:0.95 0.446080, up
to mAP_0.50.746705 and mAP_0.5:0.95 0.531407.
Vehicle Detection Test Results
From the test results, 17 detections with 100% accuracy and 19 vehicle counting
results with 89% accuracy were obtained. This shows that the system can detect most
Rizki Muhammad Ridwan, Muhammad Aththar Musyaffa, Kurniawan Azis, Sony Sumaryo,
Azam Zamhuri
Jurnal Indonesia Sosial Teknologi, Vol. 5, No. 9, September 2024 3382
vehicles accurately. However, the existence of double detection causes the accuracy of
vehicle counting to be slightly reduced.
Test Results of Vehicle License Plate Detection Sub-System
Tests conducted on the Vehicle License Plate Detection Sub System show that the
performance of the system is greatly influenced by several main factors, namely the
position of the camera, lighting, and the preprocessing method used.
Comparison of Preprocessing Method Results
1. Combinations of pre-processing methods Grayscale
For the first test, the image will be converted to grayscale then the image will be
converted to binary for Tesseract to read. For the reading of license plate characters
with the grayscale-only pre-processing method, the average accuracy obtained reached
71.46%.
2. Grayscale + Histogram Equalization
For the second experiment, the pre-processing method applied to the image was
grayscale, which was followed by Histogram Equalization, which was then converted
into binary. The accuracy of reading license plates obtained by applying this pre-
process method reached 64.97%
3. Without Using Dilation
In the last experiment, a grayscale pre-processing method will be performed, but when
it is read by the program, the image will only be converted to binary, without applying
dilation first. The accuracy of the license plate reading obtained reached a value of
67.08%.
Influence of Camera Position and Lighting
For the system to accurately detect vehicle license plates, it is necessary to
strategically place cameras so that the entire entrance area can be captured. In addition,
adequate lighting is also very important to ensure that the license plate can be read
properly by the camera. Lack of lighting or uneven lighting conditions can cause
difficulties in the process of character detection and recognition.
The Influence of Preprocessing Methods
In this study, several experiments have been carried out using various preprocessing
methods to improve the quality of the image before character recognition. The methods
used include:
1. Grayscale: Convert images to grayscale to simplify the processing process.
2. Binarization: Converts images into binary images (black and white) to make character
segmentation easier.
3. Histogram Equalization: Distributes the image intensity histogram more evenly to
improve contrast.
4. Dilation: Perform morphological operations to zoom in on objects (characters) in the
image.
Test and Analysis Results
From the results of the tests carried out, it can be concluded that:
Application of OCR Technology for License Plate Detection and Yolo V8 for Car Counting
Jurnal Indonesia Sosial Teknologi, Vol. 5, No. 9, September 2024 3383
1. Effect of Lighting: Sufficient and even lighting is essential to improve detection
accuracy. Photos taken during the day with good lighting produce the highest accuracy
compared to photos taken at night, even using flash.
2. Effect of Preprocessing Method: The combination of grayscale and binarization
methods gives quite good results. The addition of histogram equalization can improve
the contrast of the image, but it does not always provide a significant increase in
accuracy. The use of dilation operations can help connect the disconnected parts of the
character, but it is important to be careful not to cause the characters to merge.
3. Detection Accuracy: The accuracy of license plate detection is affected by several
factors, including image quality, preprocessing methods, and the character recognition
algorithm used. In this test, the highest accuracy was obtained under good lighting
conditions and by using a combination of grayscale and binarization methods.
Conclusion
Testing on each specification of the smart camera to detect license plates and count
cars in the parking area, to ensure the functionality of the three specifications with test
results that meet the target, which has been determined previously. The results of the test
include:
1. Sub Sistem Object Detection
In object detection, the accuracy level has reached above 89%, but there is some
noise found when collecting data in the field, namely if the vehicle passes through the
gate at the same time, one of the vehicles is not detected by the camera, and if the vehicle
passes through the gate at high speed, the camera detects 2 passing vehicles.
Implementation and testing of the model in dark and bright light conditions can
certainly result in different detection conditions. The conclusion confirms that the trained
YOLOv8 model has achieved high detection performance and the real-time
implementation using CCTV cameras is going well.
2. Vehicle License Plate Detection Sub System
Based on the test results, the OCR-based vehicle license plate character detection
and reading system that has been developed can be said to be successful. The system can
achieve 100% accuracy in recognizing license plates at a distance of 50 cm and 88% at a
distance of 80 cm. This shows the great potential of this system to be applied in various
systems that require automatic vehicle identification. Vehicle License Plate Detection has
reached an accuracy level of above 88% with several shortcomings where the camera
must be placed in the appropriate position so that the camera can detect the vehicle and
has a bright light to detect the vehicle license plate.
Rizki Muhammad Ridwan, Muhammad Aththar Musyaffa, Kurniawan Azis, Sony Sumaryo,
Azam Zamhuri
Jurnal Indonesia Sosial Teknologi, Vol. 5, No. 9, September 2024 3384
Bibliography
Alhaq, Z., Mustopa, A., Mulyatun, S., & Santoso, J. D. (2021). Penerapan Metode
Support Vector Machine Untuk Analisis Sentimen Pengguna Twitter. Journal of
Information System Management (JOISM), 3(1), 1621.
Andwiyan, D., Frian, T., & Aan, M. (2021). Sistem Penghitung Kendaraan Berbasis
Computer Vision Terintegrasi Website dan API. Incomtech, 10(2), 2328.
Aulia, S., Maria, P., & Ramiati, R. (2019). Aplikasi Pendeteksi Plat Nomor Kendaraan
Berbasis Raspberry Pi Menggunakan Website Untuk Pelanggaran Lalu Lintas.
Elektron: Jurnal Ilmiah, 8489.
Azam, M. A. (2016). A Review of Various Histogram Equalization Techniques for Image
Enhancement. IOSR Journal of Electrical and Electronics Engineering, 11(04), 48
51.
Dar, K. A., & Mittal, S. (2020). A dynamic fuzzy histogram equalization for high dynamic
range images by using a multi-scale Retinex algorithm. Proceedings of the
International Conference on Innovative Computing & Communications (ICICC).
Galahartlambang, Y., Khotiah, T., Fanani, Z., & Solekhah, A. A. Y. (2023). Deteksi Plat
Nomor Kendaraan Otomatis Dengan Convolutional Neural Network Dan Ocr Pada
Tempat Parkir Itb Ahmad Dahlan Lamongan. Jurnal Manajemen Informatika Dan
Sistem Informasi, 6(2), 114122.
Garg, R., & Phadke, A. C. (2023). Enhancing Underwater Fauna Monitoring: A
Comparative Study on YOLOv4 and YOLOv8 for Real-Time Fish Detection and
Tracking. International Conference on Sustainable and Innovative Solutions for
Current Challenges in Engineering & Technology, 4152.
Jalled, F., & Voronkov, I. (2016). Object detection using image processing. ArXiv
Preprint ArXiv:1611.07791.
Mau, S. D. B. (2016). Pengaruh Histogram Equalization Untuk Perbaikan Kualitas Citra
Digital. Simetris: Jurnal Teknik Mesin, Elektro Dan Ilmu Komputer, 7(1), 177182.
Samek, W. (2017). Explainable artificial intelligence: Understanding, visualizing, and
interpreting deep learning models. ArXiv Preprint ArXiv:1708.08296.
Shinde, S., Kothari, A., & Gupta, V. (2018). YOLO-based human action recognition and
localization. Procedia Computer Science, 133, 831838.
Wang, G., Chen, Y., An, P., Hong, H., Hu, J., & Huang, T. (2023). UAV-YOLOv8: A
small-object-detection model based on improved YOLOv8 for UAV aerial
photography scenarios. Sensors, 23(16), 7190.
Winarno, E., Al Amin, I. H., Hartati, S., & Adi, P. W. (2020). Face recognition based on
Application of OCR Technology for License Plate Detection and Yolo V8 for Car Counting
Jurnal Indonesia Sosial Teknologi, Vol. 5, No. 9, September 2024 3385
CNN 2D-3D reconstruction using shape and texture vectors combined. Indonesian
Journal of Electrical Engineering and Informatics (IJEEI), 8(2), 378384.
Zhao, Z.-Q., Zheng, P., Xu, S., & Wu, X. (2019). Object detection with deep learning: A
review. IEEE Transactions on Neural Networks and Learning Systems, 30(11),
32123232.
Zou, Z., Chen, K., Shi, Z., Guo, Y., & Ye, J. (2023). Object detection in 20 years: A
survey. Proceedings of the IEEE, 111(3), 257276.