The rgbir2bayer
function creates a standard RGB-only-mosaic
and an IR image from input RGB-IR combined mosaic image.
API Syntax
template <int FSIZE1 = 5,
int FSIZE2 = 3,
int BFORMAT = 0,
int TYPE,
int ROWS,
int COLS,
int NPPC = 1,
int XFCVDEPTH_IN = _XFCVDEPTH_DEFAULT,
int XFCVDEPTH_OUT_0 = _XFCVDEPTH_DEFAULT,
int XFCVDEPTH_OUT_1 = _XFCVDEPTH_DEFAULT,
int XFCVDEPTH_OUT_2 = _XFCVDEPTH_DEFAULT,
int BORDER_T = XF_BORDER_CONSTANT,
int USE_URAM = 0>
void rgbir2bayer(xf::cv::Mat<TYPE, ROWS, COLS, NPPC, XFCVDEPTH_IN>& _src,
char R_IR_C1_wgts[FSIZE1 * FSIZE1],
char R_IR_C2_wgts[FSIZE1 * FSIZE1],
char B_at_R_wgts[FSIZE1 * FSIZE1],
char IR_at_R_wgts[FSIZE2 * FSIZE2],
char IR_at_B_wgts[FSIZE2 * FSIZE2],
char sub_wgts[4],
xf::cv::Mat<TYPE, ROWS, COLS, NPPC, XFCVDEPTH_OUT_0>& _dst_rggb,
xf::cv::Mat<TYPE, ROWS, COLS, NPPC, XFCVDEPTH_OUT_1>& _dst_ir)
Parameter Descriptions
The following table describes the template and the function parameters.
Resource Utilization
The following table summarizes the resource utilization in different configurations, generated using Vitis HLS 2021.1 tool for the Xczu9eg-ffvb1156-1-i-es1 FPGA.
Operating Mode | Operating Frequency (MHz) | Utilization Estimate | ||||
---|---|---|---|---|---|---|
BRAM_18K | DSP_48Es | FF | LUT | CLB | ||
1 Pixel | 300 | 37 | 0 | 4345 | 6243 | 1366 |
Performance Estimate
The following table summarizes the performance of the kernel in 1-pixel mode as generated using the Vitis HLS 2021.1 tool for the Xilinx xczu9eg-ffvb1156-2-i-es2 FPGA to process a grayscale 4K (2160x3840) image.
Operating Mode | Latency Estimate |
---|---|
Max Latency (ms) | |
1 pixel operation (300 MHz) | 27.7 |