|
Ponca
8e4373a7fc557bbfb1afb9210d70f03872388d04
Point Cloud Analysis library
|
Algebraic Sphere fitting procedure on point set without normals. More...
#include <sphereFit.h>
Inheritance diagram for Ponca::SphereFitImpl< DataPoint, _NFilter, T >:
Collaboration diagram for Ponca::SphereFitImpl< DataPoint, _NFilter, T >:Public Types | |
| using | Scalar = typename DataPoint::Scalar |
| Alias to scalar type. | |
| using | VectorType = typename Base::VectorType |
| Alias to vector type. | |
| using | NeighborFilter = typename Base::NeighborFilter |
| Alias to the filter applied on the neighbors. | |
| using | Solver = Eigen::EigenSolver< MatrixA > |
Public Member Functions | |
| SphereFitImpl< DataPoint, _NFilter, T > & | sphereFit () |
| Explicit conversion to SphereFitImpl , to access methods potentially hidden by heritage. | |
| const SphereFitImpl< DataPoint, _NFilter, T > & | sphereFit () const |
| Explicit conversion to SphereFitImpl , to access methods potentially hidden by heritage. | |
| void | init () |
| Set the evaluation position and reset the internal states. | |
| bool | addLocalNeighbor (Scalar w, const VectorType &localQ, const DataPoint &attributes) |
| Add a neighbor to perform the fit. | |
| FIT_RESULT | finalize () |
| Finalize the procedure. | |
| constexpr bool | isSigned () |
| Is scalar field signed. | |
| const Solver & | solver () const |
Protected Types | |
| enum | { Check = Base::PROVIDES_ALGEBRAIC_SPHERE } |
| using | Base = T |
| Base class of the procedure. | |
| typedef Eigen::Matrix< Scalar, DataPoint::Dim+2, 1 > | VectorA |
| typedef Eigen::Matrix< Scalar, DataPoint::Dim+2, DataPoint::Dim+2 > | MatrixA |
Protected Attributes | |
| MatrixA | m_matA {MatrixA::Zero()} |
| Covariance matrix of [1, p, p^2]. | |
| Solver | m_solver |
Algebraic Sphere fitting procedure on point set without normals.
This method published in [6] minimizes
\[ \mathcal{L}(\mathbf{u}) = \frac{1}{2} \sum_i w_i f_{\mathbf{u}}(\mathbf{x}_i)^2 = \frac{1}{2} \mathbf{u}^T A \mathbf{u} \]
with \( A = \sum_i w_i \tilde{\mathbf{x}_i} \tilde{\mathbf{x}_i}^T\) and \( f_{\mathbf{u}} \) the algebraic sphere defined by
\[ f_{\mathbf{u}}(\mathbf{x}) = u_c + \mathbf{u}_l.\mathbf{x} + u_q \mathbf{x}.\mathbf{x} = \begin{bmatrix} 1 & \mathbf{x}^T & \mathbf{x}.\mathbf{x} \end{bmatrix} \begin{bmatrix} u_c \\ u_l \\ u_q \end{bmatrix} = \tilde{\mathbf{x}}^T \mathbf{u}, \]
under the constraint (unitary gradient onto the surface)
\[ \|\mathbf{u}_l\|^2 - 4 u_c u_q = \mathbf{u}^T C \mathbf{u} = 1 \]
where
\[ C = \begin{bmatrix} 0 & & & & -2 \\ & 1 & & & \\ & & \ddots & & \\ & & & 1 & \\ -2 & & & & 0 \end{bmatrix} \]
which amounts to solve the generalized eigenvalue problem \( A\mathbf{u} = \lambda C \mathbf{u} \).
Definition at line 56 of file sphereFit.h.
|
protected |
Base class of the procedure.
Definition at line 58 of file sphereFit.h.
|
protected |
Definition at line 67 of file sphereFit.h.
| using Ponca::SphereFitImpl< DataPoint, _NFilter, T >::NeighborFilter = typename Base::NeighborFilter |
Alias to the filter applied on the neighbors.
Definition at line 58 of file sphereFit.h.
| using Ponca::SphereFitImpl< DataPoint, _NFilter, T >::Scalar = typename DataPoint::Scalar |
Alias to scalar type.
Definition at line 58 of file sphereFit.h.
| using Ponca::SphereFitImpl< DataPoint, _NFilter, T >::Solver = Eigen::EigenSolver<MatrixA> |
Definition at line 70 of file sphereFit.h.
|
protected |
Definition at line 66 of file sphereFit.h.
| using Ponca::SphereFitImpl< DataPoint, _NFilter, T >::VectorType = typename Base::VectorType |
Alias to vector type.
Definition at line 58 of file sphereFit.h.
|
protected |
Definition at line 61 of file sphereFit.h.
|
inline |
Add a neighbor to perform the fit.
Definition at line 18 of file sphereFit.hpp.
|
inline |
Finalize the procedure.
Definition at line 41 of file sphereFit.hpp.
|
inline |
Set the evaluation position and reset the internal states.
Definition at line 10 of file sphereFit.hpp.
|
inlineconstexpr |
Is scalar field signed.
If not, the method the sign of potential() must be ignored
Definition at line 81 of file sphereFit.h.
|
inline |
Definition at line 83 of file sphereFit.h.
|
inline |
Explicit conversion to SphereFitImpl , to access methods potentially hidden by heritage.
Definition at line 79 of file sphereFit.h.
|
inline |
Explicit conversion to SphereFitImpl , to access methods potentially hidden by heritage.
Definition at line 79 of file sphereFit.h.
|
protected |
Covariance matrix of [1, p, p^2].
Definition at line 74 of file sphereFit.h.
|
protected |
Definition at line 76 of file sphereFit.h.