Is there any way to subtract two images in python opencv2 ?
If we subtract Image2
from Image1
means Image3
should give Object(person)
only.
You can subtract two images by OpenCV function, cv. subtract(). res = img1 - img2.
Try background subtraction.
Use cv2.subtract(img1,img2)
instead of arithmetic operation, as cv2 will take care of negative values.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With