Images lists basic routines


Functions

cpl_image * cpl_image_new_from_accepted (const cpl_imagelist *imlist)
 Create a contribution map from the bad pixel maps of the images.
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_add_image (cpl_imagelist *imlist, const cpl_image *img)
 Add an image to an image list.
cpl_error_code cpl_imagelist_add_scalar (cpl_imagelist *imlist, double addend)
 Elementwise addition of a scalar to each image in the imlist.
cpl_image * cpl_imagelist_collapse_create (const cpl_imagelist *imlist)
 Average 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_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_sigclip_create (const cpl_imagelist *imlist, double sigma, double kappahigh, double keep, unsigned mode, cpl_image *kept)
 Average with sigma-clipping rejection an imagelist to a single image.
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_divide_image (cpl_imagelist *imlist, const cpl_image *img)
 Divide an image list by an image.
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_exponential (cpl_imagelist *imlist, double base)
 Compute the elementwise exponential of each image in the imlist.
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_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_multiply_image (cpl_imagelist *imlist, const cpl_image *img)
 Multiply an image list by an image.
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_normalise (cpl_imagelist *imlist, cpl_norm mode)
 Normalize each image in the list.
cpl_error_code cpl_imagelist_power (cpl_imagelist *imlist, double exponent)
 Compute the elementwise power of each image in the imlist.
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_subtract_image (cpl_imagelist *imlist, const cpl_image *img)
 Subtract an image from an image list.
cpl_error_code cpl_imagelist_subtract_scalar (cpl_imagelist *imlist, double subtrahend)
 Elementwise subtraction of a scalar from each image in the imlist.
cpl_imagelist * cpl_imagelist_swap_axis_create (const cpl_imagelist *ilist, cpl_swap_axis mode)
 Swap the axis of an image 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.

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_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_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_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_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_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_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_image* cpl_imagelist_collapse_sigclip_create ( const cpl_imagelist *  imlist,
double  sigma,
double  kappahigh,
double  keep,
unsigned  mode,
cpl_image *  kept 
)

Average with sigma-clipping rejection an imagelist to a single image.

Parameters:
imlist the input images list
sigma the sigma value
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.

For each pixel position the pixels whose value is higher than mean+sigma*stdev or lower than mean-sigma*stdev are discarded for the average computation. If all pixels are discarde, the reslting pixel is 0. Where mean is the average of the pixels at that position, and stdev is the standard deviation of the pixels at that position.

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_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_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_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_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_code cpl_imagelist_power ( cpl_imagelist *  imlist,
double  exponent 
)

Compute the elementwise power of each image in the imlist.

Parameters:
imlist Imagelist to be modified in place.
exponent Scalar exponent
Returns:
CPL_ERROR_NONE or the relevant the _cpl_error_code_ on error
See also:
cpl_image_power()
Possible _cpl_error_code_ set in this function:

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_imagelist* cpl_imagelist_swap_axis_create ( const cpl_imagelist *  ilist,
cpl_swap_axis  mode 
)

Swap the axis of an image list.

Parameters:
ilist The image list to swap
mode The swapping mode
Returns:
The swapped image list or NULL in error case
This function is intended for users that want to use the cpl_imagelist object as a cube. Swapping the axis would give them access to the usual functions in the 3 dimensions. This has the cost that it duplicates the memory consumption, which can be a problem for big amounts of data.

Image list can be CPL_TYPE_INT, CPL_TYPE_FLOAT or CPL_TYPE_DOUBLE. The mode can be either CPL_SWAP_AXIS_XZ or CPL_SWAP_AXIS_YZ

Possible _cpl_error_code_ set in this function:

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:


Generated on Wed Mar 18 09:40:12 2009 for Common Pipeline Library Reference Manual by  doxygen 1.4.7