Comparing two images and showing the difference in a new image?
A simple and time efficent solution is the computation of the absoulte values of the difference image. This can be done as follows:

import cv2
img_a = cv2.imload([first_image_filename])
img_b = cv2.imload([second_image_filename])
img_diff = cv2.absdiff(img_a, img_b)
cv2.imshow('abs difference', img_diff)
cv2.waitKey(-1)