# FaceEncoder class

Extracts facial features and encodes face templates.

Implemented types
  - Finalizable

## Constructors

FaceEncoder()
  Creates a new instance of the FaceEncoder class.
FaceEncoder.fromHandle(Pointer<id3FaceEncoder> handle)
  Creates a new instance of the FaceEncoder class.

## Properties

handle → Pointer<id3FaceEncoder>
  Gets the native handle. return The native handle.
  no setter
hashCode → int
  The hash code for this object.
  no setter inherited
minimalIod ↔ int
  Minimal interocular distance (IOD) in pixels required to perform a face encoding. Hint: Default value is 30 pixels. It is not recommended to change this value. Warning: Reducing the minimal required IOD to encode smaller face images may create unreliable face templates and significantly degrade recognition performances.
  getter/setter pair
model ↔ FaceModel
  Model used to create templates. Hint: Default value is FaceEncoder9A which is the best available algorithm in this SDK in terms of accuracy. Some better accuracy/speed balances can be found by choosing another model.
  getter/setter pair
processingUnit ↔ ProcessingUnit
  Processing unit where to run the encoding process. Hint: Default value is CPU.
  getter/setter pair
runtimeType → Type
  A representation of the runtime type of the object.
  no setter inherited
threadCount ↔ int
  Number of threads to be used for template encoding. Hint: Default value is 1. Allocating more than one thread can increase the speed of the process.
  getter/setter pair

## Methods

computeQuality(Image image, DetectedFace detectedFace) → int
  Computes the quality of a detected face. Here, quality expresses the match capability of an image: a high quality image will generate less match errors (false acceptance or false rejection) than a low quality one. 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 the `FaceEncodingQualityEstimator` model is required to use this function.
createTemplate(Image image, DetectedFace detectedFace) → FaceTemplate
  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.
dispose() → void
  Releases all resources used by this FaceEncoder.
getMinimalIod() → int
  Gets the minimal interocular distance (IOD) in pixels required to perform a face encoding. Hint: Default value is 30 pixels. It is not recommended to change this value. Warning: Reducing the minimal required IOD to encode smaller face images may create unreliable face templates and significantly degrade recognition performances.
getModel() → FaceModel
  Gets the model used to create templates. Hint: Default value is FaceEncoder9A which is the best available algorithm in this SDK in terms of accuracy. Some better accuracy/speed balances can be found by choosing another model.
getProcessingUnit() → ProcessingUnit
  Gets the processing unit where to run the encoding process. Hint: Default value is CPU.
getThreadCount() → int
  Gets the number of threads to be used for template encoding. Hint: Default value is 1. Allocating more than one thread can increase the speed of the process.
noSuchMethod(Invocation invocation) → dynamic
  Invoked when a nonexistent method or property is accessed.
  inherited
setMinimalIod(int minimalIod) → void
  Sets the minimal interocular distance (IOD) in pixels required to perform a face encoding. Hint: Default value is 30 pixels. It is not recommended to change this value. Warning: Reducing the minimal required IOD to encode smaller face images may create unreliable face templates and significantly degrade recognition performances.
setModel(FaceModel model) → void
  Sets the model used to create templates. Hint: Default value is FaceEncoder9A which is the best available algorithm in this SDK in terms of accuracy. Some better accuracy/speed balances can be found by choosing another model.
setProcessingUnit(ProcessingUnit processingUnit) → void
  Sets the processing unit where to run the encoding process. Hint: Default value is CPU.
setThreadCount(int threadCount) → void
  Sets the number of threads to be used for template encoding. Hint: Default value is 1. Allocating more than one thread can increase the speed of the process.
toString() → String
  A string representation of this object.
  inherited
warmUp() → void
  Gets the face encoder module ready to work by initializing all its internal memory layout. This function can be called after setting all the parameters of the face encoder module. Calling this function is not mandatory as the internal memory layout is automatically initialized in the first call to createTemplate() if missing. Important: Loading a `FaceEncoder` is required to use this function.

## Operators

operator ==(Object other) → bool
  The equality operator.
  inherited