Getting error - 'could not find a writer'while giving imshow, imwrite command opencv

后端 未结 4 1561
情话喂你
情话喂你 2021-01-04 14:24

I am a beginner at opencv and python. I have just installed opencv2.4.9 and enthought canopy-32bit. I am getting error for the following:

import cv2
image =          


        
4条回答
  •  时光取名叫无心
    2021-01-04 14:39

    You need to make sure you have the image type within the string you give to the imwrite(). imwrite() dose not have a default method to save, thus it is required within the name you give to it. instead of : cv2.imwrite('Mypic',image) you need to write :

    cv2.imwrite('Mypic.The_format_you_want_to_save',image)
    

    As an example:

    cv2.imwrite('Mypic.jpg',image)
    

提交回复
热议问题