A cascade of filtering windows is implemented iteratively for removing random-valued impulse noise in heavily corrupted images. This method is based on the peer group concept (PGC), so a pixel is considered as noise-free if and only if for each window size, there exists a peer group of certain threshold cardinality for it. Otherwise, the pixel is considered as noisy. In the restoration process, the corrupted pixels are restored by taking the mean value of the remaining good pixels in the filtering window. Extensive simulations demonstrate that the proposed method produces competitive results at low noise rates, but at high noise rates, it outperforms other state-of-the-art methods. This approach efficiently suppresses the impulse noise, shows a low computational complexity, and has an equal effect on both color and gray-level images.