# What are the meanings of the second argument to the convolution?

I was trying to understand the convolution better and its mathematical properties and interpretations in engineering (specially in the context of computer vision). Recall the convolution:

$$s(t) = (x * w)(t) = \int x(a) w(t-a) da$$

the first argument (to the convolution) $x$ is usually called the input but the second argument $w$ (to the convolution) is usually called the "kernel". However, in computer vision and convolutional neural networks, the second argument is usually called a "template" (maybe the image of an edge or a wheel, or some part of an object). However, in other areas, I think is signals and systems, its usually called a "filter".

As a computer software engineer, I believe that naming is extremely important because it gives us the power to think about specific concepts. Having bad names can lead to sloppy thinking. Therefore, I was assuming that these technical names probably were chosen with these ideas in mind. Does someone know or understand why these names have been used to the second argument of the convolution?

The specific names that I am aware of are:

1. Kernel (from pure maths?)
2. Filter (signals and systems?)
3. Template (Computer vision/ Machine Learning)

Not sure if I am missing any, but I'd like to understand these naming better and possibly (hopefully) understand intuitively better what the convolution operator does and its interpretation in engineering and mathematics.

## 1 Answer

I think the diverse range of names for the second argument arises from the fact that the convolution operation is so useful in so many different fields.

It is helpful to recall what the convolution operation does before addressing the specific terms. Quoting from Wolfram Mathworld, "a convolution is an integral that expresses the amount of overlap of one function $g$ as it is shifted over another function $f$." Expressed another way, convolution is a mathematical way of checking to see how much of one function exists in another function, as the two are slid past each other. Wikipedia's visual examples of convolution has nice illustrations of how it works.

1. Kernel: This is the most general term, and it arises from mathematics. In mathematics, an integral transform is a general transformation defined by $$g(\alpha)=\int_a^b f(t)K(\alpha,t)dt.$$ The function $K(\alpha,t)$ in this integral transform is called the kernel. The convolution operation is just a sub-class of this more general transformation and so the second function is rightfully called the kernel. Unfortunately, I don't know the origin of the term kernel in the general integral transform.

2. Filter: In digital signal processing a matched filter "is obtained by correlating a known signal, or template, with an unknown signal to detect the presence of the template in the unknown signal." In this sense the second function acts as a filter for the first function, telling you which parts of the first have the properties of the second.

3. Template: This one is least familiar to me, but I think you can see how it arises from the same place as the term 'filter'. The template is an a-priori known signal for which you are searching in the unknown signal. The convolution of the two tells you what parts of the unknown signal have the same characteristics as the template.