diff --git a/BGL/include/CGAL/boost/graph/parameters_interface.h b/BGL/include/CGAL/boost/graph/parameters_interface.h index 9313e0ccbee..8cb34315b40 100644 --- a/BGL/include/CGAL/boost/graph/parameters_interface.h +++ b/BGL/include/CGAL/boost/graph/parameters_interface.h @@ -162,4 +162,5 @@ CGAL_add_named_parameter(number_of_samples_t, number_of_samples, number_of_sampl CGAL_add_named_parameter(accuracy_t, accuracy, accuracy) CGAL_add_named_parameter(maximum_running_time_t, maximum_running_time, maximum_running_time) CGAL_add_named_parameter(overlap_t, overlap, overlap) +CGAL_add_named_parameter(maximum_normal_deviation_t, maximum_normal_deviation, maximum_normal_deviation) diff --git a/BGL/test/BGL/test_cgal_bgl_named_params.cpp b/BGL/test/BGL/test_cgal_bgl_named_params.cpp index a75daf5357a..055faccf104 100644 --- a/BGL/test/BGL/test_cgal_bgl_named_params.cpp +++ b/BGL/test/BGL/test_cgal_bgl_named_params.cpp @@ -229,6 +229,7 @@ void test(const NamedParameters& np) check_same_type<9031>(get_parameter(np, CGAL::internal_np::transformation_checkers)); check_same_type<9032>(get_parameter(np, CGAL::internal_np::inspector)); check_same_type<9033>(get_parameter(np, CGAL::internal_np::logger)); + check_same_type<9034>(get_parameter(np, CGAL::internal_np::maximum_normal_deviation)); } int main() @@ -334,7 +335,8 @@ int main() .error_minimizer(A<9030>(9030)) .transformation_checkers(A<9031>(9031)) .inspector(A<9032>(9032)) - .logger(A<9033>(9033)) + .logger(A<9033>(9033) + .maximum_normal_deviation(A<9034>(9034)) ); return EXIT_SUCCESS; } diff --git a/Point_set_processing_3/doc/Point_set_processing_3/NamedParameters.txt b/Point_set_processing_3/doc/Point_set_processing_3/NamedParameters.txt index a7b303355cd..7f7c42ad9eb 100644 --- a/Point_set_processing_3/doc/Point_set_processing_3/NamedParameters.txt +++ b/Point_set_processing_3/doc/Point_set_processing_3/NamedParameters.txt @@ -203,6 +203,12 @@ is the wanted output accuracy, expressed in scene units.\n Default value: `5.00` \cgalNPEnd +\cgalNPBegin{maximum_normal_deviation} \anchor PSP_maximum_normal_deviation +is the maximum angle between the normals of a pair of points, expressed in degrees.\n +\b Type: floating scalar value\n +Default value: `90.00` +\cgalNPEnd + \cgalNPBegin{overlap} \anchor PSP_overlap is the expected overlap ratio (between 0 and 1) between two points sets to register.\n \b Type: floating scalar value\n diff --git a/Point_set_processing_3/include/CGAL/OpenGR/compute_registration_transformation.h b/Point_set_processing_3/include/CGAL/OpenGR/compute_registration_transformation.h index 5dad0cd4950..5a51be7ec89 100644 --- a/Point_set_processing_3/include/CGAL/OpenGR/compute_registration_transformation.h +++ b/Point_set_processing_3/include/CGAL/OpenGR/compute_registration_transformation.h @@ -203,6 +203,12 @@ compute_registration_transformation(const PointRange1& range1, const PointRan refine the transformation using a local algorithm, like the ICP, or its variant SparseICP.\cgalParamEnd + \cgalParamBegin{maximum_normal_deviation} angle threshold (in + degrees) used to filter pairs of points according to their normal + consistency. Small values decrease computation time but may also + decrease the quality if pairs of points that should match have + a normal deviation higher than the threshold.\cgalParamEnd + \cgalParamBegin{accuracy} registration accuracy (delta in the paper). Setting a small value means that the two clouds needs to be very close to be considered as well aligned. It is expressed in scene units. A @@ -289,6 +295,8 @@ compute_registration_transformation (const PointRange1& point_set_1, const Point options.sample_size = choose_parameter(get_parameter(np1, internal_np::number_of_samples), 200); options.delta = choose_parameter(get_parameter(np1, internal_np::accuracy), 5.00); options.max_time_seconds = choose_parameter(get_parameter(np1, internal_np::maximum_running_time), 1000); + options.max_normal_difference = choose_parameter(get_parameter(np1, internal_np::maximum_normal_deviation), 90.); + bool overlap_ok = options.configureOverlap (choose_parameter(get_parameter(np1, internal_np::overlap), 0.20)); CGAL_USE (overlap_ok); // TODO: non-constant condition for static assertion, the value of ‘overlap_ok’ is not usable in a constant expression diff --git a/Point_set_processing_3/include/CGAL/OpenGR/register_point_sets.h b/Point_set_processing_3/include/CGAL/OpenGR/register_point_sets.h index 16f1be733ee..abec6b8bf38 100644 --- a/Point_set_processing_3/include/CGAL/OpenGR/register_point_sets.h +++ b/Point_set_processing_3/include/CGAL/OpenGR/register_point_sets.h @@ -132,6 +132,12 @@ register_point_sets(const PointRange1& range1, PointRange2& range2, shell. The thickness of the shell is defined by the parameter delta.\cgalParamEnd + \cgalParamBegin{maximum_normal_deviation} angle threshold (in + degrees) used to filter pairs of points according to their normal + consistency. Small values decrease computation time but may also + decrease the quality if pairs of points that should match have + a normal deviation higher than the threshold.\cgalParamEnd + \cgalParamBegin{overlap} ratio of expected overlap between the two point sets: it is ranging between 0 (no overlap) to 1 (100% overlap). The overlap parameter controls the size of the basis used for @@ -200,6 +206,8 @@ register_point_sets (const PointRange1& point_set_1, PointRange2& point_set_2, options.sample_size = choose_parameter(get_parameter(np1, internal_np::number_of_samples), 200); options.delta = choose_parameter(get_parameter(np1, internal_np::accuracy), 5.00); options.max_time_seconds = choose_parameter(get_parameter(np1, internal_np::maximum_running_time), 1000); + options.max_normal_difference = choose_parameter(get_parameter(np1, internal_np::maximum_normal_deviation), 90.); + bool overlap_ok = options.configureOverlap (choose_parameter(get_parameter(np1, internal_np::overlap), 0.20)); CGAL_USE (overlap_ok); // TODO: non-constant condition for static assertion, the value of ‘overlap_ok’ is not usable in a constant expression