Reputation: 1606
System: VM Ubuntu 14.04 x64
Summary:
I'm building OpenCV 3.0.0-dev with the contrib modules from https://github.com/Itseez/opencv_contrib but I can't get the executables from opencv_contrib.
I was trying to follow this tutorial about the tracking API: http://docs.opencv.org/trunk/modules/tracking/doc/tracking.html
Somewhere it says: To see how API works, try tracker demo: https://github.com/lenlen/opencv/blob/tracking_api/samples/cpp/tracker.cpp
But that's a forked old repository (by user lenlen), not the official repository. In the recent versions (with the new repos) it seems like that file is not in that location anymore but in: https://github.com/Itseez/opencv_contrib/blob/master/modules/tracking/samples/tracker.cpp
The problem: I'm being able to build OpenCV without errors, but I can't see how to build that executable file from opencv_contrib, or where is it getting located.
I've tried:
OPENCV_EXTRA_MODULES_PATH
with: cmake -D OPENCV_EXTRA_MODULES_PATH=../opencv_contrib/modules ..
INSTALL_C_EXAMPLES
with: cmake -D INSTALL_C_EXAMPLES=ON ..
opencv_contrib
, creating and entering into a "build
" directory and from there executing: "cmake ..
" ...but that gives errors (no CMakeLists.txt).opencv_contrib/modules/tracking/
", creating and entering into a "build
" directory and executing "cmake ..
" (because there's a CMakeLists.txt inside of the tracking
directory). But that also gives errors.opencv_contrib/modules/tracking/samples/
" and executing "g++ tracker.cpp
", but that also gives errors.Thanks in advance!
Upvotes: 1
Views: 6147
Reputation: 1606
I solved it. It was a silly mistake.
I was setting up OPENCV_EXTRA_MODULES_PATH
as: cmake -D OPENCV_EXTRA_MODULES_PATH=../opencv_contrib/modules ..
But my working directory was "opencv/build/
" (I was in a directory "build
" inside of opencv and the "opencv_contrib
" was in the same directory as "opencv
"), so that variable should have been: cmake -D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib/modules ..
Upvotes: 3