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: 
Observer rendres
Observer
2,835 Views
Registered: ‎03-13-2017

Camera Calibration consumes too many BRAM

Jump to solution

Hi!!

 

I am trying to develop a system that uses a stereo pair and a camera in monochrome. Because of that I need to calibrate the three of them.

I use the function InitUndistortRectifyMapInverse which doesnt consume to many resources. However, when I use the hls::remap function, I need to give it <64> (WIN_ROWS field). As I'm using a Zedboard, it only has 140BRAM_36K (or 280BRAM_18K). I can calibrate all the cameras perfectly but hls::Remap uses too many resources for the RGB cameras. If I'm using the monochrome camera my core uses 13% of BRAM and 25% of DSP (this is because of the camera parameters, which are apfixed) but the core of one of the cameras (obviously 3 channels image) uses 36%, as expected it is 3 times more because of the 3 channels used for RGB.

 

My question is: is there any method to remap the image using a 1 channel map and then restoring the color returning to a 3 channel image?

 

I've seen several examples using the remap function, in the majority of the examples WIN_ROWS are 8 or 16. Why do I need to use 64? My image resolution is 640x480

 

Thanks and sorry for my english. It has been difficult to explain...

0 Kudos
1 Solution

Accepted Solutions
Scholar austin
Scholar
4,875 Views
Registered: ‎02-27-2008

Re: Camera Calibration consumes too many BRAM

Jump to solution

r,

 

No apology needed:  you are completely clear in your post.

 

I would look at the resulting calibration data for the monochrome vs. color.  I would first attempt to perform the monochrome calibration, and the use that triplicated for the color situation.  No need to store copies of calibration, re-use the monochrome.  It may be difficult to do in HLS, but might be trivial if coded in verilog (VHDL)...

Austin Lesea
Principal Engineer
Xilinx San Jose

View solution in original post

0 Kudos
5 Replies
Scholar austin
Scholar
4,876 Views
Registered: ‎02-27-2008

Re: Camera Calibration consumes too many BRAM

Jump to solution

r,

 

No apology needed:  you are completely clear in your post.

 

I would look at the resulting calibration data for the monochrome vs. color.  I would first attempt to perform the monochrome calibration, and the use that triplicated for the color situation.  No need to store copies of calibration, re-use the monochrome.  It may be difficult to do in HLS, but might be trivial if coded in verilog (VHDL)...

Austin Lesea
Principal Engineer
Xilinx San Jose

View solution in original post

0 Kudos
Voyager
Voyager
2,816 Views
Registered: ‎06-24-2013

Re: Camera Calibration consumes too many BRAM

Jump to solution

Hey @rendres

 

However, when I use the hls::remap function, I need to give it <64> (WIN_ROWS field).

Who forces you to do that?

 

The following works just fine here:

    hls::Remap<16, 480, 640, HLS_8UC1, HLS_8UC1, HLS_16SC2, HLS_16SC2>(src, dst, m1, m2);

 

... is there any method to remap the image using a 1 channel ...

You can simply use grey image data (e.g. HLS_8UC1) instead of RGB data (e.g. HLS_8UC3).

 

Hope this helps,

Herbert

-------------- Yes, I do this for fun!
0 Kudos
Explorer
Explorer
2,784 Views
Registered: ‎07-17-2014

回复: Camera Calibration consumes too many BRAM

Jump to solution

@rendres
hls::remap is designed for streaming operation for cameras with small vertical disparity.
It contains an internal linebuffer to enable the remapping that contains WIN_ROW rows of the input image.

 

When the difference between the origianl image and the target image in the vertical direction is too large,
the number of rows(WIN_ROW) required to store the orignal image will become larger, which may lead to the
shortage of FPGA resources(RAM).

 

In your case, you can only solve the problem by designing your own function or HDL code.
In may opinion, the existence of the hls::remap fuction only increases the number of video libray fuction in hls.
In practical applications, images are offten large, and the use of hls::remap is often limited.

0 Kudos
Visitor rich_sheep
Visitor
2,510 Views
Registered: ‎07-19-2017

Re: Camera Calibration consumes too many BRAM

Jump to solution

Hey @hpoetzl

 

did you use this function to remap cameras in HLS?

 

I wonder how to storage and transfer map1 and map2 in HLS, could you tell me?

 

i've tried so many times and it still not work.

 

much appreciate~

0 Kudos
Visitor topshang
Visitor
2,122 Views
Registered: ‎10-29-2017

Re: Camera Calibration consumes too many BRAM

Jump to solution

hello ,

        did you solve the problem about  how to storage and transfer map1 and map2 in HLS?

        thanks for reply.

 

0 Kudos