---
title: "init(device:histogramInfo:)"
framework: metalperformanceshaders
role: symbol
role_heading: Initializer
path: "metalperformanceshaders/mpsimagehistogramequalization/init(device:histograminfo:)"
---

# init(device:histogramInfo:)

Initializes a histogram with specific information.

## Declaration

```swift
init(device: any MTLDevice, histogramInfo: UnsafePointer<MPSImageHistogramInfo>)
```

## Parameters

- `device`: The Metal device the filter will run on.
- `histogramInfo`: A pointer to a structure describing the histogram content.

## Return Value

Return Value An initialized histogram object.

## See Also

### Methods

- [encodeTransform(to:sourceTexture:histogram:histogramOffset:)](metalperformanceshaders/mpsimagehistogramequalization/encodetransform(to:sourcetexture:histogram:histogramoffset:).md)
