FaceEncoder.createTemplate Method

Module: FaceEncoder

Definition

Extracts the unique features of a detected face and store them in a FaceTemplate.

Warning

A minimum interocular distance (IOD) of 30 pixels for the detected face is required for this function, below this value it will output an error.

Important

Loading a FaceEncoder model is required to use this function.

create_template(self, image: Image, detected_face: DetectedFace) -> FaceTemplate

Parameters

image Image
in Source image to process.

detected_face DetectedFace
in Detected face to process.

Returns

The generated face template.

Exceptions

An error has occurred during Face Library execution.
FaceTemplate createTemplate(Image image, DetectedFace detectedFace)

Parameters

image Image
in Source image to process.

detectedFace DetectedFace
in Detected face to process.

Returns

The generated face template.

Exceptions

An error has occurred during Face Library execution.
public FaceTemplate CreateTemplate(Image image, DetectedFace detectedFace)

Parameters

image Image
in Source image to process.

detectedFace DetectedFace
in Detected face to process.

Returns

The generated face template.

Exceptions

An error has occurred during Face Library execution.
public FaceTemplate createTemplate(Image image, DetectedFace detectedFace) throws FaceException

Parameters

image Image
in Source image to process.

detectedFace DetectedFace
in Detected face to process.

Returns

The generated face template.

Exceptions

An error has occurred during Face Library execution.
public func createTemplate(image: Image, detectedFace: DetectedFace) throws -> FaceTemplate

Parameters

image Image
in Source image to process.

detectedFace DetectedFace
in Detected face to process.

Returns

The generated face template.

Exceptions

An error has occurred during Face Library execution.
int id3FaceEncoder_CreateTemplate (
    ID3_FACE_ENCODER hFaceEncoder,
    ID3_FACE_IMAGE hImage,
    ID3_DETECTED_FACE hDetectedFace,
    ID3_FACE_TEMPLATE hFaceTemplate)

Parameters

hFaceEncoder ID3_FACE_ENCODER
in Handle to the FaceEncoder object.

in Source image to process.

hDetectedFace ID3_DETECTED_FACE
in Detected face to process.

hFaceTemplate ID3_FACE_TEMPLATE
out The generated face template.

Returns

int
An error code.
See id3FaceError file for the list of possible error codes.