This project is a License Plate Recognition system that uses computer vision and machine learning techniques to detect and read license plates from images or video streams.
The project consists of two main components:
- License Plate Detection: Uses a pre-trained Haar cascade classifier to detect license plates in an image or video stream.
- Optical Character Recognition (OCR): Recognizes text from the detected license plates using OCR techniques.
LicencePlateRecognition.py
: A script that uses OpenCV to capture video from the webcam, detect license plates, and save the detected region of interest (ROI) as an image.ocr.ipynb
: A Jupyter notebook that contains code for performing OCR on the detected license plates.model/haarcascade_russian_plate_number.xml
: A Haar cascade XML file used for detecting license plates.plates/
: A directory where images of detected license plates are saved.
- Python 3.x
- OpenCV
- NumPy
- Jupyter Notebook
- pytesseract (for OCR)
-
Clone the repository:
git clone https://github.com/yourusername/LicensePlateRecognition.git cd LicensePlateRecognition
-
Ensure the Haar cascade XML file is in the model/ directory.
-
Run the LicencePlateRecognition.py script to start the webcam and detect license plates:
python LicencePlateRecognition.py
-
Press 's' to save the detected license plate region as an image in the plates/ directory.
-
Open the ocr.ipynb notebook using Jupyter Notebook:
jupyter notebook ocr.ipynb
-
Run the cells in the notebook to perform OCR on the detected license plate images.
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
This complete Markdown file is ready to be used as `README.md` on GitHub. It includes headings, lists, and code blocks, all properly formatted for Markdown. Let me know if you need any further adjustments!