3DiVi Face SDK  3.24.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Groups
VDT.FaceRecognition.SDK.VideoWorker Class Reference

VideoWorker is an interface object for tracking, processing and matching faces on multiple video streams. We recommend you to use VideoWorker instead of Capturer for face tracking on video streams. When VideoWorker is created with matching_thread=0 and processing_thread=0, then the standard Capturer license is used. More...

Classes

class  DatabaseElement
 Database element. If you have several face templates for one person, you should create one element for each template with the same person_id but different element_id. More...
 
class  MatchFoundCallbackData
 MatchFound callback data. More...
 
class  Params
 Parameters of the VideoWorker constructor. More...
 
class  SearchResult
 Template search result (for the VideoWorker.MatchFoundCallback). More...
 
class  StiPersonOutdatedCallbackData
 StiPersonOutdated callback data. More...
 
class  TemplateCreatedCallbackData
 TemplateCreated callback data. More...
 
class  TrackingCallbackData
 Tracking callback data. More...
 
class  TrackingLostCallbackData
 TrackingLost callback data. More...
 

Public Member Functions

delegate void TrackingCallback (int stream_id, int frame_id, RawSample[] samples, bool[] samples_weak, float[] samples_quality, Object userdata)
 Callback function type for a Tracking event. More...
 
delegate void TrackingCallbackU (TrackingCallbackData data, Object userdata)
 Callback function type for a Tracking event. This callback is called every time the frame has been processed by the tracker. Tracking callback will be called with frame_id = X not earlier than VideoWorker.addVideoFrame returns the value of X + N - 1, where N is the value returned by VideoWorker.getTrackingConveyorSize. More...
 
delegate void TemplateCreatedCallback (int stream_id, int frame_id, RawSample sample, float quality, Template templ, Object userdata)
 Callback function type for a TemplateCreated event. More...
 
delegate void TemplateCreatedCallbackU (TemplateCreatedCallbackData data, Object userdata)
 Callback function type for a TemplateCreated event. More...
 
delegate void MatchFoundCallback (int stream_id, int frame_id, ulong person_id, ulong element_id, RawSample sample, float quality, Template templ, Recognizer.MatchResult match_result, Object userdata)
 Callback function type for a MatchFound event. More...
 
delegate void MatchFoundCallbackExt (int stream_id, int frame_id, RawSample sample, float quality, Template templ, SearchResult[] search_result, Object userdata)
 Callback function type for a MatchFound event. More...
 
delegate void MatchFoundCallbackU (MatchFoundCallbackData data, Object userdata)
 Callback function type for a MatchFound event. More...
 
delegate void TrackingLostCallback (int stream_id, int first_frame_id, int last_frame_id, float best_quality, int best_quality_frame_id, RawSample best_quality_sample, Template best_quality_templ, Object userdata)
 Callback function type for a TrackingLost event (e.g. when a person leaves the frame). More...
 
delegate void TrackingLostCallbackU (TrackingLostCallbackData data, Object userdata)
 Callback function type for a TrackingLost event (e.g. when a person leaves the frame). More...
 
delegate void StiPersonOutdatedCallbackU (StiPersonOutdatedCallbackData data, Object userdata)
 Callback function type for an StiPersonOutdated event. More...
 
String getMethodName ()
 Get a method name of the recognizer used. Thread-safe. More...
 
int getStreamsCount ()
 Get a number of video streams. Thread-safe. More...
 
int getTrackingConveyorSize (int stream_id)
 Get a size N of tracking conveyor. Tracking callback will be called with frame_id = X not earlier than VideoWorker.addVideoFrame returns the value X + N - 1, where N is the value returned by VideoWorker.getTrackingConveyorSize. Thread-safe. More...
 
void setDatabase (List< DatabaseElement > elements, Recognizer.SearchAccelerationType acceleration)
 Set / replace the database (can be called at any time). Available only if matching_threads_count > 0. Thread-safe. More...
 
int addVideoFrame (RawImage frame, int stream_id, long timestamp=-1)
 Add a new video frame for a specific video stream. Tracking and recognition results will be returned asynchronously via Tracking, MatchFound and TrackingLost callbacks. Thread-safe. More...
 
