比较两个图像并使用emgu cv库提取差异 [英] compare two images and extract the difference using emgu cv library

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

问题描述

我想比较两个图像,例如image1.png和image2.png.这两个图像看起来非常相同,只是有所不同.所以我想得到区别,并想在第一张图片image1.png上应用区别.我进行了大量搜索,以获得该库的类似代码,但未找到任何代码.

i want to compare two images like image1.png and image2.png.both the images look pretty same with some difference. so i want to get the difference and want to apply the difference on first image image1.png. i searched lot to get similar kind of code of this library but found none.

经过大量搜索,我得到了一些我在Java代码中寻找的类似东西.这是网址 http://mindmeat.blogspot.in/2008/07/java-image-comparison.html

after lots of search i got bit similar kind of things which i am looking for in java code. here is the url http://mindmeat.blogspot.in/2008/07/java-image-comparison.html

请转到url,在那里您可以看到代码生成的第三张图片有所不同,但是我的要求有些不同.我不想生成第三张图片,而是我想将差异应用于第一张图片image1.png.有人告诉我,使用emgu cv库可以很容易地做到这一点.所以我搜索基于emgu cv库的类似代码,但没有找到.这将对我有很大的帮助,任何人都可以使用emgu cv库使用示例代码来指导我.

please go to the url and there you can see the code generate 3rd image with difference but my requirement is bit different. i do not want to generate 3rd image rather i want to apply the difference on the 1st image image1.png. some one told me it can be done very easily with emgu cv library. so i search for similar code based on emgu cv library but found no. it will be great help me anyone can guide me with sample code using emgu cv library.

谢谢

推荐答案

我认为您需要的是:

image1 = image2-image1;

image1 = image2 - image1;

由于运算符超载,这可能直接在Emgu CV中实现

Due to operator overloading, this is possible directly in Emgu CV

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

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