<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.13.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MetalPerformanceShaders",
  "identifier" : "/documentation/MetalPerformanceShaders/MPSImageThresholdBinaryInverse/init(device:thresholdValue:maximumValue:linearGrayColorTransform:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Metal Performance Shaders"
    ],
    "preciseIdentifier" : "c:objc(cs)MPSImageThresholdBinaryInverse(im)initWithDevice:thresholdValue:maximumValue:linearGrayColorTransform:"
  },
  "title" : "init(device:thresholdValue:maximumValue:linearGrayColorTransform:)"
}
-->

# init(device:thresholdValue:maximumValue:linearGrayColorTransform:)

Initializes the kernel.

```
init(device: any MTLDevice, thresholdValue: Float, maximumValue: Float, linearGrayColorTransform transform: UnsafePointer<Float>?)
```

## Parameters

`device`

The Metal device the filter will run on.

`thresholdValue`

The threshold value to use.

`maximumValue`

The maximum value to use.

`transform`

The color transform to use. This matrix is an array of 3 floats that defaults to the *BT.601/JPEG* standard: `{0.299f, 0.587f, 0.114f}`

## Return Value

An initialized kernel object.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)