两个图像的差异 [英] Difference of two images

查看:107
本文介绍了两个图像的差异的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我有两个图像,我需要比较它们然后我需要得到第一个图像的所有像素在第二个图像中不相同。

例如

如果图像1的一半与图像2相同,那么我想要图像1的一半与图像2不同。


i have two images and i need to compare them then i need to get all pixels of first image which are not same in second image.
e.g.
if half of image 1 is same as image 2 so i want the half of image 1 which is different from image 2.

推荐答案

请参阅我对该问题的评论。



执行必要计算的方法之一是使用 System.Drawing ,更确切地说:

http:// msdn。 microsoft.com/en-us/library/system.drawing.bitmap.lockbits.aspx [ ^ ]。



每个页面上都有一些代码示例这些方法,只是为了了解如何使用它们。最重要的是不要使用 GetPixel / SetPixel ,因为这些方法对你的目的来说会非常缓慢地工作。



-SA
Please see my comment to the question.

One of the way to perform necessary calculations is using System.Drawing, more exactly:
http://msdn.microsoft.com/en-us/library/system.drawing.bitmap.lockbits.aspx[^].

There are some code samples on the pages of each of these methods, just to understand how to use them. Most important thing here is not to use GetPixel/SetPixel as those method would work prohibitively slowly for your purpose.

—SA


这篇关于两个图像的差异的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