CR2RE Pipeline Reference Manual 1.6.10
Functions
Fitting

Functions

cpl_error_code hdrl_fit_polynomial_imagelist (const hdrl_imagelist *list, const cpl_vector *samplepos, const int degree, hdrl_imagelist **coef, cpl_image **chi2, cpl_image **dof)
 weighted least squares polynomial fit of each pixel of a imagelist
 
cpl_error_code hdrl_fit_polynomial_imagelist2 (const hdrl_imagelist *list, const cpl_imagelist *samplepos, const int degree, hdrl_imagelist **coef, cpl_image **chi2, cpl_image **dof)
 weighted least squares polynomial fit of each pixel of a imagelist
 

Detailed Description

Function Documentation

◆ hdrl_fit_polynomial_imagelist()

cpl_error_code hdrl_fit_polynomial_imagelist ( const hdrl_imagelist *  list,
const cpl_vector *  samplepos,
const int  degree,
hdrl_imagelist **  coef,
cpl_image **  chi2,
cpl_image **  dof 
)

weighted least squares polynomial fit of each pixel of a imagelist

Parameters
listimagelist to fit, the 1/errors^2 are used as the weights of the fit
sampleposvector of sample position of each image in the list
degreedegree of the fit starting from 0
coefoutput coefficient hdrl_imagelist, the data contains the coefficient the error contains the diagonal element of the covariance matrix
chi2output double cpl_image, contains the chi2 of the fit
dofoutput double cpl_image, contains the degrees of freedom of the residuals
Note
the errors only need to be relative correct, if the are wrong by a constant the real errors of the data points can be estimated by multiplying the squared errors with chi2/dof The fitting method uses normal equation so the function should not be used for badly conditioned data.

Definition at line 367 of file hdrl_fit.c.

References hdrl_image_get_mask(), hdrl_image_is_rejected(), hdrl_image_new(), hdrl_image_reject(), hdrl_image_set_pixel(), hdrl_imagelist_delete(), hdrl_imagelist_get(), hdrl_imagelist_get_size(), hdrl_imagelist_get_size_x(), hdrl_imagelist_get_size_y(), hdrl_imagelist_new(), and hdrl_imagelist_set().

Referenced by hdrl_bpm_fit_compute().

◆ hdrl_fit_polynomial_imagelist2()

cpl_error_code hdrl_fit_polynomial_imagelist2 ( const hdrl_imagelist *  list,
const cpl_imagelist *  samplepos,
const int  degree,
hdrl_imagelist **  coef,
cpl_image **  chi2,
cpl_image **  dof 
)

weighted least squares polynomial fit of each pixel of a imagelist

Parameters
listimagelist to fit, the 1/errors^2 are used as the weights of the fit
sampleposeach slice of pixels of this imagelist form the sample position vector
degreedegree of the fit starting from 0
coefoutput coefficient hdrl_imagelist, the data contains the coefficient the error contains the diagonal element of the covariance matrix
chi2output double cpl_image, contains the chi2 of the fit
dofoutput double cpl_image, contains the degrees of freedom of the residuals
See also
hdrl_fit_polynomial_imagelist

Similar to hdrl_fit_polynomial_imagelist except the sample positions for each line of pixels per image is taken from the slice of pixels of the samplepos imagelist

Note
the errors only need to be relative correct, if the are wrong by a constant the real errors of the data points can be estimated by multiplying the squared errors with chi2/dof The fitting method uses normal equation so the function should not be used for badly conditioned data.

Definition at line 540 of file hdrl_fit.c.

References hdrl_image_get_mask(), hdrl_image_get_pixel(), hdrl_image_get_size_x(), hdrl_image_get_size_y(), hdrl_image_is_rejected(), hdrl_image_new(), hdrl_image_reject(), hdrl_image_set_pixel(), hdrl_imagelist_delete(), hdrl_imagelist_get(), hdrl_imagelist_get_const(), hdrl_imagelist_get_size(), hdrl_imagelist_get_size_x(), hdrl_imagelist_get_size_y(), hdrl_imagelist_new(), and hdrl_imagelist_set().