What do you want to save?
Add Code snippet
New code examples
-
Python 2022-02-01 02:36:01
Image capture from Camera and saving the image
import cv2 # Open the device at the ID 0 cap = cv2.VideoCapture(0) #Check whether user selected camera is opened successfully. if not (cap.isOpened()): print(“Could not open video device”) #To set the resolution cap.set(cv2.cv.CV_C... Add solution -
Python 2021-11-15 14:02:34
video capturing with raspberry pi
import numpy as np import cv2 cap = cv2.VideoCapture(0) while(True): # Capture frame-by-frame ret, frame = cap.read() # Our operations on the frame come here gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY) # Display the resulting fr... Add solution -
Python 2021-11-12 03:58:10
opencv webcam python
import cv2 cap = cv2.VideoCapture(0) # Check if the webcam is opened correctly if not cap.isOpened(): raise IOError("Cannot open webcam") while True: ret, frame = cap.read() frame = cv2.resize(frame, None, fx=0.5, fy=0.5, interpol... Add solution -
Other 2021-11-07 19:09:09
opencv for video recording
import numpy as np import cv2 cap = cv2.VideoCapture(0) while(True): # Capture frame-by-frame ret, frame = cap.read() # Our operations on the frame come here gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY) # Display the resulting fr... Add solution -
Python 2021-11-04 22:01:07
vs
import numpy as np import os import six.moves.urllib as urllib import sys import tarfile import tensorflow as tf import zipfile from collections import defaultdict from io import StringIO from matplotlib import pyplot as plt from PIL import Image &... Add solution -
Python 2021-11-02 16:08:10
opencv capture camera python
import numpy as np import cv2 cap = cv2.VideoCapture(0) while(True): # Capture frame-by-frame ret, frame = cap.read() # Our operations on the frame come here gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY) # Display the resulting fr... Add solution -
Python 2021-10-21 15:43:10
how to get camera stream cv2
import numpy as np import cv2 cap = cv2.VideoCapture(0) while(True): # Capture frame-by-frame ret, frame = cap.read() # Our operations on the frame come here gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY) # Display the resulting fr... Add solution -
Python 2021-10-09 21:19:09
python opencv camera capture
import cv2 cap = cv2.VideoCapture(0) while True: ret, frame = cap.read() cv2.imshow('webcam feed' , frame) if cv2.waitKey(1) & 0xFF == ord(' '): break cap.release() cv2.destroyAllWindows() #by using the spacebar you will be able t... Add solution
Best helpers
+10
+5
+5
+5
+5
+5
+5
+5
+5
+5