#ifndef WAFERREBUILD_H #define WAFERREBUILD_H #ifdef _EXPORTING #define API_DECLSPEC __declspec(dllexport) #else #define API_DECLSPEC __declspec(dllimport) #endif #include #include #include #include "math_tool.h" #include "image.h" #include "cloud_point.h" #include "nlohmann/json.hpp" class ArithPmd; class API_DECLSPEC WaferRebuild { public: WaferRebuild(); ~WaferRebuild(); private: ArithPmd* arith_pmd; public: /* * @brief 初始化 * * @param[in] param 算法参数(json格式, 包含相机标定矩阵) * @return 错误码 */ std::tuple initParam(const nlohmann::json& param); /* * @brief 计算一台相机点云,可并发 * * @param[in] image_list 一台相机的图像 * @param[out] cloud_points 点云 * @param[in] camera_index 相机id(0 , 1 , 2 , 3) * @return 错误码 */ std::tuple calcCloud(const std::vector>& image_list, std::shared_ptr>& cloud_points, int32_t camera_index); /* * @brief 合并点云 * * @param[in] cloud_points_list 相机id(0 , 1 , 2 , 3) 和 相机对应点云 * @param[out] cloud_points 四台相机合并后的点云 * @return 错误码 */ std::tuple mergeCloud(const std::map>>& cloud_points_list, std::shared_ptr>& cloud_points); /* * @brief 翘曲测量 * * @param[in] cloud_points 合并后的点云 * @param[in] filterMM 过滤尺寸 * @param[out] result 测量结果(json格式),如result * @return 错误码 */ std::tuple warpage(const std::shared_ptr>& cloud_points, int32_t filterMM, nlohmann::json& result); }; #endif // WAFERREBUILD_H