Maze solver is Progressive Web App with real-time camera solves handwritten labyrinths using Opencv.js, WebRTC and breadth-first search of graph. Written carefully using OOP and tested with Jest.
- Using WebRTC image from camera is captured from online webcam (eg. from smartphone)
- Image is grayscaled
- Appropriate gray levels is picked up for extracing maze
- Maze mask is dilatated for better effect
- Using again captured image green color is tresholded
- Two biggest green area are selected as end points of labirynth
- Maze mask and green mask is transformed to matrix of ints
- Matrix(graph) is solved using breadth-first search
- Solved path is drawn on canvas
And this is repeated on 24 FPS.
npm install
npm start
npm test
npm run build