06-02-2014 09:02 AM
I am currently designing a video processing pipeline and I wanna try the function in the hls library named hls::Remap (as cvRemap).
My problem is that I don't understand why I couldn't use AXI4 Stream to interface map1 and map2. I have an error indicates that AXI stream support only fifo interface and to choose the correct interface for the data channel.
Has anyone an idea how can I solve this problem?
06-02-2014 11:29 PM
For AXI4 stream interface you have to use ap_fifo. Refer to the diagram below.
06-03-2014 12:30 AM
Thank you for your reply,
I understand what you mean but my problem is that I can use AXI Stream to interface input video data and output video. And I can't interface map1 and map2 as AXI Stream. The hls::Remap function prototype is :
Mat<ROW, COL, SRC_T> &src,
Mat<ROW, COL, DST_T> &dst,
Mat<ROW, COL, MAP1_T> &map1,
Mat<ROW, COL, MAP2_T> &map2);
I can interface src and dst as AXI4 Stream but not map1 and map2 even if they are all hls::Mat object.
10-22-2014 10:17 AM
I think I can try to provide help from checking the source code.. I guess you moved on but this may help other users or someone will have a better answer.
You're interested by hls::Remap() and UG902 describes InitUndistortRectifyMap as : <<Generates map1 and map2, based on a set of parameters, where map1 and map2 are suitable inputs for hls::Remap()>> then reading on <VHLS_INCLUDE_PATH>/hls/hls_video_undistort.h at the very bottom, InitUndistortRectifyMap calls InitUndistortRectifyMapInverse which itself generate those remapping only if MAP1_T==HLS_16SC2;
So I guess this is your answer... use HLS_16SC2 for the type in your code and use InitUndistortRectifyMap to generate those.
As for all OpenCV designs you would have to use the DATAFLOW directive.
Again this is all based on reverse engineering, not experience and I hope it helps you or others.
10-23-2014 12:38 AM
Thank you very much for yor answer. We moved on and we found another solution. We developed a function in Vivado HLS that considers the camera's parameters to directly output the remapped image with a formula so we left the solution with the hls library using InitUndistortRectifyMap.
11-02-2017 05:19 AM
can you tell us how to developed a function in Vivado HLS that considers the camera's parameters to directly output the remapped image with a formula?
what's the formula?
hope to rely, than you.