3
$\begingroup$

It seems to me they are two terms used to refer to the same concept, but, according to the Wikipedia page on Gaussian filter

a Gaussian filter is a filter whose impulse response is a Gaussian function

So, what is the difference between an impulse response and a kernel? I am particularly interested in knowing the difference in the context of computer vision and image processing.

$\endgroup$
1
  • $\begingroup$ As understood from its name, impulse-response is the response of a "linear" system to an impulsive input. On the other hand, you can think of the kernels as if the core of an operation. To give an example, the Laplace kernel is a "kernel" but not a response of a system. You are right in a point that these two terms are (kind of) equivalent for their implementations. But they are separate terms as regards their definitions. $\endgroup$ Commented Oct 16, 2021 at 22:46

1 Answer 1

1
$\begingroup$

The impulse response of an operation is the same as the kernel of that operation, but only if the operation can be represented by a kernel (the operation is linear and translation invariant).

For example, consider the following input (the impulse):

  [[0., 0., 0., 0., 0.],
   [0., 0., 0., 0., 0.],
   [0., 0., 1., 0., 0.],
   [0., 0., 0., 0., 0.],
   [0., 0., 0., 0., 0.]]

If you give it as input to a laplace filter, you get:

  [[ 0.,  0.,  0.,  0.,  0.],
   [ 0.,  0.,  1.,  0.,  0.],
   [ 0.,  1., -4.,  1.,  0.],
   [ 0.,  0.,  1.,  0.,  0.],
   [ 0.,  0.,  0.,  0.,  0.]]

This corresponds to the kernel of the laplace filter.

But if you give the same input to a 90 degrees rotation around the centre, you get:

  [[0., 0., 0., 0., 0.],
   [0., 0., 0., 0., 0.],
   [0., 0., 1., 0., 0.],
   [0., 0., 0., 0., 0.],
   [0., 0., 0., 0., 0.]]

(the same as the input)

Obviously, this is not a 'rotation kernel', it is just the identity. This happens because there is no such thing as a rotation kernel, because rotation operations are not translation independent (besides the trivial case of rotating by 0 degrees).

If the operation was not linear, the kernel would not match the impulse response either (for example, for a thresholding operation).

$\endgroup$

Your Answer

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