Image processing method of particle swarm algorithm based on premature judgment

By introducing a premature convergence detection mechanism and a population classification strategy into the particle swarm optimization algorithm, the problem of insufficient information exchange in image processing is solved, and stable improvement and optimization of image quality are achieved.

CN121660907APending Publication Date: 2026-03-13CHANGCHUN INST OF OPTICS FINE MECHANICS & PHYSICS CHINESE ACAD OF SCI
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-22
Publication Date
2026-03-13

AI Technical Summary

Technical Problem

Existing particle swarm optimization algorithms lack a systematic and dynamic guidance mechanism in image processing, resulting in insufficient information exchange among the population and an inability to fully leverage the advantages of classification guidance in maintaining diversity and accelerating convergence, leading to insufficient search efficiency and the ability to escape local optima.

Method used

A premature convergence detection mechanism is introduced, using image quality evaluation index as fitness function. The population is divided into high-fitness and low-fitness groups through a population classification strategy. During the premature convergence stage, the population position is randomly regenerated, and the population position and velocity are updated by combining inertia weight and learning factor to prevent the population from getting trapped in local optima.

Benefits of technology

It enhances the convergence stability of image processing algorithms, achieves a balance between global search and local optimization, and improves search efficiency and image optimization results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121660907A_ABST
    Figure CN121660907A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image processing, in particular to an image processing method of a particle swarm algorithm based on premature judgment, which comprises the following steps of: inputting an image to be processed, and confirming particles and a fitness function of the particles according to a processing task; initializing the population position and the population velocity of the particles, calculating the fitness value of the particles, and judging whether the population is in an early-maturing stage: according to the early-maturing condition of the population, updating the population position and the population velocity, and outputting the position and the numerical value of a global optimal solution; and processing the image according to the obtained numerical value of the globally optimal solution to complete an image processing task. According to the method, a higher image quality evaluation value can be obtained within a small number of iterations, and the method has stability and effectiveness in image optimization problems.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of image processing technology, and in particular relates to an image processing method based on a particle swarm optimization algorithm with premature convergence judgment. Background Technology

[0002] In 1995, American scholars Kennedy and Eberhart proposed the Particle Swarm Optimization (PSO) algorithm, which is designed to simulate the cooperative behaviors of flocks of birds, such as foraging. PSO is simple in structure, easy to implement, has few parameters, and can achieve a good balance between global and local searches, thus finding wide application in function optimization, neural network training, and control systems. Currently, some scholars have proposed PSO algorithms that apply population classification-guided update strategies, but most methods simply divide individuals based on fitness, lacking a more systematic and dynamic guidance mechanism. Therefore, information exchange between populations is insufficient, failing to fully leverage the advantages of classification guidance in maintaining diversity and accelerating convergence, thus limiting its ability to improve search efficiency and escape local optima. Summary of the Invention

[0003] In view of this, the present invention aims to provide an image processing method based on a particle swarm optimization algorithm with premature convergence judgment. The method uses the image quality evaluation index as the fitness function of the algorithm and introduces a premature convergence judgment mechanism to prevent the swarm from getting trapped in local optima, thereby enhancing the stability of the convergence process and obtaining the optimal image quality.

[0004] To achieve the above objectives, the technical solution created by this invention is implemented as follows: An image processing method based on particle swarm optimization (PSO) algorithm with premature convergence detection includes: S1: Input the image to be processed, and determine the particles and their fitness functions according to the processing task; initialize the population position and population velocity of the particles, and calculate the fitness value of the particles; S2: Based on the fitness value obtained in step S1, determine whether the population is in the early maturation stage: if it is in the early maturation stage, randomly generate the population position again and execute step S3; otherwise, directly execute step S3. S3: Based on the fitness values ​​obtained in step S2, update the population position and population velocity, and calculate the fitness values ​​of the updated particles. S4: Determine whether the current iteration count exceeds the set maximum iteration value: if it is less, repeat step S2 based on the fitness value updated in step S3; otherwise, output the position and value of the global optimal solution based on the fitness value updated in step S3. S5: Process the image from step S1 based on the value of the global optimal solution obtained in step S4 to complete the image processing task.

[0005] Furthermore, in step S2, the following formula is used to determine whether the population is in the precocious stage: ; Where L represents the proportionality coefficient, N represents the total number of particles, and FIT j This represents the fitness value of the j-th particle.

[0006] Furthermore, in step S3, during the process of updating the population position and population velocity: the population is classified according to the fitness value obtained in step S2, resulting in a high-fitness population and a low-fitness population; for the high-fitness population, the population position and population velocity are updated; for the low-fitness population, random numbers are generated, and a threshold judgment is made on the random numbers: if the generated random number is greater than or equal to the threshold, the population position and population velocity are updated in the same way as for the high-fitness population; if the generated random number is less than the threshold, the population position is updated based on the average of the local optimal positions of the current population, while the population velocity remains unchanged.

