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.
Parameter | Description |
---|---|
SRC_T | Input pixel type. 8-bit unsigned 3 channel is supported (XF_8UC3). |
DST_T | Output pixel type. 8-bit unsigned 3 channel is supported (XF_8UC3). |
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 is XF_NPPC1, XF_NPPC2 AND so on |
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.
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.
Operating Mode | Operating Frequency (MHz) | Latency Estimate Max (ms) |
---|---|---|
1 pixel | 300 | 7 |
2 pixel | 300 | 3.7 |