Zbotic Logo Zbotic Logo
  • Home
  • Shop
  • Sale
  • 3D Print Service
  • PCB Service
  • B2B
  • Blogs
  • Contact Us
0 0

View Wishlist Add all to cart

0 0
0 Shopping Cart
Shopping cart (0)
Subtotal: ₹0.00

View cartCheckout

  • Shop
  • About Us
  • Contact Us
  • Reseller
  • Blogs
020 69134444
1800 209 0998
[email protected]
Help Desk
Facebook Twitter Instagram Linkedin YouTube
Zbotic Logo Zbotic Logo
0 0

View Wishlist Add all to cart

0 0
0 Shopping Cart
Shopping cart (0)
Subtotal: ₹0.00

View cartCheckout

All departments
  • 3D Print Service
  • 3D Printer
  • Batteries & Chargers
  • Development Boards
  • Drone Parts
  • EBike parts
  • Sensor Modules
  • Electronic Components
  • Electronic Modules
  • IoT and Wireless
  • Mechanical Parts and Workbench Tools
  • Motors & Drivers & Pumps & Actuators
  • DIY and Robot Kits
  • Show more
  • Home
  • Shop
  • Sale
  • 3D Print Service
  • PCB Service
  • B2B
  • Blogs
  • Contact Us
Return to previous page
Home Camera & Vision Modules

Number Plate Recognition System: ESP32-CAM ANPR Project India

Number Plate Recognition System: ESP32-CAM ANPR Project India

April 1, 2026 /Posted by / 0

Building a number plate recognition system with ESP32-CAM is an affordable approach to automatic number plate recognition (ANPR) for Indian parking lots, housing society gates, and toll plazas. Indian number plates follow a specific format (state code, district code, series, number) that can be parsed after OCR extraction. This project guide walks you through building a working ANPR system that captures vehicle plates, extracts text, and logs entries using the low-cost ESP32-CAM module.

Table of Contents

  • ANPR Applications in India
  • System Architecture Overview
  • ESP32-CAM Hardware Setup
  • Image Capture and Preprocessing
  • OCR Processing for Indian Plates
  • Parking Management Integration
  • Frequently Asked Questions
  • Conclusion

ANPR Applications in India

ANPR systems are increasingly deployed across India for:

  • Housing society gates: Automatic visitor logging and resident verification
  • Parking management: Entry/exit time tracking for fee calculation
  • Toll plazas: FASTag-linked verification and violation detection
  • Industrial premises: Vehicle movement logging for security
  • Traffic enforcement: Red light violation and speed detection cameras

Commercial ANPR systems cost ₹50,000-2,00,000. A DIY ESP32-CAM system costs under ₹2,000 and handles the basic use case of plate capture and logging.

🛒 Recommended: Arduino Uno R3 Development Board — Use as a barrier gate controller that receives commands from the ANPR system to raise and lower the boom.

System Architecture Overview

The system has two stages: the ESP32-CAM captures images and sends them via WiFi to a server (Raspberry Pi or cloud), which runs the heavier OCR processing. This split architecture avoids overloading the ESP32’s limited processing power while keeping the camera node cheap and replaceable.

  1. ESP32-CAM detects motion (PIR trigger or software motion detection)
  2. Captures a high-resolution image (1600×1200 UXGA)
  3. Sends the image to a local Raspberry Pi server via HTTP POST
  4. Server runs OpenCV to isolate the plate region
  5. Tesseract OCR extracts text from the plate
  6. Result is logged to a database with timestamp

ESP32-CAM Hardware Setup

// ESP32-CAM (AI-Thinker) Pin Connections for Programming
// FTDI TX → ESP32 U0R (GPIO3)
// FTDI RX → ESP32 U0T (GPIO1)
// FTDI GND → ESP32 GND
// GPIO0 → GND (for programming mode, disconnect after upload)
// 5V → 5V (use external 5V supply, NOT FTDI 3.3V)

// PIR Trigger (optional)
// PIR OUT → GPIO13 (available pin on ESP32-CAM)

