SAFR Windows SDK
All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Properties Events
RealNetworks.ArgusKit.ObjectTracker Class Reference

More...

Inheritance diagram for RealNetworks.ArgusKit.ObjectTracker:

Classes

class  DetectionConfirmationInfo
 
struct  FrameInfo
 
struct  MatchResult
 

Public Member Functions

 ObjectTracker (ObjectTrackerConfiguration configuration, bool realtime=true)
 
void Dispose ()
 
void Dispose (bool fromIDisposable)
 
void ClearTrackingErrors ()
 Clears the tracking error log More...
 
void BeginTracking ()
 Tells the face tracker that a new tracking session should start. E.g. that you want to track faces in a different video file. The face tracker is reset and prepared for the new tracking session. More...
 
void EndTracking ()
 Tells the face tracker that the current tracking session should be ended. The tracker will inform its delegate once all outstanding asynchronous operations which are related to the current tracking session have completed. More...
 
void TrackObjects (VideoFrame frame)
 Tells the face tracker that it should track the objects in the given video frame. More...
 
void ResetTracking ()
 Resets the face tracker state. More...
 
void ApplyChange (TrackedFaceChange change, string personId)
 Updates one or more properties of the tracked object with the specified person id. More...
 
void ApplyChange (TrackedFaceChange change, Int64 localId)
 Updates one or more properties of the tracked object with the specified local id. More...
 
void ResumeTracking (int reason)
 Informs the object tracker that it should resume tracking faces. More...
 

Static Public Attributes

const int SUSPENSION_REASON_NETWORKUNAVAILABLE = 1
 
const int SUSPENSION_REASON_DETECTORSERVICEUNAVAILABLE = 2
 
const int SUSPENSION_REASON_RECOGNIZERSERVICEUNAVAILABLE = 4
 
const int SUSPENSION_REASON_DETECTORSERVICENOTAUTHORIZED = 8
 
const int SUSPENSION_REASON_RECOGNIZERSERVICENOTAUTHORIZED = 16
 
const int SUSPENSION_REASON_RECOGNIZERSERVICESSLERROR = 32
 
const int SUSPENSION_REASON_SIGNATUREINCOMPATIBLE = 64
 
const int SUSPENSION_REASON_OUTOFMEMORY = 128
 

Properties

ObjectTrackerConfiguration Configuration [get, set]
 The configuration More...
 
ObjectTrackerStatistics Statistics [get]
 The current tracker statistics. More...
 
MultipleObjectDetector Detector [get]
 Returns the object detector More...
 
FaceRecognizer Recognizer [get]
 Returns the face recognizer More...
 
List< ITrackingExceptionTrackingErrors [get]
 Returns a snapshot of the tracking error log More...
 
int SuspensionReason [get]
 Returns the object tracker suspension reason. Call this method while the tracker is suspended to find out what the cause of the suspension is. More...
 

Events

EventHandler< EventArgs > WillBeginTracking
 Called at the beginning of a tracking session. E.g. when we start tracking faces in a video. More...
 
EventHandler< EventArgs > DidEndTracking
 Called at the end of a tracking session. E.g. the video is done and all still outstanding recognition attempts have completed. More...
 
EventHandler< ObjectTrackerDidTrackEventArgsDidTrack
 Called on every frame in a video in which the state of a face has changed. More...
 
EventHandler< ObjectTrackerDidSuspendWithErrorEventArgsDidSuspendWithError
 Called if the face tracker has detected an error that prevents it from continuing. Tracking is suspended until the face tracker is able to continue again. E.g. a temporary loss of network connectivity. More...
 
EventHandler< EventArgs > DidResume
 Called when the face tracker has detected that the error state has gone away and it is able to resume tracking. More...
 

Detailed Description

Tracks faces in a video stream. You use a face tracker instance like this:

beginTracking()trackObjects()trackObjects()endTracking()

The beginning and the end of the video stream is marked by calling beginTracking() and endTracking() respectively. BeginTracking() resets the face tracker and prepares it for the new video stream. EndTracking() guarantees that it will call the delegate once the video stream has ended and all outstanding asynchronous operations related to the video stream have completed.

Call trackObjects() for every video frame in the video stream. This will update the face tracker and enables it to correctly track faces.

You may call resetTracking() at any time. This will reset the face tracker to a pristine state. E.g. you should call resetTracking() after a seek in the video stream.

Constructor & Destructor Documentation

◆ ObjectTracker()

RealNetworks.ArgusKit.ObjectTracker.ObjectTracker ( ObjectTrackerConfiguration  configuration,
bool  realtime = true 
)

Creates an object tracker instance. An object tracker may operate in real time or non-real time mode.

In real time mode the tracker will never block the caller of trackObjects(). Instead the tracker will internally drop frames if it is busy processing previous frames when trackObjects() is called with a new frame.

In non-real time mode the tracker will never drop frames. Instead it will block the caller of the trackObjects() method if it is internally busy and until enough internal resources have become available to process the new frame.

You should use real time mode if the input frames are delivered by a video camera or a movie file and you do not care about processing every single frame because you want to keep the processing latency as low as possible.

Use non-real time mode if you want to process a video file and you want to guarantee that every single video frame in the file is considered for object detection and recognition.

Parameters
configurationthe object tracker configuration
realtimetrue if real time mode; false if non-real time mode is desired

Member Function Documentation

◆ ApplyChange() [1/2]

void RealNetworks.ArgusKit.ObjectTracker.ApplyChange ( TrackedFaceChange  change,
Int64  localId 
)

Updates one or more properties of the tracked object with the specified local id.

Parameters
changethe change that should be applied
localIdthe local ID of the tracked object to which the change should be applied

◆ ApplyChange() [2/2]

