V20251116-2.2.0

优化文件结构,删除较老代码文件。
优化参数修改界面,更改的参数都会实时更新到程序以及json中。
优化SQL相关功能。
更改了存图格式。
This commit is contained in:
2025-11-16 19:29:29 +08:00
parent b01bf896bc
commit 9210b37b44
213 changed files with 8783 additions and 9502 deletions
@@ -0,0 +1,84 @@
#ifndef Hd_CameraModule_HIK_General_H
#define Hd_CameraModule_HIK_General_H
#include <QtCore/qglobal.h>
#include <MvCameraControl.h>
#include <CameraParams.h>
#include <Windows.h>
#include <time.h>
#include <QThread>
#include <QQueue>
#include <QMutex>
#include <QDebug>
#include <subModuleBase.h>
using namespace cv;
#pragma execution_character_set("utf-8")
static MV_CC_DEVICE_INFO_LIST QByteArrayToMV_CC_DeviceInfoList(const QByteArray& byteArray) {
MV_CC_DEVICE_INFO_LIST deviceInfoList;
if (byteArray.size() == sizeof(MV_CC_DEVICE_INFO_LIST)) {
memcpy(&deviceInfoList, byteArray.constData(), sizeof(MV_CC_DEVICE_INFO_LIST));
}
else {
qDebug() << "Invalid size of QByteArray for MV_CC_DEVICE_INFO_LIST!";
}
return deviceInfoList;
}
bool IsColor(MvGvspPixelType enType)
{
switch (enType)
{
case PixelType_Gvsp_RGB8_Packed:
case PixelType_Gvsp_YUV422_Packed:
case PixelType_Gvsp_YUV422_YUYV_Packed:
case PixelType_Gvsp_BayerGR8:
case PixelType_Gvsp_BayerRG8:
case PixelType_Gvsp_BayerGB8:
case PixelType_Gvsp_BayerBG8:
case PixelType_Gvsp_BayerGB10:
case PixelType_Gvsp_BayerGB10_Packed:
case PixelType_Gvsp_BayerBG10:
case PixelType_Gvsp_BayerBG10_Packed:
case PixelType_Gvsp_BayerRG10:
case PixelType_Gvsp_BayerRG10_Packed:
case PixelType_Gvsp_BayerGR10:
case PixelType_Gvsp_BayerGR10_Packed:
case PixelType_Gvsp_BayerGB12:
case PixelType_Gvsp_BayerGB12_Packed:
case PixelType_Gvsp_BayerBG12:
case PixelType_Gvsp_BayerBG12_Packed:
case PixelType_Gvsp_BayerRG12:
case PixelType_Gvsp_BayerRG12_Packed:
case PixelType_Gvsp_BayerGR12:
case PixelType_Gvsp_BayerGR12_Packed:
return true;
default:
return false;
}
}
class Hd_CameraModule_HIK_General :public dsModuleBase
{
public:
Hd_CameraModule_HIK_General() {};
virtual ~Hd_CameraModule_HIK_General();
//从类中读数据到实例对象
bool readData(std::vector<cv::Mat>& mat, QByteArray& data);
//实例对象把数据写入到类
bool writeData(std::vector<cv::Mat>& mat, QByteArray& data);
bool initParas(QByteArray& initData);
bool run();
bool checkStatus();
private:
//MyThread *m_thread = nullptr;
//QMutex* m_mutex;
};
extern "C"
{
Q_DECL_EXPORT Hd_CameraModule_HIK_General * create();
Q_DECL_EXPORT void destory(Hd_CameraModule_HIK_General * ptr);
}
#endif // Hd_CameraModule_HIK_hard_H
//Hd_CameraModule_HIK_General