<!--
{
  "documentType" : "article",
  "framework" : "Accelerate",
  "identifier" : "/documentation/Accelerate/convolution",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Convolution"
}
-->

# Convolution

Apply a convolution kernel to an image.

## Discussion

*Convolution* is a common image-processing technique that changes the value of a pixel according to the values of its surrounding pixels. Many common image filters, such as blurring, detecting edges, sharpening, and embossing, derive from convolution.

*Kernels* form the basis of convolution operations. Kernels are arrays or matrices of weights that indicate the influence of a pixel’s neighbors on its final value. To calculate the value of each transformed pixel, a convolution operation adds the products of each surrounding pixel value with the corresponding kernel value. During a convolution operation, the kernel passes over every pixel in the image, repeating this procedure, and then applies the effect to the entire image.

## Topics

### Convolving an 8-bit image with 32-bit weights

[`vImageConvolveFloatKernel_ARGB8888`](/documentation/Accelerate/vImageConvolveFloatKernel_ARGB8888(_:_:_:_:_:_:_:_:_:_:_:))

Convolves an 8-bit-per-channel, 4-channel interleaved image using 32-bit weights.

### Convolving with separable filter kernels

[`vImageSepConvolve_Planar8`](/documentation/Accelerate/vImageSepConvolve_Planar8(_:_:_:_:_:_:_:_:_:_:_:_:))

Convolves an 8-bit planar image by separate horizontal and vertical separable kernels.

[`vImageSepConvolve_Planar16U`](/documentation/Accelerate/vImageSepConvolve_Planar16U(_:_:_:_:_:_:_:_:_:_:_:_:))

Convolves an unsigned 16-bit planar image by separate horizontal and vertical separable kernels.

[`vImageSepConvolve_Planar16F`](/documentation/Accelerate/vImageSepConvolve_Planar16F(_:_:_:_:_:_:_:_:_:_:_:_:))

Convolves a floating-point 16-bit planar image by separate horizontal and vertical separable kernels.

[`vImageSepConvolve_PlanarF`](/documentation/Accelerate/vImageSepConvolve_PlanarF(_:_:_:_:_:_:_:_:_:_:_:_:))

Convolves a floating-point 32-bit planar image by separate horizontal and vertical separable kernels.

[`vImageSepConvolve_Planar8to16U`](/documentation/Accelerate/vImageSepConvolve_Planar8to16U(_:_:_:_:_:_:_:_:_:_:_:_:_:))

Convolves an 8-bit planar image by separate horizontal and vertical separable kernels, and writes the result to an unsigned 16-bit planar destination.

[`vImageSepConvolve_ARGB8888`](/documentation/Accelerate/vImageSepConvolve_ARGB8888(_:_:_:_:_:_:_:_:_:_:_:_:))

Convolves an 8-bit-per-channel, 4-channel interleaved image by separate horizontal and vertical separable kernels.

### Convolving without bias

[`vImageConvolve_Planar8`](/documentation/Accelerate/vImageConvolve_Planar8(_:_:_:_:_:_:_:_:_:_:_:))

Convolves an 8-bit planar image by a 2D kernel and divides the pixel values by a divisor.

[`vImageConvolve_Planar16F`](/documentation/Accelerate/vImageConvolve_Planar16F(_:_:_:_:_:_:_:_:_:_:))

Convolves a floating-point 16-bit planar image by a 2D kernel.

[`vImageConvolve_PlanarF`](/documentation/Accelerate/vImageConvolve_PlanarF(_:_:_:_:_:_:_:_:_:_:))

Convolves a floating-point 32-bit planar image by a 2D kernel.

[`vImageConvolve_ARGB8888`](/documentation/Accelerate/vImageConvolve_ARGB8888(_:_:_:_:_:_:_:_:_:_:_:))

Convolves an 8-bit-per-channel, 4-channel interleaved image by a 2D kernel and divides the pixel values by a divisor.

[`vImageConvolve_ARGB16F`](/documentation/Accelerate/vImageConvolve_ARGB16F(_:_:_:_:_:_:_:_:_:_:))

Convolves a floating-point 16-bit-per-channel, 4-channel interleaved image by a 2D kernel, then divides the pixel values by a divisor.

[`vImageConvolve_ARGBFFFF`](/documentation/Accelerate/vImageConvolve_ARGBFFFF(_:_:_:_:_:_:_:_:_:_:))

Convolves a floating-point 32-bit-per-channel, 4-channel interleaved image by a 2D kernel, then divides the pixel values by a divisor.

### Convolving with bias

[`vImageConvolveWithBias_Planar8`](/documentation/Accelerate/vImageConvolveWithBias_Planar8(_:_:_:_:_:_:_:_:_:_:_:_:))

