Ponca
40f245e28b920cbb763a1c6282156c87c626f24c
Point Cloud Analysis library
|
Ponca Fitting Module is structured around the following concepts:
WeightKernelConcept
: defines how neighbor samples should be weightedComputationalObjectConcept
and ComputationalDerivativesConcept
: define API of the computational objects used in Basket and BasketDiff respectively.Computations will always follow the same pattern:
Note that in the above example, the type Fit
can be either a Basket or a BasketDiff, without affecting the rest of the code.
Objects used in Basket should respect the following API:
Objects used in BasketDiff should respect the following API:
As described in Computational objets, basket and CRTP, The tool classes provides different kinds of compute capabilities. To describe what a class provides, we uses flags that allows us to check for compatibility at compile time.
Here is an in depth description of all the labels of the Fitting tools :
Label | Provided by | Required by | Outputs |
---|---|---|---|
PROVIDES_MEAN_POSITION Mean of the input points vectors | MeanPosition | MeanPositionDer MeanPlaneFitImpl OrientedSphereFitImpl CovarianceFitBase UnorientedSphereFitImpl | barycenter() |
PROVIDES_MEAN_POSITION_DERIVATIVE Provides derivative of the mean position | MeanPositionDer | CovarianceFitDer OrientedSphereDerImpl UnorientedSphereDerImpl | barycenterDerivatives() |
PROVIDES_MEAN_NORMAL Mean of the normal vectors | MeanNormal | MeanPlaneFitImpl OrientedSphereFitImpl | meanNormalVector() |
PROVIDES_MEAN_NORMAL_DERIVATIVE Provides derivative of the mean normal | MeanNormalDer | - | dMeanNormal() |
PROVIDES_PRIMITIVE_BASE Provides base API for primitives | PrimitiveBase | PrimitiveDer AlgebraicSphere | getWeightSum() |
PROVIDES_PRIMITIVE_DERIVATIVE Provides base API for primitive derivatives | PrimitiveDer | GLSDer CovarianceFitDer MeanPositionDer MeanNormalDer MlsSphereFitDer OrientedSphereDerImpl UnorientedSphereDerImpl | isScaleDer() |
PROVIDES_GLS_PARAMETRIZATION Growing Least Squares reparametrization of the OrientedSphereFit | GLSParam | GLSDer | tau() |
PROVIDES_GLS_DERIVATIVE Differentiation of GLSParam | GLSDer | - | dtau() |
PROVIDES_GLS_GEOM_VAR Provides Geometric Variation as a weighted sum of the GLS scale-invariant partial derivatives | GLSDer | - | geomVar() |
PROVIDES_ALGEBRAIC_SPHERE | AlgebraicSphere | OrientedSphereFitImpl OrientedSphereDerImpl SphereFitImpl UnorientedSphereFitImpl UnorientedSphereDerImpl | potential() |
PROVIDES_ALGEBRAIC_SPHERE_DERIVATIVE Provides derivatives for algebraic sphere | OrientedSphereDerImpl UnorientedSphereDerImpl | GLSDer MlsSphereFitDer | dPotential() |
PROVIDES_COVARIANCE_PLANE_DERIVATIVE Provides derivatives for hyper-planes | CovariancePlaneDerImpl | - | dPotential() |
PROVIDES_NORMAL_DERIVATIVE Provides the derivatives of the primitive normal | CovariancePlaneDerImpl MlsSphereFitDer OrientedSphereDerImpl UnorientedSphereDerImpl | NormalDerivativesCurvatureEstimator | dNormal() |
PROVIDES_POSITION_COVARIANCE Provides the covariance matrix | CovarianceFitBase | CovarianceFitDer CovarianceLineFitImpl CovariancePlaneFitImpl | solver() |
PROVIDES_POSITION_COVARIANCE_DERIVATIVE | CovarianceFitDer | CovariancePlaneDerImpl | - |
PROVIDES_PLANE | Plane | CovariancePlaneFitImpl CovariancePlaneDerImpl ProjectedNormalCovarianceCurvatureEstimator MeanPlaneFitImpl MongePatch | setPlane() |
PROVIDES_TANGENT_PLANE_BASIS Turns a point in ambient 3D space to the tangent plane. | CovariancePlaneFitImpl | MongePatch | worldToTangentPlane() tangentPlaneToWorld() |
Weighting functions are critical components of the library. They are represented by DistWeightFunc, which is defined from the euclidean distance field centered at the evaluation position (see DistWeightFunc::init()). Given a distance to this evaluation position, the weight is computed (see DistWeightFunc::w()) by applying a 1d weighting function defined as follows:
DistWeightFunc also provides computation of the first and second order derivatives of the weight, both in scale (DistWeightFunc::scaledw(), DistWeightFunc::scaled2w()) and space (DistWeightFunc::spacedw(), DistWeightFunc::spaced2w()), and their cross derivatives (DistWeightFunc::scaleSpaced2w()). Theses methods check if the weight kernels provides the appropriate derivatives