MatOfKeyPoint.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. //
  2. // MatOfKeyPoint.h
  3. //
  4. // Created by Giles Payne on 2019/12/27.
  5. //
  6. #pragma once
  7. #import "Mat.h"
  8. @class KeyPoint;
  9. NS_ASSUME_NONNULL_BEGIN
  10. /**
  11. * Mat representation of an array of KeyPoint objects
  12. */
  13. CV_EXPORTS @interface MatOfKeyPoint : Mat
  14. #pragma mark - Constructors
  15. #ifdef __cplusplus
  16. - (instancetype)initWithNativeMat:(cv::Mat*)nativeMat;
  17. #endif
  18. /**
  19. * Create MatOfKeyPoint from Mat object
  20. * @param mat Mat object from which to create MatOfKeyPoint
  21. */
  22. - (instancetype)initWithMat:(Mat*)mat;
  23. /**
  24. * Create MatOfKeyPoint from array
  25. * @param array Array from which to create MatOfKeyPoint
  26. */
  27. - (instancetype)initWithArray:(NSArray<KeyPoint*>*)array;
  28. #pragma mark - Methods
  29. /**
  30. * Allocate specified number of elements
  31. * @param elemNumber Number of elements
  32. */
  33. - (void)alloc:(int)elemNumber;
  34. /**
  35. * Populate Mat with elements of an array
  36. * @param array Array with which to populate the Mat
  37. */
  38. - (void)fromArray:(NSArray<KeyPoint*>*)array;
  39. /**
  40. * Output Mat elements as an array of KeyPoint objects
  41. */
  42. - (NSArray<KeyPoint*>*)toArray;
  43. /**
  44. * Total number of values in Mat
  45. */
  46. - (int)length;
  47. @end
  48. NS_ASSUME_NONNULL_END