According to the online tutorials wrote a small piece of code, but the old error, solution for help!!!!!!
The import cv2 as CV
# read image, supports BMP, JPG, PNG, tiff format commonly used such as
Img=CV. Imread (" C:/Users/74516/Desktop/1. JPG ")
# to create a window and display images
CV. NamedWindow (" Image ")
CV. Imshow (" Image ", img)
CV. WaitKey (0)
# release window
CV. DestroyAllWindows ()
Error message:
The File "D:/pycharm/pycharmprojects/11", line 7, in & lt; module>
CV. Imshow (" Image ", img)
Cv2. Error: OpenCV (4.2.0) C: \ \ projects \ OpenCV - python OpenCV \ modules \ highgui \ SRC \ Windows CPP: 376: error: (- 215: an Assertion failed) size. Width> 0 & amp; & Size. Height> 0 in function 'CV: : imshow'