imrotate

来源:互联网 发布:苏州爱知科技福利待遇 编辑:程序博客网 时间:2024/05/21 16:54
imrotate函数的用法 
Imrotate 函数用来实现图像旋转: B=imrotate(A,angle, method,bbox); angle 绕图形中心逆时针旋转的角度(deg)(angle为负值时为顺时针旋转角度)。 method 就是你实现旋转用的是什么方法。有三种:最邻近插值法'nearest',双线性插值法'bilinear',三次卷积插值法'bicubic'。不同的插值方法得到的旋转图像有细微的差别。如不选,则matlab默认最邻近插值法。图像旋转后会有一定的失真(因计算每个点的新坐标的时候得到的数值不是整数,要取整造成的)。 Bbox指定输出图像属性。2选择:‘loose’或‘crop’。前者(Matlab默认),图像旋转后系统给予一个‘宽松’的环境去匹配它,得到的图片是完整(Make output image large enough to contain the entire rotated image. Image B is generally larger than A)。‘crop’(剪切),超过图片原来大小的部分被crop了(Make output image B the same size as the input image A, cropping the rotated image to fit)。 
原创粉丝点击