1
$\begingroup$

Suppose, I need to construct a Band-pass filter in OpenCV. But, I know, there are no functions in OpenCV for Band-pass filters.

Now, what I need to do is to have a low-pass filter and a high-pass filter and combine them as a series. That is, first, the image would be passed through a low-pass filter and then the output of that low-pass filter would be passed to a high-pass filter.

Am I correct?

Now, what kind of low and high pass filters should I use? Would they be,

  • Gassian low/high pass filters
  • Mean low/high pass filters
  • Median low/high pass filters
  • Sobel filters
  • or, anything else...
$\endgroup$

1 Answer 1

3
$\begingroup$

Yes you are correct. You apply them if series in they are linear.

One simple band-pass filter you could use is called the difference of Gaussian (DoG)

The procedure is:

  1. Create a Gaussian filter with a small variance
  2. Create a Gaussian filter with a large variance
  3. Subtract the latter from the former to create a band-pass filter
  4. Apply the filter to the image

There are a lot of different filters to choose from depending on the application. A good paper is "On the choice of band-pass quadrature filters" by Boukerroui, Noble and Brady. It has an analysis of the DoG filter as well.

$\endgroup$
2
  • $\begingroup$ stackoverflow.com/questions/26832557/… Do "Band-pass" and "Band-stop" mean same things? $\endgroup$
    – user18425
    Jun 11, 2016 at 12:01
  • 2
    $\begingroup$ No, band stop is the reverse of the band pass. That is, it attenuates a range of frequencies rather than amplifying them. High pass followed by low pass (with Fhigh<Flow) would result in bandpass. Highpass in parallel with Lowpass (with FHigh>Flow) would result in band stop. $\endgroup$
    – A_A
    Jun 11, 2016 at 16:48

Your Answer

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