- 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!