Can I use median filtering without put the salt & pepper noise?
2 ビュー (過去 30 日間)
古いコメントを表示
%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')
0 件のコメント
回答 (2 件)
yanqi liu
2022 年 1 月 13 日
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);
0 件のコメント
Image Analyst
2022 年 1 月 13 日
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.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Image Processing Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!