cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Observer
Observer
19,082 Views
Registered: ‎06-12-2009

OpenCV Video Libraries in Vivado HLS

Jump to solution

Hello.

 

I have just downloaded Vivado 2013.1 and I am trying to #include <hls_opencv.h> into my VivadoHLS design.  However, whenever I try to compile my design VivadoHLS claims that it cannot find cv.h, cxcore.h, or highgui.h. These files are all included by hls_opencv.h.  I tried adding the include path to my opencv build.  This got rid of the errors in the source highlighting but didn't remove the compilation errors.

 

Are the opencv headers and libraries supposed to be included within VivadoHLS or am I supposed to download it?

If I am supposed to download it is there a specific version I am supposed to get?

Does OpenCv need to be configured in a special way?


Thanks.

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Xilinx Employee
Xilinx Employee
26,349 Views
Registered: ‎08-17-2011

greetings,

You're in luck, xapp1167 has just been released.
xilinx.com > support > documentation > search xapp1167
However the zip file download link doesn't work just now at least for me.. I asked this to be looked into.

EDIT: a link that works is: www.xilinx.com/support/documentation/application_notes/xapp1167.zip
HTH

- 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.

View solution in original post

0 Kudos
14 Replies
Highlighted
Newbie
Newbie
19,038 Views
Registered: ‎04-05-2013

Hi,

 

I have been experiencing exactly the same issues as you described and would like to know if anyone have developed a solution to this problem.

 

Thanks 

0 Kudos
Highlighted
Observer
Observer
19,034 Views
Registered: ‎06-12-2009

No solution on my end yet. The xapp, Accelerating OpenCV Applications with Zynq using Vivado HLS Video Libraries (XAPP1167), sounds like it might have a solution, unfortunately it doesn't seem to be available yet.

 

Does know where we can find XAPP1167 or when it will be available?  

 

Thanks.

0 Kudos
Xilinx Employee
Xilinx Employee
18,972 Views
Registered: ‎10-10-2012

Hi jsmonson,

 

OpenCV libraries is not included in Vivado HLS 2013.1, you need to download it (http://opencv.org/downloads.html), I guess version  2.4.3 or later will be ok.

After downloading the OpenCV package, just compile/install it following the OpenCV's instruction depends on your OS.

 

 

0 Kudos
Highlighted
Xilinx Employee
Xilinx Employee
18,972 Views
Registered: ‎10-10-2012

XAPP1167 will be available in several days:) It is highly recommended to get started with OpenCV design in Vivado HLS.

0 Kudos
Highlighted
Observer
Observer
18,946 Views
Registered: ‎06-12-2009

Thanks for responding.  I will download OpenCV and check out XAPP1167 when it is available.

0 Kudos
Highlighted
Xilinx Employee
Xilinx Employee
26,350 Views
Registered: ‎08-17-2011

greetings,

You're in luck, xapp1167 has just been released.
xilinx.com > support > documentation > search xapp1167
However the zip file download link doesn't work just now at least for me.. I asked this to be looked into.

EDIT: a link that works is: www.xilinx.com/support/documentation/application_notes/xapp1167.zip
HTH

- 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.

View solution in original post

0 Kudos
Highlighted
Observer
Observer
18,487 Views
Registered: ‎04-22-2013
Dear Herve,

This app note is for xilinx zc702 board, Is there any difference it application if i am trying to run it on Zedboard which has same FPGA on it.

thanks
umair
0 Kudos
Highlighted
Explorer
Explorer
17,477 Views
Registered: ‎09-02-2013

I still cannot include the three .h files.

I ctrl-click them in Vivado HLS and it instantly open the .h file, but when i start synthesizing, it's impossible to find it.

How do I include these files if telling the compiler exactly where they are doesn't work, even when the program itself actually finds the files???

0 Kudos
Highlighted
Xilinx Employee
Xilinx Employee
17,470 Views
Registered: ‎08-17-2011

You probably have to set the CFLAGS for the testbench files to  -IC:\Xilinx\Vivado_HLS\2013.2\include\opencv

In case you don't know, #include <file.h> indicates to search for file.h in the include path whereas #include "file.h" would searh in the source location - this is not specifc to VHLS but normal C programming.

I don't think you need anything else w.r.t. csynthesis - could you elaborate?

 

- 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
Highlighted
Explorer
Explorer
8,990 Views
Registered: ‎09-02-2013

Did not know, or at least don't remember, the difference between <> and "", but I had my suspicions.

I am using the default code in the xapp1167 demo, and that one has the includes written as:

#include <cv.h>
#include <cxcore.h>
#include <highgui.h>

 

It suddenly worked now for some reason. I have during today and yesterday thrown in several paths in different places such as

C:/Xilinx/Vivado_HLS/2013.2/include  (Under which opencv folder also resides) 

so that it appeared under the "includes" category, but it still wouldn't work. Now it did. I did switch back and forth between the <> and "" a few times but it should have worked because the path I just linked was one of the first ones I added.

 

I am confused, but thanks for your help.

 

0 Kudos
Highlighted
8,900 Views
Registered: ‎08-27-2013

Hello dahenk,

 

I had the same problem XD. 

 

You can see the difference in the following link:

http://gcc.gnu.org/onlinedocs/cpp/Include-Syntax.html

 

Hope it helps to understand it :).

 

Regards

0 Kudos
Highlighted
Explorer
Explorer
8,441 Views
Registered: ‎09-02-2013

Ok somehow I'm back in this again and can't include the files.

 

I never understood why it worked last time, and I've added the path "C:/Xilinx/Vivado_HLS/2013.2/include/opencv" everywhere possible.

 

Is there any documentation or guide that shows how to get OpenCV test bench working in Vivado HLS?

0 Kudos
Highlighted
Visitor
Visitor
2,948 Views
Registered: ‎07-12-2016

Can you please provide the original files which were released with the xapp1167 pdf. The files i can download now are a different version and I am not able to run the scripts, even the contents are very different. Been looking for the old version for hours unable to find.

Thanks in advance

0 Kudos
Highlighted
Xilinx Employee
Xilinx Employee
2,911 Views
Registered: ‎08-17-2011

Hi @ammar114

 

please start a new thread with your issues but the design / app note has not changed so what you download is an "old" version, for example, readme.txt at root of zip file says :

 

Current README.txt Version: 1.0.6
Date Created:        01FEB2013
Date Last Modified:  30APR2015

- 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