Main Page   Modules   Alphabetical List   Compound List   Compound Members  

Image generation functions


Functions

cpl_image * cpl_image_gen_noise_uniform_double (int nx, int ny, double min_pix, double max_pix)
 Generate an image with uniform random noise distribution. More...

cpl_image * cpl_image_gen_noise_uniform_float (int nx, int ny, double min_pix, double max_pix)
 Generate an image with uniform random noise distribution. More...

cpl_image * cpl_image_gen_gaussian_double (int nx, int ny, double centre_x, double centre_y, double sigma)
 Generate an image of a 2d gaussian function. More...

cpl_image * cpl_image_gen_gaussian_float (int nx, int ny, double centre_x, double centre_y, double sigma)
 Generate an image of a 2d gaussian function. More...

cpl_image * cpl_image_gen_test (int nx, int ny)
 Generate an image for testing purposes. More...


Detailed Description

This module provides functions to generate images.

These functions are mostly used to test the software. Gaussian images, or uniform noise images can be generated.

Synopsis:
   #include "cpl_image_gen.h"

Function Documentation

cpl_image* cpl_image_gen_gaussian_double int    nx,
int    ny,
double    centre_x,
double    centre_y,
double    sigma
 

Generate an image of a 2d gaussian function.

Parameters:
nx  x size of the generated image.
ny  y size of the generated image.
centre_x  x position of the gaussian centre.
centre_y  y position of the gaussian centre.
sigma  Sigma for the gaussian distribution.
Returns:
1 newly allocated image or NULL in error case
This function generates an image of a 2d gaussian. The gaussian is defined by the position of its centre, given in pixel coordinates inside the image with the FITS convention (x from 1 to nx, y from 1 to ny), and the value of sigma. The created image has to be deallocated with cpl_image_delete().

Possible _cpl_error_code_ set in this function:

  • CPL_ERROR_ILLEGAL_INPUT

cpl_image* cpl_image_gen_gaussian_float int    nx,
int    ny,
double    centre_x,
double    centre_y,
double    sigma
 

Generate an image of a 2d gaussian function.

Parameters:
nx  x size of the generated image.
ny  y size of the generated image.
centre_x  x position of the gaussian centre.
centre_y  y position of the gaussian centre.
sigma  Sigma for the gaussian distribution.
Returns:
1 newly allocated image or NULL in error case
See also:
cpl_image_gen_gaussian_double()

cpl_image* cpl_image_gen_noise_uniform_double int    nx,
int    ny,
double    min_pix,
double    max_pix
 

Generate an image with uniform random noise distribution.

Parameters:
nx  x size of the generated image.
ny  y size of the generated image.
min_pix  Minimum output pixel value.
max_pix  Maximum output pixel value.
Returns:
1 newly allocated image or NULL in error case
Generate an image with a uniform random noise distribution. Pixel values are within the provided bounds. The created image has to be deallocated with cpl_image_delete().

Possible _cpl_error_code_ set in this function:

  • CPL_ERROR_ILLEGAL_INPUT

cpl_image* cpl_image_gen_noise_uniform_float int    nx,
int    ny,
double    min_pix,
double    max_pix
 

Generate an image with uniform random noise distribution.

Parameters:
nx  x size of the generated image.
ny  y size of the generated image.
min_pix  Minimum output pixel value.
max_pix  Maximum output pixel value.
Returns:
1 newly allocated image or NULL in error case
See also:
cpl_image_gen_noise_uniform_double()

cpl_image* cpl_image_gen_test int    nx,
int    ny
 

Generate an image for testing purposes.

Parameters:
nx  x size
ny  y size
Returns:
1 newly allocated image or NULL in error case
Generates a reference pattern for testing purposes only. The created image has to be deallocated with cpl_image_delete().

Possible _cpl_error_code_ set in this function:

  • CPL_ERROR_NULL_INPUT
  • CPL_ERROR_ILLEGAL_INPUT


Generated on Mon May 24 14:58:05 2004 for Common Pipeline Library Reference Manual by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002