Problem installing opencv_contrib functionality. [closed]

asked 2015-02-11 14:00:47 -0600

Potato gravatar image

I have tried building OpenCV 2.4.10 and 3.0.0 beta with the additional modules in opencv_contrib. I have followed the instructions on the page as well but I keep getting an error when I use the make command.

My command (I am within the build directory) cmake -D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib/modules -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local ..

--> https://github.com/Itseez/opencv_contrib

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by sturkmen
close date 2017-08-22 11:05:45.865451

Comments

1

... and the error is ?

(btw, contrib repo might not work with opencv2.4.x, due to different header structure)

berak gravatar imageberak ( 2015-02-11 14:12:08 -0600 )edit

You were right. It doesn't work on 2.4.10 I have the added modules in my opencv3.0.0/build/modules! Thanks for your help. If I needed to compile something with the added functionality, how would the command go?

Potato gravatar imagePotato ( 2015-02-11 14:28:11 -0600 )edit

While compiling and running a sample image.cpp, the code compiles, but during run-time I get the following error: ./image: error while loading shared libraries: libopencv_adas.so.3.0: cannot open shared object file: No such file or directory

Compiled using: g++pkg-config --libs --cflags opencv-o image image.cpp

Potato gravatar imagePotato ( 2015-02-11 14:34:45 -0600 )edit
2

oh, wait, that seems to be a new problem. go back to building the opencv / opencv_contrib repo, and disable the adas module:

cmake -DBUILD_opencv_adas=OFF

it's a bit weird, that used to be a prob on windows only, since there's no mudule code (only the tools), the linker does not generate a .lib file.

(also, no fear, if you want to use the waldboost training, you can easily go to that folder, and build the tools with the local CmakeLists.txt, in other words: you do not need this as a opencv module)

berak gravatar imageberak ( 2015-02-11 14:47:10 -0600 )edit

Thank you berak! That did fix the problem. I do have another question. Since I have 3.0.0 running now, none of my 2.4.10 written code compiles. I use g++ pkg-config --libs --cflags opencv-o image image.cpp to compile here as well. How would I fix this problem?

Potato gravatar imagePotato ( 2015-02-12 07:20:12 -0600 )edit

if you used CMAKE_INSTALL_PREFIX=/usr/local for the 3.0 install, you'vre probably overwritten the 2.4 libs/headers. again, you should have choosen a different install location for your 3.0 stuff.

we had this discussion before, didn't we ?

berak gravatar imageberak ( 2015-02-12 07:38:19 -0600 )edit

My apologies. I didn't follow up on that. Thank you again.

Potato gravatar imagePotato ( 2015-02-12 07:55:00 -0600 )edit

What does this error mean --> Failed to load openCL runtime? This happens when I run any code. The code runs fine, but this is output at first.

Potato gravatar imagePotato ( 2015-02-12 07:57:12 -0600 )edit

sorry, no idea about opencl (no such thing here) ;(

berak gravatar imageberak ( 2015-02-12 08:11:43 -0600 )edit
1

I found the fix for that. I had to disable opencl --> -D WITH_OPENCL=OFF

Thanks again for your help

Potato gravatar imagePotato ( 2015-02-12 09:30:43 -0600 )edit