| | |
| | | _frmCalibration_9P.ShowDialog(); |
| | | }); |
| | | |
| | | return (int)PLCReplyValue.NG; |
| | | return (int)ReplyValue.NG; |
| | | } |
| | | |
| | | if (config.InputPara[0] <= 0 || config.InputPara[0] > config.Results.Count) |
| | | { |
| | | config.InputPara = null; |
| | | return (int)PLCReplyValue.IGNORE; |
| | | return (int)ReplyValue.IGNORE; |
| | | } |
| | | |
| | | int sequence = config.InputPara[0]; |
| | |
| | | //} |
| | | |
| | | config.InputPara = null; |
| | | return (int)PLCReplyValue.OK; |
| | | return (int)ReplyValue.OK; |
| | | } |
| | | |
| | | public void GetCalibrationPoints(CameraBase camera, CalibrationConfig config, string methodName, int sequence) |
| | | { |
| | | //string imgSetId = ""; |
| | | List<IShapeElement> pointList = new List<IShapeElement>(); |
| | | using (HObject hImage = CollectHImage(camera, config.CameraOpConfig, out string imgSetId)) |
| | | |
| | | IImageSet set = CollectHImage(camera, config.CameraOpConfig); |
| | | if (set == null) |
| | | return; |
| | | |
| | | using (HObject hImage = set.HImage) |
| | | { |
| | | var tool = GetHalconTool(config.CameraOpConfig); |
| | | |
| | |
| | | pointList.Add(new PointIndicator((float)xList[i], (float)yList[i])); |
| | | } |
| | | |
| | | camera.SaveFitImage(pointList, imgSetId); |
| | | camera.SaveFitImage(pointList, set.Id); |
| | | } |
| | | |
| | | config.Results[sequence - 1].ImageMarkPoint = new CustomizedPoint((pointList[0] as PointIndicator).Center); |