コード例 #1
0
ファイル: Program.cs プロジェクト: Feodoros/BelkaFaces
        private static IEnumerable <Matrix <RgbPixel> > JitterImage(Matrix <RgbPixel> img)
        {
            // All this function does is make 100 copies of img, all slightly jittered by being
            // zoomed, rotated, and translated a little bit differently. They are also randomly
            // mirrored left to right.
            var rnd = new Rand();

            var crops = new List <Matrix <RgbPixel> >();

            for (var i = 0; i < 100; ++i)
            {
                crops.Add(Dlib.JitterImage(img, rnd));
            }

            return(crops);
        }