Table of Contents

Method GetSimilarity

Namespace
LMKit.Media.Image
Assembly
LM-Kit.NET.dll

GetSimilarity(ImageFingerprint)

Measures how alike two pictures are, both read as displayed.

public double GetSimilarity(ImageFingerprint other)

Parameters

other ImageFingerprint

The fingerprint to compare with.

Returns

double

A value from 0 to 1: 1 for the same picture, 0 for unrelated pictures. It is the share of bits the two fingerprints agree on, rescaled so that the agreement two unrelated pictures reach by chance (half the bits) reads 0.

Exceptions

ArgumentNullException

Thrown if other is null.

ArgumentException

Thrown if the two fingerprints carry different versions.

GetSimilarity(ImageFingerprint, bool)

Measures how alike two pictures are, optionally whatever way round each one is.

public double GetSimilarity(ImageFingerprint other, bool anyOrientation)

Parameters

other ImageFingerprint

The fingerprint to compare with.

anyOrientation bool

When true, the other picture is also tried turned by quarter turns and mirrored, and the best of the eight readings is returned: a scan saved sideways or a mirrored copy is recognized. When false, the pictures are compared as displayed.

Returns

double

A value from 0 to 1: 1 for the same picture, 0 for unrelated pictures.

Exceptions

ArgumentNullException

Thrown if other is null.

ArgumentException

Thrown if the two fingerprints carry different versions.

Share