public TestImage(GreyPixbuf Image, double Weight, bool Valid) { this.Image = new IntegralImage(Image); this.Derivation = this.Image.GetDeviation(); this.Weight = Weight; this.Valid = Valid; }
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; }
public Detector(GreyPixbuf Image, StrongClassifier Classifier) : this(new IntegralImage(Image), new IntegralImage(Image, (pix) => (long) pix * pix), Classifier) { }
public IntegralImage(GreyPixbuf Image) : this(Image, (pix) => pix) { }