Functions | |
| cpl_image * | cpl_image_add_create (const cpl_image *image1, const cpl_image *image2) |
| Add two images. | |
| cpl_image * | cpl_image_subtract_create (const cpl_image *image1, const cpl_image *image2) |
| Subtract two images. | |
| cpl_image * | cpl_image_multiply_create (const cpl_image *image1, const cpl_image *image2) |
| Multiply two images. | |
| cpl_image * | cpl_image_divide_create (const cpl_image *image1, const cpl_image *image2) |
| Divide two images. | |
| cpl_error_code | cpl_image_add (cpl_image *im1, const cpl_image *im2) |
| Add two images, store the result in the first image. | |
| cpl_error_code | cpl_image_subtract (cpl_image *im1, const cpl_image *im2) |
| Subtract two images, store the result in the first image. | |
| cpl_error_code | cpl_image_multiply (cpl_image *im1, const cpl_image *im2) |
| Multiply two images, store the result in the first image. | |
| cpl_error_code | cpl_image_divide (cpl_image *im1, const cpl_image *im2) |
| Divide two images, store the result in the first image. | |
| cpl_error_code | cpl_image_add_scalar (cpl_image *image, double addend) |
| Elementwise addition of a scalar to an image. | |
| cpl_error_code | cpl_image_subtract_scalar (cpl_image *image, double subtrahend) |
| Elementwise subtraction of a scalar from an image. | |
| cpl_error_code | cpl_image_multiply_scalar (cpl_image *image, double factor) |
| Elementwise multiplication of an image with a scalar. | |
| cpl_error_code | cpl_image_divide_scalar (cpl_image *image, double divisor) |
| Elementwise division of an image with a scalar. | |
| cpl_error_code | cpl_image_logarithm (cpl_image *image, double base) |
| Compute the elementwise logarithm of the image. | |
| cpl_error_code | cpl_image_exponential (cpl_image *image, double base) |
| Compute the elementwise exponential of the image. | |
| cpl_error_code | cpl_image_power (cpl_image *image, double exponent) |
| Compute the elementwise power of the image. | |
| cpl_error_code | cpl_image_normalise (cpl_image *image, cpl_norm mode) |
| Normalise pixels in an image. | |
| cpl_image * | cpl_image_normalise_create (const cpl_image *image_in, cpl_norm mode) |
| Create a new normalised image from an existing image. | |
| cpl_image * | cpl_image_add_scalar_create (const cpl_image *image, double addend) |
| Create a new image by elementwise addition of a scalar to an image. | |
| cpl_image * | cpl_image_subtract_scalar_create (const cpl_image *image, double subtrahend) |
| Create an image by elementwise subtraction of a scalar from an image. | |
| cpl_image * | cpl_image_multiply_scalar_create (const cpl_image *image, double factor) |
| Create a new image by multiplication of a scalar and an image. | |
| cpl_image * | cpl_image_divide_scalar_create (const cpl_image *image, double divisor) |
| Create a new image by elementwise division of an image with a scalar. | |
| cpl_image * | cpl_image_logarithm_create (const cpl_image *image, double base) |
| Create a new image by taking the elementwise logarithm of an image. | |
| cpl_image * | cpl_image_exponential_create (const cpl_image *image, double base) |
| Create a new image by elementwise exponentiation of an image. | |
| cpl_image * | cpl_image_power_create (const cpl_image *image, double exponent) |
| Create a new image by elementwise raising of an image to a power. | |
| cpl_error_code | cpl_image_threshold (cpl_image *image_in, double lo_cut, double hi_cut, double assign_lo_cut_in, double assign_hi_cut_in) |
| Threshold an image to a given interval. | |
| cpl_error_code | cpl_image_abs (cpl_image *image) |
| Take the absolute value of an image. | |
| cpl_image * | cpl_image_abs_create (const cpl_image *image_in) |
| Take the absolute value of an image. | |
| cpl_image * | cpl_image_average_create (const cpl_image *image_1, const cpl_image *image_2) |
| Build the average of two images. | |
| cpl_image * | cpl_image_collapse_window_create (const cpl_image *in, int llx, int lly, int urx, int ury, int direction) |
| Collapse an image region along its rows or columns. | |
| cpl_image * | cpl_image_collapse_create (const cpl_image *inimage, int direction) |
| Collapse an image along its rows or columns. | |
| cpl_image * | cpl_image_collapse_median_create (const cpl_image *in, int direction, int discard_lo, int discard_hi) |
| Collapse an image along its rows and columns, with filtering. | |
| cpl_image * | cpl_image_extract (const cpl_image *image_in, int loleft_x, int loleft_y, int upright_x, int upright_y) |
| Extract a rectangular zone from an image into another image. | |
| cpl_vector * | cpl_vector_new_from_image_row (const cpl_image *image_in, int pos) |
| Extract a row from an image. | |
| cpl_vector * | cpl_vector_new_from_image_column (const cpl_image *image_in, int pos) |
| Extract a column from an image. | |
| cpl_error_code | cpl_image_turn (cpl_image *im, int rot) |
| Rotate an image by a multiple of 90 deg clockwise. | |
| cpl_error_code | cpl_image_shift (cpl_image *im, int x_shift, int y_shift) |
| Shift an image by integer offsets. | |
| cpl_error_code | cpl_image_copy (cpl_image *im1, const cpl_image *im2, int xpos, int ypos) |
| Copy one image into another. | |
| cpl_error_code | cpl_image_flip (cpl_image *im, int angle) |
| Flip an image on a given miror line. | |
| cpl_error_code | cpl_image_move (cpl_image *im, int nb_cut, const int *new_pos) |
| Reorganize the pixels in an image. | |
| cpl_error_code | cpl_image_fit_gaussian (const cpl_image *im, int xpos, int ypos, int size, double *norm, double *xcen, double *ycen, double *sig_x, double *sig_y, double *fwhm_x, double *fwhm_y) |
| Apply a gaussian fit on an image sub window. | |
| cpl_error_code | cpl_image_get_fwhm (const cpl_image *in, int xpos, int ypos, double *fwhm_x, double *fwhm_y) |
| Compute FWHM values in x and y for an object. | |
| cpl_error_code | cpl_image_fft (cpl_image *real, cpl_image *imaginary, unsigned mode) |
| Fast Fourier Transform an image. | |
#include "cpl_image_basic.h"
|
|
Take the absolute value of an image.
Possible _cpl_error_code_ set in this function:
|
|
|
Take the absolute value of an image.
|
|
||||||||||||
|
Add two images, store the result in the first image.
The bad pixels map of the first image becomes the union of the bad pixels maps of the input images. Possible _cpl_error_code_ set in this function:
|
|
||||||||||||
|
Add two images.
The bad pixels map of the result is the union of the bad pixels maps of the input images. Possible _cpl_error_code_ set in this function:
|
|
||||||||||||
|
Elementwise addition of a scalar to an image.
The operation is always performed in double precision, with a final cast of the result to the target image type. Images can be CPL_TYPE_INT, CPL_TYPE_FLOAT, CPL_TYPE_DOUBLE. Possible _cpl_error_code_ set in this function:
|
|
||||||||||||
|
Create a new image by elementwise addition of a scalar to an image.
|
|
||||||||||||
|
Build the average of two images.
Possible _cpl_error_code_ set in this function:
|
|
||||||||||||
|
Collapse an image along its rows or columns.
Collapse along y:
p7 p8 p9 Input image is a 3x3 image containing 9 pixels.
p4 p5 p6 The output is an image containing one row with
p1 p2 p3 3 pixels A, B, C, where:
----------
A B C A = p1+p4+p7
B = p2+p5+p8
C = p3+p6+p9
If p7 is a bad pixel, A = (p1+p4)*3/2.
If p1, p4, p7 are bad, A is flagged as bad.
Provide the collapsing direction as an int. Give 0 to collapse along y (sum of rows) and get an image with a single row in output, or give 1 to collapse along x (sym of columns) to get an image with a single column in output. Only the good pixels are collapsed. Images can be CPL_TYPE_INT, CPL_TYPE_FLOAT or CPL_TYPE_DOUBLE. The returned image must be deallocated using cpl_image_delete(). Possible _cpl_error_code_ set in this function:
|
|
||||||||||||||||||||
|
Collapse an image along its rows and columns, with filtering.
Possible _cpl_error_code_ set in this function:
|
|
||||||||||||||||||||||||||||
|
Collapse an image region along its rows or columns.
Possible _cpl_error_code_ set in this function:
|
|
||||||||||||||||||||
|
Copy one image into another.
The two input images must be of the same type, namely one of CPL_TYPE_INT, CPL_TYPE_FLOAT, CPL_TYPE_DOUBLE. Possible _cpl_error_code_ set in this function:
|
|
||||||||||||
|
Divide two images, store the result in the first image.
|
|
||||||||||||
|
Divide two images.
|
|
||||||||||||
|
Elementwise division of an image with a scalar.
Images can be CPL_TYPE_INT, CPL_TYPE_FLOAT, CPL_TYPE_DOUBLE. If divisor is zero, the image is not modified (and an error is returned). Possible _cpl_error_code_ set in this function:
|
|
||||||||||||
|
Create a new image by elementwise division of an image with a scalar.
|
|
||||||||||||
|
Compute the elementwise exponential of the image.
Images can be CPL_TYPE_INT, CPL_TYPE_FLOAT or CPL_TYPE_DOUBLE. If the base is zero all pixels must be positive and if the base is negative all pixels must be integer, otherwise a cpl_error_code is returned and the image is unmodified. Possible _cpl_error_code_ set in this function:
|
|
||||||||||||
|
Create a new image by elementwise exponentiation of an image.
|
|
||||||||||||||||||||||||
|
Extract a rectangular zone from an image into another image.
Coordinates must be provided in the FITS convention: lower left corner of the image is at (1,1), x increasing from left to right, y increasing from bottom to top. Images can be CPL_TYPE_INT, CPL_TYPE_FLOAT or CPL_TYPE_DOUBLE. The returned image must be deallocated using cpl_image_delete(). Possible _cpl_error_code_ set in this function:
|
|
||||||||||||||||
|
Fast Fourier Transform an image.
If the second passed image is NULL, the resulting imaginary part cannot be returned. This can be useful if the input is real and the output is known to also be real. But if the output has a significant imaginary part, you might want to pass a 0-valued image as the second parameter. Any rejected pixel us used as if it were a good pixel. The image must be square with a size that is a power of two. These are the supported FFT modes: CPL_FFT_DEFAULT: Default, forward FFT transform CPL_FFT_INVERSE: Inverse FFT transform CPL_FFT_UNNORMALIZED: Do not normalize (with N*N for N-by-N image) on inverse. Has no effect on forward transform. CPL_FFT_SWAP_HALVES: Swap the four quadrants of the result image. Possible _cpl_error_code_ set in this function:
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
|
Apply a gaussian fit on an image sub window.
f(x, y) = (norm/(2*pi*sig_x*sig_y)) * exp(-(x-xcen)^2/(2*sig_x^2)) * exp(-(y-ycen)^2/(2*sig_y^2)) fwhm_x and fwhm_y are derived from sig_x and sig_y like: fwhm = 2 * sqrt(2*ln(2)) * sigma Images can be CPL_TYPE_INT, CPL_TYPE_FLOAT or CPL_TYPE_DOUBLE. Possible _cpl_error_code_ set in this function:
|
|
||||||||||||
|
Flip an image on a given miror line.
angle can take one of the following values:
Images can be CPL_TYPE_INT, CPL_TYPE_FLOAT or CPL_TYPE_DOUBLE. Possible _cpl_error_code_ set in this function:
|
|
||||||||||||||||||||||||
|
Compute FWHM values in x and y for an object.
For the FWHM in x (resp. y) to be computed, the image size in the x (resp. y) direction should be at least of 5 pixels. If for any reason, one of the FHWMs cannot be computed, its returned value is -1.0, but an error is not necessarily raised. For example, if a 4 column image is passed, the fwhm_x would be -1.0, the fwhm_y would be correctly computed, and no error would be raised. Possible _cpl_error_code_ set in this function:
|
|
||||||||||||
|
Compute the elementwise logarithm of the image.
Images can be CPL_TYPE_INT, CPL_TYPE_FLOAT or CPL_TYPE_DOUBLE. The base and all the pixels must be positive and the base must be different from 1, or a cpl_error_code will be returned and the image will be left unmodified. Possible _cpl_error_code_ set in this function:
|
|
||||||||||||
|
Create a new image by taking the elementwise logarithm of an image.
|
|
||||||||||||||||
|
Reorganize the pixels in an image.
Images can be CPL_TYPE_INT, CPL_TYPE_FLOAT or CPL_TYPE_DOUBLE. The image x and y sizes have to be multiples of nb_cut.
Example:
16 17 18 6 5 4
13 14 15 3 2 1
10 11 12 ----> 12 11 10
7 8 9 9 8 7
4 5 6 18 17 16
1 2 3 15 14 13
image 3x6 cpl_image_move(image, 3, new_pos) ;
with new_pos = {9,8,7,6,5,4,3,2,1} ;
The bad pixels are moved accordingly. Possible _cpl_error_code_ set in this function:
|
|
||||||||||||
|
Multiply two images, store the result in the first image.
|
|
||||||||||||
|
Multiply two images.
|
|
||||||||||||
|
Elementwise multiplication of an image with a scalar.
|
|
||||||||||||
|
Create a new image by multiplication of a scalar and an image.
|
|
||||||||||||
|
Normalise pixels in an image.
Possible normalisations are:
Possible _cpl_error_code_ set in this function:
|
|
||||||||||||
|
Create a new normalised image from an existing image.
|
|
||||||||||||
|
Compute the elementwise power of the image.
Images can be CPL_TYPE_INT, CPL_TYPE_FLOAT or CPL_TYPE_DOUBLE. If the exponent is non-positive all pixels must be non-zero and if the exponent is non-integer all pixels must be non-negative, otherwise a cpl_error_code is returned and the image is unmodified. Possible _cpl_error_code_ set in this function:
|
|
||||||||||||
|
Create a new image by elementwise raising of an image to a power.
|
|
||||||||||||||||
|
Shift an image by integer offsets.
Images can be CPL_TYPE_INT, CPL_TYPE_FLOAT or CPL_TYPE_DOUBLE. Possible _cpl_error_code_ set in this function:
|
|
||||||||||||
|
Subtract two images, store the result in the first image.
|
|
||||||||||||
|
Subtract two images.
|
|
||||||||||||
|
Elementwise subtraction of a scalar from an image.
|
|
||||||||||||
|
Create an image by elementwise subtraction of a scalar from an image.
|
|
||||||||||||||||||||||||
|
Threshold an image to a given interval.
Possible _cpl_error_code_ set in this function:
|
|
||||||||||||
|
Rotate an image by a multiple of 90 deg clockwise.
Images can be CPL_TYPE_INT, CPL_TYPE_FLOAT or CPL_TYPE_DOUBLE. rot can take one of the following values:
Possible _cpl_error_code_ set in this function:
|
|
||||||||||||
|
Extract a column from an image.
The bad pixels map is not taken into account in this function. Possible _cpl_error_code_ set in this function:
|
|
||||||||||||
|
Extract a row from an image.
The bad pixels map is not taken into account in this function. Possible _cpl_error_code_ set in this function:
|
1.3.9.1