示例#1
0
        public void RightPosProcess(VisionImage visionImage, Bitmap bitmap)
        {
            switch (Config.Instance.CurrentProductType)
            {
            case "Special_Shape":
                RightPos.ProcessImage(visionImage, frmAAVision.RightOffset);
                break;

            case "Rectangle":
                RightPos.RectRightPos(visionImage, frmAAVision.RightOffset);
                break;

            default:
                break;
            }

            SendCmd = RightPos.RightCali;
            PosCheck_C(bitmap, frmAAVision.acq.hWindowControl1.HalconWindow, RightPos.RightCaliArrary);

            ClearOtherBmp();
            if (frmAAVision.acq.SaveImage)
            {
                SaveImage.SaveResult(frmAAVision.acq.hWindowControl1.HalconWindow, "C1");
            }
            ReceiveCmd = "";
        }
示例#2
0
        public static void TestBmp(Bitmap no_glue_bmp, Bitmap glue_bmp, HWindow hWindow, bool save)
        {
            Marking.GlueResult = action(no_glue_bmp, glue_bmp, hWindow);

            if (save)
            {
                SaveImage.Save(hWindow);
            }
        }
示例#3
0
        public static void TestBmp(Bitmap bmp, HWindow hWindow,
                                   Point3D <double> Needlepos, Point3D <double> CamPos, bool save)
        {
            double[] Res = action(bmp, hWindow, Needlepos, CamPos);

            Position.Instance.CCD2NeedleOffset.X = Res[0];
            Position.Instance.CCD2NeedleOffset.Y = Res[1];
            if (save)
            {
                SaveImage.Save(hWindow);
            }
        }
示例#4
0
 public static void TestBmp(Bitmap bmp, HWindow hWindow, bool save)
 {
     try
     {
         LastCenterLocateBMP = bmp;
         //double[] Res = action(bmp, hWindow);
         CenterMatch(bmp, hWindow);
         //Position.Instance.PCB2CCDOffset.X = Res[0];
         //Position.Instance.PCB2CCDOffset.Y = Res[1];
         if (save)
         {
             SaveImage.Save(hWindow);
         }
     }
     catch { }
 }
示例#5
0
        public void RightGlueCheck(VisionImage visionImage, Bitmap bitmap, double Comspec, double Markspec)
        {
            switch (Config.Instance.CurrentProductType)
            {
            case "Special_Shape":
                ShapeRightCheck(visionImage, bitmap, Comspec, Markspec);
                break;

            case "Rectangle":
                RectRightCheck(visionImage, bitmap, Comspec, Markspec);
                break;

            default:
                break;
            }

            log.Debug("处理流程结束!");
            if (frmAAVision.acq.SaveImage)
            {
                SaveImage.SaveResult(frmAAVision.acq.hWindowControl2.HalconWindow, "C2");
            }
            ReceiveCmd = "";
        }