How to use cap = cv2.VideoCapture(0) in Google Colab

前端 未结 2 1217
走了就别回头了
走了就别回头了 2020-12-06 02:38

cap = cv2.VideoCapture(0) is not opening web camera when executing the command in Google Colab.

相关标签:
2条回答
  • 2020-12-06 03:01

    Since Colab is running in your browser, you'll want to use web APIs to access local hardware like a camera.

    Here's an example showing how to capture an image from your local webcam in Colab: https://colab.research.google.com/notebooks/snippets/advanced_outputs.ipynb#scrollTo=2viqYx97hPMi

    0 讨论(0)
  • 2020-12-06 03:13
    1. Go to Google Colaboratory

    2. Create a new notebook

    3. Click snippet panel

    4. Click Camera Capture. Click insert

    5. Run script: Shift + Enter

    0 讨论(0)
提交回复
热议问题