This commit is contained in:
王庆刚
2024-09-02 11:50:08 +08:00
parent 5109400a57
commit 0cc36ba920
34 changed files with 1401 additions and 275 deletions

View File

@ -114,7 +114,7 @@ def draw_all_trajectories(vts, edgeline, save_dir, file, draw5p=False):
img = edgeline.copy()
img = draw5points(track, img)
pth = trackpth.joinpath(f"{file}_{track.tid}.png")
pth = trackpth.joinpath(f"{file}_{track.tid}_.png")
cv2.imwrite(str(pth), img)
# for track in vts.Residual:
@ -307,11 +307,13 @@ def draw5points(track, img):
'''=============== 最小轨迹长度索引 ===================='''
if track.isBorder:
trajlens = [int(t) for t in track.trajrects_wh]
if track.isCornpoint:
idx = 0
else:
idx = trajlens.index(min(trajlens))
'''=============== PCA ===================='''
if trajlens[idx] > 12:
X = cornpoints[:, 2*idx:2*(idx+1)]