---
title: "init(device:centerWeight:)"
framework: metalperformanceshaders
role: symbol
role_heading: Initializer
path: "metalperformanceshaders/mpsimagepyramid/init(device:centerweight:)"
---

# init(device:centerWeight:)

Initialize a downwards 5-tap image pyramid with a central weight parameter and device.

## Declaration

```swift
convenience init(device: any MTLDevice, centerWeight: Float)
```

## Parameters

- `device`: The device the filter will run on.
- `centerWeight`: Defines the form of the filter kernel through the outer product ww^T, where w = [(1/4 - a/2), 1/4, a, 1/4, (1/4 - a/2)]^T and a is the value of centerWeight.

## Return Value

Return Value A valid MPSImagePyramid object or nil, if failure.

## See Also

### Methods

- [init(device:)](metalperformanceshaders/mpsimagepyramid/init(device:).md)
- [init(device:kernelWidth:kernelHeight:weights:)](metalperformanceshaders/mpsimagepyramid/init(device:kernelwidth:kernelheight:weights:).md)
