Luxand FaceSDK – 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 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();

Return Value:

Note.

  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);

Return Value:

None.

Note:

The type of parameterValue can be of types: str, int, float ot 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);

Return Value:

None.

Note:

Keyword argumets 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 IdentifiersTracker 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.

Note:

The list of identifiers of the tracked faces.

  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. ReturnsFSDKE_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. ReturnsFSDKE_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);

Return Value:

None.

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);

Return Value:

None.

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);

Return Value:

None.

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);

Return Value:

None.

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 AndroidSyntax:

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);

Return Value:

None.

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 currently tracked faces.

C++ Syntax:

int FSDK_GetTrackerIDsCount(HTracker Tracker, int * Count);

Delphi Syntax:

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

C# Syntax:

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

Java and Android Syntax:

int FSDK.GetTrackerIDsCount(HTracker Tracker, IntByReference Count);

Parameters:

Tracker – handle to the tracker.

Count – pointer to an integer variable that receives the number of tracked faces.

Return Value:

Returns FSDKE_OK if successful.

Python Syntax:

def Tracker.GetIDsCount() -> int;

Return Value:

Number of tracked faces.

  FSDK_GetTrackerAllIDs Function

Returns IDs of all currently tracked faces.

C++ Syntax:

int FSDK_GetTrackerAllIDs(HTracker Tracker, long long * IDs);

Delphi Syntax:

function FSDK_GetTrackerAllIDs(Tracker: HTracker; IDs: PInt64): integer;

C# Syntax:

int FSDK.GetTrackerAllIDs(int Tracker, long[] IDs);

Java and Android Syntax:

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

Parameters:

Tracker – handle to the tracker.

IDs – an array of longs to which IDs will be written. The array should be large enough to hold the IDs of all tracked faces. Call the FSDK_GetTrackerIDsCount function to determine the necessary size of the IDs array.

Return Value:

Returns FSDKE_OK if successful.

Python Syntax:

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

Return Value:

An array of IDs of all tracked faces.

  FSDK_GetTrackerFaceIDsCountForID Function

Returns the number of FaceIDs associated with a single ID.

C++ Syntax:

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

Delphi Syntax:

function FSDK_GetTrackerFaceIDsCountForID(Tracker: HTracker; ID: Int64; Count: PInteger): integer;

C# Syntax:

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

Java and Android Syntax:

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

Parameters:

Tracker – handle to the tracker.

ID – ID of the tracked face.

Count – pointer to an integer variable that receives the number of FaceIDs associated with the ID.

Return Value:

Returns FSDKE_OK if successful. Returns FSDKE_ID_NOT_FOUND if the ID is not found in the tracker.

Python Syntax:

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

Return Value:

Number of FaceIDs associated with the ID.

  FSDK_GetTrackerFaceIDsForID Function

Returns FaceIDs associated with a single ID.

C++ Syntax:

int FSDK_GetTrackerFaceIDsForID(HTracker Tracker, long long ID, long long * FaceIDs);

Delphi Syntax:

function FSDK_GetTrackerFaceIDsForID(Tracker: HTracker; ID: Int64; FaceIDs: PInt64): integer;

C# Syntax:

int FSDK.GetTrackerFaceIDsForID(int Tracker, long ID, long[] FaceIDs);

Java and Android Syntax:

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

Parameters:

Tracker – handle to the tracker.

ID – ID of the tracked face.

FaceIDs – an array of longs to which FaceIDs will be written. The array should be large enough to hold the FaceIDs of all faces associated with the ID. Call the FSDK_GetTrackerFaceIDsCountForID function to determine the necessary size of the FaceIDs array.

Return Value:

Returns FSDKE_OK if successful. Returns FSDKE_ID_NOT_FOUND if the ID is not found in the tracker.

Python Syntax:

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

Return Value:

An array of FaceIDs associated with the ID.

  FSDK_GetTrackerIDByFaceIID Function

Returns the ID associated with a FaceID.

C++ Syntax:

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

Delphi Syntax:

function FSDK_GetTrackerIDByFaceIID(Tracker: HTracker; FaceID: Int64; ID: PInt64): integer;

