0

In my WPF project, I'd like to display the difference between two images.

If the two images are identical, the result would be a transparent image. If they are different, it would be a pixel by pixel difference.

Is there an easy way to do this?

user380719
  • 9,393
  • 15
  • 52
  • 86
  • Duplicate: http://stackoverflow.com/questions/613146/computing-the-difference-between-images – fredley Aug 17 '10 at 15:03
  • What do you mean by pixel-by-pixel difference? Euclidean distance of the RGB values or something else? – Ben S Aug 17 '10 at 15:06

3 Answers3

0

Have a look at the techniques used by webcam "security" apps for motion detection: eg here

Basic
  • 25,747
  • 24
  • 111
  • 193
0

1) First convert both the images to binary image format [Black and White].
2) Compare the pixel value of both images. If, they differ. Note the position in separate collection. [Note: Pixel by Pixel comparison may cause performance problem if those two images were too big]
3) Use Adorner to decorate those pixels in highlighting color you prefer.

HTH

Prince Ashitaka
  • 8,435
  • 10
  • 47
  • 68
0

If i understood correctly then

r,g,b=abs(r1-r2),abs(g1-g2),abs(b1-b2)
is this what you want ?
Agnius Vasiliauskas
  • 10,657
  • 5
  • 47
  • 68