Structure

MPSImageHistogramInfo

The information used to compute the histogram channels of an image.

Declaration

struct MPSImageHistogramInfo

Topics

Instance Properties

var histogramForAlpha: ObjCBool

Specifies whether the histogram for the alpha channel should be computed or not.

var maxPixelValue: vector_float4

Specifies the maximum pixel value. Any pixel value greater than this will be clipped to this value (for the purposes of histogram calculation), and assigned to the first histogram entry. This maximum value is applied to each of the four channels separately.

var minPixelValue: vector_float4

Specifies the minimum pixel value. Any pixel value less than this will be clipped to this value (for the purposes of histogram calculation), and assigned to the first histogram entry. This minimum value is applied to each of the four channels separately.

var numberOfHistogramEntries: Int

Specifies the number of histogram entries (bins) for each channel.

See Also

Methods

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

Encodes the filter to a command buffer using a compute command encoder.

func histogramSize(forSourceFormat: MTLPixelFormat) -> Int

The amount of space the histogram will take up in the output buffer.