feat: 重新规划ui布局;增加左右红外以及rgb相机可视化
This commit is contained in:
@@ -35,7 +35,6 @@ private slots:
|
||||
// 相机控制槽函数
|
||||
void onStartClicked();
|
||||
void onStopClicked();
|
||||
void onOnceClicked();
|
||||
void onExposureChanged(int value);
|
||||
void onCaptureClicked();
|
||||
void onBrowseSavePathClicked();
|
||||
@@ -51,6 +50,9 @@ private slots:
|
||||
|
||||
// GVSP数据处理槽函数
|
||||
void onImageReceived(const QImage &image, uint32_t blockId);
|
||||
void onLeftImageReceived(const QByteArray &jpegData, uint32_t blockId);
|
||||
void onRightImageReceived(const QByteArray &jpegData, uint32_t blockId);
|
||||
void onRgbImageReceived(const QByteArray &jpegData, uint32_t blockId);
|
||||
void onDepthDataReceived(const QByteArray &depthData, uint32_t blockId);
|
||||
void onPointCloudDataReceived(const QByteArray &cloudData, uint32_t blockId);
|
||||
void onPointCloudReady(pcl::PointCloud<pcl::PointXYZ>::Ptr cloud, uint32_t blockId);
|
||||
@@ -84,7 +86,9 @@ private:
|
||||
bool savePointCloud(const QString &dir, const QString &baseName, const QString &format);
|
||||
void performBackgroundSave(const QString &saveDir, const QString &baseName,
|
||||
const QString &depthFormat, const QString &pointCloudFormat,
|
||||
const QImage &image, pcl::PointCloud<pcl::PointXYZ>::Ptr cloud);
|
||||
const QImage &image, pcl::PointCloud<pcl::PointXYZ>::Ptr cloud,
|
||||
const QByteArray &leftIRData, const QByteArray &rightIRData,
|
||||
const QByteArray &rgbData);
|
||||
|
||||
// 日志辅助函数
|
||||
void addLog(const QString &message, const QString &level = "INFO");
|
||||
@@ -102,28 +106,45 @@ private:
|
||||
|
||||
// 状态变量
|
||||
bool m_isConnected;
|
||||
bool m_autoSaveOnNextFrame;
|
||||
|
||||
// 当前帧数据(用于拍照)
|
||||
QImage m_currentImage;
|
||||
pcl::PointCloud<pcl::PointXYZ>::Ptr m_currentPointCloud;
|
||||
uint32_t m_currentFrameId;
|
||||
|
||||
// 三个相机的原始JPEG数据(用于保存完整分辨率图像)
|
||||
QByteArray m_currentLeftIRData;
|
||||
QByteArray m_currentRightIRData;
|
||||
QByteArray m_currentRgbData;
|
||||
|
||||
// UI控件指针
|
||||
class QWidget *m_centralWidget;
|
||||
class QSplitter *m_mainSplitter;
|
||||
class QWidget *m_controlPanel;
|
||||
class QLabel *m_imageDisplay;
|
||||
class QLabel *m_imageDisplay; // 兼容旧代码
|
||||
PointCloudWidget *m_pointCloudWidget;
|
||||
|
||||
// 三个图像显示控件
|
||||
QLabel *m_leftImageDisplay;
|
||||
QLabel *m_rightImageDisplay;
|
||||
QLabel *m_rgbImageDisplay;
|
||||
|
||||
// 按钮控件
|
||||
QPushButton *m_refreshBtn;
|
||||
QPushButton *m_connectBtn;
|
||||
QPushButton *m_startBtn;
|
||||
QPushButton *m_stopBtn;
|
||||
QPushButton *m_onceBtn;
|
||||
QPushButton *m_captureBtn;
|
||||
|
||||
|
||||
// 数据传输开关按钮
|
||||
QPushButton *m_leftIRToggle;
|
||||
QPushButton *m_rightIRToggle;
|
||||
QPushButton *m_rgbToggle;
|
||||
|
||||
// 单目/双目模式切换按钮
|
||||
QPushButton *m_monocularBtn;
|
||||
QPushButton *m_binocularBtn;
|
||||
|
||||
// 输入控件
|
||||
QSlider *m_exposureSlider;
|
||||
QSpinBox *m_exposureSpinBox;
|
||||
@@ -146,6 +167,11 @@ private:
|
||||
QLabel *m_resolutionLabel;
|
||||
QLabel *m_queueLabel;
|
||||
|
||||
// 三个相机的FPS标签
|
||||
QLabel *m_leftFpsLabel;
|
||||
QLabel *m_rightFpsLabel;
|
||||
QLabel *m_rgbFpsLabel;
|
||||
|
||||
// 日志显示控件
|
||||
class QTextEdit *m_logDisplay;
|
||||
QPushButton *m_clearLogBtn;
|
||||
@@ -162,6 +188,33 @@ private:
|
||||
int m_pointCloudFrameCount;
|
||||
int m_totalPointCloudFrameCount;
|
||||
double m_currentPointCloudFps;
|
||||
|
||||
// 统计数据 - 左红外
|
||||
QDateTime m_lastLeftFrameTime;
|
||||
int m_leftFrameCount;
|
||||
int m_totalLeftFrameCount;
|
||||
double m_currentLeftFps;
|
||||
|
||||
// 统计数据 - 右红外
|
||||
QDateTime m_lastRightFrameTime;
|
||||
int m_rightFrameCount;
|
||||
int m_totalRightFrameCount;
|
||||
double m_currentRightFps;
|
||||
|
||||
// 统计数据 - RGB
|
||||
QDateTime m_lastRgbFrameTime;
|
||||
int m_rgbFrameCount;
|
||||
int m_totalRgbFrameCount;
|
||||
double m_currentRgbFps;
|
||||
|
||||
// RGB解码处理标志(防止线程积压)
|
||||
QAtomicInt m_rgbProcessing;
|
||||
int m_rgbSkipCounter; // RGB帧跳过计数器
|
||||
|
||||
// 相机启用状态标志(防止关闭后闪烁)
|
||||
QAtomicInt m_leftIREnabled;
|
||||
QAtomicInt m_rightIREnabled;
|
||||
QAtomicInt m_rgbEnabled;
|
||||
};
|
||||
|
||||
#endif // MAINWINDOW_H
|
||||
|
||||
Reference in New Issue
Block a user