Ask Your Question
0

Build one module of opencv

asked 2017-02-07 01:39:26 -0600

If i want to build only one module from opencv 2.4 repository.

What's the cmake options to do this ? For example i want to build only the nonfree module for C++.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2017-02-07 01:47:55 -0600

berak gravatar image

you won't need all opencv modules, but there are dependancies.

if you look at the CmakeLists.txt , you'll find:

opencv_imgproc opencv_features2d opencv_calib3d

(implicitly, those will depend on opencv_core, too)

edit flag offensive delete link more

Comments

ok, consider this situation , i am on jetson platform which use opencv4tegre and i want use nonfree module but i don't want to miss up with it opencv4tegre. so if i build opencv2.4 to a different path rather than /usr/local and only do "make" command and don't "make install" command.this will result in the shared libs of all opencv modules such that i can use the nonfree module.(sure i will handle its include files). so is what i say can be correct ? and it will not mess up with the opencv4tegra .

yahiafarghaly gravatar imageyahiafarghaly ( 2017-02-07 02:10:07 -0600 )edit
  • you can use cmake -DCMAKE_INSTALL_PREFIX=/my/install/folder, to control the install path, or
  • cmake -DBUILD_SHARED_LIBS=OFF to build static libs (mind, that linking those will require correct order)
berak gravatar imageberak ( 2017-02-07 02:28:14 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2017-02-07 01:39:26 -0600

Seen: 660 times

Last updated: Feb 07 '17