@interface FIRVisionObjectDetector : NSObject
An object detector and tracker that detects objects in an image and supports tracking them.
- (nonnull instancetype)init;
Processes the given image for object detection and tracking. The detection is performed asynchronously and calls back the completion handler with the detected object results or error on the main thread.
- (void)processImage:(nonnull FIRVisionImage *)image completion:(nonnull FIRVisionObjectDetectionCallback)completion;
The vision image to use for detecting and tracking objects.
Handler to call back on the main thread with objects detected or error.
Returns detected objects in the given image or
nilif there was an error. The detection is performed synchronously on the calling thread.
It is advised to call this method off the main thread to avoid blocking the UI. As a result, an
NSExceptionis raised if this method is called on the main thread.
- (nullable NSArray<FIRVisionObject *> *) resultsInImage:(nonnull FIRVisionImage *)image error:(NSError *_Nullable *_Nullable)error;
The vision image to use for detecting objects.
An optional error parameter populated when there is an error during detection.
Array of objects detected in the given image or
nilif there was an error.