Ask Your Question
1

Error compiling OpenCV 3.0 with opencv_contrib on CentOS 6.5

asked 2015-02-14 14:14:39 -0600

genx gravatar image

I'm trying to compile OpenCV with contribution modules https://github.com/Itseez/opencv_contrib .

when I compile OpenCV alone it compiles fine, but when I include the extra modules it doesn't seem to able to include the opencv headers and I get this

In file included from /tmp/opencv/opencvcont/modules/text/include/opencv2/text.hpp:42, from /tmp/opencv/opencvcont/modules/text/src/precomp.hpp:46, from /tmp/opencv/opencv-2.4.9/release/modules/text/opencv_text_pch_dephelp.cxx:1: /tmp/opencv/opencvcont/modules/text/include/opencv2/text/erfilter.hpp:47:28: error: opencv2/core.hpp: No such file or directory In file included from /tmp/opencv/opencvcont/modules/text/include/opencv2/text.hpp:42, from /tmp/opencv/opencvcont/modules/text/src/precomp.hpp:46, from /tmp/opencv/opencv-2.4.9/release/modules/text/opencv_text_pch_dephelp.cxx:1: /tmp/opencv/opencvcont/modules/text/include/opencv2/text/erfilter.hpp:66: error: variable قcv::text::CV_EXPORTS cv::text::ERStatق has initializer but incomplete type

this is my cmake command

cmake -D OPENCV_EXTRA_MODULES_PATH=/tmp/opencv/opencvcont/modules/ -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local .. -DBUILD_TESTS=OFF -DBUILD_PERF_TESTS=OFF -DWITH_OPENCL=OFF -DWITH_OPENEXR=OFF -DWITH_V4L=OFF

and this is one of the modules makelist (i tried to manually include opecv & opencv2 headers but didnt work)

set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR})

include_directories(${CMAKE_CURRENT_BINARY_DIR} /usr/local/include) ...

edit retag flag offensive close merge delete

Comments

sorry, tried, same results, thanks though

genx gravatar imagegenx ( 2015-02-14 14:31:43 -0600 )edit
2

oh wait, you're trying to compile the contrib_repo with opencv2.4.9 ? that most likely won't work. you will need to build opencv3.0, and then try again with the contrib repo.

berak gravatar imageberak ( 2015-02-16 04:31:09 -0600 )edit

1 answer

Sort by » oldest newest most voted
2

answered 2015-02-26 11:16:06 -0600

genx gravatar image

thanks @break, I dont know who did I not notice the release, i had it mixedup with other version, it worked totally fine with OpenCV 3.0

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2015-02-14 14:14:39 -0600

Seen: 1,238 times

Last updated: Feb 26 '15