diff --git a/tpvs17/caliValve/calivalve_en.ts b/tpvs17/caliValve/calivalve_en.ts index ea43461..6206393 100644 --- a/tpvs17/caliValve/calivalve_en.ts +++ b/tpvs17/caliValve/calivalve_en.ts @@ -43,5 +43,14 @@ Number of spokes Number of spokes + + 参考线模板 + Reference line template + Reference line template + + + + + diff --git a/tpvs17/lpdesigner/lpdesigner_en.ts b/tpvs17/lpdesigner/lpdesigner_en.ts index 8b202e1..88e105c 100644 --- a/tpvs17/lpdesigner/lpdesigner_en.ts +++ b/tpvs17/lpdesigner/lpdesigner_en.ts @@ -4,50 +4,50 @@ AlgoDlg - + 算法 algorithm algorithm - + 名称: Name: Name: - + 算法库: AlgoLib: AlgoLib: - - + + 请选择 Select Select - + ROI: ROI: ROI: - + 描述: Depict: Depict: - + 确定 OK OK - + 取消 Cancel Cancel @@ -56,82 +56,109 @@ AlgorithmParamMgrDialog - + 算法设置 Algo Setting Algo Setting - + 编号 Num Num - + 名称 Name Name - + 类型 Type Type - + Value Value - + 描述 depict - depict + detail - + 新增 Add Add - + 编辑 Edit Edit - + 删除 Delete Delete - + 上移 Up Up - + 下移 Down Down - + 关闭 Close Close + + CDsgParamDlg + + + 提示 + Info + + + + 请设置标定图再进行ROI标定! + Please set the Standard Image and then Use the function! + + + + 确认 + OK + + CMainFrame - + + + + + + (√) + + + + Param File (*.json) @@ -139,181 +166,205 @@ MainFrame - + 标定 calibration calibration - + 保存 Save Save - + + 修改完参数需要保存才能生效!!! + The parameters need to be saved to take effect!! + + + 解决方案资源管理 Manager Manager - 导入图片: Load Image: - Load Image: + Load Image: - 拍摄 Triger - Triger + Triger - - > - - - - + 输出结果: Output: Output: - + + 加载标定图像 + Load Image + + + 清空结果 Clear Clear - + Pixel info: ... - + 算法列表 List List - - + + 编号 Num Num - - + + 名称 Name Name - + ROI - + + + 描述 + Detail + + + 参数列表 Params Params - + 类型 Type Type - + Value Value - - test + + add + + + + + del + + + + + save ParamDlg - + 参数信息 ParamInfo ParamInfo - + 输出参数: Output: Output: - + None - + 算法: Algo: Algo: - + 描述: Depict: Depict: - + 值: Value: Value: - + 类型: Type: Type: - + 名称: Name: Name: - + 是否保存 Save or Not Save or Not - + 是否锁定 Lock or not Lock or not - + + 是否显示 + Show or not + + + 设置ROI Set ROI Set ROI - + 确定 OK OK - + 取消 Cancel Cancel @@ -322,191 +373,183 @@ QObject - + 标定数据保存完成! ...Save finish! - ...Save finish! + Save finish! - + 保存失败! Save Failed! - Save Failed! + Save failed! - 工位%1 Station%1 - Station%1 + Station%1 - + 运行 Run Run - 选择算法 Select Algo - Select Algo + Select Algo - - + 编辑 Edit Edit - + 输入参数设置 Input Setting Input Setting - + 输出参数设置 Output Setting Output Setting - + 更新关联算法参数 Update Algo Connection Update Algo Connection - + 更新关联完成 Update Connection Finish Update Connection Finish - + Error,更新关联失败!!! Error,Update Failed!!! Error,Update Failed!!! - + 算法名称: Algo Name: Algo Name: - + 图片名称: Image Name: Image Name: - + 加载算法失败,请检查是否配置相应的算法库 - 加载标定图片 Load Image - Load Image + Load Image - + 设置当前为标定图 Use Cur Image Use Cur Image - - + 提示 Info Info - 配置已修改过,是否保存相关参数到文件中? Save or Not? - Save or Not? + Save or Not? - + 编号 Num Num - + 名称 Name Name - + 类型 Type Type - + Value Value - + 描述 Depict Depict - + 确认删除? Sure Delete? Sure Delete? - - + Yes Yes - - + No No - + 编辑参数 Edit Edit - - - - + + + + 错误提示 Error Error - - - - + + + + 加载算法库失败 Load Algo Failed Load Algo Failed - - + + 显示定位线 @@ -514,13 +557,13 @@ Show Line - + 警告 Warning Warning - + 系统检测到有ROI未进行绑定,请绑定后继续!!! ROI did not Lock,Please Lock and Continue!!! ROI did not Lock,Please Lock and Continue!!! @@ -532,34 +575,34 @@ Hide Line - - + + 解绑 Unbind - - + + 绑定 Bind - + 解除径向绑定 Unbind radial - + 径向解锁 Radial unlocking - + 删除 Delete - + 径向绑定 Radial binding @@ -567,149 +610,135 @@ RoiDlg - + ROI检测区域配置 ROI Setting ROI Setting - + + 步长 + Step + + + + + + + + ... + + + + 确定 OK OK - + 取消 Cancel Cancel - + 工具 Tool Tool - + 颜色 Color Color - + circle circle - 矩形 rectangle - rectangle + rectangle - 椭圆 ellipse - ellipse + ellipse - + 十字标定线 Cross marker Cross marker - + 绘图区域: ROI Area: ROI Area: - + Pixel info: - 控制台: console: - console: + console: - - X: - - - - 宽: W: - W: + W: - Y: Y: - Y: + Y: - H - H - - - - + - - - - - - - + H - 上 - Up + Up - Left - Left + Left - 确认 OK - OK + OK - Right - Right + Right - Down - Down + Down - 设置图片 Set Image - Set Image + Set Image - 从相机获取图片 Triger - Triger + Triger diff --git a/tpvs17/tpMain/QAlgParamDlg.cpp b/tpvs17/tpMain/QAlgParamDlg.cpp index 3454c5b..ca9cc30 100644 --- a/tpvs17/tpMain/QAlgParamDlg.cpp +++ b/tpvs17/tpMain/QAlgParamDlg.cpp @@ -1,4 +1,4 @@ -#include "QAlgParamDlg.h" +#include "QAlgParamDlg.h" #include "qshowimg.h" #include #include @@ -102,7 +102,7 @@ void QAlgParamDlg::getParam() Q_SLOT void QAlgParamDlg::onChangeBG() { QFileDialog fileDialog; - fileDialog.setWindowTitle(tr("ѡıͼ")); + fileDialog.setWindowTitle(tr("请选择您的背景图")); fileDialog.setNameFilter("Picture(*.bmp *.jpg *.png)"); fileDialog.setFileMode(QFileDialog::ExistingFiles); if (fileDialog.exec() == QDialog::Accepted) @@ -131,9 +131,9 @@ Q_SLOT void QAlgParamDlg::onChangeBG() //return false; } //emit sgChangeBG(DstPath); - QMessageBox infobox(QMessageBox::Information, tr("ʾ"), tr("ͼɣ."), QMessageBox::Yes, NULL); + QMessageBox infobox(QMessageBox::Information, tr("提示"), tr("背景图更新完成,请重启本软件."), QMessageBox::Yes, NULL); infobox.setWindowIcon(QIcon(":/image/leaper")); - infobox.setButtonText(QMessageBox::Yes, tr("ȷ")); + infobox.setButtonText(QMessageBox::Yes, tr("确认")); infobox.exec(); } } diff --git a/tpvs17/tpMain/QModelMgrDlg.cpp b/tpvs17/tpMain/QModelMgrDlg.cpp index 266b28c..c799bae 100644 --- a/tpvs17/tpMain/QModelMgrDlg.cpp +++ b/tpvs17/tpMain/QModelMgrDlg.cpp @@ -491,7 +491,7 @@ Q_SLOT void QModelMgrDlg::onTextChanged(const QString& str) else { QStringList strFilter = models.filter(str); m_pModelLists->setModelList(strFilter); - QString m_str = QString("%1 %2 个型号").arg(tr("共")).arg(strFilter.size()).arg(tr("个型号")); + QString m_str = QString("%1 %2 ").arg(tr("共")).arg(strFilter.size()).arg(tr("个型号")); ui.ModelMgr_label_Model_number->setText(m_str); } } @@ -996,7 +996,7 @@ void QModelMgrDlg::showEvent(QShowEvent *event) strModels.removeAll("NG"); m_pModelLists->setModelList(strModels); - QString m_str = QString("%1 %2 个型号").arg(tr("共")).arg(strModels.size()).arg(tr("个型号")); + QString m_str = QString("%1 %2 ").arg(tr("共")).arg(strModels.size()).arg(tr("个型号")); ui.ModelMgr_label_Model_number->setText(m_str); } } diff --git a/tpvs17/tpMain/QPLCDevice.cpp b/tpvs17/tpMain/QPLCDevice.cpp index 16fff75..ab14ab2 100644 --- a/tpvs17/tpMain/QPLCDevice.cpp +++ b/tpvs17/tpMain/QPLCDevice.cpp @@ -161,7 +161,7 @@ bool QPLCDevice::getClinetInfo(QString &client) { if (m_clientList.size() > 0) { - client = m_clientList.first(); + client = QString("%1[%2]").arg(m_clientList.last()).arg(m_clientList.size()); return true; } return false; diff --git a/tpvs17/tpMain/lpImageCaliUI.cpp b/tpvs17/tpMain/lpImageCaliUI.cpp index 4cb750b..0eaac70 100644 --- a/tpvs17/tpMain/lpImageCaliUI.cpp +++ b/tpvs17/tpMain/lpImageCaliUI.cpp @@ -1,4 +1,4 @@ -#include "lpImageCaliUI.h" +#include "lpImageCaliUI.h" #include "QFileDialog" #include "lpGlobalConfig.h" @@ -79,7 +79,7 @@ void lpImageCaliUI::showEvent(QShowEvent *event) m_srcImgView->setLabelVisible(true); m_srcImgView->setLockAll(true); } - ui.m_pbLock->setText(tr("")); + ui.m_pbLock->setText(tr("解锁")); } Q_SLOT void lpImageCaliUI::onButtonClicked() @@ -87,7 +87,7 @@ Q_SLOT void lpImageCaliUI::onButtonClicked() QString strObj = sender()->objectName(); if (strObj == "m_pbLoadImg") { - QString fileName = QFileDialog::getOpenFileName(this, tr("ѡ궨ͼ"), "/home/jana", tr("Image Files (*.png *.jpg *.bmp)")); + QString fileName = QFileDialog::getOpenFileName(this, tr("选择标定图"), "/home/jana", tr("Image Files (*.png *.jpg *.bmp)")); if (!fileName.isEmpty()) { QString DstPath = QApplication::applicationDirPath() + "\\user\\StandImage.png"; @@ -153,8 +153,8 @@ Q_SLOT void lpImageCaliUI::onButtonClicked() else if("m_pbLock" == strObj) { QString str = ui.m_pbLock->text(); - if (str == "") { - ui.m_pbLock->setText(tr("")); + if (str == "解锁") { + ui.m_pbLock->setText(tr("上锁")); if (m_srcImgView) { m_srcImgView->setLockAll(false); @@ -165,7 +165,7 @@ Q_SLOT void lpImageCaliUI::onButtonClicked() { m_srcImgView->setLockAll(true); } - ui.m_pbLock->setText(tr("")); + ui.m_pbLock->setText(tr("解锁")); } } } @@ -220,7 +220,7 @@ void lpImageCaliUI::AddPoint(QPoint &p,QString strName) Q_SLOT void lpImageCaliUI::onRoiLockIng(QString strName) { - ui.label_info->setText("ܲ,"); + ui.label_info->setText("不能操作,请解锁"); ui.label_info->setStyleSheet("background-color: rgb(255, 68, 55);"); if (m_timerID == 0) { diff --git a/tpvs17/tpMain/lpMainWin.cpp b/tpvs17/tpMain/lpMainWin.cpp index 4b8713f..9342ca0 100644 --- a/tpvs17/tpMain/lpMainWin.cpp +++ b/tpvs17/tpMain/lpMainWin.cpp @@ -22,9 +22,9 @@ #include "databasesql.h" #include "lpCryptokey.h" -#define VERSION_HUB "3.0.1.5" +#define VERSION_HUB "3.0.1.6" #define VERSION_ALG "3.0.1.4" -#define UPDATE_TIME "2021-10-09" +#define UPDATE_TIME "2021-10-11" #pragma execution_character_set("utf-8") #define MODEL_UI_ICON_NONE ":/image/no-img" @@ -85,18 +85,20 @@ static cv::Mat QImageToMat(QImage image) { lpMainWin::lpMainWin(QWidget *parent) : QMainWindow(parent) { - this->setWindowIcon(QIcon(":/image/leaper")); - qRegisterMetaType("TimeStruct"); - onInitCoreCtrl();//初始化CoreCtrl模块 相机相关处理模块 - onInitEngineCtrl(); ui.setupUi(this); - onInitAbout(); - setupTrayIcon(); {//加载语言设置 QSettings languageSetting("hubdetect.ini", QSettings::IniFormat); QString strLanguage = languageSetting.value("language", "Chinese").toString(); SetLanguage(strLanguage); } + this->setWindowIcon(QIcon(":/image/leaper")); + qRegisterMetaType("TimeStruct"); + onInitCoreCtrl();//初始化CoreCtrl模块 相机相关处理模块 + onInitEngineCtrl(); + + onInitAbout(); + setupTrayIcon(); + lpGlobalConfig::instance()->loadStandParam(); { QGridLayout *pLayout = new QGridLayout(ui.cam_win_1); @@ -129,8 +131,8 @@ lpMainWin::lpMainWin(QWidget *parent) QMenu *pToolMenu = new QMenu(this); pToolMenu->addAction(ui.actioncamSetting); - pToolMenu->addAction(ui.action_ImageCali);//图像标定 pToolMenu->addAction(ui.actionSystemSeting); + pToolMenu->addAction(ui.action_ImageCali);//图像标定 pToolMenu->addAction(ui.actionalgo); pToolMenu->addAction(ui.action_debug); @@ -222,6 +224,7 @@ lpMainWin::lpMainWin(QWidget *parent) m_pAlgParamDlg = new QAlgParamDlg();//算法参数调试页面 connect(m_pSystemConfigUI, SIGNAL(sgUpdateInfo()), this, SLOT(setWindowTitleInfo()));//系统标题 + connect(m_pSystemConfigUI, SIGNAL(sgLanguageChange(QString)), this, SLOT(onLanguageChange(QString))); } onSetModel(); { diff --git a/tpvs17/tpMain/lpMainWin.ui b/tpvs17/tpMain/lpMainWin.ui index 642c8ef..e92d398 100644 --- a/tpvs17/tpMain/lpMainWin.ui +++ b/tpvs17/tpMain/lpMainWin.ui @@ -7,7 +7,7 @@ 0 0 1025 - 704 + 707 @@ -205,7 +205,7 @@ - 识别定位检测 + @@ -419,7 +419,7 @@ font: 75 24pt "Consolas"; 匹配值 - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + Qt::AlignCenter @@ -578,6 +578,9 @@ font: 75 24pt "Consolas"; 定位耗时 + + Qt::AlignCenter + @@ -605,6 +608,9 @@ font: 75 24pt "Consolas"; 识别耗时 + + Qt::AlignCenter + diff --git a/tpvs17/tpMain/lpSystemConfigUI.cpp b/tpvs17/tpMain/lpSystemConfigUI.cpp index 921d40c..4267605 100644 --- a/tpvs17/tpMain/lpSystemConfigUI.cpp +++ b/tpvs17/tpMain/lpSystemConfigUI.cpp @@ -1,4 +1,4 @@ -#include "lpSystemConfigUI.h" +#include "lpSystemConfigUI.h" #include "lpGlobalConfig.h" #include #include "QSettings" @@ -28,12 +28,12 @@ Q_SLOT void lpSystemConfigUI::onButtonClicked() { QString strObj = sender()->objectName(); if (strObj == "m_pbApply") { - lpGlobalConfig::instance()->bSaveCutNGImg = ui.checkBox_saveNGCutImg->isChecked();//ʶ - lpGlobalConfig::instance()->bSaveCutOKImg = ui.checkBox_saveOKCutImg->isChecked();//ʶ - lpGlobalConfig::instance()->bSaveSrcNGImg = ui.checkBox_saveNGSrcImg->isChecked();//ʶ - lpGlobalConfig::instance()->bSaveSrcOKImg = ui.checkBox_saveOKSrcImg->isChecked();//ʶ - lpGlobalConfig::instance()->bSaveSrcOKImg_value = ui.checkBox_saveValue_OKSrcImg->isChecked();//λ - lpGlobalConfig::instance()->bSaveSrcNGImg_value = ui.checkBox_saveValue_NGSrcImg->isChecked();//λ + lpGlobalConfig::instance()->bSaveCutNGImg = ui.checkBox_saveNGCutImg->isChecked();//识别 + lpGlobalConfig::instance()->bSaveCutOKImg = ui.checkBox_saveOKCutImg->isChecked();//识别 + lpGlobalConfig::instance()->bSaveSrcNGImg = ui.checkBox_saveNGSrcImg->isChecked();//识别 + lpGlobalConfig::instance()->bSaveSrcOKImg = ui.checkBox_saveOKSrcImg->isChecked();//识别 + lpGlobalConfig::instance()->bSaveSrcOKImg_value = ui.checkBox_saveValue_OKSrcImg->isChecked();//定位 + lpGlobalConfig::instance()->bSaveSrcNGImg_value = ui.checkBox_saveValue_NGSrcImg->isChecked();//定位 lpGlobalConfig::instance()->m_SaveImgDirPath = ui.lineEdit->text(); //lpGlobalConfig::instance()->tcpServerPort = ui.lineEdit_2->text().toInt(); lpGlobalConfig::instance()->tcpServerPort = ui.lineEdit_3->text().toInt(); @@ -45,7 +45,7 @@ Q_SLOT void lpSystemConfigUI::onButtonClicked() QString strLanguage = ui.comboBox->currentText(); QSettings languageSetting("hubdetect.ini", QSettings::IniFormat); languageSetting.setValue("language", strLanguage); - + emit sgLanguageChange(strLanguage); ui.m_label_SaveInfo->setVisible(true); m_timerID = startTimer(1000); emit sgUpdateInfo(); @@ -54,7 +54,7 @@ Q_SLOT void lpSystemConfigUI::onButtonClicked() this->close(); } else if (strObj == "m_pbSetPath") { - QString str = QFileDialog::getExistingDirectory(this, "ѡļ"); + QString str = QFileDialog::getExistingDirectory(this, "选择文件夹"); if (!str.isEmpty()) { ui.lineEdit->setText(str); @@ -65,12 +65,12 @@ Q_SLOT void lpSystemConfigUI::onButtonClicked() void lpSystemConfigUI::showEvent(QShowEvent *event) { ui.m_label_SaveInfo->setVisible(false); - ui.checkBox_saveNGCutImg->setChecked(lpGlobalConfig::instance()->bSaveCutNGImg);//ʶ - ui.checkBox_saveOKCutImg->setChecked(lpGlobalConfig::instance()->bSaveCutOKImg);//ʶ - ui.checkBox_saveNGSrcImg->setChecked(lpGlobalConfig::instance()->bSaveSrcNGImg);//ʶ - ui.checkBox_saveOKSrcImg->setChecked(lpGlobalConfig::instance()->bSaveSrcOKImg);//ʶ - ui.checkBox_saveValue_OKSrcImg->setChecked(lpGlobalConfig::instance()->bSaveSrcOKImg_value);//λ - ui.checkBox_saveValue_NGSrcImg->setChecked(lpGlobalConfig::instance()->bSaveSrcNGImg_value);//λ + ui.checkBox_saveNGCutImg->setChecked(lpGlobalConfig::instance()->bSaveCutNGImg);//识别 + ui.checkBox_saveOKCutImg->setChecked(lpGlobalConfig::instance()->bSaveCutOKImg);//识别 + ui.checkBox_saveNGSrcImg->setChecked(lpGlobalConfig::instance()->bSaveSrcNGImg);//识别 + ui.checkBox_saveOKSrcImg->setChecked(lpGlobalConfig::instance()->bSaveSrcOKImg);//识别 + ui.checkBox_saveValue_OKSrcImg->setChecked(lpGlobalConfig::instance()->bSaveSrcOKImg_value);//定位 + ui.checkBox_saveValue_NGSrcImg->setChecked(lpGlobalConfig::instance()->bSaveSrcNGImg_value);//定位 //ui.lineEdit_2->setText(QString("%1").arg(lpGlobalConfig::instance()->tcpServerPort)); ui.lineEdit_3->setText(QString("%1").arg(lpGlobalConfig::instance()->tcpServerPort)); diff --git a/tpvs17/tpMain/lpSystemConfigUI.h b/tpvs17/tpMain/lpSystemConfigUI.h index 4a48ec2..6311f59 100644 --- a/tpvs17/tpMain/lpSystemConfigUI.h +++ b/tpvs17/tpMain/lpSystemConfigUI.h @@ -13,6 +13,7 @@ public: ~lpSystemConfigUI(); signals: void sgUpdateInfo(); + void sgLanguageChange(QString); protected: Q_SLOT void onButtonClicked(); virtual void showEvent(QShowEvent *event); diff --git a/tpvs17/tpMain/lpmain_en.qm b/tpvs17/tpMain/lpmain_en.qm index fd5bc73..413b022 100644 Binary files a/tpvs17/tpMain/lpmain_en.qm and b/tpvs17/tpMain/lpmain_en.qm differ diff --git a/tpvs17/tpMain/lpmain_en.ts b/tpvs17/tpMain/lpmain_en.ts index 9f17259..057badd 100644 --- a/tpvs17/tpMain/lpmain_en.ts +++ b/tpvs17/tpMain/lpmain_en.ts @@ -26,8 +26,8 @@ 型号 - Model - Model + Name + Name @@ -106,7 +106,7 @@ 轮毂型号 Name: - Name: + Name @@ -119,19 +119,19 @@ 直径(mm) Diameter(mm): - Diameter(mm): + Diameter 厚度(mm) Thickness(mm): - Thickness(mm): + Thickness 旋转次数 Rotations: - Rotations: + Rota @@ -201,6 +201,104 @@ Text day + + QAlgParamDlg + + + 算法参数设置 + Algo Param Setting + + + + 圆半径大小过滤: + Circle Filter Size: + + + + 检测背景图更换: + Background Image: + + + + 查看检测背景 + Change + + + + 二级圆定位: + Circle Param: + + + + 边缘宽度: + Edge Width: + + + + 从深到浅 + Dark to Write + + + + 从浅到深 + Write to Dark + + + + 边缘对比度: + AC Thres: + + + + 边缘转换: + Polarity: + + + + 是否使用图像增强 + Use Image Enhancement + + + + 是否使用背景图找圆算法 + Use Background Algo + + + + 参数已生效!!! + Apply Success!!! + + + + 应用 + Apply + + + + 退出 + Close + + + + 请选择您的背景图 + Please select your background Image + + + + 提示 + Info + + + + 背景图更新完成,请重启本软件. + Background image updated, please restart this software. + + + + 确认 + OK + + QCamSettingDlg @@ -211,7 +309,7 @@ 序列号: - Serial Number: + Serial: @@ -221,12 +319,12 @@ 相机类型: - Camera Type: + Type: 虚拟相机 - Virtual Camera + Virtual @@ -246,12 +344,12 @@ 设置 - Setting + Set 图像高度: - Image Height: + Height: @@ -266,7 +364,7 @@ 图像宽度: - Image Width: + Width: @@ -278,7 +376,7 @@ 图像格式: - Image Format + Format: @@ -293,17 +391,17 @@ 内触发 - Internal trigger + Internal 外触发 - External trigger + External 软触发 - Soft trigger + Soft @@ -451,49 +549,49 @@ 注册 - + Register 退出 - + Close 机器码: - + Serial: 注册码: - + License: 激活 - + Active 请输入注册码 - + Please input License 激活状态: - + State: 未激活 - + No Active 提示 - + Info @@ -540,19 +638,19 @@ p, li { white-space: pre-wrap; } 直径mm: - diameter(mm): + Diameter(mm): 开始模拟检测 - Start simulation test + Continus 采集一张 - Collect one + Signal @@ -659,7 +757,7 @@ p, li { white-space: pre-wrap; } 缩略图: - Thumbnail: + Image: @@ -708,12 +806,12 @@ p, li { white-space: pre-wrap; } 轮毂信息: - Wheel information: + Info: 型号 - Model + Name @@ -733,12 +831,12 @@ p, li { white-space: pre-wrap; } 旋转次数 - Rotations + Rotate - + 缩略图 - Thumbnail + Image @@ -761,60 +859,60 @@ p, li { white-space: pre-wrap; } Add to train - + 基本操作 - Basic operation + Operation - - + + 删除模板 Delete - + 训练当前模板 - Training + Train - + 训练模板 Train - + 添加新的模板 - Add new + Add - + 新建模板 New - + 训练所有模板,消耗时间会较长 Training all templates will take longer - + 训练全部 Train all - + 确认修改,每次修改模板的参数后都要确认修改才有效 Confirm the modification, every time you modify the parameters of the template, you must confirm the modification to be effective - + 修改确认 - Confirm + Mod - + 修改型号名 - Modify name + Mod Name @@ -964,7 +1062,7 @@ p, li { white-space: pre-wrap; } 共 - common + with @@ -1197,15 +1295,14 @@ p, li { white-space: pre-wrap; } 识别定位一体系统 - + Detection System QSettingDlg - QSettingDlg - QSettingDlg + QSettingDlg @@ -1218,12 +1315,12 @@ p, li { white-space: pre-wrap; } 退出 - Exit + Close 我要更换背景 - Change background + Change @@ -1231,7 +1328,7 @@ p, li { white-space: pre-wrap; } pic - + 没有用于检测的背景图,请更换检测背景 There is no background image for testing. Please change the testing background @@ -1938,32 +2035,32 @@ p, li { white-space: pre-wrap; } 相机视场标定 - + Camera Standard 操作 - + Operator 选择标定图像 - + Select Image P1_X: - + P1_Y: - + P2_Y: - + @@ -1971,69 +2068,69 @@ p, li { white-space: pre-wrap; } 1200 - 1200 + 1200 P2_X: - + 两点实际距离mm: - + 2 Point DistanceL: 两点像素距离px: - + 2 Pixel Distance: 像素比例值(mm/px): - + scale(mm/px): + + 解锁 - + Unlock 物理X方向偏移: - + Real X Offset: 物理Y方向偏移: - + Real Y Offset: 应用 - Use + Apply 退出 - + Close - - - - ���� - + + Image Files (*.png *.jpg *.bmp) + - ѡ���궨ͼ - + 选择标定图 + Select Image - - Image Files (*.png *.jpg *.bmp) - + + 上锁 + Lock @@ -2051,18 +2148,13 @@ p, li { white-space: pre-wrap; } 状态信息 - Status information - - - - 识别定位检测 - + Status - + 开始检测 - Start testing + Start @@ -2080,7 +2172,7 @@ p, li { white-space: pre-wrap; } 匹配值 - Match value + Score 直径(mm) @@ -2090,18 +2182,12 @@ p, li { white-space: pre-wrap; } 时间(s) Time(s) - - - 匹配值 - 通道 - Channel - - + 0 0 @@ -2125,17 +2211,17 @@ p, li { white-space: pre-wrap; } Thickness(mm) - + 统计结果 - Statistical results + Static - + modelID_detect modelID_detect - + count count @@ -2144,17 +2230,17 @@ p, li { white-space: pre-wrap; } Exchange class reset - + 型号数量 - Model number + Model Number - + 模板管理 - Template management + Model Manager - + 数据查询 History @@ -2165,143 +2251,148 @@ p, li { white-space: pre-wrap; } 0.0 - 0.0 + 0.0 角度 - + Angle (0.0) - + 圆心坐标 - + Center 定位结果 - + Result 定位耗时 - + time - + 识别耗时 - + time - + 分数 - + Score - + 型号管理 - + Model Manager - + 检测勾选 - + Model Check - + 辅助工具 - Auxiliary tools + Debg Tool - + 班次设置 - Classes setting + Classes Setting - + 光栅标定 - Raster calibration + Raster Setting - + IP设置 - IP settings + IP Setting - - + + 关于 About - + 登录 Login - + 用户管理 User Management - + 系统设置 - System settings + System Setting - - + + 相机配置 - Camera configuration + Cam Setting - + 定位标定 - + Model Standard - - + + 图像标定 - + Image Standard - - + + 注册产品 - + Register + + + + + 算法设置 + Algo Setting 加载必要模块..... Load the necessary modules..... - + 工具 Tool - + 系统时间 - System time + Time 班次信息 Classes information - 用户: - User: + User: - + 历史 History @@ -2310,9 +2401,9 @@ p, li { white-space: pre-wrap; } System initialization complete... - + 显示识别结果 - Display recognition results + Show Results 相机图像和背景图不一样,请更换检测背景! @@ -2327,137 +2418,175 @@ p, li { white-space: pre-wrap; } , Caused by not opening the detection function - + 获得图像,正在计算中... - Get the image, is calculating... + Detecting... - + 注 销 Logout - + 登 录 Login - - + + 该功能未启用. The feature is not enabled. - - - - - + + + + + + + + + 确认 - Ok + OK - + 你确定要注销 - Are you sure you want to log out + Are you sure you logout 班次管理 Classes management - + 调试工具 - DebugTool + Debug Tool - + 系统参数设置 - System parameter setting + System Setting - + 停止检测 - Stop detecting + Stop - + 帮助 - + Help - - + + 本系统未注册激活 - + The System don't Active + + + + 用户: + User: + + + + Corectrl模块加载失败,请检查! + Corectrl model load failed,please Check Error! + + + + camera.json文件出错,请检查! + camera.json is Failed,please Check Error! + + + + lpbengine模块加载失败,请检查! + lpbengine model load failed,please Check Error! + + + + lpdesigner模块加载失败,请检查! + lpdesigner model load failed,please Check Error! - - + + 请停止检测再使用该功能. - + Please Stop Detect,and then Use this. - + 注册 - + Register - + + 算法参数 + Algo Setting + + + 按下了开始检测按钮,检测功能开启 Press the start detection button, the detection function is turned on - + 按下了停止检测按钮,检测功能关闭 Press the stop detection button, the detection function is closed - + 轮毂型号识别定位一体系统 - + Hub model identification and positioning system - - + + 后台运行 - + Run Background - + 退出 - + Exit - + 显示界面 - - - - - - - - - + Show Widget + + + + + + + + + + + + 提示 - Prompt + Info - + 将清空所有数据 All data will be cleared - + 确定 - Ok + OK - - + + 取消 Cancel @@ -2470,27 +2599,27 @@ p, li { white-space: pre-wrap; } After adjusting the exposure time for 5 times, the wheel hub is still not recognized! - + 按下了清零按钮,数据全部清零 Press the reset button, all data are cleared - + d - + h - + m - + s @@ -2499,16 +2628,16 @@ p, li { white-space: pre-wrap; } System time: - + 运行时长: - Running time: + Run: 检测状态: Status: - + 检测中... Detecting... @@ -2529,21 +2658,15 @@ p, li { white-space: pre-wrap; } Current user: - - 运行时长: - 模板库发送完成 - Template library sending completed - - - + 已停止检测... - + Stopping... - - + + 正在检测型号数 - Number of models + Models 已连接 @@ -2554,17 +2677,17 @@ p, li { white-space: pre-wrap; } Disconnected - + PLC已收到相关设置参数! The PLC has received the relevant setting parameters! - + 已打开 Opened - + 已关闭 Closed @@ -2573,37 +2696,37 @@ p, li { white-space: pre-wrap; } Wheel Type Identification System - + 本软件由杭州利珀科技开发,用于轮毂型号识别和分类,可搭配流水线运输系统使用 This software is developed by Leaper in Hangzhou. It is used for hub type identification and classification. It can be used with pipeline transportation system - + 若需要进一步了解该产品的相关信息,请访问我们的网站 For more information about this product, please visit our website - + 软件版本 Software Version - + 算法版本 - Algorithm version + Algorithm Version - + 最后更新时间 Last update time - + 版权 (c) 属 杭州利珀科技有限公司 所有 - Copyright(C) belongs to Hangzhou Lipper Technology Co., Ltd. + Copyright(C) belongs to Hangzhou Lipper Technology Company - + 关闭 Shut down @@ -2621,142 +2744,117 @@ p, li { white-space: pre-wrap; } lpSystemConfigUI - + - + 系统语言设置: - + Change Language: - + 语言 - Language + Language - + 图像保存相关: - + Image Save Params: - + 是否保存识别NG抠图 - + Save NG Cut Image - + 是否保存识别OK抠图 - + Save OK Cut Image - + 是否保存识别NG原始图 - + Save NG Src Image - + 是否保存识别OK原始图 - + Save OK Src Image - + 是否保存定位NG原始图 - + Save NG Position Image - + 是否保存定位OK原始图 - + Save OK Position Image - + 图像存储路径: - + Image Save Path: - + 设置 - Setting + Set - + 通讯配置: - + Connection: - + TCP服务端口: - + TcpServer Port: - - webSocket端口: - - - - + 其他: - + Others: - + 本系统标题: - + Title: - + 启动时默认后台运行 - + Auto Run Background - + 关闭主窗口时在后台运行 - - - - - 算法参数: - + Run Background when Close - - 过滤小于 - - - - - 的圆(单位:像素) - - - - - 是否使用图像增强 - - - - + 系统参数已保存且生效!!! - + Apply Successful!! - + 应用 - Use + Apply - + 退出 - + Close Chinese - + English - + diff --git a/tpvs17/tpMain/lpmain_zh.ts b/tpvs17/tpMain/lpmain_zh.ts index b2fe83d..cb76d39 100644 --- a/tpvs17/tpMain/lpmain_zh.ts +++ b/tpvs17/tpMain/lpmain_zh.ts @@ -83,6 +83,104 @@ + + QAlgParamDlg + + + 算法参数设置 + + + + + 圆半径大小过滤: + + + + + 检测背景图更换: + + + + + 查看检测背景 + + + + + 二级圆定位: + + + + + 边缘宽度: + + + + + 从深到浅 + + + + + 从浅到深 + + + + + 边缘对比度: + + + + + 边缘转换: + + + + + 是否使用图像增强 + + + + + 是否使用背景图找圆算法 + + + + + 参数已生效!!! + + + + + 应用 + + + + + 退出 + + + + + 请选择您的背景图 + + + + + 提示 + + + + + 背景图更新完成,请重启本软件. + + + + + 确认 + + + QCamSettingDlg @@ -415,7 +513,7 @@ p, li { white-space: pre-wrap; } - + 缩略图 @@ -440,58 +538,58 @@ p, li { white-space: pre-wrap; } - + 基本操作 - - + + 删除模板 - + 训练当前模板 - + 训练模板 - + 添加新的模板 - + 新建模板 - + 训练所有模板,消耗时间会较长 - + 训练全部 - + 确认修改,每次修改模板的参数后都要确认修改才有效 - + 修改确认 - + 修改型号名 @@ -843,14 +941,6 @@ p, li { white-space: pre-wrap; } - - QSettingDlg - - - QSettingDlg - - - QShowImg @@ -874,7 +964,7 @@ p, li { white-space: pre-wrap; } - + 没有用于检测的背景图,请更换检测背景 @@ -1200,6 +1290,8 @@ p, li { white-space: pre-wrap; } + + 解锁 @@ -1224,20 +1316,18 @@ p, li { white-space: pre-wrap; } - - - - ���� + + Image Files (*.png *.jpg *.bmp) - ѡ���궨ͼ + 选择标定图 - - Image Files (*.png *.jpg *.bmp) + + 上锁 @@ -1258,14 +1348,9 @@ p, li { white-space: pre-wrap; } 状态信息 - - - 识别定位检测 - - - + 开始检测 @@ -1279,18 +1364,12 @@ p, li { white-space: pre-wrap; } 匹配值 - - - 匹配值 - 通道 - - - + 0 @@ -1306,32 +1385,32 @@ p, li { white-space: pre-wrap; } - + 统计结果 - + modelID_detect - + count - + 型号数量 - + 模板管理 - + 数据查询 @@ -1366,345 +1445,378 @@ p, li { white-space: pre-wrap; } - + 识别耗时 - + 分数 - + 型号管理 - + 检测勾选 - + 辅助工具 - + 班次设置 - + 光栅标定 - + IP设置 - - + + 关于 - + 登录 - + 用户管理 - + 系统设置 - - + + 相机配置 - + 定位标定 - - + + 图像标定 - - + + 注册产品 - + + + 算法设置 + + + + 工具 - + 帮助 - - + + 本系统未注册激活 - + 系统时间 - - 用户: - - - - + 历史 - + 停止检测 - + 显示识别结果 - + 获得图像,正在计算中... - + 注 销 - + 登 录 - - - - - - + + + + + + + + + + 提示 - - + + 该功能未启用. - - - - - + + + + + + + + + 确认 - + + 用户: + + + + + Corectrl模块加载失败,请检查! + + + + + camera.json文件出错,请检查! + + + + + lpbengine模块加载失败,请检查! + + + + + lpdesigner模块加载失败,请检查! + + + + 你确定要注销 - - + + 取消 - + 调试工具 - - + + 请停止检测再使用该功能. - + 系统参数设置 - + 注册 - + + 算法参数 + + + + 按下了开始检测按钮,检测功能开启 - + 按下了停止检测按钮,检测功能关闭 - + 将清空所有数据 - + 确定 - + 按下了清零按钮,数据全部清零 - + - + - + - + - + 轮毂型号识别定位一体系统 - - + + 后台运行 - + 退出 - + 显示界面 - + 运行时长: - + 检测中... - - 运行时长: - 模板库发送完成 - - - - + 已停止检测... - - + + 正在检测型号数 - + PLC已收到相关设置参数! - + 已打开 - + 已关闭 - + 本软件由杭州利珀科技开发,用于轮毂型号识别和分类,可搭配流水线运输系统使用 - + 若需要进一步了解该产品的相关信息,请访问我们的网站 - + 软件版本 - + 算法版本 - + 最后更新时间 - + 版权 (c) 属 杭州利珀科技有限公司 所有 - + 关闭 @@ -1717,127 +1829,102 @@ p, li { white-space: pre-wrap; } - + 系统语言设置: - + 语言 - + 图像保存相关: - + 是否保存识别NG抠图 - + 是否保存识别OK抠图 - + 是否保存识别NG原始图 - + 是否保存识别OK原始图 - + 是否保存定位NG原始图 - + 是否保存定位OK原始图 - + 图像存储路径: - + 设置 - + 通讯配置: - + TCP服务端口: - - webSocket端口: - - - - + 其他: - + 本系统标题: - + 启动时默认后台运行 - + 关闭主窗口时在后台运行 - - 算法参数: - - - - - 过滤小于 - - - - - 的圆(单位:像素) - - - - - 是否使用图像增强 - - - - + 系统参数已保存且生效!!! - + 应用 - + 退出 diff --git a/tpvs17/valueMainUI/config.ini b/tpvs17/valueMainUI/config.ini index 72cc841..9a24c15 100644 --- a/tpvs17/valueMainUI/config.ini +++ b/tpvs17/valueMainUI/config.ini @@ -6,3 +6,4 @@ appPathB=E:/wheelValve/Release/runner17_B/Enchanter_B.exe doubleStation=true portA=10110 portB=10111 +serverPort=1000 diff --git a/tpvs17/valueMainUI/lpConfigUI.cpp b/tpvs17/valueMainUI/lpConfigUI.cpp index 24096e9..43a0404 100644 --- a/tpvs17/valueMainUI/lpConfigUI.cpp +++ b/tpvs17/valueMainUI/lpConfigUI.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #pragma execution_character_set("utf-8") /*ϵͳҳ*/ @@ -22,6 +23,10 @@ lpConfigUI::lpConfigUI(QWidget *parent) onInitCheckBox(); connect(ui.checkBox_AutoRun, SIGNAL(stateChanged(int)), this, SLOT(onCheckBoxChanged(int))); connect(ui.checkBox_DesktopShort, SIGNAL(stateChanged(int)), this, SLOT(onCheckBoxChanged(int))); + + ui.comboBox->clear(); + ui.comboBox->addItem(tr("Chinese"), "Chinese"); + ui.comboBox->addItem(tr("English"), "English"); } lpConfigUI::~lpConfigUI() @@ -52,6 +57,11 @@ Q_SLOT void lpConfigUI::onButtonClicked() lpConfig::instance()->saveConfig(); ui.label_5->setVisible(true); m_timerID = startTimer(1000); + + QString strLanguage = ui.comboBox->currentText(); + QSettings languageSetting("hubdetect.ini", QSettings::IniFormat); + languageSetting.setValue("language", strLanguage); + emit sgLanguageChange(strLanguage); emit sgUpdateConfig(); } else if ("pushButton_4" == strObj) @@ -68,6 +78,10 @@ void lpConfigUI::showEvent(QShowEvent *event) ui.lineEdit_BPort->setText(QString("%1").arg(lpConfig::instance()->portB)); ui.checkBox_doubleStation->setChecked(lpConfig::instance()->doubleStation); ui.lineEdit_serverPort->setText(QString("%1").arg(lpConfig::instance()->plcServerPort)); + + QSettings languageSetting("hubdetect.ini", QSettings::IniFormat); + QString strLanguage = languageSetting.value("language", "Chinese").toString(); + ui.comboBox->setCurrentText(strLanguage); } void lpConfigUI::timerEvent(QTimerEvent *event) diff --git a/tpvs17/valueMainUI/lpConfigUI.h b/tpvs17/valueMainUI/lpConfigUI.h index 06ecf54..b66e691 100644 --- a/tpvs17/valueMainUI/lpConfigUI.h +++ b/tpvs17/valueMainUI/lpConfigUI.h @@ -18,6 +18,7 @@ private: Q_SLOT void onCheckBoxChanged(int state); signals: void sgUpdateConfig(); + void sgLanguageChange(QString); protected: Q_SLOT void onButtonClicked(); diff --git a/tpvs17/valueMainUI/valueMainUI.cpp b/tpvs17/valueMainUI/valueMainUI.cpp index d6e2ecc..4141400 100644 --- a/tpvs17/valueMainUI/valueMainUI.cpp +++ b/tpvs17/valueMainUI/valueMainUI.cpp @@ -20,6 +20,13 @@ valueMainUI::valueMainUI(QWidget *parent) : QMainWindow(parent) { ui.setupUi(this); + + {//加载语言设置 + QSettings languageSetting("hubdetect.ini", QSettings::IniFormat); + QString strLanguage = languageSetting.value("language", "Chinese").toString(); + SetLanguage(strLanguage); + } + setupTrayIcon();//后台任务栏初始化 setWindowIcon(QIcon(WINDOWICON)); setWindowTitle(tr("识别定位一体检测系统")); @@ -106,6 +113,7 @@ valueMainUI::valueMainUI(QWidget *parent) //子页面初始化 m_pConfigUI = new lpConfigUI();//系统配置 connect(m_pConfigUI, SIGNAL(sgUpdateConfig()), this, SLOT(onUpdateConfig())); + connect(m_pConfigUI, SIGNAL(sgLanguageChange(QString)), this, SLOT(onLanguageChange(QString))); m_pDebugUI = new lpDebugUI();//调试测试 connect(m_pDebugUI, SIGNAL(sgButtonClicked(int)), this, SLOT(onDebugClicked(int))); m_pTcpDebugUI = new QTCPDebugUI();//通讯测试页面 @@ -119,11 +127,7 @@ valueMainUI::valueMainUI(QWidget *parent) connect(m_pPlcDevice, SIGNAL(sgSendDataCallBack(QByteArray)), this, SLOT(onShowSendTcpData(QByteArray))); connect(m_pPlcDevice, SIGNAL(sgRecvDataCallBack(QByteArray)), this, SLOT(onShowRecvTcpData(QByteArray))); } - {//加载语言设置 - QSettings languageSetting("hubdetect.ini", QSettings::IniFormat); - QString strLanguage = languageSetting.value("language", "Chinese").toString(); - SetLanguage(strLanguage); - } + { m_SysTimerID = startTimer(1000);//系统定时刷新定时器 m_timerStartID = startTimer(1000);//启动从机客户端 diff --git a/tpvs17/valueMainUI/valuemainui_en.ts b/tpvs17/valueMainUI/valuemainui_en.ts index a94963c..de29e53 100644 --- a/tpvs17/valueMainUI/valuemainui_en.ts +++ b/tpvs17/valueMainUI/valuemainui_en.ts @@ -8,34 +8,34 @@ 警告 - + Warning A侧检测程序未连接,请检查配置或通讯 - + A application don't connectd,please check connection 关闭 - + Exit B侧检测程序未连接,请检查配置或通讯 - + B application don't connectd,please check connection 本检测系统正在运行,您真的要关闭? - + Are you sure exitd the system? 后台运行 - + Run Background @@ -43,17 +43,17 @@ QTCPDebugUI - + TCP Debug 显示接收数据 - + Show Recv Data 显示发送数据 - + Show Send Data @@ -62,17 +62,17 @@ line item is not created - + line item is already created - + rect item is already created - + @@ -80,103 +80,103 @@ lpConfigUI - + 工位配置: - + Station: A侧检测程序端口: - + A TcpServer Port: A侧检测所在路径: - + A application's path: 设置 - + Set B侧检测程序端口: - + B TcpServer Port: B侧检测所在路径: - + B application's path: 使用双工位 - + Use two Stations 参数已保存!!! - + Apply Successful!!! 应用 - + Apply 退出 - + Close 机台PLC通讯: - + PLC Device: TCP服务端口: - + Local TcpServer Port: 1000 - + 系统相关: - + System: 开机自启动 - + Auto Startup 添加到桌面快捷方式 - + Add Desktop Shortcut 语言: - + Language: 中文 - + Chinese English - + English @@ -184,27 +184,27 @@ lpDebugUI - + A侧触发一次 - + A Triger Once B侧触发一次 - + B Triger Once A侧定时触发 - + A Triger More B侧定时触发 - + B Triger More @@ -212,181 +212,181 @@ 识别定位一体检测系统 - + Identification System A侧连接状态 - + A Connect State B侧连接状态 - + B Connect State PLC连接状态 - + PLC Connect state 时间 - + Time 工具 - + Tool 天 - + D 时 - + H 分 - + M 秒 - + S 型号 %1,定位角度 %2 ° - + Model %1,Angle %2 ° 型号 %1,定位异常 - + Model %1,Positon Error 型号 %1,定位模板未标定 - + Model %1,No Standard 型号 %1,没有相关定位模板 - + 型号 %1,定位模板未标定 型号识别失败 - + Model Error 型号 %1,定位角度 %2° - + Model %1,Angle %2 ° 调试页面 - + Debug Page 系统参数配置页面 - + System Setting 通讯调试页面 - + Tcp Test Page 连接超时,尝试重新连接检测软件 - + Connect TimeOut,try to reconnect A侧设备已连接(检测中) - + A Connected(Detecting) A侧设备已连接(暂停中) - + A Connected(Stop) A侧设备未连接 - + A Disconnect B侧设备已连接(检测中) - + B Connected(Detecting) B侧设备已连接(暂停中) - + B Connected(Stop) B侧设备未连接 - + B Disconnect PLC客户端 %1 - + PLC %1 PLC客户端未连接 - + PLC Disconnect 运行时长: - + Run: 检测系统已离线!!! - + Detection System is off line! 检测系统已在线... - + Detection System is on line... 后台运行 - + Run Background 退出 - + Exit 显示界面 - + Show Widget @@ -394,56 +394,56 @@ valueMainUI - + B侧检测工位 - + B Station 检测结果 - + Result A侧检测工位 - + A Station toolBar - + A侧设置 - + A Setting B侧设置 - + B Setting 系统设置 - + System Setting 调试 - + Debug Tool 通讯调试 - + TCP Test