Tracking Object in a Video

This section describes the SDK objects which you use to detect and recognize objects.

The most important SDK object in this category is the object tracker. The object tracker allows you to detect and recognize objects of different types, get information about them and it takes care of tracking their location and identity over time.

ObjectTrackerConfiguration

An ObjectTrackerConfiguration object stores the configuration information for an object tracker, the object detector and the face recognizer. The configuration object is initialized with default values that allow the tracker to detect and recognize faces. You may also instantiate a configuration object based on one of a number of predefined configuration presets. A preset encapsulates all the configuration information needed to use the object tracker for a specific type of task (e.g. to recognize faces or to recognize and learn faces).

After you have instantiated a configuration object you should set the cloud account, cloud environment, and the face recognizer directory name. This is the minimum required information that you need to provide to allow the object tracker to successfully detect and recognize faces.

Main functionality switches:

bool ObjectTrackerConfiguration.Detector.Face.Enabled // Detect faces
bool ObjectTrackerConfiguration.Detector.Face.LivenessEnabled // Detect RGB liveness
bool ObjectTrackerConfiguration.Detector.Badge.Enabled // Detect badges
bool ObjectTrackerConfiguration.Detector.RecognizedObject.Enabled // Detect persons
bool ObjectTrackerConfiguration.Recognizer.DetectIdentity // Recognize person identity
bool ObjectTrackerConfiguration.Recognizer.DetectOcclusion // Detect occlusion
bool ObjectTrackerConfiguration.Recognizer.DetectMask // Detect mask
bool ObjectTrackerConfiguration.Recognizer.DetectGender // Detect gender
bool ObjectTrackerConfiguration.Recognizer.DetectAge // Detect age
bool ObjectTrackerConfiguration.Recognizer.DetectSentiment // Detect sentiment
bool ObjectTrackerConfiguration.Recognizer.DetectLiveness // Detect 3D Liveness (when using Intel RealSense camera)

ObjectTracker

The ObjectTracker is the heart of ArgusKit. It receives a stream of video frames which it analysis to find objects. It tracks found objects as long as they remain visible in the video stream. Object detection, recognition, and the tracking are executed in real time. An object tracker is connected to a delegate which is defined by a set of C# event handlers which you set on the object tracker after you have instantiated it and before you call beginTracking() on it. The ObjectTracker informs its event handlers for every frame about the current state of the objects which it is tracking. The event handlers may then use the tracked object APIs to learn what kind of objects the tracker found and what their current spatial location, size, and state is.

TrackingResult

A TrackingResult object contains a snapshot of the current state of the object tracker. The object tracker delivers a new tracking result at every frame boundary. The tracking result contains a list of tracked objects that have appeared in the current frame, that have disappeared and a list of tracked objects that have changed their current state in the current frame. For example, if a tracked object has been detected in a previous frame and the object tracker has now been able to recognize the tracked object as a specific identity, then the tracked object is included in the list of updated tracked objects.

TrackedObject

A TrackedObject represents a single and unique instance of an object that the object tracker has been able to detect in the input video stream and which it is actively tracking. A tracked object has a type that indicates whether it is a badge or the face of a person. A tracked object also has an axis-aligned bounding box which tells you where in the input video frame the tracked object can be found and what its size is.

Once a tracked object has been recognized as a specific person it includes additional information about that person. At a minimum it includes a unique person ID. But it may include additional information like the person's name if a name was previously assigned to that person ID. You use the applyChange() API on the object tracker to assign a name to a recognized person.

Main TrackedObject properties:

DetectedObjectType TrackedObject.ObjectType // Badge / Face / RecognizedObject
string TrackedObject.Person.PersonId // Recognized person ID
string TrackedObject.Person.Name // Recognized person name
double? TrackedObject.Person.Sentiment // sentiment: -1 to 1
double? TrackedObject.Person.Occlusion // occlusion: 0 to 1
double? TrackedObject.Person.CenterPoseQuality // center pose quality: 0 to 1
double? TrackedObject.Person.SharpnessQuality // sharpness quality: 0 to 1
double? TrackedObject.Person.ContrastQuality // contrast quality: 0 to 1
Gender TrackedObject.Person.Gender // Male / Female / Unknown
Age? TrackedObject.Person.Age
PersonIdClass? TrackedObject.Person.IdClass // Unknown / Unidentified / Stranger / NoConcern / Concern / Threat
double? TrackedObject.Person.SimilarityScore // similarity score: 0 to 1
double? TrackedObject.Person.Liveness // liveness score
bool? TrackedObject.Person.LivenessConfirmed // liveness detected
bool? TrackedObject.Person.Mask // mask detected
double? TrackedObject.Person.MaskConfidence // mask detection confidence

TrackedBadge

A TrackedBadge is a tracked object which encodes an integer number in the form of a special pattern.

TrackedFace

A TrackedFace represents the face of a person. If the object tracker is able to recognize the face as belonging to a specific person then the tracked face provides a reference to the corresponding person object. The person object holds information about that person such as the unique person ID.

Person

A Person object provides information about a person that has been registered with the ArgusKit face recognition service. Each person has a unique identifier, called a person ID. You may assign a name and a set of tags to a person with the help of a TrackedFaceChange object and the object tracker applyChange() object tracker function.

TrackedFaceChange

A person change object stores attributes that should be applied to the person record on file in the ArgusKit face recognition service. This object allows you to change a person's name, tags, age, or gender information.

VideoFrame

A VideoFrame object encapsulates a single decoded video frame which should be passed to an object tracker instance.

See Also