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

 

 

 

 

 

posted @ 2019-11-30 11:31  ambrose  阅读(12939)  评论(0编辑  收藏  举报