数字图像处理实验2(HGD)—— 帮助文档

im2double

 im2double Convert image to double precision.

im2double takes an image as input, and returns an image of class double.  If the input image is of class double, the output image is identical to it. If the input image is not double, im2double returns the equivalent image of class double, rescaling or offsetting the data as necessary.

I2 = im2double(I1) converts the intensity image I1 to double precision, rescaling the data if necessary.

im2double即把图像转成双精度形式。为什么要把图像转换成双精度进行运算呢?原因在于:一般情况下,图片都以uint8数据储存。当对图片进行数据运算时,数据大于256就出现溢出,结果失真。而双精度数运算时不会出现溢出,故先把uint8数据转为双精度数,就不会使计算精度失真。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值