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

1 view (last 30 days)
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!

Answers (1)

Image Analyst
Image Analyst on 4 Aug 2019
Maybe try bwdistgeodesic().
  1 Comment
Image Analyst
Image Analyst 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).

Sign in to comment.

Categories

Find more on Images in Help Center and File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!