SoFirstOrderStatisticsProcessing image filter More...
#include <ImageViz/Engines/ImageFiltering/TextureFilters/SoFirstOrderStatisticsProcessing.h>
Public Types | |
enum | MeasureType { MEAN = 0, VARIANCE = 1, SKEWNESS = 2, KURTOSIS = 3, CONTRAST = 4, VARIATION = 5, ENERGY = 6, ENTROPY = 7 } |
Public Member Functions | |
SoFirstOrderStatisticsProcessing () | |
Public Attributes | |
SoSFEnum | measureType |
SoSFImageDataAdapter | inImage |
SoSFInt32 | kernelSize |
SoImageVizEngineOutput < SoSFImageDataAdapter, SoImageDataAdapter * > | outImage |
SoFirstOrderStatisticsProcessing image filter computes first order statistics.
The SoFirstOrderStatisticsProcessing filter is dealing with first order statistics. It creates a result image where values on pixels are only function of values of this pixel in the initial image and its neighbourhood of a wanted size. In order to calculate this values, we calculate local histograms (array of number of pixels per value in the neighbourhood). In the following equations, corresponds to the probability to have a pixel with value (it's the number of those pixels divided by the total number of pixels in the neighbourhood).
For ENTROPY and ENERGY types, we must reduce the number of grey levels in order to calculate more significant statistics. We have two parameters to reduce images : having 4 or 8 classes, and with an equal repartition or not. For an equal repartition, we use the quantiles :
So, for 4 classes, we use :
and for 8 classes :
In the other case (no equi-repartition required), we use mean and standard deviation. So the delimiters for 4 classes are :
For 8 classes, we calculate the mean , then we obtain two subsets where we calculate means and , and standard deviations, we have in that case :
This values delimitates the classes and the value given to the pixels which belong to one class is the middle of the segment.
measureType | MEAN |
inImage | NULL |
kernelSize | 3 |
SoFirstOrderStatisticsProcessing::SoFirstOrderStatisticsProcessing | ( | ) |
Constructor.
The input image.
Default value is NULL. Supported types include: grayscale binary label color image.
The size of the kernel.
Default value is 3.
Select the first order measure to compute.
Use enum MeasureType. Default is MEAN
SoImageVizEngineOutput<SoSFImageDataAdapter,SoImageDataAdapter*> SoFirstOrderStatisticsProcessing::outImage |
The output image.
Default value is NULL. Supported types include: grayscale binary label color image.