开发者

Fastest way to compare two images

开发者 https://www.devze.com 2023-01-17 07:42 出处:网络
I need to compare two images as fast as possible.I don\'t need to know the differences or anythi开发者_如何学Cng else I just need to know if they are the same, yes/no, awesome.What is the fastest way

I need to compare two images as fast as possible. I don't need to know the differences or anythi开发者_如何学Cng else I just need to know if they are the same, yes/no, awesome. What is the fastest way to do this?

Thanks, R.


If they are expected to be the same, byte-by-bye like @NullUserException mentioned, the easiest solution is to use a hash like Md5. If you'd like to get more advanced, you can get the RGB values of each pixel in the first image and calculate the euclidean distance from the pixels in the second image checking to see if it's below some threshold. Everything is else is not fast :)

0

精彩评论

暂无评论...
验证码 换一张
取 消