CN111210454B - Otsu image segmentation method based on parallel pigeon swarm algorithm - Google Patents

Otsu image segmentation method based on parallel pigeon swarm algorithm Download PDF

Info

Publication number
CN111210454B
CN111210454B CN202010025306.8A CN202010025306A CN111210454B CN 111210454 B CN111210454 B CN 111210454B CN 202010025306 A CN202010025306 A CN 202010025306A CN 111210454 B CN111210454 B CN 111210454B
Authority
CN
China
Prior art keywords
pigeon
algorithm
particles
image
fitness
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.)
Active
Application number
CN202010025306.8A
Other languages
Chinese (zh)
Other versions
CN111210454A (en
Inventor
朱淑娟
田爱庆
潘正祥
薛醒思
廖律超
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shandong University of Science and Technology
Original Assignee
Shandong University of Science and Technology
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Shandong University of Science and Technology filed Critical Shandong University of Science and Technology
Priority to CN202010025306.8A priority Critical patent/CN111210454B/en
Publication of CN111210454A publication Critical patent/CN111210454A/en
Application granted granted Critical
Publication of CN111210454B publication Critical patent/CN111210454B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/004Artificial life, i.e. computing arrangements simulating life
    • G06N3/006Artificial 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]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/194Segmentation; Edge detection involving foreground-background segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20092Interactive image processing based on input by user
    • G06T2207/20104Interactive definition of region of interest [ROI]
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

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

The invention discloses an Otsu image segmentation method based on a parallel pigeon swarm algorithm, and relates to the technical field of image segmentation. The method combines an improved pigeon group algorithm with a two-dimensional Otsu algorithm, and extracts a target area from an image to be cut; the image is optimized through an improved pigeon swarm algorithm, a global optimal solution is obtained and serves as an optimal threshold value, the image is segmented through an Ostu algorithm, an OTSU algorithm is an efficient algorithm for carrying out binarization on the image, and the pigeon swarm algorithm and the Ostu algorithm are combined according to an Ostu image segmentation method of a parallel pigeon swarm algorithm, so that an Otsu image segmentation method based on the parallel pigeon swarm algorithm is obtained.

Description

