opencv编译:opencv 3.4.1 编译 contrib模块,增加人脸识别
start cmake-gui
select the opencv source code folder and the folder where binaries will be built (the 2 upper forms of the interface)
press the
configure
button. you will see all the opencv build parameters in the central interfacebrowse the parameters and look for the form called
OPENCV_EXTRA_MODULES_PATH
(use the search form to focus rapidly on it)complete this
OPENCV_EXTRA_MODULES_PATH
by the proper pathname to the<opencv_contrib>/modules
value using its browse button.press the
configure
button followed by thegenerate
button (the first time, you will be asked which makefile style to use)-
build the
opencv
core with the method you chose (make and make install if you chose Unix makfile at step 6)Install to: C:/Users/dongufang/Downloads/opencv-3.4.1/build/install
-----------------------------------------------------------------
Configuring done
Generating done
to run, linker flags to contrib modules will need to be added to use them in your code/IDE. For example to use the aruco module, "-lopencv_aruco" flag will be added.
重新编译OpenCV工程
让我们怀着激动的心情打开OpenCV解决方案,哇,可以看到解决方案共包含了69个项目:
好啦 ,下面让我们马不停蹄的来编译解决方案吧,由于解决方案项目很多,需要静静等待几分钟后,,,,,
编译完成后,可以在工程目录的“./bin/Debug”文件夹里找到编译生成的链接库
最后插一句,生成的解决方案里的头文件和源代码都是OpenCV里sources里的文件,如进行修改,sources里的文件也将被修改。