[ VIGRA Homepage | Class Index | Function Index | File Index | Main Page ]
![]() |
FindAverage Class Template Reference | ![]() |
---|
Find the average pixel value in an image or ROI. More...
#include "vigra/inspectimage.hxx"
Public Types | |
typedef VALUETYPE | argument_type |
typedef NumericTraits< VALUETYPE >::RealPromote | result_type |
typedef NumericTraits< VALUETYPE >::RealPromote | value_type |
Public Methods | |
FindAverage () | |
void | reset () |
void | operator() (argument_type const &v) |
void | operator() (FindAverage const &v) |
result_type | average () const |
result_type | operator() () const |
Detailed Description |
In addition the size of the ROI is calculated. This Functor can also be used in conjunction with ArrayOfRegionStatistics to find the average of all regions in a labeled image.
Usage:
#include "vigra/inspectimage.hxx"
Namespace: vigra
vigra::BImage img; vigra::FindAverage<vigra::BImage::PixelType> average; // init functor vigra::inspectImage(srcImageRange(img), average); cout << "Average: " << average();
Required Interface:
VALUETYPE v1, v2(v1); v1 < v2; v1 = v2;
|
the functor's argument type |
|
the functor's result type |
|
|
|
init average |
|
return current average |
|
return current average |
|
merge two statistics |
|
update average |
|
(re-)init average |
© Ullrich Köthe (koethe@informatik.uni-hamburg.de) |
html generated using doxygen and Python
|