Initializer

init(device:)

Initializes a Sobel filter on a given device using the default color transform.

Declaration

convenience init(device: MTLDevice)

Parameters

device

The Metal device the filter will run on.

Return Value

An initialized Sobel filter object.

Discussion

The default color transform matrix is an array of 3 floats set to the BT.601/JPEG standard: {0.299f, 0.587f, 0.114f}.

See Also

Methods

init(device: MTLDevice, linearGrayColorTransform: UnsafePointer<Float>)

Initializes a Sobel filter on a given device using a specific color transform.