Contents

init(isContrastAndVibrancyEnhancementEnabled:pixelBufferProcessor:)

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

Declaration

@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.