Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import cv2
- import numpy as np
- image = cv2.imread("car2.jpg")
- gray_image = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
- combined_image = np.hstack((image, cv2.cvtColor(gray_image, cv2.COLOR_GRAY2BGR)))
- cv2.imshow('Original and Grayscale Image', combined_image)
- cv2.waitKey(0)
- cv2.destroyAllWindows()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement