A method for extracting blood clots from CT images of cerebral hemorrhage based on optimized SFLA and clustering

By optimizing SFLA and clustering algorithm combined with adaptive windows and regional morphological operations, the problems of inaccurate blood clot positioning and low extraction efficiency in cerebral hemorrhage CT images are solved, and efficient and accurate blood clot extraction is achieved, reducing diagnostic errors.

CN115511845BActive Publication Date: 2025-07-04LIAONING NORMAL UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211206121.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-30
Publication Date
2025-07-04
Estimated Expiration
2042-09-30

AI Technical Summary

Technical Problem

The existing methods are not accurate enough in cerebral hemorrhage CT images and are inefficient in extraction efficiency, especially in the case of blood clot adhesion and skull adhesion, which is difficult to effectively segment and extract.

Method used

The CT images of cerebral hemorrhage were segmented using an optimized SFLA and clustering algorithm, combined with the two-dimensional prefix summing and elimination algorithm of the adaptive window to remove brain-independent tissues, and the spatial location of the blood clots and skulls was judged through regional morphological operations to achieve accurate extraction of blood clots.

Benefits of technology

It improves the accuracy and efficiency of blood clot extraction, reduces diagnostic errors, and significantly improves the detailed extraction effect of blood clot profile.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115511845B_ABST
    Figure CN115511845B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for extracting blood clots from cerebral hemorrhage CT images based on optimized SFLA and clustering. Aiming at the aggregation characteristics, complex spatial positions and shapes in cerebral hemorrhage CT images, first, a cerebral hemorrhage clustering algorithm and an improved shuffled frog leaping algorithm (MSFLA) are proposed to segment cerebral hemorrhage CT images, effectively improving the convergence speed and global optimization ability, and obtaining a binary segmentation result of cerebral hemorrhage; then a framework for extracting intracranial blood clots (using a two-dimensional prefix sum elimination algorithm based on an adaptive window) is established to remove irrelevant brain tissues, and finally, by judging the spatial positions of the blood clots and the skull, and using regional morphological operations, efficient and accurate extraction of blood clots is achieved, the extraction contour is more detailed, and the diagnostic error is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of medical image segmentation, and in particular to a method for extracting blood clots from CT images of intracerebral hemorrhage based on optimized SFLA and clustering. Background Art

[0002] Intracerebral hemorrhage is a sudden brain disease, usually referring to the bleeding phenomenon caused by the rupture of intracranial blood vessels, with high mortality, disability rate and recurrence rate. The non-invasive examination of intracerebral hemorrhage usually uses CT imaging technology. By scanning the brain structure, it is possible to check whether there is a hematoma, the bleeding location and the amount of bleeding, and to check whether there is brain shift or penetration into the ventricle. The rapid identification and extraction of blood clots in CT images of intracerebral hemorrhage play an important role in assisting doctors in clinical diagnosis.

[0003] At present, there are methods applied to the extraction of lesions in medical images. The Shuffled Frog Leaping Algorithm (SFLA), as an effective metaheuristic method, can effectively process medical images, but there are problems such as slow convergence speed and low optimization accuracy. Chen et al. proposed an integrated multi-strategy-driven hybrid frog leaping algorithm with horizontal and vertical cross-search. By implementing the horizontal and vertical cross-search mechanism, the ability of traditional SFLA to segment multi-threshold images was improved, but it is only effective for invasive ductal carcinoma of the breast. Kollem et al. proposed a probability fuzzy c-means clustering algorithm based on optimized Support Vector Machine (SVM), which uses an improved probability fuzzy c-means clustering algorithm to segment the enhanced denoised image once. However, due to the irregular shape and spatial position of the blood clots in intracerebral hemorrhage, and at the same time, the situation of adhesion between the blood clots and the skull may occur. Therefore, when using the existing methods to extract blood clots from CT images of intracerebral hemorrhage, there are problems such as inaccurate and unclear blood clot localization and low extraction efficiency. Summary of the Invention

[0004] The present invention is to solve the above technical problems existing in the prior art, and provides a method for extracting blood clots from CT images of intracerebral hemorrhage based on optimized SFLA and clustering.

[0005] The technical solution of the present invention is as follows: A method for extracting blood clots from CT images of intracerebral hemorrhage based on optimized SFLA and clustering is carried out according to the following steps:

[0006] Step 1. Segment the CT image of intracerebral hemorrhage through optimized SFLA and clustering, and output a binary image of intracerebral hemorrhage;

