Normal vector of line based on pixel coordinates
6 views (last 30 days)
I have an array that contains the x,y pixel coordinates of edges in an image. I want to use three of these coordinates at a time to work out the angle, and then obtain 5 or 10 pixel values that are located 90 degrees of this line.
For vertical and horizontal lines this is simple, as the pixel values corresponding to 90 degrees are either left/right or up/down in a straight line. For diagonal lines, I can just as easily take the diagonal values. However, how can I do this if the line is, say, 30 degrees or something more obtuse of 90 degrees?