FirebaseMLVision Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
Type Definitions
The following type definitions are available globally.
-
A block containing an array of barcodes or nil
if there’s an error.
Declaration
Swift
typealias VisionBarcodeDetectionCallback = ([FIRVisionBarcode]?, Error?) -> Void
Parameters
barcodes
|
Array of barcodes detected in the image or nil if there was an error.
|
error
|
|
-
A block containing an array of landmark or nil
if there’s an error.
Declaration
Swift
typealias VisionCloudLandmarkDetectionCompletion = ([FIRVisionCloudLandmark]?, Error?) -> Void
Parameters
landmarks
|
Array of landmark detected in the image or nil if there was an error.
|
error
|
|
-
The callback to invoke when the document text recognition completes.
Declaration
Swift
typealias VisionDocumentTextRecognitionCallback = (FIRVisionDocumentText?, Error?) -> Void
Parameters
text
|
Recognized document text in the image or nil if there was an error or no text was
detected.
|
error
|
|
-
Declaration
Swift
struct FaceContourType : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable
-
A block containing an array of faces or nil
if there’s an error.
Declaration
Swift
typealias VisionFaceDetectionCallback = ([FIRVisionFace]?, Error?) -> Void
Parameters
faces
|
Array of faces detected in the image or nil if there was an error.
|
error
|
|
-
Type of all facial landmarks.
Declaration
Swift
struct FaceLandmarkType : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable
-
A block containing an array of labels or nil
if there’s an error.
Declaration
Swift
typealias VisionImageLabelerCallback = ([FIRVisionImageLabel]?, Error?) -> Void
Parameters
labels
|
Array of labels detected in the image or nil if there was an error.
|
error
|
|
-
The callback to invoke when the text recognition completes.
Declaration
Swift
typealias VisionTextRecognitionCallback = (FIRVisionText?, Error?) -> Void
Parameters
text
|
Recognized text in the image or nil if there was an error or no text was detected.
|
error
|
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2021-02-11 UTC.
[null,null,["Last updated 2021-02-11 UTC."],[],[],null,["# FirebaseMLVision Framework Reference\n\nType Definitions\n================\n\nThe following type definitions are available globally.\n- `\n ``\n ``\n `\n\n ### [VisionBarcodeDetectionCallback](#/c:FIRVisionBarcodeDetector.h@T@FIRVisionBarcodeDetectionCallback)\n\n `\n ` \n A block containing an array of barcodes or `nil` if there's an error. \n\n #### Declaration\n\n Swift \n\n typealias VisionBarcodeDetectionCallback = ([FIRVisionBarcode]?, Error?) -\u003e Void\n\n #### Parameters\n\n |------------------|-------------------------------------------------------------------------|\n | ` `*barcodes*` ` | Array of barcodes detected in the image or `nil` if there was an error. |\n | ` `*error*` ` | The error or `nil`. |\n\n- `\n ``\n ``\n `\n\n ### [VisionCloudLandmarkDetectionCompletion](#/c:FIRVisionCloudLandmarkDetector.h@T@FIRVisionCloudLandmarkDetectionCompletion)\n\n `\n ` \n A block containing an array of landmark or `nil` if there's an error. \n\n #### Declaration\n\n Swift \n\n typealias VisionCloudLandmarkDetectionCompletion = ([FIRVisionCloudLandmark]?, Error?) -\u003e Void\n\n #### Parameters\n\n |-------------------|-------------------------------------------------------------------------|\n | ` `*landmarks*` ` | Array of landmark detected in the image or `nil` if there was an error. |\n | ` `*error*` ` | The error or `nil`. |\n\n- `\n ``\n ``\n `\n\n ### [VisionDocumentTextRecognitionCallback](#/c:FIRVisionDocumentTextRecognizer.h@T@FIRVisionDocumentTextRecognitionCallback)\n\n `\n ` \n The callback to invoke when the document text recognition completes. \n\n #### Declaration\n\n Swift \n\n typealias VisionDocumentTextRecognitionCallback = (FIRVisionDocumentText?, Error?) -\u003e Void\n\n #### Parameters\n\n |---------------|-----------------------------------------------------------------------------------------------|\n | ` `*text*` ` | Recognized document text in the image or `nil` if there was an error or no text was detected. |\n | ` `*error*` ` | The error or `nil`. |\n\n- `\n ``\n ``\n `\n\n ### [FaceContourType](#/c:FIRVisionFaceContour.h@T@FIRFaceContourType)\n\n `\n ` \n Facial contour types. \n\n #### Declaration\n\n Swift \n\n struct FaceContourType : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable\n\n- `\n ``\n ``\n `\n\n ### [VisionFaceDetectionCallback](#/c:FIRVisionFaceDetector.h@T@FIRVisionFaceDetectionCallback)\n\n `\n ` \n A block containing an array of faces or `nil` if there's an error. \n\n #### Declaration\n\n Swift \n\n typealias VisionFaceDetectionCallback = ([FIRVisionFace]?, Error?) -\u003e Void\n\n #### Parameters\n\n |---------------|----------------------------------------------------------------------|\n | ` `*faces*` ` | Array of faces detected in the image or `nil` if there was an error. |\n | ` `*error*` ` | The error or `nil`. |\n\n- `\n ``\n ``\n `\n\n ### [FaceLandmarkType](#/c:FIRVisionFaceLandmark.h@T@FIRFaceLandmarkType)\n\n `\n ` \n Type of all facial landmarks. \n\n #### Declaration\n\n Swift \n\n struct FaceLandmarkType : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable\n\n- `\n ``\n ``\n `\n\n ### [VisionImageLabelerCallback](#/c:FIRVisionImageLabeler.h@T@FIRVisionImageLabelerCallback)\n\n `\n ` \n A block containing an array of labels or `nil` if there's an error. \n\n #### Declaration\n\n Swift \n\n typealias VisionImageLabelerCallback = ([FIRVisionImageLabel]?, Error?) -\u003e Void\n\n #### Parameters\n\n |----------------|-----------------------------------------------------------------------|\n | ` `*labels*` ` | Array of labels detected in the image or `nil` if there was an error. |\n | ` `*error*` ` | The error or `nil`. |\n\n- `\n ``\n ``\n `\n\n ### [VisionTextRecognitionCallback](#/c:FIRVisionTextRecognizer.h@T@FIRVisionTextRecognitionCallback)\n\n `\n ` \n The callback to invoke when the text recognition completes. \n\n #### Declaration\n\n Swift \n\n typealias VisionTextRecognitionCallback = (FIRVisionText?, Error?) -\u003e Void\n\n #### Parameters\n\n |---------------|--------------------------------------------------------------------------------------|\n | ` `*text*` ` | Recognized text in the image or `nil` if there was an error or no text was detected. |\n | ` `*error*` ` | The error or `nil`. |"]]