Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)
I am trying to run open-cv code to get access to my webcam in a python script. However, when I try to run it I get "Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)" every time I try to run it. There is no error in my code and I also looked at other posts to add the environment variables: PYTHONUNBUFFERED=1;PYDEVD_USE_FRAME_EVAL=NO;PYTHONMALLOC=debug
my code is:
import cv2
# define a video capture object
vid = cv2.VideoCapture(0)
while (True):
# Capture the video frame
# by frame
ret, frame = vid.read()
# display the resulting frame
cv2.imshow('frame', frame)
# the 'q button is set as the
# quitting button
if cv2.waitKey(1) & 0xFF == ord('q'):
break
# after the loop realse the cap object
vid.release()
# destroy all windows
cv2.destroyAllWindows()
Please sign in to leave a comment.