Class cv::detail::tracking::tbm::ITrackerByMatching#

Tracker-by-Matching algorithm interface. View details

Collaboration diagram for cv::detail::tracking::tbm::ITrackerByMatching:

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#

typedef std::shared_ptr< IImageDescriptor > cv::detail::tracking::tbm::ITrackerByMatching::Descriptor

Distance#

typedef std::shared_ptr< IDescriptorDistance > cv::detail::tracking::tbm::ITrackerByMatching::Distance

Constructor & Destructor Documentation#

~ITrackerByMatching()#

cv::detail::tracking::tbm::ITrackerByMatching::~ITrackerByMatching()

Destructor for the tracker.

Member Function Documentation#

count()#

size_t cv::detail::tracking::tbm::ITrackerByMatching::count()

Returns number of counted people.

Returns

a number of counted people.

descriptorFast()#

const Descriptor & cv::detail::tracking::tbm::ITrackerByMatching::descriptorFast()

Fast descriptor getter.

Returns

Fast descriptor used in pipeline.

descriptorStrong()#

const Descriptor & cv::detail::tracking::tbm::ITrackerByMatching::descriptorStrong()

Strong descriptor getter.

Returns

Strong descriptor used in pipeline.

distanceFast()#

const Distance & cv::detail::tracking::tbm::ITrackerByMatching::distanceFast()

Fast distance getter.

Returns

Fast distance used in pipeline.

distanceStrong()#

const Distance & cv::detail::tracking::tbm::ITrackerByMatching::distanceStrong()

Strong distance getter.

Returns

Strong distance used in pipeline.

drawActiveTracks()#

cv::Mat cv::detail::tracking::tbm::ITrackerByMatching::drawActiveTracks(const cv::Mat & frame)

Draws active tracks on a given frame.

Parameters

  • frame — Colored image (CV_8UC3).

Returns

Colored image with drawn active tracks.

dropForgottenTrack()#

void cv::detail::tracking::tbm::ITrackerByMatching::dropForgottenTrack(size_t track_id)

dropForgottenTrack Check that the track was lost too many frames ago and removes it frm memory.

dropForgottenTracks()#

void cv::detail::tracking::tbm::ITrackerByMatching::dropForgottenTracks()

dropForgottenTracks Removes tracks from memory that were lost too many frames ago.

getActiveTracks()#

std::unordered_map< size_t, std::vector< cv::Point > > cv::detail::tracking::tbm::ITrackerByMatching::getActiveTracks()

Get active tracks to draw.

Returns

Active tracks.

isTrackForgotten()#

bool cv::detail::tracking::tbm::ITrackerByMatching::isTrackForgotten(size_t id)

isTrackForgotten returns true if track is forgotten.

Parameters

Returns

true if track is forgotten.

isTrackValid()#

bool cv::detail::tracking::tbm::ITrackerByMatching::isTrackValid(size_t track_id)

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()#

const TrackerParams & cv::detail::tracking::tbm::ITrackerByMatching::params()

Pipeline parameters getter.

Returns

Parameters of pipeline.

process()#

void cv::detail::tracking::tbm::ITrackerByMatching::process(
const cv::Mat & frame,
const TrackedObjects & detections,
uint64_t timestamp )

Process given frame.

Parameters

  • frame — Colored image (CV_8UC3).

  • detections — Detected objects on the frame.

  • timestamp — Timestamp must be positive and measured in milliseconds

setDescriptorFast()#

void cv::detail::tracking::tbm::ITrackerByMatching::setDescriptorFast(const Descriptor & val)

Fast descriptor setter.

Parameters

  • val — Fast descriptor used in pipeline.

setDescriptorStrong()#

void cv::detail::tracking::tbm::ITrackerByMatching::setDescriptorStrong(const Descriptor & val)

Strong descriptor setter.

Parameters

  • val — Strong descriptor used in pipeline.

setDistanceFast()#

void cv::detail::tracking::tbm::ITrackerByMatching::setDistanceFast(const Distance & val)

Fast distance setter.

Parameters

  • val — Fast distance used in pipeline.

setDistanceStrong()#

void cv::detail::tracking::tbm::ITrackerByMatching::setDistanceStrong(const Distance & val)

Strong distance setter.

Parameters

  • val — Strong distance used in pipeline.

setParams()#

void cv::detail::tracking::tbm::ITrackerByMatching::setParams(const TrackerParams & params)

Pipeline parameters setter.

Parameters

  • params — Parameters of pipeline.

trackedDetections()#

TrackedObjects cv::detail::tracking::tbm::ITrackerByMatching::trackedDetections()

Get tracked detections.

Returns

Tracked detections.

tracks()#

const std::unordered_map< size_t, Track > & cv::detail::tracking::tbm::ITrackerByMatching::tracks()

tracks Returns all tracks including forgotten (lost too many frames ago).

Returns

Set of tracks {id, track}.

Source file#

The documentation for this class was generated from the following file: