Image comparison - fast algorithm

后端 未结 9 1529
谎友^
谎友^ 2020-11-21 15:02

I\'m looking to create a base table of images and then compare any new images against that to determine if the new image is an exact (or close) duplicate of the base.

<
9条回答
  •  不思量自难忘°
    2020-11-21 15:28

    The best method I know of is to use a Perceptual Hash. There appears to be a good open source implementation of such a hash available at:

    http://phash.org/

    The main idea is that each image is reduced down to a small hash code or 'fingerprint' by identifying salient features in the original image file and hashing a compact representation of those features (rather than hashing the image data directly). This means that the false positives rate is much reduced over a simplistic approach such as reducing images down to a tiny thumbprint sized image and comparing thumbprints.

    phash offers several types of hash and can be used for images, audio or video.

提交回复
热议问题