FIRVisionCloudLandmarkDetector.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #import <Foundation/Foundation.h>
  2. @class FIRVisionCloudLandmark;
  3. @class FIRVisionImage;
  4. NS_ASSUME_NONNULL_BEGIN
  5. /**
  6. * A block containing an array of landmark or `nil` if there's an error.
  7. *
  8. * @param landmarks Array of landmark detected in the image or `nil` if there was an error.
  9. * @param error The error or `nil`.
  10. */
  11. typedef void (^FIRVisionCloudLandmarkDetectionCompletion)(
  12. NSArray<FIRVisionCloudLandmark *> *_Nullable landmarks, NSError *_Nullable error)
  13. NS_SWIFT_NAME(VisionCloudLandmarkDetectionCompletion);
  14. /**
  15. * A landmark detector that detects landmark in an image.
  16. */
  17. NS_SWIFT_NAME(VisionCloudLandmarkDetector)
  18. @interface FIRVisionCloudLandmarkDetector : NSObject
  19. /**
  20. * Unavailable. Use `Vision` factory methods.
  21. */
  22. - (instancetype)init NS_UNAVAILABLE;
  23. /**
  24. * Detects landmark in a given image.
  25. *
  26. * @param image The image to use for detecting landmark.
  27. * @param completion Handler to call back on the main queue with landmark detected or error.
  28. */
  29. - (void)detectInImage:(FIRVisionImage *)image
  30. completion:(FIRVisionCloudLandmarkDetectionCompletion)completion;
  31. @end
  32. NS_ASSUME_NONNULL_END