首页 > 教育

python+opencv用这个函数findContours报错

更新时间2019-07-25 19:24:32

img, contours, cxjg = cv2.findContours(thresh, cv2.RETR_TREE, cv2.CHAIN_APPROX_NONE)cv2.error: OpenCV(4.1.0) C:projectsopencv-pythonopencvmodulesimgprocsrccontours.cpp:197: error: (-210:Unsupported format or combination of formats) [Start]FindContours supports only CV_8UC1 images when mode != CV_RETR_FLOODFILL otherwise supports CV_32SC1 images only in function 'cvStartFindContours_Impl'

FindContours 只支持CV_8UC1 的图像格式且模式不能为CV_RETR_FLOODFILL

否则,在cvStartFindContours_Impl'中只支持CV_32SC1 图像(你要有英文基础才能更好地学习计算机语言的)

上一篇:高中生应该练什么字体

下一篇:了解掌握什么是服务首都四个中心建设