Error:
Error message when calling the cv2.imdecode function:
cv2.error: OpenCV(4.6.0) :-1: error: (-5:Bad argument) in function 'imdecode'
> Overload resolution failed:
> - Conversion error: buf, what: OpenCV(4.6.0) /io/opencv/modules/core/src/matrix.cpp:246: error: (-215:Assertion failed) s >= 0 in function 'setSize'
>
> - Expected Ptr<cv::UMat> for argument 'buf'
solve:
When calling cv2.imdecode, there must be no Chinese in the path! ! ! !
When calling cv2.imdecode, there must be no Chinese in the path! ! ! !
When calling cv2.imdecode, there must be no Chinese in the path! ! ! !
Say important things three times! ! !