@@ -0,0 +1,1107 @@
+/**%0A * Created by dongyi.kim on 2017-06-07.%0A */%0Apublic class BruteforceFilter extends MedianFilter %7B%0A%0A    public BruteforceFilter(int kernelSize) %7B%0A        super(kernelSize);%0A    %7D%0A%0A    @Override%0A    public int%5B%5D%5B%5D filtering(int%5B%5D%5B%5D m) %7B%0A        int%5B%5D%5B%5D X = getEmptyOutputMatrix(m);%0A        int r = mKernelSize / 2;%0A        int h = m.length;%0A        int w = m%5B0%5D.length;%0A        int medianIndex = mKernelSize * mKernelSize / 2;%0A        for(int i = r; i + r %3C h ; i++ )%7B%0A            for(int j = r ; j + r %3C w ; j ++)%7B%0A                int%5B%5D cnt = new int%5B256%5D;%0A%0A                for(int y = i - r ; y %3C= i + r ; y ++)%7B%0A                    for(int x = j - r; x %3C= j + r ; x ++)%7B%0A                        cnt%5B m%5By%5D%5Bx%5D %5D ++;%0A                    %7D%0A                %7D%0A                int before = 0;%0A                for(int color = 0 ; color %3C= 255; color ++)%7B%0A                    before += cnt%5Bcolor%5D;%0A                    if(before %3E= medianIndex)%7B%0A                        X%5Bi-r%5D%5Bj-r%5D = color;%0A                        break;%0A                    %7D%0A                %7D%0A%0A            %7D%0A        %7D%0A        return X;%0A    %7D%0A%7D%0A

Create BruteForceFilter.java