[0007] Step 2. Adopt a two-dimensional prefix sum elimination algorithm based on an adaptive window in the intracranial blood clot extraction framework to remove irrelevant brain tissues in the image;

[0008] Step 3. By judging the spatial positions of the blood clots and the skull, use regional morphological operations and set area parameters to extract the blood clots;

[0009] Step 4. Display the extraction result.

[0010] The said Step 1 is preferably as follows:

[0011] Step 1.1 Input the CT image of cerebral hemorrhage, determine the number c of the clustering centers of the cerebral hemorrhage image, and randomly select c initial clustering centers H = {H1, H2,..., H c}, and represent the pixel set of the CT image of cerebral hemorrhage as a frog population X = {X i}, i = 1...n, and the k clustering centers in the pixel block X i are represented as x i1 , x i2 ,...x ik , x ik ∈ H;

[0012] Step 1.2 Based on the initial clustering centers H as the basis for clustering classification, divide the pixels in each pixel block into clusters, and through repeated iterative calculations, obtain the clustering centers of the new classes. The clustering objective function E is shown in Equation (1):

[0013]

[0014] In the formula n i is the number of pixels of the pixel block X i ;

[0015] Construct the fitness function as shown in Equation (2):

[0016]

[0017] Step 1.3 Calculate the fitness value of the pixel block X i with the fitness function f, where the best fitness value is X g ;

[0018] Step 1.4 Divide the n pixel blocks into r subgroups, each subgroup contains o blocks, that is, n = r × o. The best fitness value in the subgroup is X b , and the worst fitness value is X w ;

[0019] Step 1.5 Conduct local search in the subgroup, that is, update X w , and the specific update steps are as follows:

[0020] Step 1.5.1 Define the new moving distance D j ' as:

[0021] D j ' = ωD j+rand(0,1)×(X b -X w ) (3)

[0022] where \(j\in1...n\), and \(D\) j represents the distance of the previous movement, \(\omega\) is the inertia weight coefficient, \(\omega\) Max and \(\omega\) Min represent the initial value and the end value of the inertia weight coefficient respectively, \(t\) is the current iteration number, \(T\) is the total iteration number, and \(rand(0,1)\) is a random number between 0 and 1;

[0023] Calculate the worst fitness value \(NX\) after update according to formula (4) w :

[0024] \(NX\) w = \(OX\) w + \(D\) j ', \(D\) Max ≥ \(D\) j ≥ - \(D\) Max (4)

[0025] where \(OX\) w is the worst fitness value before update, and \(D\) Max represents the maximum step size;

[0026] If \(NX\) w is better than \(OX\) w , then replace \(OX\) with \(NX\) w and go to step 1.5.2, otherwise go to step 1.5.3; w

[0027]

[0028]

[0029] In step 1.5.2, judge whether the local maximum iteration number is reached. If yes, merge and mix all blocks and go to step 1.6, otherwise, return to step 1.5; j ” is defined as:

[0030] \(D\) j ” = rand(0,1)×(X g -X w ) (5)

[0030] Calculate the worst fitness value \(NX\) after update according to formula (6) w :

[0031] \(NX\) w = \(OX\) w + \(D\) j ” (6)

[0032] If \(NX\)w Superior to OX w , then use NX w to replace OX w and perform Step 1.5.2, otherwise perform Step 1.5.4;

[0033] Step 1.5.4 determines whether the calculation of D j ” has reached the set number of times. If so, randomly generate a new solution to replace X w and D j ' ∈ [-D Max , D Max , and then let D j = D' j , return to Step 1.5.2. If not, return to Step 1.5.3;

[0034] Step 1.6 determines whether the global maximum number of iterations has been reached. If not, return to Step 1.4. If so, output the binary cerebral hemorrhage image I;

[0035] The preferred steps of Step 2 are as follows:

[0036] Combined with the binary cerebral hemorrhage image I, a matrix with elements 1 and 0 is obtained. After adding the number of elements 1 in the matrix, set the adaptive window values {W, H, θ}, and traverse the elements row by row; if the total number of elements 1 in the window is less than the current set window threshold s, the central element of the window is brain-unrelated tissue, and the brain-unrelated tissue is eliminated to obtain the binary cerebral hemorrhage image U;

[0037] The preferred steps of Step 3 are as follows:

[0038] Label the adhesion regions of the binary cerebral hemorrhage image U, and the corresponding label values are 1, 2,... l, where l is the total number of adhesion regions, and calculate the sum of the areas of each adhesion region:

[0039]