Convolves an 8-bit planar image by a 2D kernel and adds a bias.

[`vImageConvolveWithBias_Planar16F`](/documentation/Accelerate/vImageConvolveWithBias_Planar16F(_:_:_:_:_:_:_:_:_:_:_:))

Convolves a floating-point 16-bit planar image by a 2D kernel and adds a bias.

[`vImageConvolveWithBias_PlanarF`](/documentation/Accelerate/vImageConvolveWithBias_PlanarF(_:_:_:_:_:_:_:_:_:_:_:))

Convolves a floating-point 32-bit planar image by a 2D kernel and adds a bias.

[`vImageConvolveWithBias_ARGB8888`](/documentation/Accelerate/vImageConvolveWithBias_ARGB8888(_:_:_:_:_:_:_:_:_:_:_:_:))

Convolves an 8-bit-per-channel, 4-channel interleaved image by a 2D kernel and adds a bias.

[`vImageConvolveWithBias_ARGB16F`](/documentation/Accelerate/vImageConvolveWithBias_ARGB16F(_:_:_:_:_:_:_:_:_:_:_:))

Convolves a floating-point 16-bit-per-channel, 4-channel interleaved image by a 2D kernel and adds a bias.

[`vImageConvolveWithBias_ARGBFFFF`](/documentation/Accelerate/vImageConvolveWithBias_ARGBFFFF(_:_:_:_:_:_:_:_:_:_:_:))

Convolves a floating-point 32-bit-per-channel, 4-channel interleaved image by a 2D kernel and adds a bias.

### Convolving with multiple kernels

[`vImageConvolveMultiKernel_ARGB8888`](/documentation/Accelerate/vImageConvolveMultiKernel_ARGB8888(_:_:_:_:_:_:_:_:_:_:_:_:))

Convolves each channel of an 8-bit-per-channel, 4-channel interleaved image by one of the four 2D kernels.

[`vImageConvolveMultiKernel_ARGBFFFF`](/documentation/Accelerate/vImageConvolveMultiKernel_ARGBFFFF(_:_:_:_:_:_:_:_:_:_:_:))

Convolves each channel of a floating-point 32-bit-per-channel, 4-channel interleaved image by one of the four 2D kernels.

### Convolving with high-speed box and tent filters

[`vImageBoxConvolve_Planar8`](/documentation/Accelerate/vImageBoxConvolve_Planar8(_:_:_:_:_:_:_:_:_:))

Applies a box filter to an 8-bit planar source image.

[`vImageBoxConvolve_ARGB8888`](/documentation/Accelerate/vImageBoxConvolve_ARGB8888(_:_:_:_:_:_:_:_:_:))

Applies a box filter to an 8-bit-per-channel, 4-channel interleaved source image.

[`vImageTentConvolve_Planar8`](/documentation/Accelerate/vImageTentConvolve_Planar8(_:_:_:_:_:_:_:_:_:))

Applies a tent filter to an 8-bit planar source image.

[`vImageTentConvolve_ARGB8888`](/documentation/Accelerate/vImageTentConvolve_ARGB8888(_:_:_:_:_:_:_:_:_:))

Applies a tent filter to an 8-bit-per-channel, 4-channel interleaved source image.

### Deconvolving

[`vImageRichardsonLucyDeConvolve_Planar8`](/documentation/Accelerate/vImageRichardsonLucyDeConvolve_Planar8(_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:))

Deconvolves an 8-bit planar image.

[`vImageRichardsonLucyDeConvolve_PlanarF`](/documentation/Accelerate/vImageRichardsonLucyDeConvolve_PlanarF(_:_:_:_:_:_:_:_:_:_:_:_:_:_:))

Deconvolves a floating-point 32-bit planar image.

[`vImageRichardsonLucyDeConvolve_ARGB8888`](/documentation/Accelerate/vImageRichardsonLucyDeConvolve_ARGB8888(_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:))

Deconvolves an 8-bit-per-channel, 4-channel interleaved image.

[`vImageRichardsonLucyDeConvolve_ARGBFFFF`](/documentation/Accelerate/vImageRichardsonLucyDeConvolve_ARGBFFFF(_:_:_:_:_:_:_:_:_:_:_:_:_:_:))

Deconvolves a floating-point 32-bit-per-channel, 4-channel interleaved image.

### Getting the minimum buffer size

Use the [`kvImageGetTempBufferSize`](/documentation/Accelerate/kvImageGetTempBufferSize)

A flag that returns the minimum temporary buffer size for the operation, given the parameters provided. flag with the appropriate convolution function.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)