Several updates on progress bar and early warning (#10)

* Major upgrade of dependencies and running time

1. Removed the Boost dependency by adopting a newer cut-pursuit version from the authors (resulting in a 5–15× speed improvement).
2. Fixed an issue with the nearest neighbor search caused by an incorrect 2D array order input to the knn_cpp query function.
3. Enabled customization of the number of threads for knn-cpp, yielding a slight speed improvement.
4. Optimized array calculations through enhanced use of STL algorithms.

* Change log added

* Smoothened the progress bar and added ground detectioned

- Improved progress bar increment
- Added rapid detection of ground points based on quantile distribution
- Added warning of ground points before continuing initial segmentation

* Crash fix

- Avoided crashes by adding error handling once the maximum component limit is reached
- Improved the speed of unique and get_subset functions
This commit is contained in:
ZXi
2025-02-18 13:21:42 -08:00
committed by GitHub
parent 2ca4b85395
commit 0e18ee5e2b
8 changed files with 256 additions and 198 deletions
+3 -3
View File
@@ -221,21 +221,21 @@ struct CommandTreeIso : public ccCommandLineInterface::Command
if (try_init_seg)
{
if (!TreeIso::Init_seg_pcd(desc.pc, parameters.min_nn1, parameters.reg_strength1, parameters.decimate_res1, parameters.threads1))
if (!TreeIso::Init_seg_pcd(desc.pc, parameters.min_nn1, parameters.reg_strength1, parameters.decimate_res1, parameters.threads1, [](int) {/*No implementation for progress bar*/}))
{
return cmd.error("Failed to finish initial segmentation due to unknown reasons.");
}
}
if (try_intermediate_seg)
{
if (!TreeIso::Intermediate_seg_pcd(desc.pc, parameters.min_nn2, parameters.reg_strength2, parameters.decimate_res2, parameters.max_gap, parameters.threads2))
if (!TreeIso::Intermediate_seg_pcd(desc.pc, parameters.min_nn2, parameters.reg_strength2, parameters.decimate_res2, parameters.max_gap, parameters.threads2, [](int) {/*No implementation for progress bar*/}))
{
return cmd.error("Failed to finish intermediate segmentation due to unknown reasons.");
}
}
if (try_final_seg)
{
if (!TreeIso::Final_seg_pcd(desc.pc, parameters.min_nn2, parameters.rel_height_length_ratio, parameters.vertical_weight))
if (!TreeIso::Final_seg_pcd(desc.pc, parameters.min_nn2, parameters.rel_height_length_ratio, parameters.vertical_weight, [](int) {/*No implementation for progress bar*/}))
{
return cmd.error("Failed to finish final segmentation due to unknown reasons.");
}