Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I determine if my convolution is separable?

Tags:

What makes a convolution kernel separable? How would I be able to tell what those separable parts were in order to do two 1D convolutions instead of a 2D convolution>

Thanks

like image 468
Derek Avatar asked May 04 '11 16:05

Derek


People also ask

How do I know if my filter is separable?

A two-dimensional filter kernel is separable if it can be expressed as the outer product of two vectors.

What is a separable convolution?

A Separable Convolution is a process in which a single convolution can be divided into two or more convolutions to produce the same output. A single process is divided into two or more sub-processes to achieve the same effect.

What is a separable kernel?

A separable kernel gives separate control of the frequency-smoothing and time-smoothing of the WVD which is an improvement over the spectrogram which does not have flexibility to independently adjust smoothing along the time and/or the frequency axis [62].

What is the advantage of the using separable convolution for image filtering?

Separable filters are one of the most useful tools in image processing and they can turn algorithms from “theoretical and too expensive” to practical under the same computational constraints.


2 Answers

If the 2D filter kernel has a rank of 1 then it is separable. You can test this in e.g. Matlab or Octave:

octave-3.2.3:1>     sobel = [-1 0 1 ; -2 0 2 ; -1 0 1];
octave-3.2.3:2>     rank(sobel)
ans =  1
octave-3.2.3:3> 

See also: http://blogs.mathworks.com/steve/2006/11/28/separable-convolution-part-2/ - this covers using SVD (Singular Value Decomposition) to extract the two 1D kernels from a separable 2D kernel.

See also this question on DSP.stackexchange.com: Fast/efficient way to decompose separable integer 2D filter coefficients

like image 139
Paul R Avatar answered Oct 16 '22 17:10

Paul R


you can also split the matrix into symmetric and skew parts and separate each part, which can be effective for larger 2d convolutions.

like image 35
Philip Oakley Avatar answered Oct 16 '22 15:10

Philip Oakley