# C1.py --- use cv2.VideoCapture()/cv2.read()/cv2.imshow()/cv2.resize()
import cv2
Lx=800; Ly=600; F=8; Lx2=int(Lx/F); Ly2=int(Ly/F); t=0
cap = cv2.VideoCapture(0)
cap.set(cv2.CAP_PROP_FRAME_WIDTH, Lx)
cap.set(cv2.CAP_PROP_FRAME_HEIGHT, Ly)
while(t<2501 and cap.isOpened()):
    t+=1; ret,frame=cap.read()
    if ret == False: break
    img2=cv2.resize(frame,(Lx2,Ly2)); cv2.imshow('img2',img2);
    cv2.imshow('frame',frame); #cv2.waitKey(0)
    if cv2.waitKey(1) & 0xFF == ord('q'): break
cap.release()
cv2.destroyAllWindows()
print('C1 is done...')
