Remove artefact using fourier filter

2 次查看(过去 30 天)
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