Luxand FaceSDK v8.3 Developer's Guide

Tracker Functions

FSDK_CreateTracker Function

Creates a new tracker handle to be passed to other Tracker API functions.

C++ Syntax:

int FSDK_CreateTracker(HTracker * Tracker);

Delphi Syntax:

function FSDK_CreateTracker(Tracker: PHTracker): integer;

C# Syntax:

int FSDK.CreateTracker(ref int Tracker);

Java and Android Syntax:

int FSDK.CreateTracker(HTracker Tracker);

Parameters:

  • Tracker - pointer to the integer variable that will to store the created tracker handle.

Return Value:

Returns FSDKE_OK if successful.

Python Syntax:

def FSDK.CreateTracker() -> Tracker;

# constructor
Tracker() -> Tracker

Return Value:

New Tracker object.


FSDK_FreeTracker Function

Frees a tracker handle. The handle becomes invalid, and all memory associated with it is released. You should not pass the tracker handle to any other Tracker API functions after the handle was freed.

C++ Syntax:

int FSDK_FreeTracker(HTracker Tracker);

Delphi Syntax:

function FSDK_FreeTracker(Tracker: HTracker): integer;

C# Syntax:

int FSDK.FreeTracker(int Tracker);

Java and Android Syntax:

int FSDK.FreeTracker(HTracker Tracker);

Parameters:

  • Tracker - handle of the tracker to be freed.

Return Value:

Returns FSDKE_OK if successful.

Python Syntax:

def FSDK.FreeTracker(tracker: Tracker);

def Tracker.Free();

Note:

Tracker object is freed automatically by destructor.


FSDK_ClearTracker Function

Clears the content of a tracker, releasing all its memory. The tracker handle stays valid. The parameters are reset to their default values, so if you just need to clear the tracker's memory, consider setting the parameters with the FSDK_SetTrackerParameter or the FSDK_SetTrackerMultipleParameters function again.

C++ Syntax:

int FSDK_ClearTracker(HTracker Tracker);

Delphi Syntax:

function FSDK_ClearTracker(Tracker: HTracker): integer;

C# Syntax:

int FSDK.ClearTracker(int Tracker);

Java and Android Syntax:

int FSDK.ClearTracker(HTracker Tracker);

Parameters:

  • Tracker - handle of the tracker to be cleared.

Return Value:

Returns FSDKE_OK if successful.

Python Syntax:

def FSDK.ClearTracker(tracker: Tracker);

def Tracker.Clear();

FSDK_SetTrackerParameter Function

Sets the parameter of a tracker. See the Tracker Parameters section for details.

C++ Syntax:

int FSDK_SetTrackerParameter(HTracker Tracker, const char * ParameterName, const char * ParameterValue);

Delphi Syntax:

function FSDK_SetTrackerParameter(Tracker: HTracker; ParameterName, ParameterValue: PAnsiChar): integer;

C# Syntax:

int FSDK.SetTrackerParameter(int Tracker, string ParameterName, string ParameterValue);

Java and Android Syntax:

int FSDK.SetTrackerParameter(HTracker Tracker, String ParameterName, String ParameterValue);

Parameters:

  • Tracker - handle of the tracker to have parameters set parameters.
  • ParameterName - name of the parameter to be set.
  • ParameterValue - value of the parameter.

Return Value:

Returns FSDKE_OK if successful.

Python Syntax:

def FSDK.SetTrackerParameter(tracker: Tracker, paramName: str, paramValue);

def Tracker.SetParameter(paramName: str, paramValue);

Note:

The type of parameterValue can be of types: str, int, float or bool.


FSDK_SetTrackerMultipleParameters Function

Sets multiple parameters of a tracker. The parameters and their values are specified in the following format:

"Parameter1=Value1[;Parameter2=Value2[;...]]"

See the Tracker Parameters section for details.

C++ Syntax:

int FSDK_SetTrackerMultipleParameters(HTracker Tracker, const char * Parameters, int * ErrorPosition);

Delphi Syntax:

function FSDK_SetTrackerMultipleParameters(Tracker: HTracker; Parameters: PAnsiChar; ErrorPosition: PInteger): integer;

C# Syntax:

int FSDK.SetTrackerMultipleParameters(int Tracker, string Parameters, ref int ErrorPosition);

Java and Android Syntax:

int FSDK.SetTrackerMultipleParameters(HTracker Tracker, String Parameters, IntByReference ErrorPosition);

Parameters:

  • Tracker - handle of the tracker to have parameters set.
  • Parameters - string containing the parameters and corresponding values to be set.
  • ErrorPosition - pointer to the integer variable that will receive the position of the character that caused syntax error in the string.

Return Value:

Returns FSDKE_OK if successful. In case of syntax error returns FSDKE_SYNTAX_ERROR and sets the value of the ErrorPosition variable.

Example:

int err = 0;
FSDK_SetTrackerMultipleParameters(tracker, "HandleArbitraryRotations=false; DetermineFaceRotationAngle=false; InternalResizeWidth=100; FaceDetectionThreshold=5;", &err);

Python Syntax:

def FSDK.SetTrackerMultipleParameters(tracker: Tracker, parameters: str);

def Tracker.SetParameters(**kw);

Note:

Keyword arguments are interpreted as parameter names with their values to be set.


FSDK_GetTrackerParameter Function

Retrieves the value of a tracker parameter. See the Tracker Parameters section for details.

C++ Syntax:

int FSDK_GetTrackerParameter(HTracker Tracker, const char * ParameterName, char * ParameterValue, long long MaxSizeInBytes);

Delphi Syntax:

function FSDK_GetTrackerParameter(Tracker: HTracker; ParameterName, ParameterValue: PAnsiChar; MaxSizeInBytes: int64): integer;

C# Syntax:

int FSDK.GetTrackerParameter(int Tracker, string ParameterName, out string ParameterValue, long MaxSizeInBytes);

Java and Android Syntax:

int FSDK.GetTrackerParameter(HTracker Tracker, String ParameterName, String ParameterValue[], long MaxSizeInBytes);

Parameters:

  • Tracker - handle of the tracker whose parameter value is desired.
  • ParameterName - name of the parameter to be retrieved.
  • ParameterValue - pointer to the output null-terminated string that will store the value of the parameter.
  • MaxSizeInBytes - amount of memory allocated for the output string.

Return Value:

Returns FSDKE_OK if successful. Returns FSDKE_INSUFFICIENT_BUFFER_SIZE if there is not enough room to store the output string; however, the output string still fills up all the space available.

Python Syntax:

def FSDK.GetTrackerParameter(tracker: Tracker, parameterName: str) -> str;

def Tracker.GetParameters(parameterName: str) -> str;

Return Value:

The value of parameter as string.


FSDK_FeedFrame Function

Processes a video frame according to tracker's parameters, and returns the identifiers of the tracked faces. See the Understanding Identifiers, Tracker Memory and Tracker Parameters sections for details.

C++ Syntax:

int FSDK_FeedFrame(HTracker Tracker, long long CameraIdx, HImage Image, long long * FaceCount, long long * IDs, long long MaxSizeInBytes);

Delphi Syntax:

function FSDK_FeedFrame(Tracker: HTracker; CameraIdx: int64; Image: HImage; FaceCount: PInt64; IDs: PIDArray; MaxSizeInBytes: int64): integer;

C# Syntax:

int FSDK.FeedFrame(int Tracker, long CameraIdx, int Image, ref long FaceCount, out long[] IDs, long MaxSizeInBytes);

Java and Android Syntax:

int FSDK.FeedFrame(HTracker Tracker, long CameraIdx, HImage Image, long FaceCount[], long IDs[], long MaxSizeInBytes);

Parameters:

  • Tracker - handle of the tracker in which to process the frame.
  • CameraIdx - index of the camera; should be equal to 0 in the current release.
  • Image - the HImage handle of the video frame to process.
  • FaceCount - address of the 64-bit integer value that will receive the count of faces tracked in the current frame.
  • IDs - address of the array of 64-bit integer values that will receive the identifiers of the tracked faces.
  • MaxSizeInBytes - amount of memory allocated for the IDs array.

Return Value:

Returns FSDKE_OK if successful.

Python Syntax:

def FSDK.FeedFrame(tracker: Tracker, cameraIdx: int, image: Image, maxIDs: int = 512) -> List[int];

def Tracker.FeedFrame(cameraIdx: int, img: Image, maxIDs: int = 512) -> List[int];

Return Value:

The list of identifiers of the tracked faces.

Parameters:

  • maxIDs - the maximum number of faces tracked in the current frame.

FSDK_GetTrackerEyes Function

Retrieves the coordinates of the eye centers of a tracked face. The function accepts the identifier returned by FSDK_FeedFrame. This identifier should be passed to FSDK_GetTrackerEyes before the next call of FSDK_FeedFrame using the same tracker.

For the function to return the eye center coordinates, at least one of the parameters DetectEyes, DetectFacialFeatures, RecognizeFaces, DetectGender, DetectAge or DetectExpression must be set to true.

C++ Syntax:

int FSDK_GetTrackerEyes(HTracker Tracker, long long CameraIdx, long long ID, FSDK_Features * FacialFeatures);

Delphi Syntax:

function FSDK_GetTrackerEyes(Tracker: HTracker; CameraIdx, ID: int64; FacialFeatures: PFSDK_Features): integer;

C# Syntax:

int FSDK.GetTrackerEyes(int Tracker, long CameraIdx, long ID, out TPoint[] FacialFeatures);

Java Syntax:

int FSDK.GetTrackerEyes(HTracker Tracker, long CameraIdx, long ID, FSDK_Features.ByReference FacialFeatures);

Android Syntax:

int FSDK.GetTrackerEyes(HTracker Tracker, long CameraIdx, long ID, FSDK_Features FacialFeatures);

Parameters:

  • Tracker - handle of the tracker where the coordinates of the eye centers will be retrieved.
  • CameraIdx - index of the camera; should be equal to 0 in the current release.
  • ID - identifier of the subject returned by FSDK_FeedFrame, whose eye center coordinates will be received.
  • FacialFeatures - pointer to the FSDK_Features variable that will receive the eye center coordinates.

Return Value:

Returns FSDKE_OK if successful. Returns FSDKE_ID_NOT_FOUND if the specified ID was not returned by the previous FSDK_FeedFrame call. Returns FSDKE_ATTRIBUTE_NOT_DETECTED if eye centers were not tracked on the previous FSDK_FeedFrame call.

Python Syntax:

def FSDK.GetTrackerEyes(tracker: Tracker, cameraIdx: int, ID: int) -> Eyes;

def Tracker.GetEyes(cameraIdx: int, ID: int) -> Eyes;

Return Value:

The Eyes object.


FSDK_GetTrackerFacialFeatures Function

Retrieves the coordinates of a tracked face's features. The function accepts the identifier returned by FSDK_FeedFrame. This identifier should be passed to FSDK_GetTrackerFacialFeatures before the next call of FSDK_FeedFrame with the same tracker.

For the function to return the facial feature coordinates, either of the parameters DetectFacialFeatures, DetectGender, DetectAge or DetectExpression should be set to true. See the Tracker Parameters section for details.

C++ Syntax:

int FSDK_GetTrackerFacialFeatures(HTracker Tracker, long long CameraIdx, long long ID, FSDK_Features * FacialFeatures);

Delphi Syntax:

function FSDK_GetTrackerFacialFeatures(Tracker: HTracker; CameraIdx, ID: int64; FacialFeatures: PFSDK_Features): integer;

C# Syntax:

int FSDK.GetTrackerFacialFeatures(int Tracker, long CameraIdx, long ID, out TPoint[] FacialFeatures);

Java Syntax:

int FSDK.GetTrackerFacialFeatures(HTracker Tracker, long CameraIdx, long ID, FSDK_Features.ByReference FacialFeatures);

Android Syntax:

int FSDK.GetTrackerFacialFeatures(HTracker Tracker, long CameraIdx, long ID, FSDK_Features FacialFeatures);

Parameters:

  • Tracker - handle of the tracker from which to retrieve the facial feature coordinates.
  • CameraIdx - index of the camera; should be equal to 0 in the current release.
  • ID - identifier of the subject returned by FSDK_FeedFrame, whose facial feature coordinates will be received.
  • FacialFeatures - pointer to the FSDK_Features variable to receive facial feature coordinates.

Return Value:

Returns FSDKE_OK if successful. Returns FSDKE_ID_NOT_FOUND if the specified ID was not returned by the previous FSDK_FeedFrame call. Returns FSDKE_ATTRIBUTE_NOT_DETECTED if facial features were not tracked on the previous FSDK_FeedFrame call.

Python Syntax:

def FSDK.GetTrackerFacialFeatures(tracker: Tracker, cameraIdx: int, ID: int) -> Features;

def Tracker.GetFacialFeatures(cameraIdx: int, ID: int) -> Features;

Return Value:

The Features object.

Exceptions:

  • FSDK.IdNotFound
  • FSDK.AttributeNotDetected

FSDK_GetTrackerFacePosition Function

Retrieves the position of a tracked face. The function accepts the identifier returned by FSDK_FeedFrame. This identifier should be passed to FSDK_GetTrackerFacePosition before the next call of FSDK_FeedFrame with the same tracker.

C++ Syntax:

int FSDK_GetTrackerFacePosition(HTracker Tracker, long long CameraIdx, long long ID, TFacePosition * FacePosition);

Delphi Syntax:

function FSDK_GetTrackerFacePosition(Tracker: HTracker; CameraIdx, ID: int64; FacePosition: PFacePosition): integer;

C# Syntax:

int FSDK.GetTrackerFacePosition(int Tracker, long CameraIdx, long ID, ref TFacePosition FacePosition);

Java Syntax:

int FSDK.GetTrackerFacePosition(HTracker Tracker, long CameraIdx, long ID, TFacePosition.ByReference FacePosition);

Android Syntax:

int FSDK.GetTrackerFacePosition(HTracker Tracker, long CameraIdx, long ID, TFacePosition FacePosition);

Parameters:

  • Tracker - handle of the tracker from which to retrieve the face position.
  • CameraIdx - index of the camera; should be equal to 0 in the current release.
  • ID - identifier of the subject returned by FSDK_FeedFrame whose face position will be received.
  • FacePosition - pointer to the TFacePosition variable that will receive the face position.

Return Value:

Returns FSDKE_OK if successful. Returns FSDKE_ID_NOT_FOUND if the specified ID was not returned by the previous FSDK_FeedFrame call.

Python Syntax:

def FSDK.GetTrackerFacePosition(tracker: Tracker, cameraIdx: int, ID: int) -> FacePosition;

def Tracker.GetFacePosition(cameraIdx: int, ID: int) -> FacePosition;

Return Value:

The FacePosition object.

Exceptions:

FSDK.IdNotFound


FSDK_GetTrackerFacialAttribute Function

Given an attribute of a tracked face, retrieves its Values and their Confidences. The function accepts the identifier returned by FSDK_FeedFrame. This identifier should be passed to FSDK_GetTrackerFacialAttribute before the next call of FSDK_FeedFrame with the same tracker.

The function allows for detecting gender when provided with the "Gender" attribute name, for detecting age when provided with the "Age" attribute name and for detecting expression when provided with the "Expression" attribute name. Refer to the FSDK_DetectFacialAttributeUsingFeatures function description for details on attributes, their Values and Confidences.

C++ Syntax:

int FSDK_GetTrackerFacialAttribute(HTracker Tracker, long long CameraIdx, long long ID, const char * AttributeName, char * AttributeValues, long long MaxSizeInBytes);

Delphi Syntax:

function FSDK_GetTrackerFacialAttribute(Tracker: HTracker; CameraIdx, ID: int64; AttributeName, AttributeValues: PAnsiChar; MaxSizeInBytes: int64): integer;

C# Syntax:

int FSDK.GetTrackerFacialAttribute(int Tracker, long CameraIdx, long ID, string AttributeName, out string AttributeValues, long MaxSizeInBytes);

Java and Android Syntax:

int FSDK.GetTrackerFacialAttribute(HTracker Tracker, long CameraIdx, long ID, String AttributeName, String AttributeValues[], long MaxSizeInBytes);

Parameters:

  • Tracker - handle of the tracker whose attribute will be retrieved.
  • CameraIdx - index of the camera; should be equal to 0 in the current release.
  • ID - identifier of a subject returned by FSDK_FeedFrame whose attribute will be retrieved.
  • AttributeName - name of the attribute.
  • AttributeValues - pointer to the null-terminated string that will receive the attribute Values and their Confidences.
  • MaxSizeInBytes - amount of memory allocated for the output string.

Return Value:

Returns FSDKE_OK if successful. Returns FSDKE_ID_NOT_FOUND if the specified ID was not returned by the previous FSDK_FeedFrame call. Returns FSDKE_ATTRIBUTE_NOT_DETECTED if the specified attribute was not detected on the previous FSDK_FeedFrame call. Returns FSDKE_UNKNOWN_ATTRIBUTE if the specified attribute name is not supported. Returns FSDKE_INSUFFICIENT_BUFFER_SIZE if there is not enough room to store the output string; however, the output string still fills up all the space available.

Python Syntax:

def FSDK.GetTrackerFacialAttribute(tracker: Tracker, cameraIdx: int, ID: int, attributeName: str) -> str;

def Tracker.GetFacialAttribute(cameraIdx: int, ID: int, attributeName: str) -> str;

Return Value:

The attribute Values and their Confidences as string.

Exceptions:

  • FSDK.IdNotFound
  • FSDK.AttributeNotDetected
  • FSDK.UnknownAttribute

FSDK_LockID Function

Locks an identifier. When an identifier is locked, at least one facial appearance of an identifier will not be deleted during any possible purge. You should call this function before the FSDK_SetName function. The function has no effect on identifiers which were already tagged with a name. The call should be usually paired with FSDK_UnlockID call. When the user does not set a name to a locked identifier, unlocking it allows it to become purged if necessary for memory efficient memory use.

See the Locking identifiers section for details. You may call this function with any identifier regardless of when it was returned as long as it remains present in the tracker memory.

C++ Syntax:

int FSDK_LockID(HTracker Tracker, long long ID);

Delphi Syntax:

function FSDK_LockID(Tracker: HTracker; ID: int64): integer;

C# Syntax:

int FSDK.LockID(int Tracker, long ID);

Java and Android Syntax:

int FSDK.LockID(HTracker Tracker, long ID);

Parameters:

  • Tracker - handle of the tracker in which to lock an identifier.
  • ID - identifier of the subject to lock.

Return Value:

Returns FSDKE_OK if successful. Returns FSDKE_ID_NOT_FOUND if the specified ID is not present in the tracker memory.

Python Syntax:

def FSDK.LockID(tracker: Tracker, ID: int);

def Tracker.LockID(ID: int);

Exceptions:

FSDK.IdNotFound


FSDK_UnlockID Function

Unlocks the ID so it may be purged. You should call this function after the FSDK_LockID call. The function has no effect on identifiers which were already tagged with a name.

See the Locking identifiers section for details. You may call this function with any identifier regardless of when it was returned, as long as it is present in the tracker memory.

C++ Syntax:

int FSDK_UnlockID(HTracker Tracker, long long ID);

Delphi Syntax:

function FSDK_UnlockID(Tracker: HTracker; ID: int64): integer;

C# Syntax:

int FSDK.UnlockID(int Tracker, long ID);

Java and Android Syntax:

int FSDK.UnlockID(HTracker Tracker, long ID);

Parameters:

  • Tracker - handle of the tracker in which to unlock an identifier.
  • ID - identifier of the subject to unlock.

Return Value:

Returns FSDKE_OK if successful. Returns FSDKE_ID_NOT_FOUND if the specified ID is not present in the tracker memory.

Python Syntax:

def FSDK.UnLockID(tracker: Tracker, ID: int);

def Tracker.UnLockID(ID: int);

Exceptions:

FSDK.IdNotFound


FSDK_PurgeID Function

Removes all facial appearances of the ID from the tracker memory. You must call this function if there was a false acceptance (see the Dealing with false acceptances section) or if you erroneously assigned equal names to different persons.

C++ Syntax:

int FSDK_PurgeID(HTracker Tracker, long long ID);

Delphi Syntax:

function FSDK_PurgeID(Tracker: HTracker; ID: int64): integer;

C# Syntax:

int FSDK.PurgeID(int Tracker, long ID);

Java and Android Syntax:

int FSDK.PurgeID(HTracker Tracker, long ID);

Parameters:

  • Tracker - handle of the tracker in which to purge an identifier.
  • ID - identifier of the subject to purge.

Return Value:

Returns FSDKE_OK if successful. Returns FSDKE_ID_NOT_FOUND if the specified ID is not present in the tracker memory.

Python Syntax:

def FSDK.PurgeID(tracker: Tracker, ID: int);

def Tracker.PurgeID(ID: int);

Exceptions:

FSDK.IdNotFound


