Skip to content

Commit 72b88b0

Browse files
committed
sample_consensus: reduce SampleConsensusModelEllipse3D template instantiations
Move the Levenberg-Marquardt optimization logic into a non-templated pcl::internal::optimizeModelCoefficientsEllipse3D function in the source file, reducing redundant template instantiations from 61 to 1. This results in a ~24% reduction in rebuild time for the pcl_sample_consensus library. Move the get_ellipse_point, dvec2ellipse, and golden_section_search math helpers into pcl::internal in the header to allow shared access without exposing them as class members. Additionally: - Fix projectPoints to write to projected_points[inlier] instead of projected_points[i++] when copy_data_fields is true, consistent with other SAC models - Remove redundant headers (Eigen/Eigenvalues, sac_model_ellipse3d.h) from the .cpp, and pcl_exports.h from the .h (all transitively included) - Restore explanation comments stripped during range-based for conversion - Fix modernize-return-braced-init-list lint warning - Match parameter signature with other optimized internal models - Correct template instantiations for core and non-core point types
1 parent c423d30 commit 72b88b0

3 files changed

Lines changed: 268 additions & 299 deletions

File tree

0 commit comments

Comments
 (0)