Capturing image and Viewing it using OpenCV
import cv2 capture = cv2.VideoCapture( 0 ) capture.set( 3 , 640 ) #width capture.set( 4 , 480 ) #height if capture.isOpened(): ret , frame = capture.read() cv2.imwrite( 'osman.jpg' , frame) load_image = cv2.imread( 'osman.jpg' ) while True : cv2.imshow( 'window' , load_image) if cv2.waitKey( 1 ) == 27 : break capture.release() cv2.destroyAllWindows()