예제 #1
0
        public List <string> Cam_GetImageInfo()
        {
            string        CurCamPix   = "";
            List <string> ArrayCamPix = new List <string>();

            CurCamPix = ResultPosX.ToString("F3") + "," + ResultPosY.ToString("F3") + "," + ResultAngle.ToString("F3") + "," + ResultScore.ToString("F3");
            ArrayCamPix.Add(CurCamPix + ".");
            return(ArrayCamPix);
        }
예제 #2
0
        public bool Cam_MatchingModel()
        {
            bool Result;

            try
            {
                if (Cam_ModelType == "灰度匹配")
                {
                }
            }
            catch (Exception)
            {
                Xlabel.Text = "X:" + ResultPosX.ToString("F3");
                Ylabel.Text = "Y:" + ResultPosY.ToString("F3");
                Alabel.Text = "A:" + ResultAngle.ToString("F3");
                Slabel.Text = "S:" + ResultScore.ToString("F3");
                Result      = false;
            }

            //axCkvsModel1.RoiColor = Color.Blue;
            //axCkvsModel1.RoiLeft = Cam_RoiLeft;
            //axCkvsModel1.RoiTop = Cam_RoiTop;
            //axCkvsModel1.RoiRight = Cam_RoiRight;
            //axCkvsModel1.RoiBottom = Cam_RoiBottom;
            //axCkvsDisplay1.AddRoi(axCkvsModel1.GetRoi());
            //axCkvsModel1.ClearResults();
            //ResultPosX = 0; ResultAngle = 0; ResultPosY = 0; ResultScore = 0;
            //axCkvsModel1.Execute(axCkvsDisplay1.GetImage());
            //if (axCkvsModel1.GetMatchCount() > 0)
            //{
            //    ResultPosX = axCkvsModel1.GetMatchPositionX(0);
            //    ResultPosY = axCkvsModel1.GetMatchPositionY(0);
            //    ResultAngle = axCkvsModel1.GetMatchAngle(0);
            //    ResultScore = axCkvsModel1.GetMatchScore(0);

            //    Xlabel.Text = "X:" + ResultPosX.ToString("F3");
            //    Ylabel.Text = "Y:" + ResultPosY.ToString("F3");
            //    Alabel.Text = "A:" + ResultAngle.ToString("F3");
            //    Slabel.Text = "S:" + ResultScore.ToString("F3");
            //    Result = true;
            //}
            //else
            //{
            //    Xlabel.Text = "X:" + ResultPosX.ToString("F3");
            //    Ylabel.Text = "Y:" + ResultPosY.ToString("F3");
            //    Alabel.Text = "A:" + ResultAngle.ToString("F3");
            //    Slabel.Text = "S:" + ResultScore.ToString("F3");
            //    Result = false;
            //}

            return(false);
        }