IntensityStatistics
Computes basic statistics of an image.
Access to parameter description
For an introduction:
See also
See related example
Access to parameter description
For an introduction:
- section Image Analysis
- section Image Statistics
- range=Max − Min + 1
- k-th central moment=μk=∑(I(i,j)−mean)k
- stddev=σ=√μ2
- skewness=μ3σ3
- kurtosis=(μ4σ4)−3
- If the distribution has a tail length smaller than the maximum, the function has negative skewness.
- Otherwise, it has positive skewness.
See also
See related example
Function Syntax
This function returns outputMeasurement.
// Function prototype
StatisticsMsr::Ptr intensityStatistics( std::shared_ptr< iolink::ImageView > inputImage, IntensityStatistics::RangeMode rangeMode, iolink::Vector2i32 intensityInputRange, StatisticsMsr::Ptr outputMeasurement = NULL );
Class Syntax
Parameters
Parameter Name | Description | Type | Supported Values | Default Value | |||||
---|---|---|---|---|---|---|---|---|---|
![]() |
inputImage |
The input image. It can be grayscale, color, multi-channel, or time series. | Image | Binary, Label, Grayscale or Multispectral | nullptr | ||||
![]() |
rangeMode |
The way to determine the input intensity range within which statistics are computed.
|
Enumeration | MIN_MAX | |||||
![]() |
intensityInputRange |
The input intensity range [a,b] within which the statistics are computed. This parameter is ignored if the range mode is set to MIN_MAX. | Vector2i32 | Any value | {0, 255} | ||||
![]() |
outputMeasurement |
The output measurement results. | StatisticsMsr | nullptr |
Object Examples
std::shared_ptr< iolink::ImageView > polystyrene = ioformat::readImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "polystyrene.tif" ); IntensityStatistics intensityStatisticsAlgo; intensityStatisticsAlgo.setInputImage( polystyrene ); intensityStatisticsAlgo.setRangeMode( IntensityStatistics::RangeMode::MIN_MAX ); intensityStatisticsAlgo.setIntensityInputRange( {0, 255} ); intensityStatisticsAlgo.execute(); std::cout << "pixelCount: " << intensityStatisticsAlgo.outputMeasurement()->pixelCount( 0 , 0 ) ;
Function Examples
std::shared_ptr< iolink::ImageView > polystyrene = ioformat::readImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "polystyrene.tif" ); auto result = intensityStatistics( polystyrene, IntensityStatistics::RangeMode::MIN_MAX, {0, 255} ); std::cout << "pixelCount: " << result->pixelCount( 0 , 0 ) ;