Skip to content

Configurable SAMPLE_SIZE / LOW_SIZE #15

Open
@kachkaev

Description

👋 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!

Activity

btd

btd commented on Jun 10, 2023

@btd
Owner

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

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Configurable SAMPLE_SIZE / LOW_SIZE · Issue #15 · btd/sharp-phash