Main Page | Modules | Alphabetical List | Class List | Directories | Class Members

Images lists basic routines


Functions

cpl_error_code cpl_imagelist_add (cpl_imagelist *in1, const cpl_imagelist *in2)
 Add two image lists, the first one is replaced by the result.
cpl_error_code cpl_imagelist_subtract (cpl_imagelist *in1, const cpl_imagelist *in2)
 Subtract two image lists, the first one is replaced by the result.
cpl_error_code cpl_imagelist_multiply (cpl_imagelist *in1, const cpl_imagelist *in2)
 Multiply two image lists, the first one is replaced by the result.
cpl_error_code cpl_imagelist_divide (cpl_imagelist *in1, const cpl_imagelist *in2)
 Divide two image lists, the first one is replaced by the result.
cpl_error_code cpl_imagelist_add_image (cpl_imagelist *imlist, const cpl_image *img)
 Add an image to an image list.
cpl_error_code cpl_imagelist_subtract_image (cpl_imagelist *imlist, const cpl_image *img)
 Subtract an image from an image list.
cpl_error_code cpl_imagelist_multiply_image (cpl_imagelist *imlist, const cpl_image *img)
 Multiply an image list by an image.
cpl_error_code cpl_imagelist_divide_image (cpl_imagelist *imlist, const cpl_image *img)
 Divide an image list by an image.
cpl_error_code cpl_imagelist_add_scalar (cpl_imagelist *imlist, double addend)
 Elementwise addition of a scalar to each image in the imlist.
cpl_error_code cpl_imagelist_subtract_scalar (cpl_imagelist *imlist, double subtrahend)
 Elementwise subtraction of a scalar from each image in the imlist.
cpl_error_code cpl_imagelist_multiply_scalar (cpl_imagelist *imlist, double factor)
 Elementwise multiplication of the imlist with a scalar.
cpl_error_code cpl_imagelist_divide_scalar (cpl_imagelist *imlist, double divisor)
 Elementwise division of each image in the imlist with a scalar.
cpl_error_code cpl_imagelist_logarithm (cpl_imagelist *imlist, double base)
 Compute the elementwise logarithm of each image in the imlist.
cpl_error_code cpl_imagelist_exponential (cpl_imagelist *imlist, double base)
 Compute the elementwise exponential of each image in the imlist.
cpl_error_code cpl_imagelist_normalise (cpl_imagelist *imlist, cpl_norm mode)
 Normalize each image in the list.
cpl_error_code cpl_imagelist_threshold (cpl_imagelist *imlist, double lo_cut, double hi_cut, double assign_lo_cut, double assign_hi_cut)
 Threshold all pixel values to an interval.
cpl_image * cpl_image_new_from_accepted (const cpl_imagelist *imlist)
 Create a contribution map from the bad pixel maps of the images.
cpl_image * cpl_imagelist_collapse_create (const cpl_imagelist *imlist)
 Average an imagelist to a single image.
cpl_image * cpl_imagelist_collapse_minmax_create (const cpl_imagelist *imlist, int low, int high)
 Average with rejection an imagelist to a single image.
cpl_image * cpl_imagelist_collapse_median_create (const cpl_imagelist *imlist)
 Compute the median of an image list to a single image.
cpl_imagelist * cpl_imagelist_fit_polynomial (const cpl_imagelist *ilist, const double *dit, int deg)
 Compute the non linearity of the detector.

Detailed Description

This module provides basic functions to handle cpl_imagelist.

Synopsis:
   #include "cpl_imagelist_basic.h"

Function Documentation

cpl_image* cpl_image_new_from_accepted const cpl_imagelist *  imlist  ) 
 

Create a contribution map from the bad pixel maps of the images.

Parameters:
imlist The imagelist
Returns:
The contributions map (a CPL_TYPE_INT cpl_image) or NULL on error
See also:
cpl_imagelist_is_uniform()
The returned map counts for each pixel the number of good pixels in the list. The returned map has to be deallocated with cpl_image_delete().

Possible _cpl_error_code_ set in this function:

  • CPL_ERROR_NULL_INPUT if (one of) the input pointer(s) is NULL
  • CPL_ERROR_ILLEGAL_INPUT if the input image list is not valid

cpl_error_code cpl_imagelist_add cpl_imagelist *  in1,
const cpl_imagelist *  in2
 

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

Parameters:
in1 first input image list (modified)
in2 image list to add
Returns:
the _cpl_error_code_ or CPL_ERROR_NONE
See also:
cpl_image_add()
The two input lists must have the same size, the image number n in the list in2 is added to the image number n in the list in1.

Possible _cpl_error_code_ set in this function:

  • CPL_ERROR_NULL_INPUT if (one of) the input pointer(s) is NULL
  • CPL_ERROR_ILLEGAL_INPUT if the input images have different sizes

cpl_error_code cpl_imagelist_add_image cpl_imagelist *  imlist,
const cpl_image *  img
 

Add an image to an image list.

Parameters:
imlist input image list (modified)
img image to add
Returns:
the _cpl_error_code_ or CPL_ERROR_NONE
See also:
cpl_image_add()
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 (one of) the input pointer(s) is NULL

