Python Forum
opencv on mac: Assertion Failed - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: opencv on mac: Assertion Failed (/thread-24492.html)



opencv on mac: Assertion Failed - RandomCoder - Feb-16-2020

I've been following tutorials on youtube for opencv in python, but i have nothing for output, the code is the same as in the tutorial, and python quits by itself, help?

(i program on a macbook if that makes a difference)

import numpy as np
import cv2

cap = cv2.VideoCapture(1)
 
while True:
    ret, frame = cap.read()
    cv2.imshow('frame',frame)
    if cv2.waitKey(10) & 0xFF == ord('q'):
        break

cap.release()
cv2.destroyAllWindows()