This paper proposes a new two-stage method for image denoising under salt-and-pepper noise based on a median-type noise detector and the edge-preserving surface estimation using statistical jump regression analysis. In the first stage, a median-type noise detector is used to detect the pixels that are likely to be corrupted by salt-and-pepper noise. In the second stage, the image is denoised by using edge-preserving statistical jump regression analysis based on the uncorrupted pixels. The experiments show that the proposed approach obtains better tradeoff between denoising performance and computational complexity.