Back to Aurora Vision Library website
You are here: Start » Function Reference » Histogram » Histogram Basics » MakeHistogram
MakeHistogram
Header: | AVL.h |
---|---|
Namespace: | avl |
Module: | FoundationBasic |
Creates a histogram out of an array of bin values.
Syntax
C++
C#
void avl::MakeHistogram ( const atl::Array<double>& inValues, const float inDomainStart, const float inBinSize, int inStartIndex, atl::Optional<int> inBinCount, avl::Histogram& outHistogram )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
inValues | const Array<double>& | Input array of bin values | |||
inDomainStart | const float | 0.0f | Input domain begin | ||
inBinSize | const float | 0.0 - | 1.0f | Input length of the domain range covered by a single bin | |
inStartIndex | int | 0 - + | 0 | Index of the first bin in the values array | |
inBinCount | Optional<int> | 1 - + | NIL | Number of bins in the resulting histogram | |
outHistogram | Histogram& | Output histogram |
Remarks
The calculated bin count must be equal to element count of the inValues array.
Errors
List of possible exceptions:
Error type | Description |
---|---|
DomainError | Empty inValues array on input in MakeHistogram. |
DomainError | Input inStartIndex out of bound in MakeHistogram. |
DomainError | Non-positive value of inBinSize in MakeHistogram. |
DomainError | Not enough data to fill all bins or inBinCount too large in MakeHistogram. |