Ejemplo n.º 1
0
        private object MapGeometricMeanFilter(LispRuntimeCommand cmd, LispList list)
        {
            CheckParameterCount(cmd, list, 2);
            int c   = 1;
            var map = Run <Map>(list.items[c++]);
            var N   = Run <int>(list.items[c++]);

            if (N % 2 != 1)
            {
                throw new ArgumentOutOfRangeException("N must be odd for GeometricMeanFilter");
            }

            var alg    = new MapAlgorithms(Logger);
            var newMap = alg.GeometricMeanFilter(map, N);

            return(newMap);
        }