A wide-field surveillance system with a long exposure time has a stronger detectability for dim space targets. However, with the increase in exposure time and working temperature, complex non-uniform background noise containing hot pixels of the detector cannot be ignored, seriously affecting the background and imaging quality. This article studies and proposes a high-performance denoising method, which does not use any prior knowledge of the target and can automatically remove noise from the image. This method is based on an improved total variation model to remove hot pixels and other background mixed noise in widefield system images. Firstly, using the idea of the traditional local contrast method (LCM), we utilize the significant difference in grayscale values between contaminated pixels and neighboring pixels to detect impulse noise, such as the hot pixels in the image. And then, we designed an improved adaptive maximum filtering algorithm to remove unwanted contamination, which protected target information from being lost and optimized pixels that were attacked by impulse noise. Finally, the total variation algorithm is used to eliminate residual background noise, the detector's readout noise, and non-uniform response. The method proposed in this article can effectively filter out hot pixels and non-uniform background noise while preserving the details of target edges. We conducted experiments on a large number of simulated and original images. For star maps captured in long exposure mode, the method proposed in this article has obvious advantages over several competing algorithms. The experimental results show that, compared to competitive algorithms, the algorithm proposed in this article improves PSNR by at least 13.1%, SSIM by at least 0.4%, IEF by at least 5 times, and IQI by at least 9.2%. At the same time, the algorithm in this article achieved a moderate level of computation time.INDEX TERMS wide-field surveillance system; long exposure time; non-uniform correction; local contrast method; maximum filter; total variation