IMAGE FILTERS
Image filters are operators that given a 2D input image calculate the new intensity of a pixel based on considerations on the neighborhood, an important class of filters are the linear and translation equivariant filters.
LTE filters are olso used in CNN as feature extractors
LINEAR AND TRANSLATION EQUIVARIANT FILTERS
LINEARITY
given a 2D input signal an operator is linear if the filter of a linear combination is equal to the output of the filters of the single elements
TRANSLATION EQUIVARIANCY
an operator is said to be translation equivariant if the output of the filter given an image with translated coordinates is the same as the output of the filter for that given points
CONVOLUTION
If this conditions are met then the output of the operator is given by the convolution between the input signal and the impulse response (kernel) of the operator.
PROPERTIES
The convolution benefits from the following properties
PROPERTY | FORMULA |
---|---|
associative | |
commutative | |
distributive wrt to the sum | |
commutative wrt differentiation |
CORRELATION
correlation of a signal with respect to a signal is defined as follows
CORRELATION IS NOT COMMUTATIVE
CONVOLUTION AND CORRELATION RELATION
Convolution and correlation are similar to each other, they both integrate a product of 2 functions after translation (but correlation does not do reflection), it’s worth to notice that if the function is even the 2 functions are equal:
Remember that correlation is not commutative even if h is even
DISCRETE CONVOLUTION
In a real scenario the image is a discrete representation, in order to account for this the convolution function is translated in a discrete form
In this representation the input and the output function are real image signals representations and the is the discrete representation of the kernel function (e.g. the kronecker delta function)
This model it’s not feasible for implementation as images are stored on matrix of finite sizes
So the idea behind the implementation is to slide the kernel matrix over the image and compute the convolution for each point of the image