import numpy as np
import cv2
cap = cv2.VideoCapture(0)
while(True):
# Capture frame-by-frame
ret, frame = cap.read()
# Our operations on the frame come here
gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
# Display the resulting frame
cv2.imshow('frame',gray)
if cv2.waitKey(1) & 0xFF == ord('q'):
break
# When everything done, release the capture
cap.release()
cv2.destroyAllWindows()
我在Pycharm IDE中使用Python和OpenCV。当我尝试使用OpenCV打开网络摄像头时,出现以下错误:
“进程以退出代码134(被信号6:SIGABRT中断)完成了”
这是因为我内存不足而发生的吗?
有什么解决方案?
我在MacBook Pro(OS:Mojave)上使用PyCharm
谢谢!
最佳答案
关于python - 在python OpenCV中以退出代码134(被信号6:SIGABRT中断)完成的过程,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57230407/