views:

29

answers:

1

I am looking for a "fuzzy" hash library for images, that means, one library which can recognize an image even with some minor changes (different compression ratio, watermaks, small cropping etc...)

I found pHash library, but there is no documentation about using it.

Do you know one ?

A: 

You probably don't want hashing, but there are ways you can accomplish what you want without a library. For example, here's one way:

  1. Resize the image to something small, such as 8x6 or 16x12.
  2. Get the Red, Green, and Blue values for each pixel.
  3. Combine these into a single value.

To compare photos, use the single values. If you need more certainty, you can compare the pixel values of the 8x6 or 16x12 images after you match the single value.

xpda