The following Matlab project contains the source code and Matlab examples used for image(or matrix) rotation and scaling function.
This function takes an image or matrix and rotate it by theta (radian, rigid motion)
The image could also be enlarged or shrinked by an optional scaling factor
img: input image (or or a 2D Matrix)
dtheta: the amount of rotation in radian
scale: a scalar number that scales the image (default=1)
interpMethod:
'nearest' - nearest neighbor interpolation
'linear' - bilinear interpolation (defalt)
'spline' - spline interpolation
'cubic' - bicubic interpolation
padding: background filling color (0~255, black~white).
The source code and files included in this project are listed in the project files section, please make sure whether the listed source code meet your needs there.
Project Files:
File Name | Size |
---|---|
imTransform.m | 2278 |
license.txt | 1306 |