[ 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.
Traits defined:
Usage:
#include "vigra/inspectimage.hxx"
Required Interface:
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
FunctorTraits::isUnaryAnalyser
and FunctorTraits::isInitializer
are true (VigraTrueType
)
Namespace: vigra
vigra::BImage img;
vigra::FindAverage<vigra::BImage::PixelType> average; // init functor
vigra::inspectImage(srcImageRange(img), average);
cout << "Average: " << average();
VALUETYPE v1, v2(v1);
v1 < v2;
v1 = v2;
Member Typedef Documentation
typedef VALUETYPE argument_type
typedef NumericTraits<VALUETYPE>::RealPromote result_type
typedef NumericTraits<VALUETYPE>::RealPromote value_type
Constructor & Destructor Documentation
FindAverage
(
)
[inline]
Member Function Documentation
result_type average
(
)
const
[inline]
result_type operator()
(
)
const
[inline]
void operator()
(
FindAverage< VALUETYPE > const &
v
)
[inline]
void operator()
(
argument_type const &
v
)
[inline]
void reset
(
)
[inline]
The documentation for this class was generated from the following file:
Cognitive Systems Group,
University of Hamburg, Germany
VIGRA 1.5.0 (7 Dec 2006)