Ask Your Question
0

building OpenCV 3 with extra modules

asked 2014-10-05 18:36:06 -0600

mope001 gravatar image

updated 2014-10-05 18:40:46 -0600

Hello everyone! Could you please help me solve this problem? While running make I have this issue:

[100%] Built target opencv_test_xfeatures2d

In file included from /home/a/openCV/OpenCV/opencv_contrib/modules/ccalib/src/ccalib.cpp:47:0:

/home/a/openCV/OpenCV/opencv_contrib/modules/ccalib/include/opencv2/ccalib.hpp:94:97: error: ‘SOLVEPNP_ITERATIVE’ was not declared in this scope OutputArray rvec, OutputArray tvec, bool useExtrinsicGuess = false, int flags = SOLVEPNP_ITERATIVE);

...........

                                                                                            ^

make[2]: * [modules/ccalib/CMakeFiles/opencv_ccalib.dir/src/ccalib.cpp.o] Error 1

make[1]: * [modules/ccalib/CMakeFiles/opencv_ccalib.dir/all] Error 2

make: * [all] Error 2

I use following cmake:

cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_CUBLAS=ON -D WITH_CUFFT=ON -D WITH_EIGEN=OFF -D WITH_OPENGL=ON -D WITH_QT=ON -D WITH_TBB=ON -D BUILD_DOCS=ON -D BUILD_EXAMPLES=ON -D BUILD_TESTS=ON -D CUDA_ARCH_BIN="3.0" -D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib/modules ..

edit retag flag offensive close merge delete

Comments

All lucky you, just tried out your problem, seems the bugs even get bigger. The introduced ccv module isn't building like it should. Will look into this and keep you up to date!

StevenPuttemans gravatar imageStevenPuttemans ( 2014-10-06 04:47:15 -0600 )edit

1 answer

Sort by » oldest newest most voted
2

answered 2014-10-06 04:58:14 -0600

Temporarily solution:

  1. Grab the latest master branch of opencv and opencv_contrib repositories
  2. Disable the ccv module using this command

    cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_CUBLAS=ON -D WITH_CUFFT=ON -D WITH_EIGEN=OFF -D WITH_OPENGL=ON -D WITH_QT=ON -D WITH_TBB=ON -D BUILD_DOCS=ON -D BUILD_EXAMPLES=ON -D BUILD_TESTS=ON -D CUDA_ARCH_BIN="3.0" -D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib/modules .. -DBUILD_opencv_cvv=OFF

This works perfectly fine on my system here. Can you try it out?

edit flag offensive delete link more

Comments

And to add, if you just put QT off, then cvv module doesn't get built at all. More info at the bug report: http://code.opencv.org/issues/3941#note-1

StevenPuttemans gravatar imageStevenPuttemans ( 2014-10-06 05:50:26 -0600 )edit

Thanks for the answer, Steven! However, this cant solve the problem for me. I have tried to avoid this error by using "-DBUILD_opencv_ccalib=OFF". Unfortunately, I got another error:

Generator error: the class for method createDTFilter is missing make[2]: * [modules/python2/pyopencv_generated_include.h] Error 255 make[1]: [modules/python2/CMakeFiles/opencv_python2.dir/all] Error 2 make[1]: ** Waiting for unfinished jobs....

Could you please help me solve this problem?

PS: There is no errors if I add to cmake "-D BUILD_opencv_python2=OFF". However, I still cant use opencv_contrib modules using python 2.7

mope001 gravatar imagemope001 ( 2014-10-07 04:59:55 -0600 )edit
1

o you are making python wrappers. Ignore this, havent tried building the python wrappers myself. Always using the C++ interface.

StevenPuttemans gravatar imageStevenPuttemans ( 2014-10-07 06:00:28 -0600 )edit

Could you clarify this for me? Does "-D BUILD_opencv_python2=OFF" mean that you wont install python wrappers? And can I use opencv from python without these wrappers? I thought there are two alternatives: wrappers or compiled libraries like some_module.o which you can call in terminal, for example. So now I can use some_module.o files from python. Am I right?

mope001 gravatar imagemope001 ( 2014-10-07 06:27:02 -0600 )edit

You need the python wrappers to be able to use OpenCV in its python interface, but I am not an expert in that. Maybe @berak can help you out here.

StevenPuttemans gravatar imageStevenPuttemans ( 2014-10-07 07:43:37 -0600 )edit
  • "-D BUILD_opencv_python2=OFF" will disable all python(2.*) bindings. no idea, if i understand you right, but there's no seperate module for the 'main' and the 'contrib' parts, they all go into the same cv2.pyd

  • i did not try to build cvv (no Qt here)

  • "-DBUILD_opencv_ccalib=OFF" won't work. there is no module named ccalib.
  • createDTFilter is from ximgproc. weird error, builds fine for me.(yes, python wrappers, too)

>>> help(cv2.ximgproc.createDTFilter)

Help on built-in function createDTFilter:

createDTFilter(...)

createDTFilter(guide, sigmaSpatial, sigmaColor[, mode[, numIters]]) -> retval
berak gravatar imageberak ( 2014-10-07 07:59:23 -0600 )edit

@berak the ccalib module does exist, take a look here

StevenPuttemans gravatar imageStevenPuttemans ( 2014-10-07 08:03:41 -0600 )edit

Question Tools

Stats

Asked: 2014-10-05 18:36:06 -0600

Seen: 14,529 times

Last updated: Oct 06 '14