[0040] labeled is the labeled element, d is the label value, p and q are the number of rows and columns of the matrix;

[0041] Compare S d with the areas of all foreground regions in the binary cerebral hemorrhage image U. If they are equal, the skull is adhered to the blood clot. Otherwise, the skull is not adhered to the blood clot;

[0042] If the skull is adhered to the blood clot, perform regional morphological operations on the cerebral hemorrhage CT image, and obtain a complete blood clot by setting the area parameter σ. The regional morphological operations are as follows:

[0043] Let A and B be two-dimensional integer spaces Z 2Among the two sets, A represents the set of skulls and blood clots in the binary image U, B is a structuring element, and z is the pixel value of the skull and blood clot;

[0044] The erosion of A by B is denoted as A Θ B:

[0045]

[0046] The dilation of A by B is denoted as :

[0047]

[0048] is obtained by mapping the structuring element B about its own origin, and z is the displacement of the origin;

[0049] The opening of A by B is denoted as

[0050] If the skull and the blood clot are adhered, the blood clot is directly extracted.

[0051] In view of the aggregation characteristics, complex spatial positions and shapes in the CT images of cerebral hemorrhage, the present invention firstly proposes a cerebral hemorrhage clustering algorithm and an improved Shuffled Frog Leaping Algorithm (MSFLA) to segment the CT images of cerebral hemorrhage, effectively improving the convergence speed and global optimization ability, and obtaining a binary segmentation result of cerebral hemorrhage; then an intracranial blood clot extraction framework (using a two-dimensional prefix sum elimination algorithm based on an adaptive window) is established to remove irrelevant brain tissues, and finally, by judging the spatial positions of the blood clot and the skull and using regional morphological operations, efficient and accurate extraction of the blood clot is achieved, the extraction contour is more detailed, and the diagnostic error is reduced. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] Figure 1 is a flowchart of an embodiment of the present invention.

[0053] Figure 2 is a flowchart of the cerebral hemorrhage clustering algorithm of an embodiment of the present invention.

[0054] Figure 3 is a flowchart of the improved SFLA algorithm of an embodiment of the present invention.

[0055] Figure 4 is a schematic diagram of the intracranial blood clot extraction framework of an embodiment of the present invention.

[0056] Figure 5 is a schematic diagram of erosion and dilation of an embodiment of the present invention.

[0057] Figure 6 is a schematic diagram of the morphological operation of an embodiment of the present invention.

[0058] Figure 7 This is a comparison graph of the embodiments of the present invention and the SFLA extraction results.

[0059] Figure 8 This is an evaluation table of the embodiments of the present invention and the SFLA extraction results.

[0060] Figure 9 This is a comparison graph of the segmentation results of the embodiments of the present invention and the existing algorithms.

[0061] Figure 10 This is a comparison table of the time efficiency of the embodiments of the present invention and the existing algorithms.

[0062] Figure 11 This is an evaluation graph of the segmentation results of the embodiments of the present invention and the existing algorithms.

[0063] Figure 12 This is a comparison graph of the results of eliminating and not eliminating irrelevant brain tissues in the embodiments of the present invention.

[0064] Figure 13 This is an evaluation table of the comparison results of eliminating and not eliminating irrelevant brain tissues in the embodiments of the present invention. Detailed implementation manners

[0065] A method for extracting blood clots from CT images of cerebral hemorrhage based on optimized SFLA and clustering (C-MSFLA) of the present invention is as Figure 1 shown and is carried out according to the following steps:

[0066] Step 1. Segment the CT image of cerebral hemorrhage through optimized SFLA and clustering, and output a binary image of cerebral hemorrhage:

[0067] Step 1.1 Input the CT image of cerebral hemorrhage, determine the number c of clustering centers of the cerebral hemorrhage image, and randomly select c initial clustering centers H = {H1, H2,..., H c}, represent the pixel set of the CT image of cerebral hemorrhage as a frog population X = {X i} composed of n pixel blocks, i = 1... n, and the k clustering centers in the pixel block X i are represented as x i1 , x i2 ,... x ik , x ik ∈ H;

[0068] Step 1.2 Based on the initial clustering centers H as the basis for clustering classification, divide the pixels in each pixel block into clusters, and through repeated iterative calculations, obtain the clustering centers of the new classes, that is, the cerebral hemorrhage clustering algorithm; taking the i-th pixel block of the CT image of cerebral hemorrhage as an example, as Figure 2As shown, there are randomly selected cluster centers in the \(i\)-th pixel block of the cerebral hemorrhage CT image. Based on the randomly selected cluster centers, new classes are divided, new cluster centers are calculated, and then re-divided and re-calculated... The iterative calculation is repeated until the cluster centers remain unchanged, and the optimal clustering result, that is, the cluster centers of the new classes, is obtained.

