图像加噪

本文介绍了如何在图像处理中模拟加噪过程,特别是使用MATLAB的imnoise函数来添加高斯噪声和椒盐噪声。高斯噪声可以通过设置均值和方差参数,而椒盐噪声则通过设定噪声密度。此外,还提到了泊松噪声和乘法噪声的生成方式。提供了实例来说明如何添加高斯白噪声。
摘要由CSDN通过智能技术生成

在图像处理时,所谓的去除图像噪声,难免要了解噪声的数学模型和建立噪声图像,从而实现模拟去噪过程和结果。


微笑噪声模型:本文仅介绍常用的高斯噪声和椒盐噪声

由于Opencv没有提供图像加噪方面的函数,在Opencv中自己建立噪声模型吃力不讨好,因此本文采用MATLAB实现图像加噪:


imnoise-在图像上加噪声【1】

 J = imnoise(I,TYPE,...)  Add noise of a given TYPE to the intensity image  I. TYPE is a string that can have one of these values:

其中,后面所有参数都被规格化,与灰度值均在0~1之间的图像相匹配。
 
        'gaussian'       Gaussian white noise with constant  mean and variance

e.g: 高斯白噪声, M为均值,V为方差

J = imnoise(I,'gaussian',M,V) adds Gaussian white noise of mean M and  variance V to the image I. When unspecified, M and V default to 0 and  0.01 respectively.

        'localvar'       Zero-mean Gaussian white noise  with an intensity-dependent variance

e.g1: 高斯白噪声,均值为0,V为与I维数相同,表示局部方差。

 J = imnoise(I,'localvar',V) adds zero-mean, Gaussian white noise of  local variance, V, to the image I.  V is an array of the same size as I.

e.g2: 高斯白噪声,均值为0,

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值