Horje
opencv(4.4.0) c:\users\appveyor\appdata\local\temp\1\pip-req-build-71670poj\opencv\modules\imgproc\src\color.cpp:182: error: (-215:assertion failed) !_src.empty() in function Code Example
cv2.error: OpenCV(4.5.3) C:\Users\runneradmin\AppData\Local\Temp\pip-req-build-q3d_8t8e\opencv\modules\imgproc\src\color.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:\Sandbox\Github\opencv-project\Resources\Photos\cats.jpg"
opencv(4.4.0) c:\users\appveyor\appdata\local\temp\1\pip-req-build-71670poj\opencv\modules\imgproc\src\color.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




Whatever

Related
How to check a string for specific characters? Code Example How to check a string for specific characters? Code Example
tailwind class not working Code Example tailwind class not working Code Example
cael case Code Example cael case Code Example
sql server in linux Code Example sql server in linux Code Example
creeper Code Example creeper Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7