Help us understand the problem. What is going on with this article?

Python+OpenCVによるカメラからの画像取得

More than 3 years have passed since last update.

主に個人的なメモです。
以下のコードをCtrl+C & Ctrl+Vして実行すると動きます。

環境
・Python2.7
・OpenCV2

capture.py
import cv2

cap = cv2.VideoCapture(0)

while(True):

    # Capture frame-by-frame
    ret, frame = cap.read()

    # Display the resulting frame
    cv2.imshow('frame', frame)
    if cv2.waitKey(1) == 27:
        break

# When everything done, release the capture
cap.release()
cv2.destroyAllWindows()
slowsingle
ピカピカの一年生ではなくなってしまいました
https://slowsingle.hatenablog.com/
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away