CN116630346A - Multi-threshold Otsu image segmentation method based on improved chicken flock optimization algorithm - Google Patents
Multi-threshold Otsu image segmentation method based on improved chicken flock optimization algorithm Download PDFInfo
- Publication number
- CN116630346A CN116630346A CN202310634340.9A CN202310634340A CN116630346A CN 116630346 A CN116630346 A CN 116630346A CN 202310634340 A CN202310634340 A CN 202310634340A CN 116630346 A CN116630346 A CN 116630346A
- Authority
- CN
- China
- Prior art keywords
- threshold
- formula
- image
- chicken
- cock
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 241000287828 Gallus gallus Species 0.000 title claims abstract description 61
- 238000004422 calculation algorithm Methods 0.000 title claims abstract description 57
- 238000000034 method Methods 0.000 title claims abstract description 44
- 238000005457 optimization Methods 0.000 title claims abstract description 21
- 238000003709 image segmentation Methods 0.000 title claims abstract description 20
- 244000144992 flock Species 0.000 title claims abstract description 9
- 235000013330 chicken meat Nutrition 0.000 claims abstract description 60
- 230000011218 segmentation Effects 0.000 claims abstract description 26
- 230000003247 decreasing effect Effects 0.000 claims abstract description 12
- 230000000739 chaotic effect Effects 0.000 claims abstract description 8
- 238000001514 detection method Methods 0.000 claims abstract description 6
- 238000004364 calculation method Methods 0.000 claims description 9
- 230000003044 adaptive effect Effects 0.000 claims description 7
- 230000006872 improvement Effects 0.000 claims description 7
- 235000013305 food Nutrition 0.000 claims description 6
- 239000002245 particle Substances 0.000 claims description 6
- 230000006978 adaptation Effects 0.000 claims description 4
- 238000013507 mapping Methods 0.000 claims description 4
- 238000012546 transfer Methods 0.000 claims description 3
- 230000008569 process Effects 0.000 abstract description 4
- 230000002708 enhancing effect Effects 0.000 abstract 1
- 230000006870 function Effects 0.000 description 8
- 230000000694 effects Effects 0.000 description 4
- 238000010586 diagram Methods 0.000 description 2
- 230000015654 memory Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000011160 research Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000005312 nonlinear dynamic Methods 0.000 description 1
- 230000002035 prolonged effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/11—Region-based segmentation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/004—Artificial life, i.e. computing arrangements simulating life
- G06N3/006—Artificial life, i.e. computing arrangements simulating life based on simulated virtual individual or collective life forms, e.g. social simulations or particle swarm optimisation [PSO]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/136—Segmentation; Edge detection involving thresholding
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20081—Training; Learning
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Computational Linguistics (AREA)
- Evolutionary Computation (AREA)
- Artificial Intelligence (AREA)
- Biomedical Technology (AREA)
- Biophysics (AREA)
- Health & Medical Sciences (AREA)
- Data Mining & Analysis (AREA)
- Life Sciences & Earth Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Image Analysis (AREA)
Abstract
A multi-threshold Otsu image segmentation method based on an improved chicken flock optimization algorithm is characterized in that a PWLCM chaotic map is used for initializing individual chicken flock algorithm population individuals so that the individuals are uniformly distributed in a search space. The position update of the cock is improved by introducing a nonlinear weight decreasing strategy, so that the whole search space is better traversed in the early stage, and better local convergence is realized in the later stage. Optimizing a hen position updating formula through fractional order G-L, introducing fractional order self-adaptive adjustment, and enhancing the capability of an algorithm to jump out of a local optimal solution. Considering that the adaptability of the chickens is poor and the learning space is large, factors for learning the globally optimal individuals are introduced into the position updating formula of the chickens, and the chickens are prevented from being trapped into the locally optimal individuals. According to the invention, the problems of long running time and low precision in the process of multi-threshold segmentation by Otsu can be solved by the improved chicken swarm algorithm, so that more accurate threshold and segmentation efficiency can be obtained, and the timeliness of foreign matter detection is more efficient.
Description
Technical Field
The invention relates to the technical field of image segmentation, in particular to a multi-threshold Otsu image segmentation method based on an improved chicken flock optimization algorithm.
Background
When the machine vision is used for detecting the foreign matters, how to quickly separate the foreign matters in the acquired pictures from the background is a key technology, and the real-time requirement is high. Image segmentation is an important part in computer vision, and the complexity of image segmentation is always an important direction of research of expert scholars at home and abroad. So far, there is no segmentation method for all images in common, but considerable research results and methods have been produced.
Otsu segmentation method is proposed by Nobuyukiotsu, and is an algorithm for automatically selecting the optimal threshold by using the maximum value of the inter-class variance of the image. The main idea is to separate the object of the image from the background by using the gray-scale characteristics of the image. The larger the inter-class variance is, the larger the pixel difference between the background and the target of the image is, the more accurate the threshold is selected, and the better the image segmentation efficiency and effect are.
The optimal threshold value of the threshold method is set through the pixel value of the image, so that when the threshold method is used, an image with obvious difference between a target and a background pixel needs to be selected to obtain a better segmentation effect, and for the images with rich background pixel distribution, more target pixel areas and noise interference, the segmentation effect of the method is obviously reduced. And the operation speed is greatly prolonged, the efficiency is low, and the real-time requirement is not facilitated. Therefore, in the face of multi-threshold segmentation, how to improve efficiency while ensuring accuracy is a not inconsiderable issue, and is also a considerable issue.
Disclosure of Invention
Aiming at the technical problems, the technical scheme provides a multi-threshold Otsu image segmentation method based on an improved chicken swarm optimization algorithm, and the improved chicken swarm algorithm can solve the problems of long running time and low precision when Otsu performs multi-threshold segmentation, so that the method can obtain more accurate threshold and segmentation efficiency, and the timeliness of foreign matter detection is more efficient; the problems can be effectively solved.
The invention is realized by the following technical scheme:
a multi-threshold Otsu image segmentation method based on an improved chicken crowd optimization algorithm reads images to be subjected to threshold segmentation, takes inter-class variance of the multi-threshold Otsu algorithm as a fitness function, and can separate foreign matters and backgrounds of a positioning area through the improved algorithm so as to realize a foreign matter detection function; the method comprises the following specific steps of:
step one: reading an image to be subjected to threshold segmentation, and reading an image preprocessed by a positioning area of a wireless charging transmitting plate in real time;
step two: initializing parameters for improving a chicken flock algorithm;
step three: initializing chicken swarm algorithm population particles by adopting PWLCM chaotic mapping to uniformly distribute the chicken swarm algorithm population particles in a search space;
step four: calculating a histogram of the picture and setting a threshold number to be segmented;
step five: calculating the maximum inter-class variance of the image as a food source for the chickens;
step six: respectively carrying out position updating on the cock, the hen and the chicken by adopting an improved formula;
introducing a nonlinear weight decreasing strategy to improve the position update of the cock;
optimizing a hen position updating formula by introducing an adaptive fractional order G-L and introducing fractional order adaptive adjustment;
factors learned to global optimal individuals are introduced into a chicken position updating formula, so that the local optimization is avoided;
step seven: judging whether the current food source is optimal or reaches the iteration number, if so, carrying out the next step, and if not, returning to the step five;
step eight: outputting a maximum threshold;
step nine: the image is multi-thresholded.
Further, the calculation formula of the PWLCM chaotic map in the third step is as follows:
where p=0.4, x (1) =rand, and x (t) is the value of the t-th iteration.
Further, in the fifth step, the calculation formula of the maximum inter-class variance is:
wherein the threshold combination is [ t ] 1 ,t 2 ,…t K-1 ]Dividing the image into K categories;to the proportion of each category to the image after segmentation, mu i Mu, for the average grey scale of each class T Is the grey scale of the navy of the image.
Furthermore, the step six of introducing the nonlinear weight decreasing strategy improves the position update of the cock, because the adaptation value of the cock is highest, the cock belongs to the optimal individual in each group, and the nonlinear weight decreasing strategy is introduced, so that the cock has larger weight in the initial iteration stage, better traverses the whole search space, and keeps smaller weight in the later stage, so that the group has better local searching capability and converges to the global optimal point; the position updating formula of the cock is as follows:
x i,j t+1 =λ t *x i,j t *(1+Rand(0,σ 2 )), (2)
wherein x is i,j t+1 Represents the t+1st fold of cockThe position of the generation lambda t Weights representing the t-th iteration, x i,j t Represents the position of the t-th iteration of the cock, rand (0, σ 2 ) Mean 0 and variance sigma 2 Is a gaussian distribution of (c); epsilon represents a small equilibrium constant, avoiding zero divisor; s represents any individual except the ith individual among all cocks, and the fitness of the ith cocks is f i Randomly selecting the fitness of the cock s as f s The method comprises the steps of carrying out a first treatment on the surface of the t is the current iteration number, t max For maximum number of iterations lambda max The initial inertia weight is 1.2; lambda (lambda) min The value of the inertia weight is 0.1 when the inertia weight is evolved to the maximum iteration number; a and b are adjustment factors, and the values of the adjustment factors are in the range of a=30 and b=0.88.
Further, the adaptive fractional order G-L in the step six is used for improving the position update of the hen by taking the first four items of the fractional order G-L, and the improvement formula is as follows:
performing fractional order optimization on a hen position updating formula, wherein the original position updating formula is as follows: x is x i,j t+1 =x i,j t +a 1 *Rand*(x r1 t -x i,j t )+a 2 *Rand*(x r2,j t -x i,j t ) (5); obtaining the transfer:
x i,j t+1 -x i,j t =a 1 *Rand*(x r1 t -x i,j t )+a 2 *Rand*(x r2,j t -x i,j t ) (6);
according to the formula (4), the first four terms of the fractional order are taken to obtain:
when the fractional order alpha in the formula (7) is 1, combining the formula (6) with the formula (7) to obtain an updated formula of the fractional order hen position, wherein the updated formula is as follows:
a 2 =exp(f r2 -f i )
wherein Rand is clothes [0,1 ]]Random numbers distributed uniformly, the partner cock r of the hen 1 Has a fitness value f r1 ,a 1 Representing the influence factors of the partner cock on the chicken, randomly selecting an individual r from other cocks and hens 2 Has a fitness value f r2 ,a 2 Is the influencing factor of other chickens.
The position information of the hen is utilized to carry out self-adaptive adjustment on the fractional order alpha, and the average distance between the hen i and other hens is as follows:
wherein N is the total number of hen populations, and D is the spatial dimension.
The evolution factor ω can be expressed as:
d best the average distance between the global optimal position and other hens is d max Minimum value d min ,ω∈[0,1]The method comprises the steps of carrying out a first treatment on the surface of the When the fractional order alpha epsilon [0.5,0.8 ]]In this case, the convergence rate of the algorithm is high, so α can be dynamically adjusted according to the following equation:
further, in the step six, factors learned to the global optimal individual are introduced into the chicken position updating formula, and the specific improvement formula is as follows:
x i,j t+1 =x i,j t +E(x m,j t -x i,j t )+S t (x best,j t -x i,j t ) (12);
wherein the j-th dimension value of the m position of the mother hen is x m The influence factor of the position of the mother hen on the position of the chicken is E, which is randomly generated by a random function, and the value range is generally (0, 2); the updating formula of S ist is the current iteration number, t max For the maximum number of iterations, the value of S ranges from 1 to 0.
Furthermore, the fitness function adopts the inter-class variance of the multi-threshold Otsu algorithm, and the calculation formula is as follows:
wherein the threshold combination is [ t ] 1 ,t 2 ,…t k-1 ]Dividing the image into K categories;to the proportion of each category to the image after segmentation, mu i Mu, for the average grey scale of each class T Is the grey scale of the navy of the image.
Advantageous effects
Compared with the prior art, the multi-threshold Otsu image segmentation method based on the improved chicken crowd optimization algorithm has the following beneficial effects:
(1) According to the invention, the individual of the chicken flock algorithm population is initialized through PWLCM chaotic mapping, so that the individual is uniformly distributed in the search space, and the global searching capability of the population is improved. Improving the position update of the cock by introducing a nonlinear weight dynamic decreasing strategy, wherein the inertia weight is nonlinearly decreased according to an s-shaped curve by adopting nonlinear dynamic decreasing; the position update of the cock can well traverse the whole search space in the early stage and has better local convergence in the later stage.
(2) According to the invention, a hen position updating formula is optimized through fractional order G-L, fractional order self-adaptive adjustment is introduced, fractional order calculus is introduced into a hen position updating stage of a hen swarm algorithm, the position of a hen in each iteration is adjusted by utilizing the memory of the hen, the algorithm can utilize more history memories of each hen to search, and the fractional order a is self-adaptively adjusted according to the position information of the hen; the capability of the algorithm to jump out of the local optimal solution is enhanced, so that the searching process is more balanced, and the searching precision is higher.
(3) According to the invention, in the chicken swarm algorithm, the adaptation value of the chicken is worst, and in the original formula, the chicken is easy to sink into local optimum only according to the last position iteration and the influence of the chicken mother hen, so that factors learned to global optimum individuals are added, the chicken can better perform global search, and the chicken is prevented from sinking into local optimum. S is a dynamically changing numerical value, the range is from 1 to 0, the initial numerical value is larger, global searching can be better, local optimum is jumped out, the current value is moved to the vicinity of global optimum in time, the later numerical value is smaller, and the current value is located in the vicinity of global optimum, so that the current value only needs to be converged to the local optimum, and the convergence rate of an algorithm can be increased.
(4) The improved chicken swarm algorithm can solve the problems of long running time and low precision when Otsu performs multi-threshold segmentation, so that the improved chicken swarm algorithm can obtain more accurate threshold and segmentation efficiency, and can be better applied to the field of foreign matter detection of wireless charging.
Drawings
Fig. 1 is a flowchart of a segmentation method in embodiment 1 of the present invention.
Fig. 2 is an iterative diagram of the convergence of the algorithms to the optimal solution in embodiment 1 of the present invention.
Fig. 3 is a schematic image segmentation diagram of the algorithms in embodiment 1 of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. The described embodiments are only some, but not all, embodiments of the invention. Various modifications and improvements of the technical scheme of the invention, which are made by those skilled in the art, are included in the protection scope of the invention without departing from the design concept of the invention.
Example 1:
as shown in fig. 1, in the multi-threshold Otsu image segmentation method based on the improved chicken crowd optimization algorithm, an image to be subjected to threshold segmentation is read, the inter-class variance of the multi-threshold Otsu algorithm is used as a fitness function, and foreign matters in a positioning area can be separated from the background through the improved algorithm, so that the foreign matter detection function is realized; the method comprises the following specific steps of:
step one: and reading an image to be subjected to threshold segmentation, and reading an image preprocessed by the positioning area of the wireless charging transmitting plate in real time.
Step two: parameters for improving the chicken flock algorithm are initialized.
Step three: initializing chicken swarm algorithm population particles by adopting PWLCM chaotic mapping to uniformly distribute the chicken swarm algorithm population particles in a search space; the calculation formula of the PWLCM chaotic map is as follows:
where p=0.4, x (1) =rand, and x (t) is the value of the t-th iteration.
Step four: the histogram of the picture is calculated and the threshold number to be segmented is set.
Step five: calculating the maximum inter-class variance of the image as a food source for the chickens; the calculation formula of the maximum inter-class variance is:
wherein the threshold combination is [ t ] 1 ,t 2 ,…t K-1 ]Dividing the image into K categories;to the proportion of each category to the image after segmentation, mu i Mu, for the average grey scale of each class T Is the grey scale of the navy of the image.
Step six: respectively carrying out position updating on the cock, the hen and the chicken by adopting an improved formula;
introducing a nonlinear weight decreasing strategy to improve the position update of the cock; the method has the advantages that as the adaptation value of the cock is highest, the cock belongs to the optimal individual in each group, a nonlinear weight decreasing strategy is introduced, so that the cock has larger weight in the initial iteration stage, the whole search space is better traversed, the smaller weight is kept in the later stage, and the group has better local searching capability and converges to the global optimal point; the position updating formula of the cock is as follows:
x i,j t+1 =λ t *x i,j t *(1+Rand(0,σ 2 )) (2);
wherein x is i,j t+1 Represents the position of the t+1st iteration of the cock, lambda t Weights representing the t-th iteration, x i,j t Represents the position of the t-th iteration of the cock, rand (0, σ 2 ) Mean 0 and variance sigma 2 Is a gaussian distribution of (c); epsilon represents a small equilibrium constant, avoiding zero divisor; s represents any individual except the ith individual among all cocks, and the fitness of the ith cocks is f i Randomly selecting the fitness of the cock s as f s The method comprises the steps of carrying out a first treatment on the surface of the t is the current iteration number, t max For maximum number of iterations lambda max The initial inertia weight is 1.2; lambda (lambda) min The value of the inertia weight is 0.1 when the inertia weight is evolved to the maximum iteration number;a and b are adjustment factors, and the values of the adjustment factors are in the range of a=30 and b=0.88.
Optimizing a hen position updating formula by introducing an adaptive fractional order G-L and introducing fractional order adaptive adjustment; the first four terms of fractional order G-L are taken to improve hen position updating, and an improvement formula is as follows:
performing fractional order optimization on a hen position updating formula, wherein the original position updating formula is as follows: x is x i,j t+1 =x i,j t +a 1 *Rand*(x r1 t -x i,j t )+a 2 *Rand*(x r2,j t -x i,j t ) (5); obtaining the transfer:
x i,j t+1 -x i,j t =a 1 *Rand*(x r1 t -x i,j t )+a 2 *Rand*(x r2,j t -x i,j t ) (6);
according to the formula (4), the first four terms of the fractional order are taken to obtain:
when the fractional order alpha in the formula (7) is 1, combining the formula (6) with the formula (7) to obtain an updated formula of the fractional order hen position, wherein the updated formula is as follows:
a 2 =exp(f r2 -f i )
wherein Rand is clothes [0 ],1]Random numbers distributed uniformly, the partner cock r of the hen 1 Has a fitness value f r1 ,a 1 Representing the influence factors of the partner cock on the chicken, randomly selecting an individual r from other cocks and hens 2 Has a fitness value f r2 ,a 2 Is the influencing factor of other chickens.
The position information of the hen is utilized to carry out self-adaptive adjustment on the fractional order alpha, and the average distance between the hen i and other hens is as follows:
wherein N is the total number of hen populations, and D is the spatial dimension.
The evolution factor ω can be expressed as:
d best the average distance between the global optimal position and other hens is d max Minimum value d min ,ω∈[0,1]The method comprises the steps of carrying out a first treatment on the surface of the When the fractional order alpha epsilon [0.5,0.8 ]]In this case, the convergence rate of the algorithm is high, so α can be dynamically adjusted according to the following equation:
factors learned to global optimal individuals are introduced into a chicken position updating formula, so that the local optimization is avoided; factors learned to the global optimal individual are introduced into a chicken position updating formula, and the specific improvement formula is as follows:
x i,j t+1 =x i,j t +E(x m,j t -x i,j t )+S t (x best,j t -x i,j t ) (12);
wherein the j-th dimension of the m-position of the mother henHaving a value of x m The influence factor of the position of the mother hen on the position of the chicken is E, which is randomly generated by a random function, and the value range is generally (0, 2); the updating formula of S ist is the current iteration number, t max For the maximum number of iterations, the value of S ranges from 1 to 0.
Step seven: judging whether the current food source is optimal or reaches the iteration number, if so, carrying out the next step, and if not, returning to the step five;
step eight: outputting a maximum threshold;
step nine: the image is multi-thresholded.
The fitness function of the embodiment adopts the inter-class variance of the multi-threshold Otsu algorithm, and the calculation formula is as follows:
wherein the threshold combination is [ t ] 1 ,t 2 ,…t k-1 ]Dividing the image into K categories;to the proportion of each category to the image after segmentation, mu i Mu, for the average grey scale of each class T Is the grey scale of the navy of the image.
The inventor selects the character image as a test, evaluates the algorithm through the fitness value, and compares the algorithm with the FA-Otsu and Pso-Otsu algorithms respectively. Fig. 3 (a) shows the original image after the graying process, (b) shows the image divided by FA-Otsu, (c) shows the image divided by PSO-Otsu, and (d) shows the image divided by the algorithm described herein. As can be seen from FIG. 2, the algorithm converges to the optimal point only for 4 iterations, whereas FA-Otsu converges to the local optimum for about 30 iterations, and finally to the global optimum for about 45 iterations, and PSO-Otsu converges to the optimal solution for about 12 iterations. Compared with the other two algorithms, the method has the advantages that the segmentation efficiency is greatly improved, and the problems of long running time and low precision existing in the process of multi-threshold segmentation by Otsu can be solved.
The foregoing is merely exemplary embodiments of the present invention, but the scope of the present invention is not limited thereto, and any changes, substitutions and modifications within the technical scope of the present invention are all within the scope of the present invention.
Claims (7)
1. A multi-threshold Otsu image segmentation method based on an improved chicken crowd optimization algorithm is characterized by comprising the following steps of: reading an image to be subjected to threshold segmentation, taking the inter-class variance of a multi-threshold Otsu algorithm as a fitness function, and separating foreign matters from the background of a positioning area through an improved algorithm to realize the function of foreign matter detection; the method comprises the following specific steps of:
step one: reading an image to be subjected to threshold segmentation, and reading an image preprocessed by a positioning area of a wireless charging transmitting plate in real time;
step two: initializing parameters for improving a chicken flock algorithm;
step three: initializing chicken swarm algorithm population particles by adopting PWLCM chaotic mapping to uniformly distribute the chicken swarm algorithm population particles in a search space;
step four: calculating a histogram of the picture and setting a threshold number to be segmented;
step five: calculating the maximum inter-class variance of the image as a food source for the chickens;
step six: respectively carrying out position updating on the cock, the hen and the chicken by adopting an improved formula;
introducing a nonlinear weight decreasing strategy to improve the position update of the cock;
optimizing a hen position updating formula by introducing an adaptive fractional order G-L and introducing fractional order adaptive adjustment;
factors learned to global optimal individuals are introduced into a chicken position updating formula, so that the local optimization is avoided;
step seven: judging whether the current food source is optimal or reaches the iteration number, if so, carrying out the next step, and if not, returning to the step five;
step eight: outputting a maximum threshold;
step nine: the image is multi-thresholded.
2. The multi-threshold Otsu image segmentation method based on the improved chicken crowd optimization algorithm according to claim 1, wherein the method is characterized by comprising the following steps: the calculation formula of the PWLCM chaotic map in the third step is as follows:
where p=0.4, x (1) =rand, and x (t) is the value of the t-th iteration.
3. The multi-threshold Otsu image segmentation method based on the improved chicken crowd optimization algorithm according to claim 1, wherein the method is characterized by comprising the following steps: and step five, the calculation formula of the maximum inter-class variance is as follows:
wherein the threshold combination is [ t ] 1 ,t 2 ,…t K-1 ]Dividing the image into K categories;to the proportion of each category to the image after segmentation, mu i Mu, for the average grey scale of each class T Is the grey scale of the navy of the image.
4. The multi-threshold Otsu image segmentation method based on the improved chicken crowd optimization algorithm according to claim 1, wherein the method is characterized by comprising the following steps: the step six of introducing a nonlinear weight decreasing strategy to improve the position updating of the cock, which is that the adaptation value of the cock is highest, the cock belongs to the optimal individual in each group, and the nonlinear weight decreasing strategy is introduced to enable the cock to have larger weight at the initial stage of iteration, better traverse the whole search space and keep smaller weight at the later stage, so that the group has better local searching capability to converge to the global optimal point; the position updating formula of the cock is as follows:
x i,j t+1 =λ t *x i,j t *(1+Rand(0,σ 2 )) , (2)
wherein x is i,j t+1 Represents the position of the t+1st iteration of the cock, lambda t Weights representing the t-th iteration, x i,j t Represents the position of the t-th iteration of the cock, rand (0, σ 2 ) Mean 0 and variance sigma 2 Is a gaussian distribution of (c); epsilon represents a small equilibrium constant, avoiding zero divisor; s represents any individual except the ith individual among all cocks, and the fitness of the ith cocks is f i Randomly selecting the fitness of the cock s as f s The method comprises the steps of carrying out a first treatment on the surface of the t is the current iteration number, t max For maximum number of iterations lambda max The initial inertia weight is 1.2; lambda (lambda) min The value of the inertia weight is 0.1 when the inertia weight is evolved to the maximum iteration number; a and b are adjustment factors, and the values of the adjustment factors are in the range of a=30 and b=0.88.
5. The multi-threshold Otsu image segmentation method based on the improved chicken crowd optimization algorithm according to claim 4, wherein the method is characterized by comprising the following steps: step six, the self-adaptive fractional order G-L is adopted, the first four items of the fractional order G-L are adopted to improve the hen position update, and the improvement formula is as follows:
performing fractional order optimization on a hen position updating formula, wherein the original position updating formula is as follows:
x i,j t+1 =x i,j t +a 1 *Rand*(x r1 t -x i,j t )+a 2 *Rand*(x r2,j t -x i,j t ) (5);
obtaining the transfer:
x i,j t+1 -x i,j t =a 1 *Rand*(x r1 t -x i,j t )+a 2 *Rand*(x r2,j t -x i,j t ) (6);
according to the formula (4), the first four terms of the fractional order are taken to obtain:
when the fractional order alpha in the formula (7) is 1, combining the formula (6) with the formula (7) to obtain an updated formula of the fractional order hen position, wherein the updated formula is as follows:
a 2 =exp(f r2 -f i )
wherein Rand is clothes [0,1 ]]Random numbers distributed uniformly, the partner cock r of the hen 1 Has a fitness value f r1 ,a 1 Representing the influence factors of the partner cock on the chicken, randomly selecting an individual r from other cocks and hens 2 Has a fitness value f r2 ,a 2 Is the influence factor of other chickens on the chicken;
the position information of the hen is utilized to carry out self-adaptive adjustment on the fractional order alpha, and the average distance between the hen i and other hens is as follows:
wherein N is the total number of hen populations, and D is the spatial dimension; the evolution factor ω can be expressed as:
d best the average distance between the global optimal position and other hens is d max Minimum value d min ,ω∈[0,1]The method comprises the steps of carrying out a first treatment on the surface of the When the fractional order alpha epsilon [0.5,0.8 ]]In this case, the convergence rate of the algorithm is high, so α can be dynamically adjusted according to the following equation:
6. the multi-threshold Otsu image segmentation method based on the improved chicken crowd optimization algorithm according to claim 5, wherein the method is characterized by comprising the following steps: step six, introducing factors learned to a global optimal individual into a chicken position updating formula, wherein the specific improvement formula is as follows:
x i,j t+1 =x i,j t +E(x m,j t -x i,j t )+S t (x best,j t -x i,j t ) (12);
wherein the j-th dimension value of the m position of the mother hen is x m The influence factor of the position of the mother hen on the position of the chicken is E, which is randomly generated by a random function, and the value range is generally (0, 2); the updating formula of S ist is the current iteration number, t max For the maximum number of iterations, the value of S ranges from 1 to 0.
7. The multi-threshold Otsu image segmentation method based on the improved chicken crowd optimization algorithm of claim 6, wherein the method comprises the following steps: the fitness function adopts the inter-class variance of a multi-threshold Otsu algorithm, and the calculation formula is as follows:
wherein the threshold combination is [ t ] 1 ,t 2 ,…t K-1 ]Dividing the image into K categories;to the proportion of each category to the image after segmentation, mu i Mu, for the average grey scale of each class T Is the grey scale of the navy of the image.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310634340.9A CN116630346A (en) | 2023-05-31 | 2023-05-31 | Multi-threshold Otsu image segmentation method based on improved chicken flock optimization algorithm |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310634340.9A CN116630346A (en) | 2023-05-31 | 2023-05-31 | Multi-threshold Otsu image segmentation method based on improved chicken flock optimization algorithm |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116630346A true CN116630346A (en) | 2023-08-22 |
Family
ID=87616837
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310634340.9A Pending CN116630346A (en) | 2023-05-31 | 2023-05-31 | Multi-threshold Otsu image segmentation method based on improved chicken flock optimization algorithm |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116630346A (en) |
-
2023
- 2023-05-31 CN CN202310634340.9A patent/CN116630346A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108389211B (en) | Image segmentation method based on improved whale optimized fuzzy clustering | |
CN112424828B (en) | Nuclear fuzzy C-means quick clustering algorithm integrating space constraint | |
CN111445488B (en) | Method for automatically identifying and dividing salt body by weak supervision learning | |
CN109872330B (en) | Two-dimensional Otsu rapid image segmentation method for improving lion group optimization | |
CN109242878A (en) | A kind of multi-Level Threshold Image Segmentation method based on adaptive cuckoo optimization | |
CN109886979A (en) | Based on the multi-Level Threshold Image Segmentation method for improving cuckoo optimization | |
CN112861616A (en) | Passive field self-adaptive target detection method | |
CN105405136A (en) | Self-adaptive spinal CT image segmentation method based on particle swarm optimization | |
CN109658378B (en) | Pore identification method and system based on soil CT image | |
Lin et al. | Anchor assisted experience replay for online class-incremental learning | |
Yu et al. | Autonomous knowledge-oriented clustering using decision-theoretic rough set theory | |
Merzougui et al. | Region growing segmentation optimized by evolutionary approach and Maximum Entropy | |
CN110706270A (en) | Self-adaptive scene binocular stereo matching method based on convolutional neural network | |
CN108711155A (en) | A kind of image Fast Segmentation Algorithm of artificial bee colony Optimization of Fuzzy cluster | |
CN116596021A (en) | Model parameter optimization method and device based on improved sparrow search algorithm | |
CN117115547A (en) | Cross-domain long-tail image classification method based on self-supervision learning and self-training mechanism | |
CN116912568A (en) | Noise-containing label image recognition method based on self-adaptive class equalization | |
CN114758153A (en) | Data enhancement method and system based on significance preservation | |
CN108846845B (en) | SAR image segmentation method based on thumbnail and hierarchical fuzzy clustering | |
CN114139631A (en) | Multi-target training object-oriented selectable ash box confrontation sample generation method | |
CN109447997A (en) | A kind of underwater sonar image object dividing method of adaptive Cultural Algorithm | |
CN116630346A (en) | Multi-threshold Otsu image segmentation method based on improved chicken flock optimization algorithm | |
CN116433690A (en) | Otsu threshold segmentation method based on gray wolf and particle swarm collaborative optimization algorithm | |
CN115690476A (en) | Automatic data clustering method based on improved harmony search algorithm | |
CN115546626B (en) | Data double imbalance-oriented depolarization scene graph generation method and system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |