# Convolution basic example

Definition

$y(t) = h(t)*x(t) = \int_{-\inf}^{\inf} x(\tau)h(t-\tau)d\tau = \int_{-\inf}^{\inf} h(\tau)x(t-\tau)d\tau = x(t)*h(t)$

Discreate form

$y(n) = \sum_{m=-\inf}^{\inf}x(n-m)h(m) = \sum_{m=-\inf}^{\inf}h(n-m)x(m)$

Properties
1. $h(t)*x(t) = x(t)*h(t)$
2. $h*(g*x) = (h*g)*x$

In image processing : two dimensions convolution
h is called convolution kernel or mask

$y(m, n) = \sum_{i=-k}^{k}\sum_{j=-k}^{k}x(m+i, n+j)h(i,j)$

Sliding kernel throughout the image. If image is like in kernel, we will have peak value of y(m, n). –> roughly use to detect same image ??
The pictures below is a good visualization from Wiki.

ref : hmc