This project was inspired by Dr.Malmir, whose brilliant idea laid the foundation for its development. Thanks for the insightful concept that sparked its creation!
This is a small student project designed to process images containing both English letters and numbers, extract text from them, and retrieve geographical metadata stored within the image. The extracted data, including image name, serial number, and location coordinates, are then saved into a database. You can also delete specific entries from the database using the same program.
- Extracts text from images, including both numbers and letters.
- Retrieves geographical metadata stored in the image.
- Saves extracted data into a structured database.
- Supports deleting specific entries from the database using the "name" parameter.
# Print extracted data
print(f"Name: {machine_name}")
print(f"Serial Number: {serial_number}")
print(f"Location: {location}")
A sample test database has been provided in this repository, which can be viewed online using this website for View DB and this website for query or tested locally by cloning this project.
Follow these steps to install and set up the project:
-
Install Tesseract
Download and install Tesseract OCR from this link. -
Add Tesseract to System PATH
- Search for "Edit the system environment variables"
- Open Environment Variables
- In System Variables, select
PATH
, click Edit, and add:C:\Program Files\Tesseract-OCR\
-
Set Up Tesseract in CMD
tesseract = 'C:\\Program Files\\Tesseract-OCR\\tesseract.exe' pytesseract = 'C:\\Program Files\\Tesseract-OCR\\tesseract.exe'
-
Install Required Python Packages
pip install pytesseract pillow opencv-python argparse piexif sqlite3
💡 Hint: If you encounter an error during installation, refer to this Stack Overflow post.
python -u ProjectDataBase.py --image "path/to/image"
python -u ProjectDataBase.py --image "path/to/image" --digit 0
python -u ProjectDataBase.py --remove Apple Banana
- This command will delete entries named Apple and Banana.
Once an image is processed, the program extracts relevant data and displays it in the console while also saving it to the database.