当前位置: 代码迷 >> 综合 >> (-2:Unspecified error) could not find a writer for the specified extension in function‘cv::imwrite_
  详细解决方案

(-2:Unspecified error) could not find a writer for the specified extension in function‘cv::imwrite_

热度:38   发布时间:2024-01-05 11:37:16.0

当运行imwrite函数时出现下面的错误

error: (-2:Unspecified error) could not find a writer for the specified extension in function 'cv::imwrite_'

出现这个的原因是

cv.imwrite(**'skeleton',**skeleton)

没有后缀,jpg,png等。。。改成下面这样就行了

cv.imwrite('skeleton.jpg',skeleton)
  相关解决方案