A new operator for the restoration of digital images corrupted by impulse noise is presented. The proposed operator is a simple recursive switching median filter guided by a neuro-fuzzy network functioning as an impulse detector. The internal parameters of the neuro-fuzzy impulse detector are adaptively optimized by training. The training is easily accomplished by using simple artificial images that can be generated in a computer. The most distinctive feature of the proposed operator over other operators is that it offers excellent detail- and texture-preservation performance, while effectively removing noise from the input image. Extensive experiments show that the proposed operator may be used for efficient restoration of digital images corrupted by impulse noise without distorting the useful information in the image.