Beispiel #1
0
        public void FilterZeroRadius()
        {
            var model = new int[, ] {
                { 1, 2 }, { 3, 4 }
            };
            var result   = Median.Filter(model, 0);
            var expected = new int[, ] {
                { 1, 2 }, { 3, 4 }
            };

            result.ShouldBeEquivalentTo(expected);
        }
Beispiel #2
0
        public void FilterWithRadius()
        {
            var model = new int[, ] {
                { 1, 2, 3 }, { 7, 8, 9 }, { 4, 5, 6 }
            };
            var result   = Median.Filter(model, 1);
            var expected = new int[, ] {
                { 7, 7, 8 }, { 5, 5, 6 }, { 7, 7, 8 }
            };

            result.ShouldBeEquivalentTo(expected);
        }