Skip to content
Snippets Groups Projects
Select Git revision
  • d5f0d27e13ae80a3339e2dbafc4d403663f32281
  • master default
  • clement
  • fix_requirements
  • new_signup
  • interface_admin
  • hamza
  • dev
  • test
  • melissa
  • context_sheet
  • sorties_new
  • Seon82-patch-2
  • export_bdd
  • refactor/participation-user-link
15 results

admin.py

Blame
  • videoCapture.py 764 B
    
    
    def videoCapture():
    
        #Use your camera for processing the video. Stop by pressing Q
        import cv2
        import imageProcess as ip
    
        cap = cv2.VideoCapture(0)   #0 means we capture the first camera, your webcam probably
    
        while cap.isOpened():		 #or while 1. cap.isOpened() is false if there is a problem
            ret, frame = cap.read()  #Read next video frame, stop if frame not well read
            if not ret: break
    
            ip.imageProcess(frame)                          #Process frame
    
            cv2.imshow("Image", frame)  			#Show processed image in a window
    
            if cv2.waitKey(1) & 0xFF == ord('q'):			#If you press Q, stop the while and so the capture
                break       
    
        cap.release()
        cv2.destroyAllWindows()