## Line or segment of line that touch all pixels in a structure

on 3 Aug 2019
Latest activity Commented on by Image Analyst

### Image Analyst (view profile)

on 4 Aug 2019
I have a 2D image represented by pixels. I have the node information for the points indicated in yellow, but I would like to obtain the nodes (green) where if connected by straight lines, all pixels would have been in touch with the generated line. I understand the theory of using bisection method to iterate the dissection of the original line into 2 halves and shift newly identified nodes towards the structure. How would this look like in code?
Many thanks!

KALYAN ACHARJYA

### KALYAN ACHARJYA (view profile)

on 3 Aug 2019
Is their any logic of repetion of newly Nodes (green)?
darova

### darova (view profile)

on 4 Aug 2019
Can you please attach the original image?

### Image Analyst (view profile)

on 4 Aug 2019

Maybe try bwdistgeodesic().

Image Analyst

### Image Analyst (view profile)

on 4 Aug 2019
What's wrong with just using all the pixels as given by bwdistgeodesic? See Steve's blog at http://blogs.mathworks.com/steve/2011/11/01/exploring-shortest-paths-part-1/
You might also want to look into "minimum perimeter polygon": http://dip.sun.ac.za/~hanno/tw444/lesings/lesing_19.pdf and see if that is what you really want.
Why do you need this, though? Why can't you just work off the binary image?
Attach your binary image, and attach the location of the yellow, original nodes, and say how you got those yellow nodes, and explain how you got the green nodes, especially since the green nodes only appear sort of randomly (not at every pixel along the path).