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

Statistics on images


Functions

double cpl_image_get_min_window (const cpl_image *image, int llx, int lly, int urx, int ury)
 computes minimum pixel value over an image sub-window.
double cpl_image_get_min (const cpl_image *image)
 computes minimum pixel value over an image.
double cpl_image_get_max_window (const cpl_image *image, int llx, int lly, int urx, int ury)
 computes maximum pixel value over an image sub-window.
double cpl_image_get_max (const cpl_image *image)
 computes maximum pixel value over an image.
double cpl_image_get_mean_window (const cpl_image *image, int llx, int lly, int urx, int ury)
 computes mean pixel value over an image sub-window.
double cpl_image_get_mean (const cpl_image *image)
 computes mean pixel value over an image.
double cpl_image_get_median_window (const cpl_image *image, int llx, int lly, int urx, int ury)
 computes median pixel value over an image sub-window.
double cpl_image_get_median (const cpl_image *image)
 computes median pixel value over an image.
double cpl_image_get_stdev_window (const cpl_image *image, int llx, int lly, int urx, int ury)
 computes pixel standard deviation over an image sub-window.
double cpl_image_get_stdev (const cpl_image *image)
 computes pixel standard deviation over an image.
double cpl_image_get_flux_window (const cpl_image *image, int llx, int lly, int urx, int ury)
 Computes the sum of pixel values over an image sub-window.
double cpl_image_get_flux (const cpl_image *image)
 Computes the sum of pixel values over an image.
double cpl_image_get_absflux_window (const cpl_image *image, int llx, int lly, int urx, int ury)
 Computes the sum of absolute values over an image sub-window.
double cpl_image_get_sqflux_window (const cpl_image *image, int llx, int lly, int urx, int ury)
 Computes the sum of squared values over an image sub-window.
double cpl_image_get_absflux (const cpl_image *image)
 Computes the sum of absolute values over an image.
double cpl_image_get_sqflux (const cpl_image *image)
 Computes the sum of squared values over an image.
double cpl_image_get_centroid_x_window (const cpl_image *image, int llx, int lly, int urx, int ury)
 Computes the x centroid value over an image sub-window.
double cpl_image_get_centroid_y_window (const cpl_image *image, int llx, int lly, int urx, int ury)
 Computes the y centroid value over an image sub-window.
cpl_error_code cpl_image_get_minpos_window (const cpl_image *image, int llx, int lly, int urx, int ury, int *px, int *py)
 Computes minimum pixel value and position over an image sub window.
cpl_error_code cpl_image_get_minpos (const cpl_image *image, int *px, int *py)
 Computes minimum pixel value and position over an image.
cpl_error_code cpl_image_get_maxpos_window (const cpl_image *image, int llx, int lly, int urx, int ury, int *px, int *py)
 Computes maximum pixel value and position over an image sub window.
cpl_error_code cpl_image_get_maxpos (const cpl_image *image, int *px, int *py)
 Computes maximum pixel value and position over an image.
double cpl_image_get_median_dev (const cpl_image *image, double *sigma)
 Computes first and second order image statistics using median.

Detailed Description

This module provides functions to compute various statistics in images.

The bad pixel map stored in the image is taken into account for the statistics computations. These functions can compute the mean, median, maximum, minimum, flux, etc... of the good pixels of an image.

Synopsis:
   #include "cpl_image_stats.h"

Function Documentation

double cpl_image_get_absflux const cpl_image *  image  ) 
 

Computes the sum of absolute values over an image.

Parameters:
image input image.
Returns:
the absolute flux (sum of |pixels|) value
See also:
cpl_image_get_min()

double cpl_image_get_absflux_window const cpl_image *  image,
int  llx,
int  lly,
int  urx,
int  ury
 

Computes the sum of absolute values over an image sub-window.

Parameters:
image input image.
llx Lower left x position (FITS convention)
lly Lower left y position (FITS convention)
urx Upper right x position (FITS convention)
ury Upper right y position (FITS convention)
Returns:
the absolute flux (sum of |pixels|) value
See also:
cpl_image_get_min_window()

double cpl_image_get_centroid_x_window const cpl_image *  image,
int  llx,
int  lly,
int  urx,
int  ury
 

Computes the x centroid value over an image sub-window.

Parameters:
image input image.
llx Lower left x position (FITS convention)
lly Lower left y position (FITS convention)
urx Upper right x position (FITS convention)
ury Upper right y position (FITS convention)
Returns:
the x centroid value
See also:
cpl_image_get_min_window()

