【发布时间】:2021-12-03 08:07:28
【问题描述】:
我有一张经过处理以使用精明边缘算法查找边缘的图像,现在我需要在这些形状周围绘制边界框。问题是当我使用时
cv2.findContours
我收到这个错误
error: OpenCV(4.1.2) /io/opencv/modules/imgproc/src/contours.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'
我怎样才能做到这一点?
【问题讨论】:
-
将图像转换为 uint8。它可能是浮动的,不适用于 findContours
标签: python opencv computer-vision bounding-box