class seperation + median filter begin