Exemplo n.º 1
0
        public static List <Int32Rect> FindRectsAllThreshs(Bitmap[] bitmaps, List <Prefab.Point> points, int[] histogram)
        {
            RectangleFinder r = new RectangleFinder();

            r.FoundRects = new List <Int32Rect>();
            r.Points     = points;
            r.SetupBoundaryPoints();
            List <Int32Rect> foundRects = new List <Int32Rect>();

            for (int i = 0; i < 255; i += 1)
            {
                if (histogram[i] > 0)
                {
                    r.Bitmaps = r.CopyBitmaps(bitmaps);
                    r.Thresh  = i;

                    int x, y;
                    x       = r.FarthestLeftClick - 1;
                    y       = points[0].Y;
                    r.Start = new Prefab.Point(x, y);
                    AddUnique(r.FindRects(), foundRects);
                }
            }
            return(foundRects);
        }
Exemplo n.º 2
0
        public static List <Int32Rect> FindRects(Bitmap[] bitmaps, List <Prefab.Point> points)
        {
            RectangleFinder r = new RectangleFinder();

            r.FoundRects = new List <Int32Rect>();
            r.Bitmaps    = bitmaps;
            r.Points     = points;

            r.SetupBoundaryPoints();
            r.Thresh = 0;

            int x, y;

            x = r.FarthestLeftClick - 1;
            y = points[0].Y;

            r.Start = new Prefab.Point(x, y);
            return(r.FindRects());
        }
Exemplo n.º 3
0
        public static List<Int32Rect> FindRectsAllThreshs(Bitmap[] bitmaps, List<Prefab.Point> points, int[] histogram) {
            RectangleFinder r = new RectangleFinder();
            r.FoundRects = new List<Int32Rect>();
            r.Points = points;
            r.SetupBoundaryPoints();
            List<Int32Rect> foundRects = new List<Int32Rect>();
            for (int i = 0; i < 255; i += 1)
            {
                if (histogram[i] > 0)
                {
                    r.Bitmaps = r.CopyBitmaps(bitmaps);
                    r.Thresh = i;

                    int x, y;
                    x = r.FarthestLeftClick - 1;
                    y = points[0].Y;
                    r.Start = new Prefab.Point(x, y);
                    AddUnique(r.FindRects(), foundRects);
                }
            }
            return foundRects;
        }
Exemplo n.º 4
0
        public static List<Int32Rect> FindRects(Bitmap[] bitmaps, List<Prefab.Point> points)
        {
            RectangleFinder r = new RectangleFinder();
            r.FoundRects = new List<Int32Rect>();
            r.Bitmaps = bitmaps;
            r.Points = points;
            
            r.SetupBoundaryPoints();
            r.Thresh = 0;

            int x, y;
            x = r.FarthestLeftClick - 1;
            y = points[0].Y;

            r.Start = new Prefab.Point(x, y);
            return r.FindRects();
        }