
2. 去掉多余的std::out,避免采集log过于杂乱; 3. 通过OpenCV从高光谱影像中提取rgb影像; 4. 在log中记录开始采集时间和停止采集时间; 5. 添加手动设置曝光时间的功能:127.0.0.1 7,2; 6. 头文件中写入仪器序列号;
46 lines
980 B
C++
46 lines
980 B
C++
//
|
|
// Created by tangchao on 2022/6/28.
|
|
//
|
|
|
|
#ifndef XIMEAIMAGERECORDER_CONFIGFILE_H
|
|
#define XIMEAIMAGERECORDER_CONFIGFILE_H
|
|
|
|
#include <iostream>
|
|
#include <iomanip>
|
|
#include <cstdlib>
|
|
#include <libconfig.h++>
|
|
#include <string>
|
|
|
|
#include <QFileInfo>
|
|
#include <QString>
|
|
#include <QCoreApplication>
|
|
#include <QDir>
|
|
|
|
using namespace std;
|
|
using namespace libconfig;
|
|
|
|
class Configfile
|
|
{
|
|
|
|
public:
|
|
Configfile();
|
|
void setConfigfilePath(string configfilePath);
|
|
bool isConfigfileExist();
|
|
bool parseConfigfile();
|
|
|
|
bool getSpectralBin(int &spectralBin);
|
|
bool getspatialBin(int &spatialBin);
|
|
bool getEffectiveWindow(int &width, int &offsetx, int &height, int &offsety);
|
|
bool getEffectiveWindowRoi(int &width, int &offsetx);
|
|
bool getGainOffset(float &gain, float &offset);
|
|
bool getSN(QString &SN);
|
|
|
|
bool createConfigFile();
|
|
bool updateConfigFile();
|
|
|
|
private:
|
|
string m_configfilePath;
|
|
Config cfg;
|
|
};
|
|
#endif //XIMEAIMAGERECORDER_CONFIGFILE_H
|