The merge
function, merges single channel images into a
multi-channel image. The number of channels to be merged should be two, three or four.
API Syntax
template<int SRC_T, int DST_T, int ROWS, int COLS, int NPC=1, int XFCVDEPTH_IN_1 = _XFCVDEPTH_DEFAULT, int XFCVDEPTH_IN_2 = _XFCVDEPTH_DEFAULT, int XFCVDEPTH_IN_3 = _XFCVDEPTH_DEFAULT, int XFCVDEPTH_IN_4 = _XFCVDEPTH_DEFAULT, int XFCVDEPTH_OUT_1 = _XFCVDEPTH_DEFAULT>
void merge(xf::cv::Mat<SRC_T, ROWS, COLS, NPC, XFCVDEPTH_IN_1> &_src1, xf::cv::Mat<SRC_T, ROWS, COLS, NPC, XFCVDEPTH_IN_2> &_src2, xf::cv::Mat<SRC_T, ROWS, COLS, NPC, XFCVDEPTH_IN_3> &_src3, xf::cv::Mat<SRC_T, ROWS, COLS, NPC, XFCVDEPTH_IN_4> &_src4, xf::cv::Mat<DST_T, ROWS, COLS, NPC, XFCVDEPTH_OUT_1> &_dst)
template<int SRC_T, int DST_T, int ROWS, int COLS, int NPC=1, int XFCVDEPTH_IN_1 = _XFCVDEPTH_DEFAULT, int XFCVDEPTH_IN_2 = _XFCVDEPTH_DEFAULT, int XFCVDEPTH_IN_3 = _XFCVDEPTH_DEFAULT, int XFCVDEPTH_OUT_1 = _XFCVDEPTH_DEFAULT>
void merge(xf::cv::Mat<SRC_T, ROWS, COLS, NPC, XFCVDEPTH_IN_1> &_src1, xf::cv::Mat<SRC_T, ROWS, COLS, NPC, XFCVDEPTH_IN_2> &_src2, xf::cv::Mat<SRC_T, ROWS, COLS, NPC, XFCVDEPTH_IN_3> &_src3, xf::cv::Mat<DST_T, ROWS, COLS, NPC, XFCVDEPTH_OUT_1> &_dst)
template<int SRC_T, int DST_T, int ROWS, int COLS, int NPC=1, int XFCVDEPTH_IN_1 = _XFCVDEPTH_DEFAULT,int XFCVDEPTH_IN_2 = _XFCVDEPTH_DEFAULT, int XFCVDEPTH_OUT_1 = _XFCVDEPTH_DEFAULT>
void merge(xf::cv::Mat<SRC_T, ROWS, COLS, NPC, XFCVDEPTH_IN_1> &_src1, xf::cv::Mat<SRC_T, ROWS, COLS, NPC, XFCVDEPTH_IN_2> &_src2, xf::cv::Mat<DST_T, ROWS, COLS, NPC, XFCVDEPTH_OUT_1> &_dst)
Parameter Descriptions
The following table describes the template and the function parameters.
Paramete r | Description |
---|---|
SRC_T | Input pixel type. Only 8-bit, unsigned, 1, channel is supported (XF_8UC1) |
DST_T | Output pixel type. 8-bit, unsigned,2,3 and 4 channels are supported (XF_8UC2, XF_8UC3 and XF_8UC4) |
ROWS | Maximum height of input and output image. |
COLS | Maximum width of input and output image. Must be multiple of 8 for 8 pixel mode. |
NPC | Number of pixels to be processed per cycle; possible options are XF_NPPC1 for 1 pixel operation. |
XFCVDEPTH_IN_1 | Depth of input image |
XFCVDEPTH_IN_2 | Depth of input image |
XFCVDEPTH_IN_3 | Depth of input image |
XFCVDEPTH_IN_4 | Depth of input image |
XFCVDEPTH_OUT_1 | Depth of output image |
_src1 | Input single-channel image |
_src2 | Input single-channel image |
_src3 | Input single-channel image (only for 3 and 4 input config) |
_src4 | Input single-channel image (only for 4 input config) |
_dst | Output multi-channel image |
Resource Utilization
The following table summarizes the resource utilization of the merge function, generated using Vivado HLS 2019.1 tool for the Xczu9eg-ffvb1156-1-i-es1 FPGA, to process 4 single-channel HD (1080x1920) images.
Operating Mode | Operating Frequency (MHz) | Utilization Estimate | ||||
---|---|---|---|---|---|---|
BRAM_18K | DSP_48Es | FF | LUT | CLB | ||
1 Pixel | 300 | 0 | 8 | 494 | 386 | 85 |
Performance Estimate
The following table summarizes the performance in different configurations, as generated using Vivado HLS 2019.1 tool for the Xczu9eg-ffvb1156-1-i-es1, to process 4 single channel HD (1080x1920) images.
Operating Mode | Latency Estimate |
---|---|
Max Latency (ms) | |
1 pixel operation (300 MHz) | 6.92 |