remove impulse noise in frequency domain
이전 댓글 표시
I know that the best way for removing impulse is using median filter or some other spatial domains . but Is there any way to remove impulse noise like salt and pepper in frequency domain ?
답변 (1개)
Image Analyst
2016년 4월 2일
Same as in the spatial domain. You could use a modified median filter. First median filter the spectrum. Then subtract it from the original to get a more or less flat image with spikes. Then threshold the spikes to create a mask. Then set the masked areas to either zero or the median filtered values.
medianFilteredImage = medfilt2(spectrum);
mask = (spectrum - medianFilteredImage) > someValue;
spectrum(mask) = 0;
%spectrum(mask) = medianFilteredImage(mask); % Alternative.
Also, see attached demo.
카테고리
도움말 센터 및 File Exchange에서 Image Filtering에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!