Otsu image segmentation method based on parallel pigeon swarm algorithm
Technical Field
The invention relates to the technical field of image segmentation, in particular to an Otsu image segmentation method based on a parallel pigeon swarm algorithm.
Background
In the research and application of images, people often have interest in some parts of the images, and the interested parts generally correspond to specific areas (which may be a single area or a plurality of areas) with special properties in the images, and the special areas are called targets or foregrounds; while the other part is referred to as the background of the image. The image segmentation is a key technology in image processing and is a classical difficult problem, a general method is not found in the continuous development process, and the quality of a segmentation algorithm result is not determined.
The first step of image analysis in image segmentation, and the quality of the subsequent tasks of image segmentation, such as feature extraction and target identification, all depend on the quality of image segmentation. Image cutting techniques have received a high level of attention since the 70's of the 20 th century. The threshold value cutting method is to simply divide the histogram of an image into several classes by using one or more threshold values, wherein pixels with gray values in the same gray class in the image belong to the same class, and the threshold value cutting method is a PR method and is characterized in that a gray value is determined to be used for distinguishing different classes, and the gray value is called as the threshold value.
Determining an optimal threshold is a key for segmentation, most of the existing algorithms focus on the research of threshold determination, and the threshold segmentation method can be further divided into a histogram and histogram transformation method, a maximum class space method, a minimum error method and a homogenization error method, a co-occurrence matrix method, a maximum entropy method, a simple statistical method and a local characteristic method, a probability relaxation method, a fuzzy set method, a feature space clustering method, a threshold selection method based on a transition region and the like according to all characteristics or criteria of the segmentation algorithm.
The pigeon swarm algorithm is a new meta-heuristic algorithm which appears in recent years and is proposed relative to an optimization algorithm, the optimization algorithm of a problem can obtain the optimal solution of the problem, the meta-heuristic algorithm is an algorithm which is constructed based on intuition or experience and can provide a feasible solution of the problem at an acceptable cost, the cost can refer to the cost of time or space, and the deviation degree of the feasible solution and the optimal solution can not be predicted in advance.
The pigeon swarm algorithm can be used for solving the optimization problem, the convergence speed is high, the optimal value is ideal, and the algorithm is widely applied once being put forward. However, the conventional image cutting has the problems of high time complexity, low segmentation precision and the like, so that the search for an accurate and rapid segmentation method becomes a research hotspot and difficulty in recent years.
Disclosure of Invention
The invention aims to overcome the defects, and provides an Otsu image segmentation method based on a parallel pigeon swarm algorithm, which combines an improved pigeon swarm algorithm with a two-dimensional Otsu algorithm, extracts a target region from an image to be segmented, optimizes the image through the improved pigeon swarm algorithm to obtain a global optimal solution as an optimal threshold, and segments the image by using an Ostu algorithm.
The invention specifically adopts the following technical scheme:
an Otsu image segmentation method based on a parallel pigeon swarm algorithm comprises the following steps:
step 1, initializing a pigeon group algorithm, determining the initialization speed and the initialization position of each pigeon in the pigeon group, setting the number of pigeons in the pigeon group as No, searching all pigeons in Dim dimensional space, expressing the search of each pigeon in each dimension by a formula (1), setting the sub-group of the pigeon group as Gr,
X k,Dim ={X k,1 ,X k,2 ,...,X k,Dim } (1),
where k = {1,2, no },
the speed of each pigeon is expressed by the formula (2),
V k,Dim ={V k,1 ,V k,2 ,...,V k,Dim } (2),
in the iterative process of the algorithm, gbest represents the pigeon Gbest (i) with the best position in the whole pigeon group represents the pigeon with the best position in the ith pigeon group by far;
step 2, graying the image to be cut, converting the image into a two-dimensional matrix, and then calculating a grayscale histogram of the image;
step 3, calculating a fitness function value of the position of each pigeon according to the set fitness function;
step 4, updating the global optimal position Gbest of each pigeon according to the calculated fitness function value of the position of the pigeon;
and 5, continuously updating the speed and the position of the individual in the sub-population according to the formulas (3) and (4) in the continuous iteration process:
the velocity is updated in the pigeon flock algorithm to the formula (3): v i Nc =V i Nc-1 e -R*Nc +rand(X gbest -X i Nc-1 ) (3),
The position update in the pigeon flock algorithm is formula (4): x i Nc =X i Nc-1 +V i Nc (4),
In updating its position X i And velocity V i R is a map and compass operator factor, and the value range is set to be (0,1); rand is a random number with a value range of (0,1); n is a radical of c The number of current iterations; x gbest Is at N c After 1 iteration cycle, obtaining a global optimal position by comparing the positions of all pigeons, stopping the work of a map and compass operator when the iteration times reach a preset value, and then entering a landmark operator to continue working;
after the map and compass operators are updated, the pigeon swarm algorithm enters a landmark operator at the second stage; after entering the landmark operator, the number of pigeons is reduced by half after each iteration, and pigeons which are far away from the destination and do not have the function of identifying paths are abandoned, X center Is the center position of the remaining pigeons, then this X center Will be treated as a landmark, i.e. as a reference direction for flight, the landmark operator is updated to equations (5) - (10):
the central position selected by a landmark operator in the pigeon group algorithm is represented by formula (5):
Figure BDA0002360339340000031
the landmark operator pigeon group in the pigeon group algorithm is halved into formula (6):
Figure BDA0002360339340000032
the landmark operator positions in the pigeon flock algorithm are updated to equation (7):
X i =X i Nc-1 +rand(X Nc-1 center -X i Nc-1 ) (7);
the Pigeon group algorithm has different definitions for the test functions, which are expressed as formulas (8) - (10)
The pigeon flock algorithm has the following equation (8) for minimizing the problem:
Figure BDA0002360339340000033
the pigeon flock algorithm has the following equation (9) for the maximization problem: f (X) i Nc-1 )=fitness(X i Nc-1 ) (9),
In the case where the maximization problem and the minimization problem are expressed by the formula (10), fitness (X) i Nc-1 )>0 (10),
After the iteration times of the landmark operator reach the maximum iteration times, the landmark operator stops working;
step 6, randomly generating M particles, and arranging the generated M + N particles from large to small according to the value of fitness;
step 7, setting the position of a node Q, and dividing newly generated population particles into Q (Q is more than or equal to 1 and less than or equal to N) particles with fitness values arranged in the front and the rest M + N-Q particles by using the node particles Q;
step 8, selecting M-Q particles and Q particles with fitness arranged in front to form a new particle swarm from the rest M + N-Q particles by using a particle selection probability formula;
and 9, finishing optimization and outputting a global optimal solution when the conditions are met, performing threshold segmentation on the image and outputting the segmented image, wherein the global optimal solution finally searched by the particle swarm is the most optimal segmentation threshold.
Preferably, in the second step, the histogram is calculated by using the integrated information of gray gradient, gray level and distance, and the specific steps are as follows:
step 1, calculating the gradient value of the pixel as (11):
Figure BDA0002360339340000034
wherein G is h (x,y),G v (x, y) respectively represents the horizontal and vertical pixel values of the pixel point at (x, y);
step 2, when calculating the distance, firstly carrying out normalization processing on the coordinate, wherein the distance calculation formula is (12):
Figure BDA0002360339340000035
wherein i and j are coordinate values after normalization treatment, i is more than or equal to 0, and j is less than or equal to 1;
and 3, obtaining a histogram with a calculation formula (13):
H(i,j)=a 1 ×G(i,j)+a 2 ×D(i,j)+a 3 (13)
wherein, a 1 ,a 2 ,a 3 Respectively are the weight of the gradient, distance, gray level, and, a 1 +a 2 +a 3 =1,0≤a 1 ,a 2 ,a 3 ≤1。
Preferably, in order to improve the diversity of the population, on the basis of the N particles which are set originally, M new particles are generated randomly, the M + N particles are calculated and sorted according to the fitness, then a node Q is set, and the newly generated population is divided into two parts by using the node particle Q:
a first part: the fitness value of the Q (1 is more than or equal to Q and less than or equal to N) particles arranged in the front,
a second part: the fitness value ranks M + N-Q particles in the back,
in the particle updating process, in order to keep the size of the population unchanged, N-Q particles and Q particles in the first part are selected from the second part of particles to form a new population, and the selection probability P (i) of the particles i in the second part is expressed by the formula (14):
Figure BDA0002360339340000041
wherein, the fitness (i) represents a fitness function value of the particle i;
according to the Otsu algorithm principle, the object, namely the interested area, is obtained when the gray value is larger than the optimal threshold, and the background is obtained when the gray value is smaller than the optimal threshold, so that the image is segmented.
The invention has the following beneficial effects:
the invention provides an Ostu image segmentation method based on an improved pigeon group algorithm, which can improve the segmentation precision and effectively improve the segmentation speed.
In the position updating formula in the pigeon swarm algorithm, interspecies communication is carried out every 20 times, and the communication strategy is selected according to the principle that the pigeon with the highest rank in the whole swarm replaces the worst individual in all the sub-swarm, so that the local searching capacity and the global searching capacity are accelerated, and the pigeon does not easily fall into the local optimum. Compared with the original method, the convergence speed of the pigeon group algorithm added with the parallel strategy is higher, and the obtained optimal value is more excellent.
In order to avoid the misplacement of the target and the background, the invention selects an Ostu threshold segmentation algorithm of a two-dimensional histogram based on comprehensive information of gray level, gradient and distance. In order to improve the pigeon group algorithm, under the condition of ensuring that the group scale is not changed, a parallel pigeon group algorithm is provided, the pigeon group is updated, and the comprehensiveness of pigeon group solution is improved. In the optimization process of the two-dimensional Ostu threshold segmentation algorithm by utilizing the pigeon swarm algorithm, the calculated amount of the histogram is further reduced and the search space of the pigeon is reduced according to the characteristic that effective information is mainly distributed below the two-dimensional histogram of gray-gradient-distance.
Drawings
FIG. 1 is a flow chart of an Otsu image segmentation method based on a parallel pigeon flock algorithm.
Detailed Description
The following description of the embodiments of the present invention will be made with reference to the accompanying drawings:
combining the improved pigeon swarm algorithm with a two-dimensional Otsu algorithm with the figure 1, and extracting a target area from an image to be cut; the image is optimized through an improved pigeon swarm algorithm, a global optimal solution is obtained and serves as an optimal threshold value, the image is segmented through an Ostu algorithm, and the OTSU algorithm is an efficient algorithm for carrying out binarization on the image.
According to the image segmentation method of the Ostu of the parallel pigeon swarm algorithm, the Otsu image segmentation method based on the parallel pigeon swarm algorithm is obtained by combining the pigeon swarm algorithm and the Ostu algorithm, and comprises the following steps:
step 1, initializing a pigeon group algorithm, determining the initialization speed and the initialization position of each pigeon in the pigeon group, setting the number of the pigeons in the pigeon group as No, searching all the pigeons in Dim dimensional space, expressing the search of each pigeon in each dimension by a formula (1),
X k,Dim ={X k,1 ,X k,2 ,...,X k,Dim } (1),
where k = {1,2,. Ang, no },
the speed of each pigeon is expressed by the formula (2),
V k,Dim ={V k,1 ,V k,2 ,...,V k,Dim } (2),
during the iteration of the algorithm, gbest represents the pigeon that has been positioned the best in the entire group of pigeons by far.
And 2, graying the image to be cut, converting the image into a two-dimensional matrix, and then calculating a gray level histogram of the image.
And 3, calculating the fitness function value of the position of each pigeon according to the set fitness function.
And 4, updating the global optimal position Gbest of each pigeon according to the calculated fitness function value of the position of the pigeon.
And 5, continuously updating the speed and the position of the individual in the sub-population in the continuous iteration process, and updating the individual according to the formulas (3) and (4):
the velocity is updated in the pigeon flock algorithm to the formula (3): v i Nc =V i Nc-1 e -R*Nc +rand(X gbest -X i Nc-1 ) (3),
The position update in the pigeon flock algorithm is formula (4): x i Nc =X i Nc-1 +V i Nc (4),
In updating its position X i And velocity V i R is a factor of a map operator and a compass operator, and the value range is set to be (0,1); rand is a random number with a value range of (0,1); n is a radical of c The number of current iterations; x gbest Is at N c After 1 iteration cycle, the global optimal position is obtained by comparing the positions of all pigeons, when the iteration times reach the preset value, the work of a map and compass operator is stopped, and then the landmark operator is started to work continuously.
After the map and compass operators are updated, the pigeon swarm algorithm enters a landmark operator at the second stage; after entering the landmark operator, the number of pigeons is reduced by half after each iteration, and pigeons which are far away from the destination and do not have the function of identifying paths are abandoned, X center Is the center position of the remaining pigeons, then this X center Will be treated as a landmark, i.e. as a reference direction for flight, the landmark operator is updated to equations (5) - (10):
the central position selected by a landmark operator in the pigeon group algorithm is represented by formula (5):
Figure BDA0002360339340000061
the landmark operator pigeon group in the pigeon group algorithm is halved into formula (6):
Figure BDA0002360339340000062
the landmark operator positions in the pigeon flock algorithm are updated to equation (7):
X i =X i Nc-1 +rand(X Nc-1 center -X i Nc-1 ) (7);
the Pigeon group algorithm has different definitions for the test functions, which are expressed as formulas (8) - (10)
The pigeon flock algorithm has the following equation (8) for minimizing the problem:
Figure BDA0002360339340000063
the pigeon flock algorithm has the following equation (9) for the maximization problem: f (X) i Nc-1 )=fitness(X i Nc-1 ) (9),
In the case where the maximization problem and the minimization problem are expressed by the formula (10), fitness (X) i Nc-1 )>0 (10),
And after the iteration times of the landmark operator reach the maximum iteration times, stopping the work of the landmark operator.
And 6, randomly generating M particles, and arranging the generated M + N particles from large to small according to the fitness value.
And 7, setting the position of a node Q, and dividing newly generated population particles into Q (Q is more than or equal to 1 and less than or equal to N) particles with fitness values arranged in the front and the rest M + N-Q particles by using the node particles Q.
And 8, selecting M-Q particles and Q particles with the fitness being arranged in front from the rest M + N-Q particles by using a particle selection probability formula to form a new particle swarm.
And 9, finishing optimization and outputting a global optimal solution when the conditions are met, performing threshold segmentation on the image and outputting the segmented image, wherein the global optimal solution finally searched by the particle swarm is the most optimal segmentation threshold.
In the second step, the histogram is calculated by utilizing the comprehensive information of gray gradient, gray level and distance, and the specific steps are as follows:
step 1, calculating the gradient value of the pixel as (11):
Figure BDA0002360339340000064
wherein G is h (x,y),G v And (x, y) respectively represents the horizontal and vertical pixel values of the pixel point at (x, y).
Step 2, when calculating the distance, firstly carrying out normalization processing on the coordinate, wherein the distance calculation formula is (12):
Figure BDA0002360339340000071
/>
wherein i and j are coordinate values after normalization processing, i is more than or equal to 0, and j is less than or equal to 1.
And 3, obtaining a histogram with a calculation formula (13):
H(i,j)=a 1 ×G(i,j)+a 2 ×D(i,j)+a 3 (13)
wherein, a 1 ,a 2 ,a 3 Respectively are the weight of the gradient, distance, gray level, and, a 1 +a 2 +a 3 =1,0≤a 1 ,a 2 ,a 3 ≤1。
In order to improve the diversity of the population, on the basis of the originally set N particles, M new particles are randomly generated, the M + N particles are calculated and sequenced according to the fitness, then a node Q is set, and the newly generated population is divided into two parts by the node particle Q:
a first part: the fitness value of the Q (1 is more than or equal to Q and less than or equal to N) particles arranged in the front,
a second part: the fitness value ranks in the next M + N-Q particles,
in the particle updating process, in order to keep the size of the population unchanged, N-Q particles are selected from the second part of particles, and the first part of Q particles form a new population, wherein the selection probability P (i) of the particles i in the second part is represented by formula (14):
Figure BDA0002360339340000072
wherein, the fitness (i) represents a fitness function value of the particle i;
by the Otsu algorithm principle, the object which is the interested area with the gray value larger than the optimal threshold value is taken, and the background which is the interested area with the gray value smaller than the optimal threshold value is taken, so that the image is segmented.
It is to be understood that the above description is not intended to limit the present invention, and the present invention is not limited to the above examples, and those skilled in the art may make modifications, alterations, additions or substitutions within the spirit and scope of the present invention.