C# Syntax:

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

Java and Android Syntax:

int FSDK.GetTrackerIDByFaceIID(HTracker Tracker, long FaceID, LongByReference ID);

Parameters:

Tracker – handle to the tracker.

FaceID – FaceID of the tracked face.

ID – pointer to a long long variable that receives the ID associated with the FaceID.

Return Value:

Returns FSDKE_OK if successful. Returns FSDKE_FACEID_NOT_FOUND if the FaceID is not found in the tracker.

Python Syntax:

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

Return Value:

ID associated with the FaceID.

  FSDK_GetTrackerFaceTemplate Function

Retrieves a face template for a FaceID. If a face template is not assigned to the FaceID, the function returns an error. The tracker should have RecognitionPrecision parameter set to 1 for this function to work.

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(int Tracker, long FaceID, ref FSDK.TFaceTemplate FaceTemplate);

Java and Android Syntax:

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

Parameters:

Tracker – handle to the tracker.

FaceID – FaceID of the tracked face.

FaceTemplate – pointer to a FSDK_FaceTemplate structure that receives the face template.

Return Value:

Returns FSDKE_OK if successful. Returns FSDKE_FACEID_NOT_FOUND if the FaceID is not found in the tracker. Returns FSDKE_INVALID_ARGUMENT if RecognitionPrecision is not set to 1.

Python Syntax:

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

Return Value:

Face template for the FaceID.

  FSDK_TrackerCreateID Function

Creates a new ID in the tracker.

C++ Syntax:

int FSDK_TrackerCreateID(HTracker Tracker, long long * ID);

Delphi Syntax:

function FSDK_TrackerCreateID(Tracker: HTracker; ID: PInt64): integer;

C# Syntax:

int FSDK.TrackerCreateID(int Tracker, ref long ID);

Java and Android Syntax:

int FSDK.TrackerCreateID(HTracker Tracker, LongByReference ID);

Parameters:

Tracker – handle to the tracker.

ID – pointer to a long long variable that receives the new ID.

Return Value:

Returns FSDKE_OK if successful.

Python Syntax:

def Tracker.CreateID() -> int;

Return Value:

New ID.

  FSDK_AddTrackerFaceTemplate Function

Adds a face template to the tracker and assigns it to the specified ID. Call FSDK_TrackerCreateID to create a new ID. If the ID already exists in the tracker, this function replaces the face template associated with it. The tracker should have RecognitionPrecision parameter set to 1 for this function to work.

C++ Syntax:

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

Delphi Syntax:

function FSDK_AddTrackerFaceTemplate(Tracker: HTracker; ID: Int64; FaceTemplate: PFSDK_FaceTemplate): integer;

C# Syntax:

int FSDK.AddTrackerFaceTemplate(int Tracker, long ID, ref FSDK.TFaceTemplate FaceTemplate);

Java and Android Syntax:

int FSDK.AddTrackerFaceTemplate(HTracker Tracker, long ID, FSDK.TFaceTemplate FaceTemplate);

Parameters:

Tracker – handle to the tracker.

ID – ID to which the face template will be assigned.

FaceTemplate – pointer to a FSDK_FaceTemplate structure containing the face template to add.

Return Value:

Returns FSDKE_OK if successful. Returns FSDKE_INVALID_ARGUMENT if RecognitionPrecision is not set to 1.

Python Syntax:

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

  FSDK_DeleteTrackerFace Function

Deletes a FaceID from the tracker. The associated ID, along with all its images and templates, will remain in the tracker, unless this was the last FaceID associated with the ID.

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(int Tracker, long FaceID);

Java and Android Syntax:

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

Parameters:

Tracker – handle to the tracker.

FaceID – FaceID of the tracked face to delete.

Return Value:

Returns FSDKE_OK if successful. Returns FSDKE_FACEID_NOT_FOUND if the FaceID is not found in the tracker.

Python Syntax:

def Tracker.DeleteFace(FaceID: int) -> None;

  FSDK_GetTrackerFaceImage Function

