Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to do Find Path? #15

Open
StefanBaar opened this issue Feb 5, 2021 · 2 comments
Open

How to do Find Path? #15

StefanBaar opened this issue Feb 5, 2021 · 2 comments

Comments

@StefanBaar
Copy link

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?

@yxdragon
Copy link
Member

@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.

@etienne87
Copy link

hello! where is the draw demo, is it the main of the script? i do not see any dijkstra/ astar call to networkx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants