Fitting a 2D B-Spline curve to 2D point-clouds using asymmetric-tangent-distance-minimization Based on paper: TODO. More...
#include <fitting_curve_2d_atdm.h>
Public Member Functions | |
void | assemble (const FittingCurve2dAPDM::Parameter ¶meter) |
Assemble the system of equations for fitting. | |
FittingCurve2dATDM (int order, NurbsDataCurve2d *data) | |
Constructor initializing B-Spline curve using initNurbsCurve2D(...). | |
FittingCurve2dATDM (NurbsDataCurve2d *data, const ON_NurbsCurve &nc) | |
Constructor initializing with the B-Spline curve given in argument 2. | |
virtual double | solve (double damp=1.0) |
Solve system of equations using Eigen or UmfPack (can be defined in on_nurbs.cmake), and updates B-Spline curve if a solution can be obtained. | |
virtual double | updateCurve (double damp) |
Update curve according to the current system of equations. | |
Protected Member Functions | |
virtual void | addCageRegularisation (double weight, unsigned &row, const std::vector< double > &elements, double wConcav=0.0) |
Add minimization constraint: smoothness by control point regularisation. | |
virtual void | addPointConstraint (const double ¶m, const Eigen::Vector2d &point, const Eigen::Vector2d &normal, double weight, unsigned &row) |
Add minimization constraint: point-to-surface distance (tangent-distance-minimization). | |
virtual void | assembleClosestPoints (const std::vector< double > &elements, double weight, double sigma2, unsigned &row) |
Assemble closest points constraints. At each midpoint of the curve elements the closest data points are computed and point-to-surface constraints are added. | |
virtual void | assembleClosestPoints (int res, double weight, unsigned &row) |
Assemble closest points constraints. Samples curve and searches for close data points, and adds point-to-surface constraint. | |
virtual void | assembleInterior (double wInt, double sigma2, double rScale, unsigned &row) |
Assemble point-to-surface constraints. |
Fitting a 2D B-Spline curve to 2D point-clouds using asymmetric-tangent-distance-minimization Based on paper: TODO.
Definition at line 55 of file fitting_curve_2d_atdm.h.
FittingCurve2dATDM::FittingCurve2dATDM | ( | int | order, |
NurbsDataCurve2d * | data | ||
) |
Constructor initializing B-Spline curve using initNurbsCurve2D(...).
[in] | order | the polynomial order of the B-Spline curve. |
[in] | data | pointer to the 2D point-cloud data to be fit. |
Definition at line 44 of file fitting_curve_2d_atdm.cpp.
FittingCurve2dATDM::FittingCurve2dATDM | ( | NurbsDataCurve2d * | data, |
const ON_NurbsCurve & | nc | ||
) |
Constructor initializing with the B-Spline curve given in argument 2.
[in] | data | pointer to the 2D point-cloud data to be fit. |
[in] | nc | B-Spline curve used for fitting. |
Definition at line 49 of file fitting_curve_2d_atdm.cpp.
void FittingCurve2dATDM::addCageRegularisation | ( | double | weight, |
unsigned & | row, | ||
const std::vector< double > & | elements, | ||
double | wConcav = 0.0 |
||
) | [protected, virtual] |
Add minimization constraint: smoothness by control point regularisation.
Reimplemented from pcl::on_nurbs::FittingCurve2dAPDM.
Definition at line 173 of file fitting_curve_2d_atdm.cpp.
void FittingCurve2dATDM::addPointConstraint | ( | const double & | param, |
const Eigen::Vector2d & | point, | ||
const Eigen::Vector2d & | normal, | ||
double | weight, | ||
unsigned & | row | ||
) | [protected, virtual] |
Add minimization constraint: point-to-surface distance (tangent-distance-minimization).
Definition at line 146 of file fitting_curve_2d_atdm.cpp.
void FittingCurve2dATDM::assemble | ( | const FittingCurve2dAPDM::Parameter & | parameter | ) | [virtual] |
Assemble the system of equations for fitting.
Reimplemented from pcl::on_nurbs::FittingCurve2dAPDM.
Definition at line 55 of file fitting_curve_2d_atdm.cpp.
void FittingCurve2dATDM::assembleClosestPoints | ( | const std::vector< double > & | elements, |
double | weight, | ||
double | sigma2, | ||
unsigned & | row | ||
) | [protected, virtual] |
Assemble closest points constraints. At each midpoint of the curve elements the closest data points are computed and point-to-surface constraints are added.
Definition at line 313 of file fitting_curve_2d_atdm.cpp.
void FittingCurve2dATDM::assembleClosestPoints | ( | int | res, |
double | weight, | ||
unsigned & | row | ||
) | [protected, virtual] |
Assemble closest points constraints. Samples curve and searches for close data points, and adds point-to-surface constraint.
Definition at line 377 of file fitting_curve_2d_atdm.cpp.
void FittingCurve2dATDM::assembleInterior | ( | double | wInt, |
double | sigma2, | ||
double | rScale, | ||
unsigned & | row | ||
) | [protected, virtual] |
Assemble point-to-surface constraints.
Reimplemented from pcl::on_nurbs::FittingCurve2dAPDM.
Definition at line 235 of file fitting_curve_2d_atdm.cpp.
double FittingCurve2dATDM::solve | ( | double | damp = 1.0 | ) | [virtual] |
Solve system of equations using Eigen or UmfPack (can be defined in on_nurbs.cmake), and updates B-Spline curve if a solution can be obtained.
Reimplemented from pcl::on_nurbs::FittingCurve2dAPDM.
Definition at line 98 of file fitting_curve_2d_atdm.cpp.
double FittingCurve2dATDM::updateCurve | ( | double | damp | ) | [virtual] |
Update curve according to the current system of equations.
[in] | damp | damping factor from one iteration to the other. |
Reimplemented from pcl::on_nurbs::FittingCurve2dAPDM.
Definition at line 109 of file fitting_curve_2d_atdm.cpp.