StatMinMax

Description

StatMinMax ist a faster Statistics algorithm implementation than Stat providing the mimimum and maximum pixel value of an image.

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

Public Interface

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.

Examples

C++

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

using namespace iplt;

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

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

Python

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

print "Maximum: "+str(stat.GetMaximum())

Back to Algorithm List