From fbf45f9ffee6c357353bc9e821f7d4fd5d09ac32 Mon Sep 17 00:00:00 2001 From: qushuai777 Date: Thu, 25 Feb 2021 13:42:39 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3EDCircle=E5=86=85=E5=AD=98?= =?UTF-8?q?=E8=B6=8A=E7=95=8C=E9=97=AE=E9=A2=98=EF=BC=8C=E8=83=8C=E6=99=AF?= =?UTF-8?q?=E5=9B=BE=E7=89=87=E5=8A=A0=E8=BD=BD=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 3part/edcircle/include/EDCircles.h | 5 +++-- src/algorithm/AlgorithmFluorescence.cpp | 2 +- tpvs17/tpMain/QSystemSettingDlg.cpp | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/3part/edcircle/include/EDCircles.h b/3part/edcircle/include/EDCircles.h index 6888a44..166ea55 100644 --- a/3part/edcircle/include/EDCircles.h +++ b/3part/edcircle/include/EDCircles.h @@ -16,7 +16,7 @@ #define CANDIDATE_CIRCLE_RATIO1 0.25 // 25% -- If only 25% of the circle is detected, it may be a candidate for validation #define CANDIDATE_CIRCLE_RATIO2 0.33 // 33% -- If only 33% of the circle is detected, it may be a candidate for validation #define HALF_CIRCLE_RATIO 0.50 // 50% -- If 50% of a circle is detected at any point during joins, we immediately make it a candidate -#define FULL_CIRCLE_RATIO 0.67 // 67% -- If 67% of the circle is detected, we assume that it is fully covered +#define FULL_CIRCLE_RATIO 0.87 // 67% -- If 67% of the circle is detected, we assume that it is fully covered // Ellipse thresholds #define CANDIDATE_ELLIPSE_RATIO 0.50 // 50% -- If 50% of the ellipse is detected, it may be candidate for validation @@ -217,7 +217,8 @@ private: int *segmentStartLines; BufferManager *bm; - Info *info; + //Info *info; + std::vector info; NFALUT *nfa; void GenerateCandidateCircles(); diff --git a/src/algorithm/AlgorithmFluorescence.cpp b/src/algorithm/AlgorithmFluorescence.cpp index f78a31f..c2b7b0f 100644 --- a/src/algorithm/AlgorithmFluorescence.cpp +++ b/src/algorithm/AlgorithmFluorescence.cpp @@ -273,7 +273,7 @@ int CAlgorithmFluorescence::IImageAnalysis(class IImageObject* pImgObj, TP_ALGOR bool bUseBackground = vMap.value("useBackground",false).toBool();//true 使用背景图抠图 false 不使用背景 if (nthreshold <= 0) - nthreshold = 15; + nthreshold = 15; int IsCutedImg = vMap.value("IsCutImg", 0).toInt();//裁剪后的轮毂图 QVariantMap rltMap; luffy_base::luffyCircle lCircle; diff --git a/tpvs17/tpMain/QSystemSettingDlg.cpp b/tpvs17/tpMain/QSystemSettingDlg.cpp index 50c55b0..56bc95e 100644 --- a/tpvs17/tpMain/QSystemSettingDlg.cpp +++ b/tpvs17/tpMain/QSystemSettingDlg.cpp @@ -852,7 +852,7 @@ Q_SLOT void QSystemSettingDlg::onChangeBG() QStringList backgroundFile = fileDialog.selectedFiles(); if (backgroundFile.size() > 0) { - QString DstPath = /*m_pCtrl->appRoot() +*/ "\\user\\background.png"; + QString DstPath = QApplication::applicationDirPath()+ "\\user\\background.png"; QString sourcePath = backgroundFile.at(0); DstPath.replace("\\", "/"); if (sourcePath == DstPath) {