1. 程式人生 > >could not find a writer for the specified extension in function 'cv::imwrite_'的一種原因

could not find a writer for the specified extension in function 'cv::imwrite_'的一種原因

在使用cv2.imwrite()的時候出錯。

原因在於你給的字尾opencv不支援,或者沒有後綴的檔案。比如應該是a.jpg,你寫成了ajpg。

Only 8-bit (or 16-bit unsigned (CV_16U)
.   in case of PNG, JPEG 2000, and TIFF) single-channel or 3-channel (with 'BGR' channel order) images
.   can be saved using this function.