Git Product home page Git Product logo

Comments (4)

oliver-moran avatar oliver-moran commented on August 19, 2024

Yes. I think that raises a question about how sensitive you expect it to be.

I also think it's a question of the right tool for the job:

When I was testing it, I used a cut-off of 15%, so 2% would be considered a match. And they are, if you are testing for similarity.

On the other hand, if you are testing for difference then the image.diff() method is probably the better tool.

from jimp.

marcolino avatar marcolino commented on August 19, 2024

I meant an additional 2%, I was verifiyng how many additional changes to an image would cause the threshold (I currently use 12%) to be overcome...

On the other hand, I don't completely understand the distinction you make between similarity and difference... Ultimately, they are just two different algorithms (one from 'pHash' and one from 'PixelMatch') to measure the same entity... Or am I wrong?

from jimp.

oliver-moran avatar oliver-moran commented on August 19, 2024

They are two different algorithms though.

If pHash and PixelMatch were people, pHash would scrunch up its eyes and say that a cat looks like a dog. PixelMatch, on the other hand, would carefully detail all the things about a cat that a different to a dog within a given threshold.

Both are right. pHash is good at finding similarity. PixelMatch is good at finding difference.

from jimp.

marcolino avatar marcolino commented on August 19, 2024

I see... Your metaphor was great! :-) Now I clearly understand what you meant...
Now I'm even more convinced I'll use pHash (Jimp.hash()) to find similarities on my images...
Thanks a lot, Oliver!

from jimp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.