Mount the ESP32-CAM at approximately 1-1.5 metres height, angled downward at 15-20 degrees towards the vehicle approach area. This angle provides the best view of Indian front number plates. Use an IR illuminator array for night operation.

Image Capture and Preprocessing

// Arduino code for ESP32-CAM capture and upload
#include "esp_camera.h"
#include <WiFi.h>
#include <HTTPClient.h>

// AI-Thinker camera model pin definitions
#define PWDN_GPIO_NUM  32
#define RESET_GPIO_NUM -1
#define XCLK_GPIO_NUM   0
#define SIOD_GPIO_NUM  26
#define SIOC_GPIO_NUM  27
#define Y9_GPIO_NUM    35
#define Y8_GPIO_NUM    34
#define Y7_GPIO_NUM    39
#define Y6_GPIO_NUM    36
#define Y5_GPIO_NUM    21
#define Y4_GPIO_NUM    19
#define Y3_GPIO_NUM    18
#define Y2_GPIO_NUM     5
#define VSYNC_GPIO_NUM 25
#define HREF_GPIO_NUM  23
#define PCLK_GPIO_NUM  22

void captureAndSend() {
  camera_fb_t *fb = esp_camera_fb_get();
  if (!fb) return;

  HTTPClient http;
  http.begin("http://192.168.1.100:5000/upload");
  http.addHeader("Content-Type", "image/jpeg");
  int code = http.POST(fb->buf, fb->len);
  String response = http.getString();
  Serial.println("Response: " + response);
  http.end();
  esp_camera_fb_return(fb);
}
🛒 Recommended: HC-SR04 Ultrasonic Distance Sensor — Use as a vehicle presence detector to trigger the camera capture when a vehicle arrives at the gate.

OCR Processing for Indian Plates

Indian number plates follow the format: XX-00-XX-0000 (e.g., MH-12-AB-1234). The server-side Python script uses OpenCV for plate detection and Tesseract for OCR:

import cv2
import pytesseract
import re

def process_plate(image_path):
    img = cv2.imread(image_path)
    gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
    
    # Bilateral filter preserves edges while removing noise
    filtered = cv2.bilateralFilter(gray, 11, 17, 17)
    edged = cv2.Canny(filtered, 30, 200)
    
    # Find contours and look for rectangular shapes
    contours, _ = cv2.findContours(edged.copy(), cv2.RETR_TREE, cv2.CHAIN_APPROX_SIMPLE)
    contours = sorted(contours, key=cv2.contourArea, reverse=True)[:10]
    
    plate_contour = None
    for c in contours:
        peri = cv2.arcLength(c, True)
        approx = cv2.approxPolyDP(c, 0.018 * peri, True)
        if len(approx) == 4:
            plate_contour = approx
            break
    
    if plate_contour is not None:
        mask = np.zeros(gray.shape, np.uint8)
        cv2.drawContours(mask, [plate_contour], 0, 255, -1)
        plate = cv2.bitwise_and(img, img, mask=mask)
        
        text = pytesseract.image_to_string(plate, config='--psm 8')
        # Validate Indian plate format
        pattern = r'[A-Z]{2}s?d{1,2}s?[A-Z]{1,3}s?d{1,4}'
        match = re.search(pattern, text.upper())
        if match:
            return match.group().replace(' ', '')
    return None

Parking Management Integration

Store plate readings in a SQLite database with entry and exit timestamps. Calculate parking duration and fees automatically. For housing societies, maintain a whitelist of resident vehicles for automatic gate opening. Unknown plates trigger an intercom call to the resident being visited.

🛒 Recommended: DHT22 Temperature and Humidity Sensor — Monitor outdoor conditions at the camera installation point; extreme heat affects camera performance.

Frequently Asked Questions

How accurate is ESP32-CAM based ANPR?

Under controlled conditions (proper lighting, vehicle speed below 20 km/h, clean plates), accuracy is 70-85%. Commercial systems achieve 95%+ because they use higher-resolution cameras, IR illumination, and trained deep learning models. The ESP32-CAM system is suitable for parking and society gates, not highway-speed applications.

