Contents

init(cmSampleBuffer:orientation:options:)

Creates a request handler that performs requests on an image of a specified orientation contained within a sample buffer.

Declaration

init(cmSampleBuffer sampleBuffer: CMSampleBuffer, 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.

  • 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