I am using NetworkX, opencv, numpy and python to find shortest_path
in a graph. It doesn't always provide what I need. shortest_path function finds the path starting from the top of the image to bottom. My path is always varying. Starting point and target point are always known for each image. Thus, I want to find the shortest path between those points (start and target). However, when the source and target points are not nodes and not in the G, it doesn't give what I need.
shortest_path(G, source=None, target=None, weight=None)
How can I find the shortest_path
between two specific coordinate points in the image? Moreover, how can I assign a pixel coordinates as source and target ? For example, source is [45 66]
and target is [250 350]