74 void smoothTotalVariation(
const T omega1,
const T omega2,
const T lamda,
const T tau,
const unsigned iter=50);
94 void write(std::ostream &os);
141 #ifndef GISMO_BUILD_LIB
142 #include GISMO_HPP_HEADER(gsCurvatureSmoothing.hpp)
gsMatrix< T > m_points
the points of the original point cloud
Definition: gsCurvatureSmoothing.h:120
gsMatrix< T > m_param_values
the parameter values of the original point cloud
Definition: gsCurvatureSmoothing.h:118
void smoothTotalVariationSelectLamda(const T omega1, const T omega2, const gsMatrix< T > listlamdas, const unsigned iter=50)
Definition: gsCurvatureSmoothing.hpp:203
const gsBSpline< T > * m_curve_original
the original B-spline curve
Definition: gsCurvatureSmoothing.h:114
void reset(gsBSpline< T > *newCurve)
set the smooth curve to the the original curve
Definition: gsCurvatureSmoothing.h:130
void computeCurvatureError(T &error)
computes the curvature error of the smoother curve
Definition: gsCurvatureSmoothing.hpp:632
void computeApproxErrorCoef(T &error)
computes the max approximation error between the coeffeicientsof the original and the smoother curve ...
Definition: gsCurvatureSmoothing.hpp:616
Class for computing a closed B-spline curve with a smaller number of curvature extrema compared to a ...
Definition: gsCurvatureSmoothing.h:40
Provides declaration of Geometry abstract interface.
void compute_ObjectiveFunction(gsBSplineBasis< T > *basis, gsMatrix< T > *coefs, const T omega1, const T omega2, T &value)
computes the objective function for given coefs and omega1 and omega2 – objective function = omega1*A...
Definition: gsCurvatureSmoothing.hpp:686
#define index_t
Definition: gsConfig.h:32
const gsBSpline< T > & curveSmooth() const
gives back the smoother B-spline curve
Definition: gsCurvatureSmoothing.h:69
void computeApproxErrorL2(T &error)
computes the L^{2}-norm approximation error of the smoother curve
Definition: gsCurvatureSmoothing.hpp:591
A B-spline function of one argument, with arbitrary target dimension.
Definition: gsBSpline.h:50
void smoothTotalVariation(const T omega1, const T omega2, const T lamda, const T tau, const unsigned iter=50)
Definition: gsCurvatureSmoothing.hpp:27
A univariate B-spline basis.
Definition: gsBSplineBasis.h:694
const gsBSpline< T > & curveOriginal() const
gives back the original B-spline curve
Definition: gsCurvatureSmoothing.h:67
void computeApproxErrorLMax(T &error)
computes the L-max-norm approximation error of the smoother curve
Definition: gsCurvatureSmoothing.hpp:601
~gsCurvatureSmoothing()
Destructor.
Definition: gsCurvatureSmoothing.h:60
void smoothHadenfeld(const unsigned smooth_degree, const T delta, const index_t iter_step, const index_t iter_total, gsVector< index_t > &iterated, const bool original=true)
smooth the curve by smoothing only one cofficient in each step using the Hadenfeld algorithm — the us...
Definition: gsCurvatureSmoothing.hpp:388
void compute_AllValues(gsBSplineBasis< T > *basis, gsMatrix< T > u, gsMatrix< T > *coefs, gsMatrix< T > &values0, gsMatrix< T > &values1, gsMatrix< T > &values2, gsMatrix< T > &values3)
computes all values and derivatives (up to three) at the parameter values u for the given coefs ...
Definition: gsCurvatureSmoothing.hpp:650
uPtr clone()
Clone methode. Produceds a deep copy inside a uPtr.
void smoothAllHadenfeld(const unsigned smooth_degree=4, const unsigned iter=500)
Definition: gsCurvatureSmoothing.hpp:500
Represents a B-spline curve/function with one parameter.
This is the main header file that collects wrappers of Eigen for linear algebra.
void write(std::ostream &os)
writes the smooth curve to a file, which can be visualized in Mathematica (Name of Mathematica File V...
Definition: gsCurvatureSmoothing.hpp:565
gsCurvatureSmoothing()
default constructor
Definition: gsCurvatureSmoothing.h:44
gsCurvatureSmoothing(const gsBSpline< T > &init_curve, const gsMatrix< T > ¶m_values, const gsMatrix< T > &points)
constructor
Definition: gsCurvatureSmoothing.h:51
gsBSpline< T > * m_curve_smooth
the smoother B-spline curve
Definition: gsCurvatureSmoothing.h:116
void computeApproxError(T &error)
computes approximation error of the smoother curve to the original point cloud
Definition: gsCurvatureSmoothing.hpp:578