Created
July 31, 2021 10:08
-
-
Save lotusirous/d056b41bf3ad7f4274acbd99cce9ff48 to your computer and use it in GitHub Desktop.
Xor 2 images with python
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from cv2 import cv2 | |
foo = cv2.imread("./foo.png") | |
bar = cv2.imread("./bar.png") | |
key = cv2.bitwise_xor(foo, bar) | |
cv2.imshow("xored data", key) | |
Thanks for your feedback. It may different in cv2 version :D
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Code doesn't work anymore, not on python3 at least. Here's the fix: