LPV 模板匹配耗时巨长:模板特征点过多

LanXin3D
zhou.mengjia 2 years ago
parent 7674b8fd2f
commit adbd8729c0

Binary file not shown.

Binary file not shown.

@ -99,6 +99,7 @@ bool CategoryMatcher::smokeMatch(const QString& typeNo, const ILImagePtr ilImgPt
ILMatchResultsPtr matchResultsPtr;
QList<int> keys = templateObj.uniqueKeys();
int templateLevel = keys.length();
qDebug() << "templateLevel = "<< templateLevel;
templateLevelAndvecMatchRltPtr.first = templateLevel;
for each (int level in keys)
{
@ -126,7 +127,16 @@ bool CategoryMatcher::smokeMatch(const QString& typeNo, const ILImagePtr ilImgPt
qDebug() << outStr;
continue;
}
m_ilmatchPtr->DetailLevel = 0.5;
m_ilmatchPtr->Learn(ilTemplatePtr, nullptr);
// 如果模板的特征点特别多,匹配时间会相当长,需要降低细节
ILPointsPtr featurePoints = m_ilmatchPtr->GetPatFeature();
if (featurePoints->Count()>3000)
{
m_ilmatchPtr->DetailLevel = 0.05;
m_ilmatchPtr->Learn(ilTemplatePtr, nullptr);
}
LPVErrorCode err = m_ilmatchPtr->Match(ilImgPtr, nullptr, &matchResultsPtr);
if (err != LPVErrorCode::LPVNoError) {
continue; // match failed

@ -2,13 +2,13 @@
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<QTDIR>D:\software\Qt\Qt5.9.4\5.9.4\msvc2017_64</QTDIR>
<QTDIR>C:\Qt\Qt5.9.4\5.9.4\msvc2017_64</QTDIR>
<LocalDebuggerCommand>$(OutDir)smokeBoxd.exe</LocalDebuggerCommand>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
<LocalDebuggerEnvironment>PATH=$(QTDIR)\bin%3b$(PATH)</LocalDebuggerEnvironment>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<QTDIR>D:\software\Qt\Qt5.9.4\5.9.4\msvc2017_64</QTDIR>
<QTDIR>C:\Qt\Qt5.9.4\5.9.4\msvc2017_64</QTDIR>
<LocalDebuggerCommand>$(OutDir)smokeBox.exe</LocalDebuggerCommand>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
<LocalDebuggerEnvironment>PATH=$(QTDIR)\bin%3b$(PATH)</LocalDebuggerEnvironment>

@ -2,13 +2,13 @@
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<QTDIR>C:\Qt\Qt5.9.4\5.9.4\msvc2017_64</QTDIR>
<QTDIR>D:\software\Qt\Qt5.9.4\5.9.4\msvc2017_64</QTDIR>
<LocalDebuggerCommand>$(OutDir)smokeBoxd.exe</LocalDebuggerCommand>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
<LocalDebuggerEnvironment>PATH=$(QTDIR)\bin%3b$(PATH)</LocalDebuggerEnvironment>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<QTDIR>C:\Qt\Qt5.9.4\5.9.4\msvc2017_64</QTDIR>
<QTDIR>D:\software\Qt\Qt5.9.4\5.9.4\msvc2017_64</QTDIR>
<LocalDebuggerCommand>$(OutDir)smokeBox.exe</LocalDebuggerCommand>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
<LocalDebuggerEnvironment>PATH=$(QTDIR)\bin%3b$(PATH)</LocalDebuggerEnvironment>

@ -5,13 +5,13 @@
Moc'ing ..\..\src\Camera.h...
Moc'ing ..\..\src\CameraControl.h...
Moc'ing ..\..\src\CategoryMatcher.h...
RCC: Warning: No resources in 'E:\Code\smokeboxidentification\tpvs17\SmokeBoxIdentification\SmokeBoxIdentification.qrc'.
Moc'ing ..\..\src\CodeScanStation.h...
Moc'ing ..\..\src\QNumTemplateBuild.h...
Moc'ing ..\..\src\SmokeBoxIdentification.h...
Moc'ing ..\..\src\NetControl.h...
Moc'ing ..\..\src\lpSerialStation.h...
Moc'ing ..\..\src\HikCamera.h...
RCC: Warning: No resources in 'E:\Code\smokeboxidentification\tpvs17\SmokeBoxIdentification\SmokeBoxIdentification.qrc'.
ADModule.cpp
e:\code\smokeboxidentification\src\numstatisticalgo\datapreprocessing.h(17): warning C4005: “TYPE_TEMPLATE_PATH”: 宏重定义
e:\code\smokeboxidentification\src\common\commondefine.h(25): note: 参见“TYPE_TEMPLATE_PATH”的前一个定义

@ -3,7 +3,7 @@
// e:\code\smokeboxidentification\tpvs17\smokeboxidentification\x64\release\lpvCore.tlh
//
// C++ source equivalent of Win32 type library c34b3e9e-6dea-4aa9-b500-0266f90dc15f
// compiler-generated file created 11/22/23 at 21:55:41 - DO NOT EDIT!
// compiler-generated file created 11/23/23 at 20:42:00 - DO NOT EDIT!
#pragma once
#pragma pack(push, 8)

@ -3,7 +3,7 @@
// e:\code\smokeboxidentification\tpvs17\smokeboxidentification\x64\release\lpvCore.tli
//
// Wrapper implementations for Win32 type library c34b3e9e-6dea-4aa9-b500-0266f90dc15f
// compiler-generated file created 11/22/23 at 21:55:41 - DO NOT EDIT!
// compiler-generated file created 11/23/23 at 20:42:00 - DO NOT EDIT!
#pragma once

@ -3,7 +3,7 @@
// e:\code\smokeboxidentification\tpvs17\smokeboxidentification\x64\release\lpvGeom.tlh
//
// C++ source equivalent of Win32 type library 8955aafb-4602-4d6a-a888-69d1437c4d2b
// compiler-generated file created 11/22/23 at 21:55:41 - DO NOT EDIT!
// compiler-generated file created 11/23/23 at 20:42:00 - DO NOT EDIT!
//
// Cross-referenced type libraries:

@ -3,7 +3,7 @@
// e:\code\smokeboxidentification\tpvs17\smokeboxidentification\x64\release\lpvGeom.tli
//
// Wrapper implementations for Win32 type library 8955aafb-4602-4d6a-a888-69d1437c4d2b
// compiler-generated file created 11/22/23 at 21:55:41 - DO NOT EDIT!
// compiler-generated file created 11/23/23 at 20:42:00 - DO NOT EDIT!
#pragma once

@ -3,7 +3,7 @@
// e:\code\smokeboxidentification\tpvs17\smokeboxidentification\x64\release\lpvGeomX.tlh
//
// C++ source equivalent of Win32 type library 02517f91-b197-4cd5-a1b5-92d1da6ca9ce
// compiler-generated file created 11/22/23 at 21:55:41 - DO NOT EDIT!
// compiler-generated file created 11/23/23 at 20:42:00 - DO NOT EDIT!
//
// Cross-referenced type libraries:

@ -3,7 +3,7 @@
// e:\code\smokeboxidentification\tpvs17\smokeboxidentification\x64\release\lpvGeomX.tli
//
// Wrapper implementations for Win32 type library 02517f91-b197-4cd5-a1b5-92d1da6ca9ce
// compiler-generated file created 11/22/23 at 21:55:41 - DO NOT EDIT!
// compiler-generated file created 11/23/23 at 20:42:00 - DO NOT EDIT!
#pragma once

@ -3,7 +3,7 @@
// e:\code\smokeboxidentification\tpvs17\smokeboxidentification\x64\release\lpvPat.tlh
//
// C++ source equivalent of Win32 type library 799860e5-cec7-4d65-9c62-a93320c0f60a
// compiler-generated file created 11/22/23 at 21:55:41 - DO NOT EDIT!
// compiler-generated file created 11/23/23 at 20:42:00 - DO NOT EDIT!
//
// Cross-referenced type libraries:

@ -3,7 +3,7 @@
// e:\code\smokeboxidentification\tpvs17\smokeboxidentification\x64\release\lpvPat.tli
//
// Wrapper implementations for Win32 type library 799860e5-cec7-4d65-9c62-a93320c0f60a
// compiler-generated file created 11/22/23 at 21:55:41 - DO NOT EDIT!
// compiler-generated file created 11/23/23 at 20:42:00 - DO NOT EDIT!
#pragma once

@ -1,3 +1,14 @@
e:\code\smokeboxidentification\tpvs17\smokeboxidentification\x64\release\smokeboxidentification.obj
e:\code\smokeboxidentification\tpvs17\smokeboxidentification\x64\release\qnumtemplatebuild.obj
e:\code\smokeboxidentification\tpvs17\smokeboxidentification\x64\release\netcontrol.obj
e:\code\smokeboxidentification\tpvs17\smokeboxidentification\x64\release\main.obj
e:\code\smokeboxidentification\tpvs17\smokeboxidentification\x64\release\lpserialstation.obj
e:\code\smokeboxidentification\tpvs17\smokeboxidentification\x64\release\hikcamera.obj
e:\code\smokeboxidentification\tpvs17\smokeboxidentification\x64\release\log.obj
e:\code\smokeboxidentification\tpvs17\smokeboxidentification\x64\release\codescanstation.obj
e:\code\smokeboxidentification\tpvs17\smokeboxidentification\x64\release\categorymatcher.obj
e:\code\smokeboxidentification\tpvs17\smokeboxidentification\x64\release\cameracontrol.obj
e:\code\smokeboxidentification\tpvs17\smokeboxidentification\x64\release\admodule.obj
e:\code\smokeboxidentification\tpvs17\smokeboxidentification\x64\release\moc_hikcamera.obj
e:\code\smokeboxidentification\tpvs17\smokeboxidentification\x64\release\moc_lpserialstation.obj
e:\code\smokeboxidentification\tpvs17\smokeboxidentification\x64\release\moc_netcontrol.obj
@ -9,19 +20,17 @@ e:\code\smokeboxidentification\tpvs17\smokeboxidentification\x64\release\moc_cam
e:\code\smokeboxidentification\tpvs17\smokeboxidentification\x64\release\moc_camera.obj
e:\code\smokeboxidentification\tpvs17\smokeboxidentification\x64\release\moc_admodule.obj
e:\code\smokeboxidentification\tpvs17\smokeboxidentification\x64\release\qrc_smokeboxidentification.obj
e:\code\smokeboxidentification\tpvs17\smokeboxidentification\x64\release\smokeboxidentification.obj
e:\code\smokeboxidentification\tpvs17\smokeboxidentification\x64\release\qnumtemplatebuild.obj
e:\code\smokeboxidentification\tpvs17\smokeboxidentification\x64\release\main.obj
e:\code\smokeboxidentification\tpvs17\smokeboxidentification\x64\release\admodule.obj
e:\code\smokeboxidentification\tpvs17\smokeboxidentification\x64\release\lpserialstation.obj
e:\code\smokeboxidentification\tpvs17\smokeboxidentification\x64\release\log.obj
e:\code\smokeboxidentification\tpvs17\smokeboxidentification\x64\release\netcontrol.obj
e:\code\smokeboxidentification\tpvs17\smokeboxidentification\x64\release\hikcamera.obj
e:\code\smokeboxidentification\tpvs17\smokeboxidentification\x64\release\codescanstation.obj
e:\code\smokeboxidentification\tpvs17\smokeboxidentification\x64\release\categorymatcher.obj
e:\code\smokeboxidentification\tpvs17\smokeboxidentification\x64\release\cameracontrol.obj
e:\code\smokeboxidentification\runner17\release\smokebox.exe
e:\code\smokeboxidentification\tpvs17\smokeboxidentification\.\generatedfiles\release\moc_admodule.cpp
e:\code\smokeboxidentification\tpvs17\smokeboxidentification\.\generatedfiles\release\moc_camera.cpp
e:\code\smokeboxidentification\tpvs17\smokeboxidentification\.\generatedfiles\release\moc_cameracontrol.cpp
e:\code\smokeboxidentification\tpvs17\smokeboxidentification\.\generatedfiles\release\moc_categorymatcher.cpp
e:\code\smokeboxidentification\tpvs17\smokeboxidentification\.\generatedfiles\release\moc_codescanstation.cpp
e:\code\smokeboxidentification\tpvs17\smokeboxidentification\.\generatedfiles\release\moc_qnumtemplatebuild.cpp
e:\code\smokeboxidentification\tpvs17\smokeboxidentification\.\generatedfiles\release\moc_smokeboxidentification.cpp
e:\code\smokeboxidentification\tpvs17\smokeboxidentification\.\generatedfiles\release\moc_netcontrol.cpp
e:\code\smokeboxidentification\tpvs17\smokeboxidentification\.\generatedfiles\release\moc_lpserialstation.cpp
e:\code\smokeboxidentification\tpvs17\smokeboxidentification\.\generatedfiles\release\moc_hikcamera.cpp
e:\code\smokeboxidentification\tpvs17\smokeboxidentification\.\generatedfiles\qrc_smokeboxidentification.cpp
e:\code\smokeboxidentification\tpvs17\smokeboxidentification\generatedfiles\ui_qnumtemplatebuild.h
e:\code\smokeboxidentification\tpvs17\smokeboxidentification\generatedfiles\ui_smokeboxidentification.h

@ -2,11 +2,11 @@
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<QTDIR>D:\software\Qt\Qt5.9.4\5.9.4\msvc2017_64</QTDIR>
<QTDIR>C:\Qt\Qt5.9.4\5.9.4\msvc2017_64</QTDIR>
<LocalDebuggerEnvironment>PATH=$(QTDIR)\bin%3b$(PATH)</LocalDebuggerEnvironment>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<QTDIR>D:\software\Qt\Qt5.9.4\5.9.4\msvc2017_64</QTDIR>
<QTDIR>C:\Qt\Qt5.9.4\5.9.4\msvc2017_64</QTDIR>
<LocalDebuggerEnvironment>PATH=$(QTDIR)\bin%3b$(PATH)</LocalDebuggerEnvironment>
</PropertyGroup>
</Project>

@ -2,11 +2,11 @@
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<QTDIR>C:\Qt\Qt5.9.4\5.9.4\msvc2017_64</QTDIR>
<QTDIR>D:\software\Qt\Qt5.9.4\5.9.4\msvc2017_64</QTDIR>
<LocalDebuggerEnvironment>PATH=$(QTDIR)\bin%3b$(PATH)</LocalDebuggerEnvironment>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<QTDIR>C:\Qt\Qt5.9.4\5.9.4\msvc2017_64</QTDIR>
<QTDIR>D:\software\Qt\Qt5.9.4\5.9.4\msvc2017_64</QTDIR>
<LocalDebuggerEnvironment>PATH=$(QTDIR)\bin%3b$(PATH)</LocalDebuggerEnvironment>
</PropertyGroup>
</Project>

@ -4,12 +4,12 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<QmlDebugSettings>file:$(ProjectGuid),block</QmlDebugSettings>
<QmlDebug>-qmljsdebugger=$(QmlDebugSettings)</QmlDebug>
<QTDIR>D:\software\Qt\Qt5.9.4\5.9.4\msvc2017_64</QTDIR>
<QTDIR>C:\Qt\Qt5.9.4\5.9.4\msvc2017_64</QTDIR>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
<LocalDebuggerEnvironment>PATH=$(QTDIR)\bin%3b$(PATH)</LocalDebuggerEnvironment>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<QTDIR>D:\software\Qt\Qt5.9.4\5.9.4\msvc2017_64</QTDIR>
<QTDIR>C:\Qt\Qt5.9.4\5.9.4\msvc2017_64</QTDIR>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
<LocalDebuggerEnvironment>PATH=$(QTDIR)\bin%3b$(PATH)</LocalDebuggerEnvironment>
</PropertyGroup>

@ -4,12 +4,12 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<QmlDebugSettings>file:$(ProjectGuid),block</QmlDebugSettings>
<QmlDebug>-qmljsdebugger=$(QmlDebugSettings)</QmlDebug>
<QTDIR>C:\Qt\Qt5.9.4\5.9.4\msvc2017_64</QTDIR>
<QTDIR>D:\software\Qt\Qt5.9.4\5.9.4\msvc2017_64</QTDIR>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
<LocalDebuggerEnvironment>PATH=$(QTDIR)\bin%3b$(PATH)</LocalDebuggerEnvironment>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<QTDIR>C:\Qt\Qt5.9.4\5.9.4\msvc2017_64</QTDIR>
<QTDIR>D:\software\Qt\Qt5.9.4\5.9.4\msvc2017_64</QTDIR>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
<LocalDebuggerEnvironment>PATH=$(QTDIR)\bin%3b$(PATH)</LocalDebuggerEnvironment>
</PropertyGroup>

Loading…
Cancel
Save