Browse Source

上传文件至 'v1'

weiboyan 11 months ago
parent
commit
617ff12837
2 changed files with 140 additions and 0 deletions
  1. 70 0
      v1/WaferRebuild.h
  2. 70 0
      v1/算法接口.txt

+ 70 - 0
v1/WaferRebuild.h

@@ -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

+ 70 - 0
v1/算法接口.txt

@@ -0,0 +1,70 @@
1
+1. 算法接口
2
+    /*
3
+    * @brief  初始化
4
+    * 
5
+    * @param[in]  param    算法参数(json格式, 包含相机标定矩阵)
6
+    * @return     错误码
7
+    */
8
+	std::tuple<int, std::string> initParam(const nlohmann::json& param); // param
9
+
10
+    /*
11
+    * @brief  计算一台相机点云,可并发
12
+    * 
13
+    * @param[in]  image_list  一台相机的图像
14
+	* @param[out] cloud_points  点云
15
+    * @return     错误码
16
+    */
17
+	std::tuple<int, std::string> calcCloud(const std::vector<std::shared_ptr<infra::Image>>& image_list, std::shared_ptr<infra::CloudPoint<double>>& cloud_points);
18
+
19
+    /*
20
+    * @brief  合并点云
21
+    * 
22
+    * @param[in]  cloud_points_list  相机id 和 相机对应点云
23
+	* @param[out] cloud_points  四台相机合并后的点云
24
+    * @return     错误码
25
+    */
26
+	std::tuple<int, std::string> mergeCloud(const std::map<int32_t, std::shared_ptr<infra::CloudPoint<double>>>& cloud_points_list, 
27
+											std::shared_ptr<infra::CloudPoint<double>>& cloud_points);
28
+
29
+    /*
30
+    * @brief  翘曲测量
31
+    * 
32
+    * @param[in]  cloud_points  合并后的点云
33
+	* @param[in]  filterMM  过滤尺寸
34
+	* @param[out]  result  测量结果(json格式),如result
35
+    * @return     错误码
36
+    */
37
+	std::tuple<int, std::string> warpage(const std::shared_ptr<infra::CloudPoint<double>>& cloud_points, int32_t filterMM, nlohmann::json& result);
38
+
39
+
40
+2. 测量结果
41
+result:
42
+{
43
+	"x" :
44
+	{
45
+		"height":[0.1,0.2,...], // 预计4000个
46
+		"bow" : 0.1,
47
+		"warpage" : 0.1
48
+	},
49
+	"y" :
50
+	{
51
+		"height":[0.1,0.2,...],
52
+		"bow" : 0.1,
53
+		"warpage" : 0.1
54
+	}
55
+	"max_bow" :
56
+	{
57
+		"angle":0.1, // 弧度
58
+		"height":[0.1,0.2,...],
59
+		"max_bow" : 0.1
60
+	},
61
+	"max_warpage" :
62
+	{
63
+		"angle":0.1, // 弧度
64
+		"height":[0.1,0.2,...],
65
+		"max_warpage" : 0.1
66
+	}
67
+}
68
+
69
+3. 算法错误码
70
+待定