| | |
| | | using LB_VisionProcesses.Processes.ScriptTool; |
| | | using OpenCvSharp; |
| | | using System.Collections.Concurrent; |
| | | using System.Windows.Media.Media3D; |
| | | |
| | | namespace LB_SmartVision.ProcessRun |
| | | { |
| | |
| | | if (dicContext.TryGetValue(ProcessName, out IProcess obj) |
| | | && obj is IProcess process) |
| | | { |
| | | process.InputImage = null; |
| | | //process.InputImage = null; |
| | | |
| | | if (process.InputImage != null) |
| | | { |
| | | if (process.InputImage is HObject) |
| | | ((HObject)process.InputImage).Dispose(); |
| | | else if (process.InputImage is Mat) |
| | | ((Mat)process.InputImage).Dispose(); |
| | | else if (process.InputImage is Bitmap) |
| | | ((Bitmap)process.InputImage).Dispose(); |
| | | |
| | | process.InputImage = null; |
| | | } |
| | | |
| | | if (process.OutputImage != null) |
| | | { |
| | | if (process.OutputImage is HObject) |
| | | ((HObject)process.OutputImage).Dispose(); |
| | | else if (process.OutputImage is Mat) |
| | | ((Mat)process.OutputImage).Dispose(); |
| | | else if (process.OutputImage is Bitmap) |
| | | ((Bitmap)process.OutputImage).Dispose(); |
| | | |
| | | process.OutputImage = null; |
| | | } |
| | | |
| | | if (process.Record != null) |
| | | { |
| | | process.Record.Dispose(); |
| | | process.Record = null; |
| | | } |
| | | UpdateInputs(process); |
| | | |
| | | // 不同节点跳过的方式不同 |