fix:beltRearing 修复算法检测索引问题
This commit is contained in:
parent
457b98ac89
commit
200292c01a
@ -1,14 +1,14 @@
|
|||||||
#ifndef VERSION_H
|
#ifndef VERSION_H
|
||||||
#define VERSION_H
|
#define VERSION_H
|
||||||
|
|
||||||
#define BELT_TEARING_APP_VERSION_STRING "2.1.2"
|
#define BELT_TEARING_APP_VERSION_STRING "2.1.3"
|
||||||
#define BELT_TEARING_APP_VERSION_BUILD "2"
|
#define BELT_TEARING_APP_VERSION_BUILD "1"
|
||||||
#define BELT_TEARING_APP_PRODUCT_NAME "BeltTearingApp"
|
#define BELT_TEARING_APP_PRODUCT_NAME "BeltTearingApp"
|
||||||
#define BELT_TEARING_APP_COMPANY_NAME "VisionRobot"
|
#define BELT_TEARING_APP_COMPANY_NAME "VisionRobot"
|
||||||
#define BELT_TEARING_APP_COPYRIGHT "Copyright (C) 2024-2026 VisionRobot. All rights reserved."
|
#define BELT_TEARING_APP_COPYRIGHT "Copyright (C) 2024-2026 VisionRobot. All rights reserved."
|
||||||
#define BELT_TEARING_APP_DESCRIPTION "Belt Tearing Detection Application"
|
#define BELT_TEARING_APP_DESCRIPTION "Belt Tearing Detection Application"
|
||||||
|
|
||||||
// 构建信息
|
// 构建信3
|
||||||
#define BELT_TEARING_APP_BUILD_DATE __DATE__
|
#define BELT_TEARING_APP_BUILD_DATE __DATE__
|
||||||
#define BELT_TEARING_APP_BUILD_TIME __TIME__
|
#define BELT_TEARING_APP_BUILD_TIME __TIME__
|
||||||
|
|
||||||
|
|||||||
@ -1600,6 +1600,7 @@ int BeltTearingPresenter::RestartDetectStream()
|
|||||||
m_pointCloudSendLineCounter.store(0);
|
m_pointCloudSendLineCounter.store(0);
|
||||||
|
|
||||||
m_bInitAlgo = false;
|
m_bInitAlgo = false;
|
||||||
|
m_detectIndex = 0;
|
||||||
m_hLineWorkers.clear();
|
m_hLineWorkers.clear();
|
||||||
m_beltTearings_new.clear();
|
m_beltTearings_new.clear();
|
||||||
m_beltTearings_growing.clear();
|
m_beltTearings_growing.clear();
|
||||||
@ -1852,18 +1853,20 @@ int BeltTearingPresenter::_DetectTask()
|
|||||||
m_algorithmParam
|
m_algorithmParam
|
||||||
);
|
);
|
||||||
m_bInitAlgo = true;
|
m_bInitAlgo = true;
|
||||||
|
LOG_DEBUG("Algorithm initialized errorCode: %d\n", errorCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 对缓存中的每一帧数据进行检测
|
// 对缓存中的每一帧数据进行检测
|
||||||
for (auto& algorithmData : algorithmDataCache) {
|
for (auto& algorithmData : algorithmDataCache) {
|
||||||
// 直接调用皮带撕裂检测算法
|
// 直接调用皮带撕裂检测算法
|
||||||
sg_detectBeltTearing(&algorithmData, static_cast<int>(algorithmData.nTimeStamp),
|
sg_detectBeltTearing(&algorithmData, static_cast<int>(m_detectIndex),
|
||||||
algorithmData.nPositionCnt, &errorCode,
|
algorithmData.nPositionCnt, &errorCode,
|
||||||
m_hLineWorkers,
|
m_hLineWorkers,
|
||||||
m_beltTearings_new, m_beltTearings_growing, m_beltTearings_ended, m_beltTearings_unknown,
|
m_beltTearings_new, m_beltTearings_growing, m_beltTearings_ended, m_beltTearings_unknown,
|
||||||
m_algorithmParam
|
m_algorithmParam
|
||||||
);
|
);
|
||||||
|
m_detectIndex++;
|
||||||
|
|
||||||
// 合并各个撕裂结果容器
|
// 合并各个撕裂结果容器
|
||||||
#if 1
|
#if 1
|
||||||
_MergeAndReplace(allTearings, m_beltTearings_new);
|
_MergeAndReplace(allTearings, m_beltTearings_new);
|
||||||
|
|||||||
@ -108,6 +108,7 @@ private:
|
|||||||
std::vector<SSG_beltTearingInfo> m_beltTearings_growing;
|
std::vector<SSG_beltTearingInfo> m_beltTearings_growing;
|
||||||
std::vector<SSG_beltTearingInfo> m_beltTearings_ended;
|
std::vector<SSG_beltTearingInfo> m_beltTearings_ended;
|
||||||
std::vector<SSG_beltTearingInfo> m_beltTearings_unknown;
|
std::vector<SSG_beltTearingInfo> m_beltTearings_unknown;
|
||||||
|
unsigned long long m_detectIndex{0};
|
||||||
|
|
||||||
// 激光线队列管理
|
// 激光线队列管理
|
||||||
std::deque<SVzLaserLineData> m_laserLineQueue; // 激光线数据队列
|
std::deque<SVzLaserLineData> m_laserLineQueue; // 激光线数据队列
|
||||||
|
|||||||
@ -57,32 +57,32 @@ FORMS +=
|
|||||||
|
|
||||||
win32:CONFIG(debug, debug|release) {
|
win32:CONFIG(debug, debug|release) {
|
||||||
LIBS += -L../BeltTearingConfig/debug -lBeltTearingConfig
|
LIBS += -L../BeltTearingConfig/debug -lBeltTearingConfig
|
||||||
LIBS += -L../../../Device/VrEyeDevice/debug -lVrEyeDevice
|
LIBS += -L../../../Device/VrEyeDevice/debug -lVrEyeDevice
|
||||||
LIBS += -L../../../Utils/CloudUtils/debug -lCloudUtils
|
LIBS += -L../../../Utils/CloudUtils/debug -lCloudUtils
|
||||||
LIBS += -L../../../Nets/debug -lVrTcpServer
|
LIBS += -L../../../Nets/debug -lVrTcpServer
|
||||||
LIBS += -L../../../Nets/debug -lModbusTCPServer
|
LIBS += -L../../../Nets/debug -lModbusTCPServer
|
||||||
LIBS += -L../../../Nets/debug -lVrModbus
|
LIBS += -L../../../Nets/debug -lVrModbus
|
||||||
LIBS += -L../../../Module/AuthModule/debug -lAuthModule
|
LIBS += -L../../../Module/AuthModule/debug -lAuthModule
|
||||||
LIBS += -L../../../Utils/VrUtils/debug -lVrUtils
|
LIBS += -L../../../Utils/VrUtils/debug -lVrUtils
|
||||||
}else:win32:CONFIG(release, debug|release){
|
}else:win32:CONFIG(release, debug|release){
|
||||||
LIBS += -L../BeltTearingConfig/release -lBeltTearingConfig
|
LIBS += -L../BeltTearingConfig/release -lBeltTearingConfig
|
||||||
LIBS += -L../../../Device/VrEyeDevice/release -lVrEyeDevice
|
LIBS += -L../../../Device/VrEyeDevice/release -lVrEyeDevice
|
||||||
LIBS += -L../../../Utils/CloudUtils/release -lCloudUtils
|
LIBS += -L../../../Utils/CloudUtils/release -lCloudUtils
|
||||||
LIBS += -L../../../Nets/release -lVrTcpServer
|
LIBS += -L../../../Nets/release -lVrTcpServer
|
||||||
LIBS += -L../../../Nets/release -lModbusTCPServer
|
LIBS += -L../../../Nets/release -lModbusTCPServer
|
||||||
LIBS += -L../../../Nets/release -lVrModbus
|
LIBS += -L../../../Nets/release -lVrModbus
|
||||||
LIBS += -L../../../Module/AuthModule/release -lAuthModule
|
LIBS += -L../../../Module/AuthModule/release -lAuthModule
|
||||||
LIBS += -L../../../Utils/VrUtils/release -lVrUtils
|
LIBS += -L../../../Utils/VrUtils/release -lVrUtils
|
||||||
}else:unix:!macx {
|
}else:unix:!macx {
|
||||||
# Unix/Linux library links.
|
# Unix/Linux library links.
|
||||||
LIBS += -L../BeltTearingConfig -lBeltTearingConfig
|
LIBS += -L../BeltTearingConfig -lBeltTearingConfig
|
||||||
LIBS += -L../../../Nets -lModbusTCPServer
|
LIBS += -L../../../Nets -lModbusTCPServer
|
||||||
LIBS += -L../../../Nets -lVrModbus
|
LIBS += -L../../../Nets -lVrModbus
|
||||||
LIBS += -L../../../Nets -lVrTcpServer
|
LIBS += -L../../../Nets -lVrTcpServer
|
||||||
LIBS += -L../../../Device/VrEyeDevice -lVrEyeDevice
|
LIBS += -L../../../Device/VrEyeDevice -lVrEyeDevice
|
||||||
LIBS += -L../../../Utils/CloudUtils -lCloudUtils
|
LIBS += -L../../../Utils/CloudUtils -lCloudUtils
|
||||||
LIBS += -L../../../Module/AuthModule -lAuthModule
|
LIBS += -L../../../Module/AuthModule -lAuthModule
|
||||||
LIBS += -L../../../Utils/VrUtils -lVrUtils
|
LIBS += -L../../../Utils/VrUtils -lVrUtils
|
||||||
|
|
||||||
|
|
||||||
# System library dependencies.
|
# System library dependencies.
|
||||||
@ -129,22 +129,22 @@ win32:CONFIG(release, debug|release): {
|
|||||||
LIBS += -L$$PWD/../../../SDK/OpenCV320/Windows/vc14/Release -lopencv_world320
|
LIBS += -L$$PWD/../../../SDK/OpenCV320/Windows/vc14/Release -lopencv_world320
|
||||||
|
|
||||||
# Algorithm SDK library.
|
# Algorithm SDK library.
|
||||||
LIBS += -L$$PWD/../../../AppAlgo/beltTearing/Windows/x64/Release -lbeltTearingDetection
|
LIBS += -L$$PWD/../../../AppAlgo/beltTearing/Windows/x64/Release -lbeltTearingDetection
|
||||||
}
|
}
|
||||||
else:win32:CONFIG(debug, debug|release): {
|
else:win32:CONFIG(debug, debug|release): {
|
||||||
LIBS += -L$$PWD/../../../SDK/OpenCV320/Windows/vc14/Release -lopencv_world320
|
LIBS += -L$$PWD/../../../SDK/OpenCV320/Windows/vc14/Release -lopencv_world320
|
||||||
# Algorithm SDK library.
|
# Algorithm SDK library.
|
||||||
LIBS += -L$$PWD/../../../AppAlgo/beltTearing/Windows/x64/Release -lbeltTearingDetection
|
LIBS += -L$$PWD/../../../AppAlgo/beltTearing/Windows/x64/Debug -lbeltTearingDetection
|
||||||
}
|
}
|
||||||
else:unix:!macx: {
|
else:unix:!macx: {
|
||||||
LIBS += -L$$PWD/../../../SDK/OpenCV320/Arm/aarch64 -lopencv_core -lopencv_imgproc -lopencv_highgui
|
LIBS += -L$$PWD/../../../SDK/OpenCV320/Arm/aarch64 -lopencv_core -lopencv_imgproc -lopencv_highgui
|
||||||
|
|
||||||
# Algorithm SDK library.
|
# Algorithm SDK library.
|
||||||
LIBS += -L$$PWD/../../../AppAlgo/beltTearing/Arm/aarch64 -lbeltTearingDetection
|
LIBS += -L$$PWD/../../../AppAlgo/beltTearing/Arm/aarch64 -lbeltTearingDetection
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# 添加Windows系统库依赖?
|
# 添加Windows系统库依赖
|
||||||
win32 {
|
win32 {
|
||||||
LIBS += -lshell32
|
LIBS += -lshell32
|
||||||
LIBS += -lws2_32
|
LIBS += -lws2_32
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
#ifndef VERSION_H
|
#ifndef VERSION_H
|
||||||
#define VERSION_H
|
#define VERSION_H
|
||||||
|
|
||||||
#define BELTTEARING_VERSION_STRING "2.1.2"
|
#define BELTTEARING_VERSION_STRING "2.1.3"
|
||||||
#define BELTTEARING_VERSION_BUILD "2"
|
#define BELTTEARING_VERSION_BUILD "1"
|
||||||
#define BELTTEARING_PRODUCT_NAME "BeltTearingServer"
|
#define BELTTEARING_PRODUCT_NAME "BeltTearingServer"
|
||||||
#define BELTTEARING_COMPANY_NAME "VisionRobot"
|
#define BELTTEARING_COMPANY_NAME "VisionRobot"
|
||||||
#define BELTTEARING_COPYRIGHT "Copyright (C) 2024-2026 VisionRobot. All rights reserved."
|
#define BELTTEARING_COPYRIGHT "Copyright (C) 2024-2026 VisionRobot. All rights reserved."
|
||||||
|
|||||||
@ -1,3 +1,7 @@
|
|||||||
|
# 2.1.3
|
||||||
|
## build_1 2026-10-26
|
||||||
|
1. 修复算法检测索引问题
|
||||||
|
|
||||||
# 2.1.2
|
# 2.1.2
|
||||||
## build_1 2026-10-22
|
## build_1 2026-10-22
|
||||||
1. 更新算法:增加了焊缝最小,最大宽度; 最大深度参数
|
1. 更新算法:增加了焊缝最小,最大宽度; 最大深度参数
|
||||||
|
|||||||
@ -90,7 +90,7 @@ int main(int argc, char *argv[])
|
|||||||
std::this_thread::sleep_for(std::chrono::seconds(5));
|
std::this_thread::sleep_for(std::chrono::seconds(5));
|
||||||
// while (true)
|
// while (true)
|
||||||
{
|
{
|
||||||
presenter.sendTestData("D:\\Project\\wood\\GrabBag\\TestData\\beltTearing\\LaserData\\2026-10-23-10-45-34_LaserData_Ik012067.txt");
|
presenter.sendTestData("D:\\Project\\wood\\GrabBag\\TestData\\beltTearing\\2\\LaserLine2_grid.txt");
|
||||||
// presenter.sendSimulationData(); // 启用发送模拟撕裂数据
|
// presenter.sendSimulationData(); // 启用发送模拟撕裂数据
|
||||||
std::this_thread::sleep_for(std::chrono::seconds(1)); // 等待1秒
|
std::this_thread::sleep_for(std::chrono::seconds(1)); // 等待1秒
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@ -83,7 +83,7 @@ SG_APISHARED_EXPORT const char* sg_beltTearingVersion(void);
|
|||||||
|
|
||||||
SG_APISHARED_EXPORT void sg_detectBeltTearing(
|
SG_APISHARED_EXPORT void sg_detectBeltTearing(
|
||||||
SVzNL3DLaserLine* laser3DPoints, //一条扫描线
|
SVzNL3DLaserLine* laser3DPoints, //一条扫描线
|
||||||
int lineIdx,
|
unsigned long long lineIdx,
|
||||||
int nPointCount, //每条扫描线的点数量。当采用Grid数据格式时,每条扫描线的点的数量是相同的。必须使用Grid格式
|
int nPointCount, //每条扫描线的点数量。当采用Grid数据格式时,每条扫描线的点的数量是相同的。必须使用Grid格式
|
||||||
int* errCode,
|
int* errCode,
|
||||||
std::vector<SSG_hLineProInfo>& hLineWorkers,
|
std::vector<SSG_hLineProInfo>& hLineWorkers,
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user