Sudoku solver is a fun project of mine to test new technologies and to be good at sudoku solving.
The app can:
- Generate sudoku puzzle with given difficulty
- Solve sudoku puzzle
- Scan sudoku puzzle
- Share sudoku puzzle link
- Print sudoku puzzle
- Download sudoku puzzle image
Everything is written in JavaScript so it is damn slow on some devices 🙂.
Used technologies:
- OpenCV.js - WebAssembly compiled OpenCV
- Tesseract.js - WebAssembly compiled Tessarct OCR
- Quasar - lovely Vue.js based framework with material design UI (and lot of other stuff)
- PWA
- Web Workers
- Vuex
- Apply binary threshold on black and white image
- Invert colors
- Find lines with Hough Lines algorithm
- Group lines into
horizontal
andvertical
groups based on their slope angle - Average lines that are close to each other into single line for both groups
- Find sequence of 10 lines which have distance between next line approximately same for both groups
- Find corners defined by intersections of first and last lines from both groups
- Find perspective transformation and warp input image based on corner points
- Calculate cells positions
- Apply Tesseract.js OCR for all found cells
yarn
quasar dev -m spa
yarn run lint
quasar build -m pwa