STIRA
0.1
|
class to fit a parametric function to a set of data points For the moment, only linear, quadratic, exponential and polynomial fit are available The polynomial fit uses OpenCV's matrix operations More...
#include <FitCurve.h>
Public Member Functions | |
FitCurve (std::vector< Point< int > > inputPoints) | |
constructor More... | |
FitCurve (std::vector< Point< double > > inputPoints) | |
constructor More... | |
void | SetPoints (std::vector< Point< double > > inputPoints) |
sets the input data points (coordinates in double precision float format ) More... | |
void | SetPoints (std::vector< Point< int > > inputPoints) |
sets the input data points (coordinates in integer format ) More... | |
std::vector< double > | FitLinear () |
fits a straight line to a set of 2D points (x, y = a * x + b) Source: http://mathworld.wolfram.com/LeastSquaresFitting.html More... | |
std::vector< double > | FitQuadratic () |
fits a straight line to a set of 2D points (x, y = a * x^2 + b * x + c) Source: http://mathforum.org/library/drmath/view/72047.html More... | |
std::vector< double > | FitExponential () |
fits an exponential to a set of 2D points ( x, y = a * exp( b * x ) ) Source http://mathworld.wolfram.com/LeastSquaresFittingExponential.html More... | |
std::vector< double > | GetAllAbsoluteErrors () |
Gets a vector with all errors (in absolute value between the data points and the modeled points. | |
double | GetMeanAbsoluteError () |
Gets a vector with the average absolute error. | |
std::vector< double > | PolynomialFit (int polynomialDegree) |
Fitting of a general polynomial of a given degree n to a set of 2D points (x, y = a * x^n + b * x^(n-1) + ... ) Math of the least square fitting: http://mathworld.wolfram.com/LeastSquaresFittingPolynomial.html Documentation of the used cv::Mat object: see http://opencv.willowgarage.com/documentation/cpp/basic_structures.html. More... | |
std::vector< double > | GaussianFitLeastSquares () |
Fitting of a guassian profile to a set of 2D points (x, y = G(x) ) Reference: http://terpconnect.umd.edu/~toh/spectrum/CurveFitting.html. More... | |
bool | WriteToDisk (std::string fileName) |
writes source data points and points from the fitted model to disk More... | |
class to fit a parametric function to a set of data points For the moment, only linear, quadratic, exponential and polynomial fit are available The polynomial fit uses OpenCV's matrix operations
stira::common::FitCurve::FitCurve | ( | std::vector< Point< int > > | inputPoints | ) |
constructor
inputPoints | the points to which the data model has to be fitted |
stira::common::FitCurve::FitCurve | ( | std::vector< Point< double > > | inputPoints | ) |
constructor
inputPoints | the points to which the data model has to be fitted |
vector< double > stira::common::FitCurve::FitExponential | ( | ) |
fits an exponential to a set of 2D points ( x, y = a * exp( b * x ) ) Source http://mathworld.wolfram.com/LeastSquaresFittingExponential.html
vector< double > stira::common::FitCurve::FitLinear | ( | ) |
fits a straight line to a set of 2D points (x, y = a * x + b) Source: http://mathworld.wolfram.com/LeastSquaresFitting.html
Referenced by stira::common::QuantileNormalDistribution::AnalyseNormalizedHistogram().
vector< double > stira::common::FitCurve::FitQuadratic | ( | ) |
fits a straight line to a set of 2D points (x, y = a * x^2 + b * x + c) Source: http://mathforum.org/library/drmath/view/72047.html
vector< double > stira::common::FitCurve::GaussianFitLeastSquares | ( | ) |
Fitting of a guassian profile to a set of 2D points (x, y = G(x) ) Reference: http://terpconnect.umd.edu/~toh/spectrum/CurveFitting.html.
vector< double > stira::common::FitCurve::PolynomialFit | ( | int | polynomialDegree | ) |
Fitting of a general polynomial of a given degree n to a set of 2D points (x, y = a * x^n + b * x^(n-1) + ... ) Math of the least square fitting: http://mathworld.wolfram.com/LeastSquaresFittingPolynomial.html Documentation of the used cv::Mat object: see http://opencv.willowgarage.com/documentation/cpp/basic_structures.html.
polynomialDegree | the degree of the polynomial |
void stira::common::FitCurve::SetPoints | ( | std::vector< Point< double > > | inputPoints | ) |
sets the input data points (coordinates in double precision float format )
inputPoints | the input data points |
void stira::common::FitCurve::SetPoints | ( | std::vector< Point< int > > | inputPoints | ) |
sets the input data points (coordinates in integer format )
inputPoints | the input data points |
bool stira::common::FitCurve::WriteToDisk | ( | std::string | fileName | ) |
writes source data points and points from the fitted model to disk
fileName | name of file to write to |