Reprint
Reprint
Project Report
on
AutoPlate: Real-Time Number Plate Detection and Recognition Using
OpenCV and EasyOCR
SUBMITTED BY
Harikrishnan P-246507
Jinesh Kothari-246509
Omkar Jadhav-246546
Deccan Education Society’s Fergusson
College (Autonomous), Pune Department
of Computer Science
CERTIFICATE
This is to certify that the project entitled Real-Time Number Plate Detection and Recognition Using
OpenCV and EasyOCR is submitted by:-
1. _________________________________
2. _________________________________
3. _________________________________
in partial fulfillment of the requirement of the completion of M.Sc. Data Science - I [Semester-II], has been carried out by
them under our guidance satisfactorily during the academic year 2024-2025.
Place: Pune
Date: / /2024
1. ___________________________ ____________________
2. ___________________________ ____________________
ABSTRACT
In the modern era of rapid urbanization and vehicular growth, the need for automated
surveillance, law enforcement, and intelligent transportation systems has become increasingly
significant. One of the most critical aspects of vehicle monitoring is the ability to accurately detect
and recognize number plates in real-time. The proposed project, Real-Time Number Plate
Detection and Recognition Using OpenCV and EasyOCR, aims to develop an efficient, reliable,
and scalable system that automatically identifies and extracts vehicle registration numbers from
live video feeds or images using computer vision and optical character recognition techniques.
The project harnesses the power of OpenCV, a powerful open-source computer vision library, to
process video frames, identify potential number plate regions through image preprocessing
techniques such as grayscale conversion, edge detection (using Canny), contour approximation,
and filtering based on aspect ratios and geometry. Once the number plate area is accurately
localized, it is isolated and passed to EasyOCR, a deep learning-based OCR engine, which
leverages pre-trained neural networks to accurately interpret alphanumeric characters on the
plate. EasyOCR’s support for multiple languages and its high accuracy with complex fonts and
noisy backgrounds makes it especially suitable for this real-world task, where number plates vary
in style, clarity, and lighting conditions.
The system is designed to operate in real-time, enabling frame-by-frame detection and recognition
from live camera feeds or dashcams, making it applicable in real-world scenarios such as traffic
surveillance, toll collection, parking management, highway patrolling, and crime investigation. It
also supports logging and saving recognized number plates along with timestamps, which can be
extended to integrate with backend databases for alert generation or further analysis.
Key challenges addressed in the project include handling varying lighting conditions, skewed or
tilted plates, motion blur due to vehicle speed, multiple fonts and non-standard plates, and
filtering out false positives. By combining traditional computer vision techniques with deep
learning-based text recognition, this hybrid approach balances accuracy, speed, and
computational efficiency.
Contents
1 Introduction 1
2 Problem Statement 2
3 Objectives 3
4 Motivation 4
7 Methodology / Workflow 8
8 Formatting 9
10 Model Building 11
11 Analysis 12
12 User Interface 13
13 Result Analysis 14
15 Result Discussion 17
16 Bibliography 18
17 Reference 18
Introduction
The exponential increase in the number of vehicles on roads has led to significant
challenges in managing traffic, ensuring road safety, and enforcing laws efficiently.
Manual monitoring and record-keeping systems are no longer sufficient to handle
the scale, speed, and complexity of modern urban transportation systems. This
shift has necessitated the development of automated vehicle identification systems,
among which Automatic Number Plate Recognition (ANPR) plays a pivotal role.
ANPR systems are designed to identify and interpret vehicle registration numbers
from digital images or video streams without human intervention, enabling a wide
array of applications including surveillance, toll collection, traffic management,
border control, and stolen vehicle tracking.
he motivation behind this project stems from the need to build a cost-effective,
real-time, and reliable system that can detect and recognize vehicle number plates
using publicly available tools and libraries, making the solution accessible to
developers.
Researchers, and small-scale industries. Unlike traditional commercial systems
which rely on expensive proprietary hardware and software, this project makes use
of OpenCV, a widely-used open-source computer vision library, and EasyOCR, a
lightweight, deep learning-based optical character recognition tool. Together, these
frameworks offer a powerful yet efficient combination capable of handling the
dynamic nature of real-world traffic conditions.
The core idea of the project is to detect number plates in live video feeds by
processing each frame in real-time. Initially, image preprocessing techniques such
as grayscale conversion, Gaussian blurring, edge detection, and contour analysis
are employed to isolate the region of interest (ROI) that likely contains a number
plate. Once a potential number plate is identified based on geometric properties
like rectangular shape, aspect ratio, and area, the image is cropped and passed to
EasyOCR for character recognition. EasyOCR, built on top of PyTorch and
equipped with a pre-trained Convolutional Recurrent Neural Network (CRNN), is
capable of reading characters in various fonts, languages, and lighting conditions,
making it suitable for number plates across different regions.
1
Problem Statement
2.1 Background
In recent decades, the global surge in motor vehicle usage has posed a serious
challenge to traffic regulation, law enforcement, and urban planning authorities.
As cities expand and the number of vehicles continues to grow, manual methods of
traffic surveillance and vehicle identification have become increasingly inefficient,
labor-intensive, and prone to error. This has led to the development of Automatic
Number Plate Recognition (ANPR) systems, which form a core component of
intelligent transportation systems (ITS). These systems are designed to
automatically identify and record vehicle registration numbers using images or
videos, providing a foundation for applications in traffic monitoring, toll systems,
border control, parking management, and crime investigation.
2
Therefore, there is a pressing need for a lightweight, real-time, and affordable ANPR
solution that can be deployed using readily available hardware (e.g., regular CCTV
cameras, webcams) and open-source tools. The solution must be robust enough to
perform under real-world conditions and capable of accurately detecting and
recognizing vehicle number plates from live video streams without requiring manual
intervention.
This project aims to address the following core problems:
How to accurately and efficiently detect number plates from live video frames in
varying environmental conditions using image processing techniques?
How to recognize alphanumeric characters on the detected number plate region with
high accuracy using OCR, particularly when the plate may be blurred, skewed, or
partially obscured?
How to process frames in real-time, ensuring minimal latency while maintaining
accuracy and avoiding false detections?
The proposed system will utilize OpenCV for real-time number plate detection and
EasyOCR for character recognition, forming a complete pipeline that works without
the need for expensive equipment or proprietary software. The ultimate goal is to
develop a practical, adaptable, and reliable ANPR system that can function effectively
in the uncontrolled, dynamic environments typical of urban roads and transportation
infrastructure.
3
Objectives
The primary objective of this project is to design and implement a real-time system
that can automatically detect and recognize vehicle number plates using image
processing and optical character recognition techniques. The system is intended to
be accurate, fast, cost-effective, and deployable in real-world environments using
open-source tools.
To achieve this goal, the project sets out the following specific objectives:
3
Motivation
4
Data source and Data Description
The effectiveness of any computer vision-based system, especially in real-time
object detection and recognition, heavily relies on the quality and relevance of its
data sources. In this project, the core detection mechanism is powered by a
Haarcascade classifier, which serves as the primary data-driven model for
identifying number plates in image or video frames.
The model was either custom-trained on Indian number plate images or sourced
from a dataset that reflects the structure and style of number plates commonly
found in India, including:
White background with black text (private vehicles)
Yellow background with black text (commercial vehicles)
Red background with white text (temporary registration)
Government and diplomatic plates with unique formats
This XML file is integrated with OpenCV’s CascadeClassifier module, allowing the
system to scan each frame and locate number plate regions based on patterns
learned from the dataset during the classifier’s training phase.
Haarcascade Classifier Details
Haarcascade classifiers work by extracting Haar-like features from images and
passing them through a cascade of increasingly complex classifiers. The classifier
used here is optimized to:
Detect rectangular regions typically matching the aspect ratio of number plates
Focus on edges and contrasts common in alphanumeric characters on plates
Ignore irrelevant background elements (e.g., car body, lights, road)
5
OCR Input Data
Once the number plate is detected using the Haarcascade file, the system extracts
this region of interest (ROI) and passes it to EasyOCR for text recognition. The
data passed to EasyOCR is:
A cropped grayscale image of the number plate
Preprocessed using techniques like thresholding or resizing to enhance
readability
EasyOCR, in turn, has been pre-trained on a large corpus of multilingual text data
and is capable of recognizing Indian scripts and English alphanumeric characters,
which are typically found on Indian license plates.
6
Software and Technologies
To develop a robust, real-time, and cost-effective number plate detection and
recognition system, the project leverages a suite of open-source tools, libraries, and
technologies. Each component plays a specific role in the detection, recognition,
and visualization pipeline. Below is a breakdown of the key software and
technologies used:
7
Methodology / Workflow
8
Formatting
The standard format for Indian vehicle registration numbers follows:
Example: MH 12 AB 1234
1. Font Face:
Mandatory Font:
FE-Schrift (also called German DIN font)
It's a monospaced, sans-serif font.
Designed to prevent tampering and misreading (e.g., 0 and O, 8 and B).
Same font used across all registered number plates in India under HSRP
norms.
9
2. Font Size (for real plates):
For Cars, SUVs, and Light Motor Vehicles:
Front Plate:
Height: 65 mm
Thickness (Stroke Width): 10 mm
Rear Plate:
Same as above (in most states)
For Two-Wheelers:
Front Plate:
Height: 30 mm
Thickness: 5 mm
Rear Plate:
Height: 35 mm
Thickness: 7 mm
10
Model Building
11
Analysis
The analysis phase evaluates the performance, limitations, and practical
effectiveness of the system based on multiple criteria such as accuracy, efficiency,
adaptability, and deployment readiness.
1. Functional Analysis
The primary goal of the project — detecting and recognizing vehicle number plates
in real-time — has been successfully achieved. The system works effectively with:
Standard Indian number plates (white/yellow background, black text)
Live video input from a mobile phone
Open-source tools without the need for GPU acceleration
The modular pipeline ensures each component (detection, preprocessing,
recognition) performs its role independently, allowing easy upgrades in the future.
2. Performance Analysis
Detection Accuracy:
Haarcascade achieves decent performance (~80–85%) under normal lighting
and clear plate visibility.
Limitation: Fails with non-standard plates, low light, and obstructed views.
OCR Accuracy (EasyOCR):
High accuracy (~85–90%) on clear images.
12
User Interface
Core Features:
Live video feed via <img src="{{ url_for('video_feed') }}"> — good choice for
simplicity.
A toggle button to start/stop recording (likely sending a signal to Flask back-
end to start detection).
A real-time results panel updating via fetch('/get_results') — solid for showing
OCR output.
Then the detected number is given as output along with Model Accuracy
13
Result Analysis
Result Analysis of the Project
Number Plate Detection (Haar Cascade)
Model Used: Haar Cascade Classifier (haarcascade_indian_plate_number.xml)
Function: Detects number plate regions from live video feed
Result: Bounding boxes are drawn around the number plate(s)
Strengths:
Lightweight and real-time (runs smoothly even on low-end machines)
Can detect multiple number plates even if they are not much clear and
frontal
Limitations:
Sensitive to excess on deficient angle, lighting, and blur
Can produce false positives if background has rectangular patterns
Success Rate (Approx.): ~80–90% on clean, frontal images
14
Future enhancement and conclusion
While the current system demonstrates strong potential for real-time number plate
detection and recognition using basic hardware and open-source tools, there are
several areas for improvement and future scalability:
15
Conclusion
This project successfully demonstrates a low-cost, real-time number plate detection and
recognition system using OpenCV and EasyOCR, powered by a mobile phone video feed. The
system is lightweight, easy to deploy, and performs reliably in structured environments like campus
gates, parking lots, and residential societies.
Though not as powerful as commercial ANPR systems, this solution strikes a solid balance
between accuracy, speed, and cost, making it highly viable for small-to-medium scale deployments.
With the proposed future enhancements, this system can evolve into a fully automated, scalable,
and intelligent traffic surveillance solution.
16
Results Discussion
The results obtained from the implementation of the real-time number plate
detection and recognition system are promising for a lightweight, non-deep
learning-based solution. The performance of the model was evaluated based on
various parameters such as detection accuracy, OCR accuracy, execution speed,
robustness under different environmental conditions, and real-world usability.
Summary of Results
Strengths:
Lightweight, cost-effective, and easy to deploy on low-end systems.
Reliable for standard Indian plates.
Fully functional real-time pipeline using only open-source tools.
Limitations:
Sensitive to plate clarity and light conditions.
May miss plates that don’t conform to Indian standards.
Basic OCR errors could affect enforcement applications.
17
Bibliography
1. OpenCV Documentation – https://docs.opencv.org/
2. EasyOCR GitHub – https://github.com/JaidedAI/EasyOCR
3. OpenALPR Dataset – https://github.com/openalpr/benchmarks
4. Python Official Docs – https://docs.python.org/3/
5. Seaborn Visualization Library – https://seaborn.pydata.org/
References
[1] P. Viola and M. Jones, "Rapid object detection using a boosted cascade of
simple features," in Proc. IEEE CVPR, 2001, pp. 511–518.
[2] G. Bradski, "The OpenCV Library, " Dr. Dobb’s Journal of Software Tools
, 2000.
[3] Jaided AI, EasyOCR: Ready-to-use OCR with 80+ languages supported ,
GitHub, 2020. [Online]. Available: https://github.com/JaidedAI/EasyOCR
[4] OpenCV Documentation, "Object Detection using Haar cascade classifiers,"
[Online]. Available: https://docs.opencv.org
[5] Ministry of Road Transport and Highways, Govt. of India, HSRP
Guidelines , 2012. [Online]. Available: https://morth.nic.in
18