Is it possible to have black and white and color image on same window by using opencv?

前端 未结 4 2028
南旧
南旧 2020-12-05 08:35

Is it possible to have black-and-white and color image on same window by using opencv libraray? How can I have both of these images on same window?

4条回答
  •  情书的邮戳
    2020-12-05 08:48

    import cv2
    img = cv2.imread("image.jpg" , cv2.IMREAD_GRAYSCALE)
    cv2.imshow("my image",img)
    cv2.waitkey(0)
    cv2.destroyAllWindow
    
    
    #The image file should be in the application folder.
    #The output file will be 'my image' name.
    #The bottom line is to free up memory.
    

提交回复
热议问题