OpenCV340 operating instructions

OpenCV340 operating instructions

Install OpenCV340 exe

   Download link: official website https://www.opencv.org/releases.html

Netdisk: https://blog.csdn.net/omodao1/article/details/80276834

Since the build in opencv340 only has 64-bit packages, if you want to get 32-bit, you need to use other tools

 

Compile OpenCV3.4.0 +contrib+vs2013+x86 version:

https://blog.csdn.net/hust_bochu_xuchao/article/details/78952481

Reference

https://blog.csdn.net/hust_bochu_xuchao/article/details/78819280

 

One, prepare tools

Download opencv3.4.0, opencv-contrib, cmake respectively. VS2013 is already installed by default.

. A . Opencv3 4 . 0 Download  :  https://opencv.org/releases.html

Choose win pack, you will get a file like opencv-3.3.1-vc14.exe after downloading

B. opencv-contrib download link

After downloading, get a file like opencv_contrib-3.3.1.zip.

C. camke download  : https://cmake.org/download/    

After downloading, the cmake-3.10.1-win64-x64.zip file is obtained, and cmake-gui.exe in the bin directory can be directly opened and run.

Two, cmake compilation  

 

1. Open the cmake-gui.exe file in the bin directory of cmake that you just downloaded.

 

2. The first line of cmake is the source code of opencv, which is the source file of opencv, and the second line is the place where the compiled files are placed, which is the mybulid folder.

 

3. Press Generate for the first compilation, and set the option Visual Studio 12 2013 (if you want to compile to X64 opencv, select Visual Studio 12 2013 Win 64 here), and there will be a sign of done after success.

 

4. Find "OPENCV_EXTRA_MODUALS_PATH" in the configuration table and set its parameter value to the modules directory in the opencv_contrib source package. Remove the WITH_CUDA option in this compilation.

 

5. Press configure again. Configuring done is displayed after success. A red box may appear, repeat configure again, and the red will be eliminated after the update.

 

6. Finally press [Generate] to generate the project. If the configuration and generation of the project are completely ok, there should be two lines: Configuring done and Generating done.

 

 

 

3. Open the opencv.sln project and compile

1. Open the opencv.sln file in the directory you just saved

2. In the solution explorer, select "solution opencv" -> right click -> regenerate the solution.

3. Find INSTALL under CMakeTargets, right-click INSTALL->Use only for project->Generate INSTALL only.

4. Note that both debug and release are compiled again.

The Debug and release directories are shown in the figure below

  • The lib package is referenced in the program
  1. Filter the program to (release lib package) to a specific program directory such as GzVision2 lib

 

 

2. In VS-->Connector-->Enter to add the lib package to the directory;

 

Guess you like

Origin blog.csdn.net/xiaoshunzi111/article/details/108863412