The invention discloses an
image segmentation algorithm based on a novel electromagnetic
storm algorithm, and aims to solve the problems that an existing method is prone to
local optimum, depends on experience to adjust parameters, needs a large amount of
labeled data or is poor in robustness. According to the
algorithm, an original image is preprocessed, an
RGB image is converted into a grey-scale image, local contrast is calculated after bilateral filtering, denoising and edge preserving, and a three-dimensional feature
histogram fusing the original gray scale, the filtering gray scale and the local contrast is constructed. Then, taking the three-dimensional Shannon entropy as a target function, converting segmentation into an
optimization problem of optimal threshold combination search, and performing interplanetary
magnetic field factor
population generation, opposite learning and elite file construction initialization; and in the main cycle, precise optimization is realized through adaptive
weight control magnetoelectric spiral local search,
magnetic layer top
current sheet global exploration and a
particle collision strategy, and finally, an optimal threshold value is output and a segmentation result is generated.