日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

数字图像处理实验(10):PROJECT 05-01 [Multiple Uses],Noise Generators

發布時間:2025/3/21 编程问答 27 豆豆
生活随笔 收集整理的這篇文章主要介紹了 数字图像处理实验(10):PROJECT 05-01 [Multiple Uses],Noise Generators 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

實驗要求:

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 Generators close 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的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。