当我运行这行代码时,我收到了以下错误: img = cv2.resize(img, (224,224)) OpenCV(4.1.2) C:\projects\opencv-python\opencv\modules\imgproc\src\resize.cpp:3720: 错误:(-215: 断言失败) !ssize.empty() 在函数 'cv::resize' 中
frame = cv2.resize(frame,(224,224),fx=0,fy=0, interpolation = cv2.INTER_CUBIC) 我已经将我的代码更改为这样,现在它可以正常工作了。
!ssize.empty()
提到的是输入图像的大小,而这个图像是frame
。 - Christoph Rackwitz