开发者

Fastest way to compare two images

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