Try simply subtracting the images.
diffImage = double(image1) - double(image2);
imshow(diffImage, []);
Casting to double is important otherwise you will never get negative numbers. Also, the [] in imshow() lets you see both positive and negative numbers. If you want a binary image and have a color image, then you can use the max function, something like
diffImage = max(abs(diffImage), [], 3)
Nothing more to do for a gray scale image. Then
binaryImage = abs(diffImage) > 5;
Best Answer