## 5 Clustering  
### Cloud Point Clustering  
The generated point clouds are sparse and insufficiently informative for recognizing distinct targets in the FoV. Furthermore, while static targets and noisy background reflections were removed through interference filtering, as discussed in Section 4, the remaining points are not always reflected by the targets. As shown in Figure 4, these interference points can be significant and can lead to confusion with points from nearby targets. Therefore, in this module, a clustering algorithm was applied to remove noise points in the point cloud, in addition to grouping sparse point clouds into several clusters, each corresponding to a single target present in the FoV.  
The density-based spatial clustering of applications with noise (DBScan) algorithm was applied as a clustering algorithm [44], which is a density-aware clustering method that separates cloud points based on the Euclidean distance in 3D space. The DBScan algorithm groups several points in high-density regions into clusters, whereas interference points occur in low-density regions and are, therefore, removed from the clusters. In eachframe, DBScan scans all points sequentially, enlarging a cluster until a certain density connectivity criterion is no longer satisfied. Unlike K-means, DBScan does not require previous knowledge of the number of clusters and is, hence, well-suited for target detection problems with an arbitrary number of targets.  
The distance between two points is used as the distance metric in DBScan for density-connection checking and is defined as follows:  
\[d^{t}(i,j)=\alpha_{x}(x_{i}^{t}-x_{j}^{t})^{2}+\alpha_{y}(y_{i}^{t}-y_{j}^{t}) ^{2}+\alpha_{z}(z_{i}^{t}-z_{j}^{t})^{2}+\alpha_{v}(v_{i}^{t}-v_{j}^{t})^{2}, \tag{12}\]  
where \(\alpha=\left[\alpha_{x},\alpha_{y},\alpha_{z},\alpha_{v}\right]\) is the weight vector used to balance the contribution of each element. The parameters \(\alpha_{x},\alpha_{y}\), and \(\alpha_{z}\) regulate the contribution of the distance between the two points in the \(x,~{}y,\) and \(z\) axes, respectively. \(\alpha_{v}\) regulates the contribution of the object speed. Velocity information is applied during the clustering phase to distinguish between two nearby targets with varying speeds, such as when two targets pass face-to-face. The clustering algorithm is illustrated in Algorithm 1.  
```
Input:\(maxDistance\): the largest Euclidean distance between two points; \(minClusterPoint\) : the minimum number of points required for a cluster. Output: clustered targets
1. Initialize the values of \(maxDistance\) and \(minClusterPoint\).
2. Choose point \(p_{i}\) randomly, which is not identified as a cluster or noise.
3. Calculate its neighboring points to determine whether it is a primary point. If this is true, form a cluster surrounding this point; otherwise, this point is considered noise.
4. If \(p_{i}\) is a primary point, a cluster is formed, enlarging the cluster by including points that are reachable by it and are less than \(maxDistance\).
5. If a noise point is added, change the status of that point from noise to a boundary point.
6. Continue with Steps 2:5 until all points have been designated as cluster points or noise.
```  
**Algorithm 1** Clustering algorithm.