Use Sublime Text 3 arranged OpenCV IDE environment
The first step to download Sublime Text 3
Address: http://www.sublimetext.com , select the appropriate version to download. (Mostly with Win64, so choose-bit Windows64)
(recommended to install the D drive, after the system software is still a problem, painful reinstall the system, I believe we should all can understand, in particular, the environment configuration)
The second step download MinGW
First to sourceforce.net
download MinGW-64, recommended to download the corresponding archive options, you can use the extract to a local. Configuration removed from the environment. 64 site [here] (https://sourceforge.net/projects/mingw-w64/files/Toolchains targetting Win64 / Personal Builds / mingw-builds / 6.3.0 / threads-posix / seh /), 32 sites [ here] (https://sourceforge.net/projects/mingw-w64/files/Toolchains targetting Win32 / Personal builds / mingw-builds / 6.3.0 / threads-posix / sjlj /). Once downloaded, extract the D drive or default address. Recommended storage path do not have Chinese and space, then modify environment variables.
Open File Explorer, right-
此电脑
or计算机
, point属性
, win8 or later, right lower left corner of the Windows icon found系统
in the pop-system interface, click高级系统设置
to bring up the System Properties, the高级
find tab环境变量
, and then increase it
in user variables added MinGW variable, the value of the storage path MinGW. Click User Variables window under新建
the next chart window is set MinGW variable name, variable values click浏览目录
, select MinGW folder, after click确定
.
Increase Path variable in a user variable, select the user variables Path, click 编辑
in the window below, click 新建
, bin MinGW input file in the folder path, enter the complete click OK.
Environment variable settings complete will not take effect immediately, need to restart or log out, it is recommended to exit all programs were written off in the desktop 快捷键Alt+F4
select Logout, then log in again. Open a command prompt, win7 Programs - Accessories should be able to find, win8 right and above Windows Command Prompt icon selection. At the command prompt, type gcc --version
, if the output window represents something like MinGW installation is successful, otherwise refer to check whether the above steps of omissions or errors.
The third step is to configure OpenCV
The first is the official website to download OpenCV , as used herein, is version 3.2. Get a exe file after the download is complete, double-click operation, in fact, decompression operation. Has finished running, you can see the target folder contains the following LICENSE.txt
, README.md.txt
, LICENSE_FFMPEG.txt
, build文件夹
, sources文件夹
five. This extract the folder named Opencv, storage spaces in the path to no English.
The fourth step ST3 configuration
Open Sublime Text3, Click Tools-Build System-New Build System, New opencv.sublime-build, with reference to the following code can be modified according to actual situation and.
{
"cmd": ["g++", "${file}", "-o", "${file_path}/${file_base_name}",
"-I", "E:/Software/Study/Opencv/build/include",
"-I", "E:/Software/Study/Opencv/build/include/opencv",
"-I", "E:/Software/Study/Opencv/build/include/opencv2",
"-L", "E:/Software/Study/Opencv/build/x64/mingw/lib",
"-l", "opencv_core320", "-l", "opencv_imgproc320", "-l", "opencv_calib3d320","-l","opencv_objdetect320",
"-l", "opencv_video320", "-l", "opencv_features2d320", "-l", "opencv_ml320", "-l", "opencv_highgui320",
"-l", "opencv_flann320", "-l", "opencv_imgcodecs320", "-l", "opencv_photo320", "-l", "opencv_shape320",
"-l", "opencv_stitching320", "-l", "opencv_superres320", "-l", "opencv_videoio320", "-l", "opencv_videostab320"],
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"working_dir": "${file_path}",
"selector": "source.c, source.c++, source.cpp",
"encoding": "gbk",
"variants":
[
{
"name": "Run",
"cmd" : ["${file_path}/${file_base_name}"]
}
]
}
Quote
Sublime Text 3 https://gawinwong.com/2017/03/02/ will fight OpenCV3.2 of IDE /