Assertion failure : size.width>0 && size.height>0 in function imshow

前端 未结 10 1246
失恋的感觉
失恋的感觉 2020-11-30 12:19

i am using opencv2 and python on raspberry pi. and i am new with python and opencv. i tried to read a jpeg image and display image it shows the following error:

<         


        
10条回答
  •  醉梦人生
    2020-11-30 13:14

    One of the reasons, this error is caused is when there is no file at the path specified. So, a good practice will be to verify the path like this ( If you are on a linux based machine ):

    ls 
    

    You will get an error if the path is incorrect or the file is missing.

提交回复
热议问题