Functions | |
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_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_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_image * | cpl_image_fill_test_create (int nx, int ny) |
Generate an image for testing purposes. |
These functions are mostly used to test the software. Gaussian images, or uniform noise images can be generated.
#include "cpl_image_gen.h"
|
Generate an image from a 2d gaussian function.
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)) The input image type can be CPL_TYPE_FLOAT or CPL_TYPE_DOUBLE. Possible _cpl_error_code_ set in this function:
|
|
Generate an image with uniform random noise distribution.
Possible _cpl_error_code_ set in this function:
|
|
Generate an image from a 2d polynomial function.
The input image type can be CPL_TYPE_FLOAT or CPL_TYPE_DOUBLE. If you want to generate an image whose pixel values are the values of the polynomial applied to the pixel positions, just call cpl_image_fill_polynomial(ima, poly, 1.0, 1.0, 1.0, 1.0) ; Possible _cpl_error_code_ set in this function:
|
|
Generate an image for testing purposes.
|