axiStrm2xfMat is used by the consumer kernel to support streaming data transfer between two kernels. Consumer kernel receives data from producer kernel through kernel streaming interface which is defined by hls:stream with the ap_axiu< PTR_WIDTH, 0, 0, 0> data type. axiStrm2xfMat would read from AXI stream and write into xf::cv:Mat based on the particular configuration (bit-depth, channels, pixel-parallelism) the xf::cv:Mat was created.
template <int PTR_WIDTH, int MAT_T, int ROWS, int COLS, int NPC>
void axiStrm2xfMat(hls::stream<ap_axiu<PTR_WIDTH, 0, 0, 0> >& srcPtr, xf::cv::Mat<MAT_T, ROWS, COLS, NPC>& dstMat)
Parameter | Description |
---|---|
PTR_WIDTH | Data width of the input pointer. The value must be power 2, starting from 8 to 512. |
MAT_T | Input Mat type. Example XF_8UC1, XF_16UC1, XF_8UC3 and XF_8UC4 |
ROWS | Maximum height of image |
COLS | Maximum width of image |
NPC | Number of pixels computed in parallel. Example XF_NPPC1, XF_NPPC8 |
srcPtr | Input image of type hls::stream<ap_axiu<PTR_WIDTH, 0, 0, 0> > |
dstMat | Output image of type xf::cv::Mat |