|
| Histogram () |
| Construct an empty Histogram. More...
|
|
| Histogram (Span< const uint32_t > data) |
| Create a cumulative histogram. More...
|
|
template<typename Transform , std::enable_if_t< std::is_invocable_v< Transform, uint32_t >> * = nullptr> |
| Histogram (Span< const uint32_t > data, Transform transform) |
| Create a cumulative histogram. More...
|
|
size_t | bins () const |
| Retrieve the number of bins currently used by the Histogram. More...
|
|
uint64_t | total () const |
| Retrieve the total number of values in the data set. More...
|
|
uint64_t | cumulativeFrequency (double bin) const |
| Cumulative frequency up to a (fractional) point in a bin. More...
|
|
double | quantile (double q, uint32_t first=0, uint32_t last=UINT_MAX) const |
| Return the (fractional) bin of the point through the histogram. More...
|
|
double | interQuantileMean (double lowQuantile, double hiQuantile) const |
| Calculate the mean between two quantiles. More...
|
|
The base class for creating histograms.
This class stores a cumulative frequency histogram, which is a mapping that counts the cumulative number of observations in all of the bins up to the specified bin. It can be used to find quantiles and averages between quantiles.
uint64_t libcamera::ipa::Histogram::cumulativeFrequency |
( |
double |
bin | ) |
const |
Cumulative frequency up to a (fractional) point in a bin.
- Parameters
-
[in] | bin | The bin up to which to cumulate |
With F(p) the cumulative frequency of the histogram, the value is 0 at the bottom of the histogram, and the maximum is the number of bins. The pixels are spread evenly throughout the “bin” in which they lie, so that F(p) is a continuous (monotonically increasing) function.
- Returns
- The cumulative frequency from 0 up to the specified bin