Skip to main content
. 2025 Feb 20;25(5):1303. doi: 10.3390/s25051303
Algorithm 1. Valid data segment fusion and partitioning algorithm
Input: valid_data_segments, start_indexs, end_indexs
Output: cars_list, front_edges, back_edges, occ_type_list
1. for each data segment i:
2.  if cars_list is empty:
3.    create a new car segment
4.  else:
5.    let j be the last car segment, and l be the second-to-last segment (if it exists)
6.    if the minimum difference between segment i and segment l < Te and time difference < Pf:
7.      fuse with segment l
8.    else if the minimum difference between segment i and segment j < Te and time difference < Pf:
9.      fuse with segment j
10.  else if the time difference < Po:
11.    mark as occlusion
12.  else:
13.    create a new car segment
End