Hello,
Having an issue with OpenCV on Sublime 4 right now (please help, because I hate using Pycharm), running MacOS 11.5.2.
Code:
import cv2
cap = cv2.VideoCapture(0)
while cap.isOpened():
** success, img = cap.read()**
** cv2.imshow(“Image”, img)**
** if cv2.waitKey(1) & 0xFF == ord(‘q’):**
** break**
cap.release()
cv2.destroyAllWindows()
Console:
“OpenCV: not authorized to capture video (status 0), requesting…”
When using Pycharm/Terminal and executing this code, MacOS will first ask me for camera permission for Pycharm/Terminal. This does not happen when I run this on Sublime.
Would appreciate any help, as I love to use Sublime for all my Python programming.
Regards,
Liam