一、确定接口:
验证算法可实现后,需要给别人提供封装好的dll供其他人调用,确保代码保密,方便调试等。
下面是确定后的接口文件。
#pragma once
//#include <string>
#define __DLL_EXPORTS__
#ifdef __DLL_EXPORTS__
#define DLLAPI __declspec(dllexport)
#else
#define DLLAPI __declspec(dllimport)
#endif
// test function
extern "C" DLLAPI int function_add(int a, int b); //
extern "C" DLLAPI int set_camera_config(int camera_width, int camera_height, int camera_fps);
// 打开摄像头
extern "C" DLLAPI int camera_play(int camera_index);
extern "C" DLLAPI int camera_image_seting(int camera_index);
// 摄像头停止取图
extern "C" DLLAPI int camera_stop(int camera_index);
/////extern "C" DLLAPI int get_frame(int camera_index);
/***
功能:获取版本号
***/
extern "C" DLLAPI int get_version(char * v