Hello,<br><br>A contour is extracted from a greyscale image ("walls") where the background is set to 255. Several points near the contour are used to compute a path with  graph.route_through_array:<br><div style="text-align: center;">mincost = graph.route_through_array(walls ,p1,p2,fully_connected=True)<br></div><br>One found path is not completely inside the array. When fully_connected=False is used all the paths are inside the chromosomes (i.e. they do not cross regions where grey level=255).<br><br>How to get a minimal cost route "inside" a particle (<>255)?<br><br>Thank you<br><br>Jean-Patrick<br><p style="text-align: center; clear: both;" class="separator"><a style="margin-left: 1em; margin-right: 1em;" href="https://lh6.googleusercontent.com/-YBi4a6avWfw/UJvgFAyisjI/AAAAAAAAA98/A5ADkHtZBhY/s1600/geodesic_Distance-montage03b.png" imageanchor="1"><img src="https://lh6.googleusercontent.com/-YBi4a6avWfw/UJvgFAyisjI/AAAAAAAAA98/A5ADkHtZBhY/s1600/geodesic_Distance-montage03b.png" style="" border="0"></a></p>