libcamera v0.8.0+rpt20261104
Supporting cameras in Linux since 2019
Loading...
Searching...
No Matches
libcamera::SwIspStats Struct Reference

Statistics for the Software ISP. More...

#include <swisp_stats.h>

Collaboration diagram for libcamera::SwIspStats:

Public Types

using Histogram = std::array< uint32_t, kYHistogramSize >
 Type of the histogram.
 

Public Attributes

bool valid
 True if the statistics buffer contains valid data, false if no statistics were generated for this frame.
 
RGB< uint64_t > sum_
 Sums of colour channels of all the unsaturated pixels.
 
uint64_t numPixels_
 Number of unsaturated pixels accumulated in sum_.
 
Histogram yHistogram
 A histogram of luminance values of all the sampled pixels.
 

Static Public Attributes

static constexpr unsigned int kYHistogramSize = 64
 Number of bins in the yHistogram.
 

Detailed Description

Statistics for the Software ISP.

The software ISP computes two types of statistics:

  • The accumulator counts the number of non-saturated pixels and sums their R, G and B channels individually. Pixels that have any saturated channel are skipped as they don't provide accurate colour information due to clipping.
  • The histogram groups pixels in bins based on their luminance and counts the number of pixels in each bin. Saturated pixels are included.

The value types are large enough to not overflow. Should they still overflow for some reason, no check is performed and they wrap around.


The documentation for this struct was generated from the following file: