# -*- coding: utf-8 -*- """ Spyder Editor This is a temporary script file. """ import cv2 cap = cv2.VideoCapture(0) cap1 = cv2.VideoCapture(1) while(True): # Capture frame-by-frame ret, frame = cap.read() ret1, frame1 = cap1.read() # Our operations on the frame come here gray = cv2.cvtColor(frame, 0) gray1 = cv2.cvtColor(frame1, 0) # Display the resulting frame frame = cv2.resize(frame, None, fx = 0.5, fy = 0.5, interpolation = cv2.INTER_CUBIC) frame1 = cv2.resize(frame1, None, fx = 0.5, fy = 0.5, interpolation = cv2.INTER_CUBIC) final_frame = cv2.vconcat((frame, frame1)) cv2.imshow('final_frame',final_frame) #cv2.imshow('frame1',gray1) if cv2.waitKey(1) & 0xFF == ord('q'): break cap.release() cv2.destroyAllWindows() # When everything done, release the capture