UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Visitor nyrn3dlab
Visitor
6,847 Views
Registered: ‎04-23-2014

hls::Remap

Hi,

 

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?

 

Best regards,

Ny

0 Kudos
5 Replies
Moderator
Moderator
6,827 Views
Registered: ‎04-17-2011

Re: hls::Remap

For AXI4 stream interface you have to use ap_fifo. Refer to the diagram below.

Interface.PNG

Regards,
Debraj
----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------------
0 Kudos
Visitor nyrn3dlab
Visitor
6,825 Views
Registered: ‎04-23-2014

Re: hls::Remap

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 :

 

void Remap(
           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.

 

Regards

0 Kudos
Xilinx Employee
Xilinx Employee
6,307 Views
Registered: ‎08-17-2011

Re: hls::Remap

Hi @nyrn3dlab 

 

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.

- Hervé

SIGNATURE:
* New Dedicated Vivado HLS forums* http://forums.xilinx.com/t5/High-Level-Synthesis-HLS/bd-p/hls
* Readme/Guidance* http://forums.xilinx.com/t5/New-Users-Forum/README-first-Help-for-new-users/td-p/219369

* Please mark the Answer as "Accept as solution" if information provided is helpful.
* Give Kudos to a post which you think is helpful and reply oriented.
0 Kudos
Visitor nyrn3dlab
Visitor
6,298 Views
Registered: ‎04-23-2014

Re: hls::Remap

Hi @herver! 

 

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.

 

Best regards,

 

Ny

0 Kudos
Visitor topshang
Visitor
1,244 Views
Registered: ‎10-29-2017

Re: hls::Remap

hello, 

   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.