tiangolo
tiangolo

Reputation: 1606

Build opencv_contrib sample executables on Linux (OpenCV 3.0.0-alpha)

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:

Thanks in advance!

Upvotes: 1

Views: 6147

Answers (1)

tiangolo
tiangolo

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

Related Questions