Code covered by the BSD License
22 Feb 2013
Performs rotation of an image about any point inside of the image.
Watch this File
The rotation about a point is performed in following sequence:
1) Padding the image.
2) Rotating the image about the image's centre with IMROTATE.
3) Cropping the image, which performs translation of the image to the right position.
Really useful. I think you should change the rotation line:
rot = imrotate(padded,angle,'crop',method);
rot = imrotate(padded,angle,method,'crop');
Works great for me.