Image segmentation method and device based on improved eagle optimization algorithm

By introducing expanded search and differential variation strategies into the Sky Eagle optimization algorithm, combined with local search behavior and optimization strategies, the local optimization problem of the Sky Eagle optimization algorithm in noise image data processing is solved, and a more efficient image segmentation effect is achieved.

CN120279034APending Publication Date: 2025-07-08WUHAN POLYTECHNIC UNIVERSITY
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202510284109.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-11
Publication Date
2025-07-08

AI Technical Summary

Technical Problem

When the existing Skyhawk optimization algorithm processes image data containing a lot of noise, there are problems such as insufficient global search capabilities and easy to fall into local optimality, resulting in poor image segmentation effect.

Method used

Introduce expanded search strategies and differential variation strategies to enhance global search capabilities. In the local search stage, Skyhawk's low-fly slow-drop and random motion behavior are adopted, and random reverse learning, T distribution variation and teaching and learning optimization strategies are combined to optimize population positions to jump out of the local optimal solution.

Benefits of technology

It improves the global search ability and stability of image segmentation, improves the convergence speed and segmentation effect of the algorithm, and enhances the overall efficiency of image segmentation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120279034A_ABST
    Figure CN120279034A_ABST
Patent Text Reader

Abstract

The invention discloses an image segmentation method and device based on an improved eagle optimization algorithm, and relates to the technical field of image segmentation, and the method comprises the steps: obtaining a to-be-segmented image, determining a color channel of the to-be-segmented image, and initializing the parameters of the eagle optimization algorithm to determine an initial optimal solution. In the global search stage, population positions are updated by using expanded search and differential variation strategies, the global exploration capability is enhanced, and local optimum is avoided. After iteration of the global search stage and the local search stage is completed, the population position is further optimized through random reverse learning, T distribution variation and teaching and learning optimization strategies, and the convergence speed and stability are improved. And finally, according to an optimization result, determining a segmentation threshold value of each color channel and completing image segmentation. Compared with the prior art, the method has the advantages that the image segmentation efficiency and precision are remarkably improved, the noise immunity is enhanced, the method is suitable for complex image processing, and the actual application requirement is met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of image segmentation, and in particular, to an image segmentation method and device based on an improved Aquila optimization algorithm. Background Art

[0002] Image segmentation, as a key step in digital image processing, is crucial in fields such as medical imaging and computer vision. Traditional multi-threshold segmentation methods are difficult to meet actual requirements due to complex calculations and susceptibility to noise, so optimization algorithms can be introduced to improve the efficiency of image segmentation.

[0003] The Aquila Optimizer (AO), as a new heuristic optimization algorithm, has strong exploration ability because it simulates the predation behavior of eagles in nature, and thus has been introduced into image segmentation. This algorithm finds the optimal solution by simulating the predation behavior in nature and is suitable for solving complex non-linear optimization problems.

[0004] However, although the Aquila optimization algorithm demonstrates image segmentation ability, it still has deficiencies in global search ability and jumping out of local optima, especially when dealing with image data containing a large amount of noise. Therefore, there is an urgent need for an optimization algorithm that can effectively jump out of local optima and ensure global search efficiency and stability. Summary of the Invention

[0005] The main purpose of this application is to provide an image segmentation method and device based on an improved Aquila optimization algorithm, aiming to solve the technical problem that the existing Aquila optimization algorithm performs poorly when dealing with image data containing a large amount of noise.

[0006] To achieve the above purpose, this application proposes an image segmentation method based on an improved Aquila optimization algorithm, and the image segmentation method based on the improved Aquila optimization algorithm includes:

[0007] Obtain the image to be segmented and determine the corresponding color channels of the image to be segmented;

[0008] Initialize parameters based on a preset Aquila optimization algorithm and determine the initial optimal solution according to the initial parameters;

[0009] In the global search stage, based on the initial optimal solution, update the initial population position by adopting an expanded search strategy and a differential mutation strategy to obtain the first population position;

[0010] In the local search stage, update the first population position according to the slow descent behavior of the eagle flying low and the random movement behavior of the eagle to obtain the second population position;

[0011] The second population position is updated by adopting a random reverse learning strategy, a T - distribution mutation strategy, and a teaching - learning - based optimization strategy, and the target individual position is determined according to the update result;

[0012] The segmentation thresholds corresponding to each of the color channels are determined according to the target individual position, and the image to be segmented is segmented based on each of the segmentation thresholds to obtain a segmented image.

[0013] In one embodiment, the step of updating the initial population position by adopting an expanding search strategy and a differential mutation strategy based on the initial optimal solution in the global search stage includes:

[0014] When the current iteration number satisfies the first global optimization condition, the initial population position is updated according to the initial optimal solution by adopting an expanding search strategy, where the expanding search strategy is a strategy for updating the population search range according to an extended search operator;

[0015] When the current iteration number satisfies the second global optimization condition, the initial population position is updated according to the initial optimal solution by adopting a differential mutation strategy, where the differential mutation strategy is a strategy for mutating the optimal individual according to a scaling factor.

[0016] In one embodiment, the expanding search strategy and the differential mutation strategy are implemented by a mathematical model. The mathematical model corresponding to the expanding search strategy is:

[0017]

[0018] In the formula, X best (t) is the current optimal individual, X rand (t) is a random individual, X i (t) is the original position of individual i at the t - th iteration, T max is the maximum number of iteration rounds;

[0019] The mathematical model corresponding to the differential mutation strategy is:

[0020] X2(t)=(X best (t)-X i (t))+F 2 ×(rand×(X a (t)-X i (t))+(X b (t)-X c (t)))

[0021] In the formula, F is the scaling factor, rand is a random number, X a (t) is the optimal individual in this round of iteration, X b(t) is the sub-optimal individual of this round of iteration, and Xc(t) is the second sub-optimal individual of this round of iteration.

[0022] In one embodiment, the step of updating the first population position according to the low-flying and slow-descending behavior of the eagle and the random movement behavior of the eagle to obtain the second population position includes:

[0023] When the current iteration number meets the first local optimization condition, update the first population position according to the mathematical model of the low-flying and slow-descending stage;

[0024] When the current iteration number meets the second local optimization condition, perform a secondary update on the updated first population position according to the mathematical model of the walking and catching prey stage to obtain the second population position.

[0025] In one embodiment, the mathematical model of the low-flying and slow-descending stage is:

[0026] X3 t+1 =(X b -X M t )×α - rand + ((UB - LB)×rand + LB)×δ

[0027] In the formula, X b is the current optimal solution, X M t is the average value of positions at the t-th iteration, rand is a random number, α and σ are adjustment parameters, UB is the upper limit of the search space, and LB is the lower limit of the search space;

[0028] Among them, the mathematical model of the walking and catching prey stage is:

[0029] X4 t+1 =QF×X b -G1×X i (t)×rand

[0030] In the formula, QF is the quality function, G1 is the individual movement mode, and Xi(t) is the position of individual i at the t-th iteration.

