How can I remove the additive periodical noise from the image?

52 views (last 30 days)
I got an image (Project1.png) that had been corrupted by periodical noise A= 20 * sin(0.1*pi*x+0.1*pi*y). Try to remove the noise by apply the DFT on the image and multiple with the design filter (FilterImage.jpg) that I been created then inverse back to get the filtered image. But its seem like the final image not remove the noise at all. Any idea how to remove it or suggestion on how to do it? The design filter I created was basically based on the DFT of the noise (F=fft2((A)); Fs=(fftshift(F));) Thanks
clear all;
close all;
clc;
[filename, pathname]=uigetfile('*.*','Select Grey Scale Image');
filewithpath=strcat(pathname,filename);
img=imread(filewithpath);
[row,col]=size(img)
F=fft2(double(img)); %DFT of Image
Fs=fftshift(F); %Shifting Spectrum to Centre
% Getting H(u,v) - Filter
H=imread('FilterImage.jpg');
H=double(H/255);
Fsf=Fs.*H;
%Inverse DFT
fimg=ifft2(fftshift(Fsf));
imgr=uint8(real(fimg));
subplot(221);
imshow(img);
subplot(222);
imshow(log(1+abs(Fs)),[]);
subplot(223);
imshow(imgr, []);
subplot(224);
imshow(log(1+abs(Fsf)),[]);

Accepted Answer

Bjorn Gustavsson
Bjorn Gustavsson on 19 Jan 2021
Your Filterimage is not the notch-filter you need, that is only the 1-D amplitude (possibly power) of the 1-D fft of the filter you need. Have a look at chapter 5.7 Interactive Restoration (I've got an old edition), there you should find the information you need to produce a 2-D notch-filter removing the relevant "interference" peaks from the 2-D fft of your image.
HTH
  8 Comments
Bjorn Gustavsson
Bjorn Gustavsson on 21 Jan 2021
My pleasure.
The lesson is (as it always seems to be for me): Really look at the data before going to work...
...I tried the automatic notch-filtering first too...

Sign in to comment.

More Answers (1)

Image Analyst
Image Analyst on 19 Jan 2021
See attached demo.
Because your bars are so sharp I'd probably rather fix the image in the spatial domain rather than the frequency domain.
  4 Comments
AP
AP on 21 Jan 2021
Good good, figure it out now. But this is what I get after doing filter. Still didn't enhance the image. Any others suggestion for that?
Image Analyst
Image Analyst on 21 Jan 2021
I warned you that spatial filtering in the Fourier domain would not work very well for that type of noise. The reason is that the bars noise has lots of frequencies so using a notch/band pass filter, or even filtering out spikes by intensity would not get all the energy of the bars. So you'll filter out some of the bars, but not all, and you'll filter out some of the desired content, but not all. So it won't be great. But if you do it in the spatial domain you can do a better job. You can identify the angle of the lines with something like the radon transform, and then examine the profile perpendicular to the lines to determine if the intensity was a fraction of the unaltered intensity, or if it's an offset subtracted from the unaltered intensity (multiplicative vs. additive noise).

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!