Go to the source code of this file.
Defines | |
#define | TYPE_ADD(a) CONCAT2X(a, CPL_TYPE) |
#define | TYPE_ADD_CONST(a) CONCAT2X(TYPE_ADD(a),const) |
#define | IMAGE_GET_DATA TYPE_ADD(cpl_image_get_data) |
Functions | |
static void TYPE_ADD() | irplib_fit_imagelist_polynomial (cpl_imagelist *self, const cpl_matrix *mh, const cpl_matrix *mv, const cpl_vector *x_pos, const cpl_imagelist *values, const cpl_vector *xpow, double xnmean, int np, int nc, cpl_image *fiterror) |
Fit a polynomial to each pixel in a list of images. | |
static void TYPE_ADD() | irplib_fit_imagelist_residual (cpl_image *self, int jj, const cpl_vector *x_pos, const cpl_vector *xpow, const cpl_matrix *mx, const cpl_matrix *mb) |
Compute the residual of a polynomial fit to an imagelist. |
#define IMAGE_GET_DATA TYPE_ADD(cpl_image_get_data) |
Definition at line 23 of file xsh_fit_body.h.
#define TYPE_ADD | ( | a | ) | CONCAT2X(a, CPL_TYPE) |
Definition at line 21 of file xsh_fit_body.h.
#define TYPE_ADD_CONST | ( | a | ) | CONCAT2X(TYPE_ADD(a),const) |
Definition at line 22 of file xsh_fit_body.h.
Referenced by irplib_fit_imagelist_polynomial().
static void TYPE_ADD() irplib_fit_imagelist_polynomial | ( | cpl_imagelist * | self, | |
const cpl_matrix * | mh, | |||
const cpl_matrix * | mv, | |||
const cpl_vector * | x_pos, | |||
const cpl_imagelist * | values, | |||
const cpl_vector * | xpow, | |||
double | xnmean, | |||
int | np, | |||
int | nc, | |||
cpl_image * | fiterror | |||
) | [static] |
Fit a polynomial to each pixel in a list of images.
self | Preallocated imagelist to hold fitting result | |
mh | Upper triangular part of SPD Hankel matrix, H = V' * V | |
mv | The transpose of the Vandermonde matrix, V' | |
x_pos | The vector of positions to fit (used for fiterror only) | |
values | The list of images with values to fit | |
xpow | The mindeg powers of x_pos (or NULL, when mindeg is zero) | |
xnmean | Minus the mean value of the x_pos elements (or zero) | |
np | The number of sample points (length of values and x_pos) | |
nc | The number of polynomial coefficients to determine per pixel | |
fiterror | When non-NULL, the error of the fit |
Definition at line 44 of file xsh_fit_body.h.
References CPL_TYPE, irplib_fit_imagelist_residual_double(), irplib_fit_imagelist_residual_float(), irplib_fit_imagelist_residual_int(), irplib_matrix_product_transpose(), irplib_matrix_solve_chol_transpose(), irplib_polynomial_shift_double(), nx, ny, and TYPE_ADD_CONST.
static void TYPE_ADD() irplib_fit_imagelist_residual | ( | cpl_image * | self, | |
int | jj, | |||
const cpl_vector * | x_pos, | |||
const cpl_vector * | xpow, | |||
const cpl_matrix * | mx, | |||
const cpl_matrix * | mb | |||
) | [static] |
Compute the residual of a polynomial fit to an imagelist.
self | Preallocated image to hold residual | |
jj | The index of the image row to compute | |
x_pos | The vector of positions to fit (used for fiterror only) | |
xpow | The mindeg powers of x_pos (or NULL, when mindeg is zero) | |
mx | The transpose of the computed fitting coefficients | |
mb | The transpose of the values to be fitted |
The call requires nx * (np * (2 * nc + 1) + 1) FLOPs.
Definition at line 155 of file xsh_fit_body.h.