KilianB / JImageHash

Perceptual image hashing library used to match similar images
MIT License
397 stars 80 forks source link

Consider using different edit distances (cyclic and rotational variant to counter translation for location aware hashes) #29

Open KilianB opened 5 years ago

KilianB commented 5 years ago

Most of the non frequency based hashes encode a subset of the image into a single bit (the hash maps 1 bit of information to specific location). For motion tracking we use sliding windows to compare hashes. The hamming distance might be off due to simply being translated a bit. Try to find a new edit distance accounting for bigger swaps in the binary string.

Maybe:

  1. naive levenshtein distance
  2. N-Grams (https://www.researchgate.net/publication/237107253_Using_q-grams_in_a_DBMS_for_Approximate_String_Processing) ?
  3. cosine similarity
  4. https://ieeexplore.ieee.org/document/4708948 Edit distance with block swapping
KilianB commented 5 years ago

http://www.academia.edu/4400094/A_Better_Edit_Distance_Measure_Allowing_for_Block_Swaps