Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import cv2
- cap=cv2.VideoCapture(0)
- while cap.isOpened():
- ret,frame=cap.read()
- if ret:
- cv2.imshow("Image",frame)
- if cv2.waitKey(5)==ord('q'):
- cv2.imwrite('background.jpg',frame)
- break
- cap.release()
- cv2.destroyAllWindows()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement