Convolution operation
Convolution is one of the most important operations in the image processing. Blurring, sharpening, edge detection, denoising, embossing and many other familiar operations in image editors are actually convolutions. It is similar to the pooling operation in some way, because it is also a sliding window operation, but instead of taking the average over the window, it performs element-wise multiplication by the kernel – matrix of size n × n and sums the result. The result of the operation depends on the kernel (also known as convolution filter) – a matrix, which is usually square, but not necessarily, see Figure 9.3. The notions of the stride and padding are the same as in the pooling case:
Figure 9.3: Different convolution filters have different effects on the picture
Convolution operation works in the following way (see the following diagram):
- The convolution kernel (filter) slides over the image from left to right, and from top to bottom
- At each position, we calculate an...