Horje
cv2.error: OpenCV(4.5.2) .error: (-215:Assertion failed) !_src.empty() in function 'cv::cvtColor' in command line Code Example
error: (-215:Assertion failed) !_src.empty() in function 'cv::cvtColor'
This error happened because the image didn't load properly.
So you have a problem with the previous line cv2.imread my suggestion is :

Check if the images exist in the path you give

Check the count variable to see if it has a valid number
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"
cv2.error: OpenCV(4.5.2) .error: (-215:Assertion failed) !_src.empty() in function 'cv::cvtColor' in command line
    cv2.line(img, (int(corners_int[0, 0]), int(corners_int[0, 1])), (int(corners_int[3, 0]), int(corners_int[3, 1])), (255, 255, 0), 2)




Whatever

Related
nginx don't log 404 Code Example nginx don't log 404 Code Example
lithuanian to english Code Example lithuanian to english Code Example
reiniciar camera macOs command line Code Example reiniciar camera macOs command line Code Example
highlight change color image1 Code Example highlight change color image1 Code Example
ruby on mac rvm Code Example ruby on mac rvm Code Example

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