Esempio n. 1
0
        public Image <Bgr, byte> GetFOVDiagram(Size FOV, int IndexHightLight)
        {
            List <Point> anchors = new List <Point>();

            for (int i = 0; i < this.FOVs.Count; i++)
            {
                anchors.Add(this.FOVs[i].Anchor);
            }
            Image <Bgr, byte> img = Fov.GetFOVDiagram(this.ProcessingGerberImage, anchors.ToArray(), FOV, IndexHightLight);

            img.ROI = this.ROI;
            return(img);
        }
Esempio n. 2
0
        public static List <Fov> GetFov(string ID, Image <Gray, byte> ImgGerber, Rectangle ROI, Size FOV, SPI_AOI.Utils.StartPoint StartPoint)
        {
            List <Fov> fovs = new List <Fov>();

            Point[] anchors = SPI_AOI.Utils.FOVOptimize.GetAnchorsFOV(ImgGerber, ROI, FOV, StartPoint);
            for (int i = 0; i < anchors.Length; i++)
            {
                Fov fov = new Fov();
                fov.ID       = ID;
                fov.NO       = i;
                fov.Anchor   = anchors[i];
                fov.ROI      = new Rectangle(mParam.IMAGE_SIZE.Width / 2 - FOV.Width / 2, mParam.IMAGE_SIZE.Height / 2 - FOV.Height / 2, FOV.Width, FOV.Height);
                fov.PadItems = new List <int>();
                fovs.Add(fov);
            }
            return(fovs);
        }
Esempio n. 3
0
 public void UpdateFOV(Size FOV)
 {
     using (Image <Gray, byte> searchFOVImage = new Image <Gray, byte>(ProcessingGerberImage.Size))
         using (VectorOfVectorOfPoint contours = new VectorOfVectorOfPoint())
         {
             for (int i = 0; i < this.PadItems.Count; i++)
             {
                 if (!this.MarkPoint.PadMark.Contains(i) && this.PadItems[i].Enable)
                 {
                     using (VectorOfPoint cnt = new VectorOfPoint(this.PadItems[i].Contour))
                     {
                         contours.Push(cnt);
                     }
                 }
             }
             CvInvoke.DrawContours(searchFOVImage, contours, -1, new MCvScalar(255), -1);
             this.FOVs = Fov.GetFov(this.GerberID, searchFOVImage, this.ROI, FOV, this.StartPoint);
         }
 }