A depth map and a full focus image can be obtained by using the image sequence and the image evaluation function. The depth map obtained by gradient operator as the evaluation function has good resolution but is also affected by the deviation value. This kind of noise is different from common salt-and-pepper noise and Gaussian noise, so the median filter or mean filter cannot play a very good role. In order to improve the effect of 3D modeling, it is necessary to eliminate the deviation and retain and highlight the depth information. In this paper, an adaptive image enhancement method based on mode cooperative filtering is proposed. This method uses the general level of mode data to express the data, and uses the method of cooperative filtering to form the centralized balance and isolated deviation around the mode. Compared with other filters, the results show that it can achieve better results.