cv2.polylines是否可以返回形成线的每个点的坐标?

OpenCV Python API具有一个名为cv2.polylines的方法,就像这样。

一些例子:

import cv2
import numpy as np
im = np.zeros((1000,900),dtype="uint8")
coords = [[0,0],[0,500],[500,500]]
coords_array = np.array([coords],dtype=np.int32)
cv2.polylines(im,coords_array,1,255)
cv2.imshow('image',im)
cv2.waitKey(0)

OpenCV是否可以返回构成我绘制的三角形而不是三个顶点的所有点?我知道为此目的构建了一种称为Bresenham's line algorithm的算法,但是我不知道OpenCV是否在其cv2.polyline方法中实现了该算法。因此,我不知道从布雷森纳姆的线算法中得到的点集与三角形的轮廓相同。

wxy1934 回答:cv2.polylines是否可以返回形成线的每个点的坐标?

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3118933.html

大家都在问