double cpl_image_get_centroid_y_window const cpl_image *  image,
int  llx,
int  lly,
int  urx,
int  ury
 

Computes the y centroid value over an image sub-window.

Parameters:
image input image.
llx Lower left x position (FITS convention)
lly Lower left y position (FITS convention)
urx Upper right x position (FITS convention)
ury Upper right y position (FITS convention)
Returns:
the y centroid value
See also:
cpl_image_get_min_window()

double cpl_image_get_flux const cpl_image *  image  ) 
 

Computes the sum of pixel values over an image.

Parameters:
image input image.
Returns:
the flux value
See also:
cpl_image_get_min()

double cpl_image_get_flux_window const cpl_image *  image,
int  llx,
int  lly,
int  urx,
int  ury
 

Computes the sum of pixel values over an image sub-window.

Parameters:
image input image.
llx Lower left x position (FITS convention)
lly Lower left y position (FITS convention)
urx Upper right x position (FITS convention)
ury Upper right y position (FITS convention)
Returns:
the flux value
See also:
cpl_image_get_min_window()

double cpl_image_get_max const cpl_image *  image  ) 
 

computes maximum pixel value over an image.

Parameters:
image input image.
Returns:
the maximum value
See also:
cpl_image_get_min()

double cpl_image_get_max_window const cpl_image *  image,
int  llx,
int  lly,
int  urx,
int  ury
 

computes maximum pixel value over an image sub-window.

Parameters:
image input image.
llx Lower left x position (FITS convention)
lly Lower left y position (FITS convention)
urx Upper right x position (FITS convention)
ury Upper right y position (FITS convention)
Returns:
the maximum value
See also:
cpl_image_get_min_window()

cpl_error_code cpl_image_get_maxpos const cpl_image *  image,
int *  px,
int *  py
 

Computes maximum pixel value and position over an image.

Parameters:
image Input image.
px ptr to the x coordinate of the maximum position
py ptr to the y coordinate of the maximum position
Returns:
the _cpl_error_code_ or CPL_ERROR_NONE
See also:
cpl_image_get_minpos()

cpl_error_code cpl_image_get_maxpos_window const cpl_image *  image,
int  llx,
int  lly,
int  urx,
int  ury,
int *  px,
int *  py
 

Computes maximum pixel value and position over an image sub window.

Parameters:
image Input image.
llx Lower left x position (FITS convention)
lly Lower left y position (FITS convention)
urx Upper right x position (FITS convention)
ury Upper right y position (FITS convention)
px ptr to the x coordinate of the maximum position
py ptr to the y coordinate of the maximum position
Returns:
the _cpl_error_code_ or CPL_ERROR_NONE
See also:
cpl_image_get_minpos_window()

double cpl_image_get_mean const cpl_image *  image  ) 
 

computes mean pixel value over an image.

Parameters:
image input image.
Returns:
the mean value
See also:
cpl_image_get_min()

double cpl_image_get_mean_window const cpl_image *  image,
int  llx,
int  lly,
int  urx,
int  ury
 

computes mean pixel value over an image sub-window.

Parameters:
image input image.
llx Lower left x position (FITS convention)
lly Lower left y position (FITS convention)
urx Upper right x position (FITS convention)
ury Upper right y position (FITS convention)
Returns:
the mean value
See also:
cpl_image_get_min_window()

double cpl_image_get_median const cpl_image *  image  ) 
 

computes median pixel value over an image.

Parameters:
image Input image.
Returns:
the median value
See also:
cpl_tools_get_median_double()
In case of error, the _cpl_error_code_ code is set, and the returned double is undefined. Images can be CPL_TYPE_FLOAT, CPL_TYPE_INT or CPL_TYPE_DOUBLE.

Possible _cpl_error_code_ set in this function:

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

double cpl_image_get_median_dev const cpl_image *  image,
double *  sigma
 

Computes first and second order image statistics using median.

Parameters:
image Input image.
sigma Output computed sigma value.
Returns:
the median
See also:
cpl_tools_get_median_double()
This function takes an image in input. It tries to estimate the average and standard deviation of the image by approximating them by resp. the median and the average absolute distance to the median. The median is the returned double. The average absolute distance to the median is written into sigma. Images can be CPL_TYPE_FLOAT, CPL_TYPE_INT or CPL_TYPE_DOUBLE. In case of error, the _cpl_error_code_ code is set, and the returned double is undefined.

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 image bad pixels map cannot be retrieved
  • CPL_ERROR_TYPE_MISMATCH if the passed image type is not supported
  • CPL_ERROR_DATA_NOT_FOUND if all the pixels are bad in image

