1.添加选择模型路径功能(选择图片功能已隐藏)

2.添加手动换班功能
3.添加设置版本信息功能
4.解决相机USB线断开重连后联机图片未恢复问题
5.解决远程重启失败问题
6.解决NG次数少一个的问题
1600-900
chu270213 2 years ago
parent e5ff69058e
commit f7b3dd9d52

343
.gitignore vendored

@ -1,343 +0,0 @@
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
runtime/
# User-specific files
*.rsuser
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
GeneratedFiles/
model/
# Visual Studio 2015/2017 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# Visual Studio 2017 auto generated files
Generated\ Files/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUNIT
*.VisualState.xml
TestResult.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# Benchmark Results
BenchmarkDotNet.Artifacts/
# .NET Core
project.lock.json
project.fragment.lock.json
artifacts/
# StyleCop
StyleCopReport.xml
# Files built by Visual Studio
*_i.c
*_p.c
*_h.h
*.ilk
*.meta
*.obj
*.iobj
*.pch
*.pdb
*.ipdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*_wpftmp.csproj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# Visual Studio Trace Files
*.e2e
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# JustCode is a .NET coding add-in
.JustCode
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# AxoCover is a Code Coverage Tool
.axoCover/*
!.axoCover/settings.json
# Visual Studio code coverage results
*.coverage
*.coveragexml
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# NuGet Packages
*.nupkg
# The packages folder can be ignored because of Package Restore
**/[Pp]ackages/*
# except build/, which is used as an MSBuild target.
!**/[Pp]ackages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/[Pp]ackages/repositories.config
# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
*.appx
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!?*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
orleans.codegen.cs
# Including strong name files can present a security risk
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
#*.snk
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# ASP.NET Core default setup: bower directory is configured as wwwroot/lib/ and bower restore is true
**/wwwroot/lib/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
ServiceFabricBackup/
*.rptproj.bak
# SQL Server files
*.mdf
*.ldf
*.ndf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
*.rptproj.rsuser
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
node_modules/
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# JetBrains Rider
.idea/
*.sln.iml
# CodeRush personal settings
.cr/personal
# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config
# Tabs Studio
*.tss
# Telerik's JustMock configuration file
*.jmconfig
# BizTalk build output
*.btp.cs
*.btm.cs
*.odx.cs
*.xsd.cs
# OpenCover UI analysis results
OpenCover/
# Azure Stream Analytics local run output
ASALocalRun/
# MSBuild Binary and Structured Log
*.binlog
# NVidia Nsight GPU debugger configuration file
*.nvuser
# MFractors (Xamarin productivity tool) working folder
.mfractor/
# Local History for Visual Studio
.localhistory/
# BeatPulse healthcheck temp database
healthchecksdb

@ -36,7 +36,7 @@ Global
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {0AF1A30E-A12C-4014-ACD5-65A1E6D54D46}
Qt5Version = 5.15.2_msvc2019_64
SolutionGuid = {0AF1A30E-A12C-4014-ACD5-65A1E6D54D46}
EndGlobalSection
EndGlobal

@ -52,10 +52,10 @@ void CaptureThread::process( void )
//相机掉线回调
CIwtCameraLostCallbackMV cam_lost_cb;
cam_lost_cb.channel_ = Local_Num;
/*if (cam_lost_cb.registerComponent(pDev_->state) != true)
if (cam_lost_cb.registerComponent(pDev_->state) != true)
{
std::cout << "ERROR: Unable to register the camera's lost CallBack function!\n";
}*/ //屏蔽掉线回调,防止误报警
}
//图像采集循环
TDMR_ERROR result = DMR_NO_ERROR;
while( ( result = static_cast< TDMR_ERROR >( pFI_->imageRequestSingle() ) ) == DMR_NO_ERROR ) {};

