再次修复回溯bug

This commit is contained in:
zqc
2026-03-11 11:26:25 +08:00
parent 2fd67fc656
commit 092e6178a2

View File

@@ -371,16 +371,12 @@ class KadianDetector:
cv2.rectangle(frame, (x1, y1), (x2, y2), color, 2)
cv2.putText(frame, label, (x1, y1 - 10), cv2.FONT_HERSHEY_SIMPLEX, 0.6, color, 2)
# 每帧保存到缓存
# self.roi_car_registry[tid]['frame_buffer'].append({
# 'frame_idx': current_time_sec,
# 'frame': frame.copy(),
# })
self.frame_buffer_ignore_untrunk.append({
'frame_idx': self.current_frame_idx,
'timestamp': current_time_sec,
'frame': frame.copy(),
})
# 每帧保存到缓存(移到循环外,确保每帧只写入一次)
self.frame_buffer_ignore_untrunk.append({
'frame_idx': self.current_frame_idx,
'timestamp': current_time_sec,
'frame': frame.copy(),
})
# ==========================================
# 关联分析: 哪个后备箱属于哪辆车?