From 913c2f4f74d58617a9e23e63da0094295b722c8b Mon Sep 17 00:00:00 2001
From: C3204 <zhengyabo@lanpucloud.cn>
Date: 星期四, 08 一月 2026 13:18:51 +0800
Subject: [PATCH] 增加IO触发相机获取图像后自动触发对应的检测流程以及Log记录。
---
LB_VisionProcesses/Alogrithms/BaseAlgorithm/TAlgorithmEdit.cs | 27 +++++++++------------------
1 files changed, 9 insertions(+), 18 deletions(-)
diff --git a/LB_VisionProcesses/Alogrithms/BaseAlgorithm/TAlgorithmEdit.cs b/LB_VisionProcesses/Alogrithms/BaseAlgorithm/TAlgorithmEdit.cs
index 6ded39b..b3701a6 100644
--- a/LB_VisionProcesses/Alogrithms/BaseAlgorithm/TAlgorithmEdit.cs
+++ b/LB_VisionProcesses/Alogrithms/BaseAlgorithm/TAlgorithmEdit.cs
@@ -53,36 +53,27 @@
get
{
if (Subject == null)
- {
return null;
- }
return Subject.InputImage;
}
set
{
Subject.InputImage = value;
- if (InputImage == null)
- {
- return;
- }
- if (InputImage is HImage)
- {
- inputImageHSmartWindowControl.ShowHoImage((HImage)value);
- }
+ if (InputImage == null)
+ return;
+
+ if (InputImage is HObject)
+ inputImageHSmartWindowControl.ShowHoImage((HObject)value);
else if (InputImage is Bitmap)
{
- using (HImage image = TAlgorithm.Bitmap2HImage((Bitmap)value))
- {
- inputImageHSmartWindowControl.ShowHoImage(image);
- }
+ TAlgorithm.Bitmap2HObject((Bitmap)value, out HObject image);
+ inputImageHSmartWindowControl.ShowHoImage(image);
}
else if (InputImage is Mat)
{
- using (HImage image = TAlgorithm.Mat2HImage((Mat)value))
- {
- inputImageHSmartWindowControl.ShowHoImage(image);
- }
+ TAlgorithm.Mat2HObject((Mat)value, out HObject image);
+ inputImageHSmartWindowControl.ShowHoImage(image);
}
}
}
--
Gitblit v1.9.3