PCL

Twodimensional interpolating/approximating surface spline (thin plate). More...
#include <SurfaceSpline.h>
Classes  
struct  NodeData 
Auxiliary structure for data sanitization. More...  
Public Types  
typedef T  scalar 
typedef GenericVector< scalar >  vector 
typedef float  weight 
Public Member Functions  
SurfaceSpline ()=default  
SurfaceSpline (const SurfaceSpline &)=default  
SurfaceSpline (SurfaceSpline &&)=default  
virtual  ~SurfaceSpline () 
void  Clear () 
void  Initialize (const scalar *x, const scalar *y, const scalar *z, int n, const weight *w=nullptr) 
bool  IsValid () const 
int  Length () const 
scalar  operator() (double x, double y) const 
template<typename Tp >  
scalar  operator() (const GenericPoint< Tp > &p) const 
SurfaceSpline &  operator= (const SurfaceSpline &)=default 
SurfaceSpline &  operator= (SurfaceSpline &&)=default 
int  Order () const 
void  SetOrder (int order) 
void  SetSmoothing (float s) 
float  Smoothing () const 
vector  X () const 
vector  Y () const 
SurfaceSpline implements interpolating or smoothing surface splines, also known as thin plate splines, for arbitrarily distributed input nodes in two dimensions.
A thin plate spline describes the minimalenergy bending of a thin sheet of metal passing through a set of interpolation points in threedimensional space. This physical analogy gives thin plate splines accuracy and adaptability properties that we have been applying successfully to many data modeling tasks, including very especially image registration and astrometric applications.
The most distinctive property of surface splines is their high adaptability to local variations, which makes them ideal to model complex two dimensional functions with high accuracy. An important advantage of our implementation is the possibility to control adaptability with approximating (or smoothing) surface splines, as opposed to interpolating splines, and the possibility to control adaptability both as a global property of the modeling device, or on a pointbypoint basis. The main drawback of surface splines is that they are computationally expensive, especially for large data sets. See the GridInterpolation and PointGridInterpolation classes for highly efficient discretized implementations. See also the RecursivePointSurfaceSpline class for an efficient implementation based on recursive subsplines.
Definition at line 188 of file SurfaceSpline.h.
typedef T pcl::SurfaceSpline< T >::scalar 
The numeric type used to represent coordinates, function values and spline coefficients.
Definition at line 196 of file SurfaceSpline.h.
typedef GenericVector<scalar> pcl::SurfaceSpline< T >::vector 
Represents a vector of coordinates, function values or spline coefficients.
Definition at line 202 of file SurfaceSpline.h.
typedef float pcl::SurfaceSpline< T >::weight 
The numeric type used to represent the interpolation strength of a surface interpolation node.
Definition at line 208 of file SurfaceSpline.h.

default 
Default constructor. Constructs an empty, twodimensional interpolating surface spline of second order.

default 
Copy constructor.

default 
Move constructor.

inlinevirtual 
Virtual destructor.
Definition at line 234 of file SurfaceSpline.h.

inline 
Resets this surface spline interpolation, deallocating all internal working structures.
Definition at line 510 of file SurfaceSpline.h.

inline 
Generation of a twodimensional surface spline (thin plate).
x  X node coordinates. 
y  Y node coordinates. 
z  Node function values. 
n  Number of nodes. Must be ≥ 3 (3 nodes * 2 coordinates = six degrees of freedom). 
w  When the smoothing factor of this spline is > 0, this is a vector of positive weights > 0 corresponding to the specified input nodes. If this parameter is nullptr , unit weights are assumed for all input nodes. When the smoothing factor is zero (interpolating spline), this parameter is ignored. 
The input nodes can be arbitrarily distributed, and they don't need to follow any specific order. However, all nodes should be distinct with respect to the machine epsilon for the floating point type T.
This initialization function includes a sanitization routine. If there are duplicate points in the specified set of input nodes, only the first occurrence of each duplicate will be kept to build the surface spline, and the rest of duplicate points will be ignored. Two points are considered equal if their coordinates don't differ more than the machine epsilon for the floating point type T.
For an interpolating surface spline (smoothness = 0), all node values will be reproduced exactly at their respective coordinates. In this case the vector w of node weights will be ignored.
For an approximating surface spline (smoothness > 0), if a vector w of node weights is specified, it will be used to assign a different interpolation strength to each interpolation node. In this case the vector w must have at least n values greater than zero. A node weight larger than one will reduce the smoothness of the interpolating surface at the corresponding node coordinates, or in other words, it will give more prominence to the corresponding data point. A node weight of one will apply the current surface smoothness at its node position. A node weight smaller than one will increase the interpolation smoothness.
Definition at line 394 of file SurfaceSpline.h.

inline 
Returns true iff this surface spline is valid. A valid surface spline has been initialized with three or more nodes.
Definition at line 252 of file SurfaceSpline.h.

inline 
Returns the number of nodes used by this surface spline interpolation.
Definition at line 260 of file SurfaceSpline.h.

inline 
Twodimensional surface spline interpolation/approximation. Returns an approximated or interpolated function value at the specified x and y coordinates.
Before calling this function, a valid surface spline must be generated by calling Initialize(). If called fon an uninitialized object, this member function invokes undefined behavior.
Definition at line 527 of file SurfaceSpline.h.

inline 
Returns an interpolated/approximated function value at the specified p.x and p.y point coordinates. See operator()( double, double ) for more information.
Definition at line 586 of file SurfaceSpline.h.

default 
Copy assignment operator. Returns a reference to this object.

default 
Move assignment operator. Returns a reference to this object.

inline 
Returns the derivability order of this surface spline.
Definition at line 296 of file SurfaceSpline.h.

inline 
Sets the derivability order of this surface spline.
order  Derivability order. Must be >= 2. 
Calling this member function implicitly resets this SurfaceSpline object and destroys all internal working structures.
The surface spline will be continuously differentiable up to the specified order m. If this order is too high, an illconditioned linear system may result.
The default order is 2. Recommended values are 2 and 3.
Definition at line 315 of file SurfaceSpline.h.

inline 
Sets the smoothing factor of this surface spline.
s  Smoothing factor. Must be >= 0. 
For s = 0, an interpolating spline will be generated: all node values will be reproduced exactly at their respective coordinates.
For s > 0, a smoothing (or approximating) spline will be generated: increasing s values will generate splines closer to the reference plane of the input node set.
Definition at line 343 of file SurfaceSpline.h.

inline 
Returns the smoothing factor of this surface spline. See SetSmoothing() for more information.
Definition at line 326 of file SurfaceSpline.h.

inline 
Returns a vector with the X node coordinates used to initialize this surface spline. If this object has not been initialized, this function returns an empty vector.
Definition at line 270 of file SurfaceSpline.h.

inline 
Returns a vector with the Y node coordinates used to initialize this surface spline. If this object has not been initialized, this function returns an empty vector.
Definition at line 284 of file SurfaceSpline.h.