From 183d7fea8d41c780335b8b2942315ef59f512162 Mon Sep 17 00:00:00 2001 From: biss Date: Sat, 14 Mar 2026 19:38:13 +0800 Subject: [PATCH] first init --- .vscode/c_cpp_properties.json | 17 +++++++++++++++++ .vscode/tasks.json | 28 ++++++++++++++++++++++++++++ start/read.cpp | 15 +++++++++++++++ 3 files changed, 60 insertions(+) create mode 100644 .vscode/c_cpp_properties.json create mode 100644 .vscode/tasks.json create mode 100644 start/read.cpp diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json new file mode 100644 index 0000000..8e38ab6 --- /dev/null +++ b/.vscode/c_cpp_properties.json @@ -0,0 +1,17 @@ +{ + "configurations": [ + { + "name": "Linux", + "includePath": [ + "${workspaceFolder}/**", + "/usr/include/opencv4" + ], + "defines": [], + "compilerPath": "/usr/bin/g++", + "cStandard": "c17", + "cppStandard": "gnu++17", + "intelliSenseMode": "linux-gcc-x64" + } + ], + "version": 4 +} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..cb8b75d --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,28 @@ +{ + "tasks": [ + { + "type": "cppbuild", + "label": "C/C++: g++ 生成活动文件", + "command": "/usr/bin/g++", + "args": [ + "-fdiagnostics-color=always", + "-g", + "${file}", + "-o", + "${fileDirname}/${fileBasenameNoExtension}" + ], + "options": { + "cwd": "${fileDirname}" + }, + "problemMatcher": [ + "$gcc" + ], + "group": { + "kind": "build", + "isDefault": true + }, + "detail": "调试器生成的任务。" + } + ], + "version": "2.0.0" +} \ No newline at end of file diff --git a/start/read.cpp b/start/read.cpp new file mode 100644 index 0000000..06f68b6 --- /dev/null +++ b/start/read.cpp @@ -0,0 +1,15 @@ +// 读取图像 + +#include +#include + +using namespace std; +using namespace cv; + +int main(){ + Mat src = imread("/home/bi/下载/1.png"); + imshow("input",src); + waitKey(0); + destroyAllWindows(); + return 0; +}