im2double函数处理一幅图像后像素值为什么可以是负的

 上传我的文档
 下载
 收藏
该文档贡献者很忙,什么也没留下。
 下载此文档
图像处理_电子科大_作业
下载积分:2000
内容提示:图像处理_电子科大_作业
文档格式:DOCX|
浏览次数:67|
上传日期: 04:33:07|
文档星级:
全文阅读已结束,如果下载本文需要使用
 2000 积分
下载此文档
该用户还上传了这些文档
图像处理_电子科大_作业
官方公共微信1966人阅读
& & & 针对数字图像处理,多数情况下,源图像的像素格式为unsigned char类型,当涉及到频域等处理时候,需要将字节型数据转换为double类型,matlab提供了2两个函数,im2double和double函数,均可使用,但是两者的区别则极其重要。
& & 在matlab的官方论坛上有这样几句话:But a simple test will show you that&&when you
use im2double, it will convert your uint8 image from the&range of 0-255 into a double array in the range 0-1. In general, all&Image
Processing Toolbox functions that take floating point arrays&want them in the range of 0 to 1. I find it kind of annoying but&that's
the way it is. That's basically what &rescaling& means. So&this imdouble() function is there to help you get to what you might&need
for later calls to Image Processing Toolbox functions. If you&use double() you would have to divide by 255 yourself if you needed&to.
If you're doing your own custom functions then you can leave it&in the original range if you want。
& & 意思就是im2double 函数将所有像素数据转化为【0 1】区间之内,这也是数字图像处理工具箱的要求;但是double函数则仅仅提高数据精度,但是并未将数据量化到【0 1】区间之内。
& &适应场合:当你需要做频域滤波处理,需要注意不要使用im2double函数,否则滤波之后,图像在傅里叶反变换之后,所有像素数据都是0,也就是说图像纯黑色。与此对应,当你使用数字图像处理工具箱的时候,建议使用im2double函数。
&&相关文章推荐
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:79742次
积分:1662
积分:1662
排名:千里之外
原创:78篇
转载:62篇
(1)(2)(5)(6)(9)(4)(4)(4)(5)(1)(1)(1)(4)(5)(3)(3)(2)(5)(3)(3)(6)(13)(10)(15)(3)(2)(3)(5)(1)(5)(6)

我要回帖

更多关于 im2double 的文章

 

随机推荐