[0031] In one embodiment, the step of updating the second population position by using the random reverse learning strategy, the T-distribution mutation strategy, and the teaching and learning optimization strategy, and determining the target individual position according to the update result includes:

[0032] Respectively use the random reverse learning strategy, the T-distribution mutation strategy, and the teaching and learning optimization strategy to update the second population position;

[0033] Use the greedy algorithm to determine the target individual position from the updated second population position;

[0034] Among them, the random reverse learning strategy is a strategy for screening updated individuals according to opposing individuals, the T-distribution mutation strategy is a strategy for performing T-distribution mutation on updated individuals, and the teaching and learning optimization strategy is a strategy for guiding other individuals to learn and update according to the optimal individual.

[0035] In one embodiment, the random reverse learning strategy, the T-distribution mutation strategy, and the teaching and learning optimization strategy are implemented using mathematical models. The mathematical model corresponding to the random reverse learning strategy is:

[0036] X o (t) = lb + ub - rand × X i (t)

[0037] In the formula, X o (t) is the position of the new individual generated after iteration, which is the position of the opposing individual of X new (t), lb and ub are the upper and lower boundaries of the population search, rand is a random number, and X i (t) is the original position of individual i at the t-th iteration;

[0038] The mathematical model corresponding to the T-distribution mutation strategy is:

[0039]

[0040] In the formula, X t (t) is the position of the newly generated individual after the T-distribution mutation strategy, X best (t) is the current optimal individual, and t_disturb(3) represents that the degree of freedom of the distribution perturbation is 3;

[0041] The mathematical model corresponding to the teaching and learning optimization strategy is:

[0042]

[0043] In the formula, X rand (t) is a random individual, FX i (t) is the fitness value of the current iterative individual, and FX rand (t) is the fitness value of the random individual.

[0044] In one embodiment, the step of segmenting the image to be segmented based on each of the segmentation thresholds to obtain a segmented image includes:

[0045] Taking the symmetric cross-entropy as the objective function, and respectively determining the optimal threshold corresponding to each color channel based on each of the segmentation thresholds;

[0046] Apply the corresponding optimal threshold to each of the color channels for segmentation to generate a segmentation result image corresponding to each of the color channels;

[0047] Merge the segmentation result images to obtain a segmented image.

[0048] In one embodiment, the step of initializing parameters based on a preset Tianying optimization algorithm and determining an initial optimal solution according to the initial parameters includes:

[0049] Initialize the parameters corresponding to the preset Tianying optimization algorithm, where the parameters include: population size, spatial dimension, search boundary, and maximum number of iterations;

[0050] Determine the fitness value of individuals in the population according to the parameters, sort the individuals, and determine the initial optimal solution.

[0051] In addition, to achieve the above object, the present application also proposes an image segmentation device based on an improved Tianying optimization algorithm. The device includes: a memory, a processor, and an image segmentation program based on the improved Tianying optimization algorithm stored on the memory and executable on the processor. The image segmentation program based on the improved Tianying optimization algorithm is configured to implement the steps of the image segmentation method based on the improved Tianying optimization algorithm as described above.

[0052] The present application discloses an image segmentation method based on an improved Tianying optimization algorithm, including: obtaining an image to be segmented and determining each color channel corresponding to the image to be segmented; initializing parameters based on a preset Tianying optimization algorithm and determining an initial optimal solution according to the initial parameters; in the global search stage, based on the initial optimal solution, update the initial population position by adopting an extended search strategy and a differential mutation strategy to obtain a first population position; in the local search stage, update the first population position according to the Tianying low-flying and slow-descending behavior and the Tianying random movement behavior to obtain a second population position; update the second population position by adopting a random reverse learning strategy, a T-distribution mutation strategy, and a teaching and learning optimization strategy, and determine the target individual position according to the update result; determine the segmentation threshold corresponding to each color channel according to the target individual position, and segment the image to be segmented based on each segmentation threshold to obtain a segmented image. Since the present application introduces an extended search strategy and a differential mutation strategy in the global search stage of the Tianying optimization algorithm, the global search ability of the algorithm is enhanced, the solution space can be explored more effectively, and the algorithm can avoid falling into local optimal solutions; and by adopting a random reverse learning strategy, a T-distribution mutation strategy, and a teaching and learning optimization strategy, the iterative results in the global search stage and the local search stage are further optimized, thereby improving the convergence speed and stability of the algorithm, which is beneficial to improving the overall efficiency of image segmentation. Description of the Drawings

[0053] The accompanying drawings here are incorporated into the specification and form a part of this specification, showing embodiments consistent with this application, and are used together with the specification to explain the principles of this application.

[0054] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the accompanying drawings required for use in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0055] Figure 1 It is a schematic flowchart of the first embodiment of the image segmentation method based on the improved Tianying optimization algorithm of this application;

[0056] Figure 2 It is an example diagram of the original image and its grayscale histogram in the RGB channels;

[0057] Figure 3 It is a schematic flowchart of the second embodiment of the image segmentation method based on the improved Tianying optimization algorithm of this application;

[0058] Figure 4 It is a schematic flowchart of the third embodiment of the image segmentation method based on the improved Tianying optimization algorithm of this application;

[0059] Figure 5 It is a schematic flowchart of the entire process of the image segmentation method based on the improved Tianying optimization algorithm;

[0060] Figure 6 It is a schematic diagram of the results of PSNR, FSIM, and SSIM of the AO and TAO algorithms;

[0061] Figure 7 It is a schematic structural diagram of the image segmentation device based on the improved Tianying optimization algorithm of this application.

[0062] The realization of the purpose, functional features, and advantages of this application will be further described with reference to the embodiments and the accompanying drawings. Specific Embodiments

[0063] It should be understood that the specific embodiments described here are only used to explain the technical solutions of this application and are not used to limit this application.

[0064] It should be noted that the Aquila Optimizer (AO) is a heuristic algorithm that simulates the hunting foraging strategies and behaviors of Aquila eagles. During the actual hunting process, Aquila eagles will flexibly switch between four behaviors (soaring high in the sky, short gliding, slow descending in low flight, and walking to catch prey) according to the types of prey and environmental changes, in order to improve the hunting efficiency and success rate. Correspondingly, the AO algorithm simulates four processes: the soaring high in the sky stage (X1 stage), the short search stage (X2 stage), the slow descending in low flight stage (X3 stage), and the walking to catch prey stage (X4 stage) of Aquila eagles, which correspond to the global search mechanism and local search mechanism in the algorithm.

[0065] Due to its few parameters, simple structure and easy implementation, and the ability to continuously adjust its own position to find the optimal solution, the AO algorithm has been introduced into the field of image segmentation to find the optimal segmentation threshold. However, despite different strategies proposed by relevant scholars for improvement, the AO algorithm still has problems such as slow convergence speed, being easily affected by local optimal solutions, and insufficient performance in dealing with high-dimensional complex problems, which in turn affects the image segmentation effect.

