Created
October 27, 2021 06:36
-
-
Save Nithilaa/c1f5b0a1049d979d45d1c01827681d43 to your computer and use it in GitHub Desktop.
This file contains 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
import cv2 | |
img1 = cv2.imread('image1_add.jpg', 1) | |
#or | |
#img1 = cv2.imread('C:\\Users\\Admin\\Downloads\\image1_add.jpg', 1) | |
cv2.imshow('Image 1', img1) | |
cv2.waitKey(0) | |
cv2.destroyAllWindows() | |
img2 = cv2.imread('image2_add.jpg', 1) | |
#or | |
#img2 = cv2.imread('C:\\Users\\Admin\\Downloads\\image2_add.jpg', 1) | |
cv2.imshow('Image 2', img2) | |
cv2.waitKey(0) | |
cv2.destroyAllWindows() | |
# Add the images | |
added_img = cv2.add(img1, img2) | |
cv2.imshow('Added Image', added_img) | |
cv2.waitKey(0) | |
cv2.destroyAllWindows() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment