CR2RE Pipeline Reference Manual 1.6.10
Enumerations | Functions
Imagelist object

Enumerations

enum  hdrl_imagelist_basic_type
 Define the kind of operation to apply.
 

Functions

cpl_error_code hdrl_imagelist_add_imagelist (hdrl_imagelist *himlist1, const hdrl_imagelist *himlist2)
 Add two image lists, the first one is replaced by the result.
 
cpl_error_code hdrl_imagelist_sub_imagelist (hdrl_imagelist *himlist1, const hdrl_imagelist *himlist2)
 Subtract two image lists, the first one is replaced by the result.
 
cpl_error_code hdrl_imagelist_mul_imagelist (hdrl_imagelist *himlist1, const hdrl_imagelist *himlist2)
 Multiply two image lists, the first one is replaced by the result.
 
cpl_error_code hdrl_imagelist_div_imagelist (hdrl_imagelist *himlist1, const hdrl_imagelist *himlist2)
 Divide two image lists, the first one is replaced by the result.
 
cpl_error_code hdrl_imagelist_add_image (hdrl_imagelist *himlist, const hdrl_image *himg)
 Add an image to an image list.
 
cpl_error_code hdrl_imagelist_sub_image (hdrl_imagelist *himlist, const hdrl_image *himg)
 Subtract an image from an image list.
 
cpl_error_code hdrl_imagelist_mul_image (hdrl_imagelist *himlist, const hdrl_image *himg)
 Multiply an image by an image list.
 
cpl_error_code hdrl_imagelist_div_image (hdrl_imagelist *himlist, const hdrl_image *himg)
 Divide an image from an image list.
 
cpl_error_code hdrl_imagelist_add_scalar (hdrl_imagelist *himlist, hdrl_value value)
 Elementwise addition of a scalar to each image in the himlist.
 
cpl_error_code hdrl_imagelist_sub_scalar (hdrl_imagelist *himlist, hdrl_value value)
 Elementwise subtraction of a scalar to each image in the himlist.
 
cpl_error_code hdrl_imagelist_mul_scalar (hdrl_imagelist *himlist, hdrl_value value)
 Elementwise multiplication of a scalar to each image in the himlist.
 
cpl_error_code hdrl_imagelist_div_scalar (hdrl_imagelist *himlist, hdrl_value value)
 Elementwise division by a scalar to each image in the himlist.
 
cpl_error_code hdrl_imagelist_pow_scalar (hdrl_imagelist *himlist, hdrl_value exponent)
 Compute the elementwise power of each image in the himlist.
 
cpl_error_code hdrl_imagelist_collapse (const hdrl_imagelist *himlist, const hdrl_parameter *param, hdrl_image **out, cpl_image **contrib)
 collapsing of image list
 
cpl_error_code hdrl_imagelist_collapse_mean (const hdrl_imagelist *himlist, hdrl_image **out, cpl_image **contrib)
 Mean collapsing of image list.
 
cpl_error_code hdrl_imagelist_collapse_weighted_mean (const hdrl_imagelist *himlist, hdrl_image **out, cpl_image **contrib)
 Weighted Mean collapsing of image list.
 
cpl_error_code hdrl_imagelist_collapse_median (const hdrl_imagelist *himlist, hdrl_image **out, cpl_image **contrib)
 Median collapsing of image list.
 
cpl_error_code hdrl_imagelist_collapse_sigclip (const hdrl_imagelist *himlist, double kappa_low, double kappa_high, int niter, hdrl_image **out, cpl_image **contrib, cpl_image **reject_low, cpl_image **reject_high)
 Sigma-clipped collapsing of image list.
 
cpl_error_code hdrl_imagelist_collapse_minmax (const hdrl_imagelist *himlist, double nlow, double nhigh, hdrl_image **out, cpl_image **contrib, cpl_image **reject_low, cpl_image **reject_high)
 Minmax-clipped collapsing of image list.
 
cpl_error_code hdrl_imagelist_collapse_mode (const hdrl_imagelist *himlist, double histo_min, double histo_max, double bin_size, hdrl_mode_type mode_method, cpl_size error_niter, hdrl_image **out, cpl_image **contrib)
 Mode collapsing of image list.
 
hdrl_imagelist * hdrl_imagelist_new (void)
 Create an empty imagelist.
 
hdrl_imagelist * hdrl_imagelist_create (cpl_imagelist *imlist, cpl_imagelist *errlist)
 Create an hdrl_imagelist out of 2 cpl_imagelist.
 
cpl_size hdrl_imagelist_get_size (const hdrl_imagelist *himlist)
 Get the number of images in the imagelist.
 
cpl_size hdrl_imagelist_get_size_x (const hdrl_imagelist *himlist)
 Get number of colums of images in the imagelist.
 
cpl_size hdrl_imagelist_get_size_y (const hdrl_imagelist *himlist)
 Get number of rows of images in the imagelist.
 
hdrl_image * hdrl_imagelist_get (const hdrl_imagelist *himlist, cpl_size inum)
 Get an image from a list of images.
 
const hdrl_image * hdrl_imagelist_get_const (const hdrl_imagelist *himlist, cpl_size inum)
 Get an image from a list of images.
 
cpl_error_code hdrl_imagelist_set (hdrl_imagelist *himlist, hdrl_image *himg, cpl_size pos)
 Insert an image into an imagelist.
 
hdrl_image * hdrl_imagelist_unset (hdrl_imagelist *himlist, cpl_size pos)
 Remove an image from an imagelist.
 
void hdrl_imagelist_delete (hdrl_imagelist *himlist)
 Free all memory used by a hdrl_imagelist object including the images.
 
void hdrl_imagelist_empty (hdrl_imagelist *himlist)
 Empty an imagelist and deallocate all its images.
 
hdrl_imagelist * hdrl_imagelist_duplicate (const hdrl_imagelist *himlist)
 Duplicate an image list.
 
int hdrl_imagelist_is_consistent (const hdrl_imagelist *himlist)
 Determine if an imagelist contains images of equal size and type.
 
cpl_error_code hdrl_imagelist_dump_structure (const hdrl_imagelist *himlist, FILE *stream)
 Dump structural information of images in an imagelist.
 
cpl_error_code hdrl_imagelist_dump_window (const hdrl_imagelist *himlist, cpl_size llx, cpl_size lly, cpl_size urx, cpl_size ury, FILE *stream)
 Dump pixel values of images in a imagelist.
 

Detailed Description

hdrl_imagelist is similiar to cpl_imagelist but for hdrl_image. Its reduction methods (mean, median, ...) provide linear error propagation.

Function Documentation

◆ hdrl_imagelist_add_image()

cpl_error_code hdrl_imagelist_add_image ( hdrl_imagelist *  himlist,
const hdrl_image *  himg 
)

Add an image to an image list.

Parameters
himlistinput image list (modified)
himgimage to add
Returns
the cpl_error_code or CPL_ERROR_NONE
See also
hdrl_image_add_image()

The passed image is added to each image of the passed image list.

Possible cpl_error_code set in this function:

  • CPL_ERROR_NULL_INPUT if an input pointer is NULL

Definition at line 185 of file hdrl_imagelist_basic.c.

References hdrl_image_add_image().

◆ hdrl_imagelist_add_imagelist()

cpl_error_code hdrl_imagelist_add_imagelist ( hdrl_imagelist *  himlist1,
const hdrl_imagelist *  himlist2 
)

Add two image lists, the first one is replaced by the result.

Parameters
himlist1first input image list (modified)
himlist2image list to add
Returns
the cpl_error_code or CPL_ERROR_NONE
See also
hdrl_image_add_image()

The two input lists must have the same size, the image number n in the list himlist2 is added to the image number n in the list himlist1.

Possible cpl_error_code set in this function:

  • CPL_ERROR_NULL_INPUT if an input pointer is NULL
  • CPL_ERROR_ILLEGAL_INPUT if the input images have different sizes

Definition at line 108 of file hdrl_imagelist_basic.c.

References hdrl_image_add_image().

◆ hdrl_imagelist_add_scalar()

cpl_error_code hdrl_imagelist_add_scalar ( hdrl_imagelist *  himlist,
hdrl_value  value 
)

Elementwise addition of a scalar to each image in the himlist.

Parameters
himlistImagelist to be modified in place.
valueValue to add to the images
Returns
the cpl_error_code or CPL_ERROR_NONE
See also
hdrl_image_add_scalar()

Possible cpl_error_code set in this function:

  • CPL_ERROR_NULL_INPUT if an input pointer is NULL

Definition at line 276 of file hdrl_imagelist_basic.c.

References hdrl_image_add_scalar().

◆ hdrl_imagelist_collapse()

cpl_error_code hdrl_imagelist_collapse ( const hdrl_imagelist *  himlist,
const hdrl_parameter *  param,
hdrl_image **  out,
cpl_image **  contrib 
)

collapsing of image list

