Argus API
Argus Camera API
|
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. More...
#include <BayerAverageMap.h>
Public Member Functions | |
virtual Location | getBinStart () const =0 |
Returns the starting location of the first bin, in pixels. | |
virtual Size | getBinSize () const =0 |
Returns the size of each bin, in pixels. | |
virtual Size | getBinCount () const =0 |
Returns the number of bins in both the horizontal (width) and vertical (height) directions. | |
virtual Size | getBinInterval () const =0 |
Returns the bin intervals for both the x and y axis. | |
virtual Range< float > | getWorkingRange () const =0 |
Returns the working range of the averaging calculation. | |
virtual Status | getAverages (Array2D< BayerTuple< float > > *averages) const =0 |
Returns the average values for all bins. | |
virtual Status | getClipCounts (Array2D< BayerTuple< uint32_t > > *clipCounts) const =0 |
Returns the clipped pixel counts for all bins. |
Static Public Member Functions | |
static const InterfaceID & | id () |
Protected Member Functions | |
~IBayerAverageMap () | |
![]() | |
Interface () | |
~Interface () |
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 (
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.
start.x interval.width _______ _________________ | | | | _ ________________________________________________________ | | |
start.y | | | |_ | _____ _____ _____ | _ | | | | | | | | | | | 0,0 | | 1,0 | | 2,0 | | | | |_____| |_____| |_____| | | | | | interval.height
_____ _____ _____ | _ |
| | | | | | | | | | 0,1 | | 1,1 | | 2,1 | | | |_____| |_____| |_____| | | | | | | | | _____ _____ _____ | _ | | | | | | | | | | | 0,2 | | 1,2 | | 2,2 | | | size.height | |_____| |_____| |_____| | _| | | | | |________________________________________________________|
|_____| size.width
Definition at line 134 of file BayerAverageMap.h.
|
inlineprotected |
Definition at line 207 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 (
[out] | averages | The output array to store the averages for all bins. This 2-dimensional array will be sized as returned by |
|
pure virtual |
Returns the number of bins in both the horizontal (width) and vertical (height) directions.
This size will be equivalent to the array dimensions for the output from
|
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.
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 will be sized as returned by |
|
pure virtual |
Returns the working range of the averaging calculation.
The working range is defined as the range of values that will be included in the average calculation (eg. 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 (
Note that when the bit depth available for averaging is equal to the optical bit depth of the output, the working range will be less than the full [0.0, 1.0] optical range. For example, when 10 bits of data are available, the raw output pixels in [0u, 1023u] will map to [0.0, 1.0]; however, the values of 0 and 1023 will be considered clipped for the sake of average calculation, and so the working range would be [1/1023.0, 1022/1023.0].
|
inlinestatic |
Definition at line 137 of file BayerAverageMap.h.