ParPau 0 Newbie Poster

All, what I am trying to do is isolate markings (differences) in images. I have an unmarked image (I1), a marked image (I2) and a third image (I3). I would like to compare I2 against I1 and store the x,y (or array of pixels) of the differences (isolate markings). I liken this to subtracting I1 from I2 leaving the differences. I would then like to do the same with respect to I3 (subtract I1 from I3) THEN compare the result I3 versus I2.

I found this link;
http://jeffkreeftmeijer.com/2011/comparing-images-and-creating-image-diffs/

It shows (basically) I1 - I2 = difference. I would like to find this code and then have help to then expand to comparing the differences between I2 and I3 (as in x,y of I2 vs x,y of I3).

My initial thoughts are to erase all colors, leave only black/white. This eliminates problems with color shade differences. Issues would be if one of the image is rotated a minute amount or there is identical pictures, but sixes are different. In these cases, pictures could be equal, but pixels would be different.

Any actual code, links to examples, thoughts greatly appreciated. Actual code/links really appreciated.