user4861528
user4861528

Reputation: 467

How does interp2(X,Y,image,XI,YI) knows to rotate the image when XI and YI is a rotated coordinate system of X and Y? and why not use imrotate?

In radon.m the projections in the various angles are done by rotating the original image using interp2(x1,y1,padImg,x,y) where x1 and y1 are gotten using meshgrid of n points between -1 and 1 (where n is the number of the rows of the zero padded image) and x and y are gotten from x1, and y1 by multiplying the vector (x1, y1) with a rotation matrix. I don't get the idea of this manipulation of interp2. How does interp2 knows that the image itself should be rotated? Can someone explain this to me please? and also- why not use imrotate?

Upvotes: 0

Views: 380

Answers (1)

Daniel
Daniel

Reputation: 36720

Interp2 does not know anything about rotation, it just interpolates at the points you put in. Plot x and y as 2d points, you will see that the rotation is already in there.

Upvotes: 1

Related Questions