error: (-215:Assertion failed) !ssize.empty() in function ‘resize‘

error: (-215:Assertion failed) ! ssize.empty() in function ‘resize‘

1. Cause of the problem:

(1) The image path is correct, and does not contain Chinese, but the image path is not the whole path
(2) the image path is wrong, and no image is found
(3) the image path contains Chinese, and the function reports an error

2. Solution:
step by step check
(1) whether the file path is correct
(2) whether it is an absolute path
(3) whether the file name contains Chinese characters

If there is no way to solve, more detailed steps reference! Empty() in function ‘CV:: cascade classifier’
the errors are different, but the solutions are similar.

Read More: