It is a memorandum when a commercially available webcam is connected to a PC with ubuntu 16.04 installed via USB and a video is captured with python.
PC with ubuntu 16.04 installed Commercial webcam
opencv-python installation
pip install opencv-python
capture.py
import cv2
cap = cv2.VideoCapture(0)
while True:
ret, img = cap.read()
cv2.imshow('video', img)
if cv2.waitKey(1) & 0xFF == ord('q'):
break
cap.release()
cv2.destroyAllWindows()
nothing special
Video capture using OpenCV on minimal Ubuntu
Recommended Posts