1

Actually I want to apply notch filter to remove specific pattern in image just like (line ,circle ,etc..) . I want to remove some specific frequency of line or circle using notch filter or any other way of removing. Can some one guide me how can I remove specific repetitive pattern from image just like circle or line. if you give some example code it help me a lot. because currently I can not understand how I apply filter or notch to remove certain repetitive pattern form Image. Waiting to hear from you soon.enter image description here

Gujjar Ad
  • 35
  • 9
  • Does my answer to [this](https://stackoverflow.com/questions/29235421/find-proper-notch-filter-to-remove-pattern-from-image) question help? It's a matlab related question but the explanation should stand on its own. – jodag Nov 19 '17 at 10:03
  • Posting an image might help. – Mark Setchell Nov 19 '17 at 10:34
  • @MarkSetchell please see the image and guide me how can I remove the repetitive Line structure from image? – Gujjar Ad Nov 20 '17 at 14:29

1 Answers1

2

Spectral Analysis is not "my thing", but the steps are as follows.

Take your original image and perform FFT to generate:

  • phase image
  • magnitude image
  • spectrum (on a log scale)

You seem to have that already. Now take the spectrum image:

enter image description here

and mask out all the off-centre highlights with a different colour, like this:

enter image description here

and difference that with the original spectrum so you get a mask of your edits like this:

enter image description here

Multiply that newest mask with the original magnitude, combine with the original phase and do the inverse FFT. I got this as a result of my sloppy editing and abilities!

enter image description here

Mark Setchell
  • 191,897
  • 31
  • 273
  • 432
  • Please Can you share the code it give me more help to play with. Thanks – Gujjar Ad Nov 21 '17 at 03:55
  • I didn’t use **OpenCV** as I was just showing the technique and I didn’t want to write, compile and test code. I just used **ImageMagick** at the commandline to do the FFT, difference, multiply and Inverse FFT. – Mark Setchell Nov 21 '17 at 07:24