Parameters
himlistinput image list
paramcollapse parameters defining the type of collapse
outoutput combined image pointer filled with pointer to allocated result object
contriboutput contribution mask pointer filled with pointer to allocated result object
Returns
CPL_ERROR_NONE or the relevant the cpl_error_code on error
See also
hdrl_collapse_mean_parameter_create()

Collapse an imagelist according to the type of collapse parameter used as input. It only supports collapse methods with the two outputs, the combined image and the contribution map. For collapse functions with additional output the specialized collapse functions must be used.

Possible cpl_error_code set in this function:

  • CPL_ERROR_NULL_INPUT if an input pointer is NULL
  • CPL_ERROR_UNSUPPORTED_MODE parameter is not a know collapse parameter

Definition at line 407 of file hdrl_imagelist_basic.c.

References hdrl_collapse_minmax_parameter_get_nhigh(), hdrl_collapse_minmax_parameter_get_nlow(), hdrl_collapse_mode_parameter_get_bin_size(), hdrl_collapse_mode_parameter_get_error_niter(), hdrl_collapse_mode_parameter_get_histo_max(), hdrl_collapse_mode_parameter_get_histo_min(), hdrl_collapse_mode_parameter_get_method(), hdrl_collapse_parameter_is_mean(), hdrl_collapse_parameter_is_median(), hdrl_collapse_parameter_is_minmax(), hdrl_collapse_parameter_is_mode(), hdrl_collapse_parameter_is_sigclip(), hdrl_collapse_parameter_is_weighted_mean(), hdrl_collapse_sigclip_parameter_get_kappa_high(), hdrl_collapse_sigclip_parameter_get_kappa_low(), hdrl_collapse_sigclip_parameter_get_niter(), hdrl_imagelist_collapse_mean(), hdrl_imagelist_collapse_median(), hdrl_imagelist_collapse_minmax(), hdrl_imagelist_collapse_mode(), hdrl_imagelist_collapse_sigclip(), and hdrl_imagelist_collapse_weighted_mean().

Referenced by hdrl_bpm_3d_compute(), hdrl_flat_compute(), hdrl_fringe_compute(), and hdrl_spectrum1Dlist_collapse().

◆ hdrl_imagelist_collapse_mean()

cpl_error_code hdrl_imagelist_collapse_mean ( const hdrl_imagelist *  himlist,
hdrl_image **  out,
cpl_image **  contrib 
)

Mean collapsing of image list.

Parameters
himlistinput image list
outoutput combined image
contriboutput contribution mask
Returns
CPL_ERROR_NONE or the relevant the cpl_error_code on error

Possible cpl_error_code set in this function:

  • CPL_ERROR_NULL_INPUT if an input pointer is NULL

Definition at line 470 of file hdrl_imagelist_basic.c.

Referenced by hdrl_imagelist_collapse().

◆ hdrl_imagelist_collapse_median()

cpl_error_code hdrl_imagelist_collapse_median ( const hdrl_imagelist *  himlist,
hdrl_image **  out,
cpl_image **  contrib 
)

Median collapsing of image list.

Parameters
himlistinput image list
outoutput combined image
contriboutput contribution mask
Returns
CPL_ERROR_NONE or the relevant the cpl_error_code on error

Possible cpl_error_code set in this function:

  • CPL_ERROR_NULL_INPUT if an input pointer is NULL

Definition at line 518 of file hdrl_imagelist_basic.c.

Referenced by hdrl_imagelist_collapse().

◆ hdrl_imagelist_collapse_minmax()

cpl_error_code hdrl_imagelist_collapse_minmax ( const hdrl_imagelist *  himlist,
double  nlow,
double  nhigh,
hdrl_image **  out,
cpl_image **  contrib,
cpl_image **  reject_low,
cpl_image **  reject_high 
)

Minmax-clipped collapsing of image list.

Parameters
himlistinput image list
nlowlow number of pixels to reject
nhighhigh number of pixels to reject
outoutput combined image
contriboutput contribution mask
reject_lowoutput low rejection thresholds, may be NULL
reject_highoutput high rejection thresholds, may be NULL
Returns
CPL_ERROR_NONE or the relevant the cpl_error_code on error
See also
hdrl_imagelist_collapse()

Possible cpl_error_code set in this function:

  • CPL_ERROR_NULL_INPUT if an input pointer is NULL

Definition at line 613 of file hdrl_imagelist_basic.c.

Referenced by hdrl_imagelist_collapse().

◆ hdrl_imagelist_collapse_mode()

cpl_error_code hdrl_imagelist_collapse_mode ( const hdrl_imagelist *  himlist,
double  histo_min,
double  histo_max,
double  bin_size,
hdrl_mode_type  mode_method,
cpl_size  error_niter,
hdrl_image **  out,
cpl_image **  contrib 
)

Mode collapsing of image list.

Parameters
himlistinput image list
histo_minminimum value of low pixels to use
histo_maxmaximum value of high pixels to be use
bin_sizesize of the histogram bin
mode_methodmode_method to use for the mode computation
error_niternumber of iterations to compute the error of the mode
outoutput combined image
contriboutput contribution mask
Returns
CPL_ERROR_NONE or the relevant the cpl_error_code on error

Possible cpl_error_code set in this function:

  • CPL_ERROR_NULL_INPUT if an input pointer is NULL

Definition at line 680 of file hdrl_imagelist_basic.c.

Referenced by hdrl_imagelist_collapse().

◆ hdrl_imagelist_collapse_sigclip()

cpl_error_code hdrl_imagelist_collapse_sigclip ( const hdrl_imagelist *  himlist,
double  kappa_low,
double  kappa_high,
int  niter,
hdrl_image **  out,
cpl_image **  contrib,
cpl_image **  reject_low,
cpl_image **  reject_high 
)

Sigma-clipped collapsing of image list.

Parameters
himlistinput image list
kappa_lowlow sigma bound
kappa_highhigh sigma bound
niternumber of clipping iterators
outoutput combined image
contriboutput contribution mask
reject_lowoutput low rejection thresholds, may be NULL
reject_highoutput high rejection thresholds, may be NULL
Returns
CPL_ERROR_NONE or the relevant the cpl_error_code on error
See also
hdrl_imagelist_collapse()

Possible cpl_error_code set in this function:

  • CPL_ERROR_NULL_INPUT if an input pointer is NULL

Definition at line 548 of file hdrl_imagelist_basic.c.

Referenced by hdrl_imagelist_collapse().

◆ hdrl_imagelist_collapse_weighted_mean()

cpl_error_code hdrl_imagelist_collapse_weighted_mean ( const hdrl_imagelist *  himlist,
hdrl_image **  out,
cpl_image **  contrib 
)

Weighted Mean collapsing of image list.

Parameters
himlistinput image list
outoutput combined image
contriboutput contribution mask
Returns
CPL_ERROR_NONE or the relevant the cpl_error_code on error

Possible cpl_error_code set in this function:

  • CPL_ERROR_NULL_INPUT if an input pointer is NULL

Definition at line 494 of file hdrl_imagelist_basic.c.

Referenced by hdrl_imagelist_collapse().

◆ hdrl_imagelist_create()

hdrl_imagelist * hdrl_imagelist_create ( cpl_imagelist *  imlist,
cpl_imagelist *  errlist 
)

Create an hdrl_imagelist out of 2 cpl_imagelist.

Parameters
imlistthe list of image
errlistthe list of errors
Returns
The new hdrl_imagelist

Possible cpl_error_code set in this function:

  • CPL_ERROR_NULL_INPUT if an input pointer is NULL

Definition at line 102 of file hdrl_imagelist_io.c.

References hdrl_image_create(), hdrl_imagelist_new(), and hdrl_imagelist_set().

Referenced by cr2res_io_load_image_list(), and cr2res_io_load_image_list_from_set().

◆ hdrl_imagelist_delete()

void hdrl_imagelist_delete ( hdrl_imagelist *  himlist)

Free all memory used by a hdrl_imagelist object including the images.

Parameters
himlistThe image list or NULL
Returns
Nothing
See also
hdrl_imagelist_empty(), hdrl_imagelist_unwrap()

Definition at line 385 of file hdrl_imagelist_io.c.

References hdrl_imagelist_empty().

Referenced by cr2res_calib_image(), cr2res_calib_imagelist(), hdrl_bpm_fit_compute(), hdrl_fit_polynomial_imagelist(), hdrl_fit_polynomial_imagelist2(), hdrl_resample_image_to_table(), and hdrl_resample_result_delete().

◆ hdrl_imagelist_div_image()

cpl_error_code hdrl_imagelist_div_image ( hdrl_imagelist *  himlist,
const hdrl_image *  himg 
)

Divide an image from an image list.

Parameters
himlistinput image list (modified)
himgimage to divide
Returns
the cpl_error_code or CPL_ERROR_NONE
See also
hdrl_image_div_image()
hdrl_imagelist_add_image()

The passed image is used to divide each image of the passed image list.

Possible cpl_error_code set in this function:

  • CPL_ERROR_NULL_INPUT if an input pointer is NULL

Definition at line 254 of file hdrl_imagelist_basic.c.

References hdrl_image_div_image().

◆ hdrl_imagelist_div_imagelist()

cpl_error_code hdrl_imagelist_div_imagelist ( hdrl_imagelist *  himlist1,
const hdrl_imagelist *  himlist2 
)

Divide two image lists, the first one is replaced by the result.

Parameters
himlist1first input image list (modified)
himlist2image list to divide
Returns
the cpl_error_code or CPL_ERROR_NONE
See also
hdrl_image_div_image()
hdrl_imagelist_add_imagelist

Definition at line 162 of file hdrl_imagelist_basic.c.

References hdrl_image_div_image().

◆ hdrl_imagelist_div_scalar()

cpl_error_code hdrl_imagelist_div_scalar ( hdrl_imagelist *  himlist,
hdrl_value  value 
)

Elementwise division by a scalar to each image in the himlist.

Parameters
himlistImagelist to be modified in place.
valueValue to divide to the images
Returns
the cpl_error_code or CPL_ERROR_NONE
See also
hdrl_image_div_scalar()
hdrl_imagelist_add_scalar()

Possible cpl_error_code set in this function:

  • CPL_ERROR_NULL_INPUT if an input pointer is NULL

Definition at line 348 of file hdrl_imagelist_basic.c.

References hdrl_image_div_scalar().

◆ hdrl_imagelist_dump_structure()

cpl_error_code hdrl_imagelist_dump_structure ( const hdrl_imagelist *  himlist,
FILE *  stream 
)

Dump structural information of images in an imagelist.

Parameters
himlistImagelist to dump
streamOutput stream, accepts stdout or stderr
Returns
CPL_ERROR_NONE or the relevant cpl_error_code on error

Possible cpl_error_code set in this function:

  • CPL_ERROR_NULL_INPUT if an input pointer is NULL
  • CPL_ERROR_FILE_IO if a write operation fails

Definition at line 492 of file hdrl_imagelist_io.c.

References hdrl_image_dump_structure(), and hdrl_imagelist_get_const().

◆ hdrl_imagelist_dump_window()

cpl_error_code hdrl_imagelist_dump_window ( const hdrl_imagelist *  himlist,
cpl_size  llx,
cpl_size  lly,
cpl_size  urx,
cpl_size  ury,
FILE *  stream 
)

Dump pixel values of images in a imagelist.

Parameters
himlistImagelist to dump
llxSpecifies the window position
llySpecifies the window position
urxSpecifies the window position
urySpecifies the window position
streamOutput stream, accepts stdout or stderr
Returns
CPL_ERROR_NONE or the relevant cpl_error_code on error

Possible cpl_error_code set in this function:

  • CPL_ERROR_NULL_INPUT if an input pointer is NULL
  • CPL_ERROR_FILE_IO if a write operation fails
  • CPL_ERROR_ACCESS_OUT_OF_RANGE if the defined window is not in the image
  • CPL_ERROR_ILLEGAL_INPUT if the window definition is wrong (e.g llx > urx)

Definition at line 538 of file hdrl_imagelist_io.c.

References hdrl_image_dump_window(), and hdrl_imagelist_get_const().

◆ hdrl_imagelist_duplicate()

hdrl_imagelist * hdrl_imagelist_duplicate ( const hdrl_imagelist *  himlist)

Duplicate an image list.

Parameters
himlistSource image list.
Returns
1 newly allocated image list, or NULL on error.

Copy an image list into a new image list object. The returned image list must be deallocated using hdrl_imagelist_delete().

Possible cpl_error_code set in this function:

  • CPL_ERROR_NULL_INPUT if an input pointer is NULL

Definition at line 440 of file hdrl_imagelist_io.c.

References hdrl_image_duplicate(), hdrl_imagelist_new(), and hdrl_imagelist_set().

◆ hdrl_imagelist_empty()

void hdrl_imagelist_empty ( hdrl_imagelist *  himlist)

Empty an imagelist and deallocate all its images.

Parameters
himlistThe image list or NULL
Returns
Nothing
See also
hdrl_imagelist_empty(), hdrl_imagelist_delete()
Note
If himlist is NULL nothing is done and no error is set.

After the call the image list can be populated again. It must eventually be deallocated with a call to hdrl_imagelist_delete().

Definition at line 405 of file hdrl_imagelist_io.c.

References hdrl_image_delete(), and hdrl_imagelist_unset().