cpl_error_code cpl_imagelist_add_scalar cpl_imagelist *  imlist,
double  addend
 

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

Parameters:
imlist Imagelist to be modified in place.
addend Number to add
Returns:
CPL_ERROR_NONE or the relevant the _cpl_error_code_ on error
See also:
cpl_image_add_scalar()
Possible _cpl_error_code_ set in this function:
  • CPL_ERROR_NULL_INPUT if (one of) the input pointer(s) is NULL

cpl_image* cpl_imagelist_collapse_create const cpl_imagelist *  imlist  ) 
 

Average an imagelist to a single image.

Parameters:
imlist the input images list
Returns:
the average image or NULL on error case.
See also:
cpl_imagelist_is_uniform()
The returned image has to be deallocated with cpl_image_delete().

The bad pixel maps of the images in the input list are taken into account, the result image pixels are flagged as rejected for those where there were no good pixel at the same position in the input image list.

Possible _cpl_error_code_ set in this function:

  • CPL_ERROR_NULL_INPUT if (one of) the input pointer(s) is NULL
  • CPL_ERROR_ILLEGAL_INPUT if the input image list is not valid

cpl_image* cpl_imagelist_collapse_median_create const cpl_imagelist *  imlist  ) 
 

Compute the median of an image list to a single image.

Parameters:
imlist the input images list
Returns:
the median image or NULL on error case.
See also:
cpl_imagelist_is_uniform()
The returned image has to be deallocated with cpl_image_delete().

The bad pixel maps of the input frames are not taken into account, and the one of the created image is empty.

The input image list can be of type CPL_TYPE_INT, CPL_TYPE_FLOAT and CPL_TYPE_DOUBLE.

Possible _cpl_error_code_ set in this function:

  • CPL_ERROR_NULL_INPUT if (one of) the input pointer(s) is NULL
  • CPL_ERROR_ILLEGAL_INPUT if the input image list is not valid
  • CPL_ERROR_TYPE_MISMATCH if the passed image list type is not supported

cpl_image* cpl_imagelist_collapse_minmax_create const cpl_imagelist *  imlist,
int  low,
int  high
 

Average with rejection an imagelist to a single image.

Parameters:
imlist the input images list
low number of low rejected values
high number of high rejected values
Returns:
the average image or NULL on error case.
The returned image has to be deallocated with cpl_image_delete().

The bad pixel maps of the input frames are not taken into account, and the one of the created image is empty.

The input images are averaged, for each pixel position the low lowest pixels and the high highest pixels are discarded for the average computation.

The input image list can be of type CPL_TYPE_INT, CPL_TYPE_FLOAT and CPL_TYPE_DOUBLE.

Possible _cpl_error_code_ set in this function:

  • CPL_ERROR_NULL_INPUT if (one of) the input pointer(s) is NULL
  • CPL_ERROR_ILLEGAL_INPUT if the input image list is not valid or if the sum of the rejections is not lower than the number of images or if low or high is negative
  • CPL_ERROR_TYPE_MISMATCH if the passed image list type is not supported

cpl_error_code cpl_imagelist_divide cpl_imagelist *  in1,
const cpl_imagelist *  in2
 

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

Parameters:
in1 first input image list (modified)
in2 image list to divide
Returns:
the _cpl_error_code_ or CPL_ERROR_NONE
See also:
cpl_image_divide()

cpl_imagelist_add()

cpl_error_code cpl_imagelist_divide_image cpl_imagelist *  imlist,
const cpl_image *  img
 

Divide an image list by an image.

Parameters:
imlist input image list (modified)
img image for division
Returns:
the _cpl_error_code_ or CPL_ERROR_NONE
See also:
cpl_image_divide()

cpl_imagelist_add_image()

cpl_error_code cpl_imagelist_divide_scalar cpl_imagelist *  imlist,
double  divisor
 

Elementwise division of each image in the imlist with a scalar.

Parameters:
imlist Imagelist to be modified in place.
divisor Non-zero number to divide with
Returns:
CPL_ERROR_NONE or the relevant the _cpl_error_code_ on error
See also:
cpl_imagelist_add_scalar()
Possible _cpl_error_code_ set in this function:
  • CPL_ERROR_NULL_INPUT if (one of) the input pointer(s) is NULL

cpl_error_code cpl_imagelist_exponential cpl_imagelist *  imlist,
double  base
 

Compute the elementwise exponential of each image in the imlist.

Parameters:
imlist Imagelist to be modified in place.
base Base of the exponential.
Returns:
CPL_ERROR_NONE or the relevant the _cpl_error_code_ on error
See also:
cpl_image_exponential()
Possible _cpl_error_code_ set in this function:
  • CPL_ERROR_NULL_INPUT if (one of) the input pointer(s) is NULL

cpl_imagelist* cpl_imagelist_fit_polynomial const cpl_imagelist *  ilist,
const double *  dit,
int  deg
 

Compute the non linearity of the detector.

