This repository contains scripts for recognizing Sudoku puzzles from a live webcam feed and redirecting to specific URLs based on the recognized puzzle. The system leverages feature matching techniques using ORB and FLANN for accurate identification.
This project includes two main scripts:
multiple_sudoku.py: Recognizes and redirects based on multiple Sudoku puzzles.sudoku_scanner.py: Recognizes and redirects based on a single Sudoku puzzle.
- ORB Feature Detection: Utilizes ORB (Oriented FAST and Rotated BRIEF) for feature detection and description.
- FLANN Matching: Implements FLANN (Fast Library for Approximate Nearest Neighbors) for efficient matching of features.
- Homography and Inliers: Ensures geometric consistency using homography and inlier counting.
- Histogram Comparison: Adds an extra layer of validation through histogram comparison.
- Immediate URL Redirection: Redirects to the specific URL upon successful recognition.
- Python 3.12
- OpenCV
- Numpy
- Webbrowser
- Tesseract (for OCR)
- Clone the repository:
git clone https://github.com/yourusername/sudoku-recognition.git
- Navigate to the directory:
cd sudoku-recognition - Install the required packages:
pip install -r requirements.txt
- Place your reference Sudoku images in the
imagesdirectory. - Update the
reference_image_pathsandurlslists inmultiple_sudoku.pywith the paths to your reference images and corresponding URLs. - Run the script:
python multiple_sudoku.py
- Place your reference Sudoku image in the
imagesdirectory. - Update the
reference_image_pathinsudoku_scanner.pywith the path to your reference image. - Run the script:
python sudoku_scanner.py