Skip to content
Home » Convolution & Filtering

Convolution & Filtering

“The world was a dazzling mosaic of colors and shapes, but I wonder if the magical computer to see it differently.” The little fairy thought and flew to the house of the Great Wizard.

“It’s all about convolution, my dear Cora. Think of it as looking at the world through a special, tiny window, or a ‘KERNEL’ as we call it.”

“Imagine this crystal is our kernel,” he continued. “We slide it across an image, one spot at a time. At each spot, we multiply the values of our kernel with the values of the image underneath it, and then sum them all up to get a new value. It’s like a magical multiplication dance!”

As the Professor moved the kernel across the leaf, the image transformed. The soft, blurry edges of the leaves and flowers on the image became sharp and defined. ‘You see?’ said the Professor. ‘This kernel is a master of finding edges. It enhances the differences in brightness.

Glimmer then swapped the edge-finding kernel for a different one, a crystal that was uniformly bright. As she and the Professor moved this new kernel across the image, the sharp details softened, and the colors blended together. ‘This one is a smoothing artist,’ Glimmer chirped. ‘It blurs the world, like looking through a misty morning

So, by choosing our kernel, our FILTER,” Cora mused, “we can choose what we want to see. We can find the outlines, smooth out the noise, or even sharpen the focus. It’s not just seeing, it’s understanding.

The “picture” is your image, and the “special magnifying glass” is called a kernel or a filter. The kernel is a small matrix of numbers, and each number represents how much to weigh the corresponding pixel in the image.

By changing the numbers in the kernel, you can change what you’re looking for. You can have kernels that detect horizontal edges, diagonal edges, corners, or even more complex shapes. You can also have kernels that blur the image (like a Gaussian blur) or sharpen it.

So, in a nutshell, convolution is the process of sliding a small filter (kernel) over an image to create a new image that highlights certain features.

So that’s a fundamental operation in computer vision that allows computers to “see” and understand images in a way that’s similar to how our own brains process visual information.


Imagine you’re looking at a picture, and you want to find all the vertical edges. You could take a tiny magnifying glass that’s designed to only highlight vertical lines. You would then slide this magnifying glass across the entire picture, from left to right, and top to bottom.

Every time your special magnifying glass is over a vertical edge, it lights up. When it’s over a smooth area, it stays dark. After you’ve scanned the whole picture, you’ll have a new image that only shows the vertical edges.

That’s essentially what convolution is. The “picture” is your image, and the “special magnifying glass” is called a kernel or a filter. The kernel is a small matrix of numbers, and each number represents how much to weigh the corresponding pixel in the image.

By changing the numbers in the kernel, you can change what you’re looking for. You can have kernels that detect horizontal edges, diagonal edges, corners, or even more complex shapes. You can also have kernels that blur the image (like a Gaussian blur) or sharpen it.

Leave a Reply

error: Content is protected !!