---
title: "convolve(with:divisors:biases:edgeMode:destination:)"
framework: accelerate
role: symbol
role_heading: Instance Method
path: "accelerate/vimage/pixelbuffer/convolve(with:divisors:biases:edgemode:destination:)"
---

# convolve(with:divisors:biases:edgeMode:destination:)

Convolves an 8-bit-per-channel, 4-channel interleaved pixel buffer with separate kernels for each channel.

## Declaration

```swift
func convolve(with kernels: (vImage.ConvolutionKernel2D<Int16>, vImage.ConvolutionKernel2D<Int16>, vImage.ConvolutionKernel2D<Int16>, vImage.ConvolutionKernel2D<Int16>), divisors: (Int32, Int32, Int32, Int32)?, biases: (Int32, Int32, Int32, Int32) = (0, 0, 0, 0), edgeMode: vImage.EdgeMode<Pixel_8888>, destination: vImage.PixelBuffer<Format>)
```

## Parameters

- `kernels`: The convolution kernels.
- `divisors`: An optional tuple of four values that the operation adds to the sum of weighted pixels before it applies the divisor.
- `biases`: A tuple of four values that the operation adds to the sum of weighted pixels before it applies the divisor.
- `edgeMode`: The convolution edge mode.
- `destination`: The destination pixel buffer.

## See Also

### Related Documentation

- [Blurring an image](accelerate/blurring-an-image.md)

### General convolution

- [convolve(with:divisor:bias:edgeMode:destination:)](accelerate/vimage/pixelbuffer/convolve(with:divisor:bias:edgemode:destination:)-4o5w6.md)
- [convolve(with:bias:edgeMode:useFloat16Accumulator:destination:)](accelerate/vimage/pixelbuffer/convolve(with:bias:edgemode:usefloat16accumulator:destination:)-1xkvu.md)
- [convolve(with:bias:edgeMode:destination:)](accelerate/vimage/pixelbuffer/convolve(with:bias:edgemode:destination:)-tn07.md)
- [convolve(with:divisor:bias:edgeMode:destination:)](accelerate/vimage/pixelbuffer/convolve(with:divisor:bias:edgemode:destination:)-1oul9.md)
- [convolve(with:bias:edgeMode:useFloat16Accumulator:destination:)](accelerate/vimage/pixelbuffer/convolve(with:bias:edgemode:usefloat16accumulator:destination:)-81lqa.md)
- [convolve(with:bias:edgeMode:destination:)](accelerate/vimage/pixelbuffer/convolve(with:bias:edgemode:destination:)-8syhw.md)
- [convolve(with:divisor:bias:edgeMode:destination:)](accelerate/vimage/pixelbuffer/convolve(with:divisor:bias:edgemode:destination:)-4jjbx.md)
- [convolve(with:bias:edgeMode:destination:)](accelerate/vimage/pixelbuffer/convolve(with:bias:edgemode:destination:)-3219s.md)
- [vImage.EdgeMode](accelerate/vimage/edgemode.md)
- [vImage.ConvolutionKernel2D](accelerate/vimage/convolutionkernel2d.md)
