Код: Выделить всё
image = cv2.imread("image.jpg", cv2.IMREAD_GRAYSCALE)
cv2.imshow('Grey Scale Image', image)
cv2.waitKey()
backtorgb = cv2.cvtColor(image,cv2.COLOR_GRAY2RGB)
cv2.imshow('GRAY2RGB Image', backtorgb)
cv2.waitKey()
Код: Выделить всё
image = cv2.imread("image.jpg", cv2.IMREAD_GRAYSCALE)
cv2.imshow('Grey Scale Image', image)
cv2.waitKey()
backtorgb = cv2.cvtColor(image,cv2.COLOR_GRAY2RGB)
cv2.imshow('GRAY2RGB Image', backtorgb)
cv2.waitKey()