[0066] Based on this, this application proposes an image segmentation method based on an improved Aquila Optimizer algorithm. In order to overcome the disadvantages of slow convergence speed and easy entrapment in local optima of AO, an enlarged search strategy is proposed in the global search stage to enhance the search range, and a differential mutation strategy is introduced to reduce the missed optimal solution due to too large a step size in the later stage of the Levy operator iteration. In addition, after the iteration of the global search stage and the local search stage is completed, a random reverse learning strategy, T-distribution mutation, and teaching and learning strategy are further introduced to generate new individual positions to assist the algorithm in jumping out of local optimal solutions. Thereby, the optimization performance of the AO algorithm is improved, and the image segmentation effect is further improved.

[0067] It should also be noted that the execution subject of this embodiment can be a computing electronic device with data processing, program running, and network communication functions, such as a personal computer, mobile phone, tablet computer, etc. It can also be other image processing devices that can achieve the same or similar functions. Here, an image segmentation device based on an improved Aquila Optimizer algorithm (abbreviated as "device") is selected as an example to specifically describe each embodiment of this application.

[0068] To better understand the technical solution of this application, the following will be described in detail in combination with the accompanying drawings of the specification and specific implementation manners.

[0069] The embodiment of this application provides a time synchronization method, refer to Figure 1 , Figure 1 is a schematic flowchart of the first embodiment of the time synchronization method of this application. In this embodiment, the method includes: steps S10 to S60:

[0070] Step S10: Obtain the image to be segmented and determine the corresponding color channels of the image to be segmented.

[0071] It should be understood that the image to be segmented can be the original image that needs to be segmented, usually a color image, which can contain multiple color channels. A color channel is a different component used to represent color information in an image.

[0072] In image processing, an image is usually stored in the form of a pixel matrix, and each pixel contains information of multiple color channels. Exemplarily, in the most common color image, i.e., an RGB image, the included color channels are the red channel, the green channel, and the blue channel.

[0073] In a specific implementation, the device can receive the original image from an external source (such as a storage device, a network, or user input), identify the red (R) channel, the green (G) channel, and the blue (B) channel from the original image, and simultaneously draw the grayscale histogram corresponding to the original image to determine whether there is a deviation of a certain color in the original image, so as to facilitate subsequent processing of each channel based on the segmentation threshold. Reference can be made here Figure 2 , Figure 2 for an example diagram of the original image and its grayscale histogram in the RGB channels. In Figure 2 it, the abscissa of the grayscale histogram is the gray level of the pixel points, and the ordinate is the number of pixel points with this gray level that appear.

[0074] Step S20: Initialize parameters based on the preset Tianying optimization algorithm, and determine the initial optimal solution according to the initial parameters.

[0075] It should be understood that in an optimization algorithm, parameter initialization is the first step of the algorithm running. For the Tianying optimization algorithm, the population size (i.e., the number of individuals in the population), the space dimension (usually consistent with the number of variables of the problem), the search boundary (i.e., the value range of each variable), and the maximum number of iterations (the maximum number of times the algorithm runs) can be set.

[0076] Among them, the population size determines the number of individuals in the algorithm, the space dimension corresponds to the number of color channels of the image, the search boundary is set according to the image gray value range, and the maximum number of iterations determines the running duration of the algorithm. Through parameter initialization, it can be ensured that the preset Tianying optimization algorithm can search within a reasonable range.

[0077] It should be noted that the initial optimal solution is the best solution corresponding to the initial state, usually the individual with the highest fitness in the initial population. Specifically, the fitness value of each individual in the initial population can be calculated, and the individuals can be sorted based on the fitness value, and the individual with the highest fitness is selected as the initial optimal solution.

[0078] In a specific implementation, first, the parameters corresponding to the preset Tianying optimization algorithm can be initialized. The parameters include: population size, spatial dimension, search boundary, and maximum number of iterations. Then, the fitness values of the individuals in the population are determined according to the parameters, and the individuals are sorted to determine the initial optimal solution.

[0079] Step S30: In the global search phase, based on the initial optimal solution, an enlarged search strategy and a differential mutation strategy are used to update the positions of the initial population, obtaining the first population positions.

[0080] It should be noted that the global search phase refers to the phase where the Tianying optimization algorithm conducts extensive exploration in the search space. Its purpose is to search for the global optimal solution by exploring the entire search space. The enlarged search strategy is a strategy to increase the global exploration ability by expanding the search range, and the differential mutation strategy is a strategy to increase the population diversity through mutation operations, usually used to avoid local optima.

[0081] In a specific implementation, in the global search phase, the preset Tianying optimization algorithm uses the enlarged search strategy to expand the search range and increase the global exploration ability. At the same time, the differential mutation strategy is used to perform mutation operations on the individuals in the population, increasing the population diversity and preventing the algorithm from falling into local optima. Through these two strategies, the algorithm can update the positions of the initial population, thus obtaining the first population positions.

[0082] Step S40: In the local search phase, the first population positions are updated according to the low-flying and slow-descending behavior of the Tianying and the random movement behavior of the Tianying, obtaining the second population positions.

[0083] It should be noted that the local search phase refers to the phase where the algorithm conducts fine-grained search in the search space, aiming to find a better solution near the already found solution. In the low-flying and slow-descending phase of the Tianying: after confirming the area where the prey is located, the Tianying will adopt a vertical descent method to launch a preliminary exploratory attack, and use low-altitude flight and slow descent to evaluate the reaction and state of the prey; in the walking and catching prey phase of the Tianying: when the Tianying approaches the prey, it will implement the attack through random movement behavior. At this time, the Tianying will no longer rely on high-altitude observation or fixed dive strategies, but adopt a more flexible and random movement method to approach the prey more precisely.

[0084] In a specific implementation, the mathematical models corresponding to the low-flying and slow-descending phase and the walking and catching prey phase in the original Tianying optimization algorithm can be used to update the first population positions in sequence, complete the iterative update of the population positions in the local search phase, and obtain the second population positions.

[0085] Step S50: The second population positions are updated using a random reverse learning strategy, a T-distribution mutation strategy, and a teaching and learning optimization strategy, and the target individual positions are determined according to the update results.

[0086] It should be noted that after the global search and local search iterations are completed, a random reverse learning strategy can be introduced to optimize the optimization performance of the algorithm. At the same time, the T-distribution mutation perturbation is used to assist the algorithm to jump out of the local optimum, and finally the teaching and learning algorithm is integrated to accelerate the algorithm convergence speed, and then the optimal individual is determined in the updated population.

[0087] Among them, the random reverse learning strategy is a strategy to increase the population diversity by generating opposite solutions. The T-distribution mutation strategy is a strategy to increase the diversity of the search space by introducing T-distribution perturbations. The teaching and learning optimization strategy is a strategy based on the principle of teaching and learning promoting each other, and guiding other individuals to learn and update according to the optimal individual to accelerate the algorithm convergence speed.

[0088] In the specific implementation, after each iteration of the global search and local search, the preset Tianying optimization algorithm uses the random reverse learning strategy to generate opposite solutions, increase the population diversity, use the T-distribution mutation strategy to introduce perturbations, increase the diversity of the search space, and use the teaching and learning optimization strategy to replace the optimal individual with a random individual to accelerate the algorithm convergence speed. Through these strategies, the algorithm can update the position of the first population, and finally determine the position of the target individual, which is the finally determined global optimal solution.