[0069] The clustering objective function \(E\) is shown in Equation (1):

[0070]

[0071] In the formula \(n\) i is the number of pixels in the pixel block \(X\) i ;

[0072] The fitness function is constructed as shown in Equation (2):

[0073]

[0074] Step 1.3 is processed using the improved multi - swarm frog leaping algorithm (MSFLA) as Figure 3 shown. First, the parameters of the cerebral hemorrhage CT image and the pixel set are initialized, and then the fitness value of the pixel block \(X\) i is calculated using the fitness function \(f\), where the best fitness value is \(X\) g ;

[0075] In Step 1.5, local search is performed in the subgroup, that is, \(X\) w is updated. The specific update steps are as follows:

[0076] In Step 1.5.1, a new moving distance \(D'\) is defined on the \(j\)-th block as: j :

[0077] \(D'\) j =\(\omega D\) j +rand(0, 1)×(\(X\) b -\(X\) w ) (3)

[0078] where \(j\in1...n\). In the formula, \(D\) j represents the distance of the previous movement, \(\omega\) is the inertia weight coefficient, \(\omega\) Max and \(\omega\) Min represent the initial value and the end value of the inertia weight coefficient, \(t\) is the current iteration number, \(T\) is the total iteration number, and rand(0, 1) is a random number between 0 and 1;

[0079] The worst fitness value \(NX\) w after update is calculated according to formula (4):

[0080] \(NX\)w = OX w + D j ', D Max ≥ D j ≥ -D Max (4)

[0081] Where OX w is the worst fitness value before update, and D Max represents the maximum step size;

[0082] If NX w is better than OX w , then replace OX w with NX w and perform Step 1.5.2, otherwise perform Step 1.5.3;

[0083] In Step 1.5.2, judge whether the local maximum iteration times are reached. If yes, merge and mix all blocks and perform Step 1.6. Otherwise, return to Step 1.5;

[0084] In Step 1.5.3, define a new moving distance D j " as:

[0085] D j " = rand(0, 1) × (X g - X w ) (5)

[0086] Calculate the worst fitness value NX w after update according to formula (6):

[0087] NX w = OX w + D j " (6)

[0088] If NX w is better than OX w , then replace OX w with NX w and perform Step 1.5.2, otherwise perform Step 1.5.4;

[0089] In Step 1.5.4, judge whether the calculation of D j " reaches the set times. If yes, randomly generate a new solution to replace X w and D j ' ∈ [-D Max , D Max , then let D j = D' j , return to Step 1.5.2. Otherwise, return to Step 1.5.3;

[0090] Step 1.6 Determine whether the global maximum number of iterations is reached. If not, return to Step 1.4. If yes, output the intracerebral hemorrhage binary image I;

[0091] Step 2. As Figure 4 shown:

[0092] Adopt the two-dimensional prefix sum elimination algorithm based on an adaptive window in the intracranial blood clot extraction framework to remove irrelevant brain tissues in the image:

[0093] Combine with the intracerebral hemorrhage binary image I to obtain a matrix with elements 1 and 0. After adding up the number of elements 1 in the matrix, set the adaptive window values {W, H, θ}, and traverse the elements row by row; if the total number of elements 1 in the window is less than the currently set window threshold s, the central element of the window is an irrelevant brain tissue, and the irrelevant brain tissue is eliminated to obtain the binary intracerebral hemorrhage image U;

[0094] Step 3. Extract the blood clot by judging the spatial positions of the blood clot and the skull, and using regional morphological operations and setting area parameters:

[0095] Label the connected regions of the binary intracerebral hemorrhage image U, and the corresponding label values are 1, 2,... l, where l is the total number of connected regions, and calculate the sum of the areas of each connected region:

[0096]

[0097] labeled is the labeled element, d is the label value, and p and q are the number of rows and columns of the matrix;

[0098] Compare S d with the areas of all foreground regions in the binary intracerebral hemorrhage image U. If they are equal, the skull and the blood clot are adhered; otherwise, the skull and the blood clot are not adhered;

[0099] If the skull and the blood clot are adhered, as Figure 5 , Figure 6 shown, perform regional morphological operations on the intracerebral hemorrhage CT image, and obtain the complete blood clot by setting the area parameter σ. The regional morphological operations are as follows:

[0100] Let A and B be two sets in the two-dimensional integer space Z 2 . A represents the set of the skull and the blood clot in the binary image U, B is a structuring element, and z is the pixel value of the skull and the blood clot;

[0101] The erosion of A by B is denoted as A Θ B:

[0102]

[0103] The dilation of A by B is denoted as :

[0104]

[0105] Obtained by mapping the structural element B with respect to its own origin, and z is the displacement of the origin;

[0106] The opening operation of B on A is denoted as

[0107] If the skull adheres to the blood clot, directly extract the blood clot.

[0108] Step 4. Display the extraction result.

[0109] Experiment:

[0110] 1. Comparative experiment between the embodiment of the present invention (C-MSFLA) and the SFLA extraction method

[0111] Select 4 brain hemorrhage CT images with adhesion between the blood clot and the skull (serial numbers 1-4) and 4 brain hemorrhage CT images without adhesion between the blood clot and the skull (serial numbers 5-8), and use the embodiment of the present invention (C-MSFLA) and the SFLA extraction method to extract the blood clot respectively. The result comparison diagram is as Figure 7 shown, and the JAC, Dice, and Acc evaluation tables are as Figure 8 shown.

[0112] 2. Comparative experiment between the embodiment of the present invention (C-MSFLA) and the segmentation results of existing algorithms

[0113] Select 3 brain hemorrhage CT images (A, B, C), 3 brain lobe hemorrhage CT images (D, E, F), and 2 cerebellar hemorrhage CT images (G, H), and use the embodiment of the present invention (C-MSFLA) and the methods described in the comparative literature [1]-[6] to extract the blood clot respectively. The segmentation result comparison diagram is as Figure 9 shown, the time efficiency comparison table is as Figure 10 shown, and the JAC, Dice, and Acc evaluation diagrams are as Figure 11 shown.

[0114] 3. Comparative experiment on eliminating and not eliminating irrelevant brain tissues in the embodiment of the present invention

[0115] Select 3 ( Figures 1 - 3 ) brain hemorrhage CT images, and use two methods of the embodiment of the present invention (C-MSFLA) to extract the blood clot, one is to eliminate (with step 2) and the other is not to eliminate (without step 2) the irrelevant brain tissues. The segmentation result comparison diagram is as Figure 12 shown, and the JAC, Dice, and Acc evaluation diagrams are as Figure 13 shown.

[0116] The results show that the time efficiency and accuracy of blood clot extraction in the present invention are superior to those of the control group.

[0117] Comparative literature:

[0118] [1] Kollem S, Reddy KR, Rao DS (2020) An optimized SVM based possibilistic fuzzy c-means clustering algorithm for tumor segmentation. Multimedia Tools and Applications 80(1):409-437.

[0119] [2] Hashim FA, Kashif H, Essam H et al (2021) Archimedes optimization algorithm: a new metaheuristic algorithm for solving optimization problems. Applied Intelligence 51:1531-1551.

[0120] [3] Dahiya P, Kumar A, Kumar A, Nahavandi B (2022) Modified Artificial Bee Colony Algorithm-Based Strategy for Brain Tumor Segmentation. Computational Intelligence and Neuroscience 2022.

[0121] [4] Fang L, Pan X, Yao Y et al (2020) A hybrid active contour model for ultrasound image segmentation. Soft Computing 24:18611-18625.

[0122] [5] He J, Pei J (2019) Image segmentation method based on improved fuzzy Chan-Vese model. Multimedia Tools and Applications 78(7):8669-8681.

[0123] [6]Pratondo A, Chui C, Ong S(2017)Integrating machine learning with region-based active contour models in medical image segmentation. Journal of Visual Communication and Image Representation 43:1-9。

Claims

1. A method for extracting blood clots from CT images of cerebral hemorrhage based on optimized SFLA and clustering, characterized in that Proceed as follows: Step 1. Segment the cerebral hemorrhage CT image through optimized SFLA and clustering, and output the binary cerebral hemorrhage image; Step 2. Adopt the two-dimensional prefix sum elimination algorithm based on an adaptive window in the intracranial blood clot extraction framework to remove irrelevant brain tissues in the image; Step 3. Extract the blood clot by judging the spatial positions of the blood clot and the skull, using regional morphological operations and setting area parameters; Step 4. Display the extraction result; The specific steps of Step 1 are as follows: Step 1.1 Input the CT image of cerebral hemorrhage, determine the number c of clustering centers of the cerebral hemorrhage image, and randomly select c initial clustering centers H = {H1, H2,..., H c}, and represent the pixel set of the CT image of cerebral hemorrhage as a frog population X = {X i}, where i = 1...n, and the k clustering centers in the pixel block X i are represented as x i1 , x i2 ,... x ik , and x ik ∈ H; Step 1.

2. Based on the initial clustering center H as the basis for clustering classification, divide the pixels in each pixel block into clusters. After repeated iterative calculations, obtain the clustering center of the new class. The clustering objective function E is shown in Equation (1): where n i is the number of pixel points of pixel block X i ; Construct the fitness function as shown in Equation (2): Step 1.3 calculates the fitness value of pixel block X with fitness function f, where the best fitness value is X i ; g ​ Step 1.4 divides n pixel blocks into r subgroups, with each subgroup containing o blocks, i.e., n = r × o. The value with the best fitness in the subgroup is X b , and the value with the worst fitness is X w ; Step 1.5 Perform local search in the subgroup, i.e., X w is updated; Step 1.

6. Judge whether the global maximum number of iterations is reached. If not, return to Step 1.

4. If so, output the binary cerebral hemorrhage image I; The specific steps of Step 3 are as follows: Label the connected regions of the binary cerebral hemorrhage image U. The corresponding label values are 1, 2,... l, where l is the total number of connected regions, and calculate the sum of the areas of each connected region: labeled is the labeled element, d is the label value, and p and q are the number of rows and columns of the matrix; Compare S d and the areas of all foreground regions in the binary intracerebral hemorrhage image U. If the two are equal, then the skull adheres to the blood clot; otherwise, the skull does not adhere to the blood clot. If the skull is adhered to the blood clot, perform regional morphological operations on the cerebral hemorrhage CT image, and obtain the complete blood clot by setting the area parameter σ. The regional morphological operations are as follows: Let A and B be two sets in the two-dimensional integer space Z 2 where A represents the set of skulls and blood clots in the binary image U, and B is a structuring element; The erosion of B on A is denoted as AΘB: The expansion of B with respect to A is expressed as It is obtained by mapping the structural element B with respect to its own origin. The opening operation of B with respect to A is denoted as If the skull is adhered to the blood clot, directly extract the blood clot.

2. The method for extracting blood clots from cerebral hemorrhage CT images based on optimized SFLA and clustering according to claim 1, wherein: The specific steps for updating X in step 1.5 are as follows: w ​ Step 1.5.1 Define a new moving distance D on the j-th block j ' is as follows: D j ' = ωD j + rand(0,1)×(X b - X w ) (6) where \(j\in1...n\), and \(D\) j represents the distance of the previous movement, \(\omega\) is the inertia weight coefficient, \(\omega\) Max and \(\omega\) Min represent the initial value and the end value of the inertia weight coefficient respectively, \(t\) is the current iteration number, \(T\) is the total iteration number, and \(rand(0,1)\) is a random number between 0 and 1; Calculate the worst value NX of the updated fitness according to formula (4). w : NX w = OX w + D j ', D Max ≥ D j ≥ -D Max (7) where OX w is the worst fitness value before update, and D Max represents the maximum step size; If NX w is superior to OX w , then replace OX with NX w and perform step 1.5.2; otherwise, perform step 1.5.3 w ; Step 1.5.

2. Judge whether the local maximum number of iterations is reached. If so, merge and mix all blocks and perform Step 1.

6. Otherwise, return to Step 1.5; Step 1.5.3 Define a new moving distance D on the j-th block j ” is: D j ” = rand(0,1)×(X g -X w ) (8) Calculate the worst value NX of the updated fitness according to formula (6). w : NX w = OX w + D j ” (9) If NX w Better than OX w , then NX w Alternative to OX w And proceed to step 1.5.2, otherwise proceed to step 1.5.4; Step 1.5.4 Determine D j Whether the calculation of "" has reached the set number of times. If yes, randomly generate a new solution to replace X w and D j ' ∈ [-D Max , D Max , and then let D j = D' j , return to Step 1.5.

2. If no, return to Step 1.5.3; The said Step 2 is as follows: Combined with the binary image I of cerebral hemorrhage, a matrix with elements 1 and 0 is obtained. After adding up the number of elements 1 in the matrix, an adaptive window value {W I , H I , θ} is set, and the elements are traversed row by row; if the total number of elements 1 in the window is less than the currently set window threshold s, the central element of the window is brain-irrelevant tissue, and the brain-irrelevant tissue is eliminated to obtain the binary cerebral hemorrhage image U.