Skip to content

Instantly share code, notes, and snippets.

@lotusirous
Created July 31, 2021 10:08
Show Gist options
  • Save lotusirous/d056b41bf3ad7f4274acbd99cce9ff48 to your computer and use it in GitHub Desktop.
Save lotusirous/d056b41bf3ad7f4274acbd99cce9ff48 to your computer and use it in GitHub Desktop.
Xor 2 images with python
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)
@lotusirous
Copy link
Author

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