FSDK_GetName Function

Returns the name the identifier has been tagged with. You may call this function with any identifier regardless of when it was returned, as long as it is present in the tracker memory.

C++ Syntax:

int FSDK_GetName(HTracker Tracker, long long ID, char * Name, long long MaxSizeInBytes);

Delphi Syntax:

function FSDK_GetName(Tracker: HTracker; ID: int64; Name: PAnsiChar; MaxSizeInBytes: int64): integer;

C# Syntax:

int FSDK.GetName(int Tracker, long ID, out string Name, long MaxSizeInBytes);

Java and Android Syntax:

int FSDK.GetName(int Tracker, long ID, String Name[], long MaxSizeInBytes);

Parameters:

  • Tracker - handle of the tracker in which to retrieve the name.
  • ID - identifier of a subject to retrieve the name of.
  • Name - identifier of the subject whose name is to be retrieved.
  • MaxSizeInBytes - amount of memory allocated for the output string.

Return Value:

Returns FSDKE_OK if successful. Returns FSDKE_INSUFFICIENT_BUFFER_SIZE if there is not enough room to store the output string; however, the output string still fills up all the space available. Returns FSDKE_ID_NOT_FOUND if the specified ID is not present in the tracker memory.

Python Syntax:

def FSDK.GetName(tracker: Tracker, ID: int) -> str;

def Tracker.GetName(ID: int) -> str;

Return Value:

Identifier of the subject whose name is to be retrieved.

Exceptions:

FSDK.IdNotFound


FSDK_SetName Function

Sets the name of an identifier. To erase the name tag, specify an empty name string. When erasing the name tag because of a false acceptance, or because you erroneously assigned equal names to different persons, you must also call the FSDK_PurgeID function (see the Dealing with false acceptances section). The function will unlock the identifier if the name is successfully set.

You may call this function with any identifier regardless of when it was returned, as long as it is present in the tracker memory.

C++ Syntax:

int FSDK_SetName(HTracker Tracker, long long ID, const char * Name);

Delphi Syntax:

function FSDK_SetName(Tracker: HTracker; ID: int64; Name: PAnsiChar): integer;

C# Syntax:

int FSDK.SetName(int Tracker, long ID, string Name);

Java Syntax:

int FSDK.SetName(HTracker Tracker, long ID, String Name);

Parameters:

  • Tracker - handle of the tracker in which to set the name.
  • ID - identifier of the subject whose name is to be set.
  • Name - pointer to the null-terminated string containing the name of an identifier.

Return Value:

Returns FSDKE_OK if successful. Returns FSDKE_ID_NOT_FOUND if the specified ID is not present in the tracker memory.

Returns FSDKE_INSUFFICIENT_TRACKER_MEMORY_LIMIT if there is not enough room to store the identifier's facial appearances in memory. See the Tracker Memory section for details.

Python Syntax:

def FSDK.SetName(tracker: Tracker, ID: int, name: str);

def Tracker.SetName(ID: int, name: str);

Exceptions:

FSDK.IdNotFound


FSDK_GetIDReassignment Function

When provided with a subject's ID received on earlier frames, returns the new subject's ID if there was a merger. See the Understanding Identifiers section for details. If an identifier was not merged, the function returns the same ID value in the output variable. Note that the function does not return an error if an identifier is not present in the tracker memory; instead; the same ID value is returned in the output variable.

C++ Syntax:

int FSDK_GetIDReassignment(HTracker Tracker, long long ID, long long * ReassignedID);

Delphi Syntax:

function FSDK_GetIDReassignment(Tracker: HTracker; ID: int64; ReassignedID: PInt64): integer;

C# Syntax:

int FSDK.GetIDReassignment(int Tracker, long ID, ref long ReassignedID);

Java and Android Syntax:

int FSDK.GetIDReassignment(HTracker Tracker, long ID, long ReassignedID[]);

Parameters:

  • Tracker - handle of the tracker in which to get the reassigned ID value.
  • ID - identifier of the subject whose reassigned identifier is sought.
  • ReassignedID - pointer to the 64-bit integer value that will store the reassigned value of an identifier.

Return Value:

Returns FSDKE_OK if successful.

Python Syntax:

def FSDK.GetIDReassignment(tracker: Tracker, ID: int) -> int;

def Tracker.GetIDReassignment(ID: int) -> int;

Return Value:

Identifier of the subject whose reassigned identifier is sought.

Exceptions:

FSDK.IdNotFound


FSDK_GetSimilarIDCount Function

Returns the number of identifiers that are similar to a given identifier. The function accepts the identifier returned by FSDK_FeedFrame. This identifier should be passed to FSDK_GetSimilarIDCount before the next call of FSDK_FeedFrame with the same tracker. See the Understanding Identifiers section for details.

C++ Syntax:

int FSDK_GetSimilarIDCount(HTracker Tracker, long long ID, long long * Count);

Delphi Syntax:

function FSDK_GetSimilarIDCount(Tracker: HTracker; ID: int64; Count: PInt64): integer;

C# Syntax:

int FSDK.GetSimilarIDCount(int Tracker, long ID, ref long Count);

Java and Android Syntax:

int FSDK.GetSimilarIDCount(HTracker Tracker, long ID, long Count[]);

Parameters:

  • Tracker - handle of the tracker in which to retrieve the number of similar identifiers.
  • ID - identifier of the subject for which to return the number of similar identifiers.
  • Count - pointer to the 64-bit integer value that will store the number of similar identifiers.

Return Value:

Returns FSDKE_OK if successful. Returns FSDKE_ID_NOT_FOUND if the specified ID was not returned by the previous FSDK_FeedFrame call.

Python Syntax:

def FSDK.GetSimilarIDCount(tracker: Tracker, ID: int) -> int;

def Tracker.GetSimilarIDCount(ID: int) -> int;

Return Value:

The number of similar identifiers.

Exceptions:

FSDK.IdNotFound


FSDK_GetSimilarIDList Function

Returns the list of identifiers that are similar to a given identifier. The function accepts the identifier returned by FSDK_FeedFrame. This identifier should be passed to FSDK_GetSimilarIDList before the next call of FSDK_FeedFrame with the same tracker. See the Understanding Identifiers section for details.

C++ Syntax:

int FSDK_GetSimilarIDList(HTracker Tracker, long long ID, long long * SimilarIDList, long long MaxSizeInBytes);

Delphi Syntax:

function FSDK_GetSimilarIDList(Tracker: HTracker; ID: int64; SimilarIDList: PIDArray; MaxSizeInBytes: int64): integer;

C# Syntax:

int FSDK.GetSimilarIDList(int Tracker, long ID, out long[] SimilarIDList, long MaxSizeInBytes);

Java and Android Syntax:

int FSDK.GetSimilarIDList(HTracker Tracker, long ID, long SimilarIDList[], long MaxSizeInBytes);

Parameters:

  • Tracker - handle of the tracker in which to get the list of similar identifiers.
  • ID - identifier of the subject for which to return the list of similar identifiers.
  • SimilarIDList - pointer to the array of 64-bit integer values that will store the list of similar identifiers.
  • MaxSizeInBytes - amount of memory allocated for the output array.

