Error using Opencv in Python error: (-215:Assertion failed) !_src.empty() in function 'cv::cvtColor'

Reason: Path error
Solution: Try changing the path.

(If it was an absolute path before, put the file to be read in the same folder as the py file, and then change the absolute path to a relative path, that is, the path directly writes the file name. This is the most conservative and stable method with the highest success rate . After success, try changing the absolute path, delete unnecessary slashes, and don't use Chinese names.)

Guess you like

Origin blog.csdn.net/Dai_sir_man/article/details/120169395