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

问题:

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)可以解决。

 

原文地址:https://www.cnblogs.com/ambdyx/p/11961826.html