Vehicle Number Plate
Detection Using ESP32-CAM
A Mini Project Presentation
Presented by :
THAMIZHARASAN B 212922106048
VIGNESH O 212922106051
THIRUVENGATAKRISHNAN M 212922106050
VIKRAM S 212922106053
SANJAY V 212922106036
Department of Electronics and Communication Engineering
Abstract: Low-Cost ANPR
System
This project presents a low-cost embedded system designed for vehicle number plate
detection utilizing an ESP32-CAM module. The integrated camera captures images
of vehicles, and the number plate within these images is then detected and
recognized using a combination of OCR and the YOLOv7 algorithm. The extracted
number plate information is subsequently displayed on a compact LCD. This
prototype effectively simulates intelligent traffic monitoring capabilities within a
highly budget-friendly setup, demonstrating the potential for accessible ANPR
solutions.
Our solution offers a viable alternative to traditionally expensive real-time ANPR
systems, making advanced traffic management more attainable for various
applications.
Introduction: Revolutionizing Traffic Monitoring
Number plate detection plays a critical role in modern smart traffic control systems, enhancing efficiency in areas like automated toll booths,
parking management, and security surveillance. Traditionally, real-time number plate recognition (ANPR) solutions have relied on expensive,
specialized hardware, posing a barrier to widespread implementation.
This project addresses this challenge by replacing costly setups with a simple, yet effective, microcontroller-based system. Utilizing the versatile
ESP32-CAM, we integrate basic machine learning (YOLOv7) for object detection and Optical Character Recognition (OCR) techniques to
accurately extract text from captured vehicle images. This innovative approach demonstrates how powerful capabilities can be achieved with
readily available and affordable components, opening new possibilities for intelligent traffic solutions.
System Architecture: Circuit Diagram Overview
Key Components Connectivity Highlights
• ESP32-CAM: The core microcontroller with integrated camera. The circuit is designed for straightforward assembly, connecting the
ESP32-CAM's GPIO pins to the FTDI module for programming and
• FTDI Programmer: For uploading code to the ESP32-CAM. to the I2C LCD for data display. The I2C interface simplifies wiring
to the LCD, requiring only two data lines (SDA, SCL) in addition to
power.
• I2C 16x2 LCD: To display the detected number plate text.
Careful attention to power supply is crucial for the ESP32-CAM,
• Breadboard: For easy prototyping and connections. which can draw significant current, especially when the camera is
• Jumper Wires: To connect all components. active. A stable 5V supply is recommended for optimal performance.
Circuit Diagram Overview
Hardware and Software Essentials
Hardware Software
• ESP32-CAM: The camera-enabled Wi-Fi module. • Arduino IDE: Primary programming environment.
• FTDI USB to Serial Adapter: Facilitates code upload. • ESP32 Board Support Package: Enables ESP32
programming in Arduino.
• I2C LCD Display (16x2): For outputting detected text. • LiquidCrystal_I2C Library: Simplifies LCD control.
• OCR Library (e.g., EasyOCR): Extracts text from images.
• Breadboard & Jumper Wires: For prototyping connections.
• YOLOv7 Algorithm: (You Only Look Once v7)
• USB Power Supply: Powers the entire circuit. Implemented on PC for number plate localization.
The combination of these hardware and software components provides a robust and flexible platform for developing the number plate detection
system. The use of a PC for the YOLOv7 algorithm allows for more powerful processing while keeping the on-device hardware minimal and cost-
effective.
Core System Components
ESP32-CAM FTDI Module LCD 16x2 (I2C) Breadboard & Wires
This compact module The FTDI USB to Serial This small character display
integrates a powerful ESP32 adapter serves as the crucial is used to present the final These fundamental
microcontroller with a bridge between the ESP32- output of the system: the prototyping tools are
camera. It is responsible for CAM and your computer. It extracted number plate text. essential for quickly
capturing real-time vehicle allows for effortless code The I2C interface assembling and testing the
images, which are then uploading from the Arduino significantly reduces the circuit without the need for
processed for number plate IDE to the ESP32-CAM, and number of pins required to permanent soldering. They
detection. Its built-in Wi-Fi also facilitates serial connect it to the ESP32- provide a flexible
capability enables seamless communication for CAM, simplifying the circuit environment to connect
image transfer to a debugging purposes, making and freeing up GPIOs for components, troubleshoot
connected PC or server for development much other functions. issues, and easily
further analysis. smoother. reconfigure the setup during
the development phase.
Implementation Workflow: Step-by-Step
1. Circuit Assembly
Connect the ESP32-CAM, FTDI programmer, and I2C LCD on a breadboard using jumper wires. Ensure all connections are secure and correctly aligned according to the circuit diagram.
2. Code Upload
Utilize the Arduino IDE with the ESP32 Board Support Package to write and upload the firmware to the ESP32-CAM via the FTDI module. This code manages image capture and communication.
3. Image Capture
The ESP32-CAM's camera captures an image of the vehicle as it passes or comes into view. The captured image is temporarily stored in the ESP32-CAM's memory.
4. Image Transmission
The captured image is then wirelessly transmitted from the ESP32-CAM to a connected PC or server via Wi-Fi for more intensive processing.
5. Number Plate Detection (YOLOv7)
On the PC, the YOLOv7 algorithm processes the received image to accurately detect and localize the rectangular region containing the number plate.
6. Text Extraction (OCR)
An OCR library, such as EasyOCR, is applied to the detected number plate region to extract the alphanumeric text (e.g., “TN01AB1234”).
7. Result Display
The extracted number plate text is sent back from the PC to the ESP32-CAM, which then displays the result on the connected 16x2 LCD.
This phased implementation ensures modularity, allowing each component to perform its specialized task efficiently within the overall system.
Results and Discussion: A Functional Prototype
Real-time Image Capture Accurate Plate Detection
The ESP32-CAM effectively captures clear images of vehicles in near The YOLOv7 algorithm demonstrates high accuracy in detecting the
real-time, providing the necessary visual input for the system. precise location of the number plate within the captured images, even
in varying lighting conditions.
Reliable Text Extraction LCD Output
The OCR component successfully reads and extracts the alphanumeric The extracted number plate text is reliably transmitted back to the
characters from the detected number plate region, converting the visual ESP32-CAM and displayed on the 16x2 LCD, providing immediate
information into digital text. visual feedback.
This proof-of-concept prototype successfully simulates a real-world intelligent traffic monitoring system. By leveraging cost-effective hardware like the ESP32-
CAM and open-source machine learning algorithms, we've demonstrated a viable, budget-friendly approach to ANPR. While the YOLOv7 and OCR processing
occurs off-device on a PC, this setup allows for complex computations that would otherwise overwhelm the limited resources of the ESP32-CAM, making it a
practical solution for various applications.
Advantages and Future Enhancements
Key Advantages Future Scope
• Budget-friendly hardware: Utilizes readily available and • Full on-device OCR: Explore optimizing OCR models to run directly
inexpensive components, making it accessible for hobbyists and on the ESP32-CAM, eliminating the need for a separate PC or server.
educational institutions.
• Real image processing using machine learning: Integrates advanced • Integrate with cloud for data storage: Implement cloud connectivity
algorithms like YOLOv7, demonstrating practical application of AI in for logging detected plates, enabling long-term data analysis and
embedded systems. centralized management.
• Expandable and portable: The modular design allows for easy • Real-time alerts for specific number plates: Develop functionality to
integration of additional sensors or features, and its compact size trigger alerts (e.g., email, SMS) when predefined number plates are
makes it suitable for various deployments. detected, useful for security or monitoring applications.
• Use solar power for field deployment: Design a low-power
consumption version and integrate solar panels for autonomous
operation in remote or off-grid locations.
References
• Arduino Documentation: Comprehensive guides and reference for Arduino IDE and programming ESP32.
• YOLOv7 GitHub Repository: Source code and documentation for the YOLOv7 object detection algorithm.
• EasyOCR Library: Python library for optical character recognition.
• Espressif ESP32-CAM Docs: Official documentation and technical specifications for the ESP32-CAM module.
• Online tutorials & ANPR research: Various academic papers and online resources contributing to Automatic Number Plate Recognition
advancements.
These resources were instrumental in the research, development, and implementation of this project, providing foundational knowledge and
practical guidance.