Ask Your Question
0

Build ximgproc, contrib, DNN libs separately from OpenCV (C++)

asked 2019-01-23 03:13:14 -0600

Martian gravatar image

I had a difficult time building OpenCV (v3.x) for C++, and I don't want to risk breaking the installation. But I'd like to experiment with the ximgproc/contrib/DNN libs. Is it possible to build them separately and add them to the existing OpenCV install?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2019-01-23 03:29:01 -0600

berak gravatar image

updated 2019-01-23 03:36:36 -0600

no, it is not possible to build modules, without (re)building their dependancies (e.g. core)

you also have to use exactly the same version for opencv and opencv_contrib (e.g. you cannot build current contrib master brach with your opencv3 version)

but you can choose a custom install location, to keep your current (working) install intact:

cmake -DCMAKE_INSTALL_PREFIX=/some/seperate/install/path

and adjust the PATH (windows) or LD_LIBRARY_PATH (linux), so your program will find the new so's.

edit flag offensive delete link more

Comments

Thanks for the clarification, Berak. I thought that I had selected all those additional libraries at the time that I built OpenCV, but evidently not. The build process was so tedious that I didn't want to risk blowing up the existing installation, but perhaps I'll summon the nerve to do that with your suggested mods. :-) I do wish that the build process could be simpler.

Martian gravatar imageMartian ( 2019-01-23 23:10:11 -0600 )edit
1

Berak, You once thought that I had posted the same question multiple times. That was evidently some type of website bug. I'm still seeing the same question appearing multiple times, including this one about ximgproc. Just wanted to let you know that I did not do that. Sometimes refreshing my 'questions page' shows subjects in different order, or duplicated arbitrarily. I haven't seen this on other sites.

Martian gravatar imageMartian ( 2019-01-23 23:57:59 -0600 )edit

@Martian, thanks for the (bug) report !

berak gravatar imageberak ( 2019-01-24 01:03:16 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2019-01-23 03:13:14 -0600

Seen: 700 times

Last updated: Jan 23 '19