Moments.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. //
  2. // Moments.h
  3. //
  4. // Created by Giles Payne on 2019/10/06.
  5. //
  6. #pragma once
  7. #ifdef __cplusplus
  8. #import "opencv2/core.hpp"
  9. #else
  10. #define CV_EXPORTS
  11. #endif
  12. #import <Foundation/Foundation.h>
  13. NS_ASSUME_NONNULL_BEGIN
  14. CV_EXPORTS @interface Moments : NSObject
  15. @property double m00;
  16. @property double m10;
  17. @property double m01;
  18. @property double m20;
  19. @property double m11;
  20. @property double m02;
  21. @property double m30;
  22. @property double m21;
  23. @property double m12;
  24. @property double m03;
  25. @property double mu20;
  26. @property double mu11;
  27. @property double mu02;
  28. @property double mu30;
  29. @property double mu21;
  30. @property double mu12;
  31. @property double mu03;
  32. @property double nu20;
  33. @property double nu11;
  34. @property double nu02;
  35. @property double nu30;
  36. @property double nu21;
  37. @property double nu12;
  38. @property double nu03;
  39. #ifdef __cplusplus
  40. @property(readonly) cv::Moments& nativeRef;
  41. #endif
  42. -(instancetype)initWithM00:(double)m00 m10:(double)m10 m01:(double)m01 m20:(double)m20 m11:(double)m11 m02:(double)m02 m30:(double)m30 m21:(double)m21 m12:(double)m12 m03:(double)m03;
  43. -(instancetype)init;
  44. -(instancetype)initWithVals:(NSArray<NSNumber*>*)vals;
  45. #ifdef __cplusplus
  46. +(instancetype)fromNative:(cv::Moments&)moments;
  47. #endif
  48. -(void)set:(NSArray<NSNumber*>*)vals;
  49. -(void)completeState;
  50. -(NSString *)description;
  51. @end
  52. NS_ASSUME_NONNULL_END