A Python application that uses computer vision and OCR (Optical Character Recognition) to read and process specific code patterns from a camera feed. The application matches these codes with student names and exports the results to an Excel file.
Note: This project was generated with the assistance of AI (Cursor) to create a code reader application for processing student identification codes using OCR technology.
- Real-time camera feed processing
- OCR text recognition using Tesseract
- Pattern matching using regex (format: S-###-###-####)
- Automatic student name and code matching
- Excel export functionality
- Python 3.x
- OpenCV (
cv2
) - Pytesseract
- Pandas
- Tesseract OCR engine
- Install the required Python packages:
pip install opencv-python pytesseract pandas openpyxl
- Install Tesseract OCR engine:
- For macOS:
brew install tesseract
- For Windows: Download and install from GitHub Tesseract Release
- For Linux:
sudo apt-get install tesseract-ocr
- For macOS:
- Create a
students.txt
file with student names (one name per line) - Run the application:
python app.py
- Point your camera at the codes you want to scan
- Press 'q' to quit the application
- Check the generated
student_codes.xlsx
file for results
app.py
: Main application codestudents.txt
: Input file containing student namesstudent_codes.xlsx
: Output Excel file with matched names and codesrecognized_text.txt
: Log file of recognized codes
This project is licensed under the terms specified in the LICENSE file.