Initializes aVisionImage object with the given image.
Declaration
Swift
init(image:UIImage)
Parameters
image
Image to use in vision detection. The given image should be rotated, so itsimageOrientation property is set toUIImageOrientationUp value. TheUIImage must have non-NULLCGImage property.
Initializes aVisionImage object with the given image buffer. To improve performance, it is recommended to minimize the lifespan and number of instances of this class when initializing with aCMSampleBufferRef.
Declaration
Swift
init(buffersampleBuffer:CMSampleBuffer)
Parameters
sampleBuffer
Image buffer to use in vision detection. The buffer must be based on a pixel buffer (not compressed data), and the pixel format must be one of: -kCVPixelFormatType_32BGRA -kCVPixelFormatType_420YpCbCr8BiPlanarFullRange -kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange In practice: this works with the video output of the phone’s camera, but not other arbitrary sources ofCMSampleBufferRefs.
Return Value
AVisionImage instance with the given image buffer.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2021-02-11 UTC."],[],[]]