A powerful Python-based OCR tool specifically designed for extracting information from Iranian bank cards and financial documents. This tool uses advanced image processing and OCR techniques to accurately extract card numbers, expiry dates, CVV codes, and other relevant information.
- 🔍 Advanced OCR processing with Tesseract
- 📝 Extracts multiple card details:
- Card Number
- Full Name
- Sheba Number (IBAN)
- Expiry Date
- CVV Code
- 🔄 Dual processing methods for improved accuracy
- 💾 JSON data storage with duplicate prevention
- 🌐 Support for both Persian and English text
- 🎯 Specifically optimized for Iranian bank cards
- Python 3.x
- OpenCV (cv2)
- NumPy
- Pytesseract
- Tesseract OCR Engine
-
Install Tesseract OCR:
- Windows: Download and install from Tesseract GitHub
- Linux:
sudo apt-get install tesseract-ocr - macOS:
brew install tesseract
-
Install Python dependencies:
pip install -r requirements.txt- Place your card image in the project directory
- Run the script:
python TourismusGardeshgari_bank_card_scanner.pyThe script generates two JSON files:
card_data_with_id.json: Contains card data with unique IDscard_data_without_id.json: Contains card data without IDs (prevents duplicates)
├── TourismusGardeshgari_bank_card_scanner.py # Main script
├── requirements.txt # Python dependencies
├── LICENSE # MIT License
└── README.md # This file
- Dual-method image processing for better accuracy
- Adaptive thresholding
- Morphological operations
- Image enhancement
- Persian text recognition
- English text recognition
- Number extraction
- Special character handling
- JSON storage
- Duplicate prevention
- Automatic ID generation
- Data validation
This project is licensed under the MIT License - see the LICENSE file for details.
OCR, Image Processing, Bank Card Reader, Iranian Bank Cards, Financial Document Processing, Tesseract OCR, OpenCV, Python OCR, Card Data Extraction, Sheba Number Extractor, CVV Extractor, Card Number Reader, Document Processing, Image Recognition, Text Extraction, Bank Card Scanner, Financial OCR, Card Information Reader, Automated Card Processing
Contributions are welcome! Please feel free to submit a Pull Request.
Gardeshgary
- Tesseract OCR
- OpenCV
- Python community