As the acoustic images are low-quality, it is difficult to use these images for scientific research and practical applications directly. Although the PSNR of sonar images were improved through existing methods, denoised images were lack of clarity so that the outline of objects and details had not been better preserved. Subsequently, this impacted accuracy of target detection. In this paper, we propose a collaborative tracking algorithm based on Mean-Shift and reference-template-based matching (RTM). We construct a set of underwater security monitoring sonar system and carry out our experiment in Huangpu River. The algorithm represented in this paper can effectively improve the signal noise ratio of the sonar image, an increase strength of about 3 ~ 4db. Target tracking satisfies the real-time requirements, which shows our method is effective.