PCL
pcl::SurfacePolynomial< T > Class Template Reference

Two-dimensional interpolating/approximating surface polynomial. More...

#include <SurfacePolynomial.h>

+ Inheritance diagram for pcl::SurfacePolynomial< T >:

Public Types

using scalar = typename vector_type::scalar
 
using vector_type = GenericVector< T >
 

Public Member Functions

 SurfacePolynomial ()=default
 
 SurfacePolynomial (const SurfacePolynomial &)=default
 
 SurfacePolynomial (SurfacePolynomial &&)=default
 
virtual ~SurfacePolynomial ()
 
void Clear ()
 
int Degree () const
 
void Initialize (const T *x, const T *y, const T *z, int n)
 
bool IsValid () const
 
operator() (double x, double y) const
 
SurfacePolynomialoperator= (const SurfacePolynomial &)=default
 
SurfacePolynomialoperator= (SurfacePolynomial &&)=default
 
void SetDegree (int degree)
 

Detailed Description

template<typename T>
class pcl::SurfacePolynomial< T >

SurfacePolynomial implements interpolating surface polynomials for arbitrarily distributed input nodes in two dimensions.

Compared to surface splines (also known as thin plates), surface polynomials are much more rigid, that is, much less adaptable to local function variations. This can be a desirable property in some scenarios. An important drawback of polynomials is that they are prone to oscillations, especially for relatively high interpolation orders greater than three. An important advantage is that they are fast even for very large data sets.

See also
SurfaceSpline

Definition at line 86 of file SurfacePolynomial.h.

Member Typedef Documentation

◆ scalar

template<typename T >
using pcl::SurfacePolynomial< T >::scalar = typename vector_type::scalar

The numeric type used to represent coordinates, function values and polynomial coefficients.

Definition at line 100 of file SurfacePolynomial.h.

◆ vector_type

template<typename T >
using pcl::SurfacePolynomial< T >::vector_type = GenericVector<T>

Represents a vector of coordinates, function values or polynomial coefficients.

Definition at line 94 of file SurfacePolynomial.h.

Constructor & Destructor Documentation

◆ SurfacePolynomial() [1/3]

template<typename T >
pcl::SurfacePolynomial< T >::SurfacePolynomial ( )
default

Default constructor. Constructs an empty, two-dimensional interpolating surface polynomial of third degree.

◆ SurfacePolynomial() [2/3]

template<typename T >
pcl::SurfacePolynomial< T >::SurfacePolynomial ( const SurfacePolynomial< T > &  )
default

Copy constructor.

◆ SurfacePolynomial() [3/3]

template<typename T >
pcl::SurfacePolynomial< T >::SurfacePolynomial ( SurfacePolynomial< T > &&  )
default

Move constructor.

◆ ~SurfacePolynomial()

template<typename T >
virtual pcl::SurfacePolynomial< T >::~SurfacePolynomial ( )
inlinevirtual

Virtual destructor.

Definition at line 121 of file SurfacePolynomial.h.

Member Function Documentation

◆ Clear()

template<typename T >
void pcl::SurfacePolynomial< T >::Clear ( )
inline

Resets this surface polynomial interpolation, deallocating all internal working structures.

Definition at line 323 of file SurfacePolynomial.h.

◆ Degree()

template<typename T >
int pcl::SurfacePolynomial< T >::Degree ( ) const
inline

Returns the degree of this surface polynomial.

Definition at line 147 of file SurfacePolynomial.h.

◆ Initialize()

template<typename T >
void pcl::SurfacePolynomial< T >::Initialize ( const T *  x,
const T *  y,
const T *  z,
int  n 
)
inline

Generation of a two-dimensional surface polynomial.

Parameters
xX node coordinates.
yY node coordinates.
zNode values.
nNumber of nodes. Must be ≥ 3 (3 nodes * 2 coordinates = six degrees of freedom).

The input nodes can be arbitrarily distributed, and they don't need to follow any specific order. However, all nodes must be distinct with respect to the machine epsilon for the floating point type T.

Definition at line 188 of file SurfacePolynomial.h.

◆ IsValid()

template<typename T >
bool pcl::SurfacePolynomial< T >::IsValid ( ) const
inline

Returns true iff this surface polynomial is valid. A valid surface polynomial has been initialized with a sufficient number of nodes.

Definition at line 139 of file SurfacePolynomial.h.

◆ operator()()

template<typename T >
T pcl::SurfacePolynomial< T >::operator() ( double  x,
double  y 
) const
inline

Two-dimensional surface polynomial interpolation. Returns an interpolated value at the specified x and y coordinates.

Definition at line 300 of file SurfacePolynomial.h.

◆ operator=() [1/2]

template<typename T >
SurfacePolynomial& pcl::SurfacePolynomial< T >::operator= ( const SurfacePolynomial< T > &  )
default

Copy assignment operator. Returns a reference to this object.

◆ operator=() [2/2]

template<typename T >
SurfacePolynomial& pcl::SurfacePolynomial< T >::operator= ( SurfacePolynomial< T > &&  )
default

Move assignment operator. Returns a reference to this object.

◆ SetDegree()

template<typename T >
void pcl::SurfacePolynomial< T >::SetDegree ( int  degree)
inline

Sets the degree of this surface polynomial.

Parameters
degreePolynomial degree. Must be ≥ 1.

Calling this member function implicitly resets this SurfacePolynomial object and destroys all internal working structures.

High-degree polynomials, especially for degrees higher than three, tend to oscillate and may generate artifacts in the interpolated surface.

The default degree is 3. Recommended values are 2, 3 and 4.

Definition at line 165 of file SurfacePolynomial.h.


The documentation for this class was generated from the following file: