Esempio n. 1
0
        public TestImage(GreyPixbuf Image, double Weight, bool Valid)
        {
            this.Image = new IntegralImage(Image);

            this.Derivation = this.Image.GetDeviation();

            this.Weight = Weight;
            this.Valid = Valid;
        }
Esempio n. 2
0
        public IntegralImage(GreyPixbuf Image, Func<byte, long> Type)
        {
            this.Width = Image.Width;
            this.Height = Image.Width;

            this.Image = Image;

            this.Table = new long[this.Height, this.Width];

            this.Type = Type;

            this.ComputeIntegralImage();
        }
        /// <summary>
        /// Charge l'ensemble des images d'un dossier de test.
        /// </summary>
        private static GreyPixbuf[] LoadImages(string Dir)
        {
            string[] filenames = Directory.GetFiles(Dir);

            var images = new GreyPixbuf[filenames.Length];

            Parallel.For(0, filenames.Length, (i) => {
                images[i] = LoadImage(filenames[i]);
            });
            return images;
        }
Esempio n. 4
0
        public Detector(GreyPixbuf Image, StrongClassifier Classifier)
            : this(new IntegralImage(Image), new IntegralImage(Image, (pix) => (long) pix * pix),
			       Classifier)
        {
        }
Esempio n. 5
0
 public IntegralImage(GreyPixbuf Image)
     : this(Image, (pix) => pix)
 {
 }