---
title: "init(values:size:)"
framework: accelerate
role: symbol
role_heading: Initializer
path: "accelerate/vimage/convolutionkernel2d/init(values:size:)"
---

# init(values:size:)

Returns a new convolution kernel structure with the size you specify.

## Declaration

```swift
init(values: [ComponentType], size: vImage.Size)
```

## Parameters

- `values`: The kernel weights or structuring element values that must contain height * width elements.
- `size`: The size of the kernel. The width and height of the kernel that must be a positive, odd numbers.

## See Also

### Initializers

- [init(values:width:height:)](accelerate/vimage/convolutionkernel2d/init(values:width:height:).md)
