5
$\begingroup$

In the image processing world, I've noticed that a lot of the popular convolution filters are separable. Here's a quick list of common separable filters:

Not separable:

  • Laplacian
  • What other common filters are not separable?

I'm a little bit worried about this post being closed for being too broad or not constructive enough. But, some "what is this good for?" questions have been well-received here.


Background: I've developed some high-performance 2D convolution implementations. I'd like to have a better handle on the motivating applications.

$\endgroup$

2 Answers 2

8
$\begingroup$

There are many. In general, steerable filters are not separable. Few are, but many are not.

Here is a short list:

  • Gabor filters in certain directions. Of course, one can use the bases that are separable due to the fact that Gabor filters are steerable. Gabor filters have the advantage that they are optimally localized in time and frequency. As a degenerate case, consider a non-symmetric 2D Gaussian where the principal components are not horizontal or vertical.

  • Difference of gaussian (DoG) used to model retinal ganglion and thalamic receptive fields are also not separable.

  • Marr-Hildreth for edge detection is not separable.

  • A bunch of filters used for segmentation are not separable: http://dl.acm.org/citation.cfm?id=720464&CFID=260338827&CFTOKEN=99199893

The list can go on and on, and these are just common examples! You can certainly design FIR filters to fit your need, and there are methods to do this. That is the whole purpose of a large sub-field of DSP.

In general when you design a 2-D filter, if it is anisotropic and not oriented horizontally or vertically, chances are that it is not separable. For example, if you were to design a low pass (pre-)filter to remove high frequency that may cause aliasing in a hexagonal sampling system. This would have to be an analog filter, but for digital, consider a down sampling scenario. For optimal design, you'd want to keep as much information as possible, so your filter would most likely match the hexagonal sampling grid. This will definitely give you a filter that is not separable.

$\endgroup$
4
  • $\begingroup$ Are you certain about the DoG being not separable? "Algorithms for Efficient Computation of Convolution" by Karas, Svoboda (cdn.intechopen.com/pdfs/41657.pdf) says: "Gaussian, Difference of Gaussian, and Sobel are the representatives of separable kernels commonly used in signal and image processing" $\endgroup$
    – mloskot
    Jul 15, 2019 at 19:08
  • $\begingroup$ @mloskot, even a single tilted 2D Gaussian is not separable. the paper is probably incorrect or makes assumptions about Gaussians. In its general form, it's exp(-xTAx) where T = transpose and A is a matrix. If you force A to be diagonal, then it is separable. $\endgroup$
    – thang
    Jul 15, 2019 at 21:39
  • $\begingroup$ There are plenty of isotropic filters that are not separable either. For example a box filter with a circular support is not separable, yet quite isotropic. $\endgroup$ Feb 19, 2022 at 16:05
  • $\begingroup$ Another use case: when carrying out convolutions as part of an image deconvolution process such as Richardson-Lucy, the filter is a point spread function representing the effect of blur on a point source. Of course sometimes this can be modelled as a separable filter, e.g. Gaussian, but often in order to get the closest match to the data being deconvolved the PSF may be non-symmetrical. $\endgroup$ Jan 11 at 14:32
1
$\begingroup$

I have not read the article, but according to this: Separable Gabor filter realization for fast fingerprint enhancement Gabor filters are separable. Maybe they are doing a subset of Gabors.

Also, difference of Gaussians, is an approximation of Laplacian of Gaussian. For 2D, I am sure the 2D Gaussian is separable and I think you can run $[-1 2 -1]$ vertically and horizontally to get 2D Laplacian.

$\endgroup$
4
  • $\begingroup$ While this is all true, the question asked for "What other common filters are not separable?". Can you provide some examples that are non-operable as well? $\endgroup$ Feb 19, 2022 at 1:06
  • $\begingroup$ This seems to be a comment on the other answer, not an answer to the question at the top of the page. $\endgroup$ Feb 19, 2022 at 16:06
  • $\begingroup$ That said, the Gabor filter is separable if the enveloping Gaussian is, but in many places it is implemented as a rotated, elongated kernel which is not separable. The LoG and DoG are sequences of separable filters, but the composed kernels themselves are not separable. Fine distinction… :) $\endgroup$ Feb 19, 2022 at 16:08
  • $\begingroup$ @CrisLuengo you may be quite right. A better question to ask may be: Given a 2D filter, is there a way to approximate separable filters that come close to generating the original filter. As for examples of non-separable filters, in Convolutional Neural Nets, I believe they start with a random dot filter and then learn the values of the filter points. I think most Random dot filters is non-separable; why you'd want to use them, I am not sure. $\endgroup$
    – user96265
    Feb 20, 2022 at 17:04

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.

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