Re: graph.route_through_array, a route is "outside"
I could simplify my script<http://dip4fish.blogspot.fr/2012/11/using-geodesic-distance-to-resolve.html>but Zachary's message make me understand I can't directly use an idea from binary image to greyscale image. Thanks JP Le jeudi 8 novembre 2012 18:57:51 UTC+1, Stefan van der Walt a écrit :
Hi JP
On Thu, Nov 8, 2012 at 8:59 AM, jip <jeanpatri...@gmail.com <javascript:>> wrote:
How to get a minimal cost route "inside" a particle (<>255)?
Could you upload a minimal snippet to illustrate this behavior to gist.github.com?
Thanks Stéfan
If you want a path that trends toward the "center" of the binary blobs, I have had luck using the MCP algorithm on suitably-transformed distance maps from the blobs. (You need to negate the distances and then add an offset to get the minimum cost to 1. Also, I've found that sometimes taking the log of the distances gives the path-finding algorithm a little more freedom, or you can exponentiate them to keep the path more centered.) Zach On Nov 8, 2012, at 2:44 PM, Jean-Patrick Pommier wrote:
I could simplify my script but Zachary's message make me understand I can't directly use an idea from binary image to greyscale image.
Thanks
JP
Le jeudi 8 novembre 2012 18:57:51 UTC+1, Stefan van der Walt a écrit : Hi JP
On Thu, Nov 8, 2012 at 8:59 AM, jip <jeanpatri...@gmail.com> wrote:
How to get a minimal cost route "inside" a particle (<>255)?
Could you upload a minimal snippet to illustrate this behavior to gist.github.com?
Thanks Stéfan
--
Le jeudi 8 novembre 2012 20:53:55 UTC+1, Zachary Pincus a écrit :
If you want a path that trends toward the "center" of the binary blobs, I have had luck using the MCP algorithm on suitably-transformed distance maps from the blobs. (You need to negate the distances and then add an offset to get the minimum cost to 1. Also, I've found that sometimes taking the log of the distances gives the path-finding algorithm a little more freedom, or you can exponentiate them to keep the path more centered.)
This is good to know, I keep that. jp
Zach
On Nov 8, 2012, at 2:44 PM, Jean-Patrick Pommier wrote:
I could simplify my script but Zachary's message make me understand I can't directly use an idea from binary image to greyscale image.
Thanks
JP
Le jeudi 8 novembre 2012 18:57:51 UTC+1, Stefan van der Walt a écrit : Hi JP
On Thu, Nov 8, 2012 at 8:59 AM, jip <jeanpatri...@gmail.com> wrote:
How to get a minimal cost route "inside" a particle (<>255)?
Could you upload a minimal snippet to illustrate this behavior to gist.github.com?
Thanks Stéfan
--
participants (2)
-
Jean-Patrick Pommier
-
Zachary Pincus