sknw
sknw copied to clipboard
How to do Find Path?
The example in the Readme file shows an example for finding a path between selected nodes, but there is no description. How can I find the pixel between two nodes or more nodes?
@StefanBaar hi, you can see the draw demo. sknw return a networkx object, which has some nodes and edges. path = graph[n1][n2] (normal graph) and path = graph[n1][n2][i] (multi graph), then path['pts'] is the pixels on the edge. graph.nodes()[i] is the node, and graph.nodes()[i]['o'] is the node's centriod.
and you can use sknw 's function to find the shortest path between two nodes.
hello! where is the draw demo, is it the main
of the script? i do not see any dijkstra/ astar call to networkx