Auto Exposure Correction - 2023.2 English

Vitis Libraries

Release Date
2023-12-20
Version
2023.2 English

Auto exposure correction improves contrast and brightness of the image and also corrects the exposure of the input frame. The algorithm uses luminence histogram equalization to improve overall exposure and contrast of the image. Luminence (V) is extracted after converting input image to HSV color space. Once the algorthm is applied the image is converted back to RGB color space.

API Syntax

template <int SRC_T, int DST_T, int SIN_CHANNEL_TYPE, int ROWS, int COLS, int NPC = 1, int XFCVDEPTH_IN = _XFCVDEPTH_DEFAULT, int XFCVDEPTH_OUT = _XFCVDEPTH_DEFAULT>
void autoexposurecorrection(xf::cv::Mat<SRC_T, ROWS, COLS, NPC, XFCVDEPTH_IN>& src,
                            xf::cv::Mat<DST_T, ROWS, COLS, NPC, XFCVDEPTH_OUT>& dst,
                            unsigned int hist_array1[1][256],
                            unsigned int hist_array2[1][256])

Parameter Descriptions

The following table describes template parameters and arguments of the function.

Table 288 Table AEC Parameter Description
Parameter Description
SRC_T Input pixel type. XF_8UC3 ,XF_16UC3 are supported
DST_T Output pixel type. XF_8UC3 ,XF_16UC3 are supported
ROWS Maximum height of input and output image
COLS Maximum width of input and output image. In case of N-pixel parallelism, width should be multiple of N.
SIN_CHANNEL_TYPE Single channel type. should be XF_8UC1
NPC Number of pixels to be processed per cycle; possible options are XF_NPPC1,XF_NPPC2,XF_NPPC4 and XF_NPPC8 for 1,2,4 pixel and 8 pixel operations respectively.
USE_URAM Enable to map storage structures to UltraRAM.
XFCVDEPTH_IN Depth of input image
XFCVDEPTH_OUT Depth of output image
src Input image
dst Output image
hist_array1 Histogram array
hist_array2 Histogram array

Resource Utilization

The following table summarizes the resource utilization of kernel in different configurations, generated using Vitis HLS 2020.2 tool, to process a FULL HD image.

Table 289 Table AEC Resource Utilization Summary
Operating Mode Operating Frequency (MHz) Utilization Estimate
BRAM_18K DSP_48Es FF LUT CLB
1 pixel 300 4 18 6713 2996 1103
2 pixel 300 4 27 7618 3705 1257

Performance Estimate

The following table summarizes a performance estimate of the kernel in different configurations, as generated using Vitis HLS 2020.2 tool, to process a FULL HD image.

Table 290 Table AEC Function Performance Estimate Summary
Operating Mode Operating Frequency (MHz) Latency Estimate Max (ms)
1 pixel 300 7
2 pixel 300 3.7