enter image description here

I want to analysis the pattern of this kind of grid of cage, and remove them in frequency domain.

The goal image is like that shown by imgFinal, it's not an Inpaint task.


One way is doing image segmentation with traditional method, we can do that for a better or perfect mask.

The goal I want to know is how to find out this pattern [grid/fence] part in frequency domain, like Fourier or Wavelet, the best result is remove the foreground grid, but keep dogs and background.

And then, we can remove them by lowpass or highpass filters or other special filters like that in a noise removing task in Frequency Domain.

It's better to find a simple way.

If it's too hard, training method is also acceptable, not neural network's training, but training the basis like traditional face recognition based on PCA.

Of course, maybe we can also use the images or features from some neural networks as basis, that's the last choice.

Here is an example about Image Denoise based on Fourier

enter image description here

enter image description here


1 Answer 1


Trying to separate out these fence by spectrum doesn't look easy:

img = RemoveAlphaChannel[
shiftdata = 
   Fourier[ImageData[ColorConvert[img, "Grayscale"]]]];
        thresold]]]]]], {thresold, 0.001, 0.045, 
  Appearance -> "Labeled"}]

enter image description here

  • 1
    $\begingroup$ If just get a mask of grid, and then use ImageMultiply with the original image is much easier, but do all things in frequency domain is not easy. Because, in space domain, we can use many filters more intuitively and visually, and we can also add some Morph manipulations to refine the results. $\endgroup$ Dec 5, 2022 at 5:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.