@@ -0,0 +1,1375 @@
+/**%0A * Created by dongyi.kim on 2017-06-07.%0A */%0Apublic class HuangsFilter extends MedianFilter %7B%0A%0A    public HuangsFilter(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 h = m.length;%0A        int w = m%5B0%5D.length;%0A        int r = mKernelSize/2;%0A        int medianIndex = mKernelSize * mKernelSize / 2;%0A%0A        for(int ic=r; ic+r %3C h; ic++)%7B%0A            int%5B%5D cnt = new int%5B256%5D;%0A            for(int j = 0 ; j %3C w ; j++)%7B%0A                for(int i = ic - r  ; i %3C= ic + r; i ++)%7B%0A                    int color = m%5Bi%5D%5Bj%5D;%0A                    cnt%5Bcolor%5D ++;%0A                    if( j %3E= mKernelSize)%7B%0A                        int colorToRemove = m%5Bi%5D%5Bj-mKernelSize%5D;%0A                        cnt%5BcolorToRemove%5D --;%0A                    %7D%0A                %7D%0A%0A                if( j %3E= mKernelSize -1  )%7B%0A                    int x = j - mKernelSize + 1;%0A                    int y = ic - r;%0A                    int before = 0;%0A                    for(int cw = 0; cw %3C= 255; cw++)%7B%0A                        before += cnt%5Bcw%5D;%0A                        if(before %3E= medianIndex)%7B%0A                            X%5By%5D%5Bx%5D = cw;%0A                            break;%0A                        %7D%0A                    %7D%0A                %7D%0A%0A            %7D%0A        %7D%0A        return X;%0A    %7D%0A%7D%0A

Create HuangsFilter.java