feat: v0.1.0更新

This commit is contained in:
2026-01-14 18:07:26 +08:00
commit efd8a7cc20
55 changed files with 6200 additions and 0 deletions

View File

@@ -0,0 +1,64 @@
#ifndef POINTCLOUDPROCESSOR_H
#define POINTCLOUDPROCESSOR_H
#include <QObject>
#include <QByteArray>
#include <pcl/point_cloud.h>
#include <pcl/point_types.h>
#include <CL/cl.h>
class PointCloudProcessor : public QObject
{
Q_OBJECT
public:
explicit PointCloudProcessor(QObject *parent = nullptr);
~PointCloudProcessor();
// 初始化OpenCL
bool initializeOpenCL();
// 设置相机内参
void setCameraIntrinsics(float fx, float fy, float cx, float cy);
// 设置Z缩放因子
void setZScaleFactor(float scale);
// 将深度数据转换为点云使用OpenCL GPU加速
void processDepthData(const QByteArray &depthData, uint32_t blockId);
signals:
void pointCloudReady(pcl::PointCloud<pcl::PointXYZ>::Ptr cloud, uint32_t blockId);
void errorOccurred(const QString &error);
private:
// 清理OpenCL资源
void cleanupOpenCL();
// 相机内参
float m_fx;
float m_fy;
float m_cx;
float m_cy;
// Z缩放因子
float m_zScale;
// 图像尺寸
int m_imageWidth;
int m_imageHeight;
int m_totalPoints;
// OpenCL资源
cl_platform_id m_platform;
cl_device_id m_device;
cl_context m_context;
cl_command_queue m_queue;
cl_program m_program;
cl_kernel m_kernel;
cl_mem m_depthBuffer;
cl_mem m_xyzBuffer;
bool m_clInitialized;
};
#endif // POINTCLOUDPROCESSOR_H