Tracker.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. //
  2. // This file is auto-generated. Please don't modify it!
  3. //
  4. #pragma once
  5. #ifdef __cplusplus
  6. //#import "opencv.hpp"
  7. #import "opencv2/video.hpp"
  8. #import "opencv2/video/tracking.hpp"
  9. #else
  10. #define CV_EXPORTS
  11. #endif
  12. #import <Foundation/Foundation.h>
  13. @class Mat;
  14. @class Rect2i;
  15. NS_ASSUME_NONNULL_BEGIN
  16. // C++: class Tracker
  17. /**
  18. * Base abstract class for the long-term tracker
  19. *
  20. * Member of `Video`
  21. */
  22. CV_EXPORTS @interface Tracker : NSObject
  23. #ifdef __cplusplus
  24. @property(readonly)cv::Ptr<cv::Tracker> nativePtr;
  25. #endif
  26. #ifdef __cplusplus
  27. - (instancetype)initWithNativePtr:(cv::Ptr<cv::Tracker>)nativePtr;
  28. + (instancetype)fromNative:(cv::Ptr<cv::Tracker>)nativePtr;
  29. #endif
  30. #pragma mark - Methods
  31. //
  32. // void cv::Tracker::init(Mat image, Rect boundingBox)
  33. //
  34. /**
  35. * Initialize the tracker with a known bounding box that surrounded the target
  36. * @param image The initial frame
  37. * @param boundingBox The initial bounding box
  38. */
  39. - (void)init:(Mat*)image boundingBox:(Rect2i*)boundingBox NS_SWIFT_NAME(init(image:boundingBox:));
  40. //
  41. // bool cv::Tracker::update(Mat image, Rect& boundingBox)
  42. //
  43. /**
  44. * Update the tracker, find the new most likely bounding box for the target
  45. * @param image The current frame
  46. * @param boundingBox The bounding box that represent the new target location, if true was returned, not
  47. * modified otherwise
  48. *
  49. * @return True means that target was located and false means that tracker cannot locate target in
  50. * current frame. Note, that latter *does not* imply that tracker has failed, maybe target is indeed
  51. * missing from the frame (say, out of sight)
  52. */
  53. - (BOOL)update:(Mat*)image boundingBox:(Rect2i*)boundingBox NS_SWIFT_NAME(update(image:boundingBox:));
  54. @end
  55. NS_ASSUME_NONNULL_END