- sph2cart: https://www.mathworks.com/help/releases/R2020b/matlab/ref/sph2cart.html
- cart2sph: https://www.mathworks.com/help/releases/R2020b/matlab/ref/cart2sph.html
Can 'partitionDetections' be used with spherical data
1 次查看(过去 30 天)
显示 更早的评论
I have used the 'partitionDetections' function to cluster radar detections in cartesian coordinates [x;y;vx;vy] and the algorithm seems to work fine.
However when I changed to an objectDetection report in spherical frame [azimuth;range;range-rate], the clustering runs but doesn't appear to give sensible results. Is the 'partitionDetections' function only to be used with cartesian frame coordinates ?
0 个评论
回答(1 个)
Jaynik
2024-4-17
Hi William,
According to the documentation, the "partitionDetections" function is primarily designed to work with Cartesian coordinates. It partitions detections based on distance using either the Euclidean or Mahalanobis distance metric, both of which are more straightforward to compute in Cartesian space. In spherical coordinates, calculating distance becomes complex due to the curvature of the space. This might be why you are seeing less sensible results.
However, the function has been updated to also support the "DBSCAN" algorithm which maybe better for handling data in spherical coordinates as it is a density-based clustering algorithm that can adapt to the data's shape. Experimenting with this algorithm or adjusting the distance metrics might yield better outcomes.
If you continue to have issues, converting your spherical data back to Cartesian coordinates before applying "partitionDetections" could be a workaround. You can use the "sph2cart" function for this conversion, and "cart2sph" for converting back if needed.
You can read more about these functions here:
Hope this helps!
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Trigonometry 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!