This class holds methods for creating distance-based weight matrices and for interpolating signals.
More...
#include <interpolation.h>
|
| static QSharedPointer< Eigen::SparseMatrix< float > > | createInterpolationMat (const Eigen::VectorXi &vecProjectedSensors, const QSharedPointer< Eigen::MatrixXd > matDistanceTable, double(*interpolationFunction)(double), const double dCancelDist=FLOAT_INFINITY, const Eigen::VectorXi &vecExcludeIndex=Eigen::VectorXi()) |
| | createInterpolationMat Calculates the weight matrix for interpolation.
|
| static Eigen::VectorXf | interpolateSignal (const QSharedPointer< Eigen::SparseMatrix< float > > matInterpolationMatrix, const QSharedPointer< Eigen::VectorXf > &vecMeasurementData) |
| | interpolateSignal Interpolates sensor data using the weight matrix (shared pointer version).
|
| static Eigen::VectorXf | interpolateSignal (const Eigen::SparseMatrix< float > &matInterpolationMatrix, const Eigen::VectorXf &vecMeasurementData) |
| | interpolateSignal Interpolates sensor data using the weight matrix (reference version).
|
| static double | linear (const double dIn) |
| | linear Identity interpolation function.
|
| static double | gaussian (const double dIn) |
| | gaussian Gaussian interpolation function (sigma=1).
|
| static double | square (const double dIn) |
| | square Negative parabola interpolation function with y-offset of 1.
|
| static double | cubic (const double dIn) |
| | cubic Cubic hyperbola interpolation function.
|
This class holds methods for creating distance-based weight matrices and for interpolating signals.
This class holds methods for creating distance-based weight matrices and for interpolating signals.
Definition at line 72 of file interpolation.h.
◆ ConstSPtr
◆ SPtr
◆ Interpolation()
| DISP3DLIB::Interpolation::Interpolation |
( |
| ) |
|
|
delete |
◆ createInterpolationMat()
| QSharedPointer< SparseMatrix< float > > Interpolation::createInterpolationMat |
( |
const Eigen::VectorXi & | vecProjectedSensors, |
|
|
const QSharedPointer< Eigen::MatrixXd > | matDistanceTable, |
|
|
double(* | interpolationFunction )(double), |
|
|
const double | dCancelDist = FLOAT_INFINITY, |
|
|
const Eigen::VectorXi & | vecExcludeIndex = Eigen::VectorXi() ) |
|
static |
createInterpolationMat Calculates the weight matrix for interpolation.
- Parameters
-
| [in] | vecProjectedSensors | Mesh vertex index of each sensor (one column per sensor). |
| [in] | matDistanceTable | Distance table (nVertices x nSensors), e.g. from GeometryInfo::scdc. |
| [in] | interpolationFunction | Distance function whose inverse magnitude gives the weight. |
| [in] | dCancelDist | Distances at or above this value get zero weight. |
| [in] | vecExcludeIndex | Sensor column indices that are not pinned to their own vertex. |
- Returns
- Row-normalised sparse weight matrix (nVertices x nSensors), or an empty matrix if the table is empty.
Definition at line 43 of file interpolation.cpp.
◆ cubic()
| double Interpolation::cubic |
( |
const double | dIn | ) |
|
|
static |
cubic Cubic hyperbola interpolation function.
- Parameters
-
- Returns
- dIn^3.
Definition at line 161 of file interpolation.cpp.
◆ gaussian()
| double Interpolation::gaussian |
( |
const double | dIn | ) |
|
|
static |
gaussian Gaussian interpolation function (sigma=1).
- Parameters
-
- Returns
- exp(-dIn^2 / 2).
Definition at line 147 of file interpolation.cpp.
◆ interpolateSignal() [1/2]
| Eigen::VectorXf DISP3DLIB::Interpolation::interpolateSignal |
( |
const Eigen::SparseMatrix< float > & | matInterpolationMatrix, |
|
|
const Eigen::VectorXf & | vecMeasurementData ) |
|
static |
interpolateSignal Interpolates sensor data using the weight matrix (reference version).
- Parameters
-
| [in] | matInterpolationMatrix | Weight matrix (nVertices x nSensors). |
| [in] | vecMeasurementData | Sensor values (nSensors). |
- Returns
- Interpolated vertex values, or an empty vector on dimension mismatch.
◆ interpolateSignal() [2/2]
| Eigen::VectorXf DISP3DLIB::Interpolation::interpolateSignal |
( |
const QSharedPointer< Eigen::SparseMatrix< float > > | matInterpolationMatrix, |
|
|
const QSharedPointer< Eigen::VectorXf > & | vecMeasurementData ) |
|
static |
interpolateSignal Interpolates sensor data using the weight matrix (shared pointer version).
- Parameters
-
| [in] | matInterpolationMatrix | Weight matrix (nVertices x nSensors). |
| [in] | vecMeasurementData | Sensor values (nSensors). |
- Returns
- Interpolated vertex values, or an empty vector on dimension mismatch.
◆ linear()
| double Interpolation::linear |
( |
const double | dIn | ) |
|
|
static |
linear Identity interpolation function.
- Parameters
-
- Returns
- dIn unchanged.
Definition at line 140 of file interpolation.cpp.
◆ square()
| double Interpolation::square |
( |
const double | dIn | ) |
|
|
static |
square Negative parabola interpolation function with y-offset of 1.
- Parameters
-
- Returns
- max(1 - dIn^2 / 9, 0).
Definition at line 154 of file interpolation.cpp.
The documentation for this class was generated from the following files: