line
最后更新
depthai_nodes.message.creators.line函数
create_line_detection_message
Python
1def create_line_detection_message(lines: np.ndarray, scores: np.ndarray) -> dai.beta.Lines:lines(np.ndarray): 检测到的线条,形状为 (N,4),表示 [...,[x_start, y_start, x_end, y_end],...]。scores(np.ndarray): 检测到的线条的置信度分数,形状为 (N,)。
dai.beta.Lines: 包含检测到的线条及其置信度分数的 संदेश。
ValueError: 如果线条不是 numpy 数组。如果线条的形状不是 (N,4)。如果线条的第二个维度大小不是 4。如果分数不是 numpy 数组。如果分数的形状不是 (N,)。如果分数的长度与线条的长度不一致。