Can I use median filtering without put the salt & pepper noise?

5 Ansichten (letzte 30 Tage)
Atifah Samuri
Atifah Samuri am 12 Jan. 2022
Beantwortet: Image Analyst am 13 Jan. 2022
%median filtering
handmf = imread ('ifa.jpg');
handmedfilt = imnoise (handmf,'salt & pepper', 0.02);
handdahmf = medfilt3 (handmedfilt);
imwrite(handmedfilt, 'ifas&p.jpg')
imwrite(handdahmf, 'ifamedifilt.jpg')

Antworten (2)

yanqi liu
yanqi liu am 13 Jan. 2022
yes,sir,may be use it directly,such as
%median filtering
handmf = imread ('cameraman.tif');
%handmedfilt = imnoise (handmf,'salt & pepper', 0.02);
handdahmf = medfilt2 (handmf);
%imwrite(handmedfilt, 'ifas&p.jpg')
%imwrite(handdahmf, 'ifamedifilt.jpg')
figure;
subplot(1,2,1);imshow(handmf);
subplot(1,2,2);imshow(handdahmf);

Image Analyst
Image Analyst am 13 Jan. 2022
Not sure what "Can I use median filtering without put the salt & pepper noise?" means, but yes, you can use medfilt2() on an image without first applying noise to the image beforehand.

Kategorien

Mehr zu Image Processing Toolbox finden Sie in Help Center und File Exchange

Produkte


Version

R2016b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by