Algorithm for periodic noise removal in images using band reject filters (notch)

Viewed 153

This question can be considered a theoretical follow-up to this question.

Mainly, I have this noisy image:

Original Image

original image

Goal

Filter out the periodic noise of the image using band reject filters.

Frequency spectrum (shifted + zoomed in)

I first plotted the frequency spectrum of the image (by applying 2D FFT and shifting the center):

noisy image FT spectrum

Applying the filter

This bit is the reason for the post. Following both the post, the article, and also other sources, the filter is applied manually by looking at the frequency spectrum and manually nulling the areas with high values (by eyeballing the spots coordinates and setting them to 0), like so:

enter image description here

Taking this spectrum back to the discrete value domain by performing 2D iFFT and shifting, I got the image below:

enter image description here

The resulting reconstruction is great by my set standards. My issue is that the filtering assumes that we know the coordinates of the frequencies with high values of the frequency spectrum. To reiterate, to remove the periodic noise of an image, I am required to visually look at the frequency spectrum of that image, eyeball the coordinates of the spots with high values, and pass the coordinates to a function that blanks them out.

This way of hardcoding the coordinates is non scalable, and I was thus looking for an algorithm that would automatically detect these high frequency spots and nulls them, in the general case, but I couldn't find any.

In my mind, I can't see why there wouldn't be an algorithm for that; the eyeballing of the values on the spectrum could surely be described in operations.

Am I approaching this the wrong way?

0 Answers
Related