Parameters:
ilist the list of exposures (images obtained with different DITs)
dit the DIT values used
deg the polynomial degree for the fit
Returns:
the image list with the fit coefficients or NULL in error case.
Image list can be CPL_TYPE_FLOAT or CPL_TYPE_DOUBLE.

For each pixel, a polynomial representing the relation flux=P(exposure) is computed where: P(x) = a1*x + ... + an*x^n The returned image list contains deg+1 images. The deg first images contain the the deg first coefficients of the polynomial and the last image contains the error of the fit.

Possible _cpl_error_code_ set in this function:

  • CPL_ERROR_NULL_INPUT if (one of) the input pointer(s) is NULL
  • CPL_ERROR_ILLEGAL_INPUT if deg is not strictly positive
  • CPL_ERROR_TYPE_MISMATCH if the passed image list type is not supported

cpl_error_code cpl_imagelist_logarithm cpl_imagelist *  imlist,
double  base
 

Compute the elementwise logarithm of each image in the imlist.

Parameters:
imlist Imagelist to be modified in place.
base Base of the logarithm.
Returns:
CPL_ERROR_NONE or the relevant the _cpl_error_code_ on error
See also:
cpl_image_logarithm()
Possible _cpl_error_code_ set in this function:
  • CPL_ERROR_NULL_INPUT if (one of) the input pointer(s) is NULL

cpl_error_code cpl_imagelist_multiply cpl_imagelist *  in1,
const cpl_imagelist *  in2
 

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

Parameters:
in1 first input image list (modified)
in2 image list to multiply
Returns:
the _cpl_error_code_ or CPL_ERROR_NONE
See also:
cpl_image_multiply()

cpl_imagelist_add()

cpl_error_code cpl_imagelist_multiply_image cpl_imagelist *  imlist,
const cpl_image *  img
 

Multiply an image list by an image.

Parameters:
imlist input image list (modified)
img image to multiply
Returns:
the _cpl_error_code_ or CPL_ERROR_NONE
See also:
cpl_image_multiply()

cpl_imagelist_add_image()

cpl_error_code cpl_imagelist_multiply_scalar cpl_imagelist *  imlist,
double  factor
 

Elementwise multiplication of the imlist with a scalar.

Parameters:
imlist Imagelist to be modified in place.
factor Number to multiply with
Returns:
CPL_ERROR_NONE or the relevant the _cpl_error_code_ on error
See also:
cpl_imagelist_add_scalar()

cpl_error_code cpl_imagelist_normalise cpl_imagelist *  imlist,
cpl_norm  mode
 

Normalize each image in the list.

Parameters:
imlist Imagelist to modify.
mode Normalization mode.
Returns:
CPL_ERROR_NONE or the relevant _cpl_error_code_ on error
See also:
cpl_image_normalise()
The list may be partly modified if an error occurs.

Possible _cpl_error_code_ set in this function:

  • CPL_ERROR_NULL_INPUT if (one of) the input pointer(s) is NULL

cpl_error_code cpl_imagelist_subtract cpl_imagelist *  in1,
const cpl_imagelist *  in2
 

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

Parameters:
in1 first input image list (modified)
in2 image list to subtract
Returns:
the _cpl_error_code_ or CPL_ERROR_NONE
See also:
cpl_image_subtract()

cpl_imagelist_add()

cpl_error_code cpl_imagelist_subtract_image cpl_imagelist *  imlist,
const cpl_image *  img
 

Subtract an image from an image list.

Parameters:
imlist input image list (modified)
img image to subtract
Returns:
the _cpl_error_code_ or CPL_ERROR_NONE
See also:
cpl_image_subtract()

cpl_imagelist_add_image()

cpl_error_code cpl_imagelist_subtract_scalar cpl_imagelist *  imlist,
double  subtrahend
 

Elementwise subtraction of a scalar from each image in the imlist.

Parameters:
imlist Imagelist to be modified in place.
subtrahend Number to subtract
Returns:
CPL_ERROR_NONE or the relevant the _cpl_error_code_ on error
See also:
cpl_imagelist_add_scalar()

cpl_error_code cpl_imagelist_threshold cpl_imagelist *  imlist,
double  lo_cut,
double  hi_cut,
double  assign_lo_cut,
double  assign_hi_cut
 

Threshold all pixel values to an interval.

Parameters:
imlist Image list to threshold.
lo_cut Lower bound.
hi_cut Higher bound.
assign_lo_cut Value to assign to pixels below low bound.
assign_hi_cut Value to assign to pixels above high bound.
Returns:
CPL_ERROR_NONE or the relevant _cpl_error_code_ on error
See also:
cpl_image_threshold()
Threshold the images of the list using cpl_image_threshold() The input image list is modified.

Possible _cpl_error_code_ set in this function:

  • CPL_ERROR_NULL_INPUT if (one of) the input pointer(s) is NULL
  • CPL_ERROR_INCOMPATIBLE_INPUT if lo_cut is bigger than hi_cut


Generated on Mon Sep 26 14:38:17 2005 for Common Pipeline Library Reference Manual by  doxygen 1.4.1