double cpl_image_get_median_window const cpl_image *  image,
int  llx,
int  lly,
int  urx,
int  ury
 

computes median pixel value over an image sub-window.

Parameters:
image Input image.
llx Lower left x position (FITS convention)
lly Lower left y position (FITS convention)
urx Upper right x position (FITS convention)
ury Upper right y position (FITS convention)
Returns:
The median value
See also:
cpl_tools_get_median_double()
The specified bounds are included in the specified region.

In case of error, the _cpl_error_code_ code is set, and the returned double is undefined. Images can be CPL_TYPE_FLOAT, CPL_TYPE_INT or 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 window is outside the image
  • CPL_ERROR_TYPE_MISMATCH if the passed image type is not supported

double cpl_image_get_min const cpl_image *  image  ) 
 

computes minimum pixel value over an image.

Parameters:
image input image.
Returns:
the minimum value
In case of error, the _cpl_error_code_ code is set, and the returned double is undefined. Images can be CPL_TYPE_FLOAT, CPL_TYPE_INT or CPL_TYPE_DOUBLE.

Possible _cpl_error_code_ set in this function:

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

double cpl_image_get_min_window const cpl_image *  image,
int  llx,
int  lly,
int  urx,
int  ury
 

computes minimum pixel value over an image sub-window.

Parameters:
image input image.
llx Lower left x position (FITS convention)
lly Lower left y position (FITS convention)
urx Upper right x position (FITS convention)
ury Upper right y position (FITS convention)
Returns:
the minimum value
The specified bounds are included in the specified region. In case of error, the _cpl_error_code_ code is set, and the returned double is undefined. Images can be CPL_TYPE_FLOAT, CPL_TYPE_INT or 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_code cpl_image_get_minpos const cpl_image *  image,
int *  px,
int *  py
 

Computes minimum pixel value and position over an image.

Parameters:
image Input image.
px ptr to the x coordinate of the minimum position
py ptr to the y coordinate of the minimum position
Returns:
the _cpl_error_code_ or CPL_ERROR_NONE
Images can be CPL_TYPE_FLOAT, CPL_TYPE_INT or 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_code cpl_image_get_minpos_window const cpl_image *  image,
int  llx,
int  lly,
int  urx,
int  ury,
int *  px,
int *  py
 

Computes minimum pixel value and position over an image sub window.

Parameters:
image Input image.
llx Lower left x position (FITS convention)
lly Lower left y position (FITS convention)
urx Upper right x position (FITS convention)
ury Upper right y position (FITS convention)
px ptr to the x coordinate of the minimum position
py ptr to the y coordinate of the minimum position
Returns:
the _cpl_error_code_ or CPL_ERROR_NONE
The specified bounds are included in the specified region.

Images can be CPL_TYPE_FLOAT, CPL_TYPE_INT or CPL_TYPE_DOUBLE.

Possible _cpl_error_code_ set in this function:

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

double cpl_image_get_sqflux const cpl_image *  image  ) 
 

Computes the sum of squared values over an image.

Parameters:
image input image.
Returns:
the sqaure flux
See also:
cpl_image_get_min()

double cpl_image_get_sqflux_window const cpl_image *  image,
int  llx,
int  lly,
int  urx,
int  ury
 

Computes the sum of squared values over an image sub-window.

Parameters:
image input image.
llx Lower left x position (FITS convention)
lly Lower left y position (FITS convention)
urx Upper right x position (FITS convention)
ury Upper right y position (FITS convention)
Returns:
the square flux
See also:
cpl_image_get_min_window()

double cpl_image_get_stdev const cpl_image *  image  ) 
 

computes pixel standard deviation over an image.

Parameters:
image input image.
Returns:
the standard deviation value
See also:
cpl_image_get_min()

double cpl_image_get_stdev_window const cpl_image *  image,
int  llx,
int  lly,
int  urx,
int  ury
 

computes pixel standard deviation over an image sub-window.

Parameters:
image input image.
llx Lower left x position (FITS convention)
lly Lower left y position (FITS convention)
urx Upper right x position (FITS convention)
ury Upper right y position (FITS convention)
Returns:
the standard deviation value
See also:
cpl_image_get_min_window()


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