[0089] Step S60: Determine the segmentation threshold corresponding to each color channel according to the position of the target individual, and segment the image to be segmented based on each segmentation threshold to obtain a segmented image.

[0090] It should be understood that in image segmentation, the segmentation threshold is a key parameter for dividing an image into different regions. According to the position of the target individual, the device can determine the optimal threshold corresponding to each color channel, and thus segment the image to be segmented based on each optimal threshold.

[0091] It should also be noted that in order to improve the image segmentation effect, Kullback symmetric cross-entropy can be considered as the objective function to guide the image segmentation process. Based on Kullback symmetric cross-entropy is a measure to measure the difference between two probability distributions, and it is often used in image segmentation to evaluate the information difference between different gray-level intervals. Specifically, in image segmentation, the goal is to select a suitable threshold to minimize the symmetric cross-entropy between the probability distributions of the image before and after segmentation, so as to achieve the optimal segmentation effect. The principle is as follows:

[0092] By calculating the probability distribution of the image in different gray-level intervals, the entropy values of two parts of the region (foreground and background) can be obtained. The goal of Kullback symmetric cross-entropy is to measure the entropy difference between these two parts of the region. Assume that the size of an image is M×N, the total number of gray levels is L, and the color image is divided into n + 1 regions, then t1, t2,..., t n thresholds are required for segmentation. At this time, the total entropy value of each region is as follows in the mathematical formula:

[0093] H(t1, t2,…, t n ) = H0 + H1 +,…,+ H n

[0094] Where:

[0095] ...

[0097]

[0098] In the formula, H0, H1,...H n respectively represent the entropy values of each region, h i represents the frequency of the pixel points at the i-th gray level, and μ0(t), μ1(t),..., μ n-1 (t) represent the mean vectors of each region.

[0099] The mean vector in symmetric cross-entropy usually refers to the characteristic mean vector of a certain region in the image, which helps to describe the image distribution of different regions when calculating entropy and is usually related to the pixel values or other characteristic values (such as brightness, color, etc.) of the image. This mean vector helps to analyze the information difference between different regions (such as foreground and background) in the image. The mean vector corresponding to the entropy of each region of the segmented image mentioned above is as follows in the formula:

[0100] ...

[0102]

[0103] In the formula, i is the gray-level value, and P i is the number of pixel points with the gray level of i.

[0104] In the specific implementation, the device can first use symmetric cross-entropy as the objective function, and determine the optimal threshold corresponding to each color channel based on each segmentation threshold; then apply the corresponding optimal threshold to each color channel for segmentation to generate the segmentation result image corresponding to each color channel; finally, merge the segmentation result images of each color channel to obtain the segmented image and output it.

[0105] In this embodiment, an expanded search strategy and a differential mutation strategy are introduced in the global search stage of the Tianying optimization algorithm, thereby enhancing the global search ability of the algorithm, enabling more effective exploration of the solution space, and avoiding falling into local optimal solutions. The random reverse learning strategy, the T-distribution mutation strategy, and the teaching and learning optimization strategy are adopted to further optimize the iterative results in the global search stage and the local search stage, improve the convergence speed and stability of the algorithm, and thus enhance the overall efficiency of image segmentation.

[0106] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar content as in the above-mentioned first embodiment can be referred to the above introduction and will not be repeated hereinafter. On this basis, please refer to Figure 3 , Figure 3 which is a schematic flowchart of the second embodiment of the image segmentation method based on the improved Tianying optimization algorithm of the present application.

[0107] In this embodiment, in order to specifically illustrate the process of optimizing the algorithm by adopting the expanded search strategy and the differential mutation strategy in the global search stage, step S30 specifically includes: steps S301 to S302:

[0108] Step S301: When the current iteration number meets the first global optimization condition, the initial population position is updated according to the initial optimal solution, and the expanded search strategy is a strategy for updating the population search range according to the extended search operator.

[0109] It should be understood that the first global optimization condition can be preset according to the iteration progress or population diversity, and can be enabled in the initial stage of iteration. For example, it can be set as t < 2 / 3×T max and random < 0.5, where t is the current iteration number, random is a random number, and its value range is (0, 1). The initial population position is randomly initialized based on the initial optimal solution, and the initial population position contains several individuals, and each individual represents a set of possible segmentation thresholds.

[0110] It should be noted that in the X1 stage of the Tianying optimization algorithm, when the algorithm iteration number increases, the population gradually tends to develop in the same direction, and the algorithm adjusts the search space through the factor (1 - t / T), and the value range is between the interval (0, 1), while the population gradually updates its position in the same direction in the later stage of iteration, and it is difficult to get rid of the bondage of the search space.

[0111] Based on this, in this embodiment, an extended search strategy is introduced to update the population search range through an extended search operator, making the search range wider, thereby increasing the global exploration ability. The extended search strategy is as follows: extend the search operator to the range of (-1, 1), ensuring that the algorithm explores in a larger search space, maintaining population diversity, avoiding the population from updating in the same direction in the later stage of iteration, and reducing the possibility of population assimilation. At the same time, the individual position update in the X1 stage is too dependent on the average position and the optimal position, ignoring the influence of other individuals, and the individual differences gradually decrease, resulting in over-concentration of optimization.

[0112] Therefore, since the original mathematical model corresponding to the X1 stage is:

[0113]

[0114] In the formula, X1 t+1 is the position update solution after the (t + 1)-th iteration, X b is the current global optimal solution, T max is the maximum number of iteration rounds, X M t is the average position at the t-th iteration, rand is a random number between (0, 1), N is the population size, and D is the search dimension.

[0115] Then, for the original mathematical model corresponding to the above X1 stage, the mathematical model obtained after optimization using the extended search strategy is:

[0116]

[0117] In the formula, X best (t) is the current optimal individual, X rand (t) is a random individual, X i (t) is the original position of individual i at the t-th iteration, T max is the maximum number of iteration rounds.

[0118] It should be understood that through this improvement strategy, the range of the search operator can be controlled within (-1, 1), reducing the influence of the population average position and the optimal position, making the introduction of individual information more diverse and random, and no longer overly dependent on the influence of the population average position and the optimal position on individual position update, thereby improving the global search ability of the algorithm.

[0119] Step S302: When the current iteration number meets the second global optimization condition, update the initial population position according to the initial optimal solution using the differential mutation strategy, and the differential mutation strategy is a strategy for mutating the optimal individual according to the scaling factor.

[0120] It should be understood that the second global optimization condition can also be preset according to the iteration progress or population diversity, and can also be enabled at the initial stage of iteration. For example, it can be set as t < 2 / 3×T max and random ≥ 0.5.

[0121] It should be noted that in the X2 stage of the Tianying optimization algorithm, the position update depends on the optimal individual and the random individual, ignoring the search experience of the individual itself, lacking competition and communication among populations, which is extremely likely to lead to premature convergence of the algorithm. Moreover, the levy flight has a large step size in the later stage of iteration, thus losing the ability to develop potentially high-quality individuals, and is extremely likely to fall into a local optimal solution, resulting in the stagnation phenomenon of the algorithm.

[0122] Based on this, in this embodiment, a differential mutation strategy is introduced. This strategy generates a differential vector by selecting the optimal individual, the sub-optimal individual, and the sub-sub-optimal individual in the population to perform mutation operations on the optimal individual of each generation. Under the premise of ensuring that the current iterative individual is in the optimal position, it can not only improve the convergence speed of the algorithm, but also maintain a relatively high population diversity to a certain extent.

[0123] Therefore, since the original mathematical model corresponding to the X2 stage is:

[0124] X2 t+1 = X b ×levy(D) + X R t +(y - x)×rand

[0125]

[0126] In the formula, X2 t+1 is the position update solution after the (t + 1)-th iteration, levy(D) is the levy flight operator, X R t is the random solution within the population at the t-th iteration, s is a fixed value of 1.5, x and y are the spiral search shape parameters, r1 ∈ [1, 20], which is used to fix the number of search cycles, U = 0.00565, D1 is an integer between [1, D], and ω is a constant with a value of 0.005.

[0127] Then, for the original mathematical model corresponding to the above X2 stage, the mathematical model obtained after optimization using the differential mutation strategy is:

[0128] X2(t) = (X best (t) - X i (t)) + F 2 ×(rand×(X a (t) - X i (t)) + (X b (t) - X c(t)))

[0129] where F is a scaling factor used to control the mutation range; X a (t) is the optimal individual in this round of iteration, X b (t) is the sub-optimal individual in this round of iteration, and Xc(t) is the second sub-optimal individual in this round of iteration.

[0130] It should be understood that the mathematical model obtained after optimizing the differential mutation strategy shows that the global optimal individual X best (t) is used as a benchmark to guide the search process towards the known optimal solution region. By setting the determined target vector as the starting point of the differential vector, the algorithm maintains a certain directionality during the exploration process, that is, it tends to move towards the global optimal solution. At the same time, a random individual is introduced to maintain the randomness and diversity of the end point of the differential vector, preventing the algorithm from converging to the local optimal solution prematurely, enabling the algorithm to jump out of the current search space limit and explore a wider potential solution domain. The balance between determinacy and randomness of the differential vector is an important guarantee for achieving both fast convergence and global search capabilities.

[0131] In this embodiment, an improved operator using an expanded search strategy is adopted in the X1 stage of the Tianying optimization algorithm to fully exploit the individual position information, enhance the search range, and thus improve the global search performance of the algorithm; and in the X2 stage, the differential mutation strategy is incorporated into the global search update mechanism to reduce the missed optimal solution due to too large a step size in the later stage of the Levy operator iteration, so as to achieve a balance between the determinacy and randomness of the differential vector while significantly enhancing the diversity of the population. The improved Tianying optimization algorithm in this embodiment can more effectively explore the solution space, find the global optimal solution, and is beneficial to improving the accuracy of the subsequent obtained image segmentation threshold.

[0132] Based on the first and second embodiments of the present application, in the third embodiment of the present application, the same or similar content as in the above-mentioned first and second embodiments can be referred to the above introduction and will not be elaborated hereinafter. On this basis, please refer to Figure 4 , Figure 4 which is a schematic flowchart of the third embodiment of the image segmentation method based on the improved Tianying optimization algorithm of the present application.

[0133] In this embodiment, in order to specifically illustrate how to update the position of the first population in the local search stage, step S40 specifically includes: steps S401 to S402:

[0134] Step S401: When the current iteration number meets the first local optimization condition, update the position of the first population according to the mathematical model of the slow descent stage with low flight.

[0135] It should be understood that the first local optimization condition can be preset according to the iteration progress or population diversity, and can be enabled in the later stage of iteration. For example, it can be set as t≥2 / 3×T max and random≤0.5.

[0136] It should be noted that the mathematical model in the low-altitude slow-descent stage (X3 stage) is used to simulate the behavior of the eagle when it slowly descends at low altitude. By adjusting the individual positions, the population gradually approaches the optimal solution. Specifically, the mathematical model in the X3 stage is as follows:

[0137] X3 t+1 =(X b -X M t )×α - rand + ((UB - LB)×rand + LB)×δ

[0138] In the formula, X3 t+1 is the (t + 1)-th solution generated in the low-altitude slow-descent mode, α, σ = 0.1, representing the development adjustment parameters, and UB, LB are the upper and lower limits of the search space.

[0139] Step S402: When the current iteration number meets the second local optimization condition, the updated position of the first population is updated twice according to the mathematical model in the walking and catching prey stage to obtain the position of the second population.

[0140] It should be understood that the second local optimization condition can be preset according to the iteration progress or population diversity, and can also be enabled in the later stage of iteration. For example, it can be set as t≥2 / 3×T max and random>0.5.

[0141] It should be noted that the mathematical model in the walking and catching prey stage (X4 stage) is used to simulate the behavior of the eagle when it walks on the ground to catch prey. By adjusting the individual positions, the population is further optimized. Specifically, the mathematical model in the X4 stage is as follows:

[0142] X4 t+1 =QF×X b -G1×X i (t)×rand

[0143]

[0144]

[0145] In the formula, X4 t+1 is the (t + 1)-th solution generated in the walking and catching prey mode, QF is the quality function for balancing search effectiveness, G1 represents the diverse movement patterns used to closely track prey during the hunting process, G2 refers to the individual flight slope, Xb (t) is the current optimal individual position, X rand (t) is the random individual position, X i (t) is the position of individual i at the t-th iteration.

[0146] In the specific implementation, according to the current iteration round, the mathematical models corresponding to the X3 stage and the X4 stage are respectively adopted to update the population position, and the second population position is obtained.

[0147] Furthermore, in order to specifically illustrate how to optimize the population position after the global search and the local search iterations are completed to finally determine the optimal individual position, step S50 specifically includes: steps S501 to S502:

[0148] Step S501: The second population position is updated by adopting the random opposition-based learning strategy, the T-distribution mutation strategy, and the teaching-learning-based optimization strategy respectively.

[0149] It should be understood that the random opposition-based learning strategy is a strategy for screening updated individuals according to opposite individuals, the T-distribution mutation strategy is a strategy for performing T-distribution mutation on updated individuals, and the teaching-learning-based optimization strategy is a strategy for guiding other individuals to learn and update according to the optimal individual.

[0150] Considering that the standard AO algorithm has the ability to retain the optimal solution, the optimal individual of this generation is selected according to the optimal population individuals of the previous generation. The population selection is only based on the comparison with the population of the previous generation and belongs to a passive method. Since the number of elite individuals is relatively scarce in the population, once the population accidentally falls into a local optimum, it is difficult to break free by itself.

