Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Here is code:

iimport cv2

img = cv2.imread('test.jpg')
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
cv2.imshow('ray Photo', gray)
cv2.imshow('Photo', img)
cv2.waitKey(0)

Here is code:

iimport cv2

img = cv2.imread('test.jpg')
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
cv2.imshow('ray cv2.imshow('Gray Photo', gray)
cv2.imshow('Photo', img)
cv2.waitKey(0)

Here is code:

iimport import cv2

img = cv2.imread('test.jpg')
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
cv2.imshow('Gray Photo', gray)
cv2.imshow('Photo', img)
cv2.waitKey(0)