Advertisement
brandblox

IMG_LAB(4/9/24)

Sep 3rd, 2024 (edited)
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.29 KB | None | 0 0
  1. import cv2
  2. import numpy as np
  3.  
  4. image = cv2.imread("car2.jpg")
  5. gray_image = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
  6. combined_image = np.hstack((image, cv2.cvtColor(gray_image, cv2.COLOR_GRAY2BGR)))
  7. cv2.imshow('Original and Grayscale Image', combined_image)
  8. cv2.waitKey(0)
  9. cv2.destroyAllWindows()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement