Code: Select all
convert anot.jpg one_real.jpg -compose difference -composite -morphology dilate disk:10 +level-colors "black,red" -fuzz 20% -transparent black result.png
![Image](https://i.ibb.co/fq8Wx6K/dif.png)
As you can see, I have a image1, image2, and the third image is the diff. I was able to do this on command line with the code I previously showed
this is my code on c#:
Code: Select all
var image1Path = @"D:\Spot\tiger_real.jpg";
var image2Path = @"D:\Spot\tiger_edit.jpg";
var diffImagePath = @"D:\Spot\imageDiff.jpg";
using (MagickImage image1 = new MagickImage(image1Path))
using (MagickImage image2 = new MagickImage(image2Path))
using (MagickImage diffImage = new MagickImage())
{
image1.Compare(image2, ErrorMetric.Absolute, diffImage);
diffImage.Write(diffImagePath);
}
![Image](https://i.ibb.co/GvvHc16/image-Diff.jpg)