Abstract:Aiming at the problems of complexity and minuteness of egg crack detection, the improved particle swarm optimization algorithm is proposed in order to improve the detection effect. Firstly, the inertia weight was adjusted with cosine function, having the large value in the early stage and small value in the later stage. Secondly, particle reverse learning was prevented from falling into the extreme value trap, and the optimization was improved efficiently. Thirdly, adaptive threshold was segmented the egg image, variable median filter window was removed the dark spots on the egg image surface, and incomplete Beta function was enhanced the image. Finally, the process was given. The experimental simulation shows that improved particle swarm optimization algorithm would detect the reticular crack and linear crack, and the edge of the cracks are clear, with correct detection rates of obvious linear and reticular cracks of 96.4% and 94.7%, and correct detection rates of non obvious linear and reticular cracks of 89.2% and 87.5%, respecitiveley which are higher than other algorithms.