Common Pipeline Library Reference 7.3.2
|
Typedefs | |
typedef enum _cpl_border_mode_ | cpl_border_mode |
The border mode type. | |
typedef enum _cpl_filter_mode_ | cpl_filter_mode |
The filter mode type. | |
Enumerations | |
enum | _cpl_border_mode_ { CPL_BORDER_FILTER , CPL_BORDER_ZERO , CPL_BORDER_CROP , CPL_BORDER_NOP , CPL_BORDER_COPY } |
These are the supported border modes. For a kernel of width 2n+1, the n left- and rightmost image/mask columns do not have elements for the whole kernel. The same holds for the top and bottom image/mask rows. The border mode defines the filtering of such border pixels. More... | |
enum | _cpl_filter_mode_ { CPL_FILTER_EROSION , CPL_FILTER_DILATION , CPL_FILTER_OPENING , CPL_FILTER_CLOSING , CPL_FILTER_LINEAR , CPL_FILTER_LINEAR_SCALE , CPL_FILTER_AVERAGE , CPL_FILTER_AVERAGE_FAST , CPL_FILTER_MEDIAN , CPL_FILTER_STDEV , CPL_FILTER_STDEV_FAST , CPL_FILTER_MORPHO , CPL_FILTER_MORPHO_SCALE } |
These are the supported filter modes. More... | |
This module provides definitions for filtering of a cpl_image
and a cpl_mask
. The actual filtering functions are defined in the cpl_image
and cpl_mask
modules.
typedef enum _cpl_border_mode_ cpl_border_mode |
The border mode type.
typedef enum _cpl_filter_mode_ cpl_filter_mode |
The filter mode type.
enum _cpl_border_mode_ |
These are the supported border modes. For a kernel of width 2n+1, the n left- and rightmost image/mask columns do not have elements for the whole kernel. The same holds for the top and bottom image/mask rows. The border mode defines the filtering of such border pixels.
enum _cpl_filter_mode_ |
These are the supported filter modes.
Enumerator | |
---|---|
CPL_FILTER_EROSION | The erosion filter (for a
|
CPL_FILTER_DILATION | The dilation filter (for a
|
CPL_FILTER_OPENING | The opening filter (for a
|
CPL_FILTER_CLOSING | The closing filter (for a
|
CPL_FILTER_LINEAR | A linear filter (for a The kernel elements are thus used as weights like this: Kernel Image ... 1 2 3 ... 1.0 2.0 3.0 ... 4 5 6 ... 4.0 5.0 6.0 ... 7 8 9 ... 7.0 8.0 9.0 ... ... The filtered value corresponding to the pixel whose value is 5.0 is: Filtering with |
CPL_FILTER_LINEAR_SCALE | A linear filter (for a The kernel elements are thus applied like this: Kernel Image ... 1 2 3 ... 1.0 2.0 3.0 ... 4 5 6 ... 4.0 5.0 6.0 ... 7 8 9 ... 7.0 8.0 9.0 ... ... The filtered value corresponding to the pixel whose value is 5.0 is:
|
CPL_FILTER_AVERAGE | An average filter, i.e. the output pixel is the arithmetic average of the surrounding (1 + 2 * hsizex) (1 + 2 * hsizey) pixels. The cost per pixel is O(hsizex*hsizey). The two images may have different pixel types. When the input and output pixel types are identical, the arithmetic is done with that type, e.g. int for two integer images. When the input and output pixel types differ, the arithmetic is done in double precision when one of the two images have pixel type CPL_TYPE_DOUBLE, otherwise float is used. |
CPL_FILTER_AVERAGE_FAST | The same as
|
CPL_FILTER_MEDIAN | A median filter (for a
|
CPL_FILTER_STDEV | The filtered value is the standard deviation of the included input pixels. Kernel Image ... 1 0 1 ... 1.0 2.0 3.0 ... 0 1 0 ... 4.0 5.0 6.0 ... 1 0 1 ... 7.0 8.0 9.0 ... ... The pixel with value 5.0 will have a filtered value of: std_dev(1.0, 3.0, 5.0, 7.0, 9.0) |
CPL_FILTER_STDEV_FAST | The same as
|
CPL_FILTER_MORPHO | A morphological filter (for a The kernel elements are used as weights on the sorted values covered by the kernel: Kernel Image ... 1 2 3 ... 4.0 6.0 5.0 ... 4 5 6 ... 3.0 1.0 2.0 ... 7 8 9 ... 7.0 8.0 9.0 ... ... The filtered value corresponding to the pixel whose value is 5.0 is: |
CPL_FILTER_MORPHO_SCALE | A morphological filter (for a The kernel elements are thus applied to the sorted values covered by the kernel: Kernel Image ... 1 2 3 ... 4.0 6.0 5.0 ... 4 5 6 ... 3.0 1.0 2.0 ... 7 8 9 ... 7.0 8.0 9.0 ... ... The filtered value corresponding to the pixel whose value is 5.0 is:
|