MATLAB Answers

0

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

Asked by Rizki Ramadhan on 3 Aug 2019
Latest activity Commented on by Image Analyst
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!

  2 Comments

Is their any logic of repetion of newly Nodes (green)?
Can you please attach the original image?

Sign in to comment.

Tags

1 Answer

Answer by Image Analyst
on 4 Aug 2019

Maybe try bwdistgeodesic().

  1 Comment

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.