Return Value:

Returns FSDKE_OK if successful. Returns FSDKE_ID_NOT_FOUND if the specified ID was not returned by the previous FSDK_FeedFrame call. Returns FSDKE_INSUFFICIENT_BUFFER_SIZE if there is not enough room to store the output string; however, the output string still fills up all the space available.

Python Syntax:

def FSDK.GetSimilarIDList(tracker: Tracker, ID: int) -> List[int];

def Tracker.GetSimilarIDList(ID: int) -> List[int];

Return Value:

The list of similar identifiers.

Exceptions:

FSDK.IdNotFound


FSDK_GetAllNames Function

Returns the list of names that an identifier can have. The function accepts the identifier returned by FSDK_FeedFrame. This identifier should be passed to FSDK_GetAllNames before the next call of FSDK_FeedFrame with the same tracker. See the Understanding Identifiers and Dealing with false acceptances sections for details.

The function returns all names that belong to a given identifier, and similar identifiers, separated by a semicolon. The output format is:

"Name1[;Name2[;...]]"

You should call this function instead of FSDK_GetName whenever possible, and then parse the returned string for all returned names. Alternatively, you may implement the functionality of FSDK_GetAllNames, calling FSDK_GetName on the given identifier, then FSDK_GetSimilarIDCount and FSDK_GetSimilarIDList to get the list of similar identifiers, then finally call FSDK_GetName on that list.

C++ Syntax:

int FSDK_GetAllNames(HTracker Tracker, long long ID, char * Names, long long MaxSizeInBytes);

Delphi Syntax:

function FSDK_GetAllNames(Tracker: HTracker; ID: int64; Names: PAnsiChar; MaxSizeInBytes: int64): integer;

C# Syntax:

int FSDK.GetAllNames(int Tracker, long ID, out string Names, long MaxSizeInBytes);

Java and Android Syntax:

int FSDK.GetAllNames(HTracker Tracker, long ID, String Names[], long MaxSizeInBytes);

Parameters:

  • Tracker - handle of the tracker in which to retrieve the names.
  • ID - identifier of the subject whose possible names are to be retrieved.
  • Names - pointer to the null-terminated string that will receive the possible names of an identifier.
  • MaxSizeInBytes - amount of memory allocated for the output string.

Return Value:

Returns FSDKE_OK if successful. Returns FSDKE_ID_NOT_FOUND if the specified ID was not returned by the previous FSDK_FeedFrame call. Returns FSDKE_INSUFFICIENT_BUFFER_SIZE if there is not enough room to store the output string; however, the output string still fills up all the space available.

Python Syntax:

def FSDK.GetAllNames(tracker: Tracker, ID: int) -> List[str];

def Tracker.GetAllNames(ID: int) -> List[str];

Return Value:

The list of possible names of an identifier.

Exceptions:

FSDK.IdNotFound


FSDK_SaveTrackerMemoryToFile Function

Saves the memory of a tracker to a file. Note that tracker parameters, along with its face tracking state, are not saved. See the Saving and Loading Tracker Memory section for details.

C++ Syntax:

int FSDK_SaveTrackerMemoryToFile(HTracker Tracker, const char * FileName);

Delphi Syntax:

function FSDK_SaveTrackerMemoryToFile(Tracker: HTracker; FileName: PAnsiChar): integer;

C# Syntax:

int FSDK.SaveTrackerMemoryToFile(int Tracker, string FileName);

Java and Android Syntax:

int FSDK.SaveTrackerMemoryToFile(HTracker Tracker, String FileName);

Parameters:

  • Tracker - handle of the tracker to save.
  • FileName - pointer to the null-terminated string containing the name of the file to which the tracker memory will be saved.

Return Value:

Returns FSDKE_OK if successful. Returns FSDKE_IO_ERROR if an I/O error has occurred.

Python Syntax:

def FSDK.SaveTrackerMemoryToFile(tracker: Tracker, fileName: str);

def Tracker.SaveToFile(fileName: str);

Exceptions:

FSDK.IOError


FSDK_LoadTrackerMemoryFromFile Function

Loads the memory of a tracker from a file. Note that tracker parameters, along with its face tracking state, are not loaded. See the Saving and Loading Tracker Memory section for details.

C++ Syntax:

int FSDK_LoadTrackerMemoryFromFile(HTracker * Tracker, const char * FileName);

Delphi Syntax:

function FSDK_LoadTrackerMemoryFromFile(Tracker: PHTracker; FileName: PAnsiChar): integer;

C# Syntax:

int FSDK.LoadTrackerMemoryFromFile(ref int Tracker, string FileName);

Java and Android Syntax:

int FSDK.LoadTrackerMemoryFromFile(HTracker Tracker, String FileName);

Parameters:

  • Tracker - pointer that will store the handle of the loaded tracker.
  • FileName - pointer to the null-terminated string containing the name of a file from which the tracker memory will be to loaded.

Return Value:

Returns FSDKE_OK if successful. Returns FSDKE_BAD_FILE_FORMAT if the file has unsupported format. Returns FSDKE_UNSUPPORTED_FILE_VERSION if the file was saved with Luxand FaceSDK of an unsupported version. Returns FSDKE_FILE_NOT_FOUND if there was an error opening the file. Returns FSDKE_IO_ERROR if an I/O error has occurred.

Python Syntax:

def FSDK.LoadTrackerMemoryFromFile(fileName: str) -> Tracker;

@staticmethod
def Tracker.FromFile(fileName: str) -> Tracker;

Return Value:

New Tracker object loaded from file.

Exceptions:

  • FSDK.IOError
  • FSDK.BadFileFormat
  • FSDK.UnsupportedFileVersion
  • FSDK.FileNotFound

FSDK_GetTrackerMemoryBufferSize Function

Returns the size of a buffer (in bytes) needed to save the memory of a tracker.

C++ Syntax:

int FSDK_GetTrackerMemoryBufferSize(HTracker Tracker, long long * BufSize);

Delphi Syntax:

function FSDK_GetTrackerMemoryBufferSize(Tracker: HTracker; BufSize: PInt64): integer;

C# Syntax:

int FSDK.GetTrackerMemoryBufferSize(int Tracker, ref long BufSize);

Java and Android Syntax:

int FSDK.GetTrackerMemoryBufferSize(HTracker Tracker, long BufSize[]);

Parameters:

  • Tracker - handle of the tracker whose buffer size needs calculation.
  • BufSize - pointer to the 64-bit integer variable that will store the size of a buffer.

Return Value:

Returns FSDKE_OK if successful.

Python Syntax:

def FSDK.GetTrackerMemoryBufferSize(tracker: Tracker) -> int;

Return Value:

The size of a buffer.


FSDK_SaveTrackerMemoryToBuffer Function

Saves the memory of a tracker to a buffer. Note that tracker parameters, along with its face tracking state, are not saved. See the Saving and Loading Tracker Memory section for details.

C++ Syntax:

int FSDK_SaveTrackerMemoryToBuffer(HTracker Tracker, unsigned char * Buffer, long long MaxSizeInBytes);

