optimization routes, dijkstra algorithm, Biograph,
Show older comments
Hi, when I try to use the dijkstra algorithm to optimization route, always it asks me the segments from the nodes, what happens if I do not know them, because I trying to get the optmization route of an image.
by the way, I do not understand the CMatrix relationship with the real image on the biograph function.
somebody know how to implement that in simulink???
Accepted Answer
More Answers (1)
Image Analyst
on 13 Aug 2012
0 votes
I don't know what a biograph is - apparently according to Google images, it's a celebrity, a theater, or a Bob Dylan album. But if you're trying to find some route through an image, like for example you're following a blood vessel in a radiograph, then the nodes are the pixels. You can do something like find the path from one place to another that has the brightest average gray level (I did this using the A* algorithm as part of my Ph.D.). The Djikstra algorithm has been improved upon many many times so you might want to look into better algorithms. Wikipedia has a huge list of them.
4 Comments
Walter Roberson
on 13 Aug 2012
Walter Roberson
on 13 Aug 2012
The nodes would be considered to be at the coordinates of the pixels, rather than being the pixels themselves. The background pixels would either not be added to the graph or would be given an infinite cost. The cost of the remaining pixels could be set to be constant, or could be set to be proportional to the pixel value, or you could do contextual image processing in order to determine the cost (e.g., in one area, a slightly darker line might mark a boundary that cannot be passed, and yet due to illumination differences in a different part of the graph, the value associated with that darker area might instead represent areas to be travelled.)
Image Analyst
on 14 Aug 2012
Right, good points. If I recall correctly, in my case, each node had an x (column) position, a y (row, line) position, and a value (gray level). And as you traversed the graph (image), each length was either 1 (up, down, left, right) or sqrt(2) (diagonal travel). And yes the cost function can be specified in a number of ways, some of which could get very complicated, depending on what you want to do.
Walter Roberson
on 22 Aug 2012
Show us an image and point out the parts of it that you want to have considered as being nodes.
Categories
Find more on Dijkstra algorithm in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!