A novel filter is proposed in this work to remove noise and preserve fine details from the impulse-corrupted images based on median and partition operation. Each pixel is classified into one of the mutually exclusive partition blocks by a novel observation vector. This observation vector can be directly used to partition the observation space without using predefined thresholds. The weight of each block is obtained using a learning approach based on the least-mean-square algorithm. The noise-filtering process is progressively applied through several iterations to achieve better noise-suppression results. Several experimental results have demonstrated that the proposed filter outperforms many filters in terms of both noise suppression and detail preservation.