Referenced by hdrl_imagelist_delete().

◆ hdrl_imagelist_get()

hdrl_image * hdrl_imagelist_get ( const hdrl_imagelist *  himlist,
cpl_size  inum 
)

Get an image from a list of images.

Parameters
himlistthe image list
inumthe image id (from 0 to number of images-1)
Returns
A pointer to the image or NULL in error case.

The returned pointer refers to already allocated data.

Possible cpl_error_code set in this function:

  • CPL_ERROR_NULL_INPUT if an input pointer is NULL
  • CPL_ERROR_ACCESS_OUT_OF_RANGE if inum is bigger thant the list size
  • CPL_ERROR_ILLEGAL_INPUT if inum is negative

Definition at line 210 of file hdrl_imagelist_io.c.

Referenced by cr2res_calib_imagelist(), cr2res_combine_nodding_split(), cr2res_qc_detlin(), cr2res_qc_detlin_stat(), hdrl_bpm_3d_compute(), hdrl_bpm_fit_compute(), hdrl_fit_polynomial_imagelist(), hdrl_fit_polynomial_imagelist2(), hdrl_flat_compute(), hdrl_fringe_compute(), hdrl_fringe_correct(), and hdrl_imagelist_pow_scalar().

◆ hdrl_imagelist_get_const()

const hdrl_image * hdrl_imagelist_get_const ( const hdrl_imagelist *  himlist,
cpl_size  inum 
)

Get an image from a list of images.

Parameters
himlistthe image list
inumthe image id (from 0 to number of images-1)
Returns
A pointer to the image or NULL in error case.
See also
hdrl_imagelist_get

Definition at line 229 of file hdrl_imagelist_io.c.

Referenced by cr2res_detlin_correct(), hdrl_bpm_3d_compute(), hdrl_fit_polynomial_imagelist2(), hdrl_fringe_compute(), hdrl_fringe_correct(), hdrl_imagelist_dump_structure(), hdrl_imagelist_dump_window(), hdrl_imagelist_get_size_x(), hdrl_imagelist_get_size_y(), and hdrl_resample_imagelist_to_table().

◆ hdrl_imagelist_get_size()

cpl_size hdrl_imagelist_get_size ( const hdrl_imagelist *  himlist)

Get the number of images in the imagelist.

Parameters
himlistthe list of images
Returns
The number of images or -1 on error

Possible cpl_error_code set in this function:

  • CPL_ERROR_NULL_INPUT if an input pointer is NULL

Definition at line 148 of file hdrl_imagelist_io.c.

Referenced by cr2res_calib_imagelist(), cr2res_combine_nodding_split(), hdrl_bpm_3d_compute(), hdrl_bpm_fit_compute(), hdrl_fit_polynomial_imagelist(), hdrl_fit_polynomial_imagelist2(), hdrl_flat_compute(), hdrl_fringe_compute(), hdrl_fringe_correct(), hdrl_imagelist_pow_scalar(), hdrl_resample_compute(), and hdrl_resample_imagelist_to_table().

◆ hdrl_imagelist_get_size_x()

cpl_size hdrl_imagelist_get_size_x ( const hdrl_imagelist *  himlist)

Get number of colums of images in the imagelist.

Parameters
himlistthe list of images
Returns
The number of columns of images or -1 on error

assumes the imagelist is uniform (cpl_imagelist_is_uniform)

Possible cpl_error_code set in this function:

  • CPL_ERROR_NULL_INPUT if an input pointer is NULL
  • CPL_ERROR_ILLEGAL_INPUT if the list is empty

Definition at line 168 of file hdrl_imagelist_io.c.

References hdrl_image_get_size_x(), and hdrl_imagelist_get_const().

Referenced by hdrl_fit_polynomial_imagelist(), hdrl_fit_polynomial_imagelist2(), and hdrl_resample_imagelist_to_table().

◆ hdrl_imagelist_get_size_y()

cpl_size hdrl_imagelist_get_size_y ( const hdrl_imagelist *  himlist)

Get number of rows of images in the imagelist.

Parameters
himlistthe list of images
Returns
The number of rows of images or -1 on error

assumes the imagelist is uniform (cpl_imagelist_is_uniform)

Possible cpl_error_code set in this function:

  • CPL_ERROR_NULL_INPUT if an input pointer is NULL
  • CPL_ERROR_ILLEGAL_INPUT if the list is empty

Definition at line 188 of file hdrl_imagelist_io.c.

References hdrl_image_get_size_y(), and hdrl_imagelist_get_const().

Referenced by hdrl_fit_polynomial_imagelist(), hdrl_fit_polynomial_imagelist2(), and hdrl_resample_imagelist_to_table().

◆ hdrl_imagelist_is_consistent()

int hdrl_imagelist_is_consistent ( const hdrl_imagelist *  himlist)

Determine if an imagelist contains images of equal size and type.

Parameters
himlistThe imagelist to check
Returns
Zero if ok, positive if not consistent and negative on error.

The function returns 1 if the list is empty.

Possible cpl_error_code set in this function:

  • CPL_ERROR_NULL_INPUT if an input pointer is NULL

Definition at line 470 of file hdrl_imagelist_io.c.

◆ hdrl_imagelist_mul_image()

cpl_error_code hdrl_imagelist_mul_image ( hdrl_imagelist *  himlist,
const hdrl_image *  himg 
)

Multiply an image by an image list.

Parameters
himlistinput image list (modified)
himgimage to multiply
Returns
the cpl_error_code or CPL_ERROR_NONE
See also
hdrl_image_mul_image()
hdrl_imagelist_add_image()

The passed image is multiplied by each image of the passed image list.

Possible cpl_error_code set in this function:

  • CPL_ERROR_NULL_INPUT if an input pointer is NULL

Definition at line 231 of file hdrl_imagelist_basic.c.

References hdrl_image_mul_image().

◆ hdrl_imagelist_mul_imagelist()

cpl_error_code hdrl_imagelist_mul_imagelist ( hdrl_imagelist *  himlist1,
const hdrl_imagelist *  himlist2 
)

Multiply two image lists, the first one is replaced by the result.

Parameters
himlist1first input image list (modified)
himlist2image list to multiply
Returns
the cpl_error_code or CPL_ERROR_NONE
See also
hdrl_image_mul_image()
hdrl_imagelist_add_imagelist

Definition at line 144 of file hdrl_imagelist_basic.c.

References hdrl_image_mul_image().

◆ hdrl_imagelist_mul_scalar()

cpl_error_code hdrl_imagelist_mul_scalar ( hdrl_imagelist *  himlist,
hdrl_value  value 
)

Elementwise multiplication of a scalar to each image in the himlist.

Parameters
himlistImagelist to be modified in place.
valueValue to multiply to the images
Returns
the cpl_error_code or CPL_ERROR_NONE
See also
hdrl_image_mul_scalar()
hdrl_imagelist_add_scalar()

Possible cpl_error_code set in this function:

  • CPL_ERROR_NULL_INPUT if an input pointer is NULL

Definition at line 324 of file hdrl_imagelist_basic.c.

References hdrl_image_mul_scalar().

◆ hdrl_imagelist_new()

hdrl_imagelist * hdrl_imagelist_new ( void  )

Create an empty imagelist.

Returns
1 newly allocated hdrl_imagelist
See also
hdrl_imagelist_set() The returned hdrl_imagelist must be deallocated using hdrl_imagelist_delete()

Definition at line 84 of file hdrl_imagelist_io.c.

Referenced by cr2res_calib_imagelist(), cr2res_combine_nodding_split(), hdrl_bpm_3d_compute(), hdrl_fit_polynomial_imagelist(), hdrl_fit_polynomial_imagelist2(), hdrl_imagelist_create(), hdrl_imagelist_duplicate(), and hdrl_resample_image_to_table().

◆ hdrl_imagelist_pow_scalar()

cpl_error_code hdrl_imagelist_pow_scalar ( hdrl_imagelist *  himlist,
hdrl_value  exponent 
)

Compute the elementwise power of each image in the himlist.

Parameters
himlistImagelist to be modified in place.
exponentScalar exponent
Returns
CPL_ERROR_NONE or the relevant the cpl_error_code on error
See also
hdrl_image_power()

Possible cpl_error_code set in this function:

  • CPL_ERROR_NULL_INPUT if an input pointer is NULL

Definition at line 370 of file hdrl_imagelist_basic.c.

References hdrl_image_pow_scalar(), hdrl_imagelist_get(), and hdrl_imagelist_get_size().

◆ hdrl_imagelist_set()

cpl_error_code hdrl_imagelist_set ( hdrl_imagelist *  himlist,
hdrl_image *  himg,
cpl_size  pos 
)

Insert an image into an imagelist.

Parameters
himlistThe imagelist
himgThe image to insert
posThe list position (from 0 to number of images)
Returns
CPL_ERROR_NONE or the relevant cpl_error_code on error

