|
@@ -0,0 +1,70 @@
|
|
1
|
+#ifndef WAFERREBUILD_H
|
|
2
|
+#define WAFERREBUILD_H
|
|
3
|
+
|
|
4
|
+#ifdef _EXPORTING
|
|
5
|
+#define API_DECLSPEC __declspec(dllexport)
|
|
6
|
+#else
|
|
7
|
+#define API_DECLSPEC __declspec(dllimport)
|
|
8
|
+#endif
|
|
9
|
+
|
|
10
|
+#include <vector>
|
|
11
|
+#include <string>
|
|
12
|
+#include <tuple>
|
|
13
|
+#include "math_tool.h"
|
|
14
|
+#include "image.h"
|
|
15
|
+#include "cloud_point.h"
|
|
16
|
+#include "nlohmann/json.hpp"
|
|
17
|
+
|
|
18
|
+class ArithPmd;
|
|
19
|
+class API_DECLSPEC WaferRebuild
|
|
20
|
+{
|
|
21
|
+public:
|
|
22
|
+ WaferRebuild();
|
|
23
|
+ ~WaferRebuild();
|
|
24
|
+
|
|
25
|
+private:
|
|
26
|
+
|
|
27
|
+ ArithPmd* arith_pmd;
|
|
28
|
+public:
|
|
29
|
+
|
|
30
|
+ /*
|
|
31
|
+ * @brief 初始化
|
|
32
|
+ *
|
|
33
|
+ * @param[in] param 算法参数(json格式, 包含相机标定矩阵)
|
|
34
|
+ * @return 错误码
|
|
35
|
+ */
|
|
36
|
+ std::tuple<int, std::string> initParam(const nlohmann::json& param);
|
|
37
|
+
|
|
38
|
+ /*
|
|
39
|
+ * @brief 计算一台相机点云,可并发
|
|
40
|
+ *
|
|
41
|
+ * @param[in] image_list 一台相机的图像
|
|
42
|
+ * @param[out] cloud_points 点云
|
|
43
|
+ * @param[in] camera_index 相机id(0 , 1 , 2 , 3)
|
|
44
|
+ * @return 错误码
|
|
45
|
+ */
|
|
46
|
+ std::tuple<int, std::string> calcCloud(const std::vector<std::shared_ptr<infra::Image>>& image_list, std::shared_ptr<infra::CloudPoint<double>>& cloud_points, int32_t camera_index);
|
|
47
|
+
|
|
48
|
+ /*
|
|
49
|
+ * @brief 合并点云
|
|
50
|
+ *
|
|
51
|
+ * @param[in] cloud_points_list 相机id(0 , 1 , 2 , 3) 和 相机对应点云
|
|
52
|
+ * @param[out] cloud_points 四台相机合并后的点云
|
|
53
|
+ * @return 错误码
|
|
54
|
+ */
|
|
55
|
+ std::tuple<int, std::string> mergeCloud(const std::map<int32_t, std::shared_ptr<infra::CloudPoint<double>>>& cloud_points_list,
|
|
56
|
+ std::shared_ptr<infra::CloudPoint<double>>& cloud_points);
|
|
57
|
+
|
|
58
|
+ /*
|
|
59
|
+ * @brief 翘曲测量
|
|
60
|
+ *
|
|
61
|
+ * @param[in] cloud_points 合并后的点云
|
|
62
|
+ * @param[in] filterMM 过滤尺寸
|
|
63
|
+ * @param[out] result 测量结果(json格式),如result
|
|
64
|
+ * @return 错误码
|
|
65
|
+ */
|
|
66
|
+ std::tuple<int, std::string> warpage(const std::shared_ptr<infra::CloudPoint<double>>& cloud_points, int32_t filterMM, nlohmann::json& result);
|
|
67
|
+
|
|
68
|
+};
|
|
69
|
+
|
|
70
|
+#endif // WAFERREBUILD_H
|