Remove artefact using fourier filter

조회 수: 2 (최근 30일)
shubham kumar gupta
shubham kumar gupta 2022년 6월 24일
답변: Image Analyst 2022년 9월 8일
I have a coin image where mid portion became dark after processing of the data, now i am trying fourier filter to remove artefact, but ig i'm not able to correctly remove artefacts.
My attempt:
function img_back=fftSaft(maxarray)
figure(1);
subplot(2,2,1);
%maxarray=medfilt2(maxarray,[2 2]);
maxarray=imgaussfilt(maxarray,0.8);
maxarray=imsharpen(maxarray);
imshow(maxarray,[]);
af=fftshift(fft2(maxarray));
subplot(2,2,2);
mag=20*log(abs(af));
imshow(mag,[]);
rows=size(maxarray,1); cols = size(maxarray,2);
crow=floor(rows/2);ccol = floor(cols/2);
%af(crow-0.5:crow+0.5, 1:ccol-5) = 0;
%af(crow-0.5:crow+0.5, ccol+6:end) = 0;
af(af>60 & af<150)=0;
subplot(2,2,3);
magnitude_spectrum_no_vertical = 20*log(abs(af));
imshow(magnitude_spectrum_no_vertical,[]);
iaf=ifftshift(af);
img_back=ifft2(iaf);
img_back=real(img_back);
img_back=imsharpen(img_back);
subplot(2,2,4);
imshow(img_back,[]);
end

답변 (1개)

Image Analyst
Image Analyst 2022년 9월 8일
Where exactly is the artifact in that image?
I don't know that Fourier filtering could get rid of an artifact such as darkening. You should figure out why your processing made the middle darker in the first place.
If you have any more questions, then attach your original image and code to read it in with the paperclip icon after you read this:

카테고리

Help CenterFile Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by