Ask Your Question

How to use opencv 3 with opencv_contrib

asked 2016-04-22 22:48:35 -0500

Nbb gravatar image

updated 2016-05-15 09:42:40 -0500


I am trying to use opencv_contrib code with opencv 3. I am following this instructions here

Step 2 says to select the opencv source code folder and the folder where binaries will be built (the 2 upper forms of the interface)

image description

Is the source code folder = sources folder ? And where is the folder where binaries will be built ? I have googled for other guides but they are all confusing as well. Help thanks

image description

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted

answered 2016-04-23 00:47:23 -0500

berak gravatar image

updated 2016-04-23 00:58:41 -0500

there are actually 3 relevant folders here,

  1. the sourcefolder. this is where CmakeLists.txt is. in your case it is the "sources" folder, and it is admittedly confusing, that it looks different from

  2. the build folder. this can be anywhere on your machine, you need ~2.5gb free disk space for the temporary build files, and you can remove it later, once everything is ok

  3. the install folder. this is , where the final libs, dlls and include files end up. you specify it with cmake -DCMAKE_INSTALL_PREFIX

please make sure, you use latest opencv master version (3.1, atm.)

so, as an example, create a build folder, say, d:\mybuild, run cmake from that folder, set the install prefix to d:\opencv\final, and the last cmake argument should be the path to d:\opencv\sources

finally, don't forget to adjust the PATH, so it points to your newly build dlls, not the old, prebuilt ones !

edit flag offensive delete link more


Hello, where is the install folder, I am using the GUI for cmake so I am not sure how to do step 3. I attached an image of the gui

Nbb gravatar imageNbb ( 2016-05-15 09:41:57 -0500 )edit

answered 2016-05-15 10:22:16 -0500

LBerger gravatar image

updated 2016-05-15 10:24:15 -0500

like it is written in doc :

image description you must configure first and insert path to opencv_contrib

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2016-04-22 22:48:35 -0500

Seen: 195 times

Last updated: May 15 '16