<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "visionOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "VisionKit",
  "identifier" : "/documentation/VisionKit/CameraRegionView/init(isContrastAndVibrancyEnhancementEnabled:pixelBufferProcessor:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "VisionKit"
    ],
    "preciseIdentifier" : "s:9VisionKit16CameraRegionViewV39isContrastAndVibrancyEnhancementEnabled20pixelBufferProcessorACSb_9CoreVideo015CVReadOnlyPixelM0CSgs6ResultOyAC0sM17ProcessingContextVs5Error_pGYacSgtcfc"
  },
  "title" : "init(isContrastAndVibrancyEnhancementEnabled:pixelBufferProcessor:)"
}
-->

# init(isContrastAndVibrancyEnhancementEnabled:pixelBufferProcessor:)

Creates a view that renders a spatial camera region and optionally applies contrast enhancement.

```
@MainActor @preconcurrency init(isContrastAndVibrancyEnhancementEnabled: Bool = false, pixelBufferProcessor: (@Sendable (Result<CameraRegionView.PixelBufferProcessingContext, any Error>) async -> CVReadOnlyPixelBuffer?)? = nil)
```

## Parameters

`isContrastAndVibrancyEnhancementEnabled`

Enabling this value improves the
overall visual richness and contrast of the frames.

`pixelBufferProcessor`

Provides CVReadOnlyPixelBuffer for any additional
modifications that may need to be applied to the pixel buffer before
rendering the pixel buffer on the view. Any modification requires the
creation of a new CVReadOnlyPixelBuffer. Be mindful of the high
computational cost since it would impact the frame rate. Returning `nil`
will ignore the received frame.

---

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)