I am building an application that needs to save nuitrack skeleton data as well as raw image data.
ColorSensor from Nuitrack API I can get the image data, and I want to save it using
cv::imwrite() function from OpenCV.
I noticed that nuitrack installation comes with opencv (2.4.8) shared libraries in
/usr/local/lib/nuitrack, so I downloaded the opencv2.4 include headers from github and wrote
target_link_libraries(skeleton_face nuitrack :libopencv_highgui.so.2.4 :libopencv_core.so.2.4 )
It compiles fine but linking throws the following error:
undefined reference to `cv::imwrite(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cv::_InputArray const&, std::vector<int, std::allocator<int> > const&)' collect2: error: ld returned 1 exit status
I have also tried to compile my own opencv library, tried even different versions (2.4.8, 2.4.13, 3.x) instead of utilizing the ones bundled with nuitrack, but I still get all kinds of linking errors.
This is very strange, because if I don’t link with nuitrack, opencv linking works perfectly. It seems as if
libnuitrack.so is disturbing proper linking of standard opencv functions.