[0151] Based on this, the random opposition-based learning strategy is introduced in the standard AO algorithm. By introducing new elite individuals, the population diversity is activated to assist the algorithm in breaking out of the local optimum bondage and continuously moving towards the global optimum solution. After each iteration cycle ends, the performance of the algorithm is improved by generating opposite solutions to increase the new elite individuals with high exploration and development potential in each iteration, and the range of the solution space is explored by referring to the upper and lower bounds, so as to more effectively search for the global optimum solution. The mathematical model corresponding to the random opposition-based learning strategy is:

[0152] X o (t) = lb + ub - rand × X i (t)

[0153] In the formula, X o (t) is the position of the new individual X new (t) generated after each iteration. The opposite individual position of the position. After each iteration of the global search and the local search, a new position X new (t) will be generated, and the position update is performed using opposition-based learning to generate X o(t), and the two are selected by optimization.

[0154] In addition, since the standard AO algorithm simulates the complex flight trajectory of the eagle in the global and local search spaces by integrating the Lévy flight mechanism to dynamically update the current position of the eagle individuals, thereby generating new candidate solutions. The Lévy flight has the characteristics of variable step size and jumping direction, but in the later stage of iteration, it may lead to too large a step and cause the loss of position information of excellent individuals with potential development potential, and cannot effectively expand the search space.

[0155] Based on this, in this embodiment, on the basis of retaining the optimal position as the guide in the standard AO algorithm, a T-distribution mutation strategy is introduced. After each iteration, the updated individuals are mutated by the T-distribution. The position update mechanism is adjusted by exchanging information of individual mutations, and the individuals before and after mutation are preferentially retained, significantly broadening the search space, promoting the algorithm to more comprehensively update the individual position information, and ensuring that the potential space individuals are traversed as much as possible. The mathematical model corresponding to this T-distribution mutation strategy is:

[0156]

[0157] In the formula, X t (t) is the position of the newly generated individual after the T-distribution mutation strategy, and t_disturb(3) represents that the degree of freedom of the distribution perturbation is 3.

[0158] It should be noted that the T-distribution perturbation is a probability distribution, similar to the normal distribution, and is controlled by the degree-of-freedom parameter. As the degree of freedom increases, the T-distribution gradually approaches the Gaussian distribution. The T-distribution with a degree of freedom of 3 combines the advantages of the Cauchy distribution and the Gaussian distribution, has symmetry and a long tail, making it more stable than the normal distribution when dealing with outliers. The use of the T-distribution perturbation with a degree of freedom of 3 to improve the position update strategy in this embodiment is only for illustrative purposes and does not limit the value of the degree of freedom. In each iteration, it is determined whether to perform T-distribution perturbation according to the relationship between rand and pro to explore new search spaces, increase diversity and improve the convergence accuracy of the algorithm.

[0159] In addition, in order to help replace the individual positions during the iteration process to jump out of the local optimal solution and select the optimal individual by optimization, a teaching and learning optimization strategy can be further introduced in the standard AO algorithm in this embodiment.

[0160] It should be noted that during the learning stage of the teaching and learning algorithm, trainees improve their levels through different means. The first is the mutual learning and inspiration among students. Students can specifically select those with excellent grades as learning models to achieve the purpose of improving their own levels. The second is that students follow the guidance of teachers and learn according to the teachers' opinions. Teachers customize personalized learning goals based on the learning situations of students. During the learning process, students may have regrets about the knowledge they have learned and need to constantly consult teachers to accurately understand the knowledge and efficiently achieve the learning goals. On this basis, in this embodiment, the current individual is retained as a guide, and the optimal individual is replaced by a random individual. Therefore, the mathematical model corresponding to the teaching and learning optimization strategy is as follows:

[0161]

[0162] In the formula, X rand (t) is a random individual, and FX i (t) is the fitness value of the current iterative individual, and FX rand (t) is the fitness value of the random individual.

[0163] Step S502: Use the greedy algorithm to determine the target individual position from the updated positions of the second population.

[0164] It should be understood that for the convenience of description, the individual position corresponding to the position of the second population can be expressed as X new (t). The individual position updated by using the random reverse learning strategy can be expressed as X o (t), the individual position updated by using the T-distribution mutation strategy can be expressed as X t (t), and the individual position updated by using the teaching and learning optimization strategy can be expressed as X u (t).

[0165] In specific implementation, based on the greedy selection strategy, calculate the fitness values corresponding to X new (t), X o (t), X t (t), and X u (t) respectively and sort them. Finally, select the individual position with the highest fitness as the target individual position.

[0166] In this embodiment, after the population positions are iteratively updated in the global search stage and the local search stage, through the combination of the above-mentioned random reverse learning strategy, T-distribution mutation strategy, and teaching and learning optimization strategy, the population positions are further optimized, and the convergence speed and stability of the algorithm are improved. Finally, the target individual position determined by the greedy algorithm will be used to determine the threshold of image segmentation, so as to achieve high-quality image segmentation.

[0167] Furthermore, reference can be made here to Figure 5This application describes the entire process of an image segmentation method based on an improved Tianying optimization algorithm. Figure 5 It is a schematic diagram of the entire process of an image segmentation method based on an improved Tianying optimization algorithm.

[0168] In Figure 5 , the device first receives the input image to be segmented (color image), performs image preprocessing, separates the R, G, and B color channels of the color image, and plots its histogram.

[0169] Next, the improved Tianying optimization (TAO) algorithm is used to perform threshold segmentation on the R, G, and B channels respectively to determine the optimal threshold corresponding to each channel.

[0170] The Kullback symmetric cross-entropy is used as the objective function, and the image to be segmented is segmented based on the optimal threshold determined above.

[0171] Finally, the segmentation result images of the three channels are generated according to the obtained optimal threshold combination, and the results of the R, G, and B color channels are combined into the final image and output.

[0172] Among them, the specific process of the TAO algorithm is as follows:

[0173] Before population iteration, parameter initialization is first performed: set the population size (i.e., the number of individuals in the population), the spatial dimension (usually consistent with the number of variables of the problem), the search boundary (i.e., the value range of each variable), and the maximum number of iterations (the maximum number of times the algorithm runs), so as to achieve population initialization. The position of each individual in this population can correspond to the threshold of the segmentation image.

[0174] At the beginning of the iteration, calculate the fitness value of each individual in the initial population based on the initial parameters, and sort the individuals based on the fitness value, and select the individual with the highest fitness as the initial optimal solution.

[0175] When t < 2 / 3 × T max and random < 0.5, the position of the population is updated using the mathematical model obtained by optimizing with an expanded search strategy.

[0176] When t < 2 / 3 × T max and random ≥ 0.5, a scaling factor is introduced, and the position of the population is updated using the mathematical model obtained by optimizing with a differential mutation strategy.

[0177] When t ≥ 2 / 3 × T max and random ≤ 0.5, enter the local search stage, and the position of the population is updated using the mathematical model in the X3 stage.

[0178] When t ≥ 2 / 3 × T maxWhen random > 0.5, the mathematical model in the X4 stage is used to update the population position;

[0179] For the X obtained by the aforementioned population position update new (t), the random reverse learning strategy, the T-distribution mutation strategy, and the teaching and learning optimization strategy are successively or separately used for update, and X o (t), X t (t), and X u (t) are obtained correspondingly;

