How to remove periodic noise from image in frequency domain?

4 views (last 30 days)
I am trying to remove perioding noise from an Image I in frequesncy domain.
I am looping through each channel to remove noise from it and to presirve the color information
I am converting the image using forier transform then appling the filter"NOT DONE YET" then returnning the image to it's original form
I am not sure how to filter out the noise automatically but I have an idea.
to get the max signal in the Magnitude and delete that but I am not sure how to implement that filter can any one help?
function Image = RemovePeriodicNoise(I)
[r, c, n] = size(I);
for i = 1:n
%mag of each channel
C = I(:,:,i);
F = fft2(C);
Mag = abs(F).^2;
Mag = mat2gray(log(Mag + 1));
Mag = fftshift(Mag);
% removing periodic noise
filtered = F;% how to filter F to be without noise
%reversing the image
I(:,:,i)=ifft2(filtered);
end
Image = I;
end

Answers (0)

Products


Release

R2019b

Community Treasure Hunt

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

Start Hunting!