Thanks for your prompt reply!
The version of my OpenCV is v2.4.9. I do know that it is a very old version, but the code which had the error using #include <opencv2/core.hpp>
, so I think it is using OpenCV v2.x.
And also it has a problem that is the core.hpp
in my opencv 2 is located at opencv2/core/core.hpp
, so I changed it to #include <opencv2/core/core.hpp>
, otherwise it cannot find the location.
The reason why I used sudo apt install libopencv-dev
to install OpenCv is followed the Kinect official instruction, but they only tested in ubuntu 18.04. So I wonder whether the version of OpenCV is installed different by this command in ubuntu 18.04 and ubuntu 16.04?
Maybe I need to try build OpenCV from source, but before that, I need to know the correct version.
Sorry for not provide more clear information before, do you have any ideas about which version I need to build from the source? Thanks again!