I am trying to alter the hello-classification example present under /opt/intel/openvino/inference_engine/samples/hello_classification directory.
Intention is to read a video file and pass the image one by one in the code itself instead of passing it from command line one image per run.
Hence I have used opencv C++ VideoCapture() API. But the object instation code itself cribs about undefined reference. I have verified the LD_LIBARARY_PATH to be properly pointing to "/opt/intel/openvino_2019.3.334/opencv/lib"
The code i have added is as simple as one liner as below
Exact errors are pasted below:
[100%] Linking CXX executable ../intel64/Release/hello_classification
CMakeFiles/hello_classification.dir/main.cpp.o: In function `main':
main.cpp:(.text.startup+0x88f): undefined reference to `cv::VideoCapture::VideoCapture(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)'
main.cpp:(.text.startup+0xc4d): undefined reference to `cv::VideoCapture::~VideoCapture()'
main.cpp:(.text.startup+0xe68): undefined reference to `cv::VideoCapture::~VideoCapture()'
collect2: error: ld returned 1 exit status
The same code links well for cv::imread() function. Please let me know if I missed to set any other environment variable.
We have a simple classifier c++ demo using a camera with an Intel Neural Compute Stick 2. It may be easier to modify that sample to read a video file. Take a look the following code: https://github.com/movidius/ncappzoo/blob/master/apps/simple_classifier_cpp_camera/run.cpp
Hope this helps.