error: (-210:Unsupported format or combination of formats) [Start]FindContours supports only CV_8UC1

Posted ambdyx

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了error: (-210:Unsupported format or combination of formats) [Start]FindContours supports only CV_8UC1相关的知识,希望对你有一定的参考价值。

问题:

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‘

 

 

这个问题是因为使用opencv读取的图片未进行cv2的灰度化操作。

 

可以直接在 cv2.imread(url) 变为:cv2.imread(url,0)可以解决。

 

技术图片

 

 技术图片

 

 

以上是关于error: (-210:Unsupported format or combination of formats) [Start]FindContours supports only CV_8UC1的主要内容,如果未能解决你的问题,请参考以下文章