算法接口.txt 1.8 KB

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