Main Page   Modules   Alphabetical List   Compound List   Compound Members  

Image filtering functions


Functions

cpl_image * cpl_image_filter_linear (cpl_image *in, cpl_matrix *ker)
 Compute a linear filtering using the bad pixel map. More...

cpl_image * cpl_image_filter_morpho (cpl_image *image_in, cpl_matrix *ker)
 Filter an image in spatial domain with a morpho kernel. Use bpm. More...

cpl_image * cpl_image_filter_median (cpl_image *in, cpl_matrix *ker)
 Apply a spatial 3x3 median filter to an image using bpm. More...

cpl_image * cpl_image_filter_stdev (cpl_image *in, cpl_matrix *ker)
 Standard deviation filter using bpm. More...


Detailed Description

This module provides functions to filter images.

The filtering functions (linear, median, morphological filtering) take the bad pixels map (bpm) into account to avoid them to corrupt their neigbours.

Synopsis:
   #include "cpl_image_filter.h"

Function Documentation

cpl_image* cpl_image_filter_linear cpl_image *    in,
cpl_matrix *    ker
 

Compute a linear filtering using the bad pixel map.

Parameters:
in  The image to filter
ker  The kernel
Returns:
The filtered image or NULL in error case
The input kernel should have an odd number of rows ans columns. The maximum size of the kernel is 9x9. The output 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
  • CPL_ERROR_TYPE_MISMATCH

cpl_image* cpl_image_filter_median cpl_image *    in,
cpl_matrix *    ker
 

Apply a spatial 3x3 median filter to an image using bpm.

Parameters:
in  Image to filter.
ker  the kernel
Returns:
1 newly allocated image or NULL in error case
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:

  • CPL_ERROR_NULL_INPUT
  • CPL_ERROR_ILLEGAL_INPUT
  • CPL_ERROR_TYPE_MISMATCH

cpl_image* cpl_image_filter_morpho cpl_image *    image_in,
cpl_matrix *    ker
 

Filter an image in spatial domain with a morpho kernel. Use bpm.

Parameters:
image_in  Image to filter.
ker  Filter definition.
Returns:
1 newly allocated image or NULL in error case.
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:

  • CPL_ERROR_NULL_INPUT
  • CPL_ERROR_ILLEGAL_INPUT
  • CPL_ERROR_TYPE_MISMATCH

cpl_image* cpl_image_filter_stdev cpl_image *    in,
cpl_matrix *    ker
 

Standard deviation filter using bpm.

Parameters:
in  input image
ker  the kernel
Returns:
a newly allocated filtered image or NULL in error case
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:

  • CPL_ERROR_NULL_INPUT
  • CPL_ERROR_ILLEGAL_INPUT
  • CPL_ERROR_TYPE_MISMATCH


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