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<float>& inArray,
	atl::Optional<const atl::Array<int>&> inWeights,
	const float& inBinSize,
	atl::Optional<float> inDomainStart,
	atl::Optional<float> inDomainLength,
	avl::Histogram& outHistogram
)

Parameters

Name Type Range Default Description
inArray const Array<float>& Array from which histogram will be generated
inWeights Optional<const Array<int>&> NIL Weights corresponding to the elements of 'inArray'
inBinSize const float& 0.0001 - 1.0f Input bin size
inDomainStart Optional<float> NIL Input domain begin
inDomainLength Optional<float> 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.

See Also