Opencv_contrib: Building aruco samples from opencv_contrib_modules

Created on 6 Mar 2016  路  5Comments  路  Source: opencv/opencv_contrib

Hey there, I've got a problem building aruco sample applications.
Hers what i've done so far:
I'downloaded opencv and the opencv_contrib-master, installed all the dependencies as they said on the opencv website:
sudo apt-get install build-essential
sudo apt-get install cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev
sudo apt-get install python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libjasper-dev libdc1394-22-dev

Then I Iset up the build process for opencv with ccmake and specified the OPENCV_EXTRA_MODULES_PATH pointing to the contrib modules
then I compiled everything and ran sudo make install (without errors)

Now when I go to ~/opencv/opencv_contrib-master/modules/aruco, create a build directory and try to run ccmake, it gives the error:
(ocv_define_module): Unknown CMake command "ocv_define_module".
[and the warning that a lines is missing whichs defines the minimum required version... which I could eliminate by adding: "cmake_minimum_required(VERSION 2.8)" at the top of the file ]

the content of the cmakelits.txt in the /opencv_contrib-master/modules/aruco folder is only the two lines:
set(the_description "ArUco Marker Detection")
ocv_define_module(aruco opencv_core opencv_imgproc opencv_calib3d WRAP python)

has anyone experienced the same problem and could help me? I'm stuck here for days...
thank you very much!
Regards

question (invalid tracker)

Most helpful comment

You can't build only aruco module at this moment (these modules are not standalone).
You need to build whole OpenCV with additional contrib modules.

All 5 comments

You can't build only aruco module at this moment (these modules are not standalone).
You need to build whole OpenCV with additional contrib modules.

thanks for your answer, I built the whole OpenCV with the modules (I set the extra_modules_path variable).
My question was a misleading, sorry (I'm new to software development under linux...)

What I want to do is to change one of the samples (namely: detect_board.cpp) in the [...]/opencv_contrib-master/modules/aruco folder and compile it without having to compile everything again. So how can I take this example out and work on it seperatly?
By seperately I mean that I copy it out into an new folder structure and build this example seperately with an extra cmake file, not building whole opencv again.

Take a look here: https://github.com/Itseez/opencv/tree/master/samples/cpp/example_cmake
You need to point to OpenCV binary directory via OpenCV_DIR CMake variable (or via CMAKE_PREFIX_PATH to installation directory).

Now I got it! 'm able to build the (modified) example application.
Thank you very much!

To build the examples all you have to do is turn on the BUILD_EXAMPLES option when you build opencv_contrib. See the following in the README:

If you also want to build the samples from the "samples" folder of each module, also include the "-DBUILD_EXAMPLES=ON" option.

Was this page helpful?
0 / 5 - 0 ratings