Tracker-by-Matching algorithm interface. More...
#include <opencv2/tracking/tracking_by_matching.hpp>
Public Types | |
using | Descriptor = std::shared_ptr< IImageDescriptor > |
using | Distance = std::shared_ptr< IDescriptorDistance > |
Public Member Functions | |
virtual | ~ITrackerByMatching () |
Destructor for the tracker. | |
virtual size_t | count () const =0 |
Returns number of counted people. | |
virtual const Descriptor & | descriptorFast () const =0 |
Fast descriptor getter. | |
virtual const Descriptor & | descriptorStrong () const =0 |
Strong descriptor getter. | |
virtual const Distance & | distanceFast () const =0 |
Fast distance getter. | |
virtual const Distance & | distanceStrong () const =0 |
Strong distance getter. | |
virtual cv::Mat | drawActiveTracks (const cv::Mat &frame)=0 |
Draws active tracks on a given frame. | |
virtual void | dropForgottenTrack (size_t track_id)=0 |
dropForgottenTrack Check that the track was lost too many frames ago and removes it frm memory. | |
virtual void | dropForgottenTracks ()=0 |
dropForgottenTracks Removes tracks from memory that were lost too many frames ago. | |
virtual std::unordered_map< size_t, std::vector< cv::Point > > | getActiveTracks () const =0 |
Get active tracks to draw. | |
virtual bool | isTrackForgotten (size_t id) const =0 |
isTrackForgotten returns true if track is forgotten. | |
virtual bool | isTrackValid (size_t track_id) const =0 |
isTrackValid Checks whether track is valid (duration > threshold). | |
virtual const TrackerParams & | params () const =0 |
Pipeline parameters getter. | |
virtual void | process (const cv::Mat &frame, const TrackedObjects &detections, uint64_t timestamp)=0 |
Process given frame. | |
virtual void | setDescriptorFast (const Descriptor &val)=0 |
Fast descriptor setter. | |
virtual void | setDescriptorStrong (const Descriptor &val)=0 |
Strong descriptor setter. | |
virtual void | setDistanceFast (const Distance &val)=0 |
Fast distance setter. | |
virtual void | setDistanceStrong (const Distance &val)=0 |
Strong distance setter. | |
virtual void | setParams (const TrackerParams ¶ms)=0 |
Pipeline parameters setter. | |
virtual TrackedObjects | trackedDetections () const =0 |
Get tracked detections. | |
virtual const std::unordered_map< size_t, Track > & | tracks () const =0 |
tracks Returns all tracks including forgotten (lost too many frames ago). | |
Detailed Description
Tracker-by-Matching algorithm interface.
This class is implementation of tracking-by-matching system. It uses two different appearance measures to compute affinity between bounding boxes: some fast descriptor and some strong descriptor. Each time the assignment problem is solved. The assignment problem in our case is how to establish correspondence between existing tracklets and recently detected objects. First step is to compute an affinity matrix between tracklets and detections. The affinity equals to appearance_affinity * motion_affinity * shape_affinity. Where appearance is 1 - distance(tracklet_fast_dscr, detection_fast_dscr). Second step is to solve the assignment problem using Kuhn-Munkres algorithm. If correspondence between some tracklet and detection is established with low confidence (affinity) then the strong descriptor is used to determine if there is correspondence between tracklet and detection.
Member Typedef Documentation
◆ Descriptor
using cv::detail::tracking::tbm::ITrackerByMatching::Descriptor = std::shared_ptr<IImageDescriptor> |
◆ Distance
using cv::detail::tracking::tbm::ITrackerByMatching::Distance = std::shared_ptr<IDescriptorDistance> |
Constructor & Destructor Documentation
◆ ~ITrackerByMatching()
|
inlinevirtual |
Destructor for the tracker.
Member Function Documentation
◆ count()
|
pure virtual |
Returns number of counted people.
- Returns
- a number of counted people.
◆ descriptorFast()
|
pure virtual |
Fast descriptor getter.
- Returns
- Fast descriptor used in pipeline.
◆ descriptorStrong()
|
pure virtual |
Strong descriptor getter.
- Returns
- Strong descriptor used in pipeline.
◆ distanceFast()
|
pure virtual |
Fast distance getter.
- Returns
- Fast distance used in pipeline.
◆ distanceStrong()
|
pure virtual |
Strong distance getter.
- Returns
- Strong distance used in pipeline.
◆ drawActiveTracks()
|
pure virtual |
Draws active tracks on a given frame.
- Parameters
-
[in] frame Colored image (CV_8UC3).
- Returns
- Colored image with drawn active tracks.
◆ dropForgottenTrack()
|
pure virtual |
dropForgottenTrack Check that the track was lost too many frames ago and removes it frm memory.
◆ dropForgottenTracks()
|
pure virtual |
dropForgottenTracks Removes tracks from memory that were lost too many frames ago.
◆ getActiveTracks()
|
pure virtual |
Get active tracks to draw.
- Returns
- Active tracks.
◆ isTrackForgotten()
|
pure virtual |
isTrackForgotten returns true if track is forgotten.
- Parameters
-
id Track ID.
- Returns
- true if track is forgotten.
◆ isTrackValid()
|
pure virtual |
isTrackValid Checks whether track is valid (duration > threshold).
- Parameters
-
track_id Index of checked track.
- Returns
- True if track duration exceeds some predefined value.
◆ params()
|
pure virtual |
Pipeline parameters getter.
- Returns
- Parameters of pipeline.
◆ process()
|
pure virtual |
Process given frame.
- Parameters
-
[in] frame Colored image (CV_8UC3). [in] detections Detected objects on the frame. [in] timestamp Timestamp must be positive and measured in milliseconds
◆ setDescriptorFast()
|
pure virtual |
Fast descriptor setter.
- Parameters
-
[in] val Fast descriptor used in pipeline.
◆ setDescriptorStrong()
|
pure virtual |
Strong descriptor setter.
- Parameters
-
[in] val Strong descriptor used in pipeline.
◆ setDistanceFast()
|
pure virtual |
Fast distance setter.
- Parameters
-
[in] val Fast distance used in pipeline.
◆ setDistanceStrong()
|
pure virtual |
Strong distance setter.
- Parameters
-
[in] val Strong distance used in pipeline.
◆ setParams()
|
pure virtual |
Pipeline parameters setter.
- Parameters
-
[in] params Parameters of pipeline.
◆ trackedDetections()
|
pure virtual |
Get tracked detections.
- Returns
- Tracked detections.
◆ tracks()
|
pure virtual |
tracks Returns all tracks including forgotten (lost too many frames ago).
- Returns
- Set of tracks {id, track}.
The documentation for this class was generated from the following file:
- opencv2/tracking/tracking_by_matching.hpp