[0180] Finally, based on the greedy strategy, X new (t), X o (t), X t (t), and X u (t) are respectively compared and the best ones are retained to determine the position of the target individual.

[0181] In view of the deficiency of the optimization ability of the traditional Tianying optimization algorithm, this application proposes an improved Tianying optimization algorithm that integrates an extended search and a teaching mutation strategy. And this improved Tianying optimization algorithm can also be applied to other scenarios that require algorithm optimization.

[0182] In addition, the convergence speed and optimization results of this improved Tianying optimization algorithm on 23 benchmark test functions can be compared with those of six other comparison algorithms, and the Wilcoxon rank-sum test is further introduced to evaluate whether there are significant performance differences between the algorithms. Thus, based on the experimental results, it can be known that this improved Tianying optimization algorithm has obvious advantages, and still has strong optimization ability and convergence accuracy on multi-dimensional functions, and can better search for the global optimal solution of the problem.

[0183] Furthermore, in order to evaluate the performance of this improved Tianying optimization (TAO) algorithm, the original Tianying optimization (AO) algorithm and the improved Tianying optimization (TAO) algorithm can be respectively selected, and their image performance after different threshold segmentations of different images can be tested.

[0184] In order to quantitatively analyze the performance of different segmentation algorithms, three image quality evaluation indicators: Peak Signal-to-Noise Ratio (PSNR), Structural Similarity (SSIM), and Feature Similarity Index Measure (FSIM) can be used to evaluate and compare the image segmentation results.

[0185] PSNR is defined as the ratio between the maximum possible signal power in an image and the destructive noise power that affects its representation accuracy. It is a standard for measuring the relationship between the image signal intensity and the noise intensity, with the unit of decibel (dB). The higher the PSNR value, the better the image quality.

[0186] SSIM is designed based on the characteristics of the human visual system and is used to quantitatively evaluate the visual similarity between two images. The value range of SSIM is usually between 0 and 1. The closer the value is to 1, the higher the visual similarity between the two images.

[0187] FSIM aims to evaluate image quality by using low-level visual characteristics, mainly based on the phase consistency (PC) and gradient magnitude (GM) features. PC reflects the image structure, and GM supplements details. The two are weighted and combined to obtain the FSIM value, which reflects the similarity of image feature details and is used to evaluate the image segmentation or processing effect, providing a reference for image quality optimization. The increase in the FSIM value means that the processed image is closer to the original image in terms of feature details, thus reflecting the optimization of the segmentation effect.

[0188] The FSIM, PSNR, and SSIM results of the test algorithm for images segmented with different thresholds can be referred to Figure 6 , Figure 6 are the schematic diagrams of the PSNR, FSIM, and SSIM results of the AO and TAO algorithms.

[0189] As can be seen from Figure 6 in the overall experimental results from the table, as the threshold gradually increases, the FSIM, PSNR, and SSIM values of the images segmented by each algorithm show an upward trend, and the peak signal-to-noise ratio, feature similarity, and structural similarity before and after image segmentation are gradually increasing. The proportions of the TAO algorithm obtaining the optimal values in FSIM, PSNR, and SSIM are 87.5%, 95.83%, and 87.5% respectively. Compared with the AO algorithm, the FSIM value of the TAO algorithm is increased by 0.3%, 1.85%, 0.19%, and 1.10% on average when the thresholds are 2, 5, 9, and 10; the PSNR value of the TAO algorithm is increased by 0.13%, 3.11%, 3.16%, and 2.88% on average when the thresholds are 2, 5, 9, and 10; the SSIM value of the TAO algorithm is increased by 0.24%, 1.76%, 0.57%, and 1.05% on average when the thresholds are 2, 5, 9, and 10.

[0190] The experimental results show that the TAO algorithm has shown obvious advantages in multi-threshold image segmentation, especially the segmentation effect improvement is significant under medium and high threshold numbers, which is of great significance for improving the quality and practicality of image segmentation. The algorithm has shown superiority in maintaining the image structure, features, and overall quality, and can better meet the actual application requirements.

[0191] It should be noted that the above examples are only for understanding this application and do not constitute a limitation to the image segmentation method based on the improved Tianying optimization algorithm of this application. Any simple transformation in more forms based on this technical concept is within the protection scope of this application.

[0192] This application provides an image segmentation device based on an improved Tianying optimization algorithm. The image segmentation device based on the improved Tianying optimization algorithm includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the image segmentation method based on the improved Tianying optimization algorithm in the first embodiment above.

[0193] Reference is made below to Figure 7 , Figure 7 which is a schematic structural diagram of the image segmentation device based on the improved Tianying optimization algorithm of this application. The image segmentation device based on the improved Tianying optimization algorithm in the embodiments of this application may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions: tablet computers), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 7 The shown image segmentation device based on the improved Tianying optimization algorithm is only an example and should not impose any limitations on the functions and usage scopes of the embodiments of this application.

