CVB++ 14.0
Histogram Class Reference

A single histogram result. More...

#include <cvb/foundation/histogram_analyzer.hpp>

Public Member Functions

uint64_t NumPixels () const noexcept
 Total number of pixels taken into account. More...
 
uint64_t Median () const noexcept
 Get the median index (index of the histogram slot, at which roughly 50% of the pixels are darker and 50% of the pixels are brighter than corresponding slot's gray value). More...
 
double Mean () const noexcept
 Get the mean value of all pixels. More...
 
double Mode () const noexcept
 Get the mode (the most common gray value) of the histogram. More...
 
double Min () const noexcept
 Get the minimum gray value of the histogram. More...
 
double Max () const noexcept
 Get the maximum gray value of the histogram. More...
 
double Variance () const noexcept
 Get the variance of the histogram. More...
 
double StandardDeviation () const noexcept
 Get the standard deviation of the histogram. More...
 
int Count () const noexcept
 The number of elements corresponds to the number of possible gray values. More...
 
std::vector< uint64_t > Values () const
 The actual histogram values. More...
 
uint64_t operator[] (int index) const
 Gets the histogram value at given index. More...
 

Detailed Description

A single histogram result.

Member Function Documentation

◆ Count()

int Count ( ) const
inlinenoexcept

The number of elements corresponds to the number of possible gray values.

Returns
Number of histogram elements.
Exceptions
Doesnot throw any exception.

◆ Max()

double Max ( ) const
inlinenoexcept

Get the maximum gray value of the histogram.

Returns
Maximum grey value.
Exceptions
Doesnot throw any exception.

◆ Mean()

double Mean ( ) const
inlinenoexcept

Get the mean value of all pixels.

Returns
The mean value.
Exceptions
Doesnot throw any exception.

◆ Median()

uint64_t Median ( ) const
inlinenoexcept

Get the median index (index of the histogram slot, at which roughly 50% of the pixels are darker and 50% of the pixels are brighter than corresponding slot's gray value).

Returns
The median index value.
Exceptions
Doesnot throw any exception.

◆ Min()

double Min ( ) const
inlinenoexcept

Get the minimum gray value of the histogram.

Returns
Minimum gray value.
Exceptions
Doesnot throw any exception.

◆ Mode()

double Mode ( ) const
inlinenoexcept

Get the mode (the most common gray value) of the histogram.

Returns
The mode value.
Exceptions
Doesnot throw any exception.

◆ NumPixels()

uint64_t NumPixels ( ) const
inlinenoexcept

Total number of pixels taken into account.

Returns
Number of pixels.
Exceptions
Doesnot throw any exception.

◆ operator[]()

uint64_t operator[] ( int  index) const
inline

Gets the histogram value at given index.

Parameters
[in]indexIndex of the histogram value to read.
Returns
Histogram value.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ StandardDeviation()

double StandardDeviation ( ) const
inlinenoexcept

Get the standard deviation of the histogram.

Returns
Histogram standard deviation.
Exceptions
Doesnot throw any exception.

◆ Values()

std::vector< uint64_t > Values ( ) const
inline

The actual histogram values.

Returns
Histogram values.
Exceptions
Doesnot throw any exception.

◆ Variance()

double Variance ( ) const
inlinenoexcept

Get the variance of the histogram.

Returns
Histogram variance.
Exceptions
Doesnot throw any exception.