C3204
2025-12-25 eb3e5c90006ab2b1b485000e7622941ff11a2b51
LB_VisionProcesses/Alogrithms/OpenCvSharp/FindLineTool/FindLineToolEdit.cs
@@ -144,10 +144,9 @@
                if (Subject.InputImage != null && Subject.InputImage is Mat)
                {
                    TAlgorithm.Mat2HObject((Mat)Subject.InputImage, out HObject image);
                    using (HImage image = TAlgorithm.Mat2HObject((Mat)Subject.InputImage))
                    {
                    inputImageHSmartWindowControl.ShowHoImage(image);
                }
                Type type = Subject.Params.ROI?.GetType();
                if (Subject.Params.ROI != null)
                {
@@ -199,6 +198,8 @@
                    default:
                        inputImageHSmartWindowControl.oRoi = null;
                        break;
                        }
                    }
                }
            }));
        }
@@ -258,11 +259,10 @@
                if (Subject.InputImage != null && Subject.InputImage is Mat)
                {
                    TAlgorithm.Mat2HObject((Mat)Subject.InputImage, out HObject image);
                    HOperatorSet.GetImageSize(image, out HTuple ho_ImageWidth, out HTuple ho_ImageHeight);
                    using (HImage image = TAlgorithm.Mat2HObject((Mat)Subject.InputImage))
                    {
                        image.GetImageSize(out HTuple ho_ImageWidth, out HTuple ho_ImageHeight);
                    recordImageHSmartWindowControl.ShowHoImage(image);
                }
                //先判断子类再判断父类
                if (Subject.Record != null && Subject.Record is MsgRecord msgRecord)
                {
@@ -278,7 +278,8 @@
                    recordImageHSmartWindowControl.DispObj(objRecord.RecordObject_OK, true);
                    recordImageHSmartWindowControl.DispObj(objRecord.RecordObject_NG, false);
                }
                    }
                }
                GC.Collect();
            }));
        }
@@ -345,9 +346,9 @@
                    HTuple hv_imageHeight = 0;
                    if (InputImage != null && InputImage is Mat)
                    {
                        TAlgorithm.Mat2HObject((Mat)InputImage, out HObject image);
                        HOperatorSet.GetImageSize(image, out hv_imageWidth, out hv_imageHeight);
                    }
                        using (HImage image=TAlgorithm.Mat2HObject((Mat)InputImage))
                        {
                            image.GetImageSize(out hv_imageWidth, out hv_imageHeight);
                    switch (type)
                    {
                        case RoiType.Rectangle2:
@@ -367,6 +368,8 @@
                        default:
                            inputImageHSmartWindowControl.oRoi = null;
                            break;
                            }
                        }
                    }
                }
            }
@@ -397,10 +400,9 @@
                    if (InputImage != null && InputImage is Mat)
                    {
                        TAlgorithm.Mat2HObject((Mat)InputImage, out HObject image);
                        using (HImage image = TAlgorithm.Mat2HObject((Mat)InputImage))
                        {
                        inputImageHSmartWindowControl.ShowHoImage(image);
                    }
                    int hv_Elements = Convert.ToInt16(itxtCaliperCount.Text);
                    double hv_DetectHeight = Convert.ToDouble(dtxtCaliperHeight.Text);
                    double hv_DetectWidth = Convert.ToDouble(dtxtCaliperWidth.Text);
@@ -417,6 +419,8 @@
                    inputImageHSmartWindowControl.DispObj(ho_Regions);
                }
                    }
                }
                catch { }
            }));
        }