Skip to content

Instantly share code, notes, and snippets.

@pythonsuezo
Last active May 21, 2018 05:43
Show Gist options
  • Select an option

  • Save pythonsuezo/f0ad92f08a9eb2ac0959d24c6f0c63f5 to your computer and use it in GitHub Desktop.

Select an option

Save pythonsuezo/f0ad92f08a9eb2ac0959d24c6f0c63f5 to your computer and use it in GitHub Desktop.
カメラ画像加工器その2 PCにつながっているカメラの画像を取得するコード1
import cv2
capture = cv2.VideoCapture(0)
capture.grab()
while 1:
ret, image = self.capture.read()
if ret == False:
continue
cv2.imshow("Capture", image)
k == cv2.waitKey(10) & 0xff
live = cv2.getWindowProperty("Capture", 0)
if k == 27 or not live:
print("end")
break
cv2.destroyAllWindows()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment