包含以下子模块: - VrCommon: 核心接口和数据结构 - VrUtils: 工具类库(JSON、log4cpp、tinyxml2、INI、MD5、CRC) - CloudUtils: 点云工具 - DataUtils: 数据处理工具(CloudMathClac、CoordinateTransform) - CloudView: 点云查看工具 功能说明: - 提供项目通用的基础工具类和实用功能 - 支持 Windows (MSVC/MinGW) 和 Linux (ARM/x86_64) 平台 - 使用 Qt qmake 构建系统 - 所有模块编译为静态库
51 lines
1.1 KiB
C++
51 lines
1.1 KiB
C++
#ifndef CURVE_FITTING_H
|
||
#define CURVE_FITTING_H
|
||
|
||
#include <vector>
|
||
#include "VZNL_Types.h"
|
||
|
||
// 平面选择
|
||
enum Plane
|
||
{
|
||
XY = 0,
|
||
XZ = 1,
|
||
YZ = 2
|
||
};
|
||
|
||
// 直线拟合结果
|
||
struct LineFitResult
|
||
{
|
||
SVzNL3DPoint point; // 直线上的点
|
||
SVzNL3DPoint direction; // 方向向量
|
||
double error; // 拟合误差
|
||
bool success; // 是否成功
|
||
};
|
||
|
||
// 抛物线拟合结果
|
||
struct ParabolaFitResult
|
||
{
|
||
double a, b, c; // 抛物线系数
|
||
double error; // 拟合误差
|
||
bool success; // 是否成功
|
||
};
|
||
|
||
// 圆拟合结果
|
||
struct CircleFitResult
|
||
{
|
||
SVzNL3DPoint center; // 圆心
|
||
double radius; // 半径
|
||
double error; // 拟合误差
|
||
bool success; // 是否成功
|
||
};
|
||
|
||
// 直线拟合(3D)
|
||
LineFitResult FitLine3D(const std::vector<SVzNL3DPosition>& points);
|
||
|
||
// 抛物线拟合
|
||
ParabolaFitResult FitParabola(const std::vector<SVzNL3DPosition>& points, Plane plane);
|
||
|
||
// 圆拟合
|
||
CircleFitResult FitCircle(const std::vector<SVzNL3DPosition>& points, Plane plane);
|
||
|
||
#endif // CURVE_FITTING_H
|