领胜LDS 键盘AOI检测项目
wells.liu
2020-07-16 e4225da44bf9052e517017c43fc60957d5484cff
src/Bro.Process/ProcessControl_Calibration.cs
@@ -40,13 +40,13 @@
                    _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];
@@ -100,14 +100,19 @@
            //}
            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);
@@ -125,7 +130,7 @@
                    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);