Ponca
aa50bfdf187919869239c5b44b748842569114c1
Point Cloud Analysis library
|
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. | |
using | ScalarArray = typename Base::ScalarArray |
Alias to scalar derivatives array. | |
using | VectorArray = typename Base::VectorArray |
Alias to vector derivatives array. | |
Public Member Functions | |
MeanNormalDer< DataPoint, _WFunctor, DiffType, T > & | meanNormalDer () |
Explicit conversion to MeanNormalDer , to access methods potentially hidden by heritage. | |
const MeanNormalDer< DataPoint, _WFunctor, DiffType, T > & | meanNormalDer () const |
Explicit conversion to MeanNormalDer , to access methods potentially hidden by heritage. | |
void | init (const VectorType &_evalPos) |
Set the evaluation position and reset the internal states. | |
bool | addLocalNeighbor (Scalar w, const VectorType &localQ, const DataPoint &attributes, ScalarArray &dw) |
Add a neighbor to perform the fit. | |
VectorArray | dMeanNormal () const |
Compute the derivative of the mean normal vector of the input points. | |
Protected Types | |
enum | { Check , PROVIDES_MEAN_NORMAL_DERIVATIVE } |
using | Base = T |
Base class of the procedure. | |
Protected Attributes | |
VectorArray | m_dSumN {VectorArray::Zero()} |
Derivatives of the input normals of the input points vectors. | |
|
protected |
using Ponca::MeanNormalDer< DataPoint, _WFunctor, DiffType, T >::Scalar = typename DataPoint::Scalar |
using Ponca::MeanNormalDer< DataPoint, _WFunctor, DiffType, T >::ScalarArray = typename Base::ScalarArray |
using Ponca::MeanNormalDer< DataPoint, _WFunctor, DiffType, T >::VectorArray = typename Base::VectorArray |
using Ponca::MeanNormalDer< DataPoint, _WFunctor, DiffType, T >::VectorType = typename Base::VectorType |
using Ponca::MeanNormalDer< DataPoint, _WFunctor, DiffType, T >::WFunctor = typename Base::WFunctor |
|
protected |
|
inline |
|
inline |
Compute the derivative of the mean normal vector of the input points.
Given the definition of the mean normal \( n(\mathbf{x}) = \frac{\sum_i w_\mathbf{x}(\mathbf{p_i}) \mathbf{n_i}}{\sum_i w_\mathbf{x}(\mathbf{p_i})} \), where \(\left[\mathbf{p_i}, \mathbf{n_i} \in \text{neighborhood}(\mathbf{x})\right]\) are all the point and normal samples in \(\mathbf{x}\)'s neighborhood.
We denote \( t(\mathbf{x}) = \sum_i w_\mathbf{x}(\mathbf{p_i}) \mathbf{n_i} \) and \( s(\mathbf{x}) = \sum_i w_\mathbf{x}(\mathbf{p_i})\), such that \( n(\mathbf{x}) = \frac{t(\mathbf{x})}{s(\mathbf{x})}\).
By definition, \( n'(\mathbf{x}) = \frac{s(\mathbf{x})t'(\mathbf{x}) - t(\mathbf{x})s'(\mathbf{x})}{s(\mathbf{x})^2}\).
Assuming the weight of each normal is dependent on the position, we have \( s'(\mathbf{x}) = \sum_i w'_\mathbf{x}(\mathbf{p_i}) \).
We rewrite \( t(\mathbf{x}) = \sum u(\mathbf{x})v(\mathbf{x}) \), with \( u(\mathbf{x}) = w_\mathbf{x}(\mathbf{p_i}) \) and \( v(\mathbf{x}) = \mathbf{n_i} \).
Assuming the normal vectors themselves do not change with position, \(v(\mathbf{x})\) is constant, its derivative is null, and so \( t'(\mathbf{x}) = \sum_i u'(\mathbf{x}) v(\mathbf{x}) = \sum_i w'_\mathbf{x}(\mathbf{n_i}) \mathbf{n_i} \).
Which leads to \( n'(\mathbf{x}) = \frac{\sum_i w'_\mathbf{x}(\mathbf{p_i}) \mathbf{n_i} - n(\mathbf{x})\sum_i w'_\mathbf{x}(\mathbf{p_i})}{\sum_i w_\mathbf{x}(\mathbf{p_i})} \).
|
inline |
|
inline |
Explicit conversion to MeanNormalDer , to access methods potentially hidden by heritage.
|
inline |
Explicit conversion to MeanNormalDer , to access methods potentially hidden by heritage.
|
protected |