while True:
ret, frame = cap.read()
frame = cv2.resize(frame, None, fx=scaling_factor, fy=scaling_factor, interpolation=cv2.INTER_AREA)
gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
1428:错误:( - 215)ssize.area()> 0
答案 0 :(得分:1)
错误表明您从相机中提取的frame
大小为零。因此,建议您从frame
检查cap.read()
的大小和数据
在进行任何处理之前。