FIRVisionImage


@interface FIRVisionImage : NSObject

An image or image buffer used in vision detection, with optional metadata.

  • Metadata about the image (e.g. image orientation). If metadata is not specified, the default metadata values are used.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic, nullable)
        FIRVisionImageMetadata *metadata;
  • Initializes a VisionImage object with the given image.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithImage:(id)image;

    Parameters

    image

    Image to use in vision detection. The given image should be rotated, so its imageOrientation property is set to UIImageOrientationUp value.

    Return Value

    A VisionImage instance with the given image.

  • 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.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithBuffer:(nonnull CMSampleBufferRef)sampleBuffer;

    Parameters

    sampleBuffer

    Image buffer to use in vision detection.

    Return Value

    A VisionImage instance with the given image buffer.

  • Unavailable.

    Declaration

    Objective-C

    - (nonnull instancetype)init;