Multi-threshold medical image segmentation method based on improved rime algorithm
By improving the rime algorithm (HRIME), combining the non-local mean two-dimensional histogram and Renyi entropy, and using the partial enhancement strategy and edge information, the problems of complex threshold selection and poor local search ability in multi-threshold medical image segmentation are solved, significantly improving Image segmentation quality.
Patent Information
- Application Number
- CN202410942772.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-15
- Publication Date
- 2024-10-18
AI Technical Summary
In existing multi-threshold medical image segmentation methods, the selection of thresholds is complicated, which makes it difficult to improve the image segmentation accuracy. Moreover, the rime algorithm has poor local search capabilities and is prone to falling into local optimal solutions.
The improved rime algorithm (HRIME) is used, combined with the non-local mean two-dimensional histogram and Renyi entropy, to find the best threshold combination to improve the image segmentation quality through partial enhancement strategy and edge information utilization strategy.
The improved rime algorithm (HRIME) enhances local search capabilities, avoids local optimal traps, significantly improves the quality and accuracy of image segmentation, and shows strong competitiveness compared with other algorithms.
Smart Images

Figure CN118799290A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of image processing, and in particular to a multi-threshold medical image segmentation method based on an improved rime algorithm. Background Art
[0002] Medical images can reflect the internal structure of the human body and are an important means in the medical diagnosis process. With the rapid maturity of computer vision, medical institutions pay more attention to the processing and analysis of images to assist doctors in predicting and treating diseases. Researchers are also conducting research on different medical images, real-time endoscopy detection, image quality assessment, medical image neighborhood adaptation, cancer classification, and disease diagnosis. In addition, image segmentation is also an important object of research for researchers. Image segmentation is a key task in the field of computer vision. Its purpose is to identify the various parts of the image and divide the image into several different areas. After the image segmentation process, the accuracy of medical diagnosis can be effectively improved, which can provide certain help to the diagnosis of medical institutions. Among the segmentation methods, threshold-based segmentation has attracted the attention of researchers because of its simplicity, high computational efficiency, wide range of applications, and low impact of image size.
[0003] Multi-threshold image segmentation uses multiple thresholds to divide an image into different parts. Currently, multi-threshold image segmentation has been applied in different fields, such as medical image segmentation, deep learning and convolutional neural networks, image feature extraction, etc. When using multi-threshold image segmentation to segment an image, the appropriate threshold set is the key to the segmentation effect, but the selection of thresholds is often a complex issue. How to continuously improve the accuracy of image segmentation has always been a common pursuit in the industry.
[0004] Therefore, it is necessary to study a multi-threshold medical image segmentation method based on the improved rime algorithm to obtain better image segmentation quality. Summary of the invention
[0005] In order to solve one or more problems existing in the prior art and further improve the image segmentation quality, the applicant has found through research that the partial reinforcement theory can enhance the local search capability of the RIME algorithm and make up for the disadvantage of the poor local search capability of the RIME algorithm due to randomness; at the same time, an edge information utilization strategy is proposed to effectively deal with the worst individuals in the population and improve the diversity of the population; the present invention names the improved Rime algorithm HRIME. In addition, the present invention also combines the non-local mean two-dimensional histogram for denoising, and the multi-threshold image segmentation adopts the idea of maximum entropy. The present invention adopts Renyi entropy to facilitate the solution of the best threshold combination.
[0006] Specifically, according to one aspect of the present invention, a multi-threshold medical image segmentation method based on an improved rime algorithm is provided, including the following steps:
[0007] Step 1: Input the image to be segmented;
[0008] Step 2: Generate a grayscale image of the input image;
[0009] Step 3: Use the non-local means method to generate a non-local means filtered image;
[0010] Step 4: Generate a two-dimensional histogram using the non-local means filtered image and the grayscale image;
[0011] Step 5: Utilize the information of the generated two-dimensional histogram, combined with HRIME, to find the optimal threshold combination with the maximum Renyi entropy;
[0012] Step 6: Perform threshold segmentation according to the optimal threshold combination and output the segmented image;
[0013] Among them, step 5 is specifically as follows:
[0014] a Initialization;
[0015] b Perform soft rime processing and hard rime processing;
[0016] c Perform a partial enhancement strategy;
[0017] d Perform an edge information utilization strategy;
[0018] e Update the global optimal individual X b and the current iteration number t;
[0019] f If t < T, where T is the total number of iterations, then return to step b; otherwise, the loop ends, and the global optimal individual X b is used as the optimal threshold combination.
[0020] According to another aspect of the present invention, step a includes: initializing the configuration population size N, the problem dimension dim, and the maximum number of iterations T; initializing the population X i,j (i = 1, 2,..., N; j = 1, 2,..., dim) and evaluating the fitness value of the population, that is, the Renyi entropy, to obtain the preliminary optimal individual X b .
[0021] According to another aspect of the present invention, the mathematical model of the soft rime processing is as follows:
[0022]
[0023] θ = tπ / 10T (24)
[0024] β=1-[tw / T] / w (25)
[0025]
[0026]
[0027] in, is the value of the candidate individual of the ith individual in the jth dimension, is the candidate individual of the ith individual, X i is the i-th individual, is the value of the current optimal individual in the jth dimension, h1, h2 and r1 are uniformly distributed random numbers between [0,1], ub j and lb j They represent the upper and lower limits of the problem in the jth dimension, [·] indicates rounding, t is the current iteration number, T is the total number of iterations, π is the circumference of a circle, the value of w is 5, and fitness indicates the fitness value.
[0028] According to another aspect of the present invention, the mathematical model of hard rime treatment is as follows:
[0029]
[0030]
[0031] in, is the value of the candidate individual of the ith individual in the jth dimension, is the candidate individual of the ith individual, X i is the i-th individual, is the value of the current optimal individual in the jth dimension, r2 is a uniformly distributed random number between 0 and 1, and F i represents the fitness value of the i-th individual, N(F i ) is for F i The value to be standardized, and fitness means to obtain the fitness value.
[0032] According to yet another aspect of the present invention, the mathematical model for executing the partial reinforcement strategy is as follows:
[0033] Response: For each individual, after completing the corresponding behavior, if the generated candidate individual is better than the current individual, a greedy selection strategy is executed to update the current individual;
[0034] Planning: This process establishes a schedule sch for each individual, allowing the target to choose how and when to strengthen its behavior according to the schedule. The process is abstracted into the following formula:
[0035] ο=t / T (30)
[0036] μ=exp(o-1) (31)
[0037]
[0038]
[0039] Among them, o is the time coefficient, t represents the current iteration number, T represents the total number of iterations, μ represents the probability of selection, dim represents the total problem dimension, v represents the selected behavior, that is, the dimension of individual selection, sch j Represents the value of all individual schedules in the jth dimension. The result of sch sorting in descending order is sch sorted , τ represents the size of the selected behavior subset, Round up, U means uniform distribution, sch sorted,τ Indicates sch sorted The τth element in ;
[0040] Stimulus: has the following mathematical expression:
[0041] α=ο+U(0,θ),whereθ=∑ j∈ν (sch i,j / max(sch i )) (34)
[0042]
[0043]
[0044]
[0045] Among them, α is the stimulus coefficient, is the candidate individual of the ith individual, X i is the i-th individual, o is the time coefficient, U represents uniform distribution, θ represents the upper limit of uniform distribution, sch i,j is the value of the plan table of the ith individual in the jth dimension, max means to find the maximum value, sch i is the schedule of the ith individual, St i,v When updating the intermediate difference generated by the i-th individual in the v-th dimension, rand is a uniformly distributed random number between 0 and 1. represents the value of the current optimal individual on dimension v, X i,v represents the value of the current individual on dimension v, X r,v Represents the value of a random individual with a worse fitness value than the current individual on dimension v, It represents the value of the candidate solution in dimension v, and fitness represents the fitness value.
[0046] Reinforcement: This process involves updating an individual's schedule based on different consequences after taking a behavior. The main steps are as follows:
[0047]
[0048] Among them, sch i,v is the value of the plan table of the ith individual in the vth dimension, and fitness represents the fitness value. is the newly generated candidate individual, X i is the i-th individual, R is a constant with a value of 0.7;
[0049] Rearrangement: If an individual falls into a negative reinforcement cycle during the iteration process, correction is required. The mathematical expression is as follows:
[0050]
[0051]
[0052] Among them, ub j and lb j They represent the upper and lower limits of the problem in the jth dimension, std represents the calculation of the standard deviation, U represents uniform distribution, and sch i is the schedule of the ith individual, sch i,j is the value of the plan table of the ith individual on the jth dimension, X i,j Represents the value of the i-th individual in the j-th dimension.
[0053] According to another aspect of the present invention, the edge information utilization strategy is implemented, and the mathematical model is as follows:
[0054] a=1.5×(1-t / T) 2 (41)
[0055] b j ∈U(-a,a)(42)
[0056]
[0057]
[0058] Among them, a is the jitter factor, t is the current iteration number, T is the total iteration number, b j is a random number uniformly distributed between -a and a, ub j and lb j They represent the upper and lower limits of the problem in the jth dimension, is the value of the worst individual in the jth dimension, U represents uniform distribution, is the value of the newly generated candidate individual in the jth dimension, X newis the newly generated candidate individual, X w is the worst individual, and fitness represents the fitness value.
[0059] The beneficial effects of the present invention are:
[0060] The present invention proposes to improve the rime algorithm by using a partial enhancement strategy and an edge information utilization strategy, wherein the partial enhancement strategy improves the disadvantage of poor local search of the rime algorithm, and the edge information utilization strategy can alleviate the defect that the rime algorithm is prone to fall into local optimality to a certain extent, thereby further improving the quality of image segmentation. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] The present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments.
[0062] Figure 1 It is a flow chart of a multi-threshold medical image segmentation method according to a preferred embodiment of the present invention.
[0063] Figure 2 It is a specific flow chart of HRIME of the present invention.
[0064] Figure 3 Schematic diagram of multi-threshold medical image segmentation.
[0065] Figure 4 This is an example of an image of lupus nephritis.
[0066] Figure 5 Result diagrams of HRIME and FSIM of various algorithms of the present invention.
[0067] Figure 6 The result diagrams of HRIME of the present invention and SSIM of various algorithms are shown in FIG.
[0068] Figure 7 Result diagram of the PSNR of HRIME of the present invention and various algorithms. DETAILED DESCRIPTION
[0069] The best implementation mode of the present invention is described below through preferred embodiments in conjunction with the accompanying drawings. The specific implementation mode here is to illustrate the present invention in detail and should not be understood as limiting the present invention. Various deformations and modifications can be made without departing from the spirit and essential scope of the present invention, which should be included in the protection scope of the present invention.
[0070] Example 1
[0071] According to a preferred embodiment of the present invention, see Figure 1-7 , a multi-threshold medical image segmentation method based on an improved rime algorithm is provided, comprising the following steps:
[0072] Step 1: Input the image to be segmented;
[0073] Step 2: Generate the grayscale image of the input image;
[0074] Step 3: Use the non-local means method to generate a non-local means filtered image;
[0075] Step 4: Generate a two-dimensional histogram using the non-local means filtered image and the grayscale image;
[0076] Step 5: Utilize the information of the generated two-dimensional histogram, in combination with HRIME, to find the optimal threshold combination with the maximum Renyi entropy;
[0077] Step 6: Perform threshold segmentation according to the optimal threshold combination and output the segmented image;
[0078] Among them, Step 5 is specifically as follows:
[0079] a Initialization;
[0080] b Perform soft rime processing and hard rime processing;
[0081] c Perform a partial enhancement strategy;
[0082] d Perform an edge information utilization strategy;
[0083] e Update the global optimal individual X b and the current iteration number t;
[0084] f If t < T, where T is the total number of iterations, then return to step b; otherwise, the loop ends and the global optimal individual X b is used as the optimal threshold combination.
[0085] According to another preferred embodiment of the present invention, step a includes: initializing the configuration population size N, the problem dimension dim, and the maximum number of iterations T; initializing the population X i,j (i = 1, 2,..., N; j = 1, 2,..., dim) and evaluating the fitness value of the population, that is, the Renyi entropy, to obtain the preliminary optimal individual X b .
[0086] According to another preferred embodiment of the present invention, the mathematical model of the soft rime processing is as follows:
[0087]
[0088] θ = tπ / 10T (46)
[0089] β = 1 - [tw / T] / w (47)
[0090]
[0091]
[0092] in, is the value of the candidate individual of the ith individual in the jth dimension, is the candidate individual of the ith individual, X i is the i-th individual, is the value of the current optimal individual in the jth dimension, h1, h2 and r1 are uniformly distributed random numbers between [0,1], ub j and lb j They represent the upper and lower limits of the problem in the jth dimension, [·] indicates rounding, t is the current iteration number, T is the total number of iterations, π is the circumference of a circle, the value of w is 5, and fitness indicates the fitness value.
[0093] According to another preferred embodiment of the present invention, the mathematical model of hard rime treatment is as follows:
[0094]
[0095]
[0096] in, is the value of the candidate individual of the ith individual in the jth dimension, is the candidate individual of the ith individual, X i is the i-th individual, is the value of the current optimal individual in the jth dimension, r2 is a uniformly distributed random number between 0 and 1, and F i represents the fitness value of the i-th individual, N(F i ) is for F i The value to be standardized, and fitness means to obtain the fitness value.
[0097] According to another preferred embodiment of the present invention, the mathematical model for executing the partial reinforcement strategy is as follows:
[0098] Response: For each individual, after completing the corresponding behavior, if the generated candidate individual is better than the current individual, a greedy selection strategy is executed to update the current individual;
[0099] Planning: This process establishes a schedule sch for each individual, allowing the target to choose how and when to strengthen its behavior according to the schedule. The process is abstracted into the following formula:
[0100] ο=t / T (52)
[0101] μ =exp(o-1) (53)
[0102]
[0103]
[0104] Among them, o is the time coefficient, t represents the current iteration number, T represents the total number of iterations, μ represents the probability of selection, dim represents the total problem dimension, v represents the selected behavior, that is, the dimension of individual selection, sch j Represents the value of all individual schedules in the jth dimension. The result of sch sorting in descending order is sch sorted , τ represents the size of the selected behavior subset, Round up, U means uniform distribution, sch sorted,τ Indicates sch sorted The τth element in ;
[0105] Stimulus: has the following mathematical expression:
[0106] α=ο+U(0,θ),whereθ=Σ j∈ν (sch i,j / max(sch i )) (56)
[0107]
[0108]
[0109]
[0110] Among them, α is the stimulus coefficient, is the candidate individual of the ith individual, X i is the i-th individual, o is the time coefficient, U represents uniform distribution, θ represents the upper limit of uniform distribution, sch i,j is the value of the plan table of the ith individual in the jth dimension, max means to find the maximum value, sch i is the schedule of the ith individual, St i,v When updating the intermediate difference generated by the i-th individual in the v-th dimension, rand is a uniformly distributed random number between 0 and 1. represents the value of the current optimal individual on dimension v, X i,v represents the value of the current individual on dimension v, X r,v Represents the value of a random individual with a worse fitness value than the current individual on dimension v, It represents the value of the candidate solution in dimension v, and fitness represents the fitness value.
[0111] Reinforcement: This process involves updating an individual's schedule based on different consequences after taking a behavior. The main steps are as follows:
[0112]
[0113] Among them, sch i,v is the value of the plan table of the ith individual in the vth dimension, and fitness represents the fitness value. is the newly generated candidate individual, X i is the i-th individual, R is a constant with a value of 0.7;
[0114] Rearrangement: If an individual falls into a negative reinforcement cycle during the iteration process, correction is required. The mathematical expression is as follows:
[0115]
[0116]
[0117] Among them, ub j and lb j They represent the upper and lower limits of the problem in the jth dimension, std represents the calculation of the standard deviation, U represents uniform distribution, and sch i is the schedule of the ith individual, sch i,j is the value of the plan table of the ith individual on the jth dimension, X i,j Represents the value of the i-th individual in the j-th dimension.
[0118] According to another preferred embodiment of the present invention, the edge information utilization strategy is implemented, and the mathematical model is as follows:
[0119] a=1.5×(1-t / T) 2 (63)
[0120] b j ∈U(-a,a)(64)
[0121]
[0122]
[0123] Among them, a is the jitter factor, t is the current iteration number, T is the total iteration number, b j is a random number uniformly distributed between -a and a, ub j and lb j They represent the upper and lower limits of the problem in the jth dimension, is the value of the worst individual in the jth dimension, U represents uniform distribution, is the value of the newly generated candidate individual in the jth dimension, X new is the newly generated candidate individual, X w is the worst individual, and fitness represents the fitness value.
[0124] Example 2
[0125] According to a preferred embodiment of the present invention, see Figure 1 , a multi-threshold medical image segmentation method based on an improved rime algorithm is provided, comprising the following steps:
[0126] (1): Select image Ia, whose size is m×n;
[0127] (2): Convert the image into a grayscale image with a grayscale value range of [0, 1, ..., V-1];
[0128] (3): Use the grayscale image to obtain the non-local mean filter image. The method is as follows:
[0129]
[0130]
[0131]
[0132]
[0133] Among them, the grayscale values of pixel i and pixel j are Ia(i) and Ia(j) respectively, d(i) and d(j) represent the local means of pixel i and pixel j respectively, V(i) and V(j) represent the k×k pixel matrix centered on pixel (i,j), ω(i,j) is the weight for weighted averaging, σ is the standard deviation, and NLM(i) is the predicted value obtained by the non-local mean.
[0134] (4): In the two-dimensional histogram of non-local mean, the x-axis represents the grayscale value of the original grayscale image, and the y-axis represents the grayscale value after non-local mean processing;
[0135] (5): Use the two-dimensional histogram information and execute HRIME to find the optimal threshold combination. The specific flow chart of HRIME is as follows: Figure 2 , the main process is as follows:
[0136] a) Initialize the algorithm configuration: population size N, problem dimension dim, maximum number of iterations T;
[0137] b) Initialize the algorithm population (X i,j (i=1,2,...,N;j=1,2,...,dim)) and evaluate the fitness value (Renyi entropy) of the population to obtain the preliminary optimal individual X b .
[0138] Here, the technical principle of the present invention is further explained. Specifically, Renyi entropy is an information measurement method that can evaluate the degree of confusion or uncertainty of a data set. By optimizing Renyi entropy, we can find the threshold combination that makes the image segmentation result most discriminative. The mathematical description is as follows:
[0139]
[0140]
[0141]
[0142] Among them, the number of times (i, j) appears is C(i, j), P(i, j) is the probability density, q is the threshold in the original grayscale image, w is the result after q is passed through the non-local mean, and the image size is m×n. A1 and A2 represent the background area and the target area respectively, V-1 is the maximum grayscale value, P A1 and P A2 They represent the sum of information in A1 and A2 respectively. According to the definition of Renyi entropy, Re(A1) and Re(A2) can be obtained as shown in equations (8)-(9):
[0143]
[0144]
[0145] In order to find the threshold (q, w) to segment the useful area as much as possible, ensure that areas A1 and A2 contain a lot of information, and maximize the total value of Re(A1) and Re(A2) entropy, that is:
[0146] Re(q,w)=Re(A1)+Re(A2) (76)
[0147] Then the optimization problem can be expressed as: find (q * ,w * ) satisfies formula (11), that is:
[0148] (q * ,w * )=argmax{Re(q,w)} (77)
[0149] Since the single threshold segmentation method often has limitations in practical applications and cannot meet the needs of complex image segmentation, we consider extending the single threshold segmentation to multi-threshold segmentation technology. Based on the basic principle of single threshold segmentation, we introduce multiple thresholds (assuming that there are X, where X>1), which subdivide the image into X+1 different regions. We group these thresholds into a set, represented by U, that is, U={(q,w),...,(q X ,wX )}.
[0150] exist Figure 3 B is the background, S1-S X represents the target, so the sum of the Renyi entropy of these regions is:
[0151] Re(U)=Re(B)+Re(S1)+...+Re(S X ) (78)
[0152] Based on the idea of maximum Renyi entropy, HRIME is used to find the threshold set U * Make Re(U * ) is as large as possible, so the mathematical expression of the problem solved by HRIME is:
[0153] U * =argmax(Re(U)) (79)
[0154] Based on the above technical principles, the implementation process of the present invention will be described in detail below.
[0155] c) Execute the rime algorithm. First, the rime processing includes the soft rime stage, and its mathematical model is as follows:
[0156]
[0157] θ=tπ / 10T (81)
[0158] β=1-[tw / T] / w (82)
[0159]
[0160]
[0161] in, is the value of the candidate individual of the ith individual in the jth dimension, is the candidate individual of the ith individual, X i is the i-th individual, is the value of the current optimal individual in the jth dimension, h1, h2 and r1 are uniformly distributed random numbers between [0,1], ub j and lb j They represent the upper and lower limits of the problem in the jth dimension, [·] indicates rounding, t is the current iteration number, T is the total number of iterations, π is the circumference of a circle, the value of w is 5, and fitness indicates the fitness value.
[0162] After the soft rime stage is completed, the hard rime stage will be executed. The mathematical model of the hard rime stage is as follows:
[0163]
[0164]
[0165] in, is the value of the candidate individual of the ith individual in the jth dimension, is the candidate individual of the ith individual, X i is the i-th individual, is the value of the current optimal individual in the jth dimension, r2 is a uniformly distributed random number between 0 and 1, and F i represents the fitness value of the i-th individual, N(F i ) is for F i The value to be standardized, and fitness means to obtain the fitness value.
[0166] d) Execute a partial reinforcement strategy, whose mathematical model is as follows:
[0167] Response: For each individual, after completing the corresponding behavior, if the generated candidate individual is better than the current individual, a greedy selection strategy is executed to update the current individual.
[0168] Planning: This process establishes a schedule sch for each individual, allowing the target to choose how and when to strengthen its behavior according to the schedule. The process is abstracted into the following formula:
[0169] ο=t / T (87)
[0170] μ=exp(o-1) (88)
[0171]
[0172]
[0173] Among them, o is the time coefficient, t represents the current iteration number, T represents the total number of iterations, μ represents the probability of selection, dim represents the total problem dimension, v represents the selected behavior, in this strategy, it refers to the dimension of individual selection, sch j Represents the value of all individual schedules in the jth dimension. The result of sch sorting in descending order is sch sorted , τ represents the size of the selected behavior subset, Round up, U means uniform distribution, sch sorted,τ Indicates sch sorted The τth element in . It is worth noting that the initial value of sch is set between 0.9 and 1. Stimulation: This process is the main process of individual position update. It discusses the specific behavior of the individual after receiving stimulation, with the following mathematical expression:
[0174] α=ο+U(0,θ),whereθ=∑ j∈ν (sch i,j / max(sch i )) (91)
[0175]
[0176]
[0177]
[0178] Among them, α is the stimulus coefficient, is the candidate individual of the ith individual, X i is the i-th individual, o is the time coefficient, which is the same as that in Equation 21, U represents uniform distribution, θ represents the upper limit of uniform distribution, and sch i,j is the value of the plan table of the i-th individual in the j-th dimension, max means to find the maximum value, St i,v When updating the intermediate difference generated by the i-th individual in the v-th dimension, rand is a uniformly distributed random number between 0 and 1. represents the value of the current optimal individual on dimension v, X i,v represents the value of the current individual on dimension v, X r,v It represents the value of a random individual with a worse fitness value than the current individual on dimension v, and fitness represents the fitness value to be obtained. represents the value of the candidate solution in dimension v. It is worth mentioning that the dimensions other than v are related to the current individual X i Keep it the same.
[0179] Reinforcement: This process involves updating the individual's schedule based on different consequences after taking a behavior. The main steps of this process are as follows:
[0180]
[0181] Among them, sch i,v is the value of the plan table of the ith individual in the vth dimension, and fitness represents the fitness value. is the newly generated candidate individual, X i is the i-th individual, R is a constant with a value of 0.7.
[0182] Rearrangement: This process emphasizes that if an individual falls into a negative reinforcement cycle during the iteration process, correction is required. The mathematical expression is as follows:
[0183]
[0184]
[0185] Among them, ub j and lb j respectively represent the upper and lower limits of the problem in the j-th dimension, std represents the calculation of the standard deviation, U represents the uniform distribution, and sch i is the schedule of the i-th individual, and "Do not make changes" means "no change".
[0186] e) Implement the edge information utilization strategy, and the mathematical model is as follows:
[0187] a = 1.5×(1 - t / T) 2 (98)
[0188] b j ∈U(-a, a) (99)
[0189]
[0190]
[0191] Among them, a is the jitter factor, t is the current iteration number, T is the total iteration number, b j is a random number uniformly distributed between -a and a, ub j and lb j respectively represent the upper and lower limits of the problem in the j-th dimension, is the value of the worst individual in the j-th dimension, U represents the uniform distribution, is the value of the newly generated candidate individual in the j-th dimension, X new is the newly generated candidate individual, fitness represents obtaining the fitness value, X w is the worst individual. Among them, the use of the worst information and edge information can help the rime population to open up new spaces and alleviate the problem that the rime algorithm is prone to falling into local optima.
[0192] f) Update the global optimal individual X b and the current iteration number t;
[0193] g) If t < T, then return to step (c); otherwise, the loop ends and the optimal threshold combination X b is obtained.
[0194] (6): Perform threshold segmentation according to the found threshold combination.
[0195] The present invention performs multi-threshold segmentation on lupus nephritis images such as Figure 4 (color), each algorithm runs independently 6 times, and Wilcoxon signed-rank test analysis is combined with feature similarity (FSIM), structural similarity (SSIM) and peak signal-to-noise ratio (PSNR) for analysis, such as Figure 5-7, where "+", "-" and "=" respectively indicate that HRIME is significantly better than other algorithms, significantly worse than other algorithms and has no significant difference compared with other algorithms, "Mean" indicates the average ranking of all images in the experiment, and "Rank" indicates the overall performance ranking. It can be seen that the performance of the present invention is the best among the algorithms used, and it has strong competitiveness in the field of image segmentation compared with other algorithms.
[0196] from Figure 5-7 It can be seen that the HRIME proposed in the present invention not only has a great improvement on the original rime algorithm (RIME), but also compares with other advanced algorithms, such as differential evolution algorithm (DE), whale optimizer (WOA), grey wolf algorithm (GWO), cuckoo algorithm (CS), improved particle swarm algorithm (BLPSO), comprehensive learning particle swarm algorithm (CLPSO), improved moth to flame algorithm (LGCMFO), moth to flame algorithm (MFO), improved sine and cosine algorithm (m_SCA), and improved grey wolf algorithm (IGWO).
[0197] According to another preferred embodiment of the present invention, relative to a multi-threshold medical image segmentation method based on an improved rime algorithm provided by the present invention, the present invention further provides a multi-threshold medical image segmentation device based on an improved rime algorithm, including a memory and a processor, the memory storing a computer program, wherein the processor implements the steps of the multi-threshold medical image segmentation method based on the improved rime algorithm in the present invention when executing the computer program. It should be noted that the process of the processor of the present invention executing the computer program is consistent with the execution process of each step in the multi-threshold medical image segmentation method based on an improved rime algorithm provided by the present invention, and the details can be referred to the aforementioned related content description.
[0198] A person skilled in the art can understand that all or part of the steps in the above-mentioned embodiment method can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium, such as ROM / RAM, disk, CD-ROM, etc.
[0199] The beneficial effects of the present invention are:
[0200] The partial enhancement strategy and edge information utilization strategy are proposed to improve the rime algorithm. The partial enhancement strategy improves the disadvantage of poor local search of the rime algorithm. The edge information utilization strategy can alleviate the defect of the rime algorithm that it is easy to fall into the local optimum to a certain extent. Through experiments on lupus nephritis images, it can be seen that the present invention has obvious advantages in the competition of various algorithms and further improves the quality of image segmentation.
[0201] The above disclosure is only the preferred embodiment of the present invention, which certainly cannot be used to limit the scope of the present invention. Therefore, equivalent changes made according to the claims of the present invention are still within the scope of the present invention.
Claims
1. A multi-threshold medical image segmentation method based on an improved rime algorithm, characterized in that: The following steps are involved: Step 1: Input the image to be segmented; Step 2: Generate a grayscale image of the input image; Step 3: Use the non-local mean method to generate a non-local mean filtered image; Step 4: Generate a two-dimensional histogram using the non-local mean filtered image and the grayscale image; Step 5: Using the information of the generated two-dimensional histogram and combining it with HRIME, find the optimal threshold combination for the maximum Renyi entropy; Step 6: Perform threshold segmentation according to the optimal threshold combination and output the segmented image; Among them, step 5 is specifically as follows: a. Initialization; b. Carry out soft rime treatment and hard rime treatment; c. Implement some reinforcement strategies; d. Execute edge information utilization strategy; e. Update the global optimal individual X b and the current iteration number t; f. If t < T, where T is the total number of iterations, then go back to step b; otherwise, the loop ends and the globally optimal individual X b is taken as the best threshold combination.
2. The multi-threshold medical image segmentation method based on the improved rime algorithm according to claim 1 is characterized in that Step a includes: initializing the configuration population size N, the problem dimension dim, and the maximum number of iterations T; initializing the population X i,j (i=1,2,...,N;j=1,2,...,dim) and evaluate the fitness value of the population, namely Renyi entropy, to obtain the preliminary optimal individual X b .
3. The multi-threshold medical image segmentation method based on the improved rime algorithm according to claim 2 is characterized in that The mathematical model for soft rime processing is as follows: θ=tπ / 10T (2) β=1-[tw / T] / w (3) in, is the value of the candidate individual of the ith individual in the jth dimension, is the candidate individual of the ith individual, X i is the i-th individual, is the value of the current optimal individual in the jth dimension, h1, h2 and r1 are uniformly distributed random numbers between [0,1], ub j and lb j They represent the upper and lower limits of the problem in the jth dimension, [·] indicates rounding, t is the current iteration number, T is the total number of iterations, π is the circumference of a circle, the value of w is 5, and fitness indicates the fitness value.
4. The multi-threshold medical image segmentation method based on the improved rime algorithm according to claim 3 is characterized in that The mathematical model for hard rime treatment is as follows: in, is the value of the candidate individual of the ith individual in the jth dimension, is the candidate individual of the ith individual, X i is the i-th individual, is the value of the current optimal individual in the jth dimension, r2 is a uniformly distributed random number between 0 and 1, and F i represents the fitness value of the i-th individual, N(F i ) is for F i The value to be standardized, and fitness means to obtain the fitness value.
5. The multi-threshold medical image segmentation method based on the improved rime algorithm according to any one of claims 1 to 4, characterized in that The mathematical model for implementing the partial reinforcement strategy is as follows: Response: For each individual, after completing the corresponding behavior, if the generated candidate individual is better than the current individual, a greedy selection strategy is executed to update the current individual; Planning: This process establishes a schedule sch for each individual, allowing the target to choose how and when to strengthen its behavior according to the schedule. The process is abstracted into the following formula: ο=t / T (8) μ=exp(o-1) (9) Among them, o is the time coefficient, t represents the current iteration number, T represents the total number of iterations, μ represents the probability of selection, dim represents the total problem dimension, v represents the selected behavior, that is, the dimension of individual selection, sch j Represents the value of all individual schedules in the jth dimension. The result of sch sorting in descending order is sch sorted , τ represents the size of the selected behavior subset, Round up, U means uniform distribution, sch sorted,τ Indicates sch sorted The τth element in ; Stimulus: has the following mathematical expression: α=ο+U(0,θ),where θ=∑ j∈ν (sch i,j / max(sch i )) (12) Among them, α is the stimulus coefficient, is the candidate individual of the ith individual, X i is the i-th individual, o is the time coefficient, U represents uniform distribution, θ represents the upper limit of uniform distribution, sch i,j is the value of the plan table of the ith individual in the jth dimension, max means to find the maximum value, sch i is the schedule of the ith individual, St i,v When updating the intermediate difference generated by the i-th individual in the v-th dimension, rand is a uniformly distributed random number between 0 and 1. represents the value of the current optimal individual on dimension v, X i,v represents the value of the current individual on dimension v, X r,v Represents the value of a random individual with a worse fitness value than the current individual on dimension v, It represents the value of the candidate solution in dimension v, and fitness represents the fitness value. Reinforcement: This process involves updating an individual's schedule based on different consequences after taking a behavior. The main steps are as follows: Among them, sch i,v is the value of the plan table of the ith individual in the vth dimension, and fitness represents the fitness value. is the newly generated candidate individual, X i is the i-th individual, R is a constant with a value of 0.7; Rearrangement: If an individual falls into a negative reinforcement cycle during the iteration process, correction is required. The mathematical expression is as follows: Among them, ub j and lb j They represent the upper and lower limits of the problem in the jth dimension, std represents the calculation of the standard deviation, U represents uniform distribution, and sch i is the schedule of the ith individual, sch i,j is the value of the plan table of the ith individual on the jth dimension, X i,j Represents the value of the i-th individual in the j-th dimension.
6. The multi-threshold medical image segmentation method based on the improved rime algorithm according to claim 5, characterized in that Execute edge information utilization strategy, the mathematical model is as follows: a=1.5×(1-t / T) 2 (19) b j ∈U(-a,a)(20) Among them, a is the jitter factor, t is the current iteration number, T is the total iteration number, b j is a random number uniformly distributed between -a and a, ub j and lb j They represent the upper and lower limits of the problem in the jth dimension, is the value of the worst individual in the jth dimension, U represents uniform distribution, is the value of the newly generated candidate individual in the jth dimension, X new is the newly generated candidate individual, X w is the worst individual, and fitness represents the fitness value.
Citation Information
Cited By
Medical image segmentation threshold determination method and device, medium and equipment
CN119068011A
Breast cancer pathological image segmentation method
CN119379728A
Intracranial hemorrhage CT image segmentation method and device, medium and equipment
CN122048972A
