What do you want to save?
Add Code snippet
New code examples
-
Python 2022-03-17 01:25:17
tensorflow lite raspberry pi object detection using usb webcam
import time import re import numpy as np from tflite_runtime.interpreter import Interpreter import cv2 CAMERA_WIDTH = 640 CAMERA_HEIGHT = 480 def load_labels(path): """Loads the labels file. Supports files with or without index number... Add solution -
Python 2022-03-05 07:00:28
read video with opencv
import numpy as np import cv2 cap = cv2.VideoCapture('videos/wa.avi') while(cap.isOpened()): ret, frame = cap.read() gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY) cv2.imshow('frame',gray) if cv2.waitKey(1) & 0xFF == ord('q'): break cap.r... Add solution -
Python 2022-02-25 03:45:14
extract frames from video python
import cv2 vidcap = cv2.VideoCapture('big_buck_bunny_720p_5mb.mp4') success,image = vidcap.read() count = 0 while success: cv2.imwrite("frame%d.jpg" % count, image) # save frame as JPEG file success,image = vidcap.read() print('R... Add solution -
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-18 22:03:07
read video opencv python
import numpy as np import cv2 cap = cv2.VideoCapture('videos/wa.avi') while(cap.isOpened()): ret, frame = cap.read() gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY) cv2.imshow('frame',gray) if cv2.waitKey(1) & 0xFF == ord('q'): break cap.r... Add solution
Best helpers
+10
+5
+5
+5
+5
+5
+5
+5
+5
+5