Claims (3)

1. An Otsu image segmentation method based on a parallel pigeon swarm algorithm is characterized by comprising the following steps of:
step 1, initializing a pigeon group algorithm, determining the initialization speed and the initialization position of each pigeon in the pigeon group, setting the number of pigeons in the pigeon group as No, searching all pigeons in Dim dimensional space, expressing the search of each pigeon in each dimension by a formula (1), setting the sub-group of the pigeon group as Gr,
X k,Dim ={X k,1 ,X k,2 ,...,X k,Dim } (1),
where k = {1,2, no },
the speed of each pigeon is expressed by a formula (2),
V k,Dim ={V k,1 ,V k,2 ,...,V k,Dim } (2),
in the iterative process of the algorithm, gbest represents the pigeon with the best position in the whole pigeon group, and Gbest (i) represents the pigeon with the best position in the ith pigeon group;
step 2, graying the image to be cut, converting the image into a two-dimensional matrix, and then calculating a gray histogram of the image;
step 3, calculating a fitness function value of the position of each pigeon according to the set fitness function;
step 4, updating the global optimal position Gbest of each pigeon according to the calculated fitness function value of the position of the pigeon;
and 5, continuously updating the speed and the position of the individual in the sub-population according to the formulas (3) and (4) in the continuous iteration process:
the velocity is updated in the pigeon flock algorithm to the formula (3): v i Nc =V i Nc-1 e -R*Nc +rand(X gbest -X i Nc-1 ) (3),
The position update in the pigeon flock algorithm is formula (4): x i Nc =X i Nc-1 +V i Nc (4),
In updating its position X i And velocity V i R is a map and compass operator factor, and the value range is set to be (0,1); rand is a random number with a value range of (0,1); n is a radical of c The number of current iterations; x gbest Is at N c After 1 iteration cycle, obtaining a global optimal position by comparing the positions of all pigeons, stopping the work of a map and compass operator when the iteration times reach a preset value, and then entering a landmark operator to continue working;
after the map and compass operators are updated, the pigeon swarm algorithm enters a landmark operator at the second stage; after entering the landmark operator, the number of pigeons is reduced by half after each iteration, and pigeons which are far away from the destination and have no path identification function are abandoned, X center Is the center position of the remaining pigeons, then this X center Will be treated as a landmark, i.e. as a reference direction for flight, the landmark operator is updated to equations (5) - (10):
the central position selected by a landmark operator in the pigeon group algorithm is represented by formula (5):
Figure FDA0003644491350000021
the landmark operator pigeon group in the pigeon group algorithm is halved into formula (6):
Figure FDA0003644491350000022
the landmark operator positions in the pigeon flock algorithm are updated to equation (7):
X i =X i Nc-1 +rand(X Nc-1 center -X i Nc-1 ) (7);
the Pigeon group algorithm has different definitions for the test functions, which are expressed as formulas (8) - (10)
The pigeon flock algorithm has the following equation (8) for minimizing the problem:
Figure FDA0003644491350000023
the pigeon flock algorithm has the following equation (9) for the maximization problem: f (X) i Nc-1 )=fitness(X i Nc-1 ) (9),
In the case where the maximization problem and the minimization problem are expressed by the formula (10), fitness (X) i Nc-1 )>0 (10),
After the iteration times of the landmark operator reach the maximum iteration times, the landmark operator stops working;
in the position updating method in the pigeon swarm algorithm, interspecies communication is carried out every 20 times of updating, and the selected communication strategy is to replace the worst individual in all the sub-populations by the pigeon with the highest rank in the whole population, so that the local search and global search capacity is accelerated, and the situation that the pigeon is trapped in local optimum is avoided;
step 6, randomly generating M particles, and arranging the generated M + N particles from large to small according to the value of fitness;
step 7, setting the position of a node Q, and dividing newly generated population particles into Q (Q is more than or equal to 1 and less than or equal to N) particles with fitness values arranged in the front and the rest M + N-Q particles by using the node particles Q;
step 8, selecting M-Q particles and Q particles with fitness arranged in front to form a new particle swarm from the rest M + N-Q particles by using a particle selection probability formula;
and 9, finishing optimization and outputting a global optimal solution when the conditions are met, performing threshold segmentation on the image and outputting the segmented image, wherein the global optimal solution finally searched by the particle swarm is the most optimal segmentation threshold.
2. The Otsu image segmentation method based on the parallel pigeon flock algorithm according to claim 1, wherein in the second step, the histogram is calculated by using the comprehensive information of gray gradient, gray scale and distance, and the specific steps are as follows:
step 1, calculating the gradient value of the pixel as (11):
Figure FDA0003644491350000024
wherein G is h (x,y),G v (x, y) respectively represents the horizontal and vertical pixel values of the pixel point at (x, y);
step 2, when calculating the distance, firstly carrying out normalization processing on the coordinate, wherein the distance calculation formula is (12):
Figure FDA0003644491350000031
wherein i and j are coordinate values after normalization treatment, i is more than or equal to 0, and j is less than or equal to 1;
and 3, obtaining a histogram with a calculation formula (13):
H(i,j)=a 1 ×G(i,j)+a 2 ×D(i,j)+a 3 (13)
wherein, a 1 ,a 2 ,a 3 Respectively are the weight of the gradient, distance, gray level, and, a 1 +a 2 +a 3 =1,0≤a 1 ,a 2 ,a 3 ≤1。
3. The Otsu image segmentation method based on the parallel pigeon flock algorithm according to claim 1 or 2, wherein in order to improve the diversity of the population, M new particles are randomly generated based on N particles which are set originally, M + N particles are calculated and sorted according to the fitness, and then a node Q is set, and the newly generated population is divided into two parts by using the node particle Q:
a first part: the fitness value of the Q (1 is more than or equal to Q and less than or equal to N) particles arranged in the front,
a second part: the fitness value ranks in the next M + N-Q particles,
in the particle updating process, in order to keep the size of the population unchanged, N-Q particles are selected from the second part of particles, and the first part of Q particles form a new population, wherein the selection probability P (i) of the particles i in the second part is represented by formula (14):
Figure FDA0003644491350000032
wherein, the fitness (i) represents a fitness function value of the particle i;
by the Otsu algorithm principle, the object, namely the interested area, is obtained when the gray value is larger than the optimal threshold, and the background is obtained when the gray value is smaller than the optimal threshold, so that the image is segmented.
CN202010025306.8A 2020-01-09 2020-01-09 Otsu image segmentation method based on parallel pigeon swarm algorithm Active CN111210454B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010025306.8A CN111210454B (en) 2020-01-09 2020-01-09 Otsu image segmentation method based on parallel pigeon swarm algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010025306.8A CN111210454B (en) 2020-01-09 2020-01-09 Otsu image segmentation method based on parallel pigeon swarm algorithm