[0194] As Figure 7As shown, the image segmentation device based on the improved Tianying optimization algorithm may include a processing device 1001 (such as a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to the program stored in the read-only memory 1002 or the program loaded from the storage device 1003 into the random access memory 1004. In the random access memory 1004, various programs and data required for the operation of the image segmentation device based on the improved Tianying optimization algorithm are also stored. The processing device 1001, the read-only memory 1002, and the random access memory 1004 are connected to each other through a bus 1005. The input / output interface 1006 is also connected to the bus. Generally, the following systems can be connected to the input / output interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the image segmentation device based on the improved Tianying optimization algorithm to communicate with other devices wirelessly or wiredly to exchange data. Although the figure shows an image segmentation device based on the improved Tianying optimization algorithm with various systems, it should be understood that it is not required to implement or have all the shown systems. More or fewer systems can be alternatively implemented or had.

[0195] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program codes for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device, or installed from the storage device 1003, or installed from the read-only memory 1002. When the computer program is executed by the processing device 1001, the above functions defined in the method of the embodiments disclosed in the present application are executed.

[0196] The image segmentation device based on the improved Tianying optimization algorithm provided by the present application adopts the image segmentation method based on the improved Tianying optimization algorithm in the above embodiments, and can solve the technical problems of image segmentation based on the improved Tianying optimization algorithm. Compared with the prior art, the beneficial effects of the image segmentation device based on the improved Tianying optimization algorithm provided by the present application are the same as those of the image segmentation method based on the improved Tianying optimization algorithm provided in the above embodiments, and other technical features in the image segmentation device based on the improved Tianying optimization algorithm are the same as the features disclosed in the method of the previous embodiment, and will not be elaborated here.

[0197] It should be understood that each part disclosed in this application can be implemented by hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in a suitable manner in any one or more embodiments or examples.

[0198] As mentioned above, the above are only specific embodiments of this application, but the protection scope of this application is not limited thereto. Any person skilled in the art within the technical scope disclosed in this application can easily think of changes or substitutions, which should all be covered within the protection scope of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.

[0199] It should be noted that in this text, the term "including", "comprising", or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article, or system including a series of elements not only includes those elements but also includes other elements not explicitly listed, or further includes elements inherent to such a process, method, article, or system. Without further limitations, an element defined by the statement "including one..." does not exclude the existence of additional elements in the process, method, article, or system including such an element.

[0200] The serial numbers of the above embodiments of the present invention are only for description and do not represent the superiority or inferiority of the embodiments. Moreover, they are only partial embodiments of this application and do not limit the patent scope of this application. Any equivalent structural transformation made under the technical concept of this application by using the content of the specification and drawings of this application, or any direct / indirect application in other related technical fields, is included within the patent protection scope of this application.

Claims

1. An image segmentation method based on an improved Tianying optimization algorithm, characterized in that, The method includes: Obtain the image to be segmented and determine the corresponding color channels of the image to be segmented; Perform parameter initialization based on a preset Tianying optimization algorithm and determine the initial optimal solution according to the initial parameters; In the global search stage, based on the initial optimal solution, update the initial population position by using an extended search strategy and a differential mutation strategy to obtain the first population position; In the local search stage, update the first population position according to the Tianying low-flying and slow-descending behavior and the Tianying random movement behavior to obtain the second population position; Update the second population position by using a random reverse learning strategy, a T-distribution mutation strategy, and a teaching and learning optimization strategy, and determine the target individual position according to the update result; Determine the segmentation threshold corresponding to each color channel according to the target individual position, and segment the image to be segmented based on each segmentation threshold to obtain the segmented image.

2. The method according to claim 1, wherein The step of updating the initial population position by using an extended search strategy and a differential mutation strategy based on the initial optimal solution in the global search stage includes: When the current iteration number meets the first global optimization condition, update the initial population position by using an extended search strategy according to the initial optimal solution, where the extended search strategy is a strategy for updating the population search range according to an extended search operator; When the current iteration number meets the second global optimization condition, update the initial population position by using a differential mutation strategy according to the initial optimal solution, where the differential mutation strategy is a strategy for mutating the optimal individual according to a scaling factor.

3. The method according to claim 2, wherein The extended search strategy and the differential mutation strategy are implemented by a mathematical model. The mathematical model corresponding to the extended search strategy is: where X best (t) is the current optimal individual, X rand (t) is a random individual, X i (t) is the original position of individual i at the t-th iteration, T max is the maximum number of iteration rounds; The mathematical model corresponding to the differential mutation strategy is: X2(t) = (X best (t) - X i (t)) + F 2 ×(rand × (X a (t) - X i (t)) + (X b (t) - X c (t))) where F is the scaling factor, rand is a random number, and X a (t) is the optimal individual of this iteration, X b (t) is the sub-optimal individual of this iteration, and Xc(t) is the second sub-optimal individual of this iteration.

4. The method according to claim 1, wherein The step of updating the first population position according to the Tianying low-flying and slow-descending behavior and the Tianying random movement behavior to obtain the second population position includes: When the current iteration number meets the first local optimization condition, update the first population position according to the mathematical model in the low-flying and slow-descending stage; When the current iteration number meets the second local optimization condition, perform a secondary update on the updated first population position according to the mathematical model in the walking and catching prey stage to obtain the second population position.

5. The method according to claim 4, wherein The mathematical model in the low-flying and slow-descending stage is: X3 t+1 = (X b - X M t ) × α - rand + ((UB - LB) × rand + LB) × δ where X b is the current optimal solution, X M t is the average position at the t-th iteration, rand is a random number, α and σ are adjustment parameters, UB is the upper bound of the search space, and LB is the lower bound of the search space; Among them, the mathematical model in the walking and catching prey stage is: X4 t+1 = QF × X b - G1 × X i (t) × rand In the formula, QF is the quality function, G1 is the individual movement mode, and Xi(t) is the position of individual i at the t-th iteration.

6. The method according to claim 1, wherein The step of updating the second population position by using a random reverse learning strategy, a T-distribution mutation strategy, and a teaching and learning optimization strategy, and determining the target individual position according to the update result includes: Respectively update the second population position by using a random reverse learning strategy, a T-distribution mutation strategy, and a teaching and learning optimization strategy; Use a greedy algorithm to determine the target individual position from the updated second population position; Among them, the random reverse learning strategy is a strategy for screening updated individuals according to opposing individuals, the T-distribution mutation strategy is a strategy for performing T-distribution mutation on updated individuals, and the teaching and learning optimization strategy is a strategy for guiding other individuals to learn and update according to the optimal individual.

7. The method according to claim 6, wherein The random reverse learning strategy, the T-distribution mutation strategy, and the teaching and learning optimization strategy are implemented using a mathematical model. The mathematical model corresponding to the random reverse learning strategy is: X o (t) = lb + ub - rand × X i (t) where X o (t) is the position of the new individual generated after iteration, which is the opposite individual position of X new (t), lb and ub are the upper and lower boundaries of the population search, rand is a random number, and X i (t) is the original position of individual i at the t-th iteration; The mathematical model corresponding to the T-distribution mutation strategy is: Wherein, X t (t) is the position of the newly generated individual after the T - distribution mutation strategy, X best (t) is the current optimal individual, and t_disturb(3) represents that the degree of freedom of the distribution perturbation is 3; The mathematical model corresponding to the teaching and learning optimization strategy is: where X rand (t) is a random individual, and FX i (t) is the fitness value of the current iteration individual, and FX rand (t) is the fitness value of the random individual.

8. The method according to claim 1, wherein The step of segmenting the image to be segmented based on each of the segmentation thresholds to obtain a segmented image includes: Taking the symmetric cross-entropy as the objective function, and respectively determining the optimal threshold corresponding to each color channel based on each of the segmentation thresholds; Applying the corresponding optimal threshold to each color channel for segmentation to generate a segmented result image corresponding to each color channel; Merging the segmented result images of each color channel to obtain a segmented image.

9. The method according to claim 1, characterized in that The step of initializing parameters based on the preset Tianying optimization algorithm and determining an initial optimal solution according to the initial parameters includes: Initializing the parameters corresponding to the preset Tianying optimization algorithm, where the parameters include: population size, spatial dimension, search boundary, and maximum number of iterations; Determining the fitness value of individuals in the population according to the parameters, and sorting the individuals to determine the initial optimal solution.

10. An image segmentation device based on an improved Tianying optimization algorithm, characterized in that, The device includes a memory, a processor, and an image segmentation program based on an improved Tianying optimization algorithm stored on the memory and executable on the processor. When the image segmentation program based on the improved Tianying optimization algorithm is executed by the processor, it implements the steps of the image segmentation method based on the improved Tianying optimization algorithm according to any one of claims 1 to 9.

Citation Information

Cited By

  • High-dimensional medical feature selection method, system and device and storage medium

    CN120527024A

  • Marine ship segmentation method and system based on improved northern eagle algorithm

    CN120635464A

  • Liquid crystal display backlight self-adaptive control method based on swarm intelligence

    CN121354494A

  • Intracranial hemorrhage CT image segmentation method and device, medium and equipment

    CN122048972A