Auto Exposure / Auto White Balance (DM36x processor only)

The DM365 and DM368 support the H3A hardware accelerator for supporting auto

The DM365 and DM368 support the H3A hardware accelerator for supporting auto white balance (AWB) and auto exposure (AE). CMOS or CCD sensor video capture quality can be enhanced with AWB and AE image processing:

  • Auto exposure performs automatic adjustments of the image brightness according to the amount of light that reaches the camera sensor.

  • Auto white balance automatically compensates color differences based on lighting so white actually appears white.

Some camera sensors don't include auto white balance and/or auto exposure processing, so RidgeRun offers a library with AE and AWB algorithms called librraew. This library was initially developed for the DM365/DM368 (DM36x) platform. The DM36x video processing front end (VPFE) has an H3A engine designed to support control loops for auto focus, auto white balance, and auto exposure by collecting statistics about the imaging/video data.


There are two blocks in this module:

 1. Auto focus engine

 2. Auto exposure and auto white balance engine


The librraew library only uses the auto exposure and auto white balance hardware engine, which requires the video frames to be in the Bayer color space. The DM36x does not allow the H3A engine to be used when the color space is YCbCr, which is common if you are using NTSC/PAL composite video input.

The H3A engine divides the frames into two-dimensional blocks of pixels referred to as windows. The engine provides image/video metrics:

  • Accumulation of clipped pixels along with all non-saturated pixels in each window on a per color basis.

  • Accumulation of the sum of squared pixels per color.

  • Minimum and maximum pixels values in each window on a per color basis.


The DM36x H3A engine can be configured to use up to 36 horizontal windows with sum + {sum of squares or min+max} output or up to 56 horizontal windows with sum output.

The H3A engine can also be configured to use up to 128 vertical windows. The width and height for the windows are programmable.

The librraew library was tested using an Aptina MT9P031 CMOS sensor. Support for other sensors was added later, thus validating the librraew design. If you provide the appropriate sensor-specific functions for the library, it can work with any sensor. The implementation is a plain C library and can be re-used with and integrated with any application capable of making C function calls. Image Pipe Daemon uses librraew to provide auto exposure/Auto white balance.

Learn more

Auto Exposure / Auto White Balance (DM36x processor only) allows you to easily test the main features of the boards listed below. 

Platforms Supported



Business Address

RidgeRun,LLC 1307 Shady Ln
Princeton, MN 55371


USA : 1-800-798-6093

INDIA : +91-9686841064

Copyright© 2019 RidgeRun Embedded Solutions. All Rights Reserved.