图像复原与重建:噪声模型及MATLAB实现
来源:互联网 发布:电信网络卡是什么原因 编辑:程序博客网 时间:2024/04/28 02:34
图像的退化往往伴随着噪声,几种常见的噪声的概率密度函数,probability density function,简称PDF。
malab代码如下:
clear;x=-4:0.1:4;subplot(3,2,1);y1=normpdf(x,0,1);plot(x,y1);title('高斯噪声'); subplot(3,2,2); y2=unifpdf(x,-3,3);plot(x,y2);title('均匀噪声');subplot(3,2,3);y3=zeros(size(x));y3(1)=0.5;y3(end)=0.5;plot(x,y3);title('椒盐噪声'); subplot(3,2,4); y4=raylpdf(x,2); plot(x,y4);title('瑞利噪声'); subplot(3,2,5); y5=exppdf(x,1); plot(x,y5);title('指数噪声'); subplot(3,2,6); y6=gampdf(x,2,4); plot(x,y6);title('伽马噪声');
绘图结果
为图像添加上述噪声的matlab代码如下
clc;clear;f=imread('C:\Program Files\MATLAB\R2013a\bin\work\图像复原\Penguins.jpg');subplot(2,4,1);imshow(f);title('彩色图像');image_gray=rgb2gray(f);%得到灰度图像%figure;subplot(2,4,2);imshow(image_gray);%显示灰度图像title('灰度图像');%添加高斯噪声[M,N]=size(image_gray);R=normrnd(3,12,M,N);%得到高斯分布的随机数image_noise=double(image_gray)+R;%添加噪声后的图像image_noise=uint8(round(image_noise));subplot(2,4,3);imshow(image_noise);%显示灰度图像title('含高斯噪声图像');%添加均匀噪声R=unifrnd(-20,23,M,N);%得到均匀分布的随机数image_noise=double(image_gray)+R;%添加噪声后的图像image_noise=uint8(round(image_noise));subplot(2,4,4);imshow(image_noise);%显示灰度图像title('含均匀噪声图像');%添加椒盐噪声image_noise=imnoise(image_gray,'salt & pepper',0.02);%添加噪声后的图像subplot(2,4,5);imshow(image_noise);%显示灰度图像title('含椒盐噪声图像');%添加瑞利噪声R=raylrnd(30,M,N);%得到瑞利分布的随机数image_noise=double(image_gray)+R;%添加噪声后的图像image_noise=uint8(round(image_noise));subplot(2,4,6);imshow(image_noise);%显示灰度图像title('含瑞利噪声图像');%添加指数噪声R=exprnd(14,M,N);%得到指数分布的随机数image_noise=double(image_gray)+R;%添加噪声后的图像image_noise=uint8(round(image_noise));subplot(2,4,7);imshow(image_noise);%显示灰度图像title('含指数噪声图像');%添加伽马噪声R=gamrnd(3,10,M,N);%得到伽马分布的随机数image_noise=double(image_gray)+R;%添加噪声后的图像image_noise=uint8(round(image_noise));subplot(2,4,8);imshow(image_noise);%显示灰度图像title('含伽马噪声图像');效果如下图
1 0
- 图像复原与重建:噪声模型及MATLAB实现
- 图像复原与重建
- 图像复原与重建(2):噪声种类以及噪声参数估计
- 图像复原与重建(1):图像退化与复原过程模型
- 图像复原 之 噪声
- 【图像处理】MATLAB:仅有噪声的复原(空间滤波)
- 图像复原原理及实现
- 冈萨雷斯数字图像处理学习5:图像复原和重建1 噪声单独影响
- 系统学习数字图像处理之图像复原与重建
- 图像复原和重建技术
- matlab图像复原
- 图像复原之由投影重建图像
- 【图像处理】MATLAB:退化函数及多种复原方法
- 高斯白噪声及Matlab常用实现方法
- MATLAB-图像复原和分割
- Chapter 5 图像复原和重建
- 【图像处理】MATLAB:图像噪声
- 图像复原之退化模型
- 破解官网最新版phpstorm10.0.1
- OSGi原理与最佳实践:第一章 OSGi框架简介(1)Equinox
- Resnet的Tensorflow实现源代码
- 神经网络算法学习---梯度下降和随机梯度下降
- toArray()和toArray(Object a[ ]) 区别
- 图像复原与重建:噪声模型及MATLAB实现
- js变量面试题
- Codeforces 748A-Santa Claus and a Place in a Class
- UVa 704 - Colour Hash
- linux下查找java进程占用CPU过高原因
- [leetcode][187]Repeated DNA Sequences
- bzoj4377
- 数据结构课程设计--图书馆管理系统源码
- LeetCode 35---Search Insert Position