File Exchange

image thumbnail

Dijkstra_Methode(Ma​trix, start, target)

version (3.37 KB) by Ingo Hermann
This is the Dijkstra Methode implemented in Matlab for finding the shortest path.


Updated 16 Dec 2016

View License

With this Dijkstra Methode one can find the shortest path of an image.
(See here description
function [path, prev, unvis, distance, start, target] = Dijkstra_Methode(Matrix, start, target)
Matrix is the incoming image
start is the start point in a vector [a,b] where a is the column and b the row
target is the end point similare to start
path is the matrix with ones excepted at the position of the path where it is 0
prev are also the previous visited pixels where the algorithm took the
wrong way
unvis are all unvisited pixels
distance is the distance or weight of the pixels

Comments and Ratings (0)


Update 1.1: Added a comment

MATLAB Release Compatibility
Created with R2016b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Discover Live Editor

Create scripts with code, output, and formatted text in a single executable document.

Learn About Live Editor