What do you want to save?
Add Code snippet
New code examples
-
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 -
Python 2021-11-11 15:11:16
use android camera as webcam ubuntu in python
import urllib.requestimport cv2import numpy as npimport timeURL = "http://192.168.43.1:8080"while True: img_arr = np.array(bytearray(urllib.request.urlopen(URL).read()),dtype=np.uint8) img = cv2.imdecode(img_arr,-1) cv2.imshow('IPWebcam... Add solution -
Python 2021-11-10 18:49:15
rgb to grayscale python
import cv2 image = cv2.imread('C:/Users/N/Desktop/Test.jpg') gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) cv2.imshow('Original image',image) cv2.imshow('Gray image', gray) cv2.waitKey(0) cv2.destroyAllWindows() Add solution -
Python 2021-11-09 12:24:23
Create Wi-Fi QR code generator using Python
import os try: import pyqrcode import cv2 except Exception: os.system("pip install pyqrcode") os.system("pip install opencv-python") ssid = input("\nEnter WiFi SSID: ") authtypes = ["WEP", "WPA... 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-04 03:30:09
cv2.namedwindow
import cv2 img = cv2.imread('/path_to_image/opencv-logo.png') cv2.imshow('image',img) cv2.waitKey(0) cv2.destroyAllWindows() # to use it in a loop k = cv2.waitKey(0) if k == 27: # wait for ESC key to exit cv2.destroyAllWindows() elif k == ord... 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
Best helpers
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5