This paper presents an effective method to detect small and dim infrared image target under complex background, which is performed in spatial domain. Roughly speaking, the new method contains two steps. The first step is further divided into two steps (called difference between maximum and minimum filters, DMMFs): firstly, an original image is filtered by maximum (max) and minimum (min) filters based on the considering max filter can enhance the target and preserve the background while min filter can eliminate the target and also preserve the background; and then the difference between these two results is obtained, therefore the target is enhanced and its background is suppressed at the same time. To obtain an accurate location of the target, the second step called post processing involves local feature mapping and projecting techniques. This DMMF method focuses on reducing the cost of computation, tracking the target in real-time, enhancing the SNR, and suppressing its background clutter. The simulation results show that the proposed algorithm is effective and practical.