cv2ext.tracking.cv_trackers package¶
Module contents¶
Contains the wrapped OpenCV trackers.
Classes¶
BoostingTrackerA class for tracking objects in videos using the Boosting tracker.
CSRTTrackerA class for tracking objects in videos using the CSRT tracker.
KCFTrackerA class for tracking objects in videos using the KCF tracker.
MedianFlowTrackerA class for tracking objects in videos using the MedianFlow tracker.
MILTrackerA class for tracking objects in videos using the MIL tracker.
MOSSETrackerA class for tracking objects in videos using the MOSSE tracker.
TLDTrackerA class for tracking objects in videos using the TLD tracker.
- class cv2ext.tracking.cv_trackers.BoostingTracker[source]¶
Bases:
CVTrackerInterfaceA class for tracking objects in videos using the Boosting tracker.
- init(image: np.ndarray, bbox: tuple[int, int, int, int]) None[source]¶
Initialize the tracker with an image and bounding box.
- update(image: np.ndarray) tuple[bool, tuple[int, int, int, int]][source]¶
Update the tracker with a new image.
- Parameters:
image (np.ndarray) – The new image to use for tracking.
- Returns:
bool – Whether the update was successful.
tuple[int, int, int, int] – The bounding box of the tracked object. Bounding box is format (x, y, x, y), where (x, y) is the top-left/bottom-right corner of the box.
- Raises:
ValueError – If the image is not 3-channel.
- class cv2ext.tracking.cv_trackers.CSRTTracker[source]¶
Bases:
CVTrackerInterfaceA class for tracking objects in videos using the CSRT tracker.
- init(image: np.ndarray, bbox: tuple[int, int, int, int]) None[source]¶
Initialize the tracker with an image and bounding box.
- update(image: np.ndarray) tuple[bool, tuple[int, int, int, int]][source]¶
Update the tracker with a new image.
- Parameters:
image (np.ndarray) – The new image to use for tracking.
- Returns:
bool – Whether the update was successful.
tuple[int, int, int, int] – The bounding box of the tracked object. Bounding box is format (x, y, x, y), where (x, y) is the top-left/bottom-right corner of the box.
- class cv2ext.tracking.cv_trackers.KCFTracker[source]¶
Bases:
CVTrackerInterfaceA class for tracking objects in videos using the KCF tracker.
- init(image: np.ndarray, bbox: tuple[int, int, int, int]) None[source]¶
Initialize the tracker with an image and bounding box.
- update(image: np.ndarray) tuple[bool, tuple[int, int, int, int]][source]¶
Update the tracker with a new image.
- Parameters:
image (np.ndarray) – The new image to use for tracking.
- Returns:
bool – Whether the update was successful.
tuple[int, int, int, int] – The bounding box of the tracked object. Bounding box is format (x, y, x, y), where (x, y) is the top-left/bottom-right corner of the box.
- Raises:
ValueError – If the image is not 3-channel.
- class cv2ext.tracking.cv_trackers.MILTracker[source]¶
Bases:
CVTrackerInterfaceA class for tracking objects in videos using the MIL tracker.
- init(image: np.ndarray, bbox: tuple[int, int, int, int]) None[source]¶
Initialize the tracker with an image and bounding box.
- update(image: np.ndarray) tuple[bool, tuple[int, int, int, int]][source]¶
Update the tracker with a new image.
- Parameters:
image (np.ndarray) – The new image to use for tracking.
- Returns:
bool – Whether the update was successful.
tuple[int, int, int, int] – The bounding box of the tracked object. Bounding box is format (x, y, x, y), where (x, y) is the top-left/bottom-right corner of the box.
- class cv2ext.tracking.cv_trackers.MOSSETracker[source]¶
Bases:
CVTrackerInterfaceA class for tracking objects in videos using the MOSSE tracker.
- init(image: np.ndarray, bbox: tuple[int, int, int, int]) None[source]¶
Initialize the tracker with an image and bounding box.
- update(image: np.ndarray) tuple[bool, tuple[int, int, int, int]][source]¶
Update the tracker with a new image.
- Parameters:
image (np.ndarray) – The new image to use for tracking.
- Returns:
bool – Whether the update was successful.
tuple[int, int, int, int] – The bounding box of the tracked object. Bounding box is format (x, y, x, y), where (x, y) is the top-left/bottom-right corner of the box.
- class cv2ext.tracking.cv_trackers.MedianFlowTracker[source]¶
Bases:
CVTrackerInterfaceA class for tracking objects in videos using the MedianFlow tracker.
- init(image: np.ndarray, bbox: tuple[int, int, int, int]) None[source]¶
Initialize the tracker with an image and bounding box.
- update(image: np.ndarray) tuple[bool, tuple[int, int, int, int]][source]¶
Update the tracker with a new image.
- Parameters:
image (np.ndarray) – The new image to use for tracking.
- Returns:
bool – Whether the update was successful.
tuple[int, int, int, int] – The bounding box of the tracked object. Bounding box is format (x, y, x, y), where (x, y) is the top-left/bottom-right corner of the box.
- class cv2ext.tracking.cv_trackers.TLDTracker[source]¶
Bases:
CVTrackerInterfaceA class for tracking objects in videos using the TLD tracker.
- init(image: np.ndarray, bbox: tuple[int, int, int, int]) None[source]¶
Initialize the tracker with an image and bounding box.
- update(image: np.ndarray) tuple[bool, tuple[int, int, int, int]][source]¶
Update the tracker with a new image.
- Parameters:
image (np.ndarray) – The new image to use for tracking.
- Returns:
bool – Whether the update was successful.
tuple[int, int, int, int] – The bounding box of the tracked object. Bounding box is format (x, y, x, y), where (x, y) is the top-left/bottom-right corner of the box.