数字图像处理实验(10):PROJECT 05-01 [Multiple Uses],Noise Generators
来源:互联网 发布:如何下载别人网站源码 编辑:程序博客网 时间:2024/06/05 04:49
实验要求:
Objective:
To know how to generate noise images with different probability density functions (distributions). The noise images are useful in simulation for image enhancement and image restoration.
Main requirements:
Ability of programming with C, C++, or Matlab.
Instruction manual:
This is a generic project, in the sense that the programs developed here are used in several of the projects that follow. See Fig. 5.2 for the shapes and parameters of the following noise probability density functions.
(a) Find (or develop) a program to add Gaussian noise to an image. You must be able to specify the noise mean and variance.
(b) Find (or develop) a program to add salt-and-pepper (impulse) noise to an image. You must be able to specify the probabilities of each of the two noise components.
本实验比较简单,目的就只是往图片中添加各种噪声,比如高斯噪声或者椒盐噪声。还有一点要求就是要能够向程序指定概率等等的一些参数。
给出原图像:
实验代码:
% PROJECT 05-01 [Multiple Uses] Noise Generatorsclose all;clc;clear all;% 原图像img =imread('Fig5.03.jpg');figure;subplot(1,3,1);imshow(img);title('original image');% 添加高斯噪声img_nse1 = imnoise(img, 'gaussian', 0.2, 0.01);subplot(1,3,2);imshow(img_nse1);title('Plus gaussian noise');disp('高斯噪声');disp(['mean: ', num2str(0.2), ' variance: ', num2str(0.01)]);% 添加泊松噪声% img_nse2 = imnoise(img, 'poisson');% figure;% imshow(img_nse2);% title('Plus poisson noise');% 添加椒盐噪声img_nse3 = imnoise(img, 'salt & pepper', 0.2);subplot(1,3,3);imshow(img_nse3);title('Plus salt & pepper noise');disp('椒盐噪声');disp(['probability: ', num2str(0.2)]);
实验结果:
注释主要在代码中,实验现象也很明显,分别显示了添加高斯噪声和椒盐噪声的图像。
- 数字图像处理实验(10):PROJECT 05-01 [Multiple Uses],Noise Generators
- 数字图像处理实验(5):PROJECT 04-01 [Multiple Uses],Two-Dimensional Fast Fourier Transform
- 数字图像处理实验(4):PROJECT 02-04 [Multiple Uses],Zooming and Shrinking Images by Bilinear Interpolation
- 数字图像处理实验(11):PROJECT 05-02,Noise Reduction Using a Median Filter
- 数字图像处理实验(12):PROJECT 05-03,Periodic Noise Reduction Using a Notch Filter
- 数字图像处理实验(7):PROJECT 04-03 , Lowpass Filtering
- 数字图像处理实验(9):PROJECT 04-05,Correlation in the Frequency Domain
- 数字图像处理实验(13):PROJECT 05-04,Parametric Wiener Filter
- 数字图像处理实验(1):PROJECT 02-01, Image Printing Program Based on Halftoning
- 数字图像处理实验(14):PROJECT 06-01,Web-Safe Colors
- 数字图像处理实验(3):PROJECT 02-03, Zooming and Shrinking Images by Pixel Replication
- 数字图像处理实验(6):PROJECT 04-02,Fourier Spectrum and Average Value
- 数字图像处理实验(8):PROJECT 04-04,Highpass Filtering Using a Lowpass Image
- 数字图像处理实验(15):PROJECT 06-02,Pseudo-Color Image Processing
- 数字图像处理实验(16):PROJECT 06-03,Color Image Enhancement by Histogram Processing
- 数字图像处理实验(17):PROJECT 06-04,Color Image Segmentation
- 数字图像处理实验(5):Proj03-01 ~ Proj03-06
- bmp数字图像处理实验
- 乐享其约CEO施建锋:微信预约时代的到来
- Spring_SSH整合之_架构的历史(四层架构整合JSP+MySQL+JavaBean+Hibernate+Dao+Impl)_4
- Android 计步传感器的实现
- ClimbingStairs(leetcode)
- sdut-离散题目7
- 数字图像处理实验(10):PROJECT 05-01 [Multiple Uses],Noise Generators
- SpringMVC学习笔记(二):基于注解的方式
- mybatis update某一个字段
- mysql打开远程连接
- Ubuntu 16.04 LTS (LEMP) 安装 Nginx/PHP 7/MySQL 5.7
- 高性能Javascript--脚本的无阻塞加载策略
- springMVC-笔记011-多个拦截器
- 指向函数的指针
- js中的 call()和apply()