Answers for "cv2.error: opencv(4.5.3) c:/users/runneradmin/appdata/local/temp/pip-req-build-sn_xpupm/opencv/modules/highgui/src/precomp.hpp:155: error: (-215:assertion failed) src_depth != cv_16f && src_depth != cv_32s in function 'converttoshow'"

3

cv2.error: OpenCV(4.5.3) C:UsersrunneradminAppDataLocalTemppip-req-build-q3d_8t8eopencvmodulesimgprocsrccolor.cpp:182: error: (-215:Assertion failed) !_src.empty() in function 'cv::cvtColor'

Try Giving Full Path. 
This seems to be the path issue in windows. 
I changed it to a full path like this and it worked.

filename = "D:SandboxGithubopencv-projectResourcesPhotoscats.jpg"
Posted by: Guest on July-29-2021

Code answers related to "cv2.error: opencv(4.5.3) c:/users/runneradmin/appdata/local/temp/pip-req-build-sn_xpupm/opencv/modules/highgui/src/precomp.hpp:155: error: (-215:assertion failed) src_depth != cv_16f && src_depth != cv_32s in function 'converttoshow'"

Browse Popular Code Answers by Language