void addDepthFrame (DepthMapRaw depth_frame, int stream_id, long timestamp_microsec)
 Add a new depth frame for a specific stream. Thread-safe. More...
 
void resetTrackerOnStream (int stream_id)
 Reset tracker state for a specified video stream. Thread-safe. More...
 
int resetStream (int stream_id)
 Reset work state for the stream. It waits for the callbacks, which are currently being executed, therefore, do not synchronize the resetStream call with the code inside the callbacks, otherwise it can cause a deadlock. After resetStream is executed, no callbacks related to the previous frames or tracks will be called. It is necessary to release the memory allocated for all tracks with track_id less than the return value, since there will be no TrackingLost callback for the tracks removed during this reset. Thread-safe. More...
 
void checkExceptions ()
 Exceptions from the callbacks and inner threads are rethrown when this method is called. Thread-safe.
 
int addTrackingCallback (TrackingCallback callback, Object userdata)
 Add a handler for a Tracking event. Thread-safe. More...
 
int addTrackingCallbackU (TrackingCallbackU callback, Object userdata)
 Add a handler for a Tracking event. Thread-safe. More...
 
int addTemplateCreatedCallback (TemplateCreatedCallback callback, Object userdata)
 Add a handler for a TemplateCreated event. Thread-safe. More...
 
int addTemplateCreatedCallbackU (TemplateCreatedCallbackU callback, Object userdata)
 Add a handler for a TemplateCreated event. Thread-safe. More...
 
int addMatchFoundCallback (MatchFoundCallback callback, Object userdata)
 Add a handler for a MatchFound event. Thread-safe. More...
 
int addMatchFoundCallbackExt (MatchFoundCallbackExt callback, Object userdata)
 Add a handler for a MatchFound event. Thread-safe. More...
 
int addMatchFoundCallbackU (MatchFoundCallbackU callback, Object userdata)
 Add a handler for a MatchFound event. Thread-safe. More...
 
int addTrackingLostCallback (TrackingLostCallback callback, Object userdata)
 Add a handler for a TrackingLost event. Thread-safe. More...
 
int addTrackingLostCallbackU (TrackingLostCallbackU callback, Object userdata)
 Add a handler for a TrackingLost event. Thread-safe. More...
 
int addStiPersonOutdatedCallbackU (StiPersonOutdatedCallbackU callback, Object userdata)
 Add a handler for a StiPersonOutdated event. Thread-safe. More...
 
void removeStiPersonOutdatedCallback (int callback_id)
 Remove a handler for an StiPersonOutdated event. Thread-safe. More...
 
void removeTrackingCallback (int callback_id)
 Remove a handler from Tracking event. Thread-safe. More...
 
void removeTemplateCreatedCallback (int callback_id)
 Remove a handler from TemplateCreated event. Thread-safe. More...
 
void removeMatchFoundCallback (int callback_id)
 Remove a handler from MatchFound event. Thread-safe. More...
 
void removeTrackingLostCallback (int callback_id)
 Remove a handler from TrackingLost event. Thread-safe. More...
 
void disableProcessingOnStream (int stream_id)
 Disable the creation of templates for a given stream. After that, the matching stops as well. Thread-safe. More...
 
void enableProcessingOnStream (int stream_id)
 Enable the creation of templates for a given stream. After that, the matching is resumed as well. Thread-safe. More...
 
void disableAgeGenderEstimationOnStream (int stream_id)
 Disable age and gender estimation for a given stream. Thread-safe. More...
 
void enableAgeGenderEstimationOnStream (int stream_id)
 Enable age and gender estimation for a given stream. Thread-safe. More...
 
void disableEmotionsEstimationOnStream (int stream_id)
 Disable estimation of emotions for a given stream. Thread-safe. More...
 
void enableEmotionsEstimationOnStream (int stream_id)
 Enable estimation of emotions for a given stream. Thread-safe. More...
 
- Public Member Functions inherited from VDT.FaceRecognition.SDK.IDisposableObject
virtual void Dispose ()
 Release internal object.
 

Static Public Attributes

static ulong MATCH_NOT_FOUND_ID = ulong.MaxValue
 A special value for the person_id and element_id parameters in the MatchFoundCallback.
 

