- OpenCV
- EasyOCR
- Python 3.x
- Web Technologies : HTML, CSS, JavaScript
- The file named
sudoku.py
, which is aimed at converting Sudoku images into digital arrays, focusing on essential component of a larger Sudoku solver application.
- The process involves capturing a Sudoku puzzle image via a camera.
- Utilizing OpenCV to detect the puzzle's four points, rectifying the image into a square, and subsequently cropping it.
- The cropped image is then segmented into a 9x9 grid, resulting in 81 individual sub-images, each corresponding to a Sudoku block.
- The EasyOCR library is employed to recognize and extract the numerical content from each block, ultimately producing a digital representation of the Sudoku puzzle.
Output:
- [' ', ' ', ' ', ' ', 4, ' ', ' ', ' ', ' ']
[8, ' ', 1, ' ', ' ', ' ', 3, ' ', 7]
[' ', ' ', 4, 8, ' ', 2, 6, ' ', ' ']
[2, ' ', ' ', ' ', ' ', ' ', ' ', ' ', 4]
[' ', ' ', 8, 5, ' ', 6, 1, ' ', ' ']
[' ', ' ', ' ', ' ', 8, ' ', ' ', ' ', ' ']
[' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ']
[' ', ' ', 5, 2, ' ', 9, 7, ' ', ' ']
[' ', 6, 3, 4, ' ', 7, 2, 5, ' ']
- The
sudoku_solver.py
file offers a streamlined solution for solving arrays of Sudoku puzzles. With a focus on simplicity and efficiency, this Python script provides a reliable tool for automating the resolution of Sudoku grids. - The
visualize.py
file dynamically generates and overlays solved Sudoku solutions onto images of the original puzzles, enhancing the user's understanding and providing a clear visual representation of the solved grids.
- This Sudoku Solver Web App is a professional-grade implementation leveraging web technologies such as HTML, CSS, and JavaScript. It provides an intuitive and efficient platform for solving Sudoku puzzles with a user-friendly interface, ensuring a seamless and enjoyable experience for enthusiasts.
Contributions to enhance and optimize the code are welcome. Feel free to open an issue or submit a pull request.