Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configurable SAMPLE_SIZE / LOW_SIZE #15

Open
kachkaev opened this issue May 27, 2023 · 1 comment
Open

Configurable SAMPLE_SIZE / LOW_SIZE #15

kachkaev opened this issue May 27, 2023 · 1 comment

Comments

@kachkaev
Copy link

👋 again @btd! I’m curious if these params could be made configurable:

const SAMPLE_SIZE = 32;

const LOW_SIZE = 8;

This is an open question: technically, they can come as a third param of phash function (after sharp options), but I’m not sure if there is any value in this. I am still experimenting with perceptual hashes, so am trying to understand if changing sample sizing can improve the result.

Thanks a lot for putting this library together!

@btd
Copy link
Owner

btd commented Jun 10, 2023

Hi, this parameters mostly was copied from original implementation. I made it sure that results of this lib match to libphash. In theory parameters could improve hash, but it very depends on the images you are dealing. If it is random images, defaults should be ok.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants