当前位置:   article > 正文

could not find a writer for the specified extension in function 'imwrite_'

could not find a writer for the specified extension in function 'imwrite_

cv2.error: OpenCV(3.4.5) /io/opencv/modules/imgcodecs/src/loadsave.cpp:687: error: (-2:Unspecified error) could not find a writer for the specified extension in function 'imwrite_'
 

原文链接:

https://blog.csdn.net/CPZ742954007/article/details/81258413

 

      在opencv学习中,使用cv.imwrite('filename', img)保存照片文件到本地,有时使用失误可能会出现报错,error: (-2) could not find a writer for the specified extension in function cv::imwrite_
     代码里出现这个错误可能是因为‘filename’只写了文件名字,忘记加扩展名,应加上.jpg或.png等照片扩展名。
 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Cpp五条/article/detail/484703
推荐阅读
相关标签
  

闽ICP备14008679号