Delphi Syntax:

function FSDK_SaveTrackerMemoryToBuffer(Tracker: HTracker; var Buffer; MaxSizeInBytes: int64): integer;

C# Syntax:

int FSDK.SaveTrackerMemoryToBuffer(int Tracker, out byte[] Buffer, long MaxSizeInBytes);

Java and Android Syntax:

int FSDK.SaveTrackerMemoryToBuffer(HTracker Tracker, byte Buffer[]);

Parameters:

  • Tracker - handle of the tracker to save.
  • Buffer - pointer to the buffer to which the tracker memory will be saved.
  • MaxSizeInBytes - amount of memory allocated for the output buffer, in bytes.

Return Value:

Returns FSDKE_OK if successful. Returns FSDKE_INSUFFICIENT_BUFFER_SIZE if there is not enough room to store the output buffer.

Python Syntax:

def Tracker.GetMemory() -> bytes;

def Tracker.ToBytes() -> bytes;

Return Value:

The bytes objects containing tracker memory.


FSDK_LoadTrackerMemoryFromBuffer Function

Loads the memory of a tracker from a buffer. Note that tracker parameters, along with its face tracking state, are not loaded. See the Saving and Loading Tracker Memory section for details.

C++ Syntax:

int FSDK_LoadTrackerMemoryFromBuffer(HTracker * Tracker, const unsigned char * Buffer);

Delphi Syntax:

function FSDK_LoadTrackerMemoryFromBuffer(Tracker: PHTracker; var Buffer): integer;

C# Syntax:

int FSDK.LoadTrackerMemoryFromBuffer(ref int Tracker, byte[] Buffer);

Java and Android Syntax:

int FSDK.LoadTrackerMemoryFromBuffer(HTracker Tracker, byte Buffer[]);

Parameters:

  • Tracker - pointer to store the handle of a loaded tracker.
  • Buffer - pointer to the buffer from which to load the tracker memory.

Return Value:

Returns FSDKE_OK if successful. Returns FSDKE_BAD_FILE_FORMAT if the file has unsupported format. Returns FSDKE_UNSUPPORTED_FILE_VERSION if the file was saved with Luxand FaceSDK of an unsupported version.

Python Syntax:

def FSDK.LoadTrackerMemoryFromBuffer(buffer: bytes) -> Tracker;

@staticmethod
def Tracker.FromMemory(buffer: bytes) -> Tracker;

@staticmethod
def Tracker.FromBytes(buffer: bytes) -> Tracker;

Return Value:

New Tracker objects loaded from a buffer.


FSDK_GetTrackerIDsCount Function

Returns the number of persons known to the tracker.

C++ Syntax:

int FSDK_GetTrackerIDsCount(HTracker Tracker, long long * Count);

Delphi Syntax:

function FSDK_GetTrackerIDsCount(Tracker: HTracker; Count: PInt64): integer;

C# Syntax:

int FSDK.GetTrackerIDsCount(ref int Tracker, ref long Count);

Java and Android Syntax:

int FSDK.GetTrackerIDsCount(HTracker Tracker, long Count[]);

Parameters:

  • Tracker - pointer to store the handle of a tracker.
  • Count - pointer to the buffer to which to store the count of IDs.

Return Value:

Returns FSDKE_OK if successful.

Python Syntax:

def FSDK.GetTrackerIDsCount(tracker: Tracker) -> int;

def Tracker.GetIDsCount() -> int;

Return Value:

The Count of persons.


FSDK_GetTrackerAllIDs Function

Returns all IDs of persons known to the tracker. The number of IDs is defined by FSDK_GetTrackerIDsCount.

C++ Syntax:

int FSDK_GetTrackerAllIDs(HTracker Tracker, long long * IDList, long long MaxSizeInBytes);

Delphi Syntax:

function FSDK_GetTrackerAllIDs(Tracker: HTracker; IDList: PIDArray; MaxSizeInBytes: int64): integer;

C# Syntax:

int FSDK.GetTrackerAllIDs(int Tracker, out long[] IDList, long MaxSizeInBytes);

Java and Android Syntax:

int FSDK.GetTrackerAllIDs(HTracker Tracker, long IDList[], long MaxSizeInBytes);

Parameters:

  • Tracker - handle of the tracker in which to get the list of identifiers.
  • IDList - pointer to the array of 64-bit integer values that will store the list of identifiers.
  • MaxSizeInBytes - amount of memory allocated for the output array.

Return Value:

Returns FSDKE_OK if successful. Returns FSDKE_INSUFFICIENT_BUFFER_SIZE if there is not enough room to store the output string; however, the output string still fills up all the space available.

Python Syntax:

def FSDK.GetTrackerAllIDs(tracker: Tracker) -> List[int];

def Tracker.GetAllIDs() -> List[int];

Return Value:

The list of identifiers.


FSDK_GetTrackerFaceIDsCountForID Function

Returns the number of a person's FaceIDs by its ID.

C++ Syntax:

int FSDK_GetTrackerFaceIDsCountForID(HTracker Tracker, long long ID, long long * Count);

Delphi Syntax:

function FSDK_GetTrackerFaceIDsCountForID(Tracker: HTracker; ID: int64; Count: PInt64): integer;

C# Syntax:

int FSDK.GetTrackerFaceIDsCountForID(ref int Tracker, long ID, ref long Count);

Java and Android Syntax:

int FSDK.GetTrackerFaceIDsCountForID(HTracker Tracker, long ID, long Count[]);

Parameters:

  • Tracker - pointer to store the handle of a loaded tracker.
  • ID - identifier of a person for which to return the number of FaceIDs.
  • Count - pointer to the 64-bit integer value that will store the number of identifiers.

Return Value:

Returns FSDKE_OK if successful.

Python Syntax:

def FSDK.GetTrackerFaceIDsCountForID(tracker: Tracker, ID: int) -> int;

def Tracker.GetFaceIDsCountForID(ID: int) -> int;

Return Value:

The Count of FaceIDs.

Exceptions:

FSDK.IdNotFound


FSDK_GetTrackerFaceIDsForID Function

Returns all FaceIDs of a person with given ID.

C++ Syntax:

int FSDK_GetTrackerFaceIDsForID(HTracker Tracker, long long ID, long long * FaceIDList, long long MaxSizeInBytes);

Delphi Syntax:

function FSDK_GetTrackerFaceIDsForID(Tracker: HTracker; ID: int64; IDList: PIDArray; MaxSizeInBytes: int64): integer;

C# Syntax:

int FSDK.GetTrackerFaceIDsForID(int Tracker, long ID, out long[] IDList, long MaxSizeInBytes);

Java and Android Syntax:

int FSDK.GetTrackerFaceIDsForID(HTracker Tracker, long ID, long IDList[], long MaxSizeInBytes);

Parameters:

  • Tracker - handle of the tracker in which to get the list of similar identifiers.
  • ID - identifier of a person for which to return the list of FaceIDs.
  • IDList - pointer to the array of 64-bit integer values that will store the list of identifiers.
  • MaxSizeInBytes - amount of memory allocated for the output array.

