'Why is the difference of my two images blank?

I tried to get the difference of two images. Here are my two images.

enter image description here

enter image description here

However, I only got a blank image like this

enter image description here

I use OpenCV package in python. The code I use is:

image3 = image1 - image2
plt.imshow(image3)
plt.show()

The backgrounds of the two images are not the same. I don't understand why the difference of the two images is just blank. Can someone help me with this?

Thank you in advance.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source