Adding Noise to the Image
古いコメントを表示
How do I apply "salt" noise to the grey - scale image. Function need to generate salt noise only not the pepper.
採用された回答
その他の回答 (1 件)
Arun Kumar
2014 年 7 月 17 日
1 投票
%Prepare workspace
clear ; clc; close all;
%Read Imag
I=imread('cameraman.tif');
%create a random matrix
randM=rand(size(I));
% default density
d=.05;
%saturated value
randM(randM<d)=255;
%Add noise
I=uint8(double(I)+randM);
%show image
imshow(I)
カテゴリ
ヘルプ センター および File Exchange で Images についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!