OpenCV 3.3 officially released on August 3, bringing many optimization improvements and new features, including the deeply-recognized Deep Neural Network (DNN) module, which was officially introduced into the main repository, marking OpenCV's deeper optimization of DNN. Support; Support for C++ 11 features enabled via macro ENABLE_CXX11; default includes a large number of SSE4.X and AVX/AVX2 instruction set optimizations; built-in Intel IPP version upgrade to 2017.2, official test shows nearly 15% performance improvement...etc Etc. More details can be referenced, and if your existing code is based on OpenCV 3.x, it is recommended to upgrade the version~
Compiling OpenCV's source code is not complicated, or very simple (as opposed to some old projects), and the support for Visual Studio is also very friendly, but the first compilation may have some questions about the entire process and some switches in the process. If you don't want to compile yourself, you can use official precompiled files, but some modules may not be used, so we still hope to customize the module as much as possible.
This article assumes that the reader has installed CMake and Python (2.x or 3.x)
First, prepare resourcesOpencv-3.3.0-vc14.exe, it is recommended to use sourceforge download, because this gadget has a straight chain and different mirrors than github, you can use the third-party downloader to download directly, the speed is faster.
Second, prepare the source codeRun the downloaded exe directly, select the directory to extract to, and extract the sources folder. The directory structure is as follows:
Third, the production projectOpen the CMake GUI, set the directory to select Configure, then select IDE (Visual Studio 2017 WIN64) and Finish, wait for the initial configuration to complete (generate cvconfig.h)...
Normally, there will be no error until Configuring done, then the above configuration item is red, suggesting that some things need to be manually changed. The basic step is to check the output. If an external library is found, such as "A library with XXX API Not found" or "Could NOT find XXX (missing XXX)", etc., according to the need to add the path of the corresponding library, or directly remove the relevant dependent compilation, you can also do 0 warnings good things ~
Here are a few tips:
First of all, because we are used as a library, we will not debug OpenCV itself, so we will turn off the switches that are not related to the final development, such as BUILD_DOCS, BUILD_EXAMPLES, BUILD_XXX_TESTS, BUILD_opencv_ts (some unit test code), BUILD_PACKAGE (CPACK_BINARY_XXX, CPACK_SOURCE_XXX), INSTALL_XXX
Said before the C + + 11 feature support, of course, choose to open it, ENABLE_CXX11
In order to facilitate project configuration and debugging, it is recommended to open BUILD_opencv_world in the production environment and compile each OpenCV module into a world module, so that only one .lib or .dll is generated (the latter needs to open the BUILD_SHARED_LIBS switch), but in the release version. It is recommended to introduce the appropriate modules as needed to reduce the volume (unless you use each module).
If you do not involve audio and video processing, you can turn off the relevant modules, including BUILD_opencv_video, BUILD_opencv_videoio, BUILD_opencv_videostab, WITH_1394, WITH_GSTREAMER_XXX
2.0mm Pitch
2.0mm Pitch
ATKCONN ELECTRONICS CO., LTD , https://www.atkconn.com