@ -129,12 +129,12 @@ private:
QMutex lock_;
};
//-----------------------------------------------------------------------------
class CSampleConfigurationEventHandler : public Pylon::CConfigurationEventHandler
class CSampleConfigurationEventHandler : public Pylon::CBaslerUniversalConfigurationEventHandler
{
public:
int channel_;
// This method is called from a different thread when the camera device removal has been detected.
void OnCameraDeviceRemoved(Pylon::CInstantCamera& camera)
void OnCameraDeviceRemoved( Pylon::CBaslerUniversalInstantCamera& camera )
{
SingleCamInfo[channel_].OffLine = true;
}

@ -54,6 +54,7 @@ inline void RisingGpioEventfunction(MV_EVENT_OUT_INFO* pEventInfo, void* pUser){
bool temp;
CaptureThreadHIKptr->p_shooted_queue->take(temp);
}
#elif defined ONE_TIME_SHIFT
if(
CaptureThreadHIKptr->p_shooted_queue->count() > 0
@ -230,7 +231,7 @@ void CaptureThreadHIK::process( void )
nRet = MV_CC_RegisterExceptionCallBack(CamHandle, LossCallBack[Local_Num], this);
if (nRet) { std::cout << "can not register loss callback" << std::endl; nnRet = nRet; }
#ifndef IMM_FEED_BACK
#ifdef IMM_FEED_BACK ///不打开无反馈等
nRet = MV_CC_SetEnumValueByString(CamHandle, "EventSelector", "Line0FallingEdge");
if (nRet) { std::cout << "can not set EventSelector" << std::endl; nnRet = nRet; }

@ -135,6 +135,7 @@
<LanguageStandard>stdcpp14</LanguageStandard>
<Optimization>MaxSpeed</Optimization>
<SupportJustMyCode>false</SupportJustMyCode>
<DisableSpecificWarnings>4819;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>

@ -22,6 +22,7 @@ static std::vector<std::string> classes;
bool AlgJd::init()
{
QString model_path;
QString jpg_path;
std::fstream cfg_file;
cfg_file.open("../conf/conf.txt");
if (!cfg_file.is_open())
@ -42,6 +43,10 @@ bool AlgJd::init()
{
model_path = line.substr(pos + 1).c_str();
}
if (tmp_key == "JPGPATH")
{
jpg_path = line.substr(pos + 1).c_str();
}
}
}
cfg_file.close();
@ -79,7 +84,14 @@ bool AlgJd::init()
net.setPreferableBackend(cv::dnn::DNN_BACKEND_CUDA);
net.setPreferableTarget(cv::dnn::DNN_TARGET_CUDA);
cv::Mat image = cv::imread("alg_jd.jpg");
//cv::Mat image = cv::imread("alg_jd.jpg");
cv::Mat image;
if (jpg_path.length() > 0) {
image = cv::imread(jpg_path.toStdString());
}
else {
image = cv::imread("alg_jd.jpg");
}
//识别一张图测试模型是否正确并且完成GPU数据加载
if (!image.data) return false; //判断测试图片是否正常读取
std::vector<std::pair<int, cv::Rect> > results;

@ -15,6 +15,12 @@ change_shift::change_shift(QDialog *parent)
else {
ui.radioButton_auto->setChecked(false);
}
if (g_sys_conf.shift_byhand == 1) {
ui.radioButton_byhand->setChecked(true);
}
else {
ui.radioButton_byhand->setChecked(false);
}
if (g_sys_conf.timing_shift == 1) {
ui.radioButton_time->setChecked(true);
}
@ -32,7 +38,7 @@ void change_shift::on_pushButton_apply_released()
QTime timeA;
QTime timeB;
QTime timeC;
if (ui.radioButton_auto->isChecked()) {
if (ui.radioButton_auto->isChecked()) { /// ÒÑÒþ²Ø
g_sys_conf.auto_shift = 1;
g_sys_conf.timing_shift = 0;
@ -42,9 +48,10 @@ void change_shift::on_pushButton_apply_released()
//emit sendMsgToDialogSetup(timeA, timeB, timeC);
//this->close();
}
else if(ui.radioButton_time->isChecked()) {
else if (ui.radioButton_time->isChecked()) {
g_sys_conf.auto_shift = 0;
g_sys_conf.timing_shift = 1;
g_sys_conf.shift_byhand = 0;
timeA.setHMS(ui.A_hour->text().toInt(), ui.A_minute->text().toInt(), 0);
timeB.setHMS(ui.B_hour->text().toInt(), ui.B_minute->text().toInt(), 0);
@ -52,6 +59,15 @@ void change_shift::on_pushButton_apply_released()
//emit sendMsgToDialogSetup(timeA, timeB, timeC);
//this->close();
}
else if (ui.radioButton_byhand->isChecked()) {
g_sys_conf.timing_shift = 0;
g_sys_conf.shift_byhand = 1;
timeA.setHMS(ui.A_hour->minimum(), ui.A_minute->minimum(), 0);
timeB.setHMS(ui.B_hour->minimum(), ui.B_minute->minimum(), 0);
timeC.setHMS(ui.C_hour->minimum(), ui.C_minute->minimum(), 0);
}
emit sendMsgToDialogSetup(timeA, timeB, timeC);
this->close();
DialogSetup::write_config();

@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>457</width>
<height>350</height>
<width>456</width>
<height>360</height>
</rect>
</property>
<property name="windowTitle">
@ -56,8 +56,8 @@
<widget class="QRadioButton" name="radioButton_auto">
<property name="geometry">
<rect>
<x>40</x>
<y>60</y>
<x>30</x>
<y>810</y>
<width>140</width>
<height>30</height>
</rect>
@ -376,6 +376,25 @@
<string>点</string>
</property>
</widget>
<widget class="QRadioButton" name="radioButton_byhand">
<property name="geometry">
<rect>
<x>40</x>
<y>60</y>
<width>140</width>
<height>30</height>
</rect>
</property>
<property name="font">
<font>
<family>微软雅黑</family>
<pointsize>16</pointsize>
</font>
</property>
<property name="text">
<string>手动换班</string>
</property>
</widget>
</widget>
<layoutdefault spacing="6" margin="11"/>
<resources/>

@ -541,6 +541,47 @@ void Cigarette::pause_work()
label_reslut_mat[i]->setVisible(false);
}
}
void Cigarette::Exit()
{
this->on_btn_pause_released();
for(int i=0;i<NumberOfSupportedCameras;i++)
{
if(SingleCamInfo[i].Detect){
if(ControlCamOpenOrClose(i,CLOSE))
{
qDebug() << "Close device " << i;
cam_work_mat[i]->setStyleSheet(tr("background-color: rgb(255, 255, 0);"));
}
}
work_thread[i].stop();
debug_thread[i].stop();
delete g_image_queue[i];
delete g_result_queue[i];
delete g_result_wait_queue[i];
delete g_double_queue[i];
delete g_shooted_queue[i];
delete g_debug_queue[i];
qDebug() << "Close capture thread " << i;
}
saveThread.stop();
delete g_save_queue;
#ifdef __UDPSend
sThread.stop();
rThread->stop();
delete rThread;
#endif
qDebug() << "Close thread ";;
if(m_PLCDevice) {
m_PLCDevice->disconnect_plc();
delete m_PLCDevice;
}
qApp->quit();
this->close();
Pylon::PylonTerminate();
}
//暂停按钮
void Cigarette::on_btn_pause_released()
{
@ -648,84 +689,13 @@ void Cigarette::OnOp()
void Cigarette::OnExit()
{
//emit sengMsgToClog("Close the Application.");
this->on_btn_pause_released();
for(int i=0;i<NumberOfSupportedCameras;i++)
{
if(SingleCamInfo[i].Detect){
if(ControlCamOpenOrClose(i,CLOSE))
{
qDebug() << "Close device " << i;
cam_work_mat[i]->setStyleSheet(tr("background-color: rgb(255, 255, 0);"));
}
}
work_thread[i].stop();
debug_thread[i].stop();
delete g_image_queue[i];
delete g_result_queue[i];
delete g_result_wait_queue[i];
delete g_double_queue[i];
delete g_shooted_queue[i];
delete g_debug_queue[i];
qDebug() << "Close capture thread " << i;
}
saveThread.stop();
delete g_save_queue;
#ifdef __UDPSend
sThread.stop();
rThread->stop();
delete rThread;
#endif
qDebug() << "Close thread ";;
if(m_PLCDevice) {
m_PLCDevice->disconnect_plc();
delete m_PLCDevice;
}
qApp->quit();
this->close();
Pylon::PylonTerminate();
Exit();
exit(1);///
}
void Cigarette::OnRestart()
{
this->on_btn_pause_released();
Pylon::PylonTerminate();
delete g_save_queue;
for (int i = 0; i < NumberOfSupportedCameras; i++)
{
if (SingleCamInfo[i].Detect) {
if (ControlCamOpenOrClose(i, CLOSE))
{
qDebug() << "Close device " << i;
cam_work_mat[i]->setStyleSheet(tr("background-color: rgb(255, 255, 0);"));
}
}
delete g_image_queue[i];
delete g_result_queue[i];
delete g_result_wait_queue[i];
delete g_double_queue[i];
delete g_shooted_queue[i];
delete g_debug_queue[i];
work_thread[i].stop();
debug_thread[i].stop();
}
saveThread.stop();
#ifdef __UDPSend
sThread.stop();
rThread->stop();
delete rThread;
#endif
if(m_PLCDevice) {
m_PLCDevice->disconnect_plc();
delete m_PLCDevice;
}
this->close();
qApp->quit();
Exit();
QProcess::startDetached(qApp->applicationFilePath(), QStringList());
}
//换班防连击
@ -758,7 +728,8 @@ void Cigarette::OnToolButtonCamReleasedHub(int Num)
emit sengMsgToClog("Start open camera " + QString::number(Num) + ".");
if(ControlCamOpenOrClose(Num,OPEN))
{
cam_work_mat[Num]->setStyleSheet(tr("background-color: rgb(0, 170, 0);"));
cam_work_mat[Num]->setStyleSheet(tr("background-color: rgb(0, 170, 0);"));//相机工作提示
cam_status_mat[Num]->setStyleSheet(tr("background-color: rgb(0,170,0);"));//相机联机指示
QString str = QString("border-image: url(:/Cigarette/Resources/cam%1_yes.png);").arg(Num+1);
QByteArray ba = str.toLatin1();
cam_toolButton_mat[Num]->setStyleSheet(tr(ba.data()));
@ -1209,37 +1180,7 @@ void Cigarette::on_toolButton_plc_released()
}
}
void Cigarette::on_toolButton_version_released() {
emit sengMsgToClog("Open Version infomation.");
std::fstream cfg_file;
QString loc;
cfg_file.open(CONFIGURE_FILE);
if (!cfg_file.is_open())
{
std::cout << "Error: Open config file " << CONFIGURE_FILE << std::endl;
}
while (!cfg_file.eof())
{
char tmp[256] = "";
cfg_file.getline(tmp, 256);
std::string line(tmp);
if (line.length() > 0)
{
/// atoi返回整数值substr返回子串c_str()指向字符串首地址
size_t pos = line.find('=');
std::string tmp_key = line.substr(0, pos);
if (tmp_key == "LOCATION")
{ /// 存图设置0不保存1保存NG2全存
loc = line.substr(pos + 1).c_str();
}
}
}
//std::cout << loc.toStdString().c_str() << std::endl;
QMessageBox::information(NULL, QStringLiteral("版本信息"), QStringLiteral("所在地:%1").arg(loc.toStdString().c_str()), QMessageBox::Ok);
}
//操作员权限剩余时间
@ -1805,7 +1746,7 @@ void Cigarette::on_pushButton_clear_released()//
}
if(g_working)
{
QMessageBox::information(NULL, QStringLiteral("状态检查"), QStringLiteral("请先点击“暂停工作”按钮,进入暂停模式,才可以进行换班操作"), QMessageBox::Ok);
QMessageBox::information(NULL, QStringLiteral("状态检查"), QStringLiteral("请先点击“暂停工作”按钮,进入暂停模式,才可以进行换班操作 "), QMessageBox::Ok);
return;
}
ui.pushButton_clear->setEnabled(false);
@ -1884,127 +1825,6 @@ void Cigarette::on_pushButton_clear_released()//
g_op_time = OP_TIME;
}
void Cigarette::on_pushButton_Clear_Pic_released()
{
emit sengMsgToClog("Clean images.");
CleanThreadStart();
}
void Cigarette::FindFileForDelete(const QString& path)
{
QDir dir(path);
QFileInfoList list;
QFileInfo curFile;
if (!dir.exists()) { return; }//文件不存则返回false
dir.setFilter(QDir::Dirs | QDir::Files);
list = dir.entryInfoList(QDir::Dirs | QDir::Files
| QDir::Readable | QDir::Writable
| QDir::Hidden | QDir::NoDotAndDotDot
, QDir::Time);
if (list.isEmpty()) { return; }//文件夹为空则返回false
int i = list.size() - 1;
QDateTime delDateTime;
QDate delDate;
do {
QFileInfo fileInfo = list.at(i);
while (fileInfo.fileName() == "." || fileInfo.fileName() == ".." && i >= 0)
{
i--;
}
if (i < 0) {
break;
}
bool bisDir = fileInfo.isDir();
if (bisDir)
{
QRegExp rx("\\d{4}-\\d{2}-\\d{2}");
QRegExpValidator v(rx, 0);
int pos = 0;
int match;
match = v.validate(fileInfo.fileName(), pos);
if (match == 2)
{
QString qstrSubFilePath = fileInfo.absoluteFilePath();
QDir qdrSubPath(qstrSubFilePath);
qdrSubPath.setFilter(QDir::AllEntries | QDir::NoDotAndDotDot | QDir::Hidden);
QFileInfoList qlstFileInfo = qdrSubPath.entryInfoList();
if (qlstFileInfo.count() <= 0)
{
qdrSubPath.rmdir(qstrSubFilePath);
i--;
list = dir.entryInfoList(QDir::Dirs | QDir::Files
| QDir::Readable | QDir::Writable
| QDir::Hidden | QDir::NoDotAndDotDot
, QDir::Time);
if (list.isEmpty()) { return; }//文件夹为空则返回false
int i = list.size() - 1;
continue;
}
if (i == (list.size() - 1)) {
delDate = QDate::currentDate().addDays(-60);
}
// QDate delDate = QDate::currentDate().addDays(-60);
QDate dirDate;
dirDate = QDate::fromString(fileInfo.fileName(), "yyyy-MM-dd");
qint64 nDays = delDate.daysTo(dirDate);
if (nDays <= 0)
{
qdrSubPath.removeRecursively();
i--;
list = dir.entryInfoList(QDir::Dirs | QDir::Files
| QDir::Readable | QDir::Writable
| QDir::Hidden | QDir::NoDotAndDotDot
, QDir::Time);
if (list.isEmpty()) { return; }//文件夹为空则返回false
int i = list.size() - 1;
continue;
}
i--;
continue;
}
FindFileForDelete(fileInfo.filePath());
i--;
}
else {
if (2) //g_sys_conf.save ==
{
// 如果是文件,判断文件日期 目前默认是60天。
if (i == (list.size() - 1)) {
delDateTime = fileInfo.birthTime().addDays(60);
}
qint64 nDays = delDateTime.daysTo(fileInfo.birthTime());
nDays = fileInfo.birthTime().daysTo(delDateTime);
if (nDays <= 0)
{
// 删除最早60天的文件
fileInfo.dir().remove(fileInfo.fileName());
}
}
i--;
}
} while (i >= 0);
}
void Cigarette::autoCleanImage()
{
int64 size;
QString iDriver = "D:/";
LPCWSTR strDriver = (LPCWSTR)iDriver.utf16();
ULARGE_INTEGER freeDiskSpaceAvailable, totalDiskSpace, totalFreeDiskSpace;
int64 gb = (1024 * 1024 * 1024);
//调用函数获取磁盘参数(单位为字节Byte),转化为GB需要除以(1024*1024*1024)
GetDiskFreeSpaceEx(strDriver, &freeDiskSpaceAvailable, &totalDiskSpace, &totalFreeDiskSpace);
size = (quint64)totalFreeDiskSpace.QuadPart / gb;
if (size < 10) { //磁盘剩余空间小于10g
QString dir("D:/image/");
FindFileForDelete(dir);
}
}
//读取系统管理员密码
QString Cigarette::read_pswd()
{
@ -2156,6 +1976,10 @@ bool Cigarette::read_sys_config(SysConf &conf)
{
conf.path = line.substr(pos + 1).c_str();
}
else if (tmp_key == "JPGPATH")
{
conf.path_jpg = line.substr(pos + 1).c_str();
}
#if defined(NumberOfSupportedCameras) && (NumberOfSupportedCameras>0)
else if (tmp_key == "EXPO1")
{
@ -2432,7 +2256,9 @@ bool Cigarette::read_sys_config(SysConf &conf)
}
}
}
cfg_file.close();
ui.location->setText(g_sys_conf.location);
return true;
}
@ -3375,10 +3201,10 @@ void Cigarette::EnableDebugMode()
MV_CC_SetFrameRate(HIKCamHandle[i], 10.0);
nRet = MV_CC_SetBoolValue(HIKCamHandle[i], "AcquisitionFrameRateEnable",true);
if (nRet) { std::cout << "can not set AcquisitionFrameRateEnable" << std::endl;}
if (nRet) { std::cout << "can not set Hik's AcquisitionFrameRateEnable" << std::endl;}
nRet = MV_CC_SetEnumValue(HIKCamHandle[i], "TriggerMode", MV_TRIGGER_MODE_OFF);
if (nRet) { std::cout << "can not set TriggerMode" << std::endl;}
if (nRet) { std::cout << "can not set Hik's TriggerMode" << std::endl;}
}
else if(SingleCamInfo[i].CamClass == BaslerClassID)
{
@ -3390,13 +3216,13 @@ void Cigarette::EnableDebugMode()
if (!nRet) { std::cout << "can not set TriggerMode_Off" << std::endl;}
#endif
BaslerCamHandle[i]->TriggerSelector.SetValue(Basler_UniversalCameraParams::TriggerSelector_FrameStart);
if (!nRet) { std::cout << "can not set TriggerSelector_FrameStart" << std::endl;}
//if (!nRet) { std::cout << "can not set Basler's TriggerSelector_FrameStart" << std::endl;}
BaslerCamHandle[i]->TriggerMode.SetValue(Basler_UniversalCameraParams::TriggerMode_Off);
if (!nRet) { std::cout << "can not set TriggerMode_Off" << std::endl;}
//if (!nRet) { std::cout << "can not set Basler's TriggerMode_Off" << std::endl;}
BaslerCamHandle[i]->AcquisitionFrameRateEnable.SetValue(true);
if (!nRet) { std::cout << "can not set AcquisitionFrameRateEnable" << std::endl;}
//if (!nRet) { std::cout << "can not set Basler's AcquisitionFrameRateEnable" << std::endl;}
BaslerCamHandle[i]->AcquisitionFrameRate.SetValue(10);
if (!nRet) { std::cout << "can not set AcquisitionFrameRate" << std::endl;}
//if (!nRet) { std::cout << "can not set Basler's AcquisitionFrameRate" << std::endl;}
}
}
}
@ -3678,10 +3504,8 @@ void Cigarette::recMsgFromUdp(QString data)
}
else if (data == "CLEARNIMAGE")
{
on_pushButton_Clear_Pic_released();
//DialogSetup d;
//d.on_pushButton_ClearImage_released();
emit sengMsgToClog("Clean images.");
CleanThreadStart();
}
else if (data == "DEBUGEN")
{
@ -3770,7 +3594,7 @@ void Cigarette::recMsgFromUdp(QString data)
}
else if (data == "RESTART")
{
OnExit();
OnRestart();
}
else if (data == "GETSETTING")
{

@ -76,6 +76,8 @@ public:
void EnumerateCameras(SingleCamInfoStruct *TempSingleCamInfo,bool showinfo,SysConf &conf);
void start_work();
void pause_work();
void CleanThreadStart();
void Exit();
private slots :
void on_btn_start_released();
void on_btn_pause_released();
@ -84,10 +86,8 @@ private slots :
void on_checkBox_debug_clicked(bool checked);
void on_checkBox_unkick_clicked(bool checked);
void on_toolButton_plc_released();
void on_toolButton_version_released();
void on_toolButton_alarm_released();
void on_pushButton_clear_released();
void on_pushButton_Clear_Pic_released();
void enable_shift();
void OnNotifyHub(int Num, int Cnt, cv::Mat m);
void OnDisplayTimeCostHub(int Num, int ms);
@ -105,16 +105,14 @@ private slots :
void ReconnectCamHub(int Num);
void OnMouse(QMouseEvent* event);
void OnKey(QKeyEvent* event);
void handleTimeout(); //定时任务,每秒运行一次
void op_timeout(); //操作员剩余时间
void admin_timeout(); //管理员权限剩余时间
void FindFileForDelete(const QString& path);
void autoCleanImage();
void handleTimeout(); //定时任务,每秒运行一次
void op_timeout(); //操作员剩余时间
void admin_timeout(); //管理员权限剩余时间
void EnableDebugMode();
void DisableDebugMode();
void OnCancelAlarm(); //双击消警
void on_pushButton_reset_released();//复位
void OnCancelAlarm(); //双击消警
void on_pushButton_reset_released();//复位
void OnOp();
void OnExit();
@ -129,7 +127,7 @@ private:
PlcSetup * dialog_plc_setup;
std::vector<PlcItem> m_plc_items;
public:
QTimer *m_pTimer_Cam_mat[NumberOfSupportedCameras]; //相机重启定时器
QTimer *m_pTimer_Cam_mat[NumberOfSupportedCameras]; //相机重启定时器
QLabel *label_cap_speed_mat[NumberOfSupportedCameras];
QLabel *cam_status_mat[NumberOfSupportedCameras];
QLabel *cam_work_mat[NumberOfSupportedCameras];
@ -162,10 +160,10 @@ public:
void record_output_statistic(qint64 cur_quantity, int shift);
QTimer *m_pTimer;
QTimer *m_delay; //换班防止连击
QTimer *m_op_delay; //操作员权限剩余时间
QTimer *m_admin_delay; //操作员权限剩余时间
QTimer *clean_pTimer; //定时清理任务
QTimer *m_delay; //换班防止连击
QTimer *m_op_delay; //操作员权限剩余时间
QTimer *m_admin_delay; //操作员权限剩余时间
QTimer *clean_pTimer; //定时清理任务
QSignalMapper *image_lable_DBsignalMapper0;
QSignalMapper *image_lable_DBsignalMapper1;
@ -185,7 +183,6 @@ public:
threadReceive *rThread;
#endif
public slots:
void CleanThreadStart();
void CleanThreadStartAuto();
void recMsgFromUdp(QString data);
//void ClogThreadStart();

@ -4391,48 +4391,28 @@
<string/>
</property>
</widget>
<widget class="QToolButton" name="toolButton_version">
<widget class="QLabel" name="location">
<property name="geometry">
<rect>
<x>1190</x>
<x>1180</x>
<y>10</y>
<width>70</width>
<height>50</height>
</rect>
</property>
<property name="font">
<font>
<family>微软雅黑</family>
<pointsize>10</pointsize>
</font>
</property>
<property name="styleSheet">
<string notr="true">color:white</string>
</property>
<property name="text">
<string>版本信息</string>
</property>
</widget>
<widget class="QToolButton" name="toolButton_Clear_Pic">
<property name="geometry">
<rect>
<x>800</x>
<y>10</y>
<width>70</width>
<height>50</height>
<width>81</width>
<height>21</height>
</rect>
</property>
<property name="font">
<font>
<family>微软雅黑</family>
<pointsize>10</pointsize>
<pointsize>12</pointsize>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true">color:white</string>
</property>
<property name="text">
<string>清理图片</string>
<string>CDTH</string>
</property>
</widget>
<zorder>rotate_1</zorder>
@ -4533,7 +4513,6 @@
<zorder>rotate_8</zorder>
<zorder>rotate_7</zorder>
<zorder>image_label_71</zorder>
<zorder>toolButton_version</zorder>
<zorder>image_label_22</zorder>
<zorder>image_label_32</zorder>
<zorder>image_label_42</zorder>
@ -4542,7 +4521,7 @@
<zorder>image_label_72</zorder>
<zorder>image_label_82</zorder>
<zorder>image_label_12</zorder>
<zorder>toolButton_Clear_Pic</zorder>
<zorder>location</zorder>
</widget>
</widget>
<layoutdefault spacing="6" margin="11"/>

@ -10,8 +10,8 @@
#define __UDPSend //网络发送功能
#define USB_BASLER_NEW_FW //使用basler定制固件
//#define IMM_PROCESS //拍照后立马处理,不等校验信号
//#define IMM_FEED_BACK //处理完后立马反馈,不等校验信号
#define ONE_TIME_SHIFT //错开一拍发送反馈(默认错开两次)
#define IMM_FEED_BACK //处理完后立马反馈,不等校验信号
//#define ONE_TIME_SHIFT //错开一拍发送反馈(默认错开两次)
#define AI_WARM_UP //AI识别开始前的热身动作
//#define LICENSE_VERIFY //开启license文件校验
//CAP_FEED_BACK和DOUBLE_FEED_BACK不要一起开
@ -43,11 +43,13 @@ public:
int auto_open; //是否自动打开相机0否1是
int auto_work; //是否自动开始工作0否1是
int auto_shift; //是否自动换班0否1是
int shift_byhand; // 是否手动换班0否1是
QTime shiftA; //A换班时间
QTime shiftB; //B换班时间
QTime shiftC; //C换班时间
QString location; // 所在地
QString path; // 模型路径
QString path_jpg; // 图片路径
int timing_shift; //是否定时换班0否1是
int expo[NumberOfSupportedCameras]; //相机曝光时间,单位微秒
int gain[NumberOfSupportedCameras]; //相机模拟增益范围0~64
@ -72,10 +74,12 @@ public:
freesize = 10;
auto_open=1; //是否自动打开相机0否1是
auto_work=1; //是否自动开始工作0否1是
auto_shift=1; //是否自动换班0否1是
auto_shift=0; //是否自动换班0否1是
shift_byhand = 1;
timing_shift=0; //是否定时换班0否1是
location = "";
path = "";
path_jpg = "";
shiftA.setHMS(0, 0, 0);
shiftB.setHMS(0, 0, 0);
shiftC.setHMS(0, 0, 0);

@ -13,6 +13,9 @@
#include <windows.h> //用于显示桌面
#include <shldisp.h> //用于显示桌面
#include <QThread>
#include "Cleanthread.h"
extern SysConf g_sys_conf; //系统配置参数
extern QString g_admin_pswd; //管理员密码
extern QString g_op_pswd; //操作员密码
@ -25,7 +28,7 @@ void task_osk()
DialogSetup::DialogSetup(QWidget * parent) : QDialog(parent) {
ui.setupUi(this);
InitPtrMat();
this->setWindowFlags(Qt::FramelessWindowHint);
this->setWindowFlags(Qt::FramelessWindowHint);//窗口可移动
for(int i=0;i<NumberOfSupportedCameras;i++)
{
@ -220,14 +223,31 @@ void DialogSetup::on_pushButton_save_released()
g_sys_conf.gain[i] = (lineEdit_gain_mat[i]->text()).toInt();
g_sys_conf.filter[i] = (lineEdit_filter_mat[i]->text()).toInt();
}
write_config();
QMessageBox::information(NULL, QStringLiteral("提示"), QStringLiteral("保存参数成功,部分配置需要重启程序后生效"), QMessageBox::Ok);
}
void DialogSetup::on_pushButton_close_released()
{
this->close();
}
void DialogSetup::on_pushButton_clear_pic_released()
{
QThread* handleThread = new QThread();
CleanWorkThread* cleanWorkThread = new CleanWorkThread();
cleanWorkThread->moveToThread(handleThread);
connect(handleThread, &QThread::started, cleanWorkThread, &CleanWorkThread::startWork);
connect(cleanWorkThread, &CleanWorkThread::workStart, cleanWorkThread, &CleanWorkThread::setSel);
connect(cleanWorkThread, &CleanWorkThread::workFinished, cleanWorkThread, &CleanWorkThread::deleteLater);
connect(cleanWorkThread, &CleanWorkThread::destroyed, handleThread, &QThread::quit);
connect(handleThread, &QThread::finished, handleThread, &QThread::deleteLater);
handleThread->start();
}
void DialogSetup::on_toolButton_choose_path_released() {
//QString srcDirPath = QFileDialog::getExistingDirectory(this, "choose src Directory", "./");
QString WeightsPath = QFileDialog::getOpenFileName(this, "选择weights文件", "/", "Weights files(*.weights)");
@ -242,6 +262,18 @@ void DialogSetup::on_toolButton_choose_path_released() {
}
}
void DialogSetup::on_toolButton_choose_path_jpg_released() {
QString JpgPath = QFileDialog::getOpenFileName(this, "选择jpg文件", "/", "jpg files(*.jpg)");
if (JpgPath.isEmpty()) {
return;
}
else {
if (ui.comboBox_2->findText(JpgPath) == -1) {
ui.comboBox_2->addItem(JpgPath); // 在comboBox中显示文件路径
g_sys_conf.path_jpg = JpgPath; // 将选择的路径写入conf配置文件中
}
}
}
void DialogSetup::write_pswd()
{
@ -301,6 +333,9 @@ void DialogSetup::write_config()
sprintf(buf, "TIMING_SHIFT=%d\n", g_sys_conf.timing_shift);
cfg_file.write(buf, strlen(buf));
memset(buf, 0, 256);
sprintf(buf, "SHIFT_BYHAND=%d\n", g_sys_conf.shift_byhand);
cfg_file.write(buf, strlen(buf));
memset(buf, 0, 256);
sprintf(buf, "SHIFT_A=%d|%d\n", g_sys_conf.shiftA.hour(), g_sys_conf.shiftA.minute());
cfg_file.write(buf, strlen(buf));
memset(buf, 0, 256);
@ -316,6 +351,9 @@ void DialogSetup::write_config()
sprintf(buf, "MODELPATH=%s\n", g_sys_conf.path.toStdString().c_str());
cfg_file.write(buf, strlen(buf));
memset(buf, 0, 256);
sprintf(buf, "JPGPATH=%s\n", g_sys_conf.path_jpg.toStdString().c_str());
cfg_file.write(buf, strlen(buf));
memset(buf, 0, 256);
sprintf(buf, "*****************************************\n");
cfg_file.write(buf, strlen(buf));
#if defined(NumberOfSupportedCameras) && (NumberOfSupportedCameras>0)
@ -579,4 +617,3 @@ void DialogSetup::recMsgFromChangeShift(QTime timeA, QTime timeB, QTime timeC)
g_sys_conf.shiftB.setHMS(timeB.hour(), timeB.minute(), 0);
g_sys_conf.shiftC.setHMS(timeC.hour(), timeC.minute(), 0);
}

@ -21,12 +21,14 @@ private slots :
void on_pushButton_save_released();
void on_pushButton_close_released();
void on_toolButton_choose_path_released();
void on_toolButton_choose_path_jpg_released();
void on_pushButton_desktop_released();
void on_pushButton_image_released();
void on_pushButton_pswd_released();
void on_pushButton_pswd_op_released();
void on_pushButton_expo_released();
void on_pushButton_filter_released();
void on_pushButton_clear_pic_released();
void on_pushButton_config_released();
void on_pushButton_change_released();

@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>719</width>
<height>819</height>
<width>679</width>
<height>800</height>
</rect>
</property>
<property name="font">
@ -28,9 +28,9 @@
<property name="geometry">
<rect>
<x>0</x>
<y>10</y>
<width>716</width>
<height>819</height>
<y>-10</y>
<width>681</width>
<height>831</height>
</rect>
</property>
<property name="minimumSize">
@ -47,14 +47,14 @@
<rect>
<x>0</x>
<y>0</y>
<width>693</width>
<height>900</height>
<width>670</width>
<height>880</height>
</rect>
</property>
<property name="minimumSize">
<size>
<width>670</width>
<height>900</height>
<height>880</height>
</size>
</property>
<widget class="QGroupBox" name="groupBox_startSets">
@ -126,7 +126,7 @@
<x>10</x>
<y>510</y>
<width>641</width>
<height>91</height>
<height>81</height>
</rect>
</property>
<property name="font">
@ -144,7 +144,7 @@
<property name="geometry">
<rect>
<x>540</x>
<y>30</y>
<y>20</y>
<width>91</width>
<height>51</height>
</rect>
@ -165,7 +165,7 @@
<property name="geometry">
<rect>
<x>190</x>
<y>40</y>
<y>30</y>
<width>61</width>
<height>31</height>
</rect>
@ -186,7 +186,7 @@
<property name="geometry">
<rect>
<x>440</x>
<y>42</y>
<y>32</y>
<width>91</width>
<height>31</height>
</rect>
@ -210,7 +210,7 @@
<property name="geometry">
<rect>
<x>250</x>
<y>40</y>
<y>30</y>
<width>101</width>
<height>31</height>
</rect>
@ -234,7 +234,7 @@
<property name="geometry">
<rect>
<x>360</x>
<y>40</y>
<y>30</y>
<width>81</width>
<height>31</height>
</rect>
@ -255,7 +255,7 @@
<property name="geometry">
<rect>
<x>90</x>
<y>40</y>
<y>30</y>
<width>91</width>
<height>31</height>
</rect>
@ -279,7 +279,7 @@
<property name="geometry">
<rect>
<x>20</x>
<y>40</y>
<y>30</y>
<width>61</width>
<height>31</height>
</rect>
@ -1015,7 +1015,7 @@
<property name="geometry">
<rect>
<x>10</x>
<y>690</y>
<y>670</y>
<width>641</width>
<height>148</height>
</rect>
@ -1498,7 +1498,7 @@
<property name="geometry">
<rect>
<x>120</x>
<y>840</y>
<y>820</y>
<width>131</width>
<height>51</height>
</rect>
@ -1540,9 +1540,9 @@
<property name="geometry">
<rect>
<x>10</x>
<y>600</y>
<y>590</y>
<width>641</width>
<height>91</height>
<height>81</height>
</rect>
</property>
<property name="font">
@ -1560,7 +1560,7 @@
<property name="geometry">
<rect>
<x>190</x>
<y>40</y>
<y>30</y>
<width>61</width>
<height>31</height>
</rect>
@ -1581,7 +1581,7 @@
<property name="geometry">
<rect>
<x>440</x>
<y>42</y>
<y>32</y>
<width>91</width>
<height>31</height>
</rect>
@ -1605,7 +1605,7 @@
<property name="geometry">
<rect>
<x>250</x>
<y>40</y>
<y>30</y>
<width>101</width>
<height>31</height>
</rect>
@ -1629,7 +1629,7 @@
<property name="geometry">
<rect>
<x>360</x>
<y>40</y>
<y>30</y>
<width>81</width>
<height>31</height>
</rect>
@ -1650,7 +1650,7 @@
<property name="geometry">
<rect>
<x>90</x>
<y>40</y>
<y>30</y>
<width>91</width>
<height>31</height>
</rect>
@ -1674,7 +1674,7 @@
<property name="geometry">
<rect>
<x>20</x>
<y>40</y>
<y>30</y>
<width>61</width>
<height>31</height>
</rect>
@ -1695,7 +1695,7 @@
<property name="geometry">
<rect>
<x>540</x>
<y>30</y>
<y>20</y>
<width>91</width>
<height>51</height>
</rect>
@ -1717,7 +1717,7 @@
<property name="geometry">
<rect>
<x>380</x>
<y>840</y>
<y>820</y>
<width>131</width>
<height>51</height>
</rect>
@ -1804,7 +1804,7 @@
<property name="geometry">
<rect>
<x>10</x>
<y>465</y>
<y>460</y>
<width>101</width>
<height>41</height>
</rect>
@ -1825,7 +1825,7 @@
<property name="geometry">
<rect>
<x>120</x>
<y>465</y>
<y>460</y>
<width>111</width>
<height>41</height>
</rect>
@ -1846,7 +1846,7 @@
<property name="geometry">
<rect>
<x>240</x>
<y>465</y>
<y>460</y>
<width>91</width>
<height>41</height>
</rect>
@ -1867,7 +1867,7 @@
<property name="geometry">
<rect>
<x>620</x>
<y>472</y>
<y>470</y>
<width>27</width>
<height>26</height>
</rect>
@ -1885,14 +1885,15 @@
<property name="geometry">
<rect>
<x>340</x>
<y>475</y>
<width>91</width>
<y>470</y>
<width>101</width>
<height>21</height>
</rect>
</property>
<property name="font">
<font>
<family>微软雅黑</family>
<pointsize>10</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
@ -1902,10 +1903,45 @@
</property>
</widget>
<widget class="QComboBox" name="comboBox">
<property name="geometry">
<rect>
<x>450</x>
<y>470</y>
<width>161</width>
<height>25</height>
</rect>
</property>
<property name="font">
<font>
<family>微软雅黑</family>
</font>
</property>
</widget>
<widget class="QLabel" name="label_path_jpg">
<property name="geometry">
<rect>
<x>340</x>
<y>970</y>
<width>91</width>
<height>21</height>
</rect>
</property>
<property name="font">
<font>
<family>微软雅黑</family>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>图片存储路径</string>
</property>
</widget>
<widget class="QComboBox" name="comboBox_2">
<property name="geometry">
<rect>
<x>440</x>
<y>472</y>
<y>970</y>
<width>171</width>
<height>25</height>
</rect>
@ -1916,6 +1952,45 @@
</font>
</property>
</widget>
<widget class="QToolButton" name="toolButton_choose_path_jpg">
<property name="geometry">
<rect>
<x>620</x>
<y>970</y>
<width>27</width>
<height>26</height>
</rect>
</property>
<property name="font">
<font>
<family>微软雅黑</family>
</font>
</property>
<property name="text">
<string>...</string>
</property>
</widget>
<widget class="QPushButton" name="pushButton_clear_pic">
<property name="geometry">
<rect>
<x>370</x>
<y>10</y>
<width>130</width>
<height>50</height>
</rect>
</property>
<property name="font">
<font>
<family>微软雅黑</family>
<pointsize>12</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>清理图片</string>
</property>
</widget>
</widget>
</widget>
</widget>

@ -203,7 +203,8 @@ void WorkThread::run()
if(unit_count>=3)
emit notify(local_camera_number, 1,image2);
}
else { //保证不错位
else
{ //保证不错位
if(local_SysConf.MisMatchAct == 1)//as ng
emit event_ng(local_camera_number);
else if(local_SysConf.MisMatchAct == 0)//as ok

@ -40,7 +40,7 @@ CigaretteSingle::CigaretteSingle(QWidget *parent)
connect(ui->textBrowser, SIGNAL(cursorPositionChanged()), this, SLOT(autoScroll()));
m_alg_ptr = new Alg;
/*int hik_cnt = 0;
int hik_cnt = 0;
hik_cnt = HIKCamera::Enumerate();
if (hik_cnt)
{
@ -49,7 +49,7 @@ CigaretteSingle::CigaretteSingle(QWidget *parent)
HikControllerPtr->p_image_queue = g_image_queue;
HikControllerPtr->p_result_queue = g_result_queue;
HikControllerPtr->OpenCamera();
}*/
}
work_thread.p_image_queue = g_image_queue;
work_thread.p_result_queue = g_result_queue;

@ -31,12 +31,12 @@
<Import Project="$(QtMsBuild)\qt_defaults.props" />
</ImportGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'" Label="QtSettings">
<QtInstall>QT5.15</QtInstall>
<QtInstall>5.15.2_msvc2019_64</QtInstall>
<QtModules>core;gui;widgets</QtModules>
<QtBuildConfig>debug</QtBuildConfig>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'" Label="QtSettings">
<QtInstall>QT5.15</QtInstall>
<QtInstall>5.15.2_msvc2019_64</QtInstall>
<QtModules>core;gui;widgets</QtModules>
<QtBuildConfig>release</QtBuildConfig>
</PropertyGroup>

@ -49,7 +49,7 @@ void WorkThread::run()
}
cv::Mat output_image;
m_alg_ptr->process(image,output_image);
m_alg_ptr->process_2dfft(image,output_image);
emit display_image(image);

@ -348,7 +348,7 @@ void Alg::process_2dfft(cv::Mat &input,cv::Mat &output)
fistEROthenDIL(third_input, 3, 5);
output = third_input.clone();
cv::waitKey(1);
//cv::waitKey(1);
t = ((double)cv::getTickCount() - t) / cv::getTickFrequency();
std::cout << "cost time\t" << t <<" s" << std::endl;

File diff suppressed because it is too large Load Diff

@ -5,12 +5,14 @@ FREESIZE=10
AUTO_OPEN=1
AUTO_WORK=1
AUTO_SHIFT=0
TIMING_SHIFT=1
SHIFT_A=6|0
SHIFT_B=12|0
SHIFT_C=20|0
LOCATION=CD TH
TIMING_SHIFT=0
SHIFT_BYHAND=1
SHIFT_A=0|0
SHIFT_B=0|0
SHIFT_C=0|0
LOCATION=TESTTESTTEST
MODELPATH=D:/cameras8/0413/cigarette-8cameras/model/jd.weights
JPGPATH=D:/cigarette-8cameras/Cigarette/alg_jd.jpg
*****************************************
EXPO1=2500
GAIN1=0

Loading…
Cancel
Save