Contents

init(cmSampleBuffer:depthData:orientation:options:)

Creates a request handler that performs requests on an image in a sample buffer that contains depth data.

Declaration

init(cmSampleBuffer sampleBuffer: CMSampleBuffer, depthData: AVDepthData, orientation: CGImagePropertyOrientation, options: [VNImageOption : Any] = [:])

Parameters

  • sampleBuffer:

    The sample buffer that contains the image to analyze. If the sample buffer doesn’t contain an image buffer with image data, the system raises an error.

  • depthData:

    The depth data to associate with the image.

  • orientation:

    The EXIF orientation of the image.

  • options:

    A dictionary that specifies auxiliary information about the image.

Discussion

Sample buffers may contain metadata, like the camera intrinsics. Vision algorithms that support this metadata use it in their analysis, unless overwritten by the options you specify.

See Also

Creating a Request Handler