On the basis of the research of periodic median algorithm, a new adaptive algorithm is present. The moving mask average with adaptive weight is conducted, which is based upon the gradient of phase. The less of the weight is corresponding to the larger gradient value so that the boundary of the fringe is not blurred. Additionally , the moving mask is small enough to maintain the continuities of the fringes. Comparing with existing approach for phase noise filtering , the effectiveness of the proposed approach is verified with the interferogram generated from ERS-1/2 InSAR data.