Answers for "opencv(4.5.3) c:\users\runneradmin\appdata\local\temp\pip-req-build-sn_xpupm\opencv\modules\imgproc\src\color.cpp:182: error: (-215:assertion failed) !_src.empty() in function 'cv::cvtcolor'"

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
0

opencv(4.4.0) c:usersappveyorappdatalocaltemp1pip-req-build-71670pojopencvmodulesimgprocsrccolor.cpp:182: error: (-215:assertion failed) !_src.empty() in function

This error happened because the image didn't load properly . So you have problem with the previous line cv2.imread my suggestion is :

check if the images exist in the path you give

check the count variable if he have valid number
Posted by: Guest on June-11-2021

Code answers related to "opencv(4.5.3) c:\users\runneradmin\appdata\local\temp\pip-req-build-sn_xpupm\opencv\modules\imgproc\src\color.cpp:182: error: (-215:assertion failed) !_src.empty() in function 'cv::cvtcolor'"

Browse Popular Code Answers by Language