eu.id3.face

## Class FaceTemplate

- java.lang.Object
- - eu.id3.face.FaceTemplate

- All Implemented Interfaces:
    java.io.Serializable, java.lang.AutoCloseable

      public class FaceTemplate
      extends java.lang.Object
      implements java.lang.AutoCloseable, java.io.Serializable

  Represents a face template.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `FaceTemplate()` Creates a new instance of the FaceTemplate class.
    `FaceTemplate(long handle)` Creates a new instance of the FaceTemplate class.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `FaceTemplate` | `clone()` Creates a copy of the FaceTemplate object.
    `void` | `close()` Releases all resources used by this FaceTemplate.
    `protected void` | `finalize()` Finalizer for this class.
    `static FaceTemplate` | `fromBuffer(byte[] data)` Imports the face template object from a buffer.
    `static FaceTemplate` | `fromFile(java.lang.String path)` Imports the face template object from a file.
    `FaceTemplateFormat` | `getFormat()` Gets the format of the face template.
    `long` | `getHandle()` Gets the native handle.
    `int` | `getQuality()` Gets the quality of the face template.
    `byte[]` | `toBdt()` Exports the face template object to a Biometric Data Template (BDT) buffer.
    `byte[]` | `toBit(int threshold, int referenceDataQualifier)` Exports the face template as a Biometric Information Template (BIT) for enrolment on a smart card equipped with id3 Match-on-Card technology.
    `byte[]` | `toBuffer()` Exports the face template object to a buffer.
    `void` | `toFile(java.lang.String path)` Exports the face template object to a file.
    `void` | `update(FaceTemplate newFaceTemplate)` Updates the face template by combining it with the specified face template.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### FaceTemplate

          public FaceTemplate()
                       throws FaceException

      Creates a new instance of the FaceTemplate class.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### FaceTemplate

          public FaceTemplate(long handle)
                       throws FaceException

      Creates a new instance of the FaceTemplate class.
      Parameters:
        `handle` - Handle to the FaceTemplate.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

  - ### Method Detail

    - #### close

          public void close()

      Releases all resources used by this FaceTemplate.
      Specified by:
        `close` in interface `java.lang.AutoCloseable`

    - #### finalize

          protected void finalize()

      Finalizer for this class. Finalizers are deprecated since Java 9+. This method is not guaranteed to be called. To release all memory held by this class please be sure to call the close() method.
      Overrides:
        `finalize` in class `java.lang.Object`

    - #### getHandle

          public long getHandle()

      Gets the native handle.
      Returns:
        The native handle.

    - #### clone

          public FaceTemplate clone()
                             throws FaceException

      Creates a copy of the FaceTemplate object.
      Overrides:
        `clone` in class `java.lang.Object`
      Returns:
        The newly created FaceTemplate object.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### getFormat

          public FaceTemplateFormat getFormat()
                                       throws FaceException

      Gets the format of the face template.
      Returns:
        Format of the face template.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### getQuality

          public int getQuality()
                         throws FaceException

      Gets the quality of the face template.
      Returns:
        Quality of the face template.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### fromBuffer

          public static FaceTemplate fromBuffer(byte[] data)
                                         throws FaceException

      Imports the face template object from a buffer.
      Parameters:
        `data` - Buffer to import the face template object from.
      Returns:
        The newly created face template.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### fromFile

          public static FaceTemplate fromFile(java.lang.String path)
                                       throws FaceException

      Imports the face template object from a file.
      Parameters:
        `path` - Path to the file to import the face template object from.
      Returns:
        The newly created face template.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### toBdt

          public byte[] toBdt()
                       throws FaceException

      Exports the face template object to a Biometric Data Template (BDT) buffer. This buffer can only be used with id3 Face Match on Card specific implementations to verify a face template.
      Returns:
        A buffer that receives the biometric data template.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### toBit

          public byte[] toBit(int threshold,
                              int referenceDataQualifier)
                       throws FaceException

      Exports the face template as a Biometric Information Template (BIT) for enrolment on a smart card equipped with id3 Match-on-Card technology. Note: The threshold value is required and should be set according to the used Face Encoder and desired security level. Important: The reference data qualifier (RDQ) should be defined in accordance with the smart card application specifications.
      Parameters:
        `threshold` - The decision threshold, from 0 to 653535, to be applied during the face comparison on the smart card. See FaceMatcherThreshold for a list of typical values.
        `referenceDataQualifier` - Reference data qualifier.
      Returns:
        A buffer that receives the biometric information template.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### toBuffer

          public byte[] toBuffer()
                          throws FaceException

      Exports the face template object to a buffer.
      Returns:
        The buffer that receives the face template.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### toFile

          public void toFile(java.lang.String path)
                      throws FaceException

      Exports the face template object to a file.
      Parameters:
        `path` - Path to the file to export the face template object to.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### update

          public void update(FaceTemplate newFaceTemplate)
                      throws FaceException

      Updates the face template by combining it with the specified face template.
      Parameters:
        `newFaceTemplate` - New face template to combine.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

Copyright © id3 Technologies. All rights reserved. eu.id3.face