Skip to content

mipastgt/ImageDiffDemo

Repository files navigation

This is just a little demo to compare a few image difference computation methods with each other.

Just run the test in ParallelDiffHandlerTest.kt

The test computes the difference between two images in a red channel of the result image.

The old image

and the new image

are modified versions of the same base image. The content of the old and new image have an offset of -7/7 pixels and some elements inside the image have changed. The diff is computed in order to see what has actually changed inside the image while ignoring the offset.

Three different algorithms are used:

  1. _sequentialDiffOfRawArgbIntImageData
  2. _simpleParallelDiffOfRawArgbIntImageData
  3. _chunkedParallelDiffOfRawArgbIntImageData

I obtained the following results:

//                           mac-mini X86                    mac-mini AARCH64
// Single-threaded         : Diff computed in 36.511684ms    13.940397ms
// Multi-threaded (simple) : Diff computed in 12.681792ms    5.277718ms
// Multi-threaded (chunks) : Diff computed in 10.516840ms    3.349768ms

About

Just a little demo to compare various image difference computation methods.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages