Пример #1
0
        public async Task SaveLayers()
        {
            Blur b  = new Blur();
            var  dr = new BallDrainageSimulator();

            var vl = new VisualLogger();

            var file   = "SavedFiles/rvrnw.bmp";
            var i      = Image.FromFile(file);
            var bitmap = new Bitmap(i);

            var layer = new LayerConverter().LoadLayer(bitmap);



            ILayer blured = new Layer2DObject(layer.Resolution);

            //b.Process(layer, blured, 3);
            blured = layer;
            vl.Log(blured, "base");
            var drainagemap = dr.GetDrainageMap(blured, 10);

            //logger shit
            drainagemap[0, 0] = 0;
            vl.Log(drainagemap, "drainage");
        }
Пример #2
0
        public async Task SaveLayers()
        {
            var file     = "SavedFiles/test.bmp";
            var i        = Image.FromFile(file);
            var bitmap   = new Bitmap(i);
            var conerted = new LayerConverter().LoadLayer(bitmap);

            var h  = new BasicHydraulicErosion();
            var vl = new VisualLogger();


            vl.Log(conerted, "baseNoEro");
            h.Erode(conerted, new HydroErosionParams()
            {
                Strenght = 50
            });
            vl.Log(conerted, "baseWithEro");
        }