cv2.error:OpenCV(3.4.1)错误:函数validateInputImageSize中的(-215)像素<=(1 << 30)

时间:2018-07-05 08:44:28

标签: opencv

在文档中我遇到了像素太大的问题: https://github.com/opencv/opencv/blob/master/modules/imgcodecs/src/loadsave.cpp

它显示最大像素为:

#define CV_IO_MAX_IMAGE_PARAMS (50)
#define CV_IO_MAX_IMAGE_WIDTH (1<<20)
#define CV_IO_MAX_IMAGE_HEIGHT (1<<20)
#define CV_IO_MAX_IMAGE_PIXELS (1<<30) // 1 Gigapixel

这是我获得的错误:

rgb = cv2.imread(XX)
cv2.error: OpenCV(3.4.1) 
/feedstock_root/build_artefacts/opencv_1520722613778/work/opencv- 
3.4.1/modules/imgcodecs/src/loadsave.cpp:74: error: (-215) pixels <= (1<<30) 
in function validateInputImageSize

有没有解决的办法?

谢谢!

0 个答案:

没有答案