Answers for "python opencv subtract two images"

0

python opencv subtract two images

# assuming the two images have the same shape
import cv2

image1 = cv2.imread("/path/to/image1")
image2 = cv2.imread("/path/to/image2")
image_diff = cv2.absdiff(image1, image2)
Posted by: Guest on April-12-2022

Python Answers by Framework

Browse Popular Code Answers by Language