FirebaseMLVision Framework Reference

Type Definitions

The following type definitions are available globally.

  • A block containing an array of barcodes or nil if there’s an error.

    Declaration

    Objective-C

    typedef void (^FIRVisionBarcodeDetectionCallback)(
        NSArray<FIRVisionBarcode *> *_Nullable, NSError *_Nullable)

    Parameters

    barcodes

    Array of barcodes detected in the image or nil if there was an error.

    error

    The error or nil.

  • A block containing an array of landmark or nil if there’s an error.

    Declaration

    Objective-C

    typedef void (^FIRVisionCloudLandmarkDetectionCompletion)(
        NSArray<FIRVisionCloudLandmark *> *_Nullable, NSError *_Nullable)

    Parameters

    landmarks

    Array of landmark detected in the image or nil if there was an error.

    error

    The error or nil.

  • The callback to invoke when the document text recognition completes.

    Declaration

    Objective-C

    typedef void (^FIRVisionDocumentTextRecognitionCallback)(
        FIRVisionDocumentText *_Nullable, NSError *_Nullable)

    Parameters

    text

    Recognized document text in the image or nil if there was an error or no text was detected.

    error

    The error or nil.

  • Facial contour types.

    Declaration

    Objective-C

    typedef NSString *FIRFaceContourType
  • A block containing an array of faces or nil if there’s an error.

    Declaration

    Objective-C

    typedef void (^FIRVisionFaceDetectionCallback)(
        NSArray<FIRVisionFace *> *_Nullable, NSError *_Nullable)

    Parameters

    faces

    Array of faces detected in the image or nil if there was an error.

    error

    The error or nil.

  • Type of all facial landmarks.

    Declaration

    Objective-C

    typedef NSString *FIRFaceLandmarkType
  • A block containing an array of labels or nil if there’s an error.

    Declaration

    Objective-C

    typedef void (^FIRVisionImageLabelerCallback)(
        NSArray<FIRVisionImageLabel *> *_Nullable, NSError *_Nullable)

    Parameters

    labels

    Array of labels detected in the image or nil if there was an error.

    error

    The error or nil.

  • The callback to invoke when the text recognition completes.

    Declaration

    Objective-C

    typedef void (^FIRVisionTextRecognitionCallback)(FIRVisionText *_Nullable,
                                                     NSError *_Nullable)

    Parameters

    text

    Recognized text in the image or nil if there was an error or no text was detected.

    error

    The error or nil.