[0007] Furthermore, the population location and population velocity of the high-fitness population are updated using the following formula: ; ; Among them, v k v represents the updated population velocity. k-1 x represents the population velocity before the update. k Indicates the updated population position, x k-1 denoted by , w represents the inertia weight, r1 and r2 represent the local learning factor and the global learning factor, respectively, pbestX represents the local optimum of the current population, and gbestX represents the global optimum of the current population.

[0008] Furthermore, the population position of the low-fitness group is updated using the following formula: ; Where, x k Indicates the updated population position, x k-1 Indicates the population position before the update, w a This indicates the update magnitude, and aveP represents the average of the local optimum positions of the current population.

[0009] Compared with the prior art, the present invention can achieve the following beneficial effects: This invention presents an image processing method based on a particle swarm optimization algorithm with premature convergence detection. First, an objective function related to image quality is defined. Each particle represents a set of image processing parameters to be optimized. These parameters are continuously adjusted through updates to velocity and position, ensuring the processed image achieves the optimal value under the objective function. During algorithm execution, this invention introduces a premature convergence detection mechanism to prevent the population from getting trapped in local optima, thereby enhancing the stability of the convergence process. Combined with a population classification strategy, the population is divided into high-fitness and low-fitness groups. By guiding low-fitness individuals towards high-fitness regions, a balance between global search and local optimization is achieved, effectively improving the algorithm's search efficiency and image optimization effect. Attached Figure Description

[0010] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments and descriptions of the invention are used to explain the invention and do not constitute an undue limitation of the invention. In the drawings: Figure 1 A schematic flowchart of the image processing method based on premature convergence judgment particle swarm algorithm described in the embodiment of the present invention; Figure 2 The flowchart illustrates the image processing method based on premature convergence judgment using a particle swarm optimization algorithm, as described in the embodiments of this invention. Detailed Implementation

[0011] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and do not constitute a limitation thereof.

[0012] It should be noted that, unless otherwise specified, the embodiments and features described in the present invention can be combined with each other.

[0013] In the description of this invention, it should be understood that the terms "center," "longitudinal," "lateral," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," and "outer," etc., indicating orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation on this invention. Furthermore, the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, features defined with "first," "second," etc., may explicitly or implicitly include one or more of that feature. In the description of this invention, unless otherwise stated, "a plurality of" means two or more.

[0014] In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art will understand the specific meaning of the above terms in this invention based on the specific circumstances.

[0015] The invention will now be described in detail with reference to the accompanying drawings and embodiments.

[0016] like Figures 1 to 2 As shown in the embodiment of the present invention, the image processing method based on the particle swarm optimization algorithm for premature convergence judgment includes: S1: Input the image to be processed, and determine the particles and their fitness functions according to the processing task; initialize the population position and population velocity of the particles, and calculate the fitness value of the particles.

[0017] The image processing method based on premature convergence judgment particle swarm optimization algorithm provided by this invention can perform tasks on the image to be processed, including but not limited to image denoising, image restoration, and wavefront aberration correction or feature extraction. Specifically, the processing tasks for the image to be processed include, but are not limited to, image denoising, image restoration, and wavefront aberration correction or feature extraction. Each particle represents a set of image processing parameters to be optimized, such as filter kernel size, denoising weights, deformable mirror control voltage, aberration correction coefficients, or convolution operator weights. The fitness function is an objective function related to image quality, such as peak signal-to-noise ratio, structural similarity, edge sharpness, etc. Metrics such as contrast ratio or Strelby ratio are used in various ways. For example, when denoising an image, each particle represents a denoising weight, and the fitness function is one or a combination of peak signal-to-noise ratio, structural similarity, edge sharpness, and image contrast. When restoring an image, each particle represents the filter kernel size, and the fitness function is one or a combination of peak signal-to-noise ratio, structural similarity, edge sharpness, and image contrast. When correcting wavefront aberrations in an image, each particle represents an aberration correction coefficient, and the fitness function is the Strelby ratio.

[0018] S2: Based on the fitness value obtained in step S1, determine whether the population is in the early maturation stage: If it is in the early maturation stage, the population position needs to be updated to escape early maturation. Specifically, the population position is randomly regenerated and step S3 is executed. Otherwise, step S3 is executed directly.

[0019] In this embodiment of the invention, step S2 determines whether the population is in the precocious stage using the following formula, which can well describe whether the population is trapped in a local extreme (i.e., precocious maturity): ; Where L represents the proportionality coefficient, N represents the total number of particles, and FIT j This represents the fitness value of the j-th particle.

[0020] S3: Based on the fitness values ​​obtained in step S2, update the population position and population velocity, and calculate the fitness values ​​of the updated particles.

[0021] In this embodiment of the invention, the process of updating the population location and population velocity includes: Based on the fitness values ​​obtained in step S2, the population is classified into a high-fitness group and a low-fitness group. The population classification method used in this embodiment of the invention includes: calculating and sorting the fitness values ​​of all particles, dividing the population into intervals proportionally, with the first 50% being the high-fitness group and the last 50% being the low-fitness group.

