From 445d6fc37cc8e82a1228ba41030ed0bc89df0d6b Mon Sep 17 00:00:00 2001 From: zjc-zjc-123 <1714105370@qq.com> Date: Thu, 21 Nov 2024 21:17:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=AE=9A=E4=B9=89=E5=A4=9A?= =?UTF-8?q?=E4=B8=AA=E6=A8=A1=E6=9D=BF=E6=97=B6=E7=9A=84bug=EF=BC=88?= =?UTF-8?q?=E5=89=8D=E9=9D=A2=E5=9B=BE=E7=89=87=E7=BB=98=E5=88=B6=E7=9A=84?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E5=8C=BA=E5=9F=9F=E4=BC=9A=E4=BF=9D=E7=95=99?= =?UTF-8?q?=E5=9C=A8=E5=90=8E=E9=9D=A2=E7=9A=84=E5=9B=BE=E7=89=87=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Matrox/template_matching.cpp | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/Matrox/template_matching.cpp b/src/Matrox/template_matching.cpp index a75e9d1..dd3077b 100644 --- a/src/Matrox/template_matching.cpp +++ b/src/Matrox/template_matching.cpp @@ -63,6 +63,7 @@ void TemplateMatcher::loadTemplates(const std::vector& template_pat // Define templates for (size_t i = 0; i < template_paths.size(); ++i) { MIL_ID template_temporary; + MgraClear(M_DEFAULT, GraphicList); MbufRestore(convert_to_wstring(ModelImgPaths[i]).c_str(), MilSystem, &template_temporary); MIL_ID template_temporary_uint8 = convert_to_uint8(template_temporary); if (this->param["isdisplay"] == 1) @@ -176,13 +177,15 @@ void TemplateMatcher::LoadTemplate(TemplateMatcher& matcher, std::map兼容 // 配置文件当中加入是否显示参数,能调控加载模板的过程是否显示。已 //TODO: 3修改当前的代码使模板匹配不出错 已 -//TODO: 4成立模板文件夹,能够加载文件夹下的全部模板并实现检测 +//TODO: 4成立模板文件夹,能够加载文件夹下的全部模板并实现检测 已 //TODO: 5制作标准结构的函数,例如:matcher.findModels(MIL_ID inputImage, MIL_ID output_image, map); -//TODO: 6完善相应部分的手册 +////未实现,因为加载和寻找分开后,要对加载和寻找函数传入类成员,无法统一,其余可用到的参数统一,加一个类成员即可。 +//TODO: 6完善相应部分的手册 已