Initializer

init(device:histogramInfo:)

Initializes a histogram with specific information.

Declaration

init(device: 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

An initialized histogram object.

See Also

Methods

func encodeTransform(to: MTLCommandBuffer, sourceTexture: MTLTexture, histogram: MTLBuffer, histogramOffset: Int)

Encodes the transform function to a command buffer using a compute command encoder. The transform function computes the equalization lookup table.