public static LinearFilter createF(int i, ColorChannel... channels) {
        if (i < 1 || i > 4)
            throw new IllegalArgumentException("N�o h� filtros para o valor de i=" + i);

        if (i == 1)
            return new LinearFilter(DoubleMatrix.createAverages(3, 3,
                    0, 1, 0,
                    1, 1, 1,
                    0, 1, 0), channels);
        if (i == 2)
            return new LinearFilter(DoubleMatrix.createAverages(3, 3,
                    1, 1, 1,
                    1, 1, 1,
                    1, 1, 1), channels);
        if (i == 3)
            return new LinearFilter(DoubleMatrix.createAverages(3, 3,
                    1, 1, 1,
                    1, 2, 1,
                    1, 1, 1));

        return new LinearFilter(DoubleMatrix.createAverages(3, 3,
                1, 2, 1,
                2, 4, 2,
                1, 2, 1), channels);

    }