I hope you already learned how to lock bitmap in memory and work with raw image data to get reasonable performance? If not, see the code sample here: http://msdn.microsoft.com/en-us/library/5ey6h79d.aspx
]. First thing to know: never use
for this is similar purposes, due to performance issues. Be careful with possibly different pixel formats, see the property
. In principle, you can compare different formats, just see the description of each to interpret them correctly — you work on the low level in all such processing.
Now, what to do with that?
The naive question if to subtract one image from another per component and optionally normalize the result. It will work.
One problem is: some values are lower in one image, some are lower on the other one. One approach is: it you have two images,
, subtract using signed result type and change negative values to zero; create two differential images
; alternatively, subtract and get the absolute value.
For more sophisticated processing, use AForge.NET: http://www.aforgenet.com/