I have successfully installed opencv-python.I wanted to open webcam for capturing video using python.But whenever I run the program in PyCharm console the webcam opens with fuzzy frames and Python stops working instantly showing the message:Python Appcrash access violation error and PyCharm console shows the message "Process finished with exit code -1073741819 (0xC0000005)"
The code is as follows:
import cv2
cap=cv2.VideoCapture(0)
while True:
ret,frame=cap.read()
cv2.imshow('frame',frame)
if cv2.waitKey(10)==ord('q'):
break
cap.release()
cv2.destroyAllWindows()
Why this problem occurs and how to solve this?
My Windows Version: Windows 7 Professional
Python Version: 3.7
opencv-python version: 4.3.0.36
User contributions licensed under CC BY-SA 3.0