Functions | |
void | cpl_apertures_delete (cpl_apertures *apert) |
Destructor for cpl_apertures. | |
void | cpl_apertures_dump (const cpl_apertures *aperts, FILE *fp) |
Dump a cpl_apertures to an opened file pointer. | |
cpl_apertures * | cpl_apertures_extract (const cpl_image *in, const cpl_vector *sigmas, int *pisigma) |
Simple detection of apertures in an image. | |
cpl_apertures * | cpl_apertures_extract_sigma (const cpl_image *in, double sigma) |
Simple apertures detection in an image using a provided sigma. | |
cpl_apertures * | cpl_apertures_extract_window (const cpl_image *in, const cpl_vector *sigmas, int llx, int lly, int urx, int ury, int *pisigma) |
Simple detection of apertures in an image window. | |
int | cpl_apertures_get_bottom (const cpl_apertures *in, int ind) |
Accessor to get the bottom y position of an aperture. | |
int | cpl_apertures_get_bottom_x (const cpl_apertures *in, int ind) |
Accessor to get the bottom x position of an aperture. | |
double | cpl_apertures_get_centroid_x (const cpl_apertures *in, int ind) |
Accessor to get the x centroid of an aperture. | |
double | cpl_apertures_get_centroid_y (const cpl_apertures *in, int ind) |
Accessor to get the y centroid of an aperture. | |
double | cpl_apertures_get_flux (const cpl_apertures *in, int ind) |
Accessor to get the flux of an aperture. | |
int | cpl_apertures_get_left (const cpl_apertures *in, int ind) |
Accessor to get the left x position of an aperture. | |
int | cpl_apertures_get_left_y (const cpl_apertures *in, int ind) |
Accessor to get the left y position of an aperture. | |
double | cpl_apertures_get_max (const cpl_apertures *in, int ind) |
Accessor to get the maximum value of an aperture. | |
double | cpl_apertures_get_max_x (const cpl_apertures *in, int ind) |
Accessor to get the x position of an aperture. | |
double | cpl_apertures_get_max_y (const cpl_apertures *in, int ind) |
Accessor to get the y position of an aperture. | |
double | cpl_apertures_get_mean (const cpl_apertures *in, int ind) |
Accessor to get the mean value of an aperture. | |
double | cpl_apertures_get_median (const cpl_apertures *in, int ind) |
Accessor to get the median value of an aperture. | |
double | cpl_apertures_get_min (const cpl_apertures *in, int ind) |
Accessor to get the minimum value of an aperture. | |
int | cpl_apertures_get_npix (const cpl_apertures *in, int ind) |
Accessor to get the number of pixels of an aperture. | |
int | cpl_apertures_get_right (const cpl_apertures *in, int ind) |
Accessor to get the right x position of an aperture. | |
int | cpl_apertures_get_right_y (const cpl_apertures *in, int ind) |
Accessor to get the right y position of an aperture. | |
int | cpl_apertures_get_size (const cpl_apertures *in) |
Accessor to get the number of apertures. | |
double | cpl_apertures_get_stdev (const cpl_apertures *in, int ind) |
Accessor to get the std dev. value of an aperture. | |
int | cpl_apertures_get_top (const cpl_apertures *in, int ind) |
Accessor to get the top y position of an aperture. | |
int | cpl_apertures_get_top_x (const cpl_apertures *in, int ind) |
Accessor to get the top x position of an aperture. | |
cpl_apertures * | cpl_apertures_new_from_image (const cpl_image *in, const cpl_image *lab) |
Compute statistics on selected apertures. | |
cpl_error_code | cpl_apertures_sort_by_flux (cpl_apertures *in) |
Sort by decreasing aperture flux. | |
cpl_error_code | cpl_apertures_sort_by_max (cpl_apertures *in) |
Sort by decreasing aperture peak value. | |
cpl_error_code | cpl_apertures_sort_by_npix (cpl_apertures *in) |
Sort by decreasing aperture size. |
This module provides functions to handle cpl_apertures.
void cpl_apertures_delete | ( | cpl_apertures * | apert | ) |
Destructor for cpl_apertures.
apert | Object to delete. |
NULL
, nothing is done and no error is set.
void cpl_apertures_dump | ( | const cpl_apertures * | aperts, | |
FILE * | fp | |||
) |
Dump a cpl_apertures to an opened file pointer.
aperts | cpl_apertures to dump | |
fp | Opened file pointer, ready to receive data |
cpl_apertures* cpl_apertures_extract | ( | const cpl_image * | in, | |
const cpl_vector * | sigmas, | |||
int * | pisigma | |||
) |
Simple detection of apertures in an image.
in | Input image | |
sigmas | Positive, decreasing sigmas to apply | |
pisigma | Index of the sigma that was used or unchanged on error |
Possible _cpl_error_code_ set in this function:
cpl_apertures* cpl_apertures_extract_sigma | ( | const cpl_image * | in, | |
double | sigma | |||
) |
Simple apertures detection in an image using a provided sigma.
in | Input image | |
sigma | detection level |
The input image type can be CPL_TYPE_DOUBLE, CPL_TYPE_FLOAT or CPL_TYPE_INT.
Possible _cpl_error_code_ set in this function:
cpl_apertures* cpl_apertures_extract_window | ( | const cpl_image * | in, | |
const cpl_vector * | sigmas, | |||
int | llx, | |||
int | lly, | |||
int | urx, | |||
int | ury, | |||
int * | pisigma | |||
) |
Simple detection of apertures in an image window.
in | Input image | |
sigmas | Positive, decreasing sigmas to apply | |
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) | |
pisigma | Index of the sigma that was used or undefined on error |
int cpl_apertures_get_bottom | ( | const cpl_apertures * | in, | |
int | ind | |||
) |
Accessor to get the bottom y position of an aperture.
in | a cpl_apertures object | |
ind | the aperture index (1 for the first one) |
int cpl_apertures_get_bottom_x | ( | const cpl_apertures * | in, | |
int | ind | |||
) |
Accessor to get the bottom x position of an aperture.
in | a cpl_apertures object | |
ind | the aperture index (1 for the first one) |
double cpl_apertures_get_centroid_x | ( | const cpl_apertures * | in, | |
int | ind | |||
) |
Accessor to get the x centroid of an aperture.
in | a cpl_apertures object | |
ind | the aperture index (1 for the first one) |
Possible _cpl_error_code_ set in this function:
double cpl_apertures_get_centroid_y | ( | const cpl_apertures * | in, | |
int | ind | |||
) |
Accessor to get the y centroid of an aperture.
in | a cpl_apertures object | |
ind | the aperture index (1 for the first one) |
Possible _cpl_error_code_ set in this function:
double cpl_apertures_get_flux | ( | const cpl_apertures * | in, | |
int | ind | |||
) |
Accessor to get the flux of an aperture.
in | a cpl_apertures object | |
ind | the aperture index (1 for the first one) |
int cpl_apertures_get_left | ( | const cpl_apertures * | in, | |
int | ind | |||
) |
Accessor to get the left x position of an aperture.
in | a cpl_apertures object | |
ind | the aperture index (1 for the first one) |
int cpl_apertures_get_left_y | ( | const cpl_apertures * | in, | |
int | ind | |||
) |
Accessor to get the left y position of an aperture.
in | a cpl_apertures object | |
ind | the aperture index (1 for the first one) |
double cpl_apertures_get_max | ( | const cpl_apertures * | in, | |
int | ind | |||
) |
Accessor to get the maximum value of an aperture.
in | a cpl_apertures object | |
ind | the aperture index (1 for the first one) |
Possible _cpl_error_code_ set in this function:
double cpl_apertures_get_max_x | ( | const cpl_apertures * | in, | |
int | ind | |||
) |
Accessor to get the x position of an aperture.
in | a cpl_apertures object | |
ind | the aperture index (1 for the first one) |
Possible _cpl_error_code_ set in this function:
double cpl_apertures_get_max_y | ( | const cpl_apertures * | in, | |
int | ind | |||
) |
Accessor to get the y position of an aperture.
in | a cpl_apertures object | |
ind | the aperture index (1 for the first one) |
double cpl_apertures_get_mean | ( | const cpl_apertures * | in, | |
int | ind | |||
) |
Accessor to get the mean value of an aperture.
in | a cpl_apertures object | |
ind | the aperture index (1 for the first one) |
Possible _cpl_error_code_ set in this function:
double cpl_apertures_get_median | ( | const cpl_apertures * | in, | |
int | ind | |||
) |
Accessor to get the median value of an aperture.
in | a cpl_apertures object | |
ind | the aperture index (1 for the first one) |
double cpl_apertures_get_min | ( | const cpl_apertures * | in, | |
int | ind | |||
) |
Accessor to get the minimum value of an aperture.
in | a cpl_apertures object | |
ind | the aperture index (1 for the first one) |
Possible _cpl_error_code_ set in this function:
int cpl_apertures_get_npix | ( | const cpl_apertures * | in, | |
int | ind | |||
) |
Accessor to get the number of pixels of an aperture.
in | a cpl_apertures object | |
ind | the aperture index (1 for the first one) |
int cpl_apertures_get_right | ( | const cpl_apertures * | in, | |
int | ind | |||
) |
Accessor to get the right x position of an aperture.
in | a cpl_apertures object | |
ind | the aperture index (1 for the first one) |
int cpl_apertures_get_right_y | ( | const cpl_apertures * | in, | |
int | ind | |||
) |
Accessor to get the right y position of an aperture.
in | a cpl_apertures object | |
ind | the aperture index (1 for the first one) |
int cpl_apertures_get_size | ( | const cpl_apertures * | in | ) |
Accessor to get the number of apertures.
in | a cpl_apertures object |
double cpl_apertures_get_stdev | ( | const cpl_apertures * | in, | |
int | ind | |||
) |
Accessor to get the std dev. value of an aperture.
in | a cpl_apertures object | |
ind | the aperture index (1 for the first one) |
int cpl_apertures_get_top | ( | const cpl_apertures * | in, | |
int | ind | |||
) |
Accessor to get the top y position of an aperture.
in | a cpl_apertures object | |
ind | the aperture index (1 for the first one) |
int cpl_apertures_get_top_x | ( | const cpl_apertures * | in, | |
int | ind | |||
) |
Accessor to get the top x position of an aperture.
in | a cpl_apertures object | |
ind | the aperture index (1 for the first one) |
cpl_apertures* cpl_apertures_new_from_image | ( | const cpl_image * | in, | |
const cpl_image * | lab | |||
) |
Compute statistics on selected apertures.
in | Reference image. | |
lab | labelized image (type CPL_TYPE_INT) |
The labelized image must contain at least one pixel for each successive values from 1 to its maximum value.
For the centroiding computation of an aperture, if some pixels have values lower or equal to 0, all the values of the aperture are locally shifted such as the minimum value of the aperture has a value of epsilon. The centroid is then computed on these positive values. In principle, centroid should always be computed on positive values, this is done to avoid raising an error in case the caller of the function wants to use it on negative values images without caring about the centroid results. In such cases, the centroid result would be meaningful, but slightly depend on the hardcoded value chosen for epsilon (1e-8).
Possible _cpl_error_code_ set in this function:
cpl_error_code cpl_apertures_sort_by_flux | ( | cpl_apertures * | in | ) |
Sort by decreasing aperture flux.
in | Apertures to sort (MODIFIED) |
cpl_error_code cpl_apertures_sort_by_max | ( | cpl_apertures * | in | ) |
Sort by decreasing aperture peak value.
in | Apertures to sort (MODIFIED) |
cpl_error_code cpl_apertures_sort_by_npix | ( | cpl_apertures * | in | ) |
Sort by decreasing aperture size.
in | Apertures to sort (MODIFIED) |