其他分享
首页 > 其他分享> > cv2.error: OpenCV(4.5.5)

cv2.error: OpenCV(4.5.5)

作者:互联网

OpenCV报错

cv2.imwrite(filename_pred_png, pred_depth_scaled, [cv2.IMWRITE_PNG_COMPRESSION, 0])

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

报错原因:debug发现路径没有写文件后缀,应该写入.jpg或者.png

标签:4.5,cv2,OpenCV,报错,error,imwrite
来源: https://blog.csdn.net/weixin_44823313/article/details/122685383