从路径拼接图片 - ImageStitchFromPath
函数简介
从目录批量读取图片并进行拼接,可返回拼接轨迹数据。
接口名称
ImageStitchFromPath
DLL调用
int64_t ImageStitchFromPath(int64_t instance, char* path, int64_t* trajectory);
参数说明
| 参数名 | 类型 | 说明 |
|---|---|---|
| instance | 长整数型 | OLAPlug对象的指针,由 CreateCOLAPlugInterFace 接口生成。 |
| path | 字符串 | 图片目录(如 C:/imgs/) |
| trajectory | 长整数型指针 | 输出参数,可为0;返回轨迹数据的字符串指针 |
示例
int64_t instance = CreateCOLAPlugInterFace();
int64_t traj = 0;
int64_t result = ImageStitchFromPath(instance, "C:/imgs/", &traj);
if (result) {
FreeImagePtr(instance, result);
}
if (traj) {
FreeStringPtr(traj);
}
DestroyCOLAPlugInterFace(instance);
返回值
长整数型:返回拼接后的图像句柄,失败返回0。
注意事项
- 轨迹数据指针需调用 FreeStringPtr 释放内存。
- 返回的图像需调用 FreeImagePtr 释放内存。
