Exemple #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);
        }
Exemple #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());
        }
Exemple #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;
        }
Exemple #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();
        }