From 7e53fdc1b38d3c2ebc080b2da5032b8754a8af7a Mon Sep 17 00:00:00 2001 From: Prianka Liz Kariat Date: Thu, 4 May 2023 01:01:25 +0530 Subject: [PATCH] Updated documentation --- .../sources/MPPImageClassifierOptions.h | 17 +++++++++++++++ .../sources/MPPObjectDetectorOptions.h | 21 +++++++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/mediapipe/tasks/ios/vision/image_classifier/sources/MPPImageClassifierOptions.h b/mediapipe/tasks/ios/vision/image_classifier/sources/MPPImageClassifierOptions.h index b943dd30d..bbddd24eb 100644 --- a/mediapipe/tasks/ios/vision/image_classifier/sources/MPPImageClassifierOptions.h +++ b/mediapipe/tasks/ios/vision/image_classifier/sources/MPPImageClassifierOptions.h @@ -32,7 +32,24 @@ NS_ASSUME_NONNULL_BEGIN */ NS_SWIFT_NAME(ImageClassifierDelegate) @protocol MPPImageClassifierDelegate + @optional +/** + * This method notifies a delegate that the results of asynchronous classification of + * an image submitted to the `MPPImageClassifier` is available. + * + * This method is called on a private serial queue created by the `MPPImageClassifier` + * for performing the asynchronous delegates calls. + * + * @param imageClassifier The image classifier which performed the classification. + * This is useful to test equality when there are multiple instances of `MPPImageClassifier`. + * @param result An `MPPImageClassifierResult` object that contains a list of image classifications. + * @param timestampInMilliseconds The timestamp (in milliseconds) which indicates when the input + * image was sent to the image classifier. + * @param error An optional error parameter populated when there is an error in performing image + * classification on the input live stream image data. + * + */ - (void)imageClassifier:(MPPImageClassifier *)imageClassifier didFinishClassificationWithResult:(nullable MPPImageClassifierResult *)result timestampInMilliseconds:(NSInteger)timestampInMilliseconds diff --git a/mediapipe/tasks/ios/vision/object_detector/sources/MPPObjectDetectorOptions.h b/mediapipe/tasks/ios/vision/object_detector/sources/MPPObjectDetectorOptions.h index 6d5eeda4e..35eb1e91a 100644 --- a/mediapipe/tasks/ios/vision/object_detector/sources/MPPObjectDetectorOptions.h +++ b/mediapipe/tasks/ios/vision/object_detector/sources/MPPObjectDetectorOptions.h @@ -30,8 +30,29 @@ NS_ASSUME_NONNULL_BEGIN * The delegate of `MPPImageClassifier` must adopt `MPPImageClassifierDelegate` protocol. * The methods in this protocol are optional. */ +NS_SWIFT_NAME(ObjectDetectorDelegate) @protocol MPPObjectDetectorDelegate + @optional + +/** + * This method notifies a delegate that the results of asynchronous object detection of + * an image submitted to the `MPPObjectDetector` is available. + * + * This method is called on a private serial dispatch queue created by the `MPPObjectDetector` + * for performing the asynchronous delegates calls. + * + * @param objectDetector The object detector which performed the object detection. + * This is useful to test equality when there are multiple instances of `MPPObjectDetector`. + * @param result The `MPPObjectDetectionResult` object that contains a list of detections, each detection + * has a bounding box that is expressed in the unrotated input frame of reference coordinates + * system, i.e. in `[0,image_width) x [0,image_height)`, which are the dimensions of the underlying + * image data. + * @param timestampInMilliseconds The timestamp (in milliseconds) which indicates when the input + * image was sent to the object detector. + * @param error An optional error parameter populated when there is an error in performing object detection on the input live stream image data. + * + */ - (void)objectDetector:(MPPObjectDetector *)objectDetector didFinishDetectionWithResult:(nullable MPPObjectDetectionResult *)result timestampInMilliseconds:(NSInteger)timestampInMilliseconds