Face SDK  1.7 Mozart rc
Face Recognition Software Development Kit
Public Member Functions | List of all members
face_sdk::tracker Class Referenceabstract

Tracker object tracks persons in the video stream and collects faces of the same person in one track. More...

#include <face_sdk_tracker.h>

Public Member Functions

virtual std::shared_ptr< face_sdk::video_streammake_stream (uint32_t track_id)=0
 The function makes a video stream. More...
 
virtual void free_stream (const std::shared_ptr< face_sdk::video_stream > &stream)=0
 The function releases stream from tracker object. More...
 
virtual void commit_frames ()=0
 The function processes all pushed frames. All events will be raised. More...
 
virtual uint32_t version () const =0
 Algorithm version. See Face Tracker versions.
 

Detailed Description

Tracker object tracks persons in the video stream and collects faces of the same person in one track.

Use face_sdk::make_tracker() functions to instantiate an object of this type.

Warning
This module uses face detector module (see Face Detector), so make sure that your license allows to use face detector. See Licensing.

Usage scenario:

  1. Call one of face_sdk::make_tracker() function to get a face_sdk::tracker instance. You have to pass own face_sdk::itracker_events implementation to be able to handle events from a tracker object.
  2. Call face_sdk::tracker::make_stream(uint32_t) and get a face_sdk::video_stream object for each video to be processed
  3. Decode video and push any number of frames into face_sdk::video_stream. Call face_sdk::video_stream::push_frame(const std::shared_ptr<face_sdk::video_frame> &)
  4. Call face_sdk::tracker::commit_frames() - all pushed frames will be processed in batch. All events will be raised. repeat steps 3 and 4 until a video is ended
  5. Call face_sdk::tracker::free_stream() for each ended video stream

Member Function Documentation

◆ commit_frames()

virtual void face_sdk::tracker::commit_frames ( )
pure virtual

The function processes all pushed frames. All events will be raised.

Exceptions
face_sdk::exceptionSee Exceptions handling.

◆ free_stream()

virtual void face_sdk::tracker::free_stream ( const std::shared_ptr< face_sdk::video_stream > &  stream)
pure virtual

The function releases stream from tracker object.

Parameters
[in]streamStream to be released.
Exceptions
face_sdk::invalid_parameter_exceptionIf stream isn't made by tracker object or if stream is nullptr

◆ make_stream()

virtual std::shared_ptr<face_sdk::video_stream> face_sdk::tracker::make_stream ( uint32_t  track_id)
pure virtual

The function makes a video stream.

Parameters
[in]track_idUse face_sdk::video_stream::id() to get track_id. Tracker object can't have two streams with the same ids at the same time.
Exceptions
face_sdk::invalid_parameter_exceptionIf tracker object has a stream with the same track_id

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