Abstract:To solve the problem that traditional Canny edge detection requires manual threshold selection and can not effectively extract edge contour,an improved dung beetle optimization algorithm(DBO)is proposed to optimize the edge detection algorithm of Canny operator.Firstly,the image is denoised by fast guided filtering instead of traditional Gaussian filtering.Secondly,a 4-direction Sobel template is used to calculate the gradient amplitude and gradient direction of the image.Finally,the high and low thresholds are obtained adaptively by using the two-dimensional Otsu method optimized by dung beetle optimization algorithm.Aiming at the problem that the population diversity of the dung beetle optimization algorithm is not strong,this paper proposes to initialize the population by tent mapping.In order to improve the ability of the algorithm to jump out of the local optimum,the elite differential variation strategy is used to carry out variation disturbance on the optimal dung beetle.The experimental results show that in terms of edge accuracy and connectivity,the algorithm has a certain degree of improvement compared with the traditional Canny edge detection algorithm,which can effectively extract the edge contour of the image and improve the edge connectivity of Canny edge detection,which has certain practicality.