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!