|
ifw-odp 5.0.0
|
Functions | |
| void | clipm_testlib_array_dump (const cpl_array *array, const char *name) |
| Dump an array to stdout. | |
| cpl_image * | clipm_testlib_image_create_invalid (cpl_size xsize, cpl_size ysize) |
| Create an image of type CPL_TYPE_INVALID. | |
| cpl_matrix * | clipm_testlib_generate_poisson_points (double xmin, double ymin, double xmax, double ymax, cpl_size homogeneity, cpl_size N, cpl_type type) |
| Generate a list of N random points stored in a matrix. | |
| cpl_image * | clipm_testlib_image_create_gaussians (int xsize, int ysize, cpl_matrix *locations, cpl_type type, double weight, double sigma) |
| Create an image containing a set of equal gaussian peaks. | |
| cpl_error_code | clipm_testlib_image_add_wgn (cpl_image *image, const cpl_size window_xxyy[4], double sigma, double noise_abs_limit) |
| Add white gaussian noise to an image. | |
| cpl_type | clipm_testlib_ctype_2_cpltype (const char *ctype_str) |
| Get CPL type from C-type identifier string. | |
| const char * | clipm_testlib_cpltype_2_literal (cpl_type type) |
| Get CPL type as string. | |
| int | clipm_testlib_iterate_types_windows (int *iterator, cpl_type in_types_or, const cpl_size in_window_xxyy[4], const cpl_image *in_image, cpl_type *out_type, cpl_size **out_window_xxyy, cpl_image **out_image, cpl_size *out_ngoodpix) |
| cpl_error_code | clipm_testlib_image_reject_pattern (cpl_image *img, const cpl_size window_xxyy[4], const char *pattern_name) |
| Reject a pattern of pixels. | |
| cpl_error_code | clipm_testlib_image_reject_all (cpl_image *img, const cpl_size window_xxyy[4]) |
| Reject all pixels in image (window) | |
| cpl_size | clipm_testlib_image_count_bad (const cpl_image *img, const cpl_size window_xxyy[4]) |
| Count the bad pixels in an image (window). | |
| cpl_size | clipm_testlib_image_count_bad_wdw (const cpl_image *img, cpl_size x1, cpl_size y1, cpl_size x2, cpl_size y2) |
| Count the bad pixels in an image (window). | |
| cpl_image * | clipm_testlib_image_conv_matrix (const cpl_image *img, const cpl_matrix *kernel, int extend_bpm) |
| Simple reference convolution implementation. | |
| cpl_error_code | clipm_testlib_image_get_window_details (const cpl_image *img, const cpl_size window_xxyy[4], cpl_size ll[2], cpl_size ur[2], cpl_size size[2]) |
| Return the corners of a window and its size. | |
| cpl_error_code | _clipm_testlib_image_save_if_verbose (const cpl_image *img, const char *func, const char *identifier, int nr) |
| Write an image to disk and print a message. | |
Define here the tools used by more test programs.
| cpl_error_code _clipm_testlib_image_save_if_verbose | ( | const cpl_image * | img, |
| const char * | func, | ||
| const char * | identifier, | ||
| int | nr ) |
Write an image to disk and print a message.
| img | Image to write |
| func | Function identifier string |
| identifier | (Optional) user identifier string (short) |
| nr | (Optional) number put at the end of the filename, omitted if < 0 |
The following error codes can occur:
| void clipm_testlib_array_dump | ( | const cpl_array * | array, |
| const char * | name ) |
Dump an array to stdout.
| array | Array |
| name | Array name |
| const char * clipm_testlib_cpltype_2_literal | ( | cpl_type | type | ) |
Get CPL type as string.
| type |
The following strings can be returned:
| cpl_type clipm_testlib_ctype_2_cpltype | ( | const char * | ctype_str | ) |
Get CPL type from C-type identifier string.
| ctype_str |
The following types can be returned:
The following error codes can be set:
CPL_ERROR_NULL_INPUT: ctype_str is NULL
| cpl_matrix * clipm_testlib_generate_poisson_points | ( | double | xmin, |
| double | ymin, | ||
| double | xmax, | ||
| double | ymax, | ||
| cpl_size | homogeneity, | ||
| cpl_size | N, | ||
| cpl_type | type ) |
Generate a list of N random points stored in a matrix.
| xmin | Left limit |
| ymin | Lower limit |
| xmax | Right limit |
| ymax | Upper limit |
| homogeneity | Homogeneity factor |
| N | Number of points |
| type | Output type, either CPL_TYPE_INT, or CPL_TYPE_DOUBLE |
The following error codes can be set and returned:
| cpl_error_code clipm_testlib_image_add_wgn | ( | cpl_image * | image, |
| const cpl_size | window_xxyy[4], | ||
| double | sigma, | ||
| double | noise_abs_limit ) |
Add white gaussian noise to an image.
| image | Image |
| window_xxyy | (Optional) Coordinate buffer of the form {xa, xb, ya, yb}, can be NULL, minimum/maximum order is irrelevant |
| sigma | Noise sigma |
| noise_abs_limit | (Optional) limit to prevent infinite numbers, ignored if < 0 |
| cpl_image * clipm_testlib_image_conv_matrix | ( | const cpl_image * | img, |
| const cpl_matrix * | kernel, | ||
| int | extend_bpm ) |
Simple reference convolution implementation.
| img | Input image |
| kernel | Convolution kernel |
| extend_bpm | Flag whether to extend the bad pixel map |
| cpl_size clipm_testlib_image_count_bad | ( | const cpl_image * | img, |
| const cpl_size | window_xxyy[4] ) |
Count the bad pixels in an image (window).
| img | Input image |
| window_xxyy | (Optional) Coordinate buffer of the form {xa, xb, ya, yb}, can be NULL, minimum/maximum order is irrelevant |
| cpl_size clipm_testlib_image_count_bad_wdw | ( | const cpl_image * | img, |
| cpl_size | x1, | ||
| cpl_size | y1, | ||
| cpl_size | x2, | ||
| cpl_size | y2 ) |
Count the bad pixels in an image (window).
| img | Input image |
| window_xxyy | (Optional) Coordinate buffer of the form {xa, xb, ya, yb}, can be NULL, minimum/maximum order is irrelevant |
| cpl_image * clipm_testlib_image_create_gaussians | ( | int | xsize, |
| int | ysize, | ||
| cpl_matrix * | locations, | ||
| cpl_type | type, | ||
| double | weight, | ||
| double | sigma ) |
Create an image containing a set of equal gaussian peaks.
| xsize | Horizontal image size |
| ysize | Vertical image size |
| locations | 2xN matrix containing the centre positions of the peaks in columns |
| type | CPL image type |
| weight | Gaussian peak weight (respectively) |
| sigma | Gaussian peak sigma |
The following error codes can be set:
| cpl_image * clipm_testlib_image_create_invalid | ( | cpl_size | xsize, |
| cpl_size | ysize ) |
Create an image of type CPL_TYPE_INVALID.
| xsize | Horizontal size |
| ysize | Vertical size |
If xsize < 1 or ysize < 1, CPL_ERROR_ILLEGAL_INPUT is set and NULL is returned.
| cpl_error_code clipm_testlib_image_get_window_details | ( | const cpl_image * | img, |
| const cpl_size | window_xxyy[4], | ||
| cpl_size | ll[2], | ||
| cpl_size | ur[2], | ||
| cpl_size | size[2] ) |
Return the corners of a window and its size.
| img | Input image |
| window_xxyy | (Optional) Coordinate buffer of the form {x1a, x1b, y1a, y1b}, can be NULL, minimum/maximum order is irrelevant |
| ll | (Optional output) lower left corner (buffer of size 2) |
| ur | (Optional output) upper right corner (buffer of size 2) |
| size | (Optional output) window size (buffer of size 2) |
| cpl_error_code clipm_testlib_image_reject_all | ( | cpl_image * | img, |
| const cpl_size | window_xxyy[4] ) |
Reject all pixels in image (window)
| img | Input image |
| window_xxyy | (Optional) Coordinate buffer of the form {x1a, x1b, y1a, y1b}, can be NULL, minimum/maximum order is irrelevant |
| cpl_error_code clipm_testlib_image_reject_pattern | ( | cpl_image * | img, |
| const cpl_size | window_xxyy[4], | ||
| const char * | pattern_name ) |
Reject a pattern of pixels.
| Input | image |
| window_xxyy | (Optional) Coordinate buffer of the form {xa, xb, ya, yb}, can be NULL, minimum/maximum order is irrelevant |
| pattern_name | String containing the pattern's name |
| int clipm_testlib_iterate_types_windows | ( | int * | iterator, |
| cpl_type | in_types_or, | ||
| const cpl_size | in_window_xxyy[4], | ||
| const cpl_image * | in_image, | ||
| cpl_type * | out_type, | ||
| cpl_size ** | out_window_xxyy, | ||
| cpl_image ** | out_image, | ||
| cpl_size * | out_ngoodpix ) |