【发布时间】:2019-01-17 11:13:50
【问题描述】:
我正在努力避免 CV2 用于工作 porpuses。我正在使用skimage.measure.find_contours。但我在任何地方都找不到等效的 CV2 arcLength 函数。
如果没有 CV2 函数,我如何计算轮廓周长或曲线长度。
这是我的代码,以防万一:
from skimage import measure
hresh = get_threshold(image, 127)
contours = measure.find_contours(thresh, 0.8)
for contour in contours:
approx = aproximate_curve(contour, 0.1 * my_unknown_arc_length_function(contour)) # I have no idea about arc_length_function implementation
在此先感谢,对我的英语感到抱歉。
【问题讨论】:
标签: python scikit-image cv2