Multi-threshold image segmentation method and device, computer equipment and storage medium
Through the improved social optimizer (SBO) algorithm, combined with fitness proportional roulette and dynamic weight parameters, the problems of high computational complexity and local optimality in multi-threshold image segmentation are solved, and high-precision and robust medical image segmentation are achieved, which is suitable for real-time analysis.
Patent Information
- Application Number
- CN202511012993.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-23
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2045-07-23
AI Technical Summary
The existing multi-threshold image segmentation method has high computational complexity in high-dimensional data processing and is prone to local optimization, which is difficult to meet the high-precision clinical needs. Traditional methods do not fully combine the local feature optimization threshold of image, and group intelligence algorithms lack dynamic search strategies and group collaboration mechanisms.
The improved social optimizer (SBO) algorithm is adopted, combining the fitness proportional roulette algorithm and dynamic weight parameters, and iteratively optimizes the multi-threshold combination, and introduces the resource update mechanism of elite individuals and global optimal individuals to dynamically balance global exploration and local development, and optimizes threshold selection.
It significantly improves the accuracy and robustness of multi-threshold image segmentation, reduces redundant search, accelerates convergence speed, is suitable for real-time medical image analysis, and provides an efficient image segmentation solution.
Smart Images

Figure CN120510173A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of image processing, and in particular relates to a method, device, computer equipment and storage medium for image segmentation. Background Art
[0002] In today's data-driven machine learning field, classification tasks and high-dimensional data processing face numerous challenges, particularly multi-threshold image segmentation. When processing high-dimensional data such as medical images, for example, multi-threshold segmentation of IDC breast cancer histology images in medical image analysis provides a precise foundation for subsequent quantitative analysis by segmenting the image's multimodal intensity distribution (e.g., distinguishing tumor from normal tissue). However, when the number of thresholds increases to 18, the dimensionality of the solution space expands dramatically. Traditional methods, due to their high computational cost and tendency to fall into local optimality, struggle to meet the high-precision clinical requirements.
[0003] Existing methods all have significant limitations in multi-threshold segmentation. Traditional methods such as Otsu rely on exhaustive search to determine threshold combinations, resulting in excessive computational complexity in high-dimensional threshold spaces. While heuristic algorithms (such as differential evolution) improve efficiency through random search, they fail to fully incorporate local image features (such as texture) to optimize thresholds, resulting in suboptimal segmentation results. A more common problem is that existing swarm intelligence algorithms (such as PSO and ACO) often focus on a single objective (such as classification error or segmentation accuracy) during optimization, lacking dynamic search strategies and swarm collaboration mechanisms. This leads to a rapid loss of population diversity and a tendency to fall into local optimality.
[0004] To address these challenges, multi-threshold segmentation requires more efficient optimization methods. In a single-objective optimization framework, the mismatch between threshold selection and image characteristics further increases the difficulty of optimization for multi-threshold segmentation. Summary of the Invention
[0005] In order to solve the problem of threshold selection in multi-threshold image segmentation, the present invention provides a method, apparatus, computer equipment and medium for multi-threshold image segmentation.
[0006] A multi-threshold image segmentation method, the method comprising: Obtain the target medical image to be segmented and convert it into grayscale; Initialize the SBO algorithm, generate an initial population of multiple threshold combinations based on the grayscale intensity range, and construct a fitness function based on maximizing Renyi entropy; select the best individuals from the initial population based on the fitness function value to form an elite population; Iterate the SBO algorithm, and in each iteration, dynamically select elite individuals from the elite population based on the fitness proportional roulette algorithm, generate dynamic weight parameters based on the number of iterations, and update the individual positions based on the dynamic weight parameters and the elite individuals; Based on the update results, the target individuals are screened through the fitness function. For the target individuals, the position is updated by integrating the resources of the elite individuals and the global optimal individuals. For non-target individuals, some dimensions are randomly updated to the values of the dimensions corresponding to the elite individuals. The fitness values of all individuals are re-evaluated, and the elite population is updated to retain the current optimal solution. The iteration is stopped after the number of iterations reaches the preset number, and the output optimal solution is used as the optimal multi-threshold combination to segment the target medical image.
[0007] Optionally, after obtaining the target medical image to be segmented and converting it into grayscale, the method further includes: Perform non-local mean filtering denoising on the target medical image; A two-dimensional joint histogram is constructed based on the grayscale image and the denoised image to obtain the feature information of the fusion intensity and texture information; The iterative process of SBO is optimized through the feature information of the two-dimensional joint histogram.
[0008] Optionally, the calculation formula of the fitness function is: ; in, is the Renyi entropy, k is the number of thresholds, m is the number of gray levels of the image, For the The probability of a region, A constant parameter.
[0009] Optionally, the dynamic weight parameters include: ; ; in, and is the dynamic weight parameter, is the maximum number of function evaluations, is the current evaluation number, is the individual index, is a normally distributed random number.
[0010] Optionally, the position update formula for updating the individual position according to the dynamic weight parameter and the elite individual is: ; in, is a random number within the preset range, R 1. R 2 is an independent Gaussian random number, For the The individual's own historical position, For elite individual positions, is the global optimal position.
[0011] Optionally, the update formula for the target individual is: ; in is a randomly selected dimension index, is the value of the i-th individual in the t1 dimension, For the Elite individuals in the dimension The value of The global optimal position is in dimension The value of .
[0012] Optionally, the fitness proportional roulette algorithm dynamically selects elite individuals from the elite population, and the formula is: ; in, is the Rth elite individual, is the tth individual, For the population size.
[0013] A device for image segmentation, comprising: An acquisition module is used to acquire the target image to be segmented and convert it into grayscale; The initialization module is used to initialize the SBO algorithm, generate an initial population of multiple threshold combinations based on the grayscale intensity range, and construct a fitness function based on maximizing the Renyi entropy; the optimal individuals are selected according to the fitness function value to form an elite population; An iteration module is used to iterate the SBO algorithm. In each iteration, elite individuals are dynamically selected from the elite population based on the fitness proportional roulette algorithm, dynamic weight parameters are generated based on the number of iterations, and individual positions are updated according to the dynamic weight parameters and the elite individuals. The update module is used to select target individuals based on the update results through the fitness function. For target individuals, the position is updated by fusing the resources of elite individuals and the global optimal individual. For non-target individuals, some dimensions are randomly updated to the values of the dimensions corresponding to the elite individuals. The fitness values of all individuals are re-evaluated and the elite population is updated to retain the current optimal solution. The segmentation module is used to stop iteration after the number of iterations reaches a preset number, and use the output optimal solution as the optimal multi-threshold combination to segment the target medical image.
[0014] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the multi-threshold image segmentation method is implemented.
[0015] A computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned multi-threshold image segmentation method when executing the program.
[0016] The multi-threshold image segmentation method provided by the present invention has the following beneficial effects: The present invention uses an improved SBO algorithm for multi-threshold selection, introduces a fitness proportional roulette algorithm and dynamic weight parameters, and adopts corresponding position updates for different individuals, thereby improving the optimization results of the SBO algorithm for multi-threshold selection. Among them, by updating the individual positions through dynamic weight parameters, it is possible to dynamically balance global exploration and local development according to the number of iterations, avoid the local optimal problem caused by premature convergence of traditional methods, and significantly improve the segmentation accuracy of complex medical images; through the elite population dynamic update mechanism, redundant searches are reduced, the convergence speed is accelerated, and it is suitable for real-time medical image analysis scenarios. In this way, the present invention realizes efficient search in high-dimensional threshold space through the collaboration and competition mechanism of the social group intelligent SBO algorithm, providing a solution for medical image segmentation with high accuracy, strong robustness and optimized computational efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] To more clearly illustrate the embodiments of the present invention and its design, the following briefly introduces the drawings required for this embodiment. The drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be derived from these drawings without inventive effort.
[0018] Figure 1 The figure is a flowchart of a multi-threshold image segmentation method provided by the present invention according to an exemplary embodiment.
[0019] Figure 2 The figure is a schematic diagram of elite individual selection provided according to an exemplary embodiment of the present invention.
[0020] Figure 3 A schematic diagram of a multi-source guided location update according to an exemplary embodiment of the present invention is provided.
[0021] Figure 4 This is a schematic diagram of the effects of image segmentation using the SBO algorithm provided by an exemplary embodiment of the present invention and other algorithms.
[0022] Figure 5 This is a block diagram of a multi-threshold image segmentation device provided according to an exemplary embodiment of the present invention. DETAILED DESCRIPTION
[0023] In order to enable those skilled in the art to better understand the technical solution of the present invention and to be able to implement it, the present invention is described in detail below with reference to the accompanying drawings and specific embodiments. The following embodiments are only used to more clearly illustrate the technical solution of the present invention and are not intended to limit the scope of protection of the present invention.
[0024] In order to solve the above problems, the present invention proposes a solution based on a social-based optimizer (SBO).
[0025] The technical solutions provided by various embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0026] First, the present invention provides a multi-threshold image segmentation method, specifically Figure 1 As shown, the following steps are included: S101: Obtain a target medical image to be segmented and convert it into grayscale.
[0027] Specifically, for the acquired target medical image, in addition to grayscale conversion, the target medical image to be segmented is also subjected to non-local mean filtering denoising processing; then, a two-dimensional joint histogram is constructed based on the grayscale image and the denoised image to obtain the feature information of the fusion intensity and texture information. The feature information of the two-dimensional joint histogram can provide a rich feature space for the SBO algorithm in the subsequent steps, thereby optimizing the iterative process of SBO.
[0028] For example, using the Invasive Ductal Carcinoma (IDC) breast cancer histology dataset, select 9 pathological sections numbered A to I and resample them uniformly to Pixels. The image is converted to grayscale format and the non-local means filtering (NLM) method is applied to suppress noise while preserving image details. Based on the original grayscale image and the image processed by NLM, a two-dimensional joint histogram is constructed to fuse intensity and texture information.
[0029] S102, initialize the SBO algorithm, generate an initial population of multi-threshold combinations based on the grayscale intensity range, and construct a fitness function based on maximizing the Renyi entropy; select the best individuals from the initial population according to the fitness function value to form an elite population.
[0030] In one embodiment, the SBO algorithm is divided into four phases. Phase 1 is the initialization phase, in which the population is initialized after parameter input, the initial fitness is calculated, and the initial optimal solution is obtained based on the initial fitness, laying the foundation for subsequent steps. Phase 2 is the elite interaction phase, in which the dynamic weight parameters R1, R2, R3, and R4 are calculated using the number of iterations. The position of the solution is updated based on the dynamic weight parameters, and the solution is boundary checked and controlled to ensure the rationality and effectiveness of the solution. Phase 3 is the resource acquisition phase, in which the algorithm generates a random solution vector m and dynamically adjusts its dimension, establishing a differential evolution mechanism to extract effective information from inferior solutions, and forming a resource replenishment flow after boundary control. Finally, Phase 4 enters the solution set evaluation phase, in which a dual-population parallel strategy is used for greedy selection. The population is updated by comparing the advantages and disadvantages of the new solution with the original population. The iteration flag and the global optimal solution are simultaneously updated. When the preset termination condition (such as the maximum number of iterations or convergence threshold) is reached, the final result is output. Otherwise, a new round of iteration is triggered. The entire process forms a dynamic balance between solution space exploration and development through the dual-driven mechanism of elite guidance and resource competition, ultimately achieving efficient problem solving.
[0031] Specifically, the parameters are configured first, the threshold values are set to 6, 12, and 18, and the population position is initialized to Corresponding to grayscale intensity. The fitness function adopts the Renyi entropy maximization criterion: ; in, is the Renyi entropy, k is the number of thresholds. In multi-threshold image segmentation, k thresholds will divide the image grayscale into k+1 regions. m is the number of gray levels of the image, j is the current grayscale level. Generally speaking, for an 8-bit image, m=256. For the The probability of a region is usually the ratio of the number of pixels in the region to the total number of pixels. It is a parameter with a value range of 0<γ<1. It can adjust the characteristics of the function. In the present invention, it can be taken as 0.5.
[0032] S103, iterating the SBO algorithm. In each iteration, dynamically selecting elite individuals from the elite population based on the fitness proportional roulette algorithm, generating dynamic weight parameters based on the number of iterations, and updating individual positions based on the dynamic weight parameters and the elite individuals.
[0033] In this step, an elite-driven search mechanism is adopted, firstly performing elite selection and dynamic weight allocation.
[0034] Specifically, if Figure 2As shown, elite individuals are selected from the elite population: In the process, elite individuals are selected through the fitness proportional roulette algorithm , the probability is: ; in, is the Rth elite individual, is the tth individual, For the population size.
[0035] Dynamic weight design: Introducing dynamic parameters R3 and R4 to balance global exploration and local development: Defined as: ; in is the maximum number of function evaluations, is the current evaluation number, is the individual index, is a normally distributed random number. As the number of iterations increases, it gradually shifts towards local development.
[0036] Acts as a scaling factor to enhance exploration diversity.
[0037] Secondly, the multi-source guided position update is performed, as follows Figure 3 shown.
[0038] Hybrid search strategy: individual position updates are integrated with their own historical positions , elite individual position and the global optimal position ,Specifically, the location update rule of individual location is: ; in, is a random number within the preset range, R 1. R 2 is an independent Gaussian random number, For the The individual's own historical position, For elite individual positions, is the global optimal position.
[0039] Random parameter constraints: , are independent Gaussian random numbers, weighting the influence of elite guidance and global optimality respectively; is a random number within a preset range, which can be (0,1); the search step is determined by , Natural generation and The scaling remains within a reasonable range.
[0040] S104: Update the positions of the individuals based on the update results, re-evaluate the fitness values of all individuals after the positions are updated, and update the elite population to retain the current optimal solution.
[0041] Specifically, based on the update results, the fitness function is used to select target individuals. For target individuals, their positions are updated by combining the resources of elite individuals and the global optimal individual. For non-target individuals, some dimensions are randomly updated to the values corresponding to the dimensions of the elite individuals. The fitness values of all individuals are re-evaluated, and the elite population is updated to retain the current optimal solution. The individual fitness is first evaluated based on the update results, then compared with a preset fitness threshold. Individuals with fitness values exceeding the threshold are marked as target individuals.
[0042] In this step, resource integration and population management are required based on the update results.
[0043] When the position of an individual is outside the influence area of an elite individual, resources are discarded and the individual position of the individual is eliminated; for the target individual, the position is updated by integrating the resources of the family elite individual and the global optimal individual; for non-target individuals, some dimensions are randomly updated to the values of the corresponding dimensions of the family elite; the fitness values of all individuals are re-evaluated, and the elite population is updated to retain the current optimal solution.
[0044] Specifically, the target individual is screened through the fitness function, and resources are inherited for the target individual, that is, the successful individual.
[0045] For the flag The individual (representing the target individual that has passed the fitness screening) updates its position by integrating the resources of the family elite individual and the global optimal individual. The update formula is: ; in is a randomly selected dimension index, For the Elite individuals in the dimension The value of The global optimal position is in dimension The value of .
[0046] For non-target individuals, i.e. failed individuals, resources are reset.
[0047] For the flag Individuals (indicates non-target individuals that have not passed the fitness screening), from the family elite individuals Get resources from , and only update some dimensions. Specific steps:
[0048] Initialize dimension selection vector is a zero vector with a length of .
[0049] Shuffle dimension indices , and the front dimensions are set to 1: ; The update formula is: ; like , then let .
[0050] After each round of iteration, based on the updated individual position and fitness , re-evaluate and update the elite population and the global optimal solution : For each individual ,like ,but ,otherwise .
[0051] renew is the best individual in the current population.
[0052] Repeat the elite participation, resource acquisition and resource evaluation phases until the termination condition is met (such as reaching the maximum number of function evaluations). ).
[0053] S105 , stopping the iteration after the number of iterations reaches a preset number, and using the output optimal solution as the optimal multi-threshold combination to segment the target medical image.
[0054] In this step, the present invention verifies the image segmentation task. A smaple image is input, converted into a grayscale image (Grayscale image), and a non-local means image (Non-local means image) is generated at the same time. Next, a 2D histogram based on NLM (non-local mean) is constructed based on the non-local mean image, and this histogram presents a specific distribution pattern. Subsequently, a threshold selection (Threshold Selection) is performed, and by analyzing the characteristics of the histogram, a suitable threshold is determined for image segmentation. Finally, the grayscale image is segmented according to the selected threshold to obtain a segmented image (Segmentedimage), and a jet colormap image (Jet colormap image) is further generated. The jet colormap image maps different segmented areas with different colors to intuitively display the results of image segmentation. The entire process realizes the conversion from the original image to the segmented image and the jet colormap image through steps such as image conversion, histogram construction, and threshold selection.
[0055] First, the present invention used nine breast cancer tissue slide images from the IDC dataset. These images were standardized and resized to 512×512 pixels. Before segmentation, the images were grayscaled, converting the original color images to grayscale for better analysis of image intensity information. Next, the present invention applied non-local means (NLM) denoising technology to remove noise while preserving detail. The denoised images provided clearer image data, ensuring the efficiency of the subsequent segmentation process.
[0056] The next step is to construct a two-dimensional histogram. By combining the grayscale image with its denoised version, the resulting 2D histogram not only contains the image's intensity information but also incorporates its texture features, providing a richer basis for threshold selection. Based on this foundation, the SBO algorithm begins its work, searching for the optimal threshold set.
[0057] In the threshold selection process, the present invention transforms the threshold optimization problem into a global optimization problem through the SBO framework, and uses the global search capability of SBO to find the optimal solution in the high-dimensional solution space. Specifically, SBO optimizes Renyi entropy as a fitness function to find the optimal threshold that can maximize the information and uniformity of the image region. This process can effectively identify the segmentation thresholds of different regions, because maximizing Renyi entropy is essentially looking for a threshold combination that can maximize the information difference between image subregions and reduce the internal information redundancy of each subregion. By optimizing Renyi entropy, SBO can accurately locate the turning points of different intensity or texture features in the image, so that the image is segmented into multiple regions with clear boundaries and high internal uniformity.
[0058] Once the optimal threshold is determined, it can be applied to the original image to perform multi-threshold image segmentation. This segmentation process divides the image into multiple distinct regions, each representing a specific intensity range or texture feature, facilitating subsequent analysis and processing. To visually demonstrate the segmentation results, the present invention post-processes each segmentation result and converts the segmented image into a Jet color map. This allows for a clearer view of the divisions between different regions and enhances image visualization.
[0059] Ultimately, through this multi-stage segmentation process, the present invention can accurately delineate lesion areas in breast cancer images, providing valuable information for medical diagnosis. The successful implementation of this process demonstrates the high potential of the SBO algorithm for image segmentation, particularly when processing complex medical images, effectively improving segmentation accuracy and efficiency.
[0060] To comprehensively evaluate the performance of each algorithm, this paper uses multiple evaluation metrics, including average fitness value, error rate, and number of selected features. For the feature selection task, multiple binary optimization algorithms, including bSBO, were used and tested on nine high-dimensional UCI datasets. By comparing the performance of each algorithm, a cross-validation approach was employed to ensure the reliability of the experimental results. In this case, a lower error rate, a smaller number of selected features, and better performance indicate a more optimal algorithm.
[0061] In terms of image segmentation, this study applied SBO to multi-threshold image segmentation and used a variety of evaluation indicators, including PSNR (peak signal-to-noise ratio), FSIM (feature similarity index) and SSIM (structural similarity index). These indicators comprehensively evaluate the similarity between the segmented image and the original image. Experimental results show that the SBO method can achieve excellent image segmentation effects under different threshold settings, especially in the segmentation task of breast cancer tissue images. Figure 4 As shown in the figure, when the method adopted by the present invention is compared with seven other advanced meta-heuristic algorithms (LSEOFOA, IWOA, IGWO, ASCA, ILSSA, EHSSA and BLPSO), SBO shows stronger stability and higher segmentation quality, proving its application potential in the field of image processing.
[0062] The above method is adopted to perform multi-threshold selection through an improved SBO algorithm, introduce a fitness proportional roulette algorithm and dynamic weight parameters, and adopt corresponding position updates for different individuals, thereby improving the optimization results of the SBO algorithm for multi-threshold selection. Among them, by updating the individual position through dynamic weight parameters, it is possible to dynamically balance global exploration and local development according to the number of iterations, avoid the local optimal problem caused by premature convergence of traditional methods, and significantly improve the segmentation accuracy of complex medical images; through the elite population dynamic update mechanism, redundant search is reduced, the convergence speed is accelerated, and it is suitable for real-time medical image analysis scenarios. In this way, the present invention realizes efficient search in high-dimensional threshold space through the collaboration and competition mechanism of the social group intelligent SBO algorithm, providing a solution for medical image segmentation with high accuracy, strong robustness and optimized computational efficiency.
[0063] Secondly, the present invention also provides a multi-threshold image segmentation device, such as Figure 5 Shown, including: The acquisition module 501 is used to acquire the target image to be segmented and convert it into grayscale.
[0064] Initialization module 502 is used to initialize the SBO algorithm, generate an initial population of multiple threshold combinations based on the grayscale intensity range, and construct a fitness function based on maximizing Renyi entropy; and select the best individuals to form an elite population based on the fitness function value.
[0065] The iteration module 503 is used to iterate the SBO algorithm. In each iteration, the elite individuals are dynamically selected from the elite population based on the fitness proportional roulette algorithm, a dynamic weight parameter is generated based on the number of iterations, and the individual position is updated according to the dynamic weight parameter and the elite individuals.
[0066] Update module 504 is used to screen target individuals based on the update results through the fitness function. For target individuals, the position is updated by fusing the resources of elite individuals and the global optimal individual. For non-target individuals, some dimensions are randomly updated to the values of the dimensions corresponding to the elite individuals. The fitness values of all individuals are re-evaluated and the elite population is updated to retain the current optimal solution.
[0067] The segmentation module 505 is configured to stop iteration after the number of iterations reaches a preset number, and use the output optimal solution as the optimal multi-threshold combination to segment the target medical image.
[0068] The above method is adopted to perform multi-threshold selection through an improved SBO algorithm, introduce a fitness proportional roulette algorithm and dynamic weight parameters, and adopt corresponding position updates for different individuals, thereby improving the optimization results of the SBO algorithm for multi-threshold selection. Among them, by updating the individual position through dynamic weight parameters, it is possible to dynamically balance global exploration and local development according to the number of iterations, avoid the local optimal problem caused by premature convergence of traditional methods, and significantly improve the segmentation accuracy of complex medical images; through the elite population dynamic update mechanism, redundant search is reduced, the convergence speed is accelerated, and it is suitable for real-time medical image analysis scenarios. In this way, the present invention realizes efficient search in high-dimensional threshold space through the collaboration and competition mechanism of the social group intelligent SBO algorithm, providing a solution for medical image segmentation with high accuracy, strong robustness and optimized computational efficiency.
[0069] The present invention also provides a computer-readable storage medium, which stores a computer program, which can be used to execute the above Figure 1 The steps of the multi-threshold image segmentation method are provided.
[0070] The present invention also provides a computer device. At the hardware level, the computer device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory. Of course, it may also include hardware required for other services. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to achieve the above Figure 1 The steps of the multi-threshold image segmentation method are provided.
[0071] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0072] The present invention is described with reference to flowcharts and / or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1A device that provides the functions specified in a block or multiple blocks.
[0073] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0074] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0075] It should be noted that the specific embodiments described above can enable those skilled in the art to more fully understand the present invention, but do not limit the present invention in any way. Therefore, although this specification has described the present invention in detail, those skilled in the art should understand that the present invention can still be modified or replaced with equivalents; and all technical solutions and improvements that do not depart from the spirit and scope of the present invention are included in the scope of protection of the patent for the present invention. Any reference signs in the claims should not be construed as limiting the claims involved.
Claims
1. A multi-threshold image segmentation method, characterized in that: The method comprises: Obtain the target medical image to be segmented and convert it into grayscale; Initialize the SBO algorithm, generate an initial population of multiple threshold combinations based on the grayscale intensity range, and construct a fitness function based on maximizing Renyi entropy; select the best individuals from the initial population based on the fitness function value to form an elite population; Iterate the SBO algorithm, and in each iteration, dynamically select elite individuals from the elite population based on the fitness proportional roulette algorithm, generate dynamic weight parameters based on the number of iterations, and update the individual positions based on the dynamic weight parameters and the elite individuals; Based on the update results, the target individuals are screened through the fitness function. For the target individuals, the position is updated by integrating the resources of the elite individuals and the global optimal individuals. For non-target individuals, some dimensions are randomly updated to the values of the dimensions corresponding to the elite individuals. The fitness values of all individuals are re-evaluated, and the elite population is updated to retain the current optimal solution. The iteration is stopped after the number of iterations reaches the preset number, and the output optimal solution is used as the optimal multi-threshold combination to segment the target medical image.
2. The method according to claim 1, characterized in that After obtaining the target medical image to be segmented and converting it to grayscale, the following steps are also required: Perform non-local mean filtering denoising on the target medical image; A two-dimensional joint histogram is constructed based on the grayscale image and the denoised image to obtain the feature information of the fusion intensity and texture information; The iterative process of SBO is optimized through the feature information of the two-dimensional joint histogram.
3. The method according to claim 1, characterized in that The calculation formula of the fitness function is: ; in, is the Renyi entropy, k is the number of thresholds, m is the number of gray levels of the image, For the The probability of a region, A constant parameter.
4. The method according to claim 1, wherein The dynamic weight parameters include: ; ; in, and is the dynamic weight parameter, is the maximum number of evaluations, is the current evaluation number, which is synchronized with the iteration number. is the individual index, is a normally distributed random number.
5. The method according to claim 1, wherein The position update formula for updating the individual position according to the dynamic weight parameter and the elite individual is: ; in, is a random number within the preset range, R 1. R 2 is an independent Gaussian random number, For the The individual's own historical position, For elite individual positions, is the global optimal position.
6. The method according to claim 1, characterized in that The update formula for the target individual is: ; in is a randomly selected dimension index, is the value of the i-th individual in the t1 dimension, For the Elite individuals in the dimension The value of The global optimal position is in dimension The value of .
7. The method according to claim 1, characterized in that The fitness proportional roulette algorithm dynamically selects elite individuals from the elite population. The formula is: ; in, is the Rth elite individual, is the tth individual, For the population size.
8. An image segmentation device, characterized in that: The device comprises: An acquisition module is used to acquire the target image to be segmented and convert it into grayscale; The initialization module is used to initialize the SBO algorithm, generate an initial population of multiple threshold combinations based on the grayscale intensity range, and construct a fitness function based on maximizing the Renyi entropy; the optimal individuals are selected according to the fitness function value to form an elite population; An iteration module is used to iterate the SBO algorithm. In each iteration, elite individuals are dynamically selected from the elite population based on the fitness proportional roulette algorithm, dynamic weight parameters are generated based on the number of iterations, and individual positions are updated according to the dynamic weight parameters and the elite individuals. The update module is used to select target individuals based on the update results through the fitness function. For target individuals, the position is updated by fusing the resources of elite individuals and the global optimal individual. For non-target individuals, some dimensions are randomly updated to the values of the dimensions corresponding to the elite individuals. The fitness values of all individuals are re-evaluated and the elite population is updated to retain the current optimal solution. The segmentation module is used to stop iteration after the number of iterations reaches a preset number, and use the output optimal solution as the optimal multi-threshold combination to segment the target medical image.
9. A computer-readable storage medium, characterized in that The storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
10. A computer device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the method according to any one of claims 1 to 7 when executing the program.
Citation Information
Patent Citations
Multi-threshold image segmentation method based on entropy
CN117455941A
Image segmentation method and device, computer equipment and storage medium
CN119251245A
Intelligent point distribution system based on user portrait
CN120030063A
Method for implementing satin bowerbird optimization (SBO) algorithm for maximum power point tracking in solar photovoltaic (PV) system
IN202141052148A
Cited By
Multistage image segmentation method
CN121010619A