| | |
| | | |
| | | 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) |
| | | { |
| | |
| | | default: |
| | | inputImageHSmartWindowControl.oRoi = null; |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | })); |
| | | } |
| | |
| | | |
| | | 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) |
| | | { |
| | |
| | | recordImageHSmartWindowControl.DispObj(objRecord.RecordObject_OK, true); |
| | | recordImageHSmartWindowControl.DispObj(objRecord.RecordObject_NG, false); |
| | | } |
| | | |
| | | } |
| | | } |
| | | GC.Collect(); |
| | | })); |
| | | } |
| | |
| | | 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: |
| | |
| | | default: |
| | | inputImageHSmartWindowControl.oRoi = null; |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | 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); |
| | |
| | | |
| | | inputImageHSmartWindowControl.DispObj(ho_Regions); |
| | | } |
| | | } |
| | | } |
| | | catch { } |
| | | })); |
| | | } |