-1

I would like to get ideas for how to extract the shapes from the background in this specific image using the frequency domain.

I know that the solution is based on the parallel lines.

Thanks!

EDIT: here is the transform image FFT

user9
  • 39
  • 8
  • 1
    I'm voting to close this question as off-topic because it's more about image processing theory than programming, and would be more likely to get answers at http://dsp.stackexchange.com – Paul R Feb 17 '16 at 13:57
  • But to answer your question in a nutshell: identify the spatial frequency of the diagonal lines in the X and Y axis, then filter these frequencies out in frequency domain (FFT, remove unwanted components, IFFT). – Paul R Feb 17 '16 at 14:00
  • In the Fourier space, you will have two picks each of them correspond to the different set of stripes. That seems like you are lazy to do your homework tho ... – R.Falque Feb 17 '16 at 14:02
  • I am not lazy.. I am just confused.. I edited my question with the transform image. How can i determine which lines to delete? – user9 Feb 17 '16 at 14:55
  • @paulR What do you mean in "then filter these frequencies out in frequency domain"? change thos pixels to black? thanks! – user9 Feb 17 '16 at 18:13
  • @user9: the lines are periodic in the spatial domain so they will appear as peaks in the frequency domain - so you can just zero them out (ideally with a smooth window function rather than just zeroing). In other words it's just [frequency domain filtering in 2D](http://paulbourke.net/miscellaneous/imagefilter/). – Paul R Feb 17 '16 at 18:18

1 Answers1

0

I would get rid of the background stripes in the following way:

The stripes are parallel and have 45 degrees slope. You can imagine, that the Fourier Transform (TF) goes around the image and searches for the direction, from which the image has strong correlation with sine waves.

Your stripes can be seen like a very primitive approximation of a banch of sine waves being observed from the top left (or bottom right) corner perpendicular to the wave's front. For this reason the main (but not all) information about the stripes is in the diagonal going between the corresponding corners of the FT.

There are a lot of bright spots on the diagonal. Their positions describe the orientation and frequencies of the basis waves, whereas the corresponding complex numbers describe their magnitudes and phases. You need to get rid of those diagonal spots.

You should not delete the main spot in the center, because it describes the low frequency signal (for example the average brightness of the whole image).

Here you can see the results:

enter image description here

As you can notice, the stripes crossing the shapes are away. The background is not really clean. More advanced methods can help here for sure, but I think the main idea is more or less correct.

Anton
  • 4,544
  • 2
  • 25
  • 31