Algorithm to 'walk' along a line from an endpoint by N pixels
Hi, Does anyone know if an algorithm to take an endpoint of a binary line in an image and 'walk' back along the line for N pixels already exists in skimage? (or in any of the related projects). I'm happy to go ahead and implement it, but it seems like the kind of thing that would have already been implemented, even though I can't find it in the documentation. Does this already exist? Cheers, Robin
Hi Robin
It sounds like you may be able to get away with a connected component
search. Have a look at the "skimage.morphology.label".
Stéfan
On Fri, Jun 28, 2013 at 11:04 AM, Robin Wilson
Hi,
Does anyone know if an algorithm to take an endpoint of a binary line in an image and 'walk' back along the line for N pixels already exists in skimage? (or in any of the related projects). I'm happy to go ahead and implement it, but it seems like the kind of thing that would have already been implemented, even though I can't find it in the documentation.
Does this already exist?
Cheers,
Robin
-- You received this message because you are subscribed to the Google Groups "scikit-image" group. To unsubscribe from this group and stop receiving emails from it, send an email to scikit-image+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Hi, This is not advertizing for my blog, but I faced the same kind of question herehttp://dip4fish.blogspot.fr/2011/06/open-curve-to-ordered-pixels-second.html. The idea would be first to convert the image of the curve into a set of ordered pixels, then counting pixels from that list is easy. jean-pat Le vendredi 28 juin 2013 18:04:52 UTC+2, Robin Wilson a écrit :
Hi,
Does anyone know if an algorithm to take an endpoint of a binary line in an image and 'walk' back along the line for N pixels already exists in skimage? (or in any of the related projects). I'm happy to go ahead and implement it, but it seems like the kind of thing that would have already been implemented, even though I can't find it in the documentation.
Does this already exist?
Cheers,
Robin
Hi all, Thanks for the responses. Stefan - that is a lovely idea which I started to work with, but then realised that if my line is curved (for example, U shaped) then the distance transform will give smaller distances to some of the points than should be given: eg. starting at the top of the U on the left, the top of the U on the right would have a lower distance to the starting point than one of the pixels at the bottom of the U). Jean-Pat - your code looks very similar to the code I've started to write. I'll probably take some of your ideas and merge them into my code, if that's ok. Thanks, Robin On Sat, Jun 29, 2013 at 1:15 PM, Jean-Patrick Pommier < jeanpatrick.pommier@gmail.com> wrote:
Hi, This is not advertizing for my blog, but I faced the same kind of question herehttp://dip4fish.blogspot.fr/2011/06/open-curve-to-ordered-pixels-second.html. The idea would be first to convert the image of the curve into a set of ordered pixels, then counting pixels from that list is easy.
jean-pat
Le vendredi 28 juin 2013 18:04:52 UTC+2, Robin Wilson a écrit :
Hi,
Does anyone know if an algorithm to take an endpoint of a binary line in an image and 'walk' back along the line for N pixels already exists in skimage? (or in any of the related projects). I'm happy to go ahead and implement it, but it seems like the kind of thing that would have already been implemented, even though I can't find it in the documentation.
Does this already exist?
Cheers,
Robin
-- You received this message because you are subscribed to the Google Groups "scikit-image" group. To unsubscribe from this group and stop receiving emails from it, send an email to scikit-image+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
participants (3)
-
Jean-Patrick Pommier
-
Robin Wilson
-
Stéfan van der Walt