Return Value:

Returns FSDKE_OK if successful. Returns FSDKE_INSUFFICIENT_BUFFER_SIZE if there is not enough room to store the output string; however, the output string still fills up all the space available.

Python Syntax:

def FSDK.GetTrackerFaceIDsForID(tracker: Tracker, ID: int) -> List[int];

def Tracker.GetFaceIDsForID(ID: int) -> List[int];

Return Value:

The list of identifiers.

Exceptions:

FSDK.IdNotFound


FSDK_GetTrackerIDByFaceIID Function

Returns the person's ID by its FaceID.

C++ Syntax:

int FSDK_GetTrackerIDByFaceID(HTracker Tracker, long long FaceID, long long * ID);

Delphi Syntax:

function FSDK_GetTrackerIDByFaceID(Tracker: HTracker; FaceID: int64; ID: PInt64): integer;

C# Syntax:

int FSDK.GetTrackerIDByFaceID(ref int Tracker, long FaceID, ref long ID);

Java and Android Syntax:

int FSDK.GetTrackerIDByFaceID(HTracker Tracker, long FaceID, long ID[]);

Parameters:

  • Tracker - pointer to store the handle of a loaded tracker.
  • FaceID - identifier of a person's FaceID for which to return the ID of a person.
  • ID - pointer to the 64-bit integer value that will store the ID of a person.

Return Value:

Returns FSDKE_OK if successful.

Python Syntax:

def FSDK.GetTrackerIDByFaceID(tracker: Tracker, FaceID: int) -> int;

def Tracker.GetIDByFaceID(FaceID: int) -> int;

Return Value:

The ID of a person.

Exceptions:

FSDK.IdNotFound


FSDK_GetTrackerFaceTemplate Function

This function is used to extract a template from the tracker database for a given FaceID of a person.

C++ Syntax:

int FSDK_GetTrackerFaceTemplate(HTracker Tracker, long long FaceID, FSDK_FaceTemplate * FaceTemplate);

Delphi Syntax:

function FSDK_GetTrackerFaceTemplate(Tracker: HTracker; FaceID: int64; FaceTemplate: PFSDK_FaceTemplate): integer;

C# Syntax:

int FSDK.GetTrackerFaceTemplate(ref int Tracker, long FaceID, out byte[] FaceTemplate);

Java Syntax:

int FSDK.GetTrackerFaceTemplate(HTracker Tracker, long FaceID, FSDK_FaceTemplate.ByReference FaceTemplate);

Android Syntax:

int FSDK.GetTrackerFaceTemplate(HTracker Tracker, long FaceID, FSDK_FaceTemplate FaceTemplate);

Parameters:

  • Tracker - pointer to the handle of a tracker.
  • FaceID - the FaceID of a person for which to extract the face template stored in the tracker database.
  • FaceTemplate - pointer to the FSDK_FaceTemplate structure, used to receive the face template.

Return Value:

Returns FSDKE_OK if successful. If the FaceID is not found, the function returns the FSDKE_FACEID_NOT_FOUND code.

Python Syntax:

def FSDK.GetTrackerFaceTemplate(tracker: Tracker, FaceID: int) -> FaceTemplate;

def Tracker.GetFaceTemplate(FaceID: int) -> FaceTemplate;

Return Value:

The FaceTemplate object.

Exceptions:

FSDK.FaceIdNotFound


FSDK_TrackerCreateID Function

This function creates new person in the tracker with given FaceTemplate and returns its new unique ID and FaceID.

C++ Syntax:

int FSDK_TrackerCreateID(HTracker Tracker, FSDK_FaceTemplate * FaceTemplate, long long * ID, long long * FaceID);

Delphi Syntax:

function FSDK_TrackerCreateID(Tracker: HTracker; FaceTemplate: PFSDK_FaceTemplate; ID: PInt64; FaceID: PInt64): integer;

C# Syntax:

int FSDK.TrackerCreateID(ref int Tracker, ref byte[] FaceTemplate, ref long ID, ref long FaceID);

Java Syntax:

int FSDK.TrackerCreateID(HTracker Tracker, FSDK_FaceTemplate.ByReference FaceTemplate, long ID[], long FaceID[]);

Android Syntax:

int FSDK.TrackerCreateID(HTracker Tracker, FSDK_FaceTemplate FaceTemplate, long ID[], long FaceID[]);

Parameters:

  • Tracker - pointer to the handle of a tracker.
  • FaceTemplate - pointer to the FSDK_FaceTemplate structure to place it in the tracker database.
  • ID - the ID of newly added person.
  • FaceID - the FaceID of newly added person.

Return Value:

Returns FSDKE_OK if successful.

Python Syntax:

def FSDK.TrackerCreateID(tracker: Tracker, FaceID: int) -> Tuple[int]; # (ID, FaceID)

def Tracker.CreateID(FaceID: int) -> Tuple[int]; # (ID, FaceID)

Return Value:

The tuple (ID, FaceID).


FSDK_AddTrackerFaceTemplate Function

This function adds new FaceTemplate to the existing person with ID.

C++ Syntax:

int FSDK_AddTrackerFaceTemplate(HTracker Tracker, long long ID, FSDK_FaceTemplate * FaceTemplate, long long * FaceID);

Delphi Syntax:

function FSDK_AddTrackerFaceTemplate(Tracker: HTracker; ID: int64; FaceTemplate: PFSDK_FaceTemplate; FaceID: PInt64): integer;

C# Syntax:

int FSDK.AddTrackerFaceTemplate(ref int Tracker, long ID, ref byte[] FaceTemplate, ref long FaceID);

Java Syntax:

int FSDK.AddTrackerFaceTemplate(HTracker Tracker, long ID, FSDK_FaceTemplate.ByReference FaceTemplate, long FaceID[]);

Android Syntax:

int FSDK.AddTrackerFaceTemplate(HTracker Tracker, long ID, FSDK_FaceTemplate FaceTemplate, long FaceID[]);

Parameters:

  • Tracker - pointer to the handle of a tracker.
  • ID - the ID of existing person.
  • FaceTemplate - pointer to the FSDK_FaceTemplate structure to place it in the tracker database.
  • FaceID - the pointer to receive new FaceID of face template for the person.

Return Value:

Returns FSDKE_OK if successful. If the ID is not found, the function returns the FSDKE_ID_NOT_FOUND code.

Python Syntax:

def FSDK.AddTrackerFaceTemplate(tracker: Tracker, ID: int, faceTemplate: FaceTemplate) -> int;

def Tracker.AddFaceTemplate(ID: int, faceTemplate: FaceTemplate) -> int;

Return Value:

The FaceID of newly added face template.

Exceptions:

FSDK.IdNotFound


FSDK_DeleteTrackerFace Function

This function removes the face template with given FaceID from the tracker. The person will be removed from the tracker if it has no face templates anymore.

C++ Syntax:

int FSDK_DeleteTrackerFace(HTracker Tracker, long long FaceID);

Delphi Syntax:

function FSDK_DeleteTrackerFace(Tracker: HTracker; FaceID: int64): integer;

C# Syntax:

