__init__.pyi 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. __all__: list[str] = []
  2. import cv2
  3. import cv2.typing
  4. import typing as _typing
  5. # Classes
  6. class Tracker(cv2.Algorithm):
  7. # Functions
  8. @_typing.overload
  9. def init(self, image: cv2.typing.MatLike, boundingBox: cv2.typing.Rect2d) -> bool: ...
  10. @_typing.overload
  11. def init(self, image: cv2.UMat, boundingBox: cv2.typing.Rect2d) -> bool: ...
  12. @_typing.overload
  13. def update(self, image: cv2.typing.MatLike) -> tuple[bool, cv2.typing.Rect2d]: ...
  14. @_typing.overload
  15. def update(self, image: cv2.UMat) -> tuple[bool, cv2.typing.Rect2d]: ...
  16. class TrackerMIL(Tracker):
  17. # Functions
  18. @classmethod
  19. def create(cls) -> TrackerMIL: ...
  20. class TrackerBoosting(Tracker):
  21. # Functions
  22. @classmethod
  23. def create(cls) -> TrackerBoosting: ...
  24. class TrackerMedianFlow(Tracker):
  25. # Functions
  26. @classmethod
  27. def create(cls) -> TrackerMedianFlow: ...
  28. class TrackerTLD(Tracker):
  29. # Functions
  30. @classmethod
  31. def create(cls) -> TrackerTLD: ...
  32. class TrackerKCF(Tracker):
  33. # Functions
  34. @classmethod
  35. def create(cls) -> TrackerKCF: ...
  36. class TrackerMOSSE(Tracker):
  37. # Functions
  38. @classmethod
  39. def create(cls) -> TrackerMOSSE: ...
  40. class MultiTracker(cv2.Algorithm):
  41. # Functions
  42. def __init__(self) -> None: ...
  43. @_typing.overload
  44. def add(self, newTracker: Tracker, image: cv2.typing.MatLike, boundingBox: cv2.typing.Rect2d) -> bool: ...
  45. @_typing.overload
  46. def add(self, newTracker: Tracker, image: cv2.UMat, boundingBox: cv2.typing.Rect2d) -> bool: ...
  47. @_typing.overload
  48. def update(self, image: cv2.typing.MatLike) -> tuple[bool, _typing.Sequence[cv2.typing.Rect2d]]: ...
  49. @_typing.overload
  50. def update(self, image: cv2.UMat) -> tuple[bool, _typing.Sequence[cv2.typing.Rect2d]]: ...
  51. def getObjects(self) -> _typing.Sequence[cv2.typing.Rect2d]: ...
  52. @classmethod
  53. def create(cls) -> MultiTracker: ...
  54. class TrackerCSRT(Tracker):
  55. # Functions
  56. @classmethod
  57. def create(cls) -> TrackerCSRT: ...
  58. @_typing.overload
  59. def setInitialMask(self, mask: cv2.typing.MatLike) -> None: ...
  60. @_typing.overload
  61. def setInitialMask(self, mask: cv2.UMat) -> None: ...
  62. # Functions
  63. def upgradeTrackingAPI(legacy_tracker: Tracker) -> Tracker: ...