vigra_ext::VigQuotientEstimator Class Reference

This class estimates the parameters of the vignetting curve. More...

#include <VigQuotientEstimator.h>

Inheritance diagram for vigra_ext::VigQuotientEstimator:

Inheritance graph
[legend]
List of all members.

Public Types

typedef std::vector< double > Param

Public Member Functions

 VigQuotientEstimator (double delta)
virtual bool estimate (const std::vector< const PointPair * > &data, Param &p) const
 Compute the vignetting curve defined by 3 points.
bool leastSquaresEstimate (const std::vector< const PointPair * > &data, Param &p) const
 Compute a least squares estimate.
bool agree (Param &p, const PointPair &data) const
 Return true if the distance between the line defined by the parameters and the given point is smaller than 'delta' (see constructor).

Protected Attributes

double m_delta

Detailed Description

This class estimates the parameters of the vignetting curve.

We assume the following function: I1/I2 = (1 + p_1*r_1^2 + p_2*r_1^4 + p_3*r_1^6) / (1 + a*r_2^2 + b*r_2^4 + c*r_2^6)

Author: Pablo d'Angelo

Definition at line 75 of file VigQuotientEstimator.h.


Member Typedef Documentation

typedef std::vector<double> vigra_ext::VigQuotientEstimator::Param

Definition at line 86 of file VigQuotientEstimator.h.


Constructor & Destructor Documentation

vigra_ext::VigQuotientEstimator::VigQuotientEstimator ( double  delta  )  [inline]

Definition at line 90 of file VigQuotientEstimator.h.


Member Function Documentation

bool vigra_ext::VigQuotientEstimator::agree ( Param p,
const PointPair data 
) const [inline]

Return true if the distance between the line defined by the parameters and the given point is smaller than 'delta' (see constructor).

Parameters:
p The line parameters [n_x,n_y,a_x,a_y].
data Check that the distance between this point and the line is smaller than 'delta'.

Definition at line 278 of file VigQuotientEstimator.h.

References vigra_ext::PointPairT< VALUE >::i1, vigra_ext::PointPairT< VALUE >::i2, vigra_ext::PointPairT< VALUE >::r1, and vigra_ext::PointPairT< VALUE >::r2.

virtual bool vigra_ext::VigQuotientEstimator::estimate ( const std::vector< const PointPair * > &  data,
Param p 
) const [inline, virtual]

Compute the vignetting curve defined by 3 points.

This results in the following equations: z = I_1 / I_2

A*p = 1-z; with A = [ r_1^2-r_2^2 r_1^4-r_2^4 r_1^6-r_2^6 ] .. .. ..

Parameters:
data A vector containing three 2D points.
p This vector is filled with the computed parameters, if fitting was succesfull
Returns:
fitting was succesfull

Definition at line 109 of file VigQuotientEstimator.h.

References vigra_ext::A(), and math_lu_solve().

bool vigra_ext::VigQuotientEstimator::leastSquaresEstimate ( const std::vector< const PointPair * > &  data,
Param p 
) const [inline]

Compute a least squares estimate.

Definition at line 179 of file VigQuotientEstimator.h.

References hugin_utils::LMS_Solver::addRow(), and hugin_utils::LMS_Solver::solve().


Member Data Documentation

double vigra_ext::VigQuotientEstimator::m_delta [protected]

Definition at line 79 of file VigQuotientEstimator.h.


The documentation for this class was generated from the following file:
Generated on 23 Nov 2014 for Hugintrunk by  doxygen 1.4.7