How to use masking filter to remove particular frequency from an image?

I have modified the code of ImageAnalyst for one the tasks that I am currently working on. Goal is to extract the QR code from the image. Previously I extracted the QR code by using a notch filter but it is highly sensitive to distortion and doesnt work as soon as image is no more in-plane.
Attached is the code based on masked filter (originally written by Image Analyst) and the image I am working on. But once I have removed the frequencies, it it gives me a noisy output like salt and pepper noise.
Looking forward to constructive feedback on the query.

4 Comments

Is your image that of a QR code?
What sort of noise are you trying to remove? Other than the uneven illumination at the edges, I can't see any noticeable noise in your image.
Idea is to remove the black and white dots to get the QR code only.
So bright spikes in frequency domain are suppose to remove those bright dots in frequency image labelled as “log of abs..”. Any suggestions on that?
Isn't the QR code encoded by the connections between the dots? If so, why do you care about removing some frequencies from the image?
No QR code is simply added as a layer on the pattern so the noise right now goes beyond the set noise correction factor of 25% in QR code which makes it unreadable. Idea about removing the bright spikes in the frequency domain is to treat these white and black dots as periodic noise and then get rid of them.
Previous discussion on the similar topic with Image Analyst is in the following link: (he did not reply there so I started new thread here)
https://se.mathworks.com/matlabcentral/answers/418501-how-to-find-specific-frequency-from-image
Ideally when we adjust the contrast in imtool then we should be able to read the QR code.

Sign in to comment.

Answers (0)

Products

Release

R2018a

Asked:

on 21 Oct 2018

Commented:

on 21 Oct 2018

Community Treasure Hunt

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

Start Hunting!