ImageEn, unit IEVision

TIEVisionLibrary.createImageHasher

TIEVisionLibrary.createImageHasher

Declaration

function createImageHasher(algorithm: TIEVisionImageHashAlgorithm = ievHashPHash): TIEVisionImageHasher; safecall;

Description

Creates a perceptual image hasher, which calculates and compares hashes to find similar and near-duplicate images.
ievHashPHash is recommended for most purposes. See TIEVisionImageHashAlgorithm for the differences between the algorithms.

Demo

Demo  Demos\ImageEditing\EveryMethod\EveryMethod.dpr

Example

hasher := IEVisionLib().createImageHasher( ievHashPHash );
hash1 := hasher.compute( ImageEnView1.IEBitmap.GetIEVisionImage() );
hash2 := hasher.compute( ImageEnView2.IEBitmap.GetIEVisionImage() );
ShowMessage( Format( 'Similarity: %.2f', [ hasher.similarity( hash1, hash2 ) ]));

See Also

◼TIEVisionImageHasher
◼GetPerceptualHash
◼FindSimilar