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

# FaceMatcher.compareTemplates Method

Module: FaceMatcher

## Definition

Compares two templates and outputs a comparison score.

Python

    compare_templates(self, reference: FaceTemplate, probe: FaceTemplate) -> int

Parameters

> `reference` FaceTemplate
> in Reference template.
> `probe` FaceTemplate
> in Probe template.

Returns

> `int`
> The comparison score, in the range [0;65535].

Exceptions

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

Dart

    int compareTemplates(FaceTemplate reference, FaceTemplate probe)

Parameters

> `reference` FaceTemplate
> in Reference template.
> `probe` FaceTemplate
> in Probe template.

Returns

> `int`
> The comparison score, in the range [0;65535].

Exceptions

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

C#

    public int CompareTemplates(FaceTemplate reference, FaceTemplate probe)

Parameters

> `reference` FaceTemplate
> in Reference template.
> `probe` FaceTemplate
> in Probe template.

Returns

> `int`
> The comparison score, in the range [0;65535].

Exceptions

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

Java

    public int compareTemplates(FaceTemplate reference, FaceTemplate probe) throws FaceException

Parameters

> `reference` FaceTemplate
> in Reference template.
> `probe` FaceTemplate
> in Probe template.

Returns

> `int`
> The comparison score, in the range [0;65535].

Exceptions

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

Swift

    public func compareTemplates(reference: FaceTemplate, probe: FaceTemplate) throws -> Int32

Parameters

> `reference` FaceTemplate
> in Reference template.
> `probe` FaceTemplate
> in Probe template.

Returns

> `Int`
> The comparison score, in the range [0;65535].

Exceptions

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

C

    int id3FaceMatcher_CompareTemplates (
        ID3_FACE_MATCHER hFaceMatcher,
        ID3_FACE_TEMPLATE hReference,
        ID3_FACE_TEMPLATE hProbe,
        int * score)

Parameters

> `hFaceMatcher` ID3_FACE_MATCHER
> in Handle to the FaceMatcher object.
> `hReference` ID3_FACE_TEMPLATE
> in Reference template.
> `hProbe` ID3_FACE_TEMPLATE
> in Probe template.
> `score` int *
> out The comparison score, in the range [0;65535].

Returns

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