Class ObjectTracker
Defined in File ObjectTracker.hpp
Inheritance Relationships
Base Type
public dai::NodeCRTP< Node, ObjectTracker, ObjectTrackerProperties >(Template Class NodeCRTP)
Class Documentation
-
class ObjectTracker : public dai::NodeCRTP<Node, ObjectTracker, ObjectTrackerProperties>
ObjectTracker node. Performs object tracking using Kalman filter and hungarian algorithm.
Public Functions
-
void setTrackerThreshold(float threshold)
Specify tracker threshold.
- Parameters:
threshold – Above this threshold the detected objects will be tracked. Default 0, all image detections are tracked.
-
void setMaxObjectsToTrack(std::int32_t maxObjectsToTrack)
Specify maximum number of object to track.
- Parameters:
maxObjectsToTrack – Maximum number of object to track. Maximum 60 in case of SHORT_TERM_KCF, otherwise 1000.
-
void setDetectionLabelsToTrack(std::vector<std::uint32_t> labels)
Specify detection labels to track.
- Parameters:
labels – Detection labels to track. Default every label is tracked from image detection network output.
-
void setTrackerType(TrackerType type)
Specify tracker type algorithm.
- Parameters:
type – Tracker type.
-
void setTrackerIdAssignmentPolicy(TrackerIdAssignmentPolicy type)
Specify tracker ID assignment policy.
- Parameters:
type – Tracker ID assignment policy.
-
void setTrackingPerClass(bool trackingPerClass)
Whether tracker should take into consideration class label for tracking.
Public Members
-
Input inputTrackerFrame = {*this, "inputTrackerFrame", Input::Type::SReceiver, false, 4, true, {{DatatypeEnum::ImgFrame, false}}}
Input ImgFrame message on which tracking will be performed. RGBp, BGRp, NV12, YUV420p types are supported. Default queue is non-blocking with size 4.
-
Input inputDetectionFrame = {*this, "inputDetectionFrame", Input::Type::SReceiver, false, 4, true, {{DatatypeEnum::ImgFrame, false}}}
Input ImgFrame message on which object detection was performed. Default queue is non-blocking with size 4.
-
Input inputDetections = {*this, "inputDetections", Input::Type::SReceiver, false, 4, true, {{DatatypeEnum::ImgDetections, true}}}
Input message with image detection from neural network. Default queue is non-blocking with size 4.
-
Output out = {*this, "out", Output::Type::MSender, {{DatatypeEnum::Tracklets, false}}}
Outputs Tracklets message that carries object tracking results.
-
Output passthroughTrackerFrame = {*this, "passthroughTrackerFrame", Output::Type::MSender, {{DatatypeEnum::ImgFrame, false}}}
Passthrough ImgFrame message on which tracking was performed. Suitable for when input queue is set to non-blocking behavior.
-
Output passthroughDetectionFrame = {*this, "passthroughDetectionFrame", Output::Type::MSender, {{DatatypeEnum::ImgFrame, false}}}
Passthrough ImgFrame message on which object detection was performed. Suitable for when input queue is set to non-blocking behavior.
-
Output passthroughDetections = {*this, "passthroughDetections", Output::Type::MSender, {{DatatypeEnum::ImgDetections, true}}}
Passthrough image detections message from neural network output. Suitable for when input queue is set to non-blocking behavior.
Public Static Attributes
-
static constexpr const char *NAME = "ObjectTracker"
-
void setTrackerThreshold(float threshold)