Functions | |
cpl_image * | cpl_image_filter_linear (const cpl_image *in, const cpl_matrix *ker) |
Compute a linear filtering. | |
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_median (const cpl_image *in, const cpl_matrix *ker) |
Apply a spatial 3x3 median filter to an image. | |
cpl_image * | cpl_image_filter_stdev (const cpl_image *in, const cpl_matrix *ker) |
Standard deviation filter. |
The filtering functions (linear, median, morphological filtering) take the bad pixels map (bpm) into account to avoid them to corrupt their neigbours.
#include "cpl_image_filter.h"
|
Compute a linear filtering.
The input kernel should have an odd number of rows and columns. The maximum size of the kernel is 31x31. The output image has to be deallocated with cpl_image_delete(). Images can be CPL_TYPE_FLOAT or CPL_TYPE_DOUBLE. Possible _cpl_error_code_ set in this function:
|
|
Apply a spatial 3x3 median filter to an image.
Apply a spatial 3x3 median filter to an image, return a newly allocated image which must be deallocated using cpl_image_delete(). Images can be CPL_TYPE_FLOAT or CPL_TYPE_DOUBLE. Possible _cpl_error_code_ set in this function:
|
|
Filter an image in spatial domain with a morpho kernel.
The input filter is defined by a square matrix whose size is smaller than 5x5. The first element is applied to the min pixel in the neighborhood, the second to the second-to-min, etc. and the last coefficient is applied to the max pixel. The returned image is a newly allocated object, it must be deallocated using cpl_image_delete(). Images can be CPL_TYPE_FLOAT or CPL_TYPE_DOUBLE. Possible _cpl_error_code_ set in this function:
|
|
Standard deviation filter.
For each pixel, compute the standard deviation of a local zone. The image borders are set to 0. The returned image must be deallocated using cpl_image_delete(). Images can be CPL_TYPE_FLOAT or CPL_TYPE_DOUBLE. Possible _cpl_error_code_ set in this function:
|