Phase-stepped interferometry is a well known technique for the measurement of surface deformation. Since in this technique phase characteristics of a linear system is computed using the arctangent function, in some points the raw phase data exceeds the value 2?. Moreover the surface roughness, phase unwrapping, and extra noise imposed from the environment makes the surface look like an original surface with huge impulsive noise and simply using PSI technique does not produce an accurately reconstructed surface. In this paper, a filtering technique is proposed that suppresses the noise and enhances the image quality. It is shown that the raw phase data prefiltered by a mean filter eliminates Gaussian noise. Then, after proper unwrapping treatment, the data should be filtered with a rank conditioned median (RCM) filter. The RCM filter is very effective at treating impulsive type noise while preserving step edges without blurring.