目录
效果图:
源代码:
效果图:
源代码:
import json
import os
import shutilimport cv2
import numpy as npfrom numpy.polynomial.polynomial import Polynomialdef calculate_distance(x1, y1, x2, y2):return np.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)def get_new_group(group_0_x, group_0_y, group_1_x,group_1_y):# 计算四种组合的距离dist_head_head = calculate_distance(group_0_x[0], group_0_y[0], group_1_x[0], group_1_y[0]) # 头点和头点dist_head_tail = calculate_distance(group_0_x[0], grou