/imgdiff_bindings

Fast image comparison and diffing in C++ (with a C# binding)

Primary LanguageC

imgdiff

Fast image comparison and diffing in C++ (with a C# binding)

Inspired by resemble.js

Basically exactly the same functionality, just not JS. (i.e. faster, uses SSE2, small memory footprint)

Build bindings\ImageDiff for an easy to use C# binding.

Example Code

Bitmap leftImg = new Bitmap(leftFile);
Bitmap rightImg = new Bitmap(rightFile);
using (DiffResult result = ImageDiff.Binding.Diff(leftImg, rightImg,
      new DiffOptions()
      {
        ErrorColor = Color.FromArgb(255, 255, 0, 255),
        Tolerance = 0.2f,
        OverlayTransparency = 1.0f,
        OverlayType = OverlayType.Movement,
        WeightByDiffPercentage = false,
        IgnoreColor = false
      }))
{
  result.Image.Save(diffFile);
  Console.WriteLine(result.Similarity);
}

Result

Input:


Left Right

Diff:


Diff