Ponca
aa50bfdf187919869239c5b44b748842569114c1
Point Cloud Analysis library
|
Algebraic Sphere primitive. More...
#include <algebraicSphere.h>
Public Types | |
using | Scalar = typename DataPoint::Scalar |
Alias to scalar type. | |
using | VectorType = typename Base::VectorType |
Alias to vector type. | |
using | WFunctor = typename Base::WFunctor |
Alias to weight function. | |
Public Member Functions | |
AlgebraicSphere< DataPoint, _WFunctor, T > & | algebraicSphere () |
Explicit conversion to AlgebraicSphere , to access methods potentially hidden by heritage. | |
const AlgebraicSphere< DataPoint, _WFunctor, T > & | algebraicSphere () const |
Explicit conversion to AlgebraicSphere , to access methods potentially hidden by heritage. | |
void | init (const VectorType &_basisCenter=VectorType::Zero()) |
Set the scalar field values to 0 and reset the isNormalized() status. | |
bool | isValid () const |
Tell if the sphere as been correctly set. Used to set CONFLICT_ERROR_FOUND during fitting. | |
bool | operator== (const AlgebraicSphere< DataPoint, WFunctor, T > &other) const |
Comparison operator. | |
bool | operator!= (const AlgebraicSphere< DataPoint, WFunctor, T > &other) const |
Comparison operator, convenience function. | |
void | changeBasis (const VectorType &newbasis) |
Express the scalar field relatively to a new basis. | |
Scalar | prattNorm () const |
compute the Pratt norm of the implicit scalar field. | |
Scalar | prattNorm2 () const |
compute the squared Pratt norm of the implicit scalar field. | |
bool | applyPrattNorm () |
Normalize the scalar field by the Pratt norm. | |
Scalar | radius () const |
return the estimated radius of the sphere | |
VectorType | center () const |
return the estimated center of the sphere | |
bool | isNormalized () const |
State indicating when the sphere has been normalized. | |
Scalar | potential (const VectorType &_q) const |
Value of the scalar field at the location \( \mathbf{q}\). | |
Scalar | potential () const |
Value of the scalar field at the evaluation point. | |
VectorType | project (const VectorType &_q) const |
Project a point on the algebraic hypersphere. | |
VectorType | projectDescent (const VectorType &_q, int nbIter=16) const |
Project a point on the algebraic hypersphere using Gradient Descent This projection is realized by following the gradient of the hypersphere scalar field. | |
VectorType | primitiveGradient (const VectorType &_q) const |
Approximation of the scalar field gradient at \( \mathbf{q}\). | |
const VectorType & | primitiveGradient () const |
Approximation of the scalar field gradient at the evaluation point. | |
bool | isPlane () const |
Used to know if the fitting result to a plane. | |
Public Attributes | |
Scalar | m_uc {0} |
Constant parameter of the Algebraic hyper-sphere. | |
Scalar | m_uq {0} |
Quadratic parameter of the Algebraic hyper-sphere. | |
VectorType | m_ul {VectorType::Zero()} |
Linear parameter of the Algebraic hyper-sphere. | |
Protected Types | |
enum | { check = Base::PROVIDES_PRIMITIVE_BASE , PROVIDES_ALGEBRAIC_SPHERE } |
using | Base = T |
Base class of the procedure. | |
Protected Attributes | |
bool | m_isNormalized |
Is the implicit scalar field normalized using Pratt. | |
Algebraic Sphere primitive.
Method published in [6]
An algebraic hyper-sphere is defined as the \(0\)-isosurface of the scalar field
\( s_\mathbf{u}(\mathbf{x}) = \left[ 1 \; \mathbf{x}^T \; \mathbf{x}^T\mathbf{x}\right]^T \cdot \mathbf{u} \)
with \( \mathbf{u} \left[ u_c \; \mathbf{u_l} \; u_q\right]^T \) is the vector of the constant, linear and quadratic parameters.
This primitive provides:
PROVIDES_ALGEBRAIC_SPHERE
Definition at line 46 of file algebraicSphere.h.
|
protected |
Base class of the procedure.
Definition at line 48 of file algebraicSphere.h.
using Ponca::AlgebraicSphere< DataPoint, _WFunctor, T >::Scalar = typename DataPoint::Scalar |
Alias to scalar type.
Definition at line 48 of file algebraicSphere.h.
using Ponca::AlgebraicSphere< DataPoint, _WFunctor, T >::VectorType = typename Base::VectorType |
Alias to vector type.
Definition at line 48 of file algebraicSphere.h.
using Ponca::AlgebraicSphere< DataPoint, _WFunctor, T >::WFunctor = typename Base::WFunctor |
Alias to weight function.
Definition at line 48 of file algebraicSphere.h.
|
protected |
Enumerator | |
---|---|
check | Requires PrimitiveBase. |
PROVIDES_ALGEBRAIC_SPHERE | Provides Algebraic Sphere. |
Definition at line 51 of file algebraicSphere.h.
|
inline |
Explicit conversion to AlgebraicSphere , to access methods potentially hidden by heritage.
Definition at line 68 of file algebraicSphere.h.
|
inline |
Explicit conversion to AlgebraicSphere , to access methods potentially hidden by heritage.
Definition at line 68 of file algebraicSphere.h.
|
inline |
Normalize the scalar field by the Pratt norm.
Definition at line 164 of file algebraicSphere.h.
|
inline |
return the estimated center of the sphere
Definition at line 204 of file algebraicSphere.h.
|
inline |
Express the scalar field relatively to a new basis.
The sphere in dimension \(d\) is parametrized in the original basis by \(\mathbf{u} = \left[u_c, \mathbf{u}_l^T, u_q\right]^T \in \mathbb{R}^{d+2}\). The sphere equation is given in this basis by:
\begin{equation} u_c + \mathbf{u}_l^T.\mathbf{x} + u_q \mathbf{x}^T.\mathbf{x}= 0 \end{equation}
The same equation written in a different basis is: \begin{equation} u_c + \mathbf{u}_l^T.(\mathbf{x}-\mathbf{\Delta}) + u_q (\mathbf{x}-\mathbf{\Delta})^T.(\mathbf{x}-\mathbf{\Delta})= 0 \end{equation} where \(\mathbf{\Delta}\) is the difference vector between the two basis: \(\mathbf{\Delta} = \mathbf{b}_\mathrm{original}-\mathbf{b}_\mathrm{new}\). It corresponds to a translation of \(\Delta\) of the sphere. This develops in: \begin{equation} \left[u_c - \mathbf{u}_l^T.\mathbf{\Delta} + u_q \mathbf{\Delta}^T.\mathbf{\Delta}\right] + \left[\mathbf{u}_l - 2 u_q \mathbf{\Delta}\right]^T.\mathbf{x} + u_q \mathbf{x}^T.\mathbf{x} = 0 \end{equation}
By identification, the parametrization \(\left[u_c', \mathbf{u}_l'^T, u_q'\right]^T\) of the sphere in the new basis is given by
\(u_c' = u_c - \mathbf{u}_l^T.\mathbf{\Delta} + u_q \mathbf{\Delta}^T.\mathbf{\Delta}\)
\(\mathbf{u}_l' = \mathbf{u}_l - 2 u_q \mathbf{\Delta}\)
\(u_q'=u_q\)
Definition at line 136 of file algebraicSphere.h.
|
inline |
Set the scalar field values to 0 and reset the isNormalized() status.
Definition at line 74 of file algebraicSphere.h.
|
inline |
State indicating when the sphere has been normalized.
Definition at line 221 of file algebraicSphere.h.
|
inline |
Used to know if the fitting result to a plane.
Definition at line 262 of file algebraicSphere.h.
|
inline |
Tell if the sphere as been correctly set. Used to set CONFLICT_ERROR_FOUND during fitting.
Definition at line 88 of file algebraicSphere.h.
|
inline |
Comparison operator, convenience function.
Definition at line 103 of file algebraicSphere.h.
|
inline |
Comparison operator.
Definition at line 93 of file algebraicSphere.h.
|
inline |
Value of the scalar field at the evaluation point.
#isSigned
of the fit to check if the sign is reliable Definition at line 229 of file algebraicSphere.h.
|
inline |
Value of the scalar field at the location \( \mathbf{q}\).
#isSigned
of the fit to check if the sign is reliable Definition at line 61 of file algebraicSphere.hpp.
|
inline |
compute the Pratt norm of the implicit scalar field.
Definition at line 148 of file algebraicSphere.h.
|
inline |
compute the squared Pratt norm of the implicit scalar field.
Definition at line 155 of file algebraicSphere.h.
|
inline |
Approximation of the scalar field gradient at the evaluation point.
Definition at line 256 of file algebraicSphere.h.
|
inline |
Approximation of the scalar field gradient at \( \mathbf{q}\).
Definition at line 72 of file algebraicSphere.hpp.
|
inline |
Project a point on the algebraic hypersphere.
This projection is realized in closed-form: the algebraic hypersphere is converted to a geometrical representation (hyperplane or hypersphere), and _q is orthogonally projected on the primtive.
Definition at line 9 of file algebraicSphere.hpp.
|
inline |
Project a point on the algebraic hypersphere using Gradient Descent This projection is realized by following the gradient of the hypersphere scalar field.
_q | Starting point |
nbIter | Number of iterations (default = 16) |
Definition at line 34 of file algebraicSphere.hpp.
|
inline |
return the estimated radius of the sphere
Definition at line 182 of file algebraicSphere.h.
|
protected |
Is the implicit scalar field normalized using Pratt.
Definition at line 59 of file algebraicSphere.h.
Scalar Ponca::AlgebraicSphere< DataPoint, _WFunctor, T >::m_uc {0} |
Constant parameter of the Algebraic hyper-sphere.
Definition at line 63 of file algebraicSphere.h.
VectorType Ponca::AlgebraicSphere< DataPoint, _WFunctor, T >::m_ul {VectorType::Zero()} |
Linear parameter of the Algebraic hyper-sphere.
Definition at line 65 of file algebraicSphere.h.
Scalar Ponca::AlgebraicSphere< DataPoint, _WFunctor, T >::m_uq {0} |
Quadratic parameter of the Algebraic hyper-sphere.
Definition at line 64 of file algebraicSphere.h.