Compare two images and extract the difference using emgu cv library

I want to compare two images such as image1.png and image2.png. Both images look the same with some difference. so I want to get the difference and I want to apply the difference in the first image image1.png. I searched the lot to get a similar code for this library, but did not find any.

after many searches, i got a bit of the similar stuff i'm looking for in java code. here is the URL http://mindmeat.blogspot.in/2008/07/java-image-comparison.html

please go to the url and there you will see that the code generates a third image with a difference, but my requirement is slightly different. I do not want to generate a third image, instead I want to apply the difference in the 1st image image1.png. someone told me that this can be done very easily with the emgu cv library. so I am looking for similar code based on the emgu cv library, but have not found. It will be very useful for me to help me with the sample code using the emgu cv library.

thank

+2
source share
1 answer

I think you need:

image1 = image2 - image1;

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

+2
source

Source: https://habr.com/ru/post/1534613/


All Articles