Method GetSimilarity
GetSimilarity(ImageFingerprint)
Measures how alike two pictures are, both read as displayed.
public double GetSimilarity(ImageFingerprint other)
Parameters
otherImageFingerprintThe 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
otheris 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
otherImageFingerprintThe fingerprint to compare with.
anyOrientationboolWhen
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. Whenfalse, 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
otheris null.- ArgumentException
Thrown if the two fingerprints carry different versions.