添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
Functions 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_error_code cpl_image_accept (cpl_image *im, cpl_size x, cpl_size y)  Set a pixel as good in an image.
cpl_error_code cpl_image_accept_all (cpl_image *self)  Set all pixels in the image as good.
cpl_error_code cpl_image_add (cpl_image *im1, const cpl_image *im2)  Add two images, store the result in the first image.
cpl_image * cpl_image_add_create (const cpl_image *image1, const cpl_image *image2)  Add two images.
cpl_error_code cpl_image_add_scalar (cpl_image *self, double scalar)  Elementwise addition of a scalar to an 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_error_code cpl_image_and (cpl_image *self, const cpl_image *first, const cpl_image *second)  The bit-wise and of two images with integer pixels.
cpl_error_code cpl_image_and_scalar (cpl_image *self, const cpl_image *first, cpl_bitmask second)  The bit-wise and of a scalar and an image with integer pixels.
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_cast (const cpl_image *self, cpl_type type)  Convert a cpl_image to a given type.
cpl_image * cpl_image_collapse_create (const cpl_image *self, int direction)  Collapse an image along its rows or columns.
cpl_image * cpl_image_collapse_median_create (const cpl_image *self, int direction, cpl_size drop_ll, cpl_size drop_ur)  Collapse an image along its rows or columns, with filtering.
cpl_image * cpl_image_collapse_window_create (const cpl_image *self, cpl_size llx, cpl_size lly, cpl_size urx, cpl_size ury, int direction)  Collapse an image region along its rows or columns.
cpl_error_code cpl_image_conjugate (cpl_image *self, const cpl_image *other)  Complex conjugate the pixels in a complex image.
cpl_error_code cpl_image_copy (cpl_image *im1, const cpl_image *im2, cpl_size xpos, cpl_size ypos)  Copy one image into another.
cpl_size cpl_image_count_rejected (const cpl_image *im)  Count the number of bad pixels declared in an image.
void cpl_image_delete (cpl_image *d)  Free memory associated to an cpl_image object.
cpl_error_code cpl_image_divide (cpl_image *im1, const cpl_image *im2)  Divide two images, store the result in the first image.
cpl_image * cpl_image_divide_create (const cpl_image *image1, const cpl_image *image2)  Divide two images.
cpl_error_code cpl_image_divide_scalar (cpl_image *self, double scalar)  Elementwise division of an image with a scalar.
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_error_code cpl_image_dump_structure (const cpl_image *self, FILE *stream)  Dump structural information of a CPL image.
cpl_error_code cpl_image_dump_window (const cpl_image *self, cpl_size llx, cpl_size lly, cpl_size urx, cpl_size ury, FILE *stream)  Dump pixel values in a CPL image.
cpl_image * cpl_image_duplicate (const cpl_image *src)  Copy an image.
cpl_error_code cpl_image_exponential (cpl_image *self, double base)  Compute the elementwise exponential of the 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_extract (const cpl_image *in, cpl_size llx, cpl_size lly, cpl_size urx, cpl_size ury)  Extract a rectangular zone from an image into another image.
cpl_image * cpl_image_extract_subsample (const cpl_image *image, cpl_size xstep, cpl_size ystep)  Sub-sample an image.
cpl_error_code cpl_image_fft (cpl_image *img_real, cpl_image *img_imag, unsigned mode)  Fast Fourier Transform a square, power-of-two sized image.
cpl_error_code cpl_image_fill_abs_arg (cpl_image *im_abs, cpl_image *im_arg, const cpl_image *self)  Split a complex image into its absolute and argument part(s)
cpl_error_code cpl_image_fill_gaussian (cpl_image *ima, double xcen, double ycen, double norm, double sig_x, double sig_y)  Generate an image from a 2d gaussian function.
cpl_error_code cpl_image_fill_jacobian (cpl_image *out, const cpl_image *deltax, const cpl_image *deltay)  Compute area change ratio for a transformation map.
cpl_error_code cpl_image_fill_jacobian_polynomial (cpl_image *out, const cpl_polynomial *poly_x, const cpl_polynomial *poly_y)  Compute area change ratio for a 2D polynomial transformation.
cpl_error_code cpl_image_fill_noise_uniform (cpl_image *ima, double min_pix, double max_pix)  Generate an image with uniform random noise distribution.
cpl_error_code cpl_image_fill_polynomial (cpl_image *ima, const cpl_polynomial *poly, double startx, double stepx, double starty, double stepy)  Generate an image from a 2d polynomial function.
cpl_error_code cpl_image_fill_re_im (cpl_image *im_real, cpl_image *im_imag, const cpl_image *self)  Split a complex image into its real and/or imaginary part(s)
cpl_error_code cpl_image_fill_rejected (cpl_image *im, double a)  Set the bad pixels in an image to a fixed value.
cpl_image * cpl_image_fill_test_create ( cpl_size nx, cpl_size ny)  Generate a test image with pixel type CPL_TYPE_DOUBLE.
cpl_error_code cpl_image_fill_window (cpl_image *self, cpl_size llx, cpl_size lly, cpl_size urx, cpl_size ury, double value)  Fill an image window with a constant.
cpl_error_code cpl_image_filter (cpl_image *self, const cpl_image *other, const cpl_matrix *kernel, cpl_filter_mode filter, cpl_border_mode border)  Filter an image using a floating-point kernel.
cpl_image * cpl_image_filter_linear (const cpl_image *in, const cpl_matrix *ker)  Compute a linear filtering.
cpl_error_code cpl_image_filter_mask (cpl_image *self, const cpl_image *other, const cpl_mask *kernel, cpl_filter_mode filter, cpl_border_mode border)  Filter an image using a binary kernel.
cpl_image * cpl_image_filter_median (const cpl_image *in, const cpl_matrix *ker)  Apply a spatial median filter to an image.
cpl_image * cpl_image_filter_morpho (const cpl_image *in, const cpl_matrix *ker)  Filter an image in spatial domain with a morpho kernel.
cpl_image * cpl_image_filter_stdev (const cpl_image *in, const cpl_matrix *ker)  Standard deviation filter.
cpl_error_code cpl_image_fit_gaussian (const cpl_image *im, cpl_size xpos, cpl_size ypos, cpl_size 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_flip (cpl_image *im, int angle)  Flip an image on a given mirror line.
double cpl_image_get (const cpl_image *image, cpl_size xpos, cpl_size ypos, int *pis_rejected)  Get the value of a pixel at a given position.
double cpl_image_get_absflux (const cpl_image *image)  Computes the sum of absolute values over an image.
double cpl_image_get_absflux_window (const cpl_image *image, cpl_size llx, cpl_size lly, cpl_size urx, cpl_size ury)  Computes the sum of absolute values over an image sub-window.
cpl_mask * cpl_image_get_bpm (cpl_image *img)  Gets the bad pixels map.
const cpl_mask * cpl_image_get_bpm_const (const cpl_image *img)  Gets the bad pixels map.
double cpl_image_get_centroid_x (const cpl_image *image)  Computes the x centroid value over the whole image.
double cpl_image_get_centroid_x_window (const cpl_image *image, cpl_size llx, cpl_size lly, cpl_size urx, cpl_size ury)  Computes the x centroid value over an image sub-window.
double cpl_image_get_centroid_y (const cpl_image *image)  Computes the y centroid value over the whole image.
double cpl_image_get_centroid_y_window (const cpl_image *image, cpl_size llx, cpl_size lly, cpl_size urx, cpl_size ury)  Computes the y centroid value over an image sub-window.
double complex cpl_image_get_complex (const cpl_image *image, cpl_size xpos, cpl_size ypos, int *pis_rejected)  Get the value of a complex pixel at a given position.
void * cpl_image_get_data (cpl_image *img)  Gets the pixel data.
const void * cpl_image_get_data_const (const cpl_image *img)  Gets the pixel data.
double * cpl_image_get_data_double (cpl_image *img)  Get the data as a double array.
double complex * cpl_image_get_data_double_complex (cpl_image *img)  Get the data as a double complex array.
const double complex * cpl_image_get_data_double_complex_const (const cpl_image *img)  Get the data as a double complex array.
const double * cpl_image_get_data_double_const (const cpl_image *img)  Get the data as a double array.
float * cpl_image_get_data_float (cpl_image *img)  Get the data as a float array.
float complex * cpl_image_get_data_float_complex (cpl_image *img)  Get the data as a float complex array.
const float complex * cpl_image_get_data_float_complex_const (const cpl_image *img)  Get the data as a float complex array.
const float * cpl_image_get_data_float_const (const cpl_image *img)  Get the data as a float array.
int * cpl_image_get_data_int (cpl_image *img)  Get the data as a integer array.
const int * cpl_image_get_data_int_const (const cpl_image *img)  Get the data as a integer array.
double cpl_image_get_flux (const cpl_image *image)  Computes the sum of pixel values over an image.
double cpl_image_get_flux_window (const cpl_image *image, cpl_size llx, cpl_size lly, cpl_size urx, cpl_size ury)  Computes the sum of pixel values over an image sub-window.
cpl_error_code cpl_image_get_fwhm (const cpl_image *in, cpl_size xpos, cpl_size ypos, double *fwhm_x, double *fwhm_y)  Compute FWHM values in x and y for an object.
double cpl_image_get_interpolated (const cpl_image *source, double xpos, double ypos, const cpl_vector *xprofile, double xradius, const cpl_vector *yprofile, double yradius, double *pconfid)  Interpolate a pixel from its neigbors.
double cpl_image_get_mad (const cpl_image *image, double *sigma)  Computes median and median absolute deviation (MAD) on an image.
double cpl_image_get_mad_window (const cpl_image *image, cpl_size llx, cpl_size lly, cpl_size urx, cpl_size ury, double *sigma)  Computes median and median absolute deviation (MAD) on an image window.
double cpl_image_get_max (const cpl_image *image)  computes maximum pixel value over an image.
double cpl_image_get_max_window (const cpl_image *image, cpl_size llx, cpl_size lly, cpl_size urx, cpl_size ury)  computes maximum pixel value over an image sub-window.
cpl_error_code cpl_image_get_maxpos (const cpl_image *image, cpl_size *px, cpl_size *py)  Computes maximum pixel value and position over an image.
cpl_error_code cpl_image_get_maxpos_window (const cpl_image *image, cpl_size llx, cpl_size lly, cpl_size urx, cpl_size ury, cpl_size *px, cpl_size *py)  Computes maximum pixel value and position 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_mean_window (const cpl_image *image, cpl_size llx, cpl_size lly, cpl_size urx, cpl_size ury)  computes mean 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_median_dev (const cpl_image *image, double *sigma)  Computes median and mean absolute median deviation on an image window.
double cpl_image_get_median_dev_window (const cpl_image *image, cpl_size llx, cpl_size lly, cpl_size urx, cpl_size ury, double *sigma)  Computes median and mean absolute median deviation on an image window.
double cpl_image_get_median_window (const cpl_image *image, cpl_size llx, cpl_size lly, cpl_size urx, cpl_size ury)  computes median 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_min_window (const cpl_image *image, cpl_size llx, cpl_size lly, cpl_size urx, cpl_size ury)  computes minimum pixel value over an image sub-window.
cpl_error_code cpl_image_get_minpos (const cpl_image *image, cpl_size *px, cpl_size *py)  Computes minimum pixel value and position over an image.
cpl_error_code cpl_image_get_minpos_window (const cpl_image *image, cpl_size llx, cpl_size lly, cpl_size urx, cpl_size ury, cpl_size *px, cpl_size *py)  Computes minimum pixel value and position over an image sub window.
cpl_size cpl_image_get_size_x (const cpl_image *img)  Get the image x size.
cpl_size cpl_image_get_size_y (const cpl_image *img)  Get the image y size.
double cpl_image_get_sqflux (const cpl_image *image)  Computes the sum of squared values over an image.
double cpl_image_get_sqflux_window (const cpl_image *image, cpl_size llx, cpl_size lly, cpl_size urx, cpl_size ury)  Computes the sum of squared values 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_stdev_window (const cpl_image *image, cpl_size llx, cpl_size lly, cpl_size urx, cpl_size ury)  computes pixel standard deviation over an image sub-window.
cpl_type cpl_image_get_type (const cpl_image *img)  Get the image type.
cpl_error_code cpl_image_hypot (cpl_image *self, const cpl_image *first, const cpl_image *second)  The pixel-wise Euclidean distance function of the images.
cpl_bivector * cpl_image_iqe (const cpl_image *in, cpl_size llx, cpl_size lly, cpl_size urx, cpl_size ury)  Compute an image quality estimation for an object.
int cpl_image_is_rejected (const cpl_image *im, cpl_size x, cpl_size y)  Test if a pixel is good or bad.
cpl_image * cpl_image_labelise_mask_create (const cpl_mask *in, cpl_size *nbobjs)  Labelise a mask to differentiate different objects.
cpl_image * cpl_image_load (const char *filename, cpl_type im_type, cpl_size pnum, cpl_size xtnum)  Load an image from a FITS file.
cpl_image * cpl_image_load_window (const char *filename, cpl_type im_type, cpl_size pnum, cpl_size xtnum, cpl_size llx, cpl_size lly, cpl_size urx, cpl_size ury)  Load an image from a FITS file.
cpl_error_code cpl_image_logarithm (cpl_image *self, double base)  Compute the elementwise logarithm of the image.
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_error_code cpl_image_move (cpl_image *im, cpl_size nb_cut, const cpl_size *new_pos)  Permute tiles in an 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_image * cpl_image_multiply_create (const cpl_image *image1, const cpl_image *image2)  Multiply two images.
cpl_error_code cpl_image_multiply_scalar (cpl_image *self, double scalar)  Elementwise multiplication of an image with a scalar.
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_new ( cpl_size nx, cpl_size ny, cpl_type type)  Allocate an image structure and pixel buffer for a image.
cpl_image * cpl_image_new_from_mask (const cpl_mask *mask)  Create an int image from a mask.
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_error_code cpl_image_not (cpl_image *self, const cpl_image *first)  The bit-wise complement (not) of an image with integer pixels.
cpl_error_code cpl_image_or (cpl_image *self, const cpl_image *first, const cpl_image *second)  The bit-wise or of two images with integer pixels.
cpl_error_code cpl_image_or_scalar (cpl_image *self, const cpl_image *first, cpl_bitmask second)  The bit-wise or of a scalar and an image with integer pixels.
cpl_error_code cpl_image_power (cpl_image *self, double exponent)  Compute the elementwise power of the 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_image * cpl_image_rebin (const cpl_image *image, cpl_size xstart, cpl_size ystart, cpl_size xstep, cpl_size ystep)  Rebin an image.
cpl_error_code cpl_image_reject (cpl_image *im, cpl_size x, cpl_size y)  Set a pixel as bad in an image.
cpl_error_code cpl_image_reject_from_mask (cpl_image *im, const cpl_mask *map)  Set the bad pixels in an image as defined in a mask.
cpl_error_code cpl_image_reject_value (cpl_image *self, cpl_value mode)  Reject pixels with the specified special value(s)
cpl_error_code cpl_image_save (const cpl_image *self, const char *filename, cpl_type type, const cpl_propertylist *plist, unsigned mode)  Save an image to a FITS file.
cpl_error_code cpl_image_set (cpl_image *image, cpl_size xpos, cpl_size ypos, double value)  Set the pixel at the given position to the given value.
cpl_mask * cpl_image_set_bpm (cpl_image *self, cpl_mask *bpm)  Replace the bad pixel map of the image.
cpl_error_code cpl_image_set_complex (cpl_image *image, cpl_size xpos, cpl_size ypos, double complex value)  Set the pixel at the given position to the given complex value.
cpl_error_code cpl_image_shift (cpl_image *self, cpl_size dx, cpl_size dy)  Shift an image by integer offsets.
cpl_error_code cpl_image_subtract (cpl_image *im1, const cpl_image *im2)  Subtract two images, store the result in the first image.
cpl_image * cpl_image_subtract_create (const cpl_image *image1, const cpl_image *image2)  Subtract two images.
cpl_error_code cpl_image_subtract_scalar (cpl_image *self, double scalar)  Elementwise subtraction of a scalar from 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_error_code cpl_image_threshold (cpl_image *image_in, double lo_cut, double hi_cut, double assign_lo_cut, double assign_hi_cut)  Threshold an image to a given interval.
cpl_error_code cpl_image_turn (cpl_image *self, int rot)  Rotate an image by a multiple of 90 degrees clockwise.
cpl_mask * cpl_image_unset_bpm (cpl_image *self)  Remove the bad pixel map from the image.
void * cpl_image_unwrap (cpl_image *d)  Free memory associated to an cpl_image object, but the pixel buffer.
cpl_error_code cpl_image_warp (cpl_image *out, const cpl_image *in, const cpl_image *deltax, const cpl_image *deltay, const cpl_vector *xprofile, double xradius, const cpl_vector *yprofile, double yradius)  Warp an image.
cpl_error_code cpl_image_warp_polynomial (cpl_image *out, const cpl_image *in, const cpl_polynomial *poly_x, const cpl_polynomial *poly_y, const cpl_vector *xprofile, double xradius, const cpl_vector *yprofile, double yradius)  Warp an image according to a 2D polynomial transformation.
cpl_image * cpl_image_wrap_double ( cpl_size nx, cpl_size ny, double *pixels)  Create a double image using an existing pixel buffer.
cpl_image * cpl_image_wrap_double_complex ( cpl_size nx, cpl_size ny, double complex *pixels)  Create a double complex image using an existing pixel buffer.
cpl_image * cpl_image_wrap_float ( cpl_size nx, cpl_size ny, float *pixels)  Create a float image using an existing pixel buffer.
cpl_image * cpl_image_wrap_float_complex ( cpl_size nx, cpl_size ny, float complex *pixels)  Create a float complex image using an existing pixel buffer.
cpl_image * cpl_image_wrap_int ( cpl_size nx, cpl_size ny, int *pixels)  Create an integer image using an existing pixel buffer.
cpl_error_code cpl_image_xor (cpl_image *self, const cpl_image *first, const cpl_image *second)  The bit-wise xor of two images with integer pixels.
cpl_error_code cpl_image_xor_scalar (cpl_image *self, const cpl_image *first, cpl_bitmask second)  The bit-wise xor of a scalar and an image with integer pixels.
cpl_vector * cpl_vector_new_from_image_column (const cpl_image *image_in, cpl_size pos)  Extract a column from an image.
cpl_vector * cpl_vector_new_from_image_row (const cpl_image *image_in, cpl_size pos)  Extract a row from an image.

Detailed Description

This module provides functions to create, use, and destroy a cpl_image . A cpl_image is a 2-dimensional data structure with a pixel type (one of CPL_TYPE_INT , CPL_TYPE_FLOAT , CPL_TYPE_DOUBLE , CPL_TYPE_FLOAT_COMPLEX or CPL_TYPE_DOUBLE_COMPLEX ) and an optional bad pixel map.

The pixel indexing follows the FITS convention in the sense that the lower left pixel in a CPL image has index (1, 1). The pixel buffer is stored row-wise so for optimum performance any pixel-wise access should be done likewise.

Functionality include: FITS I/O Image arithmetic, casting, extraction, thresholding, filtering, resampling Bad pixel handling Image statistics Generation of test images Special functions, such as the image quality estimator

Synopsis:
#include "cpl_image.h"

Usage: define the following preprocessor symbols as needed, then include this file

Typedef Documentation

cpl_value

The special values that can be rejected They are a bit-field and can be combined with bitwise or.

Enumerator CPL_VALUE_NAN

Not-a-Number (NaN)

CPL_VALUE_PLUSINF

Plus Infinity

CPL_VALUE_MINUSINF

Minus Infinity

CPL_VALUE_ZERO

Zero

CPL_VALUE_INF

Infinity with any sign

CPL_VALUE_NOTFINITE

NaN or infinity with any sign

Returns
CPL_ERROR_NONE or the relevant the _cpl_error_code_ on error

Set each pixel to its absolute value.

Possible _cpl_error_code_ set in this function:

Possible _cpl_error_code_ set in this function: