This document proposes a new dual threshold median filter called Dual Threshold Median Filter (DTMF) for removing random valued impulse noise from digital images while preserving edges. The algorithm has two main stages: noise detection and noise removal. In the detection stage, the maximum and minimum pixel values in a 3x3 window are used to classify the central pixel as noisy or noise-free. Noisy pixels are then replaced in the removal stage using median filtering. The proposed filter is tested on standard images like Lena and Mandrill corrupted with 3-99% random valued impulse noise. Results show it achieves better peak signal-to-noise ratios and lower mean squared errors than previous methods, especially at high noise densities, indicating it effectively