these error message : OpenCV: Cannot use FaceTime HD Camera (Built-in) OpenCV: camera failed to properly initialize!
code: import cv2 as cv import numpy as np
cap = cv.VideoCapture(0)
while True: ret, frame = cap.read() cv.imshow('frame', frame) if cv.waitKey(1) & 0xFF == ord('q'): break
cap.release() cv.destroyAllWindows()
macOS Mojave