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

2019-12-09  本文已影响0人  SSRSGJYD

cv2遇到以下错误时:

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

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

上一篇 下一篇

猜你喜欢

热点阅读