Matlab - Propagate unit vectors on to the edge of shape boundaries
Posted
by Graham
on Stack Overflow
See other posts from Stack Overflow
or by Graham
Published on 2010-04-18T23:54:48Z
Indexed on
2010/04/19
0:13 UTC
Read the original article
Hit count: 210
Hi
I have a set of unit vectors which I want to propagate on to the edge of shape boundary defined by a binary image. The shape boundary is defined by a 1px wide white edge. I also have the coordinates of these points stored in a 2 row by n column matrix. The shape forms a concave boundary with no holes within itself made of around 2500 points.
What would be the best method to do this? Are there some sort of ray tracing algorithms that could be used?
Or would it be a case of taking the unit vector and multiplying it by a scalar and testing after multiplication if the end point of the vector is outside the shape boundary. When the end point of the unit vector is outside the shape, just find the point of intersection?
Thank you very much in advance for any help!
© Stack Overflow or respective owner