-
-
Notifications
You must be signed in to change notification settings - Fork 851
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
Expose ImageComparer API #1129
Comments
I would be very interested in this feature. What I'm currently looking for is the ability to compare a known good image with one that was just generated in a unit test and look whether they're the same or at least close enough. I would prefer a percentage of how much difference there is (like a summary of what PixelDifference is now). A difference image would be useful to see what changed I suppose, but I don't quite see how this is would work inside a test. |
You can call Since our backlog is full of high priority topics (both big and small), I can't promise that this API will become a thing anytime soon. Feel free to borrow our code until then, and thanks for the feedback! 👍 |
I would be interested in this. I have had long had my own functions to do this and suffice to say, they are not that great. RE difference image, I did a similar thing. I made a "DeltaImageProcesser" which my image comparer method uses. It is not a true difference image, but I've found it be diagnostically more useful, especially for very small differences. It boils down to:
The code is here if anyone is interested: https://github.com/QutEcoacoustics/audio-analysis/blob/b3741577a39a4a8982472a4ebcdecf8e227849a7/src/Acoustics.Shared/ImageSharp/DeltaPixelBlender.cs#L55-L64 Here is an example output: ActualDeltaExpected |
how about the ability to fingerprint image for a large library of images to identify similar images using a stored hash in a database |
ImageComparer intends to define a numeric similarity metric to measure difference between two images, it's primary use-case Image fingerprinting / hashing is a related, but different feature. If this is something you are seriously interested in and you can give us ideas with specific algorithms or examples from other projects in mind, I recommend opening an Idea Discussion providing as much info and context as you can. |
@coenm wrote a library for hashing years ago. |
The image comparison logic implemented in
TolerantImageComparer
might be interesting for users, eg. for testing purposes.We should expose a similar feature from the core library.
The current
ImageComparer
API returns a list of detected pixel differences, which did not turn out to be useful. Shouldn't we return a difference image instead? Or should we return both?The text was updated successfully, but these errors were encountered: