Dear All,
I would like to plot a line with angle of 'Orientation' and length of 'MajorAxisLength' through 'Centroid'.
Similar as shown in image bellow:
The code I'm using right now, is piloting the line with the right angle, but it starts from the center
st = regionprops(Image,'Centroid','Orientation','MajorAxisLength'); x = st.Centroid(1) + st.MajorAxisLength * cosd(st.Orientation); y = st.Centroid(2) - st.MajorAxisLength * sind(st.Orientation); line([c(1) x],[c(2) y]);How can do it right, maybe I should use BoundingBox as well?
Thanks in advance for any help,
I
Best Answer