O'Reilly logo

OpenCL Parallel Programming Development Cookbook by Raymond Tay

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

Understanding convolution in 2D

Convolution in 2D is actually an extension of the previously described Understanding convolution in 1D section, and we do so by computing the convolution in two dimensions.

Getting ready

The impulse function also exists in a 2D spatial domain, so let's call this function. b[x,y] has the value 1, where x and y are zero, and zero where x,y10. The impulse function is also referred to as filter or kernel when it's being used in image processing.

How to do it…

Using the previous example as a guide, let's start thinking from the perspective of a signal which can be decomposed into the sum of its components and impulse functions, and their double summation accounts to the fact that this runs over both vertical and horizontal ...

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