Add named parameter for max normal deviation

This commit is contained in:
Simon Giraudot 2019-12-11 12:50:44 +01:00
parent 45e728f1e3
commit e657cd72f7
5 changed files with 26 additions and 1 deletions

View File

@ -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)

View File

@ -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;
}

View File

@ -203,6 +203,12 @@ is the wanted output accuracy, expressed in scene units.\n
<b>Default value</b>: `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
<b>Default value</b>: `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

View File

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

View File

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