Publications (2)

Publication Number Publication Date
CN111210454A CN111210454A (en) 2020-05-29
CN111210454B true CN111210454B (en) 2023-04-07

Family

ID=70787106

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010025306.8A Active CN111210454B (en) 2020-01-09 2020-01-09 Otsu image segmentation method based on parallel pigeon swarm algorithm

Country Status (1)

Country Link
CN (1) CN111210454B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112085725B (en) * 2020-09-16 2021-08-27 塔里木大学 Residual film residual quantity detection method and early warning system based on heuristic iterative algorithm
CN113177954B (en) * 2021-04-28 2022-07-26 中南大学 Image processing method and device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103971180A (en) * 2014-05-09 2014-08-06 北京航空航天大学 Continuous optimization problem solving method based on pigeon-inspired optimization
CN106979784A (en) * 2017-03-16 2017-07-25 四川大学 Non-linear trajectory planning based on mixing dove group's algorithm

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103971180A (en) * 2014-05-09 2014-08-06 北京航空航天大学 Continuous optimization problem solving method based on pigeon-inspired optimization
CN106979784A (en) * 2017-03-16 2017-07-25 四川大学 Non-linear trajectory planning based on mixing dove group's algorithm

Non-Patent Citations (7)

* Cited by examiner, † Cited by third party
Title
An Improved Otsu Multi-threshold Image Segmentation Algorithm Based on Pigeon-Inspired Optimization;Wei Liu,et al.;《2018 11th International Congress on Image and Signal Processing, BioMedical Engineering and Informatics (CISP-BMEI 2018)》;20181231;全文 *
Pigeon-inspired optimization: a new swarm intelligence optimizer for air robot path planning;Haibin Duan and Peixin Qiao;《International Journal of Intelligent Computing and Cybernetics》;20141231;全文 *
基于一维 Otsu 的多阈值医学图像分割算法;申铉京,等.;《吉林大学学报(理学版)》;20160331;第54卷(第2期);全文 *
基于并行粒子群算法的Otsu双阈值医学图像分割;邬锡琴等;《实验技术与管理》;20110228;第28卷(第02期);全文 *
基于鸽群优化算法的图像分割方法研究;胡春鹤,等.;《郑州大学学报(工学版)》;20190731;第40卷(第4期);全文 *
自适应分级粒子群算法的阈值图像分割研究;鲁俊等;《软件导刊》;20170331;第16卷(第03期);全文 *
鸽群优化算法研究进展;段海滨,叶飞;《北京工业大学学报》;20170131;第43卷(第1期);全文 *