It is allowed to specify the position equal to the number of images in the list. This will increment the size of the imagelist.

No action occurs if an image is inserted more than once into the same position. It is allowed to insert the same image into two different positions in a list.

The image is inserted at the position pos in the image list. If the image already there is only present in that one location in the list, then the image is deallocated.

It is not allowed to insert images of different size into a list.

The added image is owned by the imagelist object, which deallocates it hdrl_imagelist_delete is called. Other option is to use hdrl_imagelist_unset to recover ownership of the image, in which case the hdrl_imagelist object is not longer responsible for deallocating it.

Possible cpl_error_code set in this function:

  • CPL_ERROR_NULL_INPUT if an input pointer is NULL
  • CPL_ERROR_ILLEGAL_INPUT if pos is negative
  • CPL_ERROR_TYPE_MISMATCH if himg and himlist are of different types
  • CPL_ERROR_INCOMPATIBLE_INPUT if himg and himlist have different sizes
  • CPL_ERROR_ACCESS_OUT_OF_RANGE if pos is bigger than the number of images in himlist

Definition at line 274 of file hdrl_imagelist_io.c.

References hdrl_image_delete(), hdrl_image_get_size_x(), and hdrl_image_get_size_y().

Referenced by cr2res_calib_imagelist(), cr2res_combine_nodding_split(), hdrl_bpm_3d_compute(), hdrl_fit_polynomial_imagelist(), hdrl_fit_polynomial_imagelist2(), hdrl_imagelist_create(), hdrl_imagelist_duplicate(), and hdrl_resample_image_to_table().

◆ hdrl_imagelist_sub_image()

cpl_error_code hdrl_imagelist_sub_image ( hdrl_imagelist *  himlist,
const hdrl_image *  himg 
)

Subtract an image from an image list.

Parameters
himlistinput image list (modified)
himgimage to subtract
Returns
the cpl_error_code or CPL_ERROR_NONE
See also
hdrl_image_sub_image()
hdrl_imagelist_add_image()

The passed image is subtracted from each image of the passed image list.

Possible cpl_error_code set in this function:

  • CPL_ERROR_NULL_INPUT if an input pointer is NULL

Definition at line 208 of file hdrl_imagelist_basic.c.

References hdrl_image_sub_image().

◆ hdrl_imagelist_sub_imagelist()

cpl_error_code hdrl_imagelist_sub_imagelist ( hdrl_imagelist *  himlist1,
const hdrl_imagelist *  himlist2 
)

Subtract two image lists, the first one is replaced by the result.

Parameters
himlist1first input image list (modified)
himlist2image list to subtract
Returns
the cpl_error_code or CPL_ERROR_NONE
See also
hdrl_image_sub_image()
hdrl_imagelist_add_imagelist

Definition at line 126 of file hdrl_imagelist_basic.c.

References hdrl_image_sub_image().

◆ hdrl_imagelist_sub_scalar()

cpl_error_code hdrl_imagelist_sub_scalar ( hdrl_imagelist *  himlist,
hdrl_value  value 
)

Elementwise subtraction of a scalar to each image in the himlist.

Parameters
himlistImagelist to be modified in place.
valueValue to subtract to the images
Returns
the cpl_error_code or CPL_ERROR_NONE
See also
hdrl_image_sub_scalar()
hdrl_imagelist_add_scalar()

Possible cpl_error_code set in this function:

  • CPL_ERROR_NULL_INPUT if an input pointer is NULL

Definition at line 300 of file hdrl_imagelist_basic.c.

References hdrl_image_sub_scalar().

◆ hdrl_imagelist_unset()

hdrl_image * hdrl_imagelist_unset ( hdrl_imagelist *  himlist,
cpl_size  pos 
)

Remove an image from an imagelist.

Parameters
himlistThe imagelist
posThe list position (from 0 to number of images-1)
Returns
The pointer to the removed image or NULL in error case

The specified image is not deallocated, it is simply removed from the list. The pointer to the image is returned to let the user decide to deallocate it or not. Eventually, the image will have to be deallocated with hdrl_image_delete().

Possible cpl_error_code set in this function:

  • CPL_ERROR_NULL_INPUT if an input pointer is NULL
  • CPL_ERROR_ILLEGAL_INPUT if pos is negative
  • CPL_ERROR_ACCESS_OUT_OF_RANGE if pos is bigger than the number of images in himlist

Definition at line 347 of file hdrl_imagelist_io.c.

Referenced by hdrl_bpm_3d_compute(), hdrl_imagelist_empty(), and hdrl_resample_image_to_table().