FirebaseMLVision Framework Reference

Type Definitions

The following type definitions are available globally.

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

    Declaration

    Swift

    typealiasVisionBarcodeDetectionCallback=([FIRVisionBarcode]?,Error?)->Void

    Parameters

    barcodes

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

    error

    The error ornil.

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

    Declaration

    Swift

    typealiasVisionCloudLandmarkDetectionCompletion=([FIRVisionCloudLandmark]?,Error?)->Void

    Parameters

    landmarks

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

    error

    The error ornil.

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

    Declaration

    Swift

    typealiasVisionDocumentTextRecognitionCallback=(FIRVisionDocumentText?,Error?)->Void

    Parameters

    text

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

    error

    The error ornil.

  • Facial contour types.

    Declaration

    Swift

    structFaceContourType:_ObjectiveCBridgeable,Hashable,Equatable,_SwiftNewtypeWrapper,RawRepresentable
  • A block containing an array of faces ornil if there’s an error.

    Declaration

    Swift

    typealiasVisionFaceDetectionCallback=([FIRVisionFace]?,Error?)->Void

    Parameters

    faces

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

    error

    The error ornil.

  • Type of all facial landmarks.

    Declaration

    Swift

    structFaceLandmarkType:_ObjectiveCBridgeable,Hashable,Equatable,_SwiftNewtypeWrapper,RawRepresentable
  • A block containing an array of labels ornil if there’s an error.

    Declaration

    Swift

    typealiasVisionImageLabelerCallback=([FIRVisionImageLabel]?,Error?)->Void

    Parameters

    labels

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

    error

    The error ornil.

  • The callback to invoke when the text recognition completes.

    Declaration

    Swift

    typealiasVisionTextRecognitionCallback=(FIRVisionText?,Error?)->Void

    Parameters

    text

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

    error

    The error ornil.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2021-02-11 UTC.