The invention provides an
image segmentation method and device,
computer equipment and a storage medium, and belongs to the field of
image processing, and the method comprises the steps: obtaining a to-be-segmented target medical image, and determining a two-dimensional
histogram of the target medical image; representing the Renyi entropy of the target medical image through a plurality of gray threshold values in the two-dimensional
histogram; stepwise strengthening is introduced into the
bat algorithm, the exploration capability and the
algorithm development capability of the
bat algorithm are strengthened, and the improved
bat algorithm is obtained; taking maximization of the Renyi entropy as a target, and performing iterative optimization on the plurality of gray threshold values through an improved bat
algorithm to obtain an optimal threshold
value set; and segmenting the target medical
image based on the optimal threshold set to obtain a segmentation result. Therefore, the Renyi entropy is introduced to preliminarily quantify the quality of
image segmentation, the maximization of the Renyi entropy is taken as a target, iteration is carried out through the improved bat
algorithm, the optimal solution of the gray threshold is effectively found, and finally segmentation is carried out through the optimal solution, so that the segmented image provides better information retentivity and discrimination.