【发布时间】:2019-11-01 13:50:17
【问题描述】:
代码是:
import numpy
import cv2 as cv
cap=cv.VideoCapture(0)
while True :
#ret will get non or value
ret,frame=cap.read()
#for make frames gray who did this library make RGB=>BGR
gray=cv.cvtColor(frame,cv.COLOR_BGR2GRAY)
cv.imshow('fram',gray)
#if the user click q or exit the vedio
if cv.waitKey(1)&0xFF==ord('q'):
break
cap.release()
cv.destroyAllWindows()
错误是: 错误:(-215:断言失败)函数'cv :: cvtColor'中的!_src.empty() . enter image description here
【问题讨论】:
标签: python visual-studio visual-studio-2019 cv2