Remove artefact using fourier filter

3 visualizaciones (últimos 30 días)
shubham kumar gupta
shubham kumar gupta el 24 de Jun. de 2022
Respondida: Image Analyst el 8 de Sept. de 2022
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

Respuestas (1)

Image Analyst
Image Analyst el 8 de Sept. de 2022
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:

Categorías

Más información sobre Image Processing Toolbox en Help Center y File Exchange.

Productos


Versión

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by