In: Computer Science
MATLAB:
Attempting to use the inverse mapping approach and take a 3x3 matrix that will rotate an image. The image is 540 x 420. attempting to write DOUBLE FOR LOOPS that will step through each and every pixel location. I cannot use any Toolbox Functions. Please write a double for loop that will allow this to happen!
[xold,yold,k] = size(A);
Rotation = [cosd(angle) -sind(angle) 0 ; sin(angle) cos(angle) 0; 0 0 1];
InverseRotation = double(inv(Rotation));
newpt = [xnew ynew 1].';
origpt = InverseRot*newpt;
xold = origpt(1);
yold = origpt(2);