Back to Adaptive Vision Library website

You are here: Start » Function Reference » Image Features » ImageHistogram

ImageHistogram


Computes the histogram of the image pixel values.

Syntax

C++
C#
 
void avl::ImageHistogram
(
	const avl::Image& inImage,
	atl::Optional<const avl::Region&> inRoi,
	int inChannelIndex,
	const float& inBinSize,
	float inDomainBegin,
	float inDomainEnd,
	avl::Histogram& outHistogram
)

Parameters

Name Type Range Default Description
inImage const Image& Input image
inRoi Optional<const Region&> NIL Range of pixels to be processed
inChannelIndex int 0 - 3 Selects a channel of the input image
inBinSize const float& 0.0 - 1.0f Width of a single histogram bin
inDomainBegin float 0.0f The lowest value that will be considered in the output histogram
inDomainEnd float 256.0f The upper-bound for values that will be considered in the output histogram
outHistogram Histogram& Output histogram

Description

Histogram in Adaptive Vision Studio is a graphical representation of data contained in image. That is, the resulting histogram contains number of pixel values from specified channel with selected inBinSize (interval).

Examples

ImageHistogram performed on the Lena image with inChannelIndex = 0, inBinSize = 1.

Errors

Error type Description
DomainError Selected channel index is out of range in ImageHistogram.
DomainError Selected bin size equals zero in ImageHistogram.
DomainError Selected domain has zero or negative size inImageHistogram.

See Also