Argus API
Argus Camera API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Member Functions | Static Public Member Functions | Protected Member Functions
Argus::Ext::IBayerAverageMap Class Reference

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>

Inheritance diagram for Argus::Ext::IBayerAverageMap:
Argus::Interface Argus::NonCopyable

List of all members.

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 InterfaceIDid ()

Protected Member Functions

 ~IBayerAverageMap ()
- Protected Member Functions inherited from Argus::Interface
 Interface ()
 ~Interface ()

Detailed Description

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 (

See also:
IBayerAverageMap::getWorkingRange()). Pixels outside of the working range will be excluded from average calculation and added to the clipped count for the region (
IBayerAverageMap::getClipCounts()).

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.


Constructor & Destructor Documentation

Argus::Ext::IBayerAverageMap::~IBayerAverageMap ( )
inlineprotected

Definition at line 207 of file BayerAverageMap.h.


Member Function Documentation

virtual Status Argus::Ext::IBayerAverageMap::getAverages ( Array2D< BayerTuple< float > > *  averages) const
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 (

See also:
IBayerAverageMap::getWorkingRange()). Any input pixels having values outside the working range will be excluded from average calculation and will increment the clip count (
IBayerAverageMap::getClipCounts()).
Parameters:
[out]averagesThe output array to store the averages for all bins. This 2-dimensional array will be sized as returned by
See also:
getBinCount(), where each array element is a floating point BayerTuple containing the R, G_EVEN, G_ODD, and B averages for that bin.
virtual Size Argus::Ext::IBayerAverageMap::getBinCount ( ) const
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

See also:
IBayerAverageMap::getAverages() or
IBayerAverageMap::getClipCounts().
virtual Size Argus::Ext::IBayerAverageMap::getBinInterval ( ) const
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.

virtual Size Argus::Ext::IBayerAverageMap::getBinSize ( ) const
pure virtual

Returns the size of each bin, in pixels.

virtual Location Argus::Ext::IBayerAverageMap::getBinStart ( ) const
pure virtual

Returns the starting location of the first bin, in pixels.

Relative to the top-left corner of the image.

virtual Status Argus::Ext::IBayerAverageMap::getClipCounts ( Array2D< BayerTuple< uint32_t > > *  clipCounts) const
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 (

See also:
IBayerAverageMap::getWorkingRange()).
Parameters:
[out]clipCountsThe output array to store the clip counts for all bins. This 2-dimensional array will be sized as returned by
See also:
getBinCount(), where each array element is a uint32_t BayerTuple containing the R, G_EVEN, G_ODD, and B clip counts for that bin.
virtual Range<float> Argus::Ext::IBayerAverageMap::getWorkingRange ( ) const
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 (

See also:
IBayerAverageMap::getClipCount()).

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].

static const InterfaceID& Argus::Ext::IBayerAverageMap::id ( )
inlinestatic

Definition at line 137 of file BayerAverageMap.h.


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