This project demonstrates a toll collection system using OpenCV for image processing, Tesseract for OCR, and FreeGLUT for OpenGL rendering.
Make sure you have the required libraries installed. Open a terminal and run the following commands:
sudo apt install build-essential cmake pkg-config
sudo apt install libopencv-dev
sudo apt install tesseract-ocr libtesseract-dev libleptonica-dev
sudo apt install freeglut3 freeglut3-dev
sudo apt install libglu1-mesa libglu1-mesa-dev mesa-common-dev
sudo apt install tesseract-ocr-engSave the following code as toll_collection.cpp:
// Add toll_collection.cpp C++ code hereRun the following command to compile the program:
g++ -o toll_collection toll_collection.cpp -lGL -lGLU -lglut `pkg-config --cflags --libs opencv4` -ltesseract -lleptExecute the compiled program with:
./toll_collectionUse the keyboard as described in the code comments:
- Press
1-9to add different types of vehicles. - Press
Space Barto start/stop the vehicle movement. - Press
Enterto process an image for license plate detection. - Press
ifor instructions. - Press
pfor toll prices. - Press
qto exit and show the total collected toll.
- Missing Image: Ensure the image path provided in the code exists. If not, change the path to an existing image.
- Compilation Errors: If you encounter any errors during compilation, ensure all dependencies are correctly installed, and paths are correctly set.
Starting Window
Home Page
Instructions Window
Vehicle Toll Prices
Vehicles Starting Point
Vehicle Movement
Total Amount Collected
Sample Number Plate 1
Number Plate Recognition
Sample Number Plate 2
Number Plate Recognition










