In the course of routine bridge maintenance, edge detection allows the partial condition of the bridge to be viewed. However, many edge detection methods often have unsatisfactory performances when dealing with images with complex backgrounds. Moreover, the processing often involves the manual selection of thresholds, which can result in repeated testing and comparisons. To addresses these problems in this paper, the wavelet transform modulus maxima method is used to detect the target image, and then the threshold value of the image can be determined automatically according to the OTSU method to remove the pseudo-edges. Thus, the real image edges can be detected. The results show that the information entropy and SSIM of the detection results are the highest when compared with the commonly used Canny and Laplace algorithms, which means that the detection quality is optimal. To more fully illustrate the advantages of the algorithms, images with more complex backgrounds was detected, and the processing results of the algorithms in this paper are still optimal. In addition, the automatic selection of thresholds saves the operator's effort and improves the detection efficiency. Thanks to the combined use of the above two methods, detection quality and efficiency are significantly improved, which has a good application in engineering practice.