void RealNetworks.ArgusKit.ObjectTracker.ApplyChange ( TrackedFaceChange  change,
string  personId 
)

Updates one or more properties of the tracked object with the specified person id.

Parameters
changethe change that should be applied
personIdthe person ID of the tracked person to which the change should be applied

◆ BeginTracking()

void RealNetworks.ArgusKit.ObjectTracker.BeginTracking ( )

Tells the face tracker that a new tracking session should start. E.g. that you want to track faces in a different video file. The face tracker is reset and prepared for the new tracking session.

◆ ClearTrackingErrors()

void RealNetworks.ArgusKit.ObjectTracker.ClearTrackingErrors ( )

Clears the tracking error log

◆ Dispose() [1/2]

void RealNetworks.ArgusKit.ObjectTracker.Dispose ( )

◆ Dispose() [2/2]

void RealNetworks.ArgusKit.ObjectTracker.Dispose ( bool  fromIDisposable)

◆ EndTracking()

void RealNetworks.ArgusKit.ObjectTracker.EndTracking ( )

Tells the face tracker that the current tracking session should be ended. The tracker will inform its delegate once all outstanding asynchronous operations which are related to the current tracking session have completed.

◆ ResetTracking()

void RealNetworks.ArgusKit.ObjectTracker.ResetTracking ( )

Resets the face tracker state.

◆ ResumeTracking()

void RealNetworks.ArgusKit.ObjectTracker.ResumeTracking ( int  reason)

Informs the object tracker that it should resume tracking faces.

Parameters
reason

◆ TrackObjects()

void RealNetworks.ArgusKit.ObjectTracker.TrackObjects ( VideoFrame  frame)

Tells the face tracker that it should track the objects in the given video frame.

Parameters
frameframe the video frame

Member Data Documentation

◆ SUSPENSION_REASON_DETECTORSERVICENOTAUTHORIZED

const int RealNetworks.ArgusKit.ObjectTracker.SUSPENSION_REASON_DETECTORSERVICENOTAUTHORIZED = 8
static

◆ SUSPENSION_REASON_DETECTORSERVICEUNAVAILABLE

const int RealNetworks.ArgusKit.ObjectTracker.SUSPENSION_REASON_DETECTORSERVICEUNAVAILABLE = 2
static

◆ SUSPENSION_REASON_NETWORKUNAVAILABLE

const int RealNetworks.ArgusKit.ObjectTracker.SUSPENSION_REASON_NETWORKUNAVAILABLE = 1
static

◆ SUSPENSION_REASON_OUTOFMEMORY

const int RealNetworks.ArgusKit.ObjectTracker.SUSPENSION_REASON_OUTOFMEMORY = 128
static

◆ SUSPENSION_REASON_RECOGNIZERSERVICENOTAUTHORIZED

const int RealNetworks.ArgusKit.ObjectTracker.SUSPENSION_REASON_RECOGNIZERSERVICENOTAUTHORIZED = 16
static

◆ SUSPENSION_REASON_RECOGNIZERSERVICESSLERROR

const int RealNetworks.ArgusKit.ObjectTracker.SUSPENSION_REASON_RECOGNIZERSERVICESSLERROR = 32
static

◆ SUSPENSION_REASON_RECOGNIZERSERVICEUNAVAILABLE

const int RealNetworks.ArgusKit.ObjectTracker.SUSPENSION_REASON_RECOGNIZERSERVICEUNAVAILABLE = 4
static

◆ SUSPENSION_REASON_SIGNATUREINCOMPATIBLE

const int RealNetworks.ArgusKit.ObjectTracker.SUSPENSION_REASON_SIGNATUREINCOMPATIBLE = 64
static

Property Documentation

◆ Configuration

ObjectTrackerConfiguration RealNetworks.ArgusKit.ObjectTracker.Configuration
getset

The configuration

◆ Detector

MultipleObjectDetector RealNetworks.ArgusKit.ObjectTracker.Detector
get

Returns the object detector

◆ Recognizer

FaceRecognizer RealNetworks.ArgusKit.ObjectTracker.Recognizer
get

Returns the face recognizer

◆ Statistics

ObjectTrackerStatistics RealNetworks.ArgusKit.ObjectTracker.Statistics
get

The current tracker statistics.

◆ SuspensionReason

int RealNetworks.ArgusKit.ObjectTracker.SuspensionReason
get

Returns the object tracker suspension reason. Call this method while the tracker is suspended to find out what the cause of the suspension is.

◆ TrackingErrors

List<ITrackingException> RealNetworks.ArgusKit.ObjectTracker.TrackingErrors
get

Returns a snapshot of the tracking error log

Event Documentation

◆ DidEndTracking

EventHandler<EventArgs> RealNetworks.ArgusKit.ObjectTracker.DidEndTracking

Called at the end of a tracking session. E.g. the video is done and all still outstanding recognition attempts have completed.

◆ DidResume

EventHandler<EventArgs> RealNetworks.ArgusKit.ObjectTracker.DidResume

Called when the face tracker has detected that the error state has gone away and it is able to resume tracking.

◆ DidSuspendWithError

EventHandler<ObjectTrackerDidSuspendWithErrorEventArgs> RealNetworks.ArgusKit.ObjectTracker.DidSuspendWithError

Called if the face tracker has detected an error that prevents it from continuing. Tracking is suspended until the face tracker is able to continue again. E.g. a temporary loss of network connectivity.

◆ DidTrack

EventHandler<ObjectTrackerDidTrackEventArgs> RealNetworks.ArgusKit.ObjectTracker.DidTrack

Called on every frame in a video in which the state of a face has changed.

◆ WillBeginTracking

EventHandler<EventArgs> RealNetworks.ArgusKit.ObjectTracker.WillBeginTracking

Called at the beginning of a tracking session. E.g. when we start tracking faces in a video.