[0022] For a high-fitness population, the population position and population velocity are updated using the following formula: ; ; Where w represents the inertia weight, v k v represents the updated population velocity. k-1 x represents the population velocity before the update. k Indicates the updated population position, x k-1 The value represents the population position before the update, r1 and r2 represent the local learning factor and the global learning factor, respectively, pbestX represents the local optimum of the current population, and gbestX represents the global optimum of the current population.

[0023] For low-fitness populations, random numbers are generated, and a threshold is applied to these random numbers: if the generated random number is greater than or equal to the threshold, the population position and population velocity are updated in the same way as for high-fitness populations; if the generated random number is less than the threshold, the population position is updated based on the average of the current local optima, while the population velocity remains unchanged. Specifically, the population position of low-fitness populations is updated using the following formula: ; Where, x k Indicates the updated population position, x k-1 Indicates the population position before the update, w a The update magnitude is represented by aveP, which represents the average of the local optimum positions of the current population, as shown in the following formula: .

[0024] This invention combines a population classification strategy, dividing the population into high-fitness and low-fitness groups. By guiding low-fitness individuals towards high-fitness regions, a balance between global search and local optimization is achieved, effectively improving the algorithm's search efficiency and image optimization results. Furthermore, when updating the population of the low-fitness group, this invention applies a threshold to random numbers and performs different forms of population position and velocity updates, thereby enhancing population diversity. In this embodiment, the threshold is set to 0.4.

[0025] S4: Determine whether the current iteration count exceeds the set maximum iteration value: If it is less, repeat step S2 based on the fitness value updated in step S3; otherwise, output the position and value of the global optimal solution based on the fitness value updated in step S3.

[0026] S5: Process the image from step S1 based on the value of the global optimal solution obtained in step S4 to complete the image processing task.

[0027] Understandably, the value of the global optimal solution obtained in step S5 corresponds to the image processing parameters of the image to be processed. For example, when performing image denoising on the image to be processed, the corresponding value of the global optimal solution corresponds to the optimal denoising weight; when performing image restoration on the image to be processed, the value of the global optimal solution corresponds to the optimal filter kernel size; and when performing wavefront aberration correction on the image to be processed, the value of the global optimal solution corresponds to the optimal aberration correction coefficient.

[0028] It should be understood that the various forms of processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this invention disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this invention can be achieved, and this is not limited herein.

[0029] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. An image processing method based on particle swarm optimization (PSO) algorithm with premature convergence detection, characterized in that, include: S1: Input the image to be processed, and determine the particles and their fitness functions according to the processing task; initialize the population position and population velocity of the particles, and calculate the fitness value of the particles; S2: Based on the fitness value obtained in step S1, determine whether the population is in the early maturation stage: if it is in the early maturation stage, randomly generate the population position again and execute step S3; otherwise, directly execute step S3. S3: Based on the fitness values ​​obtained in step S2, update the population position and population velocity, and calculate the fitness values ​​of the updated particles. S4: Determine whether the current iteration count exceeds the set maximum iteration value: if it is less, repeat step S2 based on the fitness value updated in step S3; otherwise, output the position and value of the global optimal solution based on the fitness value updated in step S3. S5: Process the image from step S1 based on the value of the global optimal solution obtained in step S4 to complete the image processing task.

2. The image processing method based on premature convergence judgment particle swarm optimization algorithm according to claim 1, characterized in that, In step S2, the following formula is used to determine whether the population is in the precocious stage: ; Where L represents the proportionality coefficient, N represents the total number of particles, and FIT j This represents the fitness value of the j-th particle.

3. The image processing method based on premature convergence judgment particle swarm optimization algorithm according to claim 1, characterized in that, During step S3, when updating the population location and population velocity: Based on the fitness values ​​obtained in step S2, the population is classified to obtain a high-fitness group and a low-fitness group; For high-fitness populations, update the population location and population velocity; For low-fitness populations, random numbers are generated, and a threshold is applied to these random numbers: if the generated random number is greater than or equal to the threshold, the population position and population velocity are updated in the same way as for high-fitness populations; if the generated random number is less than the threshold, the population position is updated based on the average of the local best positions of the current population, while the population velocity remains unchanged.

4. The image processing method based on premature convergence judgment particle swarm optimization algorithm according to claim 3, characterized in that, The population position and population velocity of a high-fitness population are updated using the following formula: ; ; Among them, v k v represents the updated population velocity. k-1 x represents the population velocity before the update. k Indicates the updated population position, x k-1 denoted by , w represents the inertia weight, r1 and r2 represent the local learning factor and the global learning factor, respectively, pbestX represents the local optimum of the current population, and gbestX represents the global optimum of the current population.

5. The image processing method based on premature convergence judgment particle swarm optimization algorithm according to claim 1, characterized in that, The population position of the low-fit population is updated using the following formula: ; Where, x k Indicates the updated population position, x k-1 wa represents the population position before the update, wa represents the update magnitude, and aveP represents the average of the local optimum positions of the current population.