Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

导出DLL #17

Open
zhenhuamo opened this issue Apr 2, 2024 · 1 comment
Open

导出DLL #17

zhenhuamo opened this issue Apr 2, 2024 · 1 comment

Comments

@zhenhuamo
Copy link

你好,博主,我想将里的检测函数,封装成导出DLL 函数,但不道怎样怎样写,能给一个例子吗?如:app_yolo

@Melody-Zhou
Copy link
Owner

这个我也不太清楚,不过我认为接口文件可能至少需要定义三个函数:

/* 算法初始化 */
bool algorithm_init();

/* 核心函数 */
bool app_yolo(const vector<cv::Mat> images, vector<BoxArray> results);

/* 算法资源释放 */
bool algorithm_cleanup();

算法初始化定义一个静态的 <Yolo::infer> 的实例智能指针,app_yolo 函数中拿到这个指针进行推理获取结果,程序结束后调用算法资源释放函数将实例指针 reset。把项目中需要的文件先打包生成 DLL 库,然后通过这个接口来调用

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants