How can I compute the difference between two images
In my WPF project, I'd like to display the difference between two images.
If the two images are identical, the result开发者_JAVA技巧 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?
If i understood correctly then
r,g,b=abs(r1-r2),abs(g1-g2),abs(b1-b2)is this what you want ?
Have a look at the techniques used by webcam "security" apps for motion detection: eg here
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
精彩评论