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: 
Highlighted
Observer litaoqiyanjie
Observer
696 Views
Registered: ‎05-08-2018

ZCU104 video capture with opencv library issue???

Jump to solution

I would like to capture video with cv::videocapture cap(0) function, and then do the image processing. 

 

The code like this:

#include<opencv2/core/core.hpp>
#include<opencv2/highgui/highgui.hpp>
#include<opencv2/video/video.hpp>

cv::VideoCapture cap(0);

 

However, the following errors pop up when I compile the code:

 

C:/taosdsoc/tao_hog/test/tao_test/Release/src/xf_hog_descriptor_tb.o: In function `main':
xf_hog_descriptor_tb.cpp:(.text.startup+0x74): undefined reference to `cv::VideoCapture::VideoCapture()'
xf_hog_descriptor_tb.cpp:(.text.startup+0x80): undefined reference to `cv::VideoCapture::open(int)'
xf_hog_descriptor_tb.cpp:(.text.startup+0x9ac): undefined reference to `cv::VideoCapture::~VideoCapture()'
xf_hog_descriptor_tb.cpp:(.text.startup+0x9e4): undefined reference to `cv::VideoCapture::~VideoCapture()'

 

I am not sure what is reason for the errors?

 

Thank you in advance.

 

 

 

0 Kudos
1 Solution

Accepted Solutions
Visitor lulugay
Visitor
623 Views
Registered: ‎03-14-2017

Re: ZCU104 video capture with opencv library issue???

Jump to solution

It seems that you didn't link OpenCV in project settings, 

捕获.PNG

0 Kudos
5 Replies
Xilinx Employee
Xilinx Employee
661 Views
Registered: ‎08-20-2018

Re: ZCU104 video capture with opencv library issue???

Jump to solution

Hi,

 

It is unable to find API declaration.

Please check your include path.

C/C++ settings->C/C++ General->Paths and symbols

check for warning sign on include paths

 

Best Regards,

Nutan

 

 

Best Regards,
Nutan
-------------------------------------------------------------------------------
Please don't forget to reply, kudo and accept as a solution
0 Kudos
Observer litaoqiyanjie
Observer
629 Views
Registered: ‎05-08-2018

Re: ZCU104 video capture with opencv library issue???

Jump to solution

Hi nutang,  thanks for your message!

Here is the error message!

 

collect2.exe: error: ld returned 1 exit status
ERROR: [SdsCompiler 83-5019] Exiting sds++ : Error when calling 'aarch64-linux-gnu-g++ 

 

the compile pops up errors when calling aarch64-linux-gnu-g++

 

Untitled.png

0 Kudos
Visitor lulugay
Visitor
624 Views
Registered: ‎03-14-2017

Re: ZCU104 video capture with opencv library issue???

Jump to solution

It seems that you didn't link OpenCV in project settings, 

捕获.PNG

0 Kudos
Observer litaoqiyanjie
Observer
607 Views
Registered: ‎05-08-2018

Re: ZCU104 video capture with opencv library issue???

Jump to solution

Hi lulugay,

 

Thanks for your reply. 

The solution perfectly works for my project. 

 

0 Kudos
Visitor twlee2
Visitor
155 Views
Registered: ‎11-12-2018

Re: ZCU104 video capture with opencv library issue???

Jump to solution

 

Hello,

I was having the same problem and followed the solution but I am still having a linker problem as following

H:/Xilinx/work/zed_test/src/main.cpp:13: undefined reference to `cv::VideoCapture::retrieve(cv::Mat&, int)'
H:/Xilinx/work/zed_test/src/main.cpp:14: undefined reference to `cv::_InputArray::_InputArray(cv::Mat const&)'
H:/Xilinx/work/zed_test/src/main.cpp:14: undefined reference to `cv::imshow(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cv::_InputArray const&)'

Could you please provide some details of how you have solved this issue?

I am using zcu102 with SDSoC (2017.4) in windows 10.

0 Kudos