Does it work at night?

The ESP32-CAM has a built-in LED flash, but it is too weak for reliable plate capture beyond 2 metres. Add an external 850nm IR LED array (invisible to human eyes) with a matching IR-pass filter on the camera for 24/7 operation.

Can it read High Security Registration Plates (HSRP)?

Yes. India’s new HSRP plates use a standardised font (Charles Wright) and reflective background that actually improves OCR accuracy. The IND hologram and Ashoka Chakra do not interfere with text recognition.

What about two-line plates (commercial vehicles)?

Indian commercial vehicles often have two-line plates with the state code on the first line and numbers on the second. Adjust the Tesseract PSM (page segmentation mode) to handle multi-line text (–psm 6 or –psm 4).

🛒 Recommended: Waveshare ESP32-S3-Nano Development Board — Upgraded ESP32-S3 with more processing power for on-device image preprocessing before server upload.

Conclusion

Building an ANPR system with ESP32-CAM is a practical and educational project that addresses a real need in Indian housing societies, parking lots, and commercial premises. While not as accurate as commercial systems, the sub-₹2,000 cost makes it accessible for DIY implementation and prototyping. Explore ESP32-CAM modules and accessories at Zbotic to start your ANPR project.

Tags: AI, ANPR, camera, ESP32-CAM, India
Share Post
  • Facebook
  • Linkedin
  • Whatsapp
Solenoid Guide: Door Locks, Va...
blog solenoid guide door locks valves and automation projects 612708
blog arduino level 5 custom pcb and production 612711
Arduino Level 5: Custom PCB an...

Related posts

Svg%3E
Read more

Endoscope Camera Module: PCB Inspection and Industrial Use

April 1, 2026 0
An endoscope camera module is an invaluable tool for PCB inspection, industrial equipment maintenance, and quality control tasks where direct... Continue reading
Svg%3E
Read more

Machine Vision with OpenCV: Raspberry Pi Object Detection Guide

April 1, 2026 0
Running OpenCV on a Raspberry Pi for object detection opens up countless applications, from industrial quality inspection to smart doorbell... Continue reading
Svg%3E
Read more

Arducam vs Raspberry Pi Camera: Which Camera Module to Choose

April 1, 2026 0
Choosing between Arducam and Raspberry Pi camera modules is one of the first decisions for any vision project. Both connect... Continue reading
Svg%3E
Read more

360-Degree Camera Stitching Project with OpenCV and Pi

March 11, 2026 0
Creating a 360-degree camera using OpenCV image stitching with Raspberry Pi is an ambitious computer vision project that combines multiple... Continue reading
Svg%3E
Read more

Webcam Streaming with Flask and Raspberry Pi: Web Interface

March 11, 2026 0
Building a webcam streaming web interface with Flask and Raspberry Pi is one of the most practical home server projects.... Continue reading

Add comment Cancel reply

Your email address will not be published. Required fields are marked

Facebook Twitter Instagram Pinterest Linkedin Youtube

Get the latest deals and more.

Download on Google Play Download on the App Store

Call us: 020 69134444 / 1800 209 0998

Monday - Saturday 09:30 AM - 06:00 PM
For Technical Supports Email: [email protected]
For Sales / Enquiries Email: [email protected]

  • My Account

    • Cart

    • Wishlist

    • Checkout

    • My Orders

    • Track Order

    • My Account

  • Information

    • FAQs

    • Blogs

    • Career

    • About Us

    • Contact Us

    • Payment Options

  • Policies

    • Privacy Policy

    • Terms & Conditions

    • GST Input Tax Credit

    • Shipping Return Policy

    • E-Waste Collection Points

    • Our Sitemap

© Zbotic.in is registered trademark of Moxie Supply Pvt Ltd – All Rights Reserved
Login
Use Phone Number
Use Email Address
Not a member yet? Register Now
Reset Password
Use Phone Number
Use Email Address
Register
Already a member? Login Now