优化结构
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
#include <Inspection_apexSmall.hpp>
|
||||
#include <simpleAlgo.h>
|
||||
#include <CISCO_struct.hpp>
|
||||
static double pixACC = 0.01;
|
||||
static double apexSmallpixACC = 0.01;
|
||||
//输入det切出的连接器图片
|
||||
cv::Size apexSmallMinPin(30, 30), apexSmallMaxPin(400, 400);
|
||||
static void apexSmallHalconPaint(cv::Mat& out, std::vector<startAndEndPoints>xLines, const std::vector<cv::Rect>& AllPinsPos, const std::vector<rectAndResult>& AllPos, double& maxRange)
|
||||
@@ -29,7 +29,7 @@ static void apexSmallHalconPaint(cv::Mat& out, std::vector<startAndEndPoints>xLi
|
||||
for (auto& rectIn : groupedRectangles[i])
|
||||
{
|
||||
cv::Point mid(rectIn.rect.x, rectIn.rect.y);
|
||||
double range = pointToLineDistance(mid, xLines[i].start, xLines[i].end) * pixACC;
|
||||
double range = pointToLineDistance(mid, xLines[i].start, xLines[i].end) * apexSmallpixACC;
|
||||
maxRange = max(maxRange, range);
|
||||
cv::Rect rect(rectIn.rect.x - rectIn.rect.width / 2, rectIn.rect.y - rectIn.rect.height / 2, rectIn.rect.width, rectIn.rect.height);
|
||||
cv::Scalar scolor;
|
||||
@@ -50,7 +50,7 @@ static void apexSmallHalconPaint(cv::Mat& out, std::vector<startAndEndPoints>xLi
|
||||
for (auto& rectIn : PinGroupedRectangles[i])
|
||||
{
|
||||
cv::Point mid(rectIn.x, rectIn.y);
|
||||
double range = pointToLineDistance(mid, xLines[i].start, xLines[i].end) * pixACC;
|
||||
double range = pointToLineDistance(mid, xLines[i].start, xLines[i].end) * apexSmallpixACC;
|
||||
maxRange = max(maxRange, range);
|
||||
cv::Rect rect(rectIn.x - rectIn.width / 2, rectIn.y - rectIn.height / 2, rectIn.width, rectIn.height);
|
||||
cv::Scalar scolor = cv::Scalar(0, 255, 0);
|
||||
|
||||
@@ -93,7 +93,7 @@ void sqlManager::initialization(appConfig* _appConfig,std::string dataBasePath,
|
||||
std::cout << "SQL runing Init..." << std::endl;
|
||||
dbPtr = new sqliteModule(dataBasePath);//初始化
|
||||
dbPtr->backup(dataBasePath + getCurrentDate() + ".db");//备份
|
||||
std::vector<std::string>tables = getFutureDates(180);
|
||||
std::vector<std::string>tables = getFutureDates(30);
|
||||
|
||||
//整合所需要的数据名
|
||||
std::vector<std::string>dataStr;
|
||||
@@ -160,7 +160,10 @@ bool sqlManager::addData(std::string SN,std::vector<sqlData> data)
|
||||
if (res.customType == sqlFalse)
|
||||
{
|
||||
for (auto keyName : data)
|
||||
{
|
||||
dbPtr->addColumn(currentTableName, keyName.key, "text");
|
||||
std::cout << "new col insert" << keyName.key << std::endl;
|
||||
}
|
||||
dbPtr->Insert(currentTableName, SN, data);
|
||||
}
|
||||
mutex.unlock();
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include <qtimer.h>
|
||||
|
||||
|
||||
#define disableBackEndCheck 0
|
||||
#define disableBackEndCheck 1
|
||||
#define disableeAlgo 0
|
||||
#define enableHideConsle 1
|
||||
class detGlobalData
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
#include <appCoreQtFunction.h>
|
||||
|
||||
void qtFunction::productDetEnded()
|
||||
{
|
||||
|
||||
}
|
||||
@@ -4,8 +4,6 @@
|
||||
class qtFunction :public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public slots:
|
||||
void productDetEnded();//整个检测流程结束
|
||||
signals:
|
||||
void sendErrorToMainwindow(backEndError);
|
||||
void sendPixmapImageWidget(showImgPack*);
|
||||
|
||||
@@ -11,7 +11,7 @@ public:
|
||||
backContinueDetDialog()
|
||||
{
|
||||
timer = new QTimer(this);
|
||||
_fancyWarnWindow = new fancyWarnWindow(fancyWarnWindow::tip, "是否继续背面检测", "", true);
|
||||
_fancyWarnWindow = new fancyWarnWindow(fancyWarnWindow::tip, "是否继续背面检测", "", false);
|
||||
_fancyWarnWindow->disableHideAfterClicked();
|
||||
_fancyWarnWindow->hide();
|
||||
QObject::connect(_fancyWarnWindow->continueBtn, &QPushButton::clicked, this, &backContinueDetDialog::continueClicked);
|
||||
|
||||
Reference in New Issue
Block a user