cv2.error: OpenCV(4.5.5)

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

OpenCV报错

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

你可能感兴趣的:(opencv,计算机视觉,visual,studio)