美文网首页
opencv-python(cv2)的数据类型要求

opencv-python(cv2)的数据类型要求

作者: SSRSGJYD | 来源:发表于2019-12-09 16:08 被阅读0次

cv2遇到以下错误时:

> Unsupported depth of input image:
>     'VDepth::contains(depth)'
> where
>     'depth' is 6 (CV_64F)

原因是cv2只支持32位的数据(np.uint8, np.float32)。需要使用numpy的方法预先进行数据类型转换。

相关文章

网友评论

      本文标题:opencv-python(cv2)的数据类型要求

      本文链接:https://www.haomeiwen.com/subject/znzbgctx.html