Solve a maze from a picture (image processing)