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

# Image.compare Method

Module: Image

## Definition

Computes the difference with another image.

Python

    compare(self, cmp_image: Image) -> float

Parameters

> `cmp_image` Image
> in The image to compare.

Returns

> `float`
> Comparison result in percent (0% is same, 100% is full different).

Exceptions

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

Dart

    double compare(Image cmpImage)

Parameters

> `cmpImage` Image
> in The image to compare.

Returns

> `double`
> Comparison result in percent (0% is same, 100% is full different).

Exceptions

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

C#

    public float Compare(Image cmpImage)

Parameters

> `cmpImage` Image
> in The image to compare.

Returns

> `float`
> Comparison result in percent (0% is same, 100% is full different).

Exceptions

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

Java

    public float compare(Image cmpImage) throws FaceException

Parameters

> `cmpImage` Image
> in The image to compare.

Returns

> `float`
> Comparison result in percent (0% is same, 100% is full different).

Exceptions

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

Swift

    public func compare(cmpImage: Image) throws -> Float

Parameters

> `cmpImage` Image
> in The image to compare.

Returns

> `Float`
> Comparison result in percent (0% is same, 100% is full different).

Exceptions

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

C

    int id3FaceImage_Compare (
        ID3_FACE_IMAGE hImage,
        ID3_FACE_IMAGE hCmpImage,
        float * result)

Parameters

> `hImage` ID3_FACE_IMAGE
> in Handle to the Image object.
> `hCmpImage` ID3_FACE_IMAGE
> in The image to compare.
> `result` float *
> out Comparison result in percent (0% is same, 100% is full different).

Returns

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