MatOfDMatch.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. //
  2. // MatOfDMatch.h
  3. //
  4. // Created by Giles Payne on 2019/12/27.
  5. //
  6. #pragma once
  7. #import "Mat.h"
  8. @class DMatch;
  9. NS_ASSUME_NONNULL_BEGIN
  10. /**
  11. * Mat representation of an array of DMatch objects
  12. */
  13. CV_EXPORTS @interface MatOfDMatch : Mat
  14. #pragma mark - Constructors
  15. #ifdef __cplusplus
  16. - (instancetype)initWithNativeMat:(cv::Mat*)nativeMat;
  17. #endif
  18. /**
  19. * Create MatOfDMatch from Mat object
  20. * @param mat Mat object from which to create MatOfDMatch
  21. */
  22. - (instancetype)initWithMat:(Mat*)mat;
  23. /**
  24. * Create MatOfDMatch from array
  25. * @param array Array from which to create MatOfDMatch
  26. */
  27. - (instancetype)initWithArray:(NSArray<DMatch*>*)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<DMatch*>*)array;
  39. /**
  40. * Output Mat elements as an array of DMatch objects
  41. */
  42. - (NSArray<DMatch*>*)toArray;
  43. /**
  44. * Total number of values in Mat
  45. */
  46. - (int)length;
  47. @end
  48. NS_ASSUME_NONNULL_END