Cost function for the error between a point and a circle.
#include <circle_fit.h>
|
| 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).
|
|
◆ operator()() [1/2]
template<typename T >
bool industrial_calibration::CircleDistCost::operator() |
( |
const T *const |
sample, |
|
|
T * |
residual |
|
) |
| const |
|
inline |
- Parameters
-
sample | A 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_sample | The x-coordinate of the center of the circle. |
y_sample | The y-coordinate of the center of the circle. |
r_sqrt_sample | The square root of the radius of the circle. |