Image to use in vision detection. The given image should be rotated, so its
imageOrientation property is set to UIImageOrientationUp value. The UIImage must have
non-NULL CGImage property.
Initializes a VisionImage 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
a CMSampleBufferRef.
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 of CMSampleBufferRefs.
Return Value
A VisionImage 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."],[],[],null,["# FirebaseMLVision Framework Reference\n\nFIRVisionImage\n==============\n\n\n @interface FIRVisionImage : NSObject\n\nAn image or image buffer used in vision detection, with optional metadata.\n- `\n ``\n ``\n `\n\n ### [metadata](#/c:objc(cs)FIRVisionImage(py)metadata)\n\n `\n ` \n Metadata about the image (e.g. image orientation). If metadata is not specified, the default\n metadata values are used. \n\n #### Declaration\n\n Objective-C \n\n @property (nonatomic, nullable) ../Classes/FIRVisionImageMetadata.html *metadata;\n\n- `\n ``\n ``\n `\n\n ### [-initWithImage:](#/c:objc(cs)FIRVisionImage(im)initWithImage:)\n\n `\n ` \n Initializes a `VisionImage` object with the given image. \n\n #### Declaration\n\n Objective-C \n\n - (nonnull instancetype)initWithImage:(nonnull UIImage *)image;\n\n #### Parameters\n\n |---------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n | ` `*image*` ` | Image to use in vision detection. The given image should be rotated, so its `imageOrientation` property is set to `UIImageOrientationUp` value. The `UIImage` must have non-NULL `CGImage` property. |\n\n #### Return Value\n\n A `VisionImage` instance with the given image.\n- `\n ``\n ``\n `\n\n ### [-initWithBuffer:](#/c:objc(cs)FIRVisionImage(im)initWithBuffer:)\n\n `\n ` \n Initializes a `VisionImage` object with the given image buffer. To improve performance, it is\n recommended to minimize the lifespan and number of instances of this class when initializing with\n a `CMSampleBufferRef`. \n\n #### Declaration\n\n Objective-C \n\n - (nonnull instancetype)initWithBuffer:(nonnull CMSampleBufferRef)sampleBuffer;\n\n #### Parameters\n\n |----------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n | ` `*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 of `CMSampleBufferRef`s. |\n\n #### Return Value\n\n A `VisionImage` instance with the given image buffer.\n- `\n ``\n ``\n `\n\n ### [-init](#/c:objc(cs)FIRVisionImage(im)init)\n\n `\n ` \n Unavailable. \n\n #### Declaration\n\n Objective-C \n\n - (nonnull instancetype)init;"]]