Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

try:

import cv2

img = cv2.imread('a.jpg', 0) #0=grayscale, 1=rgb
cv2.namedWindow('image', cv2.WINDOW_NORMAL)
cv2.imshow('image', img)
cv2.waitKey(0)
cv2.destroyAllWindows()