Back to FabImage Library website
You are here: Start » Function Reference » Histogram » Histogram Basics » CreateHistogram

CreateHistogram
Header: | FIL.h |
---|---|
Namespace: | fil |
Module: | FoundationBasic |
Creates the histogram of the array of real numbers.
Syntax
C++
C#
void fil::CreateHistogram ( const ftl::Array<float>& inArray, ftl::Optional<const ftl::Array<double>&> inWeights, ftl::Optional<float> inDomainStart, const float inBinSize, ftl::Optional<int> inBinCount, const bool inCyclic, fil::Histogram& outHistogram )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
![]() |
inArray | const Array<float>& | Array from which histogram will be generated | ||
![]() |
inWeights | Optional<const Array<double>&> | NIL | Weights corresponding to the elements of 'inArray' | |
![]() |
inDomainStart | Optional<float> | NIL | Input domain begin | |
![]() |
inBinSize | const float | 0.0001 - ![]() |
1.0f | Input bin size |
![]() |
inBinCount | Optional<int> | 0 - +![]() |
NIL | Input domain length |
![]() |
inCyclic | const bool | False | Determines if input data is cyclic | |
![]() |
outHistogram | Histogram& | Output histogram |
Description
The operation creates a histogram of inArray values.
Errors
List of possible exceptions:
Error type | Description |
---|---|
DomainError | Inconsistent array lengths at inArray and inWeights in CreateHistogram. |
DomainError | Input bin width is incorrect in CreateHistogram. |
DomainError | Input boundaries are incorrect in CreateHistogram. |
DomainError | Negative weight encountered in CreateHistogram. |
DomainError | Output histogram size too large in CreateHistogram. |
See Also
- ImageHistogram – Computes the histogram of the image pixel values.