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

# FaceIndexer.searchTemplate Method

Module: FaceIndexer

## Definition

Performs a one-to-many search of a face template probe against a previously initialized face indexer and outputs a candidate list.

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

Python

    search_template(self, probe: FaceTemplate, max_candidates: int) -> FaceCandidateList

Parameters

> `probe` FaceTemplate
> in The face template probe.
> `max_candidates` int
> in Maximum number of candidates in the candidate list.

Returns

> FaceCandidateList
> The list of candidates sorted by decreasing match score.

Exceptions

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

Dart

    FaceCandidateList searchTemplate(FaceTemplate probe, int maxCandidates)

Parameters

> `probe` FaceTemplate
> in The face template probe.
> `maxCandidates` int
> in Maximum number of candidates in the candidate list.

Returns

> FaceCandidateList
> The list of candidates sorted by decreasing match score.

Exceptions

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

C#

    public FaceCandidateList SearchTemplate(FaceTemplate probe, int maxCandidates)

Parameters

> `probe` FaceTemplate
> in The face template probe.
> `maxCandidates` int
> in Maximum number of candidates in the candidate list.

Returns

> FaceCandidateList
> The list of candidates sorted by decreasing match score.

Exceptions

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

Java

    public FaceCandidateList searchTemplate(FaceTemplate probe, int maxCandidates) throws FaceException

Parameters

> `probe` FaceTemplate
> in The face template probe.
> `maxCandidates` int
> in Maximum number of candidates in the candidate list.

Returns

> FaceCandidateList
> The list of candidates sorted by decreasing match score.

Exceptions

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

Swift

    public func searchTemplate(probe: FaceTemplate, maxCandidates: Int32) throws -> FaceCandidateList

Parameters

> `probe` FaceTemplate
> in The face template probe.
> `maxCandidates` Int32
> in Maximum number of candidates in the candidate list.

Returns

> FaceCandidateList
> The list of candidates sorted by decreasing match score.

Exceptions

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

C

    int id3FaceIndexer_SearchTemplate (
        ID3_FACE_INDEXER hFaceIndexer,
        ID3_FACE_TEMPLATE hProbe,
        int maxCandidates,
        ID3_FACE_CANDIDATE_LIST hCandidates)

Parameters

> `hFaceIndexer` ID3_FACE_INDEXER
> in Handle to the FaceIndexer object.
> `hProbe` ID3_FACE_TEMPLATE
> in The face template probe.
> `maxCandidates` int
> in Maximum number of candidates in the candidate list.
> `hCandidates` ID3_FACE_CANDIDATE_LIST
> out The list of candidates sorted by decreasing match score.

Returns

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