News for hackers. Stuff that matters.
Re:Imgdiff: Faster than the fastest pixel-by-pixel image dif... by noahtallen on Saturday December 12, 2020 @08:28PM (#25403460)
To really see how these algorithms perform, you should compare the worst case for the algorithm. In order to see if a picture is identical, you’d have to loop through every single pixel, which is the worst case. But you can shortcut on the first pixel which is different, which I imagine happens pretty quickly on many generic pictures. So testing performance with two different images is probably not best for comparison.
Re:Imgdiff: Faster than the fastest pixel-by-pixel image dif... by acdha on Saturday December 12, 2020 @09:16PM (#25403736)
You can only short-circuit if you’re returning a Boolean. If you need to do what these tools and return some metric for the degree of difference you still have to process both images in entirety.