软件下载
cmake3.9下载地址:百度网盘-链接不存在? 提取码:pr6e
opencv3.4.1下载地址:https://pan.baidu.com/s/17mCs5lKPlaPuIP0ufnR5Ng? 提取码:iwev
opencv_contrib341下载地址:https://pan.baidu.com/s/1rmr3QIkSGBOOj8o-eA-zaA 提取码:ufv2
minGW8.1下载地址:https://pan.baidu.com/s/1gTFF_ahAZXqjl19pZDLMwQ 提取码:coju
opencv+mingw编译网上资料很多我就不写了
如果不想自己编译opencv,可以下载我已经编译好的
buildopencv下载地址:https://pan.baidu.com/s/1h25Y67Zlna7pV7OoMy13ag? 提取码?d1yd
vscode环境部署?
?一些插件下载就不多说了
一个简单调用opencv的例子
launch.json
{
"version": "0.2.0",
"configurations": [
{
"name": "x86_64-w64-mingw32-g++.exe - Build and debug active file",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/${fileBasenameNoExtension}.exe",
"args": [],
"stopAtEntry": true,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": true,
"MIMode": "gdb",
"miDebuggerPath": "D:\\MinGW2\\mingw64\\bin\\gdb.exe",
"preLaunchTask": "x86_64-w64-mingw32-g++.exe",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": false
}
]
}
]
}
tasks.json
{
"version": "2.0.0",
"tasks": [
{
"type": "shell",
"label": "x86_64-w64-mingw32-g++.exe",
"command": "D:\\MinGW2\\mingw64\\bin\\x86_64-w64-mingw32-g++.exe",
"args": [
"-g",
"${file}",
"-o",
"${fileDirname}\\${fileBasenameNoExtension}.exe",
"-I","D:/opencv341/build_mingW/install/include",
"-I","D:/opencv341/build_mingW/install/include/opencv",
"-I","D:/opencv341/build_mingW/install/include/opencv2",
"-L","D:/opencv341/build_mingW/install/x64/mingw/lib/lib*" ,
],
"options": {
"cwd": "${fileDirname}"
},
"problemMatcher": ["$gcc"],
"group": {
"kind": "build",
"isDefault": true
},
"detail": "编译器: D:\\MinGW2\\mingw64\\bin\\x86_64-w64-mingw32-g++.exe"
}
]
}
c_cpp_properties.json
{
"configurations": [
{
"name": "Win32",
"includePath": [
"${workspaceFolder}/**",
"D:/opencv341/build_mingW/install/include",
"D:/opencv341/build_mingW/install/include/opencv",
"D:/opencv341/build_mingW/install/include/opencv2",
"D:/MinGW2/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++",
"D:/MinGW2/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/x86_64-w64-mingw32",
"D:/MinGW2/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/backward",
"D:/MinGW2/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include",
"D:/MinGW2/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include-fixed"
],
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE"
],
"windowsSdkVersion": "10.0.18362.0",
"compilerPath": "D:/MinGW2/mingw64/bin/x86_64-w64-mingw32-g++.exe",
"cStandard": "c17",
"cppStandard": "c++17",
"intelliSenseMode": "gcc-x64"
}
],
"version": 4
}
亲测可用。
|