Goal: Compare two PNG images and creating a new image containing only the changes (not highlighted in red or anything), while the rest of the png is transparent.
MagickImage newImg = new MagickImage(image2Path);
MagickImage oldImage = new MagickImage(diffImagePath);
oldImage.Compose = CompositeOperator.Difference;
var diffimage = new MagickImage();
using (var imgDiff = new MagickImage())
{
double diffd = newImg.Compare(oldImage, ErrorMetric.Absolute, diffimage);
}
What I'm ending up with when comparing two identical pictures is the same, but with a little opacity.
Any help is appreciated.
EDIT:
Basically what I would like to end up is this. But instead of the result having a white background, I would like it to be transparent.
In command line ImageMagick, this would be how to do that. Sorry, I am not a Magick.Net user. But the translation should be obvious.
Car1:
Car2: