Skip to content

MarekChoinski/real-time-maze-solver

Repository files navigation

Maze solver

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.

Dependabot badge

How it works?

  1. Using WebRTC image from camera is captured from online webcam (eg. from smartphone)
  2. Image is grayscaled
  3. Appropriate gray levels is picked up for extracing maze
  4. Maze mask is dilatated for better effect
  5. Using again captured image green color is tresholded
  6. Two biggest green area are selected as end points of labirynth
  7. Maze mask and green mask is transformed to matrix of ints
  8. Matrix(graph) is solved using breadth-first search
  9. Solved path is drawn on canvas

And this is repeated on 24 FPS.

Developing

Installation

npm install

Start Dev Server

npm start

Run tests

npm test

Build Prod Version

npm run build

About

Progressive Web App solving real-time handwritten labyrinths.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published