Пример #1
0
        public int[,] Filter(int[,] pixels, ConvolutionMatrix matrix)
        {
            FilterBase filter = new ConvolutionFilter() { Matrix = matrix };
            int[,] result = filter.Execute(pixels);

            return result;
        }
Пример #2
0
        public int[,] ApplySmooth(int[,] pixels, double weight = 2)
        {
            ConvolutionMatrix matrix = new ConvolutionMatrix(3);
            matrix.SetAll(1);
            matrix.Matrix[1, 1] = weight;
            matrix.Factor = weight + 8;

            FilterBase filter = new ConvolutionFilter() { Matrix = matrix };
            int[,] result = filter.Execute(pixels);

            return result;
        }