Skip to content

Akansha92/Vehicle_numberplate_detection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

Overview

This project implements a Vehicle Number Plate Detection system using MATLAB for real-time detection and recognition of number plates from vehicle images. The system employs image processing techniques such as thresholding, morphological operations, and template matching to identify and extract the number plate from an image.

Key Features

Image Preprocessing: The code begins by loading an image, converting it to grayscale, and resizing it for efficient processing. Edge Detection: The image is processed using thresholding and morphological operations to highlight the regions of interest (potential number plates). Region Detection: Connected components are identified, and bounding boxes are drawn around the detected number plates. Template Matching: The detected number plate characters are matched against pre-stored templates of characters to recognize the number plate text. Result Output: The detected number plate is written to a text file (number_Plate.txt), and the result is displayed to the user.

Files and Dependencies

MATLAB: The project is implemented using MATLAB. Ensure you have the necessary Image Processing Toolbox. Image Dataset (imgfildata): The dataset of character templates (stored in imgfildata) is used for template matching during character recognition. Input Image: The project requires an input image of a vehicle, which can be selected using a file dialog. Supported formats include JPG, BMP, PNG, and TIFF.

How to Run

Setup: Ensure that the required image dataset (imgfildata) is loaded and available in the workspace. Input Image: Run the script and select the input image of the vehicle when prompted. Processing: The system will process the image, detect the number plate, and display the result. Output: The final detected number plate will be saved to number_Plate.txt. Example To test the system:

Run the MATLAB script. Choose an image of a vehicle. The script will process the image and display the detected number plate along with the result in a text file.

Code Explanation

The code reads the input image, converts it to grayscale, and resizes it for consistent processing. It then applies thresholding and morphological operations (erosion and dilation) to detect potential regions of interest. Connected components (regions) are labeled and filtered to identify the number plate area. The system matches the segmented characters against pre-stored templates to recognize the number plate text. The recognized text is saved in a text file and displayed.

Output

The detected number plate characters will be saved to number_Plate.txt. The bounding boxes around the detected number plate regions will be displayed on the image.

Conclusion

This MATLAB project provides a basic yet effective approach to detecting and recognizing vehicle number plates. It demonstrates the power of image processing techniques combined with template matching for character recognition tasks.

License

Feel free to use and modify this project under the MIT License

Releases

No releases published

Packages

No packages published