
cmake
一名CV界的小学生
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
yaml-cpp 使用
void testYamlLibs(){ const std::string yamlFilePath="/home/tc/.../test/config.yaml"; YAML::Node root=YAML::LoadFile(yamlFilePath); YAML::Node config=root["imgs"]; int height=config["height"].as<int>(); int width=config["width"]..原创 2022-01-13 11:09:35 · 825 阅读 · 0 评论 -
YOLO:darknet model 推理 备忘
#include <iostream>#include <string>#ifdef linux#define OPENCV#define GPU#endif#include "yolo_v2_class.hpp" // imported functions from DLL#include "opencv2/opencv.hpp" // C++#include <opencv2/highgui/highgui.hpp>void draw_box.原创 2021-10-28 16:08:19 · 330 阅读 · 0 评论 -
cmake: 借助file命令批量添加opencv动态库
测试程序:#include <iostream>#include "string"#include "opencv2/opencv.hpp"int main(){ std::string imgDir="/home/firefly/remoteTest/anni.jpg"; cv::Mat img=cv::imread(imgDir); cv::imshow("Test",img); std::cout << "Hello, World原创 2021-08-31 10:40:41 · 479 阅读 · 0 评论 -
cmake语法:option,add_definition
CMake option使用场景:通过编译脚本(CMakeLists)传递参数(源代码中定义的宏)例如:test.cpp#include <iostream>int main() {#ifdef TEST std::cout<<"Hello,Test"<<std::endl;#endif std::cout << "Hello, World!" << std::endl; return 0;}.原创 2021-06-17 22:15:29 · 966 阅读 · 1 评论