In image segmentation, FCM clustering algorithm can not find the optimal initial clustering center and fall into local extremum, which leads to the decrease of image segmentation accuracy. The PSO algorithm has strong optimization ability, so a new method based on improved PSO algorithm is proposed to optimize the FCM clustering center selection. Firstly, the optimization performance of the PSO algorithm is improved. The distance difference between each particle and the optimal particle is calculated, and the maximum distance difference is selected. The ratio of the distance difference to the maximum distance difference and the aggregation degree of particles are used to construct the natural exponential function. This natural exponential function is used to improve the calculation method of inertia weight value of PSO algorithm, so that the farther the particle is away from the optimal position, the larger the inertia weight value it will get, the stronger the global search ability of particle; on the contrary, the smaller the inertia weight value, the stronger the local search ability of particle, so as to improve the optimization ability of PSO algorithm. The improved PSO algorithm is called DDPSO (Distance Difference PSO). Then the optimized FCM algorithm is applied to the segmentation of standard image and eggshell damaged image to improve the accuracy of image segmentation. Finally, the experimental results show that the FCM algorithm optimized by DDPSO has higher segmentation accuracy than the traditional method.