Additional Inherited Members

- Properties inherited from VDT.FaceRecognition.SDK.IDisposableObject
bool isDisposed [get]
 True if internal object already disposed.
 

Detailed Description

VideoWorker is an interface object for tracking, processing and matching faces on multiple video streams. We recommend you to use VideoWorker instead of Capturer for face tracking on video streams. When VideoWorker is created with matching_thread=0 and processing_thread=0, then the standard Capturer license is used.

Member Function Documentation

void VDT.FaceRecognition.SDK.VideoWorker.addDepthFrame ( DepthMapRaw  depth_frame,
int  stream_id,
long  timestamp_microsec 
)
inline

Add a new depth frame for a specific stream. Thread-safe.

Parameters
[in]depth_frameDepth frame (DepthMapRaw) that contains depth data.
[in]stream_idInteger id of the video stream (0 <= stream_id < streams_count).
[in]timestamp_microsecTimestamp of the frame in microseconds
int VDT.FaceRecognition.SDK.VideoWorker.addMatchFoundCallback ( MatchFoundCallback  callback,
Object  userdata 
)
inline

Add a handler for a MatchFound event. Thread-safe.

Warning
This is a deprecated version (see the new one VideoWorker.addMatchFoundCallbackU)
Parameters
[in]callbackCallback function.
[in]userdataAny object. It will be passed to the callback as a userdata argument.
Returns
Integer id for this callback. Use it for passing to VideoWorker.removeMatchFoundCallback to unsubscribe.
int VDT.FaceRecognition.SDK.VideoWorker.addMatchFoundCallbackExt ( MatchFoundCallbackExt  callback,
Object  userdata 
)
inline

Add a handler for a MatchFound event. Thread-safe.

Warning
This is a deprecated version (see the new one VideoWorker.addMatchFoundCallbackU)
Parameters
[in]callbackCallback function.
[in]userdataAny object. It will be passed to the callback as a userdata argument.
Returns
Integer id for this callback. Use it for passing to VideoWorker.removeMatchFoundCallback to unsubscribe.
int VDT.FaceRecognition.SDK.VideoWorker.addMatchFoundCallbackU ( MatchFoundCallbackU  callback,
Object  userdata 
)
inline

Add a handler for a MatchFound event. Thread-safe.

Parameters
[in]callbackCallback function.
[in]userdataAny object. It will be passed to the callback as a userdata argument.
Returns
Integer id for this callback. Use it for passing to VideoWorker.removeMatchFoundCallback to unsubscribe.
int VDT.FaceRecognition.SDK.VideoWorker.addStiPersonOutdatedCallbackU ( StiPersonOutdatedCallbackU  callback,
Object  userdata 
)
inline

Add a handler for a StiPersonOutdated event. Thread-safe.

Parameters
[in]callbackCallback function.
[in]userdataAny object. When the callback is called, it's passed as a userdata argument.
Returns
Integer id for this callback. To unsubscribe, pass it to VideoWorker.removeStiPersonOutdatedCallback.
int VDT.FaceRecognition.SDK.VideoWorker.addTemplateCreatedCallback ( TemplateCreatedCallback  callback,
Object  userdata 
)
inline

Add a handler for a TemplateCreated event. Thread-safe.

Warning
This is a deprecated version (see the new one VideoWorker.addTemplateCreatedCallbackU)
Parameters
[in]callbackCallback function.
[in]userdataAny object. It will be passed to the callback as a userdata argument.
Returns
Integer id for this callback. Use it for passing to VideoWorker.removeTemplateCreatedCallback to unsubscribe.
int VDT.FaceRecognition.SDK.VideoWorker.addTemplateCreatedCallbackU ( TemplateCreatedCallbackU  callback,
Object  userdata 
)
inline

Add a handler for a TemplateCreated event. Thread-safe.

Parameters
[in]callbackCallback function.
[in]userdataAny object. It will be passed to the callback as a userdata argument.
Returns
Integer id for this callback. Use it for passing to VideoWorker.removeTemplateCreatedCallback to unsubscribe.
int VDT.FaceRecognition.SDK.VideoWorker.addTrackingCallback ( TrackingCallback  callback,
Object  userdata 
)
inline

