Finding the Shortest Path
A self-contained code for finding the shortest path using the Breadth First Search (BFS) algorithm.
- Values of an image element are mapped as nodes of the graph to form a binary matrix.
- A graph relation is identified between the nodes of the image.
- The shortest path is calculated for 4-adjacency, 8-adjacency, and m-adjacency using the algorithm.