GMVDetector.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #import <AVFoundation/AVFoundation.h>
  2. #import "GMVFeature.h"
  3. NS_ASSUME_NONNULL_BEGIN
  4. /**
  5. * A GMVDetector object uses image processing to search for and identify notable features in a
  6. * still image or video. Detected features are represented by GMVFeature objects that provide more
  7. * information about each feature.
  8. */
  9. @interface GMVDetector : NSObject
  10. /**
  11. * Creates and returns a configured detector.
  12. * @param type Identifies which type of detector should be created.
  13. * @param options Configuration options for the detector.
  14. * @return The |type| detector. The detector maybe nil if initialization failed.
  15. */
  16. + (nullable GMVDetector *)detectorOfType:(NSString *)type options:(nullable NSDictionary *)options;
  17. /**
  18. * Searches for features in an image.
  19. * @param options Configuration options for runtime detection. Use the GMVDetectorImageOrientation
  20. * key to specify the image orientation.
  21. * @return The array of detected features, or nil if an error occurred.
  22. */
  23. - (nullable NSArray<__kindof GMVFeature *> *)featuresInImage:(UIImage *)image
  24. options:(nullable NSDictionary *)options;
  25. /**
  26. * Searches for features in an image buffer.
  27. * @param options Configuration options for runtime detection. Use the GMVDetectorImageOrientation
  28. * key to specify the image orientation.
  29. * @return The array of detected features, or nil if an error occurred.
  30. */
  31. - (nullable NSArray<__kindof GMVFeature *> *)featuresInBuffer:(CMSampleBufferRef)sampleBuffer
  32. options:(nullable NSDictionary *)options;
  33. @end
  34. NS_ASSUME_NONNULL_END