[Solved] Python opencv imshow Error: Assertion failed (size.width>0 && size.height>0) in cv::imshow

The result of error reporting is believed to be the same:

There is no Chinese in the path, but this error occurs. It feels very outrageous.

I couldn’t find the problem. Later, I wrote all the paths of the picture and found it\ F is a string formatting code. People are stupid, so friends write all the paths and find the problem.

This is the modified path:

In fact, when you see the formatting code, python will display it in another color, so I thought of it here! The path cannot be found until it is written!

Read More: