【发布时间】:2021-06-29 13:43:17
【问题描述】:
我有一组三个点,在一个三角形中。例如:[[390 37]、[371 179]、[555 179]]
画完线,How to draw lines between points in OpenCV?
如何找到我刚刚绘制的线条之间的完整轮廓?
我不断收到以下错误:
img = np.zeros([1000, 1000, 3], np.uint8)
cv2.drawContours(img, triangle_vertices, 0, (0, 0, 0), -1)
contours, hierarchy = cv2.findContours(img, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_NONE)
错误:(-210:不支持的格式或格式组合)[开始]FindContours 仅在模式 != CV_RETR_FLOODFILL 时支持 CV_8UC1 图像,否则仅在函数 'cvStartFindContours_Impl' 中支持 CV_32SC1 图像
【问题讨论】:
标签: python python-3.x numpy opencv