diff --git a/runner17/RasterSDG20d.dll b/runner17/RasterSDG20d.dll index af94ae7..1ed2637 100644 Binary files a/runner17/RasterSDG20d.dll and b/runner17/RasterSDG20d.dll differ diff --git a/runner17/language/English/lpmain_en.qm b/runner17/language/English/lpmain_en.qm index eaad2f5..a1f211e 100644 Binary files a/runner17/language/English/lpmain_en.qm and b/runner17/language/English/lpmain_en.qm differ diff --git a/runner17/language/English/quserinfo_en.qm b/runner17/language/English/quserinfo_en.qm new file mode 100644 index 0000000..1c46369 Binary files /dev/null and b/runner17/language/English/quserinfo_en.qm differ diff --git a/runner17/language/English/rastersdg20_en.qm b/runner17/language/English/rastersdg20_en.qm new file mode 100644 index 0000000..9dad8df Binary files /dev/null and b/runner17/language/English/rastersdg20_en.qm differ diff --git a/runner17/language/English/reportmodel_en.qm b/runner17/language/English/reportmodel_en.qm new file mode 100644 index 0000000..453795b Binary files /dev/null and b/runner17/language/English/reportmodel_en.qm differ diff --git a/runner17/language/English/tpmain_en.qm b/runner17/language/English/tpmain_en.qm new file mode 100644 index 0000000..7536230 Binary files /dev/null and b/runner17/language/English/tpmain_en.qm differ diff --git a/runner17/lpMaind.dll b/runner17/lpMaind.dll index 33a9e47..0511e06 100644 Binary files a/runner17/lpMaind.dll and b/runner17/lpMaind.dll differ diff --git a/runner17/tpAlgorithmd.dll b/runner17/tpAlgorithmd.dll index f62f99d..84b9b74 100644 Binary files a/runner17/tpAlgorithmd.dll and b/runner17/tpAlgorithmd.dll differ diff --git a/src/algorithm/AlgorithmFluorescence.cpp b/src/algorithm/AlgorithmFluorescence.cpp index f392d43..f78a31f 100644 --- a/src/algorithm/AlgorithmFluorescence.cpp +++ b/src/algorithm/AlgorithmFluorescence.cpp @@ -160,14 +160,44 @@ QString CAlgorithmFluorescence::bestMatch(const QMap* mod { if (innerCircleNumSum > 1) { - bestName = hubName2; + QStringList modelList = pLocal->defectList; + QString modelName = modelList.takeFirst(); + bool bFind = false; + while (modelList.size()) + { + if (modelName == hubName1) + { + bestName = hubName2; + bFind = true; + break; + } + } + if (!bFind) + { + bestName = QString(); + } } } else if (bestName.toUpper() == hubName2) { if (innerCircleNumSum < 2) { - bestName = hubName1; + QStringList modelList = pLocal->defectList; + bool bFind = false; + while (modelList.size()) + { + QString modelName = modelList.takeFirst(); + if (modelName == hubName1) + { + bestName = hubName1; + bFind = true; + break; + } + } + if (!bFind) + { + bestName = QString(); + } } } @@ -262,7 +292,7 @@ int CAlgorithmFluorescence::IImageAnalysis(class IImageObject* pImgObj, TP_ALGOR bReload = false; } //imageSegementation(matSrc); - matMatch = ImageProcess::findCircleObject(matSrc, matBack, nthreshold/*15*/, &lCircle/* NULL*/); + matMatch = ImageProcess::findCircleObject(matSrc, matBack, bUseBackground, nthreshold/*15*/, &lCircle/* NULL*/); } else{ matMatch = matSrc; diff --git a/src/algorithm/ImageProcess.cpp b/src/algorithm/ImageProcess.cpp index 8f74151..62d66ff 100644 --- a/src/algorithm/ImageProcess.cpp +++ b/src/algorithm/ImageProcess.cpp @@ -41,193 +41,190 @@ Mat findEdge2(const Mat &Src) return ret; } #define REAIZE 1 -cv::Mat ImageProcess::findCircleObject(const Mat &src, const Mat& backgroundImg, int nThres /*= 20*/, luffy_base::luffyCircle *pCircle /*= NULL*/) +cv::Mat ImageProcess::findCircleObject(const Mat &src, const Mat& backgroundImg, bool useBackgroundFlag, int nThres /*= 20*/, luffy_base::luffyCircle *pCircle /*= NULL*/) { #ifdef MOTO_DETECT//摩轮型号识别抠图算法 - - if (src.empty() || backgroundImg.empty() || src.rows < 500) { - return Mat(); - } - //_EnhanImg_sharpen(); - assert(backgroundImg.type() == CV_8UC1); - Mat detectImg; - cv::resize(src, detectImg, cv::Size(src.cols / REAIZE, src.rows / REAIZE)); - int bBaseX = detectImg.cols; - int bBaseY = detectImg.rows; - //if (nThres<=1) - equalizeHist(detectImg, detectImg); - detectImg = _EnhanImg_sharpen(detectImg); - - EDCircles edcircles(detectImg); - vector EDCircle = edcircles.getCircles(); - double maxR = 0; - int nIndex = -1; - for (int i = 0; i < EDCircle.size(); i++) + if (!useBackgroundFlag) { - int startX = EDCircle[i].center.x - EDCircle[i].r; - int startY = EDCircle[i].center.y - EDCircle[i].r; - if (startX < 0 || startY <0) - continue; - if (EDCircle[i].center.x + EDCircle[i].r>bBaseX || EDCircle[i].center.y + EDCircle[i].r>bBaseY) - continue; - if (EDCircle[i].r > maxR) + Mat detectImg; + cv::resize(src, detectImg, cv::Size(src.cols / REAIZE, src.rows / REAIZE)); + int bBaseX = detectImg.cols; + int bBaseY = detectImg.rows; + //if (nThres<=1) + equalizeHist(detectImg, detectImg); + detectImg = _EnhanImg_sharpen(detectImg); + + EDCircles edcircles(detectImg); + vector EDCircle = edcircles.getCircles(); + double maxR = 0; + int nIndex = -1; + for (int i = 0; i < EDCircle.size(); i++) { - maxR = EDCircle[i].r; - nIndex = i; + int startX = EDCircle[i].center.x - EDCircle[i].r; + int startY = EDCircle[i].center.y - EDCircle[i].r; + if (startX < 0 || startY < 0) + continue; + if (EDCircle[i].center.x + EDCircle[i].r > bBaseX || EDCircle[i].center.y + EDCircle[i].r > bBaseY) + continue; + if (EDCircle[i].r > maxR) + { + maxR = EDCircle[i].r; + nIndex = i; + } } - } - if (nIndex != -1) - { - int startX = EDCircle[nIndex].center.x * REAIZE - EDCircle[nIndex].r * REAIZE; - int startY = EDCircle[nIndex].center.y * REAIZE - EDCircle[nIndex].r* REAIZE; - double radius = EDCircle[nIndex].r; - int hight = 2 * radius * REAIZE; - - if (startX > 0 && startY > 0 && hight > 0 \ - && startX < src.cols &&startY < src.rows \ - &&hight < src.cols&&hight < src.rows \ - && startX+hight 0 && startY > 0 && hight > 0 \ + && startX < src.cols &&startY < src.rows \ + &&hight < src.cols&&hight < src.rows \ + && startX + hight < src.cols && startY + hight < src.rows) { - //Mat dst; - //double rate = src.cols*1.0 / ALG_RESIZE_IMAGE_WIDTH; - //const cv::Size cSize = cv::Size(cutMat.cols*1.0 / rate, cutMat.rows*1.0 / rate); - //cv::resize(cutMat, dst, cSize); - if (hight < 50) - return Mat(); - cv::Point2d center; - center.x = EDCircle[nIndex].center.x * REAIZE; - center.y = EDCircle[nIndex].center.y * REAIZE; - pCircle->ptCenter = center; - - //float fScale = src.cols / ALG_RESIZE_IMAGE_WIDTH; - //pCircle->fRadius = hight*1.0 / fScale; - pCircle->fRadius = radius * REAIZE; - return cutMat; + Mat cutMat = src(Rect(startX, startY, hight, hight)); + if (cutMat.data != NULL) + { + //Mat dst; + //double rate = src.cols*1.0 / ALG_RESIZE_IMAGE_WIDTH; + //const cv::Size cSize = cv::Size(cutMat.cols*1.0 / rate, cutMat.rows*1.0 / rate); + //cv::resize(cutMat, dst, cSize); + if (hight < 50) + return Mat(); + cv::Point2d center; + center.x = EDCircle[nIndex].center.x * REAIZE; + center.y = EDCircle[nIndex].center.y * REAIZE; + pCircle->ptCenter = center; + + //float fScale = src.cols / ALG_RESIZE_IMAGE_WIDTH; + //pCircle->fRadius = hight*1.0 / fScale; + pCircle->fRadius = radius * REAIZE; + return cutMat; + } } } - } - return Mat(); - - - - - if (src.empty() || backgroundImg.empty() || src.rows < 500) { return Mat(); } + else + { + if (src.empty() || backgroundImg.empty() || src.rows < 500) { + return Mat(); + } - assert(backgroundImg.type() == CV_8UC1); + assert(backgroundImg.type() == CV_8UC1); - Mat imgTmp, imgBinary; - const cv::Size cSize = cv::Size(ALG_RESIZE_IMAGE_WIDTH, floorf(ALG_RESIZE_IMAGE_WIDTH / (float)src.cols*(float)src.rows)); - cv::resize(src, imgTmp, cSize); - Mat foregroundImg = getForeImage(imgTmp, backgroundImg);// 0421 + Mat imgTmp, imgBinary; + const cv::Size cSize = cv::Size(ALG_RESIZE_IMAGE_WIDTH, floorf(ALG_RESIZE_IMAGE_WIDTH / (float)src.cols*(float)src.rows)); + cv::resize(src, imgTmp, cSize); + Mat foregroundImg = getForeImage(imgTmp, backgroundImg);// 0421 - using namespace luffy_base; - luffy_threshold::Threshold(foregroundImg, imgBinary, nThres);//0421 + using namespace luffy_base; + luffy_threshold::Threshold(foregroundImg, imgBinary, nThres);//0421 - Mat dilatedImgBin; - dilate(imgBinary, dilatedImgBin, Mat::ones(21,21, CV_32FC1)); - erode(dilatedImgBin, imgBinary, Mat::ones(21, 21, CV_32FC1)); - openOper(imgBinary, Mat::ones(1, 11, CV_32FC1)); + Mat dilatedImgBin; + dilate(imgBinary, dilatedImgBin, Mat::ones(21, 21, CV_32FC1)); + erode(dilatedImgBin, imgBinary, Mat::ones(21, 21, CV_32FC1)); + openOper(imgBinary, Mat::ones(1, 11, CV_32FC1)); - vector> conts; - cv::findContours(imgBinary, conts, RETR_EXTERNAL, CHAIN_APPROX_NONE); - imgBinary.setTo(0); + vector> conts; + cv::findContours(imgBinary, conts, RETR_EXTERNAL, CHAIN_APPROX_NONE); + imgBinary.setTo(0); - for (int i = 0; i < conts.size(); i++) { - const vector &pt = conts.at(i); - if (pt.size() < 20) { - continue; - } - Rect rt = boundingRect(pt); - if (rt.width < 5 || rt.height < 5) { - continue; + for (int i = 0; i < conts.size(); i++) { + const vector &pt = conts.at(i); + if (pt.size() < 20) { + continue; + } + Rect rt = boundingRect(pt); + if (rt.width < 5 || rt.height < 5) { + continue; + } + drawContours(imgBinary, conts, i, Scalar::all(255), -1); } - drawContours(imgBinary, conts, i, Scalar::all(255), -1); - } - Mat hit; vector pts; - luffy_hit::firstHit4Circle(imgBinary, hit, pts, Point(cSize.width / 2, cSize.height / 2), 0, cSize.width / 2, 360, luffy_hit::emHitOut2In); + Mat hit; vector pts; + luffy_hit::firstHit4Circle(imgBinary, hit, pts, Point(cSize.width / 2, cSize.height / 2), 0, cSize.width / 2, 360, luffy_hit::emHitOut2In); - int nMinFitNum = 100; - luffy_imageProc::RansacParam rs(0.01, 3, 150, nMinFitNum, 240); - vector pts2 = luffy_imageProc::fitModelbyRansac(pts, luffy_imageProc::emModelCircle, &rs); + int nMinFitNum = 100; + luffy_imageProc::RansacParam rs(0.01, 3, 150, nMinFitNum, 240); + vector pts2 = luffy_imageProc::fitModelbyRansac(pts, luffy_imageProc::emModelCircle, &rs); - float fRadius; - Point2f ptCenter; - bool bFind = luffy_imageProc::lsCircleFit(pts2, fRadius, ptCenter); + float fRadius; + Point2f ptCenter; + bool bFind = luffy_imageProc::lsCircleFit(pts2, fRadius, ptCenter); - if (!bFind) { - return Mat(); - } - Mat dst; - const int nOffset = 1; - fRadius += nOffset; - Rect rt(ptCenter.x - fRadius + nOffset, ptCenter.y - fRadius + nOffset, 2 * fRadius, 2 * fRadius); - rt &= Rect(0, 0, imgTmp.cols, imgTmp.rows); - imgTmp(rt).copyTo(dst); - static int nCount = cv::getTickCount(); - if (pCircle) { - /*float fScale = src.cols / ALG_RESIZE_IMAGE_WIDTH; - Mat matBig = src - backgroundImg; - pCircle->fRadius = fRadius * fScale; - pCircle->ptCenter = Point(ptCenter.x * fScale, ptCenter.y * fScale); - Rect rt(pCircle->ptCenter.x - pCircle->fRadius + nOffset, pCircle->ptCenter.y - pCircle->fRadius + nOffset, 2 * pCircle->fRadius, 2 * pCircle->fRadius); - rt &= Rect(0, 0, matBig.cols, matBig.rows); - src(rt).copyTo(dst);*/ - float fScale = src.cols / ALG_RESIZE_IMAGE_WIDTH; - Mat matBig = src - backgroundImg; - pCircle->fRadius = fRadius * fScale; - pCircle->ptCenter = Point(ptCenter.x * fScale, ptCenter.y * fScale); - - Mat matBinary; - luffy_threshold::Threshold(matBig, matBinary, nThres); - // add - openOper(matBinary, Mat::ones(3, 3, CV_32FC1)); - Mat hit; vector pts; - luffy_hit::firstHit4Circle(matBinary, hit, pts, pCircle->ptCenter, 0, pCircle->fRadius + 20, 360, luffy_hit::emHitOut2In);//luffy_hit::emHitOut2In - std::map mp; - std::for_each(pts.begin(), pts.end(), [&]( Point p){ - double dis = fabs(luffy_math::disofPoints(pCircle->ptCenter, p)); - mp[dis] = p; - }); - - const int bound = 200; - //int startIndex = mp.size() - bound; - std::map::iterator it = mp.begin(); - //std::advance(it, startIndex); - std::vector ppts; - int i = 0; - for (it; it != mp.end(); ++it, ++i) - { - if (i == bound) break; - ppts.push_back(it->second); + if (!bFind) { + return Mat(); } - luffy_imageProc::RansacParam rs(0.01, 5.0, 300, 70, 120); - vector pts2 = luffy_imageProc::fitModelbyRansac(ppts, luffy_imageProc::emModelCircle, &rs); - float fRadius2; - Point2f ptCenter2; - bool bFind = luffy_imageProc::lsCircleFit(pts2, fRadius2, ptCenter2); - if (bFind) { - pCircle->fRadius = fRadius2; - pCircle->ptCenter = ptCenter2; - Rect rt(ptCenter2.x - fRadius2 + nOffset, ptCenter2.y - fRadius2 + nOffset, 2 * fRadius2, 2 * fRadius2); - - if (rt.x < 0 || rt.y < 0 || rt.x + rt.width > matBinary.cols || rt.y + rt.height > matBinary.rows ) { + Mat dst; + const int nOffset = 1; + fRadius += nOffset; + Rect rt(ptCenter.x - fRadius + nOffset, ptCenter.y - fRadius + nOffset, 2 * fRadius, 2 * fRadius); + rt &= Rect(0, 0, imgTmp.cols, imgTmp.rows); + imgTmp(rt).copyTo(dst); + static int nCount = cv::getTickCount(); + if (pCircle) { + /*float fScale = src.cols / ALG_RESIZE_IMAGE_WIDTH; + Mat matBig = src - backgroundImg; + pCircle->fRadius = fRadius * fScale; + pCircle->ptCenter = Point(ptCenter.x * fScale, ptCenter.y * fScale); + Rect rt(pCircle->ptCenter.x - pCircle->fRadius + nOffset, pCircle->ptCenter.y - pCircle->fRadius + nOffset, 2 * pCircle->fRadius, 2 * pCircle->fRadius); + rt &= Rect(0, 0, matBig.cols, matBig.rows); + src(rt).copyTo(dst);*/ + float fScale = src.cols / ALG_RESIZE_IMAGE_WIDTH; + Mat matBig = src - backgroundImg; + pCircle->fRadius = fRadius * fScale; + pCircle->ptCenter = Point(ptCenter.x * fScale, ptCenter.y * fScale); + + Mat matBinary; + luffy_threshold::Threshold(matBig, matBinary, nThres); + // add + openOper(matBinary, Mat::ones(3, 3, CV_32FC1)); + Mat hit; vector pts; + luffy_hit::firstHit4Circle(matBinary, hit, pts, pCircle->ptCenter, 0, pCircle->fRadius + 20, 360, luffy_hit::emHitOut2In);//luffy_hit::emHitOut2In + std::map mp; + std::for_each(pts.begin(), pts.end(), [&](Point p) { + double dis = fabs(luffy_math::disofPoints(pCircle->ptCenter, p)); + mp[dis] = p; + }); + + const int bound = 200; + //int startIndex = mp.size() - bound; + std::map::iterator it = mp.begin(); + //std::advance(it, startIndex); + std::vector ppts; + int i = 0; + for (it; it != mp.end(); ++it, ++i) + { + if (i == bound) break; + ppts.push_back(it->second); + } + luffy_imageProc::RansacParam rs(0.01, 5.0, 300, 70, 120); + vector pts2 = luffy_imageProc::fitModelbyRansac(ppts, luffy_imageProc::emModelCircle, &rs); + float fRadius2; + Point2f ptCenter2; + bool bFind = luffy_imageProc::lsCircleFit(pts2, fRadius2, ptCenter2); + if (bFind) { + pCircle->fRadius = fRadius2; + pCircle->ptCenter = ptCenter2; + Rect rt(ptCenter2.x - fRadius2 + nOffset, ptCenter2.y - fRadius2 + nOffset, 2 * fRadius2, 2 * fRadius2); + + if (rt.x < 0 || rt.y < 0 || rt.x + rt.width > matBinary.cols || rt.y + rt.height > matBinary.rows) { + return Mat(); + } + rt &= Rect(0, 0, matBinary.cols, matBinary.rows); + src(rt).copyTo(dst); + } + else + { return Mat(); } - rt &= Rect(0, 0, matBinary.cols, matBinary.rows); - src(rt).copyTo(dst); - } - else - { - return Mat(); } + return dst; } - return dst; + #else//汽轮型号识别抠图算法 /* diff --git a/src/algorithm/ImageProcess.h b/src/algorithm/ImageProcess.h index a607165..ecc3fbe 100644 --- a/src/algorithm/ImageProcess.h +++ b/src/algorithm/ImageProcess.h @@ -21,7 +21,7 @@ public: ImageProcess(); ~ImageProcess(); - static cv::Mat findCircleObject(const Mat &src, const Mat& backgroundImg, int nThres = 20, luffy_base::luffyCircle *pCircle = NULL); + static cv::Mat findCircleObject(const Mat &src, const Mat& backgroundImg, bool useBackgroundFlag, int nThres = 20, luffy_base::luffyCircle *pCircle = NULL); static cv::Mat getForeImage(const Mat & src, const Mat &backgroundImg); }; diff --git a/tpvs17/tpMain/lpMainWin.cpp b/tpvs17/tpMain/lpMainWin.cpp index 3f512c9..eff155b 100644 --- a/tpvs17/tpMain/lpMainWin.cpp +++ b/tpvs17/tpMain/lpMainWin.cpp @@ -26,6 +26,11 @@ lpMainWin::lpMainWin(QWidget *parent) : QMainWindow(parent) { + {//加载语言设置 + QSettings languageSetting("hubdetect.ini", QSettings::IniFormat); + QString strLanguage = languageSetting.value("language", "Chinese").toString(); + SetLanguage(strLanguage); + } this->setWindowIcon(QIcon(":/image/leaper")); QMySplashScreen m_screen; m_screen.show(); @@ -82,11 +87,7 @@ lpMainWin::lpMainWin(QWidget *parent) ui.mainToolBar->addWidget(pbutton); ui.mainToolBar->addAction(ui.action_about); } - {//加载语言设置 - QSettings languageSetting("hubdetect.ini", QSettings::IniFormat); - QString strLanguage = languageSetting.value("language", "Chinese").toString(); - SetLanguage(strLanguage); - } + { m_pLbCurrentTime = new QLabel(tr("系统时间")); m_pLbBanci = new QLabel(tr("班次信息")); diff --git a/tpvs17/tpMain/lpmain_en.ts b/tpvs17/tpMain/lpmain_en.ts index 100d47f..c8d0026 100644 --- a/tpvs17/tpMain/lpmain_en.ts +++ b/tpvs17/tpMain/lpmain_en.ts @@ -59,8 +59,8 @@ 发送结果: - results: - results: + Results: + Results: @@ -89,8 +89,8 @@ 警告 - warning - warning + Warning + Warning @@ -129,14 +129,14 @@ 直径(mm) - Diameter: - Diameter: + Diameter(mm): + Diameter(mm): 厚度(mm) - Thickness: - Thickness: + Thickness(mm): + Thickness(mm): @@ -205,7 +205,7 @@ hh:mm - + hh:mm @@ -216,13 +216,13 @@ 当天 - + Same day 隔天 - + Text day @@ -230,123 +230,123 @@ 相机配置 - + Camera Config 序列号: - + Serial Number: 显示名称: - + Name: 相机类型: - + Camera Type: 虚拟相机 - + Virtual Camera 海康相机 - + HIK 堡盟相机 - + Baumer 路径: - + Path: 设置 - + Setting 图像高度: - + Image Height: Gray8 - + Gray8 RGB32 - + RGB32 图像宽度: - + Image Width: set - + set 图像格式: - + Image Format 增益: - + Gain: 曝光: - + Exposure: 内触发 - + Internal trigger 外触发 - + External trigger 软触发 - + Soft trigger 打开 - + Open 触发 - + Trigger 关闭 - + Close @@ -396,37 +396,37 @@ 退出 - + Cancel 编号 - + Num 通道名 - + Name 备注 - + About 发送结果 - + Result 是否为默认 - + Is dafault 默认 - + Default @@ -434,68 +434,68 @@ QChannelMgrDlg - + QChannelMgrDlg 所有型号及图像 - + All models and images 型号: - + Model: 通道: - + Channer: 查找: - + Find: 隐藏 - + Hide 修改 - + Modify 0 - + 0 通道分配: - + Channel assignment: 删除通道 - + Delete channel 增加通道 - + Add channel 刷新 - + Refresh 通道管理 - + Channel management @@ -503,7 +503,7 @@ QDebugDlg - + QDebugDlg @@ -512,50 +512,54 @@ p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'SimSun'; font-size:9pt; font-weight:400; font-style:normal;"> <p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">右侧是算法裁剪后的图像、匹配的型号、算法匹配的最小阈值、匹配模板对应的直径和厚度(新建模板时输入的)</p></body></html> - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'SimSun'; font-size:9pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">On the right is the image cropped by the algorithm, the matched model, the minimum threshold for algorithm matching, and the diameter and thickness of the matching template.(Input when creating a new template)</p></body></html> 000000 - + 000000 0.0 - + 0.0 厚度mm: - + Thickness(mm): 0 - + 0 直径mm: - + diameter(mm): 开始模拟检测 - + Start simulation test 采集一张 - + Collect one 停止 - + Stop @@ -563,47 +567,47 @@ p, li { white-space: pre-wrap; } 直径标定 - + Diameter Standard K:表示斜率,B:基准点,直径=高度*K+B - + K: rate, B: base point, Diameter = H * K + B 确认修改 - + OK 退出 - + Cancel B: - + B: K: - + K: 提示 - + Warning 修改完成,参数已生效! - + The modification is completed and the parameters are in effect! 确定 - + OK @@ -611,48 +615,48 @@ p, li { white-space: pre-wrap; } QIPConfigDlg - + QIPConfigDlg 本机服务器IP地址设置 - + Server address Settings IP 地址(I): - + Address: 关闭服务 - + Close Server 开放端口: - + Port: 打开服务 - + Open Server 目标客户端IP地址设置 - + Client Address Settings 源端口: - + Port: 确定 - + OK @@ -660,59 +664,59 @@ p, li { white-space: pre-wrap; } 模板名修改 - + Model Name modify 确认修改 - + Cancel 取消 - + Cancel 缩略图: - + Thumbnail: TextLabel - + TextLabel 旧型号名: - + Old Name: 新型号名: - + New Name: 提示 - + Prompt 新型号名不能为空! - + The new name can't be empty! 型号库中已包含该型号,请重新设置型号名! - + The model has been included in the model library. Please reset the model name! 确认 - + OK @@ -720,160 +724,160 @@ p, li { white-space: pre-wrap; } QModelMgrDlg - + QModelMgrDlg 轮毂信息: - + Wheel information 型号 - + Model 0% - + 0% 阈值调节 - + Threshold adjustment 严格 - + Strict 旋转次数 - + Number of rotations 缩略图 - + Thumbnail 宽松 - + Easy 厚度(mm) - + Thickness(mm) 直径(mm) - + Diameter(mm) 基本操作 - + Basic operation 删除模板 - + Delete 训练当前模板 - + Training 训练模板 - + Train 添加新的模板 - + Add new 新建模板 - + 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 修改型号名 - + Modify name 图片显示: - + Image display: TextLabel - + TextLabel 添加已裁剪的轮毂图片 - + Add cropped wheel image 追加 - + Add 删除所有模板 - + Delete all 模板型号查询 - + Template 查找: - + Find: 数量 - + Quantity modelID - + modelID @@ -891,81 +895,81 @@ p, li { white-space: pre-wrap; } 提示 - + Prompt 请选择一个您要追加图像的型号! - + Please select a model you want to add an image to! 加载图像 - + Load image 图像加载中,请稍后..... - + The image is loading, please wait... 添加失败,不能添加带检测背景的图片作为模板!!! - + Failed to add, you cannot add a picture with a detection background as a template! ! ! 加载完成 - + Download finished 请选择一个您要修改的型号! - + Please select a model you want to modify! 修改了模板 - + Modified template 的参数 - + The parameters of the 修改成功! - + Successfully modified! 请选择一个您要删除的型号 - + Please select a model you want to delete 按下了删除模板按钮 - + Press the Delete Template button 是否删除型号 - + Whether to delete the model 产品模板 - + Product template 删除了模板 - + Template deleted @@ -977,7 +981,7 @@ p, li { white-space: pre-wrap; } 共 - + common @@ -986,90 +990,90 @@ p, li { white-space: pre-wrap; } 个型号 - + Model number 按下了添加模板按钮 - + Press the Add Template button 产品信息设置 - + Product information settings 添加了一个新的模型 - + Added a new model 请选择一个您要训练的型号! - + Please select a model you want to train! 训练模板线程未退出,请稍等 - + The training template thread did not exit, please wait 将对所有型号模板进行重新训练,期间系统的检测功能将不能正常运行直到模板训练完成,全部重新训练模板将需要很长时间,期间将不能进行其他工作,是否继续执行? - + All model templates will be retrained. During this period, the system's detection function will not operate normally until the template training is completed. It will take a long time for all templates to be retrained, during which other work will not be possible. Do you want to continue? 确定删除该图像? - + Determine to delete the image? 模板图片删除 - + Template picture deletion 个图像 - + Image 警告 - + Warning 即将删除模板库里的所有模板,是否继续? - + All templates in the template library will be deleted. Do you want to continue? 再次确认,是否全部删除? - + Confirm again, delete all? 没有模板!!! - + No template!!! 全部删除完成!!! - + Complete deletion!!! 图像数量少于 - + The number of images is less than 个,请及时补充训练样本 - + , please add training samples in time @@ -1080,42 +1084,42 @@ p, li { white-space: pre-wrap; } 模板更新进度 - + Template update progress 正在初始化所有模板 共需要训练%1个模板,请稍后..... - + All templates are being initialized. A total of%1 templates need to be trained. Please wait a moment... 正在训练%1的模板 已完成%2/%3,请稍后..... - + The template training %1 is complete %2/%3, please wait... %1的模板获取特征 已完成%2/%3,请稍后..... - + Template capture feature for %1 is complete for %2/%3, please wait... %1的模板训练完成 已完成%2/%3,请稍后..... - + Template training for %1 completed %2/%3, please wait... 全部模板更新完成!%1s - + All templates updated!The %1 s 对全部模板进行了重新训练,共%1个模板 - + All templates were retrained, with a total of%1 template 模板正在准备请稍后..... - + The template is being prepared Please wait a moment..... @@ -1131,38 +1135,38 @@ p, li { white-space: pre-wrap; } 模板训练进度 - + Template training progress %1型号没有图片不能训练! - + %1 Model can not be trained without pictures! %1的模板 正在获取特征值,请稍后.... - + The%1 template is getting the characteristic value. Please wait... 训练完成!%1s - + Training completed! %1s 训练了模板:%1 - + Model training:%1 确认 - + OK 取消 - + Cancel @@ -1170,7 +1174,7 @@ p, li { white-space: pre-wrap; } 程序正在启动... - + The program is starting... @@ -1178,42 +1182,42 @@ p, li { white-space: pre-wrap; } 虚拟相机触发 - + Virtual camera trigger 硬件相机触发 - + Hardware camera trigger 调试免登陆 - + Debugging free login 正常工作模式 - + Normal working mode 传感器触发 - + Sensor trigger 软件触发 - + Software trigger 下降沿触发 - + Falling edge trigger 上升沿触发 - + Rising edge trigger @@ -1221,7 +1225,7 @@ p, li { white-space: pre-wrap; } QSettingDlg - + QSettingDlg @@ -1229,27 +1233,27 @@ p, li { white-space: pre-wrap; } 检测背景图像显示 - + Background display 退出 - + Exit 我要更换背景 - + Change background pic - + pic 没有用于检测的背景图,请更换检测背景 - + There is no background image for testing. Please change the testing background @@ -1257,389 +1261,400 @@ p, li { white-space: pre-wrap; } 相关设备配置 - + Device Setting 检测图像设置 - + Image Settings - + PLC相关设置 - + PLC Settings - + 报警灯测试 - + Alarm Test 高级功能 - + Developer 属性 - + Property 值 - + Value 语言 - + Language 检测背景更换 - + Background 抠图后 - + After cutout 原图 - + SourceImage - 检测结果 - + 背景图 + Background - 图像保存路径 - + 检测结果 + Result - - 设置保存路径 - + 图像保存路径 + Image Save Path - - 打开图像路径 - + + 设置保存路径 + Save path + + 打开图像路径 + Open Image Path + + + 保存当前设置 - + Save current settings - - + + 保存已匹配图 - + Save matched Image - - + + 保存无匹配图 - + Save Unmatched Image + + + + 使用背景图 + Use background - + 轮毂全去A通道 - + Hub All-to-A Channel - + 查看检测背景 - + Check Background - + 保存参数 - + Save Parameters - - + + 保存设置 - + Save Settings - + 传感器触发滤波(ms) - + Sensor filtering (ms) - + 相机触发延时(ms) - + Sensor filtering (ms) - + 相机触发脉宽(ms) - + Camera width (ms) - + 光源熄灭延时时间(ms) - + Light delay time (ms) - + 传感器触发类型 - + Sensor trigger type - + 保持结果时长(ms) - + Result hold Times (ms) - + 连接超时次数 - + Connection timeouts - + 超时是否显示信息 - + Display information - - + + 是否自动重启服务器 - + Auto restart servering - + 是否保存超时日志 - + Save timeout log - + 发送并保存 - + Send and save - + 超时提醒n次后自动重启服务 - + Automatically restart service after n timeout reminders - + 是否显示提示 - + Display Warning - + 勾选后通信超时时会显示提醒信息 - + Reminder message will be displayed when communication timeout occurs after checking - + 勾选后通信超时次数达到后,系统将自动重启服务,PLC会自动重新连接 - + After checking the number of communication timeouts reached, the system will automatically restart the service, and the PLC will automatically reconnect - + 保存信息到系统日志 - + Save information to system log - + 勾选后表示超时信息将自动保存到系统日志中,便于查询 - + Check to indicate that the timeout information will be automatically saved to the system log for easy query - + 红灯 - + Red light - + 绿灯 - + Green light - + 黄灯 - + Yellow light - + 蜂鸣 - + Buzzing - + 红灯闪一下 - + Red light flashed - + 绿灯闪一下 - + Green light flashed - + 黄灯闪一下 - + Yellow light flashed - + 蜂鸣响一下 - + Bee rings - + 开发者使用 - + Developers use - + 相机模式 - + Camera mode - + 虚拟相机触发时间 - + Trigger times - + 系统模式 - + System mode - + 相机触发模式 - + Trigger mode - - + + 串口发送心跳包 - + Serial Port - - + + 网络发送心跳包 - + Network - - + + 串口发送通道结果 - + Serial Port - - + + 网络发送检测结果 - + Network - - + + 网络发送通道结果 - + Network - + 光栅使用标志 - + Rester - + 保存高度厚度数据 - + Data - + 通道分配 - + Channel allocate - + 启动时是否检测 - + Whether to detect at startup - + 显示厚度数据 - + Display thickness data - + 显示厚度采样数据 - + Display thickness sampling data - + 使用光栅获取厚度 - + Acquiring Thickness by Grating - + 保存数据用于测试 - + Save data for testing - + 是否使用通道分配 - + Whether to use channel allocation or not - + 是否启动就开始检测 - + Start checking if it's started - - + + 是否显示 - + Whether to display - + 保存 - + Save - + 请选择您的背景图 - + Please select your background map - + 提示 - + Info + Warning - + 背景图更新完成,请重启本软件. - + Background image updated, please restart this software. - + 确认 - + OK - + 打开文件夹 - + Open folder @@ -1647,7 +1662,7 @@ p, li { white-space: pre-wrap; } 系统设置 - + System settings @@ -1655,49 +1670,49 @@ p, li { white-space: pre-wrap; } 班次管理 - + Classes management 未选中 - + UnSelect 添加时间 - + Add time 删除时间 - + Delete time 修改时间 - + Modify time 班次 - + Classes 起始时间 - + Start 结束时间 - + End 设置参数 - + Setting parameters @@ -1707,7 +1722,7 @@ p, li { white-space: pre-wrap; } 当天 - + Same day @@ -1717,37 +1732,37 @@ p, li { white-space: pre-wrap; } 隔天 - + Next day 提示 - + Prompt 未选择班次,请选择进行修改。 - + No classes is selected, please select to modify. 确认 - + Ok 您确定要删除 %1 班次? - + Are you sure you want to delete the %1 classes? 取消 - + Canncel @@ -1755,23 +1770,23 @@ p, li { white-space: pre-wrap; } 工单信息设置 - + Work List information setting 警告 - + Warning 名称不能为空. - + The name cannot be empty. 你输入的名称:%1 重复. - + The name :%1 repeat. @@ -1779,27 +1794,27 @@ p, li { white-space: pre-wrap; } 信息设置 - + Information setup 确定 - + Ok 取消 - + Cancel 备注信息: - + Note information: 名称: - + Name: @@ -1807,204 +1822,204 @@ p, li { white-space: pre-wrap; } QWorkMgrUI - + QWorkMgrUI 工作任务表 - + Table List 添加任务单 - + Add Table 添加 - + Add 删除任务单 - + Delete Table List 删除 - + Del 修改任务单名称或备注信息 - + Modify Table List Name or Note Information 修改 - + Mod 使用任务单 - + Set Use 应用 - + Use 当前选择的任务表: - + Current Table: 数量 - + Num 添加型号到检测列表 - + Add model to table <<< - + Setting parameters 从检测列表移除所选型号 - + Remove the selected model from the table >>> - + >>> 缩略图 - + Image 只看已选 - + Selected 只看未选 - + Unselected 显示全部 - + Show all 查找: - + Find: 其他 - + Others 按照直径检测 - + Detect by diameter 按照厚度检测 - + Detect by thickness 手动发送模板库 - + Sending Model Library 检测模板管理 - + Detection Model Management 共 %1 个 - + Total of%1 当前使用的工单为 %1 - + The current Table is%1 以下型号为重复添加: %1已被忽略. - + The models are added repeatedly:%1, And They have been ignored. 提醒 - + Warning 确定 - + OK 工单 %1 被设为应用 - + Table %1 is seted to Using 发送模板库 - + Send Template Library 警告 - + Warning %1任务单正在使用不能被删除,请先切换到其他任务单,再删除该任务单? - + %1 Table is Using and cannot be deleted. Please switch to another Table before deleting the Table? 取消 - + Cancel 是否要删除 %1 模型? - + Do you want to delete the%1 model? 序号 - + Num 内容 - + About @@ -2013,17 +2028,17 @@ p, li { white-space: pre-wrap; } line item is not created - + line item is not created line item is already created - + line item is already created rect item is already created - + rect item is already created @@ -2031,52 +2046,52 @@ p, li { white-space: pre-wrap; } 加载通道模块 .... - + Loading Channel Module.... 加载模板库 .... - + Loading Template Library.... 加载检测设置模块 .... - + Load Detection Setup Module.... 加载数据库 .... - + Load the database.... 加载班次管理模块 .... - + Loading shift management module.... 加载其他模块 .... - + Loading other modules.... 创建子线程 .... - + Create subthreads.... 加载光栅通讯模块 .... - + Loading grating communication module.... 模块加载完成,启动线程 .... - + Module loading is completed and thread is started.... 未登录 - + @@ -2084,58 +2099,58 @@ p, li { white-space: pre-wrap; } 轮毂型号识别 - + Wheel model identification image_zoom.ui - + image_zoom.ui 状态信息 - + Status information - + 开始检测 - + Start testing 检测结果 - + Results 无匹配(个) - + No match 已检测(个) - + Detected 匹配值 - + Match value 直径(mm) - + Diameter (mm) 时间(s) - + Time(s) 通道 - + Channel @@ -2146,93 +2161,93 @@ p, li { white-space: pre-wrap; } 0 - + 0 --------- - + --------- None - + None - + 检测状态 - + Detection status 厚度(mm) - + Thickness(mm) 统计结果 - + Statistical results modelID_detect - + modelID_detect count - + count 交换班清零 - + Exchange class reset 型号数量 - + Model number - + 模板管理 - + Template management 数据查询 - + Data query 模板勾选 - + Template check 辅助工具 - + Auxiliary tools 班次设置 - + Classes setting 光栅标定 - + Raster calibration IP设置 - + IP settings - + 关于 About @@ -2244,293 +2259,293 @@ p, li { white-space: pre-wrap; } 用户管理 - + User Management 系统设置 - + System settings - + 相机配置 - + Camera configuration - + 加载必要模块..... - + Load the necessary modules..... - - + + 工具 - + Tool - + 系统时间 - + System time - + 班次信息 - + Classes information - + 用户: - + User: - + 历史 - + History - + 系统初始化完成... - + System initialization complete... - + 显示识别结果 - + Display recognition results - + 相机图像和背景图不一样,请更换检测背景! - + The camera image is different from the background image, please change the detection background! - + 警告!!!连续出现%1个未识别型号 - + Warning!!! %1 unidentified models appear continuously - + ,未开启检测功能造成的 - + , Caused by not opening the detection function - + 获得图像,正在计算中... - + Get the image, is calculating... - + 注 销 Logout - + 登 录 Login - - + + 该功能未启用. - + The feature is not enabled. - - - + + + 确认 - + Ok - + 你确定要注销 - + Are you sure you want to log out - + 班次管理 - + Classes management - + 调试工具 DebugTool - + 系统参数设置 - + System parameter setting - - + + 停止检测 - + Stop detecting - + 按下了开始检测按钮,检测功能开启 - + Press the start detection button, the detection function is turned on - + 按下了停止检测按钮,检测功能关闭 - + Press the stop detection button, the detection function is closed - - - - + + + + 提示 - + Prompt - + 将清空所有数据 - + All data will be cleared - + 确定 - + Ok - - + + 取消 - + Cancel - + 按下了清零按钮,数据全部清零 - + Press the reset button, all data are cleared - + 系统时间: - + System time: - + 运行时长: - + Running time: - + 检测状态: - + Detection status: - + 检测中... - + Detecting... - + 未检测... - + Not detected... - + 班次信息: - + Classes information: - + 该时间段未设置班次 - + No classes is set in this time period - + 当前用户: - + Current user: - + 模板库发送完成 - + Template library sending completed - - + + 正在检测型号数 - + Number of models being detected - + 已连接 - + Connected - + 已断开 - + Disconnected - + PLC已收到相关设置参数! - + The PLC has received the relevant setting parameters! - + 已打开 - + Opened - + 已关闭 - + Closed - + 轮毂型号识别系统 - + 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 - + 最后更新时间 - + Last update time - + 版权 (c) 属 杭州利珀科技有限公司 所有 - + Copyright(C) belongs to Hangzhou Lipper Technology Co., Ltd. - + 关闭 - + Shut down - + (默认) - + (Default) - + 默认通道 值1000 - + Default channel value 1000 diff --git a/tpvs17/tpMain/lpmain_zh.ts b/tpvs17/tpMain/lpmain_zh.ts index 1aa1933..a145ed2 100644 --- a/tpvs17/tpMain/lpmain_zh.ts +++ b/tpvs17/tpMain/lpmain_zh.ts @@ -1238,13 +1238,13 @@ p, li { white-space: pre-wrap; } - + PLC相关设置 - + 报警灯测试 @@ -1287,328 +1287,338 @@ p, li { white-space: pre-wrap; } - 检测结果 + 背景图 - 图像保存路径 + 检测结果 - - 设置保存路径 + 图像保存路径 - - 打开图像路径 + + 设置保存路径 + + 打开图像路径 + + + + 保存当前设置 - - + + 保存已匹配图 - - + + 保存无匹配图 - + + 使用背景图 + + + + 轮毂全去A通道 - + 查看检测背景 - + 保存参数 - - + + 保存设置 - + 传感器触发滤波(ms) - + 相机触发延时(ms) - + 相机触发脉宽(ms) - + 光源熄灭延时时间(ms) - + 传感器触发类型 - + 保持结果时长(ms) - + 连接超时次数 - + 超时是否显示信息 - - + + 是否自动重启服务器 - + 是否保存超时日志 - + 发送并保存 - + 超时提醒n次后自动重启服务 - + 是否显示提示 - + 勾选后通信超时时会显示提醒信息 - + 勾选后通信超时次数达到后,系统将自动重启服务,PLC会自动重新连接 - + 保存信息到系统日志 - + 勾选后表示超时信息将自动保存到系统日志中,便于查询 - + 红灯 - + 绿灯 - + 黄灯 - + 蜂鸣 - + 红灯闪一下 - + 绿灯闪一下 - + 黄灯闪一下 - + 蜂鸣响一下 - + 开发者使用 - + 相机模式 - + 虚拟相机触发时间 - + 系统模式 - + 相机触发模式 - - + + 串口发送心跳包 - - + + 网络发送心跳包 - - + + 串口发送通道结果 - - + + 网络发送检测结果 - - + + 网络发送通道结果 - + 光栅使用标志 - + 保存高度厚度数据 - + 通道分配 - + 启动时是否检测 - + 显示厚度数据 - + 显示厚度采样数据 - + 使用光栅获取厚度 - + 保存数据用于测试 - + 是否使用通道分配 - + 是否启动就开始检测 - - + + 是否显示 - + 保存 - + 请选择您的背景图 - + 提示 - + 背景图更新完成,请重启本软件. - + 确认 - + 打开文件夹 @@ -2069,7 +2079,7 @@ p, li { white-space: pre-wrap; } - + 开始检测 @@ -2131,7 +2141,7 @@ p, li { white-space: pre-wrap; } - + 检测状态 @@ -2167,7 +2177,7 @@ p, li { white-space: pre-wrap; } - + 模板管理 @@ -2203,7 +2213,7 @@ p, li { white-space: pre-wrap; } - + 关于 @@ -2224,282 +2234,282 @@ p, li { white-space: pre-wrap; } - + 相机配置 - + 加载必要模块..... - - + + 工具 - + 系统时间 - + 班次信息 - + 用户: - + 历史 - + 系统初始化完成... - - + + 停止检测 - + 显示识别结果 - + 相机图像和背景图不一样,请更换检测背景! - + 警告!!!连续出现%1个未识别型号 - + ,未开启检测功能造成的 - + 获得图像,正在计算中... - + 注 销 - + 登 录 - - - - + + + + 提示 - - + + 该功能未启用. - - - + + + 确认 - + 你确定要注销 - - + + 取消 - + 班次管理 - + 调试工具 - + 系统参数设置 - + 按下了开始检测按钮,检测功能开启 - + 按下了停止检测按钮,检测功能关闭 - + 将清空所有数据 - + 确定 - + 按下了清零按钮,数据全部清零 - + 系统时间: - + 运行时长: - + 检测状态: - + 检测中... - + 未检测... - + 班次信息: - + 该时间段未设置班次 - + 当前用户: - + 模板库发送完成 - - + + 正在检测型号数 - + 已连接 - + 已断开 - + PLC已收到相关设置参数! - + 已打开 - + 已关闭 - + 轮毂型号识别系统 - + 本软件由杭州利珀科技开发,用于轮毂型号识别和分类,可搭配流水线运输系统使用 - + 若需要进一步了解该产品的相关信息,请访问我们的网站 - + 软件版本 - + 算法版本 - + 最后更新时间 - + 版权 (c) 属 杭州利珀科技有限公司 所有 - + 关闭 - + (默认) - + 默认通道 值1000