template<int W>
void AXIvideo2cvMat( hls::stream<ap_axiu<W,1,1,1> >& AXI_video_strm,
                     cv::Mat& cv_mat );


  • AXI_video_strm – input AXI video stream in hls::stream format, compatible with AXI4-Stream protocol.
  • cv_mat – output image in OpenCV cv::Mat format.


Converts data from AXI video stream (hls::stream) format to OpenCV cv::Mat format.
Image data must be stored in AXI_video_strm. Invoking this function will consume the data in AXI_video_strm.
The data width of a pixel in cv_mat must be no greater than W, the data width of TDATA in AXI4-Stream protocol.