
2、设置光谱仪帧率、曝光时间、gain; 3、在页面中嵌入了rgb相机图传(通过opencv实现); 4、平台的相机位置模拟、x/y马达的分别控制、x/y马达的量程检测; 5、轨迹规划; 6、加入了张卓的自动调焦模块; 7、加入了自动电源控制;
48 lines
725 B
C++
48 lines
725 B
C++
#pragma once
|
|
#ifndef RGBCAMERAOPERATION_H
|
|
#define RGBCAMERAOPERATION_H
|
|
|
|
#include <QObject>
|
|
#include <QTimer>
|
|
#include <opencv2/opencv.hpp>
|
|
#include <QImage>
|
|
|
|
#include <functional>
|
|
|
|
#include "imageProcessor.h"
|
|
|
|
typedef void(*func)();
|
|
|
|
class RgbCameraOperation:public QObject
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
RgbCameraOperation();
|
|
~RgbCameraOperation();
|
|
|
|
QImage m_qImage;
|
|
void setCallback(void(*func)());
|
|
|
|
private:
|
|
cv::Mat frame;
|
|
cv::VideoCapture *cam;
|
|
|
|
func m_func;
|
|
|
|
ImageProcessor* m_ImageProcessor;
|
|
|
|
bool record;
|
|
|
|
public slots:
|
|
void OpenCamera();
|
|
void OpenCamera_callback();//不使用信号而使用回调函数来通知界面刷新视频
|
|
void CloseCamera();
|
|
|
|
signals:
|
|
void PlotSignal();
|
|
|
|
void CamClosed();
|
|
};
|
|
#endif // !RGBCAMERAOPERATION_H
|