Esempio n. 1
0
 static void CenterImages()
 {
     for (int img = 0; img < Variables.TrainPhotos; img++)
     {
         Arr[img] = new Bitmap(@Path + (img + 1) + ".jpg");
         Arr[img] = Centering.HorizontallyCenteredPhoto(Arr[img]);
     }
 }
Esempio n. 2
0
        static void CenterChsnImgAndConvertToVect()
        {
            Bitmap Img = new Bitmap(Variables.ChoosenPhoto);

            Img = Centering.HorizontallyCenteredPhoto(Img);

            Variables.ChoosenCentered = new Bitmap(Img);

            ChoosenVector = new int[1, 16384];

            int x = 0, y = 0;

            for (int pxl = 0; pxl < 16384; pxl++)
            {
                if (x > 127)
                {
                    x = 0; y++;
                }

                ChoosenVector[0, pxl] = Img.GetPixel(x, y).R;

                x++;
            }
        }