如何在Matlab中使数据嘈杂 [英] How to make data noisy in matlab

查看:498
本文介绍了如何在Matlab中使数据嘈杂的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我已经使用imnoise()功能破坏了某些图像!

但是我无法指定我想要的峰值信噪比.

有什么建议吗?

关于Opul3nce

Hello, I''ve corrupted some images using imnoise() fucntion!

However I''ve not been able to specify the peak signal to noise ratio i want.

Any advice?

Regards Opul3nce

推荐答案

这取决于您要添加的噪声类型.我假设您要添加零均值高斯噪声;首先是因为这很可能是您正在使用的东西,其次是因为它很好用且易于使用.

如果我们快速浏览维基百科 [ RMS [... a] [ ^ ]的噪音和快乐巧合RMS只是高斯的方差.

也许值得一本关于信号的好的教科书,但是不幸的是,我想不起一个最佳选择.

查尔斯·凯帕克斯
This depends on which type of noise you are adding. I will presuming you are adding zero-mean Gaussian noise; firstly because that''s mostly likely what you are using and secondly because its nice and easy to work with.

If we have a quick look on Wikipedia[^] for PSNR we get a whole bunch of useful stuff. First lets consider the formula for the MSE; the two images are the same and will cancel each other out, just leaving the Gaussian noise. So you need to set the mean square of the Gaussian noise to the right level.

Rearranging the second (will become clear why I chose that one shortly) PSNR formula to find out the desired MSE should result in this, assuming I haven''t made any foolish maths errors:

sqrt(MSE) = MAXi/(10^(PSNR/20))

Now since we are just looking at the noise (since the two actual images cancelled out) and the mean of our Gaussian is zero, then the sqrt(MSE) is just the RMS[^] of the noise and by a happy coincidence the RMS is simply the variance of the Gaussian.

Probably worth looking for a good text book on signals, unfortunately I can''t think of an optimum choice off the top of my head.

Charles Keepax


这篇关于如何在Matlab中使数据嘈杂的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