|
Ponca
fd5150bf9079aabdb82a6f05e419b76111c1f788
Point Cloud Analysis library
|
Algebraic Sphere fitting procedure on point sets with non-oriented normals. More...
#include <unorientedSphereFit.h>
Inheritance diagram for Ponca::UnorientedSphereFitImpl< DataPoint, _NFilter, T >:
Collaboration diagram for Ponca::UnorientedSphereFitImpl< 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< MatrixBB > |
Public Member Functions | |
| UnorientedSphereFitImpl< DataPoint, _NFilter, T > & | unorientedSphereFit () |
| Explicit conversion to CLASSNAME, to access methods potentially hidden by heritage. | |
| const UnorientedSphereFitImpl< DataPoint, _NFilter, T > & | unorientedSphereFit () const |
| Explicit conversion to CLASSNAME, to access methods potentially hidden by heritage. | |
| void | init () |
| void | addLocalNeighbor (Scalar w, const VectorType &localQ, const DataPoint &attributes) |
| Add a neighbor to perform the fit. | |
| FIT_RESULT | finalize () |
| constexpr bool | isSigned () |
| Is scalar field signed. | |
Public Attributes | |
| MatrixBB | m_matA {MatrixBB::Zero()} |
| The accumulated covariance matrix. | |
| MatrixBB | m_matQ {MatrixBB::Zero()} |
| The constraint matrix. | |
| Scalar | m_sumDotPP {0} |
| Sum of the squared relative positions. | |
| Solver | m_solver |
Protected Types | |
| using | Base = T |
| Base class of the procedure. | |
| using | VectorB = Eigen::Matrix< Scalar, DataPoint::Dim+1, 1 > |
| using | MatrixBB = Eigen::Matrix< Scalar, DataPoint::Dim+1, DataPoint::Dim+1 > |
Algebraic Sphere fitting procedure on point sets with non-oriented normals.
This method published in [6] maximizes the sum of squared dot product between the input normal vectors and the gradient of the algebraic sphere. The maximization is done under the constraint that the norm of the gradient is unitary on average. In practice, it amounts to solve the generalized eigenvalue problem
\[ A \mathbf{u} = \lambda Q \mathbf{u} \]
where
\[ \mathbf{u} = \begin{bmatrix} u_l \\ u_q \end{bmatrix} \]
\[ A = \sum_i w_i \begin{bmatrix} \mathbf{n}_i \\ \mathbf{n}_i^T\mathbf{p}_i \end{bmatrix}\begin{bmatrix} \mathbf{n}_i^T & \mathbf{n}_i^T\mathbf{p}_i \end{bmatrix} \]
\[ Q = \frac{1}{\sum_i w_i} \begin{bmatrix} I & \sum_i w_i \mathbf{p}_i \\ \sum_i w_i \mathbf{p}_i^T & \sum_i w_i \mathbf{p}_i^T\mathbf{p}_i \end{bmatrix} \]
The constant coefficient \(u_c\) is computed as in OrientedSphereFitImpl by minimizing the sum of squared potential evaluated at the points \(\mathbf{p}_i\). This fitting method corresponds to the case where the scalar field is \( f^* \) in the Section 3.3 of [6].
Definition at line 56 of file unorientedSphereFit.h.
|
protected |
Base class of the procedure.
Definition at line 58 of file unorientedSphereFit.h.
|
protected |
Definition at line 62 of file unorientedSphereFit.h.
| using Ponca::UnorientedSphereFitImpl< DataPoint, _NFilter, T >::NeighborFilter = typename Base::NeighborFilter |
Alias to the filter applied on the neighbors.
Definition at line 58 of file unorientedSphereFit.h.
| using Ponca::UnorientedSphereFitImpl< DataPoint, _NFilter, T >::Scalar = typename DataPoint::Scalar |
Alias to scalar type.
Definition at line 58 of file unorientedSphereFit.h.
| using Ponca::UnorientedSphereFitImpl< DataPoint, _NFilter, T >::Solver = Eigen::EigenSolver<MatrixBB> |
Definition at line 65 of file unorientedSphereFit.h.
|
protected |
Definition at line 61 of file unorientedSphereFit.h.
| using Ponca::UnorientedSphereFitImpl< DataPoint, _NFilter, T >::VectorType = typename Base::VectorType |
Alias to vector type.
Definition at line 58 of file unorientedSphereFit.h.
|
inline |
Add a neighbor to perform the fit.
Definition at line 22 of file unorientedSphereFit.hpp.
|
inline |
Definition at line 35 of file unorientedSphereFit.hpp.
|
inline |
Definition at line 12 of file unorientedSphereFit.hpp.
|
inlineconstexpr |
Is scalar field signed.
If not, the method the sign of potential() must be ignored
Definition at line 76 of file unorientedSphereFit.h.
|
inline |
Explicit conversion to CLASSNAME, to access methods potentially hidden by heritage.
Definition at line 74 of file unorientedSphereFit.h.
|
inline |
Explicit conversion to CLASSNAME, to access methods potentially hidden by heritage.
Definition at line 74 of file unorientedSphereFit.h.
| MatrixBB Ponca::UnorientedSphereFitImpl< DataPoint, _NFilter, T >::m_matA {MatrixBB::Zero()} |
The accumulated covariance matrix.
Definition at line 67 of file unorientedSphereFit.h.
| MatrixBB Ponca::UnorientedSphereFitImpl< DataPoint, _NFilter, T >::m_matQ {MatrixBB::Zero()} |
The constraint matrix.
Definition at line 68 of file unorientedSphereFit.h.
| Solver Ponca::UnorientedSphereFitImpl< DataPoint, _NFilter, T >::m_solver |
Definition at line 71 of file unorientedSphereFit.h.
| Scalar Ponca::UnorientedSphereFitImpl< DataPoint, _NFilter, T >::m_sumDotPP {0} |
Sum of the squared relative positions.
Definition at line 69 of file unorientedSphereFit.h.