問題:
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)可以解決。