Back to Adaptive Vision Library website
You are here: Start » Function Reference » Histogram Basics » CreateHistogram
CreateHistogram
Creates the histogram of the array of real numbers.
Syntax
C++
C#
void avl::CreateHistogram ( const atl::Array<atl::real>& inArray, atl::Optional<const atl::Array<int>&> inWeights, const atl::real& inBinSize, atl::Optional<atl::real> inDomainStart, atl::Optional<atl::real> inDomainLength, avl::Histogram& outHistogram )
Parameters
| Name | Type | Range | Default | Description | |
|---|---|---|---|---|---|
![]() |
inArray | const Array<real>& | Array from which histogram will be generated | ||
![]() |
inWeights | Optional<const Array<int>&> | NIL | Weights corresponding to the elements of 'inArray' | |
![]() |
inBinSize | const real& | 0.0001 - ![]() |
1.0f | Input bin size |
![]() |
inDomainStart | Optional<real> | NIL | Input domain begin | |
![]() |
inDomainLength | Optional<real> | 0.0001 - ![]() |
NIL | Input domain length |
![]() |
outHistogram | Histogram& | Output histogram |
Description
The operation creates a histogram of inArray values.
Errors
| Error type | Description |
|---|---|
| DomainError | Input bin width is incorrect in CreateHistogram. |
| DomainError | Input boundaries are incorrect in CreateHistogram. |
| DomainError | Inconsistent array lengths at inArray and inWeights in CreateHistogram. |
| DomainError | Negative weight encountered in CreateHistogram. |



