Maze Solving and Vehicle Routing Algorithm
Maze Solving and Vehicle Routing Algorithm
First, we need to import package
from modules.MazeSolver import MazeSolver
Then, we will create object while typing maze imaze as param 1 and result folder as param 2
# call the object defining the maze image
mz = MazeSolver(BASE_DIR + '/contents/no4.png',
BASE_DIR + '/results', "RESULTFILE")
Finally, we will call function respectively
mz.FourPointTransformation() # rotating the image for operation
mz.ShowResult() # showing result image
mz.FindPath() # finding the path ino the maze image
mz.ShowResult() # showing result image
mz.FindRoute() # finding the route in the maze image
mz.ShowResult() # showing result image
It transform the image, which was naturally tilted due to camera angle, to proper image for algorithm
It solves the given maze image and saves the path in binary format.
It takes the binary image and exacts the path using algorithm, then save it as datafile
It shows the previous process result