Images are often corrupted by impulse noise due to transmission errors, malfunctioning pixel elements in camera sensors, faulty memory locations in the imaging process. This paper proposes a two-phase method for impulse noise. In the first phase, a suitable noise is applied to identify the image pixels contaminated by noise. Then, in the second phase, based upon the information on the location of noise-free pixels, images are recovered by using a structure decomposition denoising method. In order to solve the denoising model, split bregman iteration combined with alternating minimization algorithm is utilized. Numerical results demonstrate that the proposed method is a significantly advance over several state-of-the-art techniques on restoration performance.