[ VIGRA Homepage | Function Index | Class Index | Namespaces | File List | Main Page ]
vigra::acc Namespace Reference |
Efficient computation of object statistics. More...
Classes | |
class | AbsPowerSum |
Basic statistic. AbsPowerSum<N> = . More... | |
class | AccumulatorChain |
Create an accumulator chain containing the selected statistics and their dependencies. More... | |
class | AccumulatorChainArray |
Create an array of accumulator chains containing the selected per-region and global statistics and their dependencies. More... | |
class | ArgMaxWeight |
Basic statistic. Data where weight assumes its maximal value. More... | |
class | ArgMinWeight |
Basic statistic. Data value where weight assumes its minimal value. More... | |
class | AutoRangeHistogram |
Histogram where range mapping bounds are defined by minimum and maximum of data. More... | |
class | Central |
Modifier. Substract mean before computing statistic. More... | |
class | Central< PowerSum< 2 > > |
Spezialization: works in pass 1, operator+=() supported (merging supported). More... | |
class | Central< PowerSum< 3 > > |
Specialization: works in pass 2, operator+=() supported (merging supported). More... | |
class | Central< PowerSum< 4 > > |
Specialization: works in pass 2, operator+=() supported (merging supported). More... | |
class | CentralMoment |
Alias. CentralMoment<N>. More... | |
class | ConvexHull |
Compute the convex hull of a region. More... | |
class | ConvexHullFeatures |
Compute object features related to the convex hull. More... | |
class | Coord |
Modifier. Compute statistic from pixel coordinates rather than from pixel values. More... | |
class | CoordinateSystem |
Basic statistic. Identity matrix of appropriate size. More... | |
class | DataArg |
Specifies index of data in CoupledHandle. More... | |
class | DivideByCount |
Modifier. Divide statistic by Count: DivideByCount<TAG> = TAG / Count . More... | |
class | DivideUnbiased |
Modifier. Divide statistics by Count-1: DivideUnbiased<TAG> = TAG / (Count-1) More... | |
class | DynamicAccumulatorChain |
Create a dynamic accumulator chain containing the selected statistics and their dependencies. More... | |
class | DynamicAccumulatorChainArray |
Create an array of dynamic accumulator chains containing the selected per-region and global statistics and their dependencies. More... | |
class | FirstSeen |
Basic statistic. First data value seen of the object. More... | |
class | FlatScatterMatrix |
Basic statistic. Flattened uppter-triangular part of scatter matrix. More... | |
class | Global |
Modifier. Compute statistic globally rather than per region. More... | |
class | GlobalRangeHistogram |
Like AutoRangeHistogram, but use global min/max rather than region min/max. More... | |
class | IntegerHistogram |
Histogram where data values are equal to bin indices. More... | |
class | Kurtosis |
Basic statistic. Kurtosis. More... | |
class | LabelArg |
Specifies index of labels in CoupledHandle. More... | |
class | Maximum |
Basic statistic. Maximum value. More... | |
class | Minimum |
Basic statistic. Minimum value. More... | |
class | Moment |
Alias. Moment<N>. More... | |
class | PowerSum |
Basic statistic. PowerSum<N> = . More... | |
class | Principal |
Modifier. Project onto PCA eigenvectors. More... | |
class | Principal< CoordinateSystem > |
Specialization (covariance eigenvectors): works in pass 1, operator+=() supported (merging). More... | |
class | Principal< PowerSum< 2 > > |
Specialization (covariance eigenvalues): works in pass 1, operator+=() supported (merging). More... | |
class | Range |
Return both the minimum and maximum in std::pair . More... | |
class | RegionCircularity |
Compute the circularity of a 2D region. More... | |
class | RegionContour |
Compute the contour of a 2D region. More... | |
class | RegionEccentricity |
Compute the eccentricity of a 2D region in terms of its prinipal radii. More... | |
class | RegionPerimeter |
Compute the perimeter of a 2D region. More... | |
class | RootDivideByCount |
Modifier. RootDivideByCount<TAG> = sqrt( TAG/Count ) More... | |
class | RootDivideUnbiased |
Modifier. RootDivideUnbiased<TAG> = sqrt( TAG / (Count-1) ) More... | |
class | ScatterMatrixEigensystem |
struct | Select |
Wrapper for MakeTypeList that additionally performs tag standardization. More... | |
class | Skewness |
Basic statistic. Skewness. More... | |
class | StandAloneAccumulatorChain |
Create an accumulator chain that works independently of a MultiArray. More... | |
class | StandAloneDataFreeAccumulatorChain |
Create an accumulator chain that works independently of a MultiArray. More... | |
class | StandardQuantiles |
Compute (0%, 10%, 25%, 50%, 75%, 90%, 100%) quantiles from given histogram. More... | |
class | UnbiasedKurtosis |
Basic statistic. Unbiased Kurtosis. More... | |
class | UnbiasedSkewness |
Basic statistic. Unbiased Skewness. More... | |
class | UserRangeHistogram |
Histogram where user provides bounds for linear range mapping from values to indices. More... | |
class | WeightArg |
Specifies index of data in CoupledHandle. More... | |
class | Weighted |
Compute weighted version of the statistic. More... | |
Typedefs | |
typedef AbsPowerSum< 1 > | AbsSum |
Alias. Absolute sum. | |
typedef Weighted< RegionAxes > | AxesOfInertia |
Alias. Axes of inertia. | |
typedef Coord< Range > | BoundingBox |
Alias. Rectangle enclosing the region, as a std::pair of coordinates. | |
typedef Weighted< RegionCenter > | CenterOfMass |
Alias. Center of mass. | |
typedef PowerSum< 0 > | Count |
Alias. Count. | |
typedef DivideByCount < FlatScatterMatrix > | Covariance |
Alias. Covariance. | |
typedef DivideByCount < ScatterMatrixEigensystem > | CovarianceEigensystem |
Alias. Covariance eigensystem. | |
typedef DivideByCount< Sum > | Mean |
Alias. Mean. | |
typedef DivideByCount < SumOfAbsDifferences > | MeanAbsoluteDeviation |
Alias. Mean absolute deviation. | |
typedef Weighted< Coord < Principal< Variance > > > | MomentsOfInertia |
Alias. Moments of inertia. | |
typedef Coord< FirstSeen > | RegionAnchor |
Alias. Anchor point (first point of the region seen by scan-order traversal. | |
typedef Coord< Principal < CoordinateSystem > > | RegionAxes |
Alias. Region axes. | |
typedef Coord< Mean > | RegionCenter |
Alias. Region center. | |
typedef Coord< Principal < StdDev > > | RegionRadii |
Alias. Region radii. | |
typedef RootDivideByCount < SumOfSquares > | RootMeanSquares |
Alias. Root mean square. | |
typedef SumOfSquaredDifferences | SSD |
Alias. Sum of squared differences. | |
typedef RootDivideByCount < Central< PowerSum< 2 > > > | StdDev |
Alias. Standard deviation. | |
typedef PowerSum< 1 > | Sum |
Alias. Sum. | |
typedef Central< AbsSum > | SumOfAbsDifferences |
Alias. Sum of absolute differences. | |
typedef Central< PowerSum< 2 > > | SumOfSquaredDifferences |
Alias. Sum of squared differences. | |
typedef PowerSum< 2 > | SumOfSquares |
Alias. Sum of squares. | |
typedef DivideUnbiased < FlatScatterMatrix > | UnbiasedCovariance |
Alias. Unbiased covariance. | |
typedef RootDivideUnbiased < Central< PowerSum< 2 > > > | UnbiasedStdDev |
Alias. Unbiased standard deviation. | |
typedef DivideUnbiased < Central< PowerSum< 2 > > > | UnbiasedVariance |
Alias. Unbiased variance. | |
typedef DivideByCount< Central < PowerSum< 2 > > > | Variance |
Alias. Variance. | |
typedef Weighted< RegionCenter > | WeightedRegionCenter |
Alias. Region center weighted by the region intensity (center of mass). | |
typedef Weighted< RegionRadii > | WeightedRegionRadii |
Alias. Region radius weighted by region intensity (square root of the moments of inertia). | |
Functions | |
template<class Tag , class A > | |
void | activate (A &a) |
template<... > | |
void | extractFeatures (...) |
template<class TAG , class A > | |
LookupTag< TAG, A >::result_type | get (A const &a) |
template<class TAG , class A > | |
LookupTag< TAG, A >::result_type | get (A const &a, MultiArrayIndex label) |
template<class TAG , class A > | |
LookupTag< TAG, A >::reference | getAccumulator (A &a) |
template<class TAG , class A > | |
LookupTag< TAG, A >::reference | getAccumulator (A &a, MultiArrayIndex label) |
template<class Tag , class A > | |
bool | isActive (A const &a) |
Efficient computation of object statistics.
This namespace contains the accumulator classes, fundamental statistics and modifiers. See Feature Accumulators for examples of usage.
LookupTag< TAG, A >::reference getAccumulator | ( | A & | a | ) |
Get a reference to the accumulator 'TAG' in the accumulator chain 'a'. This can be useful for example to update a certain accumulator with data, set individual options or get information about a certain accumulator.
Example of use (set options):
Example of use (get information):
See Feature Accumulators for more information about feature computation via accumulators.
LookupTag<TAG, A>::reference vigra::acc::getAccumulator | ( | A & | a, |
MultiArrayIndex | label | ||
) |
Get a reference to the accumulator 'TAG' for region 'label' in the accumulator chain 'a'.
LookupTag<TAG, A>::result_type vigra::acc::get | ( | A const & | a | ) |
Get the result of the accumulator 'TAG' in the accumulator chain 'a'.
Example of use:
See Feature Accumulators for more information about feature computation via accumulators.
LookupTag<TAG, A>::result_type vigra::acc::get | ( | A const & | a, |
MultiArrayIndex | label | ||
) |
Get the result of the accumulator 'TAG' for region 'label' in the accumulator chain 'a'.
Example of use:
See Feature Accumulators for more information about feature computation via accumulators.
void vigra::acc::activate | ( | A & | a | ) |
Activate the dynamic accumulator 'Tag' in the dynamic accumulator chain 'a'. Same as a.activate<Tag>() (see DynamicAccumulatorChain::activate<Tag>() or DynamicAccumulatorChainArray::activate<Tag>()). For run-time activation use DynamicAccumulatorChain::activate(std::string tag) or DynamicAccumulatorChainArray::activate(std::string tag) instead.
See Feature Accumulators for more information about feature computation via accumulators.
bool vigra::acc::isActive | ( | A const & | a | ) |
Check if the dynamic accumulator 'Tag' in the accumulator chain 'a' is active. Same as a.isActive<Tag>() (see DynamicAccumulatorChain::isActive<Tag>() or DynamicAccumulatorChainArray::isActive<Tag>()). At run-time, use DynamicAccumulatorChain::isActive(std::string tag) const or DynamicAccumulatorChainArray::isActive(std::string tag) const instead.
See Feature Accumulators for more information about feature computation via accumulators.
void vigra::acc::extractFeatures | ( | ... | ) |
Generic loop to collect statistics from one or several arrays.
This function automatically performs as many passes over the data as necessary for the selected statistics. The basic version of extractFeatures()
takes an iterator pair and a reference to an accumulator chain:
The ITERATOR
can be any STL-conforming forward iterator (including raw pointers and vigra::CoupledScanOrderIterator). The ACCUMULATOR
must be instantiated with the ITERATOR
's value_type
as its first template argument. For example, to use a raw pointer you write:
Similarly, you can use MultiArray's scan-order iterator:
An alternative syntax is used when you want to compute weighted or region statistics (or both). Then it is necessary to iterate over several arrays simultaneously. This fact is best conveyed to the accumulator via the helper class vigra::CoupledArrays that is used as the accumulator's first template argument and holds the dimension and value types of the arrays involved. To actually compute the features, you then pass appropriate arrays to the extractfeatures()
function directly. For example, region statistics can be obtained like this:
This form of extractFeatures()
is supported for up to five arrays (although at most three are currently making sense in practice):
Of course, the number and types of the arrays specified in CoupledArrays
must conform to the number and types of the arrays passed to extractFeatures()
.
See Feature Accumulators for more information about feature computation via accumulators.
© Ullrich Köthe (ullrich.koethe@iwr.uni-heidelberg.de) |
html generated using doxygen and Python
|