3DPointCloudTracker
This project implements 3D object detection based on LiDAR point cloud, filtering targets through DBSCAN clustering with given prior coordinate information. The script provides an interactive GUI for parameter input and 3D visualization.
Install / Use
/learn @Weber-PKU/3DPointCloudTrackerREADME
3DPointCloudTracker
Script Function
The server.py script reads 3D LiDAR point clouds from a specified path (which can be replaced with any desired method of data acquisition) and periodically transmits this data to Network Port 1.
The client.py script's receiver thread continuously receives point clouds from Network Port 1. The processor thread asynchronously processes the point clouds, using DBSCAN clustering, and persistently tracks a particular cluster (the target) by setting an initial anchor point. The transmitter thread sends the tracking results, ex.target_x, ex.target_y, and ex.target_z, in real-time to Network Port 2. Key parameters and visualizations are managed through a PyQt GUI interface.
The guest.py script creates a subprocess, the receiver thread, which is used to receive tracking results,ex.target_x, ex.target_y, and ex.target_z from Network Port 2 for downstream tasks.
Operation Steps
- Run
main.py. Or runpython server.py,python guest.pyandpython client.pyin separate terminals, sequentially.
- Set the red initial anchor point (
Initial-x,Initial-y,Initial-z) for tracking, and the anchor point should be as close as possible to the object being tracked. ClickActivate Clustering and Trackingto start the tracking process.
- If the tracking process is not satisfied, click
Pause Clustering and Tracking, reset anchor point, and restart.
Client.py Configuration
Clustering
DBSCAN-EPS: a parameter for the DBSCAN clustering algorithm. It specifies the maximum distance between two samples for them to be considered as in the same neighborhood. A smaller EPS value means that points need to be closer together to be considered part of the same cluster, leading to a greater number of smaller clusters.DBSCAN-Min-Samples: a parameter for the DBSCAN clustering algorithm. It represents the minimum number of points required to form a cluster. A higher value will result in fewer clusters, as it requires more points to be close together (within the EPS distance) to form a cluster.
Canvas and plotting
Plot-Maker-Size: the size of the markers (points) in the 3D plot.Plot-Alpha: transparency of the markers from 0 to 1 (no transparency).Plot-X-MinandPlot-X-Max: the minimum and maximum limits of the x-axis on the plot.Plot-Y-MinandPlot-Y-Max: the minimum and maximum limits of the y-axis on the plot.
Tracking
Initial-x,Initial-yandInitial-z: the anchor point to begin tracking, which should be as close as possible to the object being tracked.Max D to Last Centroid: the maximum allowed distance between the centroid of the currently found cluster (target) and the centroid of the previously found cluster (last target), ensuring spatial proximity in the tracking process.H Thres.: height threshold, the minimum height value for points in the 3D point cloud data, filtering out points that fall below this threshold and focusing analysis on points above it.Min-Volume,Max-Volume,Min-AreaandMax-Area: the minimum volume (xyz), maximum volume (xyz), minimum area (xy) and maximum area (xy) of a cluster to be considered in the tracking process to filter out smaller or larger clusters that are not of interest.Min_Points: the minimum number of points that a cluster must contain to be considered in the tracking process. Clusters with fewer points than this threshold are considered as noise.