Add a handler for a Tracking event. Thread-safe.

Warning
This is a deprecated version (see the new one VideoWorker.addTrackingCallbackU)
Parameters
[in]callbackCallback function.
[in]userdataAny object. It will be passed to the callback as a userdata argument.
Returns
Integer id for this callback. Use it for passing to VideoWorker.removeTrackingCallback to unsubscribe.
int VDT.FaceRecognition.SDK.VideoWorker.addTrackingCallbackU ( TrackingCallbackU  callback,
Object  userdata 
)
inline

Add a handler for a Tracking event. Thread-safe.

Parameters
[in]callbackCallback function.
[in]userdataAny object. It will be passed to the callback as a userdata argument.
Returns
Integer id for this callback. Use it for passing to VideoWorker.removeTrackingCallback to unsubscribe.
int VDT.FaceRecognition.SDK.VideoWorker.addTrackingLostCallback ( TrackingLostCallback  callback,
Object  userdata 
)
inline

Add a handler for a TrackingLost event. Thread-safe.

Warning
This is a deprecated version (see the new one VideoWorker.addTrackingLostCallbackU)
Parameters
[in]callbackCallback function.
[in]userdataAny object. It will be passed to the callback as a userdata argument.
Returns
Integer id for this callback. Use it for passing to VideoWorker.removeTrackingLostCallback to unsubscribe.
int VDT.FaceRecognition.SDK.VideoWorker.addTrackingLostCallbackU ( TrackingLostCallbackU  callback,
Object  userdata 
)
inline

Add a handler for a TrackingLost event. Thread-safe.

Parameters
[in]callbackCallback function.
[in]userdataAny object. It will be passed to the callback as a userdata argument.
Returns
Integer id for this callback. Use it for passing to VideoWorker.removeTrackingLostCallback to unsubscribe.
int VDT.FaceRecognition.SDK.VideoWorker.addVideoFrame ( RawImage  frame,
int  stream_id,
long  timestamp = -1 
)
inline

Add a new video frame for a specific video stream. Tracking and recognition results will be returned asynchronously via Tracking, MatchFound and TrackingLost callbacks. Thread-safe.

Parameters
[in]frameVideo frame. Only colored images are allowed (i.e. RawImage.FORMAT_RGB, RawImage.FORMAT_BGR, RawImage.FORMAT_YUV_NV21 and RawImage.FORMAT_YUV_NV12).
[in]stream_idInteger id of the video stream (0 <= stream_id < streams_count).
[in]timestampTimestamp of the frame in microseconds
Returns
Integer id for this frame, unique for this video stream. This id will be used to identify this frame in the callbacks.
void VDT.FaceRecognition.SDK.VideoWorker.disableAgeGenderEstimationOnStream ( int  stream_id)
inline

Disable age and gender estimation for a given stream. Thread-safe.

Parameters
[in]stream_idInteger id of the video stream (0 <= stream_id < streams_count).
void VDT.FaceRecognition.SDK.VideoWorker.disableEmotionsEstimationOnStream ( int  stream_id)
inline

Disable estimation of emotions for a given stream. Thread-safe.

Parameters
[in]stream_idInteger id of the video stream (0 <= stream_id < streams_count).
void VDT.FaceRecognition.SDK.VideoWorker.disableProcessingOnStream ( int  stream_id)
inline

Disable the creation of templates for a given stream. After that, the matching stops as well. Thread-safe.

Parameters
[in]stream_idInteger id of the video stream (0 <= stream_id < streams_count).
void VDT.FaceRecognition.SDK.VideoWorker.enableAgeGenderEstimationOnStream ( int  stream_id)
inline

Enable age and gender estimation for a given stream. Thread-safe.

Parameters
[in]stream_idInteger id of the video stream (0 <= stream_id < streams_count).
void VDT.FaceRecognition.SDK.VideoWorker.enableEmotionsEstimationOnStream ( int  stream_id)
inline

Enable estimation of emotions for a given stream. Thread-safe.

Parameters
[in]stream_idInteger id of the video stream (0 <= stream_id < streams_count).
void VDT.FaceRecognition.SDK.VideoWorker.enableProcessingOnStream ( int  stream_id)
inline

