Hey everyone I'm having trouble knowing how to rotate lines plotted on my image. I put in my code below.
Below when theta is changed the left axis changes value and the right axis changes value.
clc%Horizontal lines @ 50 row spacing
a = [1 250];b = [1 1]+R;c = [50 50]+R; d = [100 100]+R;e = [150 150]+R;f = [200 200]+R;g = [250 250]+R;%Rotation Matrix
theta = 0R = [(+theta) (-theta)]%Rotation of plots
Ha = [a;a];Hb = [a;b];Hc = [a;c];Hd = [a;d];He = [a;e];Hf = [a;f];Hg = [a;g];%Rotation MatrixP = phantom(250);imshow(P)hold onplot(Hb',Ha'),plot(Hc',Ha'),plot(Hd',Ha'),plot(He',Ha'),plot(Hf',Ha'),plot(Hg',Ha')plot(Ha',Hb'),plot(Ha',Hc'),plot(Ha',Hd'),plot(Ha',He'),plot(Ha',Hf'),plot(Ha',Hg')hold off
Best Answer