GrabBag/Device/EpicEyeDevice/_Inc/EpicEyeDevice.h
2025-12-10 00:01:32 +08:00

56 lines
1.8 KiB
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#ifndef CEPICEYEDEVICE_H
#define CEPICEYEDEVICE_H
#include "IEpicEyeDevice.h"
#include <mutex>
#include <string>
/**
* @brief CEpicEyeDevice 实现类
* 封装 EpicEye SDK实现 3D 相机点云采集功能
*/
class CEpicEyeDevice : public IEpicEyeDevice
{
public:
CEpicEyeDevice();
~CEpicEyeDevice();
// SDK 版本
int GetSDKVersion(std::string& version) override;
// 搜索和连接
int SearchCameras(std::vector<EpicEyeDeviceInfo>& deviceList) override;
int Connect(const std::string& ipAddress) override;
int Disconnect() override;
bool IsConnected() override;
// 设备信息
int GetDeviceInfo(EpicEyeDeviceInfo& deviceInfo) override;
int GetWidth(unsigned int& width) override;
int GetHeight(unsigned int& height) override;
// 触发和获取数据
int TriggerCapture(std::string& frameID, bool withPointCloud = true) override;
int GetPointCloud(const std::string& frameID, PointCloudData& pointCloud) override;
int GetImage(const std::string& frameID, ImageData2D& image) override;
int GetDepth(const std::string& frameID, DepthData& depth) override;
// 便捷方法
int CapturePointCloud(PointCloudData& pointCloud, unsigned int timeout = 5000) override;
int CaptureImage(ImageData2D& image, unsigned int timeout = 5000) override;
// 相机参数
int GetCameraIntrinsics(CameraIntrinsics& intrinsics) override;
int GetConfig(std::string& configJson) override;
int SetConfig(const std::string& configJson) override;
private:
// 内部成员
std::string m_ipAddress; // 相机IP地址
bool m_bConnected; // 连接状态
EpicEyeDeviceInfo m_deviceInfo; // 设备信息
std::mutex m_mutex; // 线程安全锁
};
#endif // CEPICEYEDEVICE_H