第一句子网 - 唯美句子、句子迷、好句子大全
第一句子网 > vs 编译生成dll lib 并做调用

vs 编译生成dll lib 并做调用

时间:2018-11-13 02:39:04

相关推荐

vs 编译生成dll lib 并做调用

一、前言

本文实验在VS将C++源码封装为dll、lib ,并做调用

二、欲封装代码

封装代码头文件和cpp文件如下:

//util.h#ifndef _Util_H_#define _Util_H_#include <iostream>#include<opencv2\opencv.hpp>#include <stdio.h>#include <list> using namespace std;using namespace cv; struct Move{bool res;int x;int y;};Mat resizeImg(const Mat& src , float s);Move matchOneImg( const Rect& ro , const Mat& tem , const float& thr , const Mat& re_ );void A_on_Mouse(int event, int x, int y, int flags, void* param);Rect getRoi(const Mat& img);class TempMatch{public:float scale; //缩放倍数float simi_thr; //相关系数阈值Rect roi; //模板区域(x,y.w.h)Mat templa; //模板区域图像TempMatch(char* p, float sca, float si = 0.75);Move matchImg(char* p);};#endif

下面是相应cpp文件

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。