SoMedianFilterProcessing engine More...
#include <ImageViz/Engines/ImageFiltering/SmoothingAndDenoising/SoMedianFilterProcessing.h>
Public Types | |
enum | KernelMode { ITERATIVE = 0, CUBE = 1, BALL = 2 } |
Public Member Functions | |
SoMedianFilterProcessing () | |
Public Attributes | |
SoSFEnum | computeMode |
SoSFEnum | neighborhood3d |
SoSFImageDataAdapter | inImage |
SoSFInt32 | elementSize |
SoSFEnum | kernelMode |
SoImageVizEngineOutput < SoSFImageDataAdapter, SoImageDataAdapter * > | outImage |
The SoMedianFilterProcessing engine smoothes the image using morphological operators.
For an introduction to image filters, see section Images Filters.
This module uses morphological operators to set the pixel value to the median for the defined neighborhood. The SoMedianFilterProcessing usually works well when images contain non-Gaussian noise and/or very small artifacts. It does not cause blurring to the same extend as the SoBoxFilterProcessing, but does take considerably longer to execute.
The gray levels of all pixels in the neighborhood are sorted from the smallest value to the largest one. The central pixel in the sort is then the median value, i.e. the value for which there are as many lower gray levels as higher ones. The process may be iterated.
To explain this, consider the array:
The sorted gray level values will be: 12 14 14 15 17 18 19 20.
The median value is 16, and it will be the value of the output pixel.
The Median filtering considers the lines and then the columns.
SoRecursiveExponentialFilterProcessing, SoBoxFilterProcessing.
computeMode | MODE_AUTO |
neighborhood3d | CONNECTIVITY_26 |
inImage | NULL |
elementSize | 3 |
kernelMode | CUBE |
InteractiveFiltering, InteractiveFloodFill, DenoisingImage2D
SoMedianFilterProcessing::SoMedianFilterProcessing | ( | ) |
Constructor.
Select the compute Mode (2D or 3D or AUTO) Use enum ComputeMode.
Default is MODE_AUTO
The half size of the structuring element.
A structuring element always has an odd side length (3x3, 5x5, etc) which is defined by 2 * elementSize + 1. Default value is 3.
The input grayscale image.
Default value is NULL. Supported types include: grayscale binary label image.
The shape of the 3D neighborhood.
Use enum KernelMode. Default is CUBE
In 3D configuration (see computeMode), the neighborhood connectivity defines the connectivity considered for processing adjacent voxels.
Use enum Neighborhood3d. Default is CONNECTIVITY_26.
The output image.
Default value is NULL. Supported types include: grayscale binary label color image.