Enable the creation of templates for a given stream. After that, the matching is resumed as well. Thread-safe.

Parameters
[in]stream_idInteger id of the video stream (0 <= stream_id < streams_count).
String VDT.FaceRecognition.SDK.VideoWorker.getMethodName ( )
inline

Get a method name of the recognizer used. Thread-safe.

Returns
The name of the method.
int VDT.FaceRecognition.SDK.VideoWorker.getStreamsCount ( )
inline

Get a number of video streams. Thread-safe.

Returns
Number of video streams.
int VDT.FaceRecognition.SDK.VideoWorker.getTrackingConveyorSize ( int  stream_id)
inline

Get a size N of tracking conveyor. Tracking callback will be called with frame_id = X not earlier than VideoWorker.addVideoFrame returns the value X + N - 1, where N is the value returned by VideoWorker.getTrackingConveyorSize. Thread-safe.

Parameters
[in]stream_idInteger id of the video stream (0 <= stream_id < streams_count).
Returns
Size of tracking conveyor.
delegate void VDT.FaceRecognition.SDK.VideoWorker.MatchFoundCallback ( int  stream_id,
int  frame_id,
ulong  person_id,
ulong  element_id,
RawSample  sample,
float  quality,
Template  templ,
Recognizer.MatchResult  match_result,
Object  userdata 
)

Callback function type for a MatchFound event.

Warning
This is a deprecated version (see the new one VideoWorker.MatchFoundCallbackU)
Parameters
[in]stream_idsee the description in VideoWorker.MatchFoundCallbackData.
[in]frame_idsee the description in VideoWorker.MatchFoundCallbackData.
[in]person_idsee search_results in VideoWorker.MatchFoundCallbackData
[in]element_idsee search_results in VideoWorker.MatchFoundCallbackData.
[in]samplesee the description in VideoWorker.MatchFoundCallbackData.
[in]qualitysee the description in VideoWorker.MatchFoundCallbackData.
[in]templsee the description in VideoWorker.MatchFoundCallbackData.
[in]match_resultsee search_results in VideoWorker.MatchFoundCallbackData.
[in]userdataObject submitted by the user when calling the VideoWorker.addMatchFoundCallback method.
delegate void VDT.FaceRecognition.SDK.VideoWorker.MatchFoundCallbackExt ( int  stream_id,
int  frame_id,
RawSample  sample,
float  quality,
Template  templ,
SearchResult[]  search_result,
Object  userdata 
)

Callback function type for a MatchFound event.

Warning
This is a deprecated version (see the new one VideoWorker.MatchFoundCallbackU)

Similar to VideoWorker.MatchFoundCallback but returns all elements with a distance less than distance_threshold (but not more than k nearest elements, the value of k is set in the configuration file in the search_k tag).

When called after N consecutive mismatches, the first element in search_result will have a zero distance, and person_id and element_id are equal to VideoWorker.MATCH_NOT_FOUND_ID.

delegate void VDT.FaceRecognition.SDK.VideoWorker.MatchFoundCallbackU ( MatchFoundCallbackData  data,
Object  userdata 
)

Callback function type for a MatchFound event.

When a template for a tracked face is created, it is compared with each template in the dataset, and if the distance to the nearest element is less than the distance_threshold specified in this element, then a match is fixed.

MatchFoundCallbackData.search_results contains all elements with a distance less than distance_threshold (but not more than k nearest elements, the value of k is set in the configuration file in the search_k tag).

This callback is called after N sequential matches with the elements that belong to the same person.

The N number can be set in a config file using the <consecutive_match_count_for_match_found_callback> tag.

It is guaranteed that this callback will be called after at least one Tracking callback and before TrackingLost callback with the same stream_id and track_id (track_id = sample.getID()).

Also you can set the value of '1' for the <not_found_match_found_callback> tag to enable this callback after N consecutive mismatches (i.e. when the closest element is beyond its distance_threshold). In this case, match_result of the first element in MatchFoundCallbackData.search_results is at zero distance, and person_id and element_id are equal to VideoWorker.MATCH_NOT_FOUND_ID.

Parameters
[in]dataMatchFound callback data.
[in]userdataObject submitted by the user when calling the VideoWorker.addMatchFoundCallbackU method.
void VDT.FaceRecognition.SDK.VideoWorker.removeMatchFoundCallback ( int  callback_id)
inline

Remove a handler from MatchFound event. Thread-safe.

Parameters
[in]callback_idInteger callback id returned by VideoWorker.addMatchFoundCallback or VideoWorker.addMatchFoundCallbackExt.
void VDT.FaceRecognition.SDK.VideoWorker.removeStiPersonOutdatedCallback ( int  callback_id)
inline

Remove a handler for an StiPersonOutdated event. Thread-safe.

Parameters
[in]callback_idInteger callback id returned by VideoWorker.addStiPersonOutdatedCallbackU.
void VDT.FaceRecognition.SDK.VideoWorker.removeTemplateCreatedCallback ( int  callback_id)
inline

Remove a handler from TemplateCreated event. Thread-safe.

Parameters
[in]callback_idInteger callback id returned by VideoWorker.addTemplateCreatedCallback.
void VDT.FaceRecognition.SDK.VideoWorker.removeTrackingCallback ( int  callback_id)
inline

Remove a handler from Tracking event. Thread-safe.

Parameters
[in]callback_idInteger callback id returned by VideoWorker.addTrackingCallback.
void VDT.FaceRecognition.SDK.VideoWorker.removeTrackingLostCallback ( int  callback_id)
inline

Remove a handler from TrackingLost event. Thread-safe.

Parameters
[in]callback_idInteger callback id returned by VideoWorker.addTrackingLostCallback.
int VDT.FaceRecognition.SDK.VideoWorker.resetStream ( int  stream_id)
inline

Reset work state for the stream. It waits for the callbacks, which are currently being executed, therefore, do not synchronize the resetStream call with the code inside the callbacks, otherwise it can cause a deadlock. After resetStream is executed, no callbacks related to the previous frames or tracks will be called. It is necessary to release the memory allocated for all tracks with track_id less than the return value, since there will be no TrackingLost callback for the tracks removed during this reset. Thread-safe.

Parameters
[in]stream_idInteger id of the video stream (0 <= stream_id < streams_count).
Returns
Integer track_id_threshold, which means that all tracks that were removed during resetStream had track_id < track_id_threshold, and all new tracks will have track_id >= track_id_threshold.
void VDT.FaceRecognition.SDK.VideoWorker.resetTrackerOnStream ( int  stream_id)
inline

Reset tracker state for a specified video stream. Thread-safe.

Parameters
[in]stream_idInteger id of the video stream (0 <= stream_id < streams_count).
void VDT.FaceRecognition.SDK.VideoWorker.setDatabase ( List< DatabaseElement elements,
Recognizer.SearchAccelerationType  acceleration 
)
inline

Set / replace the database (can be called at any time). Available only if matching_threads_count > 0. Thread-safe.

Parameters
[in]elementsVector of database elements.
[in]accelerationAcceleration type.
delegate void VDT.FaceRecognition.SDK.VideoWorker.StiPersonOutdatedCallbackU ( StiPersonOutdatedCallbackData  data,
Object  userdata 
)

Callback function type for an StiPersonOutdated event.

Parameters
[in]dataStiPersonOutdated callback data.
[in]userdataObject submitted by the user when calling the VideoWorker.addStiPersonOutdatedCallbackU method.
delegate void VDT.FaceRecognition.SDK.VideoWorker.TemplateCreatedCallback ( int  stream_id,
int  frame_id,
RawSample  sample,
float  quality,
Template  templ,
Object  userdata 
)

Callback function type for a TemplateCreated event.

Warning
This is a deprecated version (see the new one VideoWorker.TemplateCreatedCallbackU)
Parameters
[in]stream_idsee the description in VideoWorker.TemplateCreatedCallbackData
[in]frame_idsee the description in VideoWorker.TemplateCreatedCallbackData
[in]samplesee the description in VideoWorker.TemplateCreatedCallbackData
[in]qualitysee the description in VideoWorker.TemplateCreatedCallbackData
[in]templsee the description in VideoWorker.TemplateCreatedCallbackData
[in]userdataObject submitted by the user when calling the VideoWorker.addTemplateCreatedCallback method.
delegate void VDT.FaceRecognition.SDK.VideoWorker.TemplateCreatedCallbackU ( TemplateCreatedCallbackData  data,
Object  userdata 
)