Also Published As

Publication number Publication date
CN111210454A (en) 2020-05-29

Similar Documents

Publication Publication Date Title
CN111191732B (en) Target detection method based on full-automatic learning
CN108664971B (en) Pulmonary nodule detection method based on 2D convolutional neural network
US9031305B2 (en) Image classification apparatus with first and second feature extraction units and recording medium having program recorded therein
CN109800778A (en) A kind of Faster RCNN object detection method for dividing sample to excavate based on hardly possible
CN108389211B (en) Image segmentation method based on improved whale optimized fuzzy clustering
CN107633226B (en) Human body motion tracking feature processing method
CN104376556B (en) A kind of rock CT images Target Segmentation method
CN107392919B (en) Adaptive genetic algorithm-based gray threshold acquisition method and image segmentation method
CN111210454B (en) Otsu image segmentation method based on parallel pigeon swarm algorithm
CN108154158B (en) Building image segmentation method for augmented reality application
CN110443257B (en) Significance detection method based on active learning
CN109598726A (en) A kind of adapting to image target area dividing method based on SLIC
CN112001218A (en) Three-dimensional particle category detection method and system based on convolutional neural network
CN106599915A (en) Vehicle-mounted laser point cloud classification method
CN107169983A (en) Multi-threshold image segmentation method based on cross and variation artificial fish-swarm algorithm
CN110992365A (en) Loss function based on image semantic segmentation and design method thereof
CN107766792B (en) Remote sensing image ship target identification method
CN113743470A (en) AI algorithm-based garbage recognition precision improvement method for automatic bag breaking classification box
CN109658378A (en) Hole discrimination method and system based on soil CT image
CN109272522B (en) A kind of image thinning dividing method based on local feature
CN110188811A (en) Underwater target detection method based on normed Gradient Features and convolutional neural networks
CN112070787B (en) Aviation three-dimensional point cloud plane segmentation method based on opponent reasoning theory
CN109840558A (en) Based on density peaks-core integration adaptive clustering scheme
CN110942467A (en) Improved watershed image segmentation method based on PSO-FCM
CN110310297B (en) Image segmentation method and system based on multi-resolution search particle swarm algorithm

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
GR01 Patent grant
GR01 Patent grant