Hide navigation sidebar
Hide table of contents sidebar
Skip to content
Back to top
Toggle table of contents sidebar

# FaceIndexer.addTemplate Method

Module: FaceIndexer

## Definition

Adds a template to the Face Indexer.

Note

This function is thread safe with other AddTemplate() calls but not with SearchTemplates() calls.

Python

    add_template(self, face_template: FaceTemplate, id: str) -> None

Parameters

> `face_template` FaceTemplate
> in Face template to add to the face indexer.
> `id` str
> in ID of the added face template.

Exceptions

> FaceException
> An error has occurred during Face Library execution.

Dart

    void addTemplate(FaceTemplate faceTemplate, String? id)

Parameters

> `faceTemplate` FaceTemplate
> in Face template to add to the face indexer.
> `id` String
> in ID of the added face template.

Exceptions

> FaceException
> An error has occurred during Face Library execution.

C#

    public void AddTemplate(FaceTemplate faceTemplate, string id)

Parameters

> `faceTemplate` FaceTemplate
> in Face template to add to the face indexer.
> `id` string
> in ID of the added face template.

Exceptions

> FaceException
> An error has occurred during Face Library execution.

Java

    public void addTemplate(FaceTemplate faceTemplate, String id) throws FaceException

Parameters

> `faceTemplate` FaceTemplate
> in Face template to add to the face indexer.
> `id` String
> in ID of the added face template.

Exceptions

> FaceException
> An error has occurred during Face Library execution.

Swift

    public func addTemplate(faceTemplate: FaceTemplate, id: String) throws

Parameters

> `faceTemplate` FaceTemplate
> in Face template to add to the face indexer.
> `id` String
> in ID of the added face template.

Exceptions

> FaceException
> An error has occurred during Face Library execution.

C

    int id3FaceIndexer_AddTemplate (
        ID3_FACE_INDEXER hFaceIndexer,
        ID3_FACE_TEMPLATE hFaceTemplate,
        const char * id)

Parameters

> `hFaceIndexer` ID3_FACE_INDEXER
> in Handle to the FaceIndexer object.
> `hFaceTemplate` ID3_FACE_TEMPLATE
> in Face template to add to the face indexer.
> `id` const char *
> in ID of the added face template.

Returns

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