Callback function type for a TemplateCreated event.

This callback is called whenever a template is created within the VideoWorker.

It is guaranteed that this callback will be called after at least one Tracking callback and before the TrackingLost callback with the same stream_id and track_id (track_id = sample.getID()).

Parameters
[in]dataTemplateCreated callback data.
[in]userdataObject submitted by the user when calling the VideoWorker.addTemplateCreatedCallbackU method.
delegate void VDT.FaceRecognition.SDK.VideoWorker.TrackingCallback ( int  stream_id,
int  frame_id,
RawSample[]  samples,
bool[]  samples_weak,
float[]  samples_quality,
Object  userdata 
)

Callback function type for a Tracking event.

Warning
This is a deprecated version (see the new one VideoWorker.TrackingCallbackU)
Parameters
[in]stream_idsee the description in VideoWorker.TrackingCallbackData
[in]frame_idsee the description in VideoWorker.TrackingCallbackData
[in]samplessee the description in VideoWorker.TrackingCallbackData
[in]samples_weaksee the description in VideoWorker.TrackingCallbackData
[in]samples_qualitysee the description in VideoWorker.TrackingCallbackData
[in]userdataObject submitted by the user when calling the VideoWorker.addTrackingCallback method.
delegate void VDT.FaceRecognition.SDK.VideoWorker.TrackingCallbackU ( TrackingCallbackData  data,
Object  userdata 
)

Callback function type for a Tracking event. This callback is called every time the frame has been processed by the tracker. Tracking callback will be called with frame_id = X not earlier than VideoWorker.addVideoFrame returns the value of X + N - 1, where N is the value returned by VideoWorker.getTrackingConveyorSize.

Tracking callbacks with the same stream_id are called in ascending frame_id order. So, if you receive a callback with stream_id=2 and frame_id=102 right after a callback with stream_id=2 and frame_id=100, then the frame with frame_id=101 was skipped for the video stream 2.

Parameters
[in]dataTracking callback data.
[in]userdataObject submitted by the user when calling the VideoWorker.addTrackingCallbackU method.
delegate void VDT.FaceRecognition.SDK.VideoWorker.TrackingLostCallback ( int  stream_id,
int  first_frame_id,
int  last_frame_id,
float  best_quality,
int  best_quality_frame_id,
RawSample  best_quality_sample,
Template  best_quality_templ,
Object  userdata 
)

Callback function type for a TrackingLost event (e.g. when a person leaves the frame).

Warning
This is a deprecated version (see the new one VideoWorker.TrackingLostCallbackU).
Parameters
[in]stream_idsee the description in VideoWorker.TrackingLostCallbackData.
[in]first_frame_idsee the description in VideoWorker.TrackingLostCallbackData.
[in]last_frame_idsee the description in VideoWorker.TrackingLostCallbackData.
[in]best_qualitysee the description in VideoWorker.TrackingLostCallbackData.
[in]best_quality_frame_idsee the description in VideoWorker.TrackingLostCallbackData.
[in]best_quality_samplesee the description in VideoWorker.TrackingLostCallbackData.
[in]best_quality_templsee the description in VideoWorker.TrackingLostCallbackData.
[in]userdataObject submitted by the user when calling the VideoWorker.addTrackingLostCallback method.
delegate void VDT.FaceRecognition.SDK.VideoWorker.TrackingLostCallbackU ( TrackingLostCallbackData  data,
Object  userdata 
)

Callback function type for a TrackingLost event (e.g. when a person leaves the frame).

It is guaranteed that this is the last callback for the pair <stream_id, track_id> (track_id is equal to sample.getID() for a sample given in any VideoWorker callback).

So, after this callback, no Tracking, MatchFound or TrackingLost callback for the video stream stream_id can contain a sample with the same track_id.

Also it is guaranteed, that for each pair <stream_id, track_id> that was mentioned in the Tracking callback there will be only one TrackingLost callback.

Parameters
[in]dataTrackingLost callback data.
[in]userdataObject submitted by the user when calling the VideoWorker.addTrackingLostCallbackU method.