seems like median filter doesn't work in java from Matlab