matlab imrotate中心,MATLAB imrotate函数的用法

MATLAB imrotate函数的用法2010-12-21 13:17:31

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)。

例1:

A=imread('J:\EC_System.jpg'); % A, <325x464 uint8>

subplot(1,3,1)

imshow(A);

B=imrotate(A,30,'bilinear'); % 反时针旋转30 ,默认‘loose’。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值