Industrial Calibration  1.0.0
Loading...
Searching...
No Matches
industrial_calibration::CircleDistCost Class Reference

Cost function for the error between a point and a circle.

#include <circle_fit.h>

Public Member Functions

 CircleDistCost (const double &x, const double &y)
 
template<typename T >
bool operator() (const T *const sample, T *residual) const
 One formulation of a residual function for error relative to the center of a circle. Presented to the solver as three size-1 double parameters.
 
template<typename T >
bool operator() (const T *const x_sample, const T *const y_sample, const T *const r_sqrt_sample, T *residual) const
 An alternative formulation of a residual function for error relative to the center of a circle. Here, the inputs (x, y, r_sqrt) are provided as separate parameters. This is mathematically identical to the previous version, but the number and size of the parameters are presented differently to the solver (one size-3 double parameter).
 

Member Function Documentation

◆ operator()() [1/2]

template<typename T >
bool industrial_calibration::CircleDistCost::operator() ( const T *const  sample,
T *  residual 
) const
inline
Parameters
sampleA double pointer which contains {x, y, r_sqrt}.

◆ operator()() [2/2]

template<typename T >
bool industrial_calibration::CircleDistCost::operator() ( const T *const  x_sample,
const T *const  y_sample,
const T *const  r_sqrt_sample,
T *  residual 
) const
inline
Parameters
x_sampleThe x-coordinate of the center of the circle.
y_sampleThe y-coordinate of the center of the circle.
r_sqrt_sampleThe square root of the radius of the circle.