cv2.imshow command doesn't work properly in opencv-python

前端 未结 16 1687
轻奢々
轻奢々 2020-12-04 17:31

I\'m using opencv 2.4.2, python 2.7 The following simple code created a window of the correct name, but its content is just blank and doesn\'t show the image:



        
16条回答
  •  佛祖请我去吃肉
    2020-12-04 17:59

    Doesn't need any additional methods after waitKey(0) (reply for above code)

    import cv2
    img=cv2.imread('C:/Python27/03323_HD.jpg')
    cv2.imshow('ImageWindow',img)
    cv2.waitKey(0)
    

    Window appears -> Click on the Window & Click on Enter. Window will close.

提交回复
热议问题