Stat

Description

Calculates different statistical values.

Full scope is iplt::alg::Stat in C++, resp iplt.alg.Stat in Python.

Public Interface

GetMean()

Returns the mean pixel value of the image.

GetMinimum()

Returns the minimum pixel value of the image.

GetMinimumPosition()

Returns the position of the minimum pixel value.

GetMaximum()

Returns the maximum pixel value of the image.

GetMaximumPosition()

Returns the position of the maximum pixel value.

GetSum()

Returns the summed value of all pixels.

GetVariance()

Returns the variance of the pixel values.

GetStandardDeviation()

GetRootMeanSquare()

Returns the root mean square of the pixel values.

GetSkewness()

Returns the skewness (the third standardized moment) of the pixel values.

GetKurtosis()

Returns the kurtosis (the fourth standardized moment) of the pixel values.

Examples

C++

#include <iostream>
#include <iplt/image.hh>
#include <iplt/alg/stat.hh>

using namespace iplt;

int main() 
{
  alg::Stat stat();
  ImageHandle img = LoadImage(<imagename>);
  img.ApplyIP(stat);

  std::cout << "Maximum: " << stat.GetMaximum() << std::endl;
  std::cout << "RootMeanSquare: " << stat.GetRootMeanSquare() << std::endl;
  std::cout << "Kurtosis: " << stat.GetKurtosis() << std::endl;
  return 0;
}

Python

from iplt import *
img = LoadImage(<imagename>)
stat=alg.Stat()
img.ApplyIP(stat)

print "Maximum: "+str(stat.GetMaximum())
print "RootMeanSquare: "+str(stat.GetRootMeanSquare())
print "Kurtosis: "+str(stat.GetKurtosis())

Back to Algorithm List