From 5ddadba291ea2d9dba78259973594a4664b94f57 Mon Sep 17 00:00:00 2001
From: C3032 <C3032@BC3032>
Date: 星期四, 08 一月 2026 16:45:35 +0800
Subject: [PATCH] 简化相机逻辑,支持手动数据处理

---
 LB_VisionProcesses/Alogrithms/BaseAlgorithm/TestTool/TestToolEdit.cs |   18 +++++++-----------
 1 files changed, 7 insertions(+), 11 deletions(-)

diff --git a/LB_VisionProcesses/Alogrithms/BaseAlgorithm/TestTool/TestToolEdit.cs b/LB_VisionProcesses/Alogrithms/BaseAlgorithm/TestTool/TestToolEdit.cs
index d8bccd0..a445945 100644
--- a/LB_VisionProcesses/Alogrithms/BaseAlgorithm/TestTool/TestToolEdit.cs
+++ b/LB_VisionProcesses/Alogrithms/BaseAlgorithm/TestTool/TestToolEdit.cs
@@ -89,7 +89,7 @@
                 stxtInput.Text = Subject.Params.Inputs["杈撳叆"].ToString();
 
                 if (Subject.InputImage != null && Subject.InputImage is HObject)
-                    inputImageHSmartWindowControl.ShowHoImage((HImage)Subject.InputImage);
+                    inputImageHSmartWindowControl.ShowHoImage((HObject)Subject.InputImage);
 
                 Type type = Subject.Params.ROI?.GetType();
                 if (Subject.Params.ROI != null)
@@ -179,21 +179,17 @@
                 {
                     if (Subject.OutputImage is Mat)
                     {
-                        using (HImage image = TAlgorithm.Mat2HImage((Mat)Subject.OutputImage))
-                        {
-                            recordImageHSmartWindowControl.ShowHoImage(image);
-                        }
+                        TAlgorithm.Mat2HObject((Mat)Subject.OutputImage, out HObject image);
+                        recordImageHSmartWindowControl.ShowHoImage(image);
                     }
                     else if (Subject.OutputImage is Bitmap)
                     {
-                        using (HImage image = TAlgorithm.Bitmap2HImage((Bitmap)Subject.OutputImage))
-                        {
-                            recordImageHSmartWindowControl.ShowHoImage(image);
-                        }
+                        TAlgorithm.Bitmap2HObject((Bitmap)Subject.OutputImage, out HObject image);
+                        recordImageHSmartWindowControl.ShowHoImage(image);
                     }
-                    else if (Subject.OutputImage is HImage)
+                    else if (Subject.OutputImage is HObject)
                     {
-                        recordImageHSmartWindowControl.ShowHoImage((HImage)Subject.OutputImage);
+                        recordImageHSmartWindowControl.ShowHoImage((HObject)Subject.OutputImage);
                     }
                 }
                 //鍏堝垽鏂瓙绫诲啀鍒ゆ柇鐖剁被

--
Gitblit v1.9.3