No description
Find a file
2023-05-23 01:14:07 +03:00
src removed unneeded submodule 2023-05-23 01:14:07 +03:00
tests initial version 2023-05-22 21:33:42 +03:00
LICENSE Create LICENSE 2023-05-22 21:54:55 +03:00
perceptual.nimble initial version 2023-05-22 21:33:42 +03:00
README.md another typo 2023-05-23 01:13:15 +03:00

perceptual

This is a small library for computing perceptual image hashes. Those hashes allow quickly finding duplicating images.

Currently, there's 5 different hashes implemented here:

In the future SIFT/SURF feature extraction can be added to the library. This should allow the most precise image matching. However it will also be the slowest one.

API Reference

Installation

nimble install perceptual

Example

import perceptual

let hash1 = dhash("image1.jpg")
let hash2 = dhash("image2.jpg")

let difference = diff(hash1, hash2)

echo "Image Difference: ", difference
if difference < 15:
  echo "Probably the same image!"
elif difference < 25:
  echo "Can be similar"
else:
  echo "Different"