Interface to Bayer average map metadata.
The Bayer average map provides local averages of the capture's raw pixels for a number of small rectangular regions, called bins, that are evenly distributed across the image. Each average is a floating-point value that is nomalized such that [0.0, 1.0] maps to the full optical range of the output pixels, but values outside this range may be included in the averages so long as they are within the working range of the average calculation. For pixels that have values outside the working range, the API excludes such pixels from the average calculation and increments the clipped pixel counter for the containing region.
The size and layout of the bins used to calculate the averages are determined by the Argus implementation and are illustrated in the following diagram. The bin size and interval are constant across the image, and are positioned such that the generated averages cover the majority of the full image. All dimensions are given in pixels.
Definition at line 153 of file BayerAverageMap.h.
Public Member Functions | |
virtual Point2D< uint32_t > | getBinStart () const =0 |
Returns the starting location of the first bin, in pixels, where the location is relative to the top-left corner of the image. More... | |
virtual Size2D< uint32_t > | getBinSize () const =0 |
Returns the size of each bin, in pixels. More... | |
virtual Size2D< uint32_t > | getBinCount () const =0 |
Returns the number of bins in both the horizontal (width) and vertical (height) directions. More... | |
virtual Size2D< uint32_t > | getBinInterval () const =0 |
Returns the bin intervals for both the x and y axis. More... | |
virtual Range< float > | getWorkingRange () const =0 |
Returns the working range of the averaging calculation. More... | |
virtual Status | getAverages (Array2D< BayerTuple< float > > *averages) const =0 |
Returns the average values for all bins. More... | |
virtual Status | getClipCounts (Array2D< BayerTuple< uint32_t > > *clipCounts) const =0 |
Returns the clipped pixel counts for all bins. More... | |
Static Public Member Functions | |
static const InterfaceID & | id () |
Protected Member Functions | |
~IBayerAverageMap () | |
|
inlineprotected |
Definition at line 229 of file BayerAverageMap.h.
|
pure virtual |
Returns the average values for all bins.
These values are normalized such that [0.0, 1.0] maps to the optical range of the output, but the range of possible values is determined by the working range. For input pixels that have values outside the working range, the API excludes such pixels from the average calculation and increments the clipped pixel counter for the containing region.
[out] | averages | The output array to store the averages for all bins. This 2-dimensional array is sized as returned by IBayerAverageMap::getBinCount(), where each array element is a floating point BayerTuple containing the R, G_EVEN, G_ODD, and B averages for that bin. |
|
pure virtual |
Returns the number of bins in both the horizontal (width) and vertical (height) directions.
This size is equivalent to the array dimensions for the output from IBayerAverageMap::getAverages() or IBayerAverageMap::getClipCounts().
|
pure virtual |
Returns the bin intervals for both the x and y axis.
These intervals are defined as the number of pixels between the first pixel of a bin and that of the immediate next bin.
|
pure virtual |
Returns the size of each bin, in pixels.
|
pure virtual |
Returns the starting location of the first bin, in pixels, where the location is relative to the top-left corner of the image.
|
pure virtual |
Returns the clipped pixel counts for all bins.
This is the number of pixels in the bin whose value exceeds the working range and have been excluded from average calculation.
[out] | clipCounts | The output array to store the clip counts for all bins. This 2-dimensional array is sized as returned by Ext::IBayerAverageMap::getBinCount(), where each array element is an uint32_t BayerTuple containing the R, G_EVEN, G_ODD, and B clip counts for that bin. |
|
pure virtual |
Returns the working range of the averaging calculation.
The working range is defined as the range of values that are included in the average calculation (e.g. not clipped), and may extend beyond the normalized [0.0, 1.0] range of the optical output. For example, if the working range is [-0.5, 1.5], this means that values in [-0.5, 0) and (1, 1.5] will still be included in the average calculation despite being clipped to [0.0, 1.0] in the output pixels. Any pixels outside this working range are excluded from average calculation and will increment the clip count.
|
inlinestatic |
Definition at line 156 of file BayerAverageMap.h.