O'Reilly logo

Computer Vision with Python 3 by Saurabh Kapur

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Convolution

Convolution in the context of image processing is defined as the sum of the product of the corresponding elements of a kernel matrix to an image matrix. Let's try to understand what this means. Given a kernel (matrix), multiply the corresponding elements of the image matrix and kernel matrix, and sum the multiplied values centered around a particular pixel in the image. In a new empty (black) image, set the corresponding pixel from the original image to the sum of multiplied values. Now, perform this operation for all the pixels in the original image. This is image convolution!

There are slight variations to the image convolution depending on different applications. Sometimes the kernel matrix is X, Y flipped before it is multiplied ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required