Ask Your Question
0

Building opencv contrib_module on linux

asked 2015-03-28 05:58:53 -0500

opencvTn gravatar image

Hello,

I am trying to use the Tracking module in https://github.com/Itseez/opencv_contrib. I have used the ccmake and successfully generated and run make -j5 without error. Modules have been built in the build directory but there's no (Extra) libraries in the /include/opencv2 . In other terms I can't locate the .hpp files generated from the contrib_modules.

Thanks

edit retag flag offensive close merge delete

Comments

1

did you run a make install after that ? this should copy headers & libs

berak gravatar imageberak ( 2015-03-28 06:04:17 -0500 )edit

Yes, indeed. I get several lines like this one ([ 86%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/alloc.cpp.o) but it's not copying the extra libs built (the one from contrib).

opencvTn gravatar imageopencvTn ( 2015-03-28 07:47:47 -0500 )edit

Actually I had some libraries disabled the first time I run the make. When I try to build all contrib library I get this error.

Linking CXX shared library ../../lib/libopencv_xobjdetect.so /usr/bin/ld: cannot find -lWRAP /usr/bin/ld: cannot find -lpython collect2: error: ld returned 1 exit status make[2]: * [lib/libopencv_xobjdetect.so.3.0.0] Error 1 make[1]: [modules/xobjdetect/CMakeFiles/opencv_xobjdetect.dir/all] Error 2 make: ** [all] Error 2

Any idea how to fix it ?

opencvTn gravatar imageopencvTn ( 2015-03-28 12:24:36 -0500 )edit
1

cannot find -lWRAP

It means that you use latest version of opencv_contrib with non-latest version of opencv. Please, choose two revisions from the same time moment.

mshabunin gravatar imagemshabunin ( 2015-03-31 03:54:02 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2015-03-30 06:15:45 -0500

opencvTn gravatar image

Solved using ccmake and disabling modules that seems to be broken and showing the same message in my comment.

edit flag offensive delete link more

Comments

Yep that is indeed a big downside to the contrib modules. I am no favorite of building them all and disabling the ones you don't need. I definately think people should switch it around, create an extra CMAKE statement that allows passing all modules to a single parameter you want to built. @mshabunin what do you think?

StevenPuttemans gravatar imageStevenPuttemans ( 2015-03-31 04:43:56 -0500 )edit
1

Yes, I think such whitelist can be useful. Also you can try to create meta-module similar to contrib_world and build only this module.

mshabunin gravatar imagemshabunin ( 2015-04-10 08:36:44 -0500 )edit
Login/Signup to Answer

Question Tools

2 followers

Stats

Asked: 2015-03-28 05:58:53 -0500

Seen: 394 times

Last updated: Mar 30 '15