Ask Your Question
0

Can I add opencv_contrib after installing Oencv3.2 on Ubuntu16.04?

asked 2017-07-06 02:16:18 -0600

GY gravatar image

updated 2017-07-06 02:29:41 -0600

I have installed OpenCV on Ubuntu without opencv_contrib.

So when I want to add opencv_contrib,I followed steps on this page: link text

$ cd <opencv_build_directory>
$ cmake -DOPENCV_EXTRA_MODULES_PATH=<opencv_contrib>/modules <opencv_source_directory>
$ make -j5

Need I uninstall before OpenCV3.2 and install again? or just make install without uninstall?

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
1

answered 2017-07-06 03:09:37 -0600

berak gravatar image

if it WAS opencv3.2, you simply could re-run cmake && make && make install. it would just overwrite the previous opencv main libs, no problem.

unfortunately, we're at 3.3-rc already.

there are 2 choices:

  • build latest version. update both opencv main and opencv_contrib to latest version. try a make uninstall before, then cmake && make && make install , as in your question.

  • stick with opencv3.2. download opencv_contrib v.3.2 and do cmake && make && make install . no uninstall needed.

edit flag offensive delete link more

Comments

1

Thanks!I do as you say and get good result.

GY gravatar imageGY ( 2017-07-06 03:35:35 -0600 )edit

just curious, which option did you choose ?

berak gravatar imageberak ( 2017-07-06 03:52:38 -0600 )edit
1

Indeed,I did cmake && make && make install few minutes before you answered me. I just can't wait for follow-up work! When I click the link " 3.3-rc " , I find the 3.2.0-rc is opencv_contrib-3.2.0-rc.tar.gz. I choose cmake && make && make because my file name is "opencv_contrib-3.2.0.tar.gz" . And it didn't give warnings or errors. Is my choice right? Or how can I distinguish between 3.2 and 3.2-rc ?

GY gravatar imageGY ( 2017-07-06 04:54:59 -0600 )edit
1

it's alright, imho. currently there's not much difference between 3.2 and 3.3rc anyway (but this WILL change !)

berak gravatar imageberak ( 2017-07-06 05:10:39 -0600 )edit
1

the cmake output (also cv::getBuildInformation()) has the exact version (at the top) of the opencv main repo used.

berak gravatar imageberak ( 2017-07-06 05:11:51 -0600 )edit

You have been a great help. I really have a lot to learn.

GY gravatar imageGY ( 2017-07-06 06:21:23 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2017-07-06 02:16:18 -0600

Seen: 500 times

Last updated: Jul 06 '17