Retrieves an image of a face for a FaceID. If an image is not assigned to the FaceID, the function returns an error. The tracker should have StoreDetectedFaces parameter set to 1 for this function to work.

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(int Tracker, long FaceID, ref int Image);

Java and Android Syntax:

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

Parameters:

Tracker – handle to the tracker.

FaceID – FaceID of the tracked face.

Image – pointer to an HImage handle that receives the image. Free it with FSDK_FreeImage.

Return Value:

Returns FSDKE_OK if successful. Returns FSDKE_FACEID_NOT_FOUND if the FaceID is not found in the tracker. Returns FSDKE_INVALID_ARGUMENT if StoreDetectedFaces is not set to 1. Returns FSDKE_FACEIMAGE_NOT_FOUND if no image is assigned to the FaceID.

Python Syntax:

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

Return Value:

Face image for the FaceID.

  FSDK_SetTrackerFaceImage Function

Sets an image for a FaceID in the tracker. The tracker should have StoreDetectedFaces parameter set to 1 for this function to work.

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(int Tracker, long FaceID, int Image);

Java and Android Syntax:

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

Parameters:

Tracker – handle to the tracker.

FaceID – FaceID of the tracked face.

Image – handle to the image to set.

Return Value:

Returns FSDKE_OK if successful. Returns FSDKE_FACEID_NOT_FOUND if the FaceID is not found in the tracker. Returns FSDKE_INVALID_ARGUMENT if StoreDetectedFaces is not set to 1.

Python Syntax:

def Tracker.SetFaceImage(FaceID: int, Image: FSDK.CImage) -> None;

  FSDK_DeleteTrackerFaceImage Function

Deletes an image assigned to a FaceID in the tracker.

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(int Tracker, long FaceID);

Java and Android Syntax:

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

Parameters:

Tracker – handle to the tracker.

FaceID – FaceID of the tracked face.

Return Value:

Returns FSDKE_OK if successful. Returns FSDKE_FACEID_NOT_FOUND if the FaceID is not found in the tracker. Returns FSDKE_FACEIMAGE_NOT_FOUND if no image is assigned to the FaceID.

Python Syntax:

def Tracker.DeleteFaceImage(FaceID: int) -> None;

  IDSimilarity Structure

Structure to hold ID and similarity values returned by FSDK_TrackerMatchFaces function.

C++ Syntax:

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

Delphi Syntax:

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

Java and Android Syntax:

The class IDSimilarity contains the following fields:
    public long ID;
    public float similarity;

Python Syntax:

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

  FSDK_TrackerMatchFaces Function

Matches face templates of two FaceIDs. The tracker should have RecognitionPrecision parameter set to 1 for this function to work.

C++ Syntax:

int FSDK_TrackerMatchFaces(HTracker Tracker, long long FaceID1, long long FaceID2, float * Similarity);

Delphi Syntax:

function FSDK_TrackerMatchFaces(Tracker: HTracker; FaceID1: Int64; FaceID2: Int64; Similarity: PSingle): integer;

C# Syntax:

int FSDK.TrackerMatchFaces(int Tracker, long FaceID1, long FaceID2, ref float Similarity);

Java and Android Syntax:

int FSDK.TrackerMatchFaces(HTracker Tracker, long FaceID1, long FaceID2, FloatByReference Similarity);

Parameters:

Tracker – handle to the tracker.

FaceID1 – FaceID of the first face.

FaceID2 – FaceID of the second face.

Similarity – pointer to a float variable that receives the similarity value.

Return Value:

Returns FSDKE_OK if successful. Returns FSDKE_FACEID_NOT_FOUND if any of the FaceIDs is not found in the tracker. Returns FSDKE_INVALID_ARGUMENT if RecognitionPrecision is not set to 1.

Python Syntax:

def Tracker.MatchFaces(FaceID1: int, FaceID2: int) -> float;

Return Value:

Similarity value.

 

Next chapterMulti-Core Support

Contents

Get in touch

Luxand, Inc.
205 Van Buren Street
Suite 120-047
Herndon, VA
20170
USA
Freephone:
+1 800 471 5636

Join our newsletter

And always stay informed of the latest company news and events!

Sign up >>

DMCA.com Protection Status