init(cmSampleBuffer:options:)
Creates a request handler that performs requests on an image contained within a sample buffer.
Declaration
init(cmSampleBuffer sampleBuffer: CMSampleBuffer, 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.
- 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
init(cgImage:options:)init(cgImage:orientation:options:)init(ciImage:options:)init(ciImage:orientation:options:)init(cvPixelBuffer:options:)init(cvPixelBuffer:orientation:options:)init(cvPixelBuffer:depthData:orientation:options:)init(cmSampleBuffer:orientation:options:)init(cmSampleBuffer:depthData:orientation:options:)init(data:options:)init(data:orientation:options:)init(url:options:)init(url:orientation:options:)