Color correction matrix - 2023.2 English

Vitis Libraries

Release Date
2023-12-20
Version
2023.2 English

Color correction matrix algorithm converts the input image color format to output image color format using the colorcorrection matrix provided by the user (CCM_TYPE).

API Syntax

template <int CCM_TYPE, int SRC_T, int DST_T, int ROWS, int COLS, int NPC = 1, int XFCVDEPTH_IN_1 = _XFCVDEPTH_DEFAULT, int XFCVDEPTH_OUT_1 = _XFCVDEPTH_DEFAULT>
void colorcorrectionmatrix(xf::cv::Mat<SRC_T, ROWS, COLS, NPC, XFCVDEPTH_IN_1>& _src_mat,
                           xf::cv::Mat<SRC_T, ROWS, COLS, NPC, XFCVDEPTH_OUT_1>& _dst_mat)

Parameter Descriptions

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

Table 461 Table colorcorrectionmatrix correction Parameter Description
Parameter Description
CCM_TYPE colorcorrection matrix.
SRC_T Input pixel type. 8/10/12/16-bit unsigned, 3 channel are supported (XF_8UC3, XF_10UC3, XF_12UC3, XF_16UC3).
DST_T Output pixel type. 8/10/12/16-bit unsigned, 3 channel are supported (XF_8UC3, XF_10UC3, XF_12UC3, XF_16UC3).
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.
NPC Number of pixels to be processed per cycle; possible options is XF_NPPC1, XF_NPPC2 AND so on
XFCVDEPTH_IN_1 Depth of input image
XFCVDEPTH_OUT_1 Depth of output image
_src_mat Input image
_dst_mat Output image

Resource Utilization

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

Table 462 Table colorcorrectionmatrix correction Resource Utilization Summary
Operating Mode Operating Frequency (MHz) Utilization Estimate
BRAM_18K DSP_48Es FF LUT CLB
1 pixel-8U 300 0 9 283 254 73
1 pixel-16U 300 0 9 353 239 75

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 463 Table colorcorrectionmatrix correction Function Performance Estimate Summary
Operating Mode Operating Frequency (MHz) Latency Estimate Max (ms)
1 pixel 300 7
2 pixel 300 3.6