300字范文,内容丰富有趣,生活中的好帮手!
300字范文 > MATLAB中给图像加高斯噪声时imnoise的方差参数问题

MATLAB中给图像加高斯噪声时imnoise的方差参数问题

时间:2021-09-21 17:45:15

相关推荐

MATLAB中给图像加高斯噪声时imnoise的方差参数问题

在经过仔细阅读文档后发现,其实MATLAB的说明文档已经写得很清楚,现摘出如下:

J = imnoise(I,type,parameters) Depending on type, you can specify additional parameters to imnoise《一线大厂Java面试题解析+后端开发学习笔记+最新架构讲解视频+实战项目源码讲义》无偿开源 威信搜索公众号【编程进阶路】. All numerical parameters are normalized— they correspond to operations with images with intensities ranging from 0 to 1.

其中最关键的就是normalized,即归一化,方差值在0~1之间。这时才想起来,关于gaussian参数的说明:

J = imnoise(I,‘gaussian’,M,V) adds Gaussian white noise of mean m and variance v to the image I. The default is zero mean noise with 0.01 variance.

即默认的M,V值分别为0, 0.01(注意此处的方差形式)。

所以最终的结论就是需要对方差归一化处理,比如此处要对一幅256*256的图像加入标准偏差为10的高斯噪声,那么相应的语句应为:

J = imnoise(I, ‘gaussian’, 0, 102/2552)

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。