int FSDK.DeleteTrackerFace(ref int Tracker, long FaceID);

Java Syntax:

int FSDK.DeleteTrackerFace(HTracker Tracker, long FaceID);

Android Syntax:

int FSDK.DeleteTrackerFace(HTracker Tracker, long FaceID);

Parameters:

  • Tracker - pointer to the handle of a tracker.
  • FaceID - the FaceID of existing person for which to remove the face template.

Return Value:

Returns FSDKE_OK if successful. If the FaceID is not found, the function returns the FSDKE_FACEID_NOT_FOUND code.

Python Syntax:

def FSDK.DeleteTrackerFace(tracker: Tracker, FaceID: int);

def Tracker.DeleteFace(FaceID: int);

Exceptions:

FSDK.FaceIdNotFound


FSDK_GetTrackerFaceImage Function

This function returns Image of a face with given FaceID.

C++ Syntax:

int FSDK_GetTrackerFaceImage(HTracker Tracker, long long FaceID, HImage * Image);

Delphi Syntax:

function FSDK_GetTrackerFaceImage(Tracker: HTracker; FaceID: int64; Image: PHImage): integer;

C# Syntax:

int FSDK.GetTrackerFaceImage(ref int Tracker, long FaceID, ref int Image);

Java and Android Syntax:

int FSDK.GetTrackerFaceImage(HTracker Tracker, long FaceID, HImage Image);

Parameters:

  • Tracker - pointer to the handle of a tracker.
  • FaceID - the FaceID of existing face template for which to extract an image.
  • Image - the pointer to HImage for receiving the newly created image handle.

Return Value:

Returns FSDKE_OK if successful. If the FaceID is not found, the function returns the FSDKE_FACEID_NOT_FOUND code. If face template has no image, the code FSDKE_FACEIMAGE_NOT_FOUND is returned.

Python Syntax:

def FSDK.GetTrackerFaceImage(tracker: Tracker, FaceID: int) -> Image;

def Tracker.GetFaceImage(FaceID: int) -> Image;

Return Value:

An image of face template.

Exceptions:

FSDK.FaceIdNotFound


FSDK_SetTrackerFaceImage Function

This function places an Image for a face with given FaceID to the tracker. The Image should be 96x96 pixels in grey mode (8 bpp). If an image with this FaceID is already exists, it is replaced by the new one.

C++ Syntax:

int FSDK_SetTrackerFaceImage(HTracker Tracker, long long FaceID, HImage Image);

Delphi Syntax:

function FSDK_SetTrackerFaceImage(Tracker: HTracker; FaceID: int64; Image: HImage): integer;

C# Syntax:

int FSDK.SetTrackerFaceImage(ref int Tracker, long FaceID, int Image);

Java and Android Syntax:

int FSDK.SetTrackerFaceImage(HTracker Tracker, long FaceID, HImage Image);

Parameters:

  • Tracker - pointer to the handle of a tracker.
  • FaceID - the FaceID of existing face template for which to save an image.
  • Image - handle to the image to be stored in the tracker.

Return Value:

Returns FSDKE_OK if successful. If the FaceID is not found, the function returns the FSDKE_FACEID_NOT_FOUND code.

Python Syntax:

def FSDK.SetTrackerFaceImage(tracker: Tracker, FaceID: int, image: Image);

def Tracker.SetFaceImage(FaceID: int, image: Image);

Exceptions:

FSDK.FaceIdNotFound


FSDK_DeleteTrackerFaceImage Function

This function removes an image from the tracker with given FaceID.

C++ Syntax:

int FSDK_DeleteTrackerFaceImage(HTracker Tracker, long long FaceID);

Delphi Syntax:

function FSDK_DeleteTrackerFaceImage(Tracker: HTracker; FaceID: int64): integer;

C# Syntax:

int FSDK.DeleteTrackerFaceImage(ref int Tracker, long FaceID);

Java and Android Syntax:

int FSDK.DeleteTrackerFaceImage(HTracker Tracker, long FaceID);

Parameters:

  • Tracker - pointer to the handle of a tracker.
  • FaceID - the FaceID of existing face template for which to remove an image.

Return Value:

Returns FSDKE_OK if successful. If the FaceID is not found, the function returns the FSDKE_FACEID_NOT_FOUND code.

Python Syntax:

def FSDK.DeleteTrackerFaceImage(tracker: Tracker, FaceID: int);

def Tracker.DeleteFaceImage(FaceID: int);

Exceptions:

FSDK.FaceIdNotFound


FSDK_TrackerMatchFaces Function

The function compares the FaceTemplate with all templates stored in the tracker, finds the IDs of individuals that match the Threshold, and writes them to a buffer IDSimilarity structures in descending order of probability, starting with the highest. The number of found IDs is placed in the Count field.

C++ Syntax:

typedef struct {
    long long ID;
    float similarity;
} IDSimilarity;

int FSDK_TrackerMatchFaces(HTracker Tracker, FSDK_FaceTemplate * FaceTemplate, float Threshold, IDSimilarity * Buffer, long long * Count, long long MaxSizeInBytes);

Delphi Syntax:

IDSimilarity = record
    ID: int64;
    Similarity: single;
end;
PIDSimilarity = ^IDSimilarity;

function FSDK_TrackerMatchFaces(Tracker: HTracker; FaceTemplate: PFSDK_FaceTemplate; Threshold: single; Buffer: PIDSimilarity; Count: PInt64; MaxSizeInBytes: int64): integer;

C# Syntax:

public struct IDSimilarity {
    public long ID;
    public float similarity;
}

int FSDK.TrackerMatchFaces(ref int Tracker, ref byte[] FaceTemplate, float Threshold, out IDSimilarity[] Buffer, out long Count, long MaxSizeInBytes);

Java and Android Syntax:

The class IDSimilarity contains the following fields:

public long ID;
public float similarity;
int FSDK.TrackerMatchFaces(HTracker Tracker, FSDK_FaceTemplate.ByReference FaceTemplate, ...);

Parameters:

  • Tracker - pointer to the handle of a tracker.
  • FaceTemplate - pointer to the FSDK_FaceTemplate structure using it for comparison with all templates stored in the tracker.
  • Threshold - the similarity threshold for matching.
  • Buffer - the pointer to buffer of IDSimilarity structures to receive comparison results.
  • Count - pointer to the 64-bit integer value that will store the number of found IDs.
  • MaxSizeInBytes - amount of memory allocated for the output array.

Return Value:

Returns FSDKE_OK if successful. If the ID is not found, the function returns the FSDKE_ID_NOT_FOUND code.

Python Syntax:

class IDSimilarity(ctypes.Structure):
    _fields_ = ("ID", c_longlong), ("similarity", c_float)

def FSDK.TrackerMatchFaces(tracker: Tracker, faceTemplate: FaceTemplate, threshold: float, maxCount: int = 5) -> List[IDSimilarity];

def Tracker.MatchFaces(ID: int, faceTemplate: FaceTemplate, threshold: float, maxCount: int = 5) -> int;

Return Value:

The FaceID of newly added face template.

Exceptions:

FSDK.IdNotFound