Skip to content

Number Plate Detector — A Python project that detects and reads vehicle number plates from images using OpenCV for image processing and Tesseract OCR for text recognition. It processes images, locates plates, extracts text, and saves results efficiently.

License

Notifications You must be signed in to change notification settings

mrithip/number-plate-reader

Repository files navigation

Number Plate Detector

This project detects and reads vehicle number plates from images using OpenCV and Tesseract OCR.

Features

  • Loads an image and resizes it for processing
  • Converts the image to grayscale and applies filtering
  • Detects edges and contours to locate the number plate
  • Extracts the number plate region and applies thresholding
  • Uses Tesseract OCR to read the number plate text
  • Saves intermediate and final results as images

Requirements

  • Python 3.10+
  • OpenCV (cv2)
  • pytesseract
  • matplotlib
  • Tesseract OCR (installed on your system)

Installation

  1. Clone this repository:

    git clone https://github.com/yourusername/number-plate-detector.git
    cd number-plate-detector
  2. Install Python dependencies:

    pip install opencv-python pytesseract matplotlib
  3. Install Tesseract OCR:

  4. Place your input image as fi.jpeg in the project directory.

Usage

Run the script:

python app.py
  • The script will process fi.jpeg and save output images at each step.
  • The detected number plate and OCR result will be saved as images.

Output Files

  • output_6_1_original.jpg: Resized original image
  • output_6_2_gray.jpg: Grayscale image
  • output_6_2_filtered.jpg: Filtered image
  • output_6_3_edges.jpg: Edge-detected image
  • output_6_3_contours.jpg: Image with contours drawn
  • output_6_4_plate.jpg: Cropped number plate region
  • output_6_5_thresh.jpg: Thresholded plate image
  • output_6_6_ocr_result.jpg: Plate image with OCR result

Notes

  • Make sure the path to Tesseract in app.py matches your system installation.
  • For best results, use clear images of number plates.

License

MIT License


Created with OpenCV and Tesseract

About

Number Plate Detector — A Python project that detects and reads vehicle number plates from images using OpenCV for image processing and Tesseract OCR for text recognition. It processes images, locates plates, extracts text, and saves results efficiently.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages