Matlab - Propagate unit vectors on to the edge of shape boundaries
- by Graham
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!