CN116862941B - Image edge detection method and system based on improved gene expression programming - Google Patents

Image edge detection method and system based on improved gene expression programming Download PDF

Info

Publication number
CN116862941B
CN116862941B CN202311134574.3A CN202311134574A CN116862941B CN 116862941 B CN116862941 B CN 116862941B CN 202311134574 A CN202311134574 A CN 202311134574A CN 116862941 B CN116862941 B CN 116862941B
Authority
CN
China
Prior art keywords
population
individuals
image
original
optimal
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
CN202311134574.3A
Other languages
Chinese (zh)
Other versions
CN116862941A (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.)
Tianjin Urban Planning And Design Institute Co ltd
Original Assignee
Tianjin Urban Planning And Design Institute Co ltd
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 Tianjin Urban Planning And Design Institute Co ltd filed Critical Tianjin Urban Planning And Design Institute Co ltd
Priority to CN202311134574.3A priority Critical patent/CN116862941B/en
Publication of CN116862941A publication Critical patent/CN116862941A/en
Application granted granted Critical
Publication of CN116862941B publication Critical patent/CN116862941B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • 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
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/12Computing arrangements based on biological models using genetic models
    • G06N3/126Evolutionary algorithms, e.g. genetic algorithms or genetic programming
    • 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/20081Training; Learning

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Biophysics (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • General Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Artificial Intelligence (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Biology (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Biomedical Technology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physiology (AREA)
  • Genetics & Genomics (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses an image edge detection method and system based on improved gene expression programming, comprising the following steps: constructing an image feature set, generating an original population P0, calculating the fitness value of each individual in the original population P0 according to the training set image and the image edge detection evaluation function, and generating a new generation population P1 and an adjustment population AP; performing cross mutation operation: performing cross operation on the new generation population P1 and the adjustment population AP, and performing mutation and string insertion operation on the new generation population P1 only to obtain a population P2; n individuals with the optimal fitness are selected to form an original population P0, the individuals with the best fitness in the optimal population BP are output, and the images in the image library are utilized to test the individuals. According to the invention, on the basis of a GEP algorithm, the population is regulated, so that the diversity of the original population in the evolution process is increased, the convergence speed of the algorithm is improved, and the accuracy of image edge detection is improved.

Description

Image edge detection method and system based on improved gene expression programming
Technical Field
The invention belongs to the field of image processing, and particularly relates to an image edge detection method and system based on improved gene expression programming.
Background
80% of the external information received by humans comes from vision and relates to video, image, graphics, text and other types of data. The perception of an object by a person depends largely on the edges and contours of the object. The image is subjected to edge detection to obtain the main outline of the object, the main information of the main outline is also displayed, and some secondary information is filtered out. Therefore, image edge detection is regarded as a fundamental problem in the field of image processing, and is very important for many application fields of image edge processing, such as fields of computer vision, pattern recognition, object detection, image classification, image segmentation, and the like. A good edge detection technique can provide better guarantees for subsequent image processing and applications.
At present, some evolutionary computing methods have been used to solve image edge detection problems, such as genetic algorithms, genetic programming, and the like. The evolutionary computation is a search algorithm which simulates the concept of the superior and inferior in the Darwin evolutionary theory to achieve the optimization task. Compared with the conventional mathematical method, the evolution calculation does not need excessive theoretical deduction, but the population obtains a satisfactory result by itself according to an evolution mechanism. Thus, no matter how hard the problem is, the evolutionary computation can have different answering methods. With the continued research of the manifestation of evolutionary computation by researchers, evolutionary computation emerges from 4 typical approaches of genetic algorithm (Genetic Algorithms, GA), genetic programming (Genetic Programming, GP), evolutionary strategy (Evolution Strategies, ES) and evolutionary programming (Evolution Programming, EP).
The population individuals of the genetic algorithm are character strings with linear equal length, each individual is represented by a nonlinear structure (analytic tree) with different shapes and sizes in genetic programming, the limitation of fixed chromosome length in the genetic algorithm is overcome, and the character set constructing the tree structure is correspondingly more diversified, so that more expression systems with more functions can be created. However, the genetic programming is similar to linear chromosomes in the genetic algorithm, and the genotype and the phenotype are integrated, so that the superiority of the linear chromosome is restrained. The gene expression programming (Gene Expression Programming, GEP) is a new evolutionary algorithm proposed on the basis of genetic algorithm and genetic programming, integrates the characteristics of fixed-length and linear character strings in the genetic algorithm and tree structures with variable shapes and sizes in the genetic programming, truly separates the genotypes and the phenotypes of chromosomes, and has great advantages.
However, the GEP algorithm also has a certain limitation, when the algorithm evolves to a later stage, some individuals with the same or higher similarity may appear in the population involved in the evolution, so that the population diversity is reduced, the local optimal solution is easily trapped, and the convergence rate of the population is slow. These deficiencies of the genetic expression programming algorithm make the quality of the image pixel edge discrimination rules generated by the population in evolutionary iteration low, and the result causes the non-ideal image edge detection result.
Disclosure of Invention
The invention provides an image edge detection method and system based on improved gene expression programming, which introduces an adjustment population on the basis of a GEP algorithm, increases the diversity of the original population in the evolution process, and improves the convergence speed of the algorithm, thereby improving the accuracy of image edge detection.
In order to achieve the above purpose, the technical scheme of the invention is realized as follows:
an image edge detection method based on improved gene expression programming, comprising:
s1, constructing an image feature set, initializing a gene expression programming algorithm according to the image feature set, and generating an original population P0, wherein the size of the original population P0 is n, and n is larger than or equal to 1;
s2, calculating the fitness value of each individual in the original population P0 according to the training set image and the image edge detection evaluation function, judging whether the shutdown criterion is met or not according to the set genetic algebra, if yes, executing the step S6, otherwise, executing the step S3;
s3, generating a new generation population P1 and an adjustment population AP according to the obtained fitness value; the new generation population P1 retains the optimal individuals of the original population P0; the individuals in the regulating population AP comprise two types, one part of individuals are randomly initialized, and the other part of individuals comprise the optimal individuals in the whole genetic process;
s4, performing cross mutation operation: performing cross operation on the new generation population P1 and the adjustment population AP, and performing mutation and string insertion operation on the new generation population P1 only to obtain a population P2;
s5, selecting: according to the image edge detection evaluation function, calculating the fitness value of individuals in the population P2 and the adjustment population AP, and selecting an individual with optimal fitness to store in the optimal population BP; in addition, n individuals with optimal fitness are selected to form an original population P0, and step S2-step S5 are executed;
and S6, outputting individuals with the best fitness in the optimal population BP, and testing the individuals by using images in an image library.
Further, the specific steps of step S1 include:
s1a, constructing an image feature set: according to the images in the image library, randomly selecting an original image and the corresponding image of the artificial mark edge to form a training set; gray processing is carried out on the original color images in the training set; arranging the gray images in a column mode according to pixel values to form a first column of a feature matrix; sequentially forming the 2 nd to 9 th columns of the feature matrix by 8 pixel values around the position of the first column pixel value in the original image according to the sequence from left to right and from top to bottom; finally generating a 9-dimensional image feature set;
s1b, initializing a gene expression programming algorithm to generate an original population P0, wherein each individual in the original population P0 is represented by a chromosome, each chromosome comprises 3 genes consisting of a head part and a tail part, the elements of the head part are from a function symbol set FS and a terminator set TS, the elements of the tail part are from the terminator set TS, and the gene headsThe length of the tail and the tail satisfy:
wherein t represents the length of the tail, h represents the length of the head, v represents the number of parameters of the function with the most variables needed in the function symbol set FS;
the terminator set TS contains an image feature set, a random number.
Further, in step S2, the image edge detection evaluation function is:
wherein, fit is the fitness value, sensitivity is the ratio of the image edge points successfully detected, and specificity is the ratio of the image non-edge points successfully classified as non-edge points.
Further, in step S3, the method for generating the new generation population P1 includes: adopting elite retention strategy to retain the optimal individuals in the original population P0 in P1; the other n-1 individuals are selected from the original population P0 by using a roulette selection method, and finally form a new generation population P1 with the population size of n.
Further, in step S3, the generation method of the population AP includes: in an optimal population BP for storing an optimal solution of the generation in the whole genetic process, selecting a part of individuals with optimal fitness value, putting the individuals into an adjustment population AP, and ensuring the convergence of the adjustment population; the remaining individuals were initialized randomly.
Further, in step S4, the operators of the crossover operation include single-point recombination, two-point recombination and gene recombination; the mutation manipulation includes genetic mutation, DC domain mutation, and RNS mutation; the insertion operation comprises RIS insertion and gene insertion.
In another aspect, the present invention also provides an image edge detection system programmed based on an improved gene expression, comprising:
an initialization module: constructing an image feature set, initializing a gene expression programming algorithm according to the image feature set, and generating an original population P0, wherein the size of the original population P0 is n, and n is larger than or equal to 1;
and the fitness and judgment module is used for: calculating the fitness value of each individual in the original population P0 according to the training set image and the image edge detection evaluation function, judging whether a shutdown criterion is met according to the set genetic algebra, if yes, transferring to an output and test module, otherwise, transferring to a new generation population and population regulation module;
new generation population and adjustment population module: generating a new generation population P1 and an adjustment population AP according to the obtained fitness value; the new generation population P1 retains the optimal individuals of the original population P0; the individuals in the regulating population AP comprise two types, one part of individuals are randomly initialized, and the other part of individuals comprise the optimal individuals in the whole genetic process;
the cross mutation operation module: performing cross mutation operation: performing cross operation on the new generation population P1 and the adjustment population AP, and performing mutation and string insertion operation on the new generation population P1 only to obtain a population P2;
selecting an operation module: according to the image edge detection evaluation function, calculating the fitness value of individuals in the population P2 and the adjustment population AP, and selecting an individual with optimal fitness to store in the optimal population BP; in addition, n individuals with optimal fitness are selected to form an original population P0, and the original population P0 is transferred to a fitness and judgment module;
and an output and test module: and outputting individuals with the best fitness in the optimal population BP, and testing the individuals by using images in an image library.
Further, the initialization module includes:
an image feature set unit configured to construct an image feature set: according to the images in the image library, randomly selecting an original image and the corresponding image of the artificial mark edge to form a training set; gray processing is carried out on the original color images in the training set; arranging the gray images in a column mode according to pixel values to form a first column of a feature matrix; sequentially forming the 2 nd to 9 th columns of the feature matrix by 8 pixel values around the position of the first column pixel value in the original image according to the sequence from left to right and from top to bottom; finally generating a 9-dimensional image feature set;
the programming initialization unit is used for initializing a gene expression programming algorithm to generate an original population P0, each individual in the original population P0 is represented by a chromosome, each chromosome comprises 3 genes consisting of a head part and a tail part, elements of the head part come from a function symbol set FS and a terminator set TS, elements of the tail part come from the terminator set TS, and the lengths of the head part and the tail part of the genes meet the following conditions:
wherein t represents the length of the tail, h represents the length of the head, v represents the number of parameters of the function with the most variables needed in the function symbol set FS;
the terminator set TS contains an image feature set, a random number.
Further, the new generation population and the population adjustment module comprise a new generation population unit: for retaining optimal individuals in the original population P0 in P1 using elite retention policies; the other n-1 individuals are selected from the original population P0 by using a roulette selection method, and finally form a new generation population P1 with the population size of n.
Further, the new generation population and the population regulation module comprise population regulation units: the method comprises the steps of selecting a part of individuals with optimal fitness value from an optimal population BP for storing an optimal solution of the generation in the whole genetic process, putting the selected part of individuals into an adjustment population AP, and ensuring the convergence of the adjustment population; the remaining individuals were initialized randomly.
Compared with the prior art, the invention has the following beneficial effects:
(1) According to the invention, on the basis of carrying out image edge detection by using a traditional gene expression programming algorithm, an adjusting population is introduced, so that the diversity of an original population in the evolution process is increased, and the problem of sinking into a local optimal solution is avoided; the quality of the image pixel edge discrimination rule generated in the evolution iteration is improved;
(2) According to the invention, the optimal solution of the evolutionary process history is saved by using the regulating population, and the optimal solution is crossed with the original population, so that the convergence rate of the original population in the evolutionary process is increased, the quality of the image pixel edge discrimination rule generated in the evolutionary iteration is further improved, and the accuracy of the image edge detection result is improved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the invention. In the drawings:
FIG. 1 is a schematic flow chart of an embodiment of the present invention;
fig. 2 is a schematic diagram of gray scale images arranged in columns according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of an individual cross-rebinning operation in accordance with an embodiment of the present invention;
wherein (a) is a single point recombination operation schematic; (b) a two-point recombination operation schematic; (c) is a schematic diagram of gene recombination operations;
FIG. 4 is a graph showing the comparison effect between the experimental results and the original image according to the embodiment of the present invention;
the first column is the original picture of gray processing, the second column is the image edge of the artificial mark, and the third column is the image edge result of the processing of the invention.
Detailed Description
The invention will be described in detail below with reference to the drawings in connection with embodiments.
As shown in fig. 1, the image edge detection method programmed based on the improved gene expression in the present embodiment includes the steps of:
step 1, constructing an image feature set, initializing a gene expression programming algorithm according to the image feature set, and generating an original population P0, wherein the population size is 100;
step 1 a) constructing an image feature set: and randomly picking out the original image and the corresponding image of the artificial mark edge to form a training set according to the images in the image library. Firstly, carrying out gray scale processing on an original color image in a training set; then, arranging the gray-scale images in columns according to pixel values to form a first column of a feature matrix (a column-wise arrangement conversion schematic diagram is shown in fig. 2); in addition, 8 pixel values around the position where the first column of pixel values are located in the original image sequentially form the 2 nd to 9 th columns of the feature matrix in the order from left to right and from top to bottom. A 9-dimensional image feature set is ultimately generated.
Step 1 b) initializing a gene expression programming algorithm:
each individual in the population is represented by a chromosome, each chromosome comprises 3 genes consisting of a head and a tail, each gene consists of a head and a tail, the elements of the head are from a set of functional symbols FS and a set of terminators TS, the elements of the tail are from a set of terminators TS, and the lengths of the head and the tail of the genes satisfy the following formula:
wherein t represents the length of the tail, h represents the length of the head, v represents the number of the maximum parameters of the function in the function symbol set FS, namely the number of the parameters of the function with the maximum required variables; such as: trigonometric function, v takes 1; adding, subtracting, multiplying and dividing, and v is 2; in the embodiment, the head length h is set to be 5, and the corresponding tail length is set to be 6;
function symbol set FS: including arithmetic operations plus "+", minus "-", multiply "+", and protective division "/", the protective division returning 1 when the divisor is 0; as well as other functions;
terminator set TS: contains an image feature set and a random number. The random number is used for initializing individuals participating in evolution, and each individual is composed of functions (functions such as addition, subtraction, multiplication, division and the like), feature vectors and constants in element composition. The constants added into the terminal symbol set often need abundant experience to be set reasonably, so that the constants in the terminal symbol set are random numbers generated randomly and are not manually set according to experience to ensure reasonable compliance;
step 2, calculating a fitness value and judging whether a shutdown criterion is met or not; if the shutdown criterion is met, executing the step 6, otherwise, executing the step 3.
According to the training set image and the image edge detection evaluation function, calculating the fitness value of each individual in the original population P0, wherein the evaluation function is as follows:
wherein, fit is the fitness value, sensitivity is the ratio of the image edge points successfully detected, and specificity is the ratio of the image non-edge points successfully classified as non-edge points.
The shutdown criterion set in this embodiment is that the genetic algebra does not exceed 100.
And step 3, generating a new generation population P1 and an adjustment population AP according to the obtained fitness value, wherein the steps are as follows:
step 3 a) generating a new generation population P1:
adopting elite retention strategy to retain the optimal individuals in the original population P0 in P1; the other 99 individuals select from the original population P0 by using a roulette selection method, and finally form a new generation population P1 with the population size of 100; the roulette wheel wager selection method specifically comprises the following steps:
step 3 a-1) assume that the fitness value calculated in step 2 is f i
Step 3 a-2) calculating the ratio d of the fitness value of each individual to the sum of all individual fitness values iThe method comprises the steps of carrying out a first treatment on the surface of the The formula is as follows:
step 3 a-3) vs d obtained in step 3 a-2) i Performing ascending order to obtain a new sequence D after ascending order iAnd performs a recursive operation on itA plurality of normalized intervals are obtained:
step 3 a-4) random generation of [0,1 ] using a random number generator]A random number r in between, from a plurality of normalized intervals obtainedIn (1) selecting a boundary value D of a section containing a random number r i The individual to which the corresponding fitness value points;
step 3 a-5) repeating step 3 a-4) until 99 individuals are selected to form a new generation population P1;
step 3 b) generating a regulatory population AP:
the individuals in the population AP are regulated to be two, and one part of individuals are randomly initialized, so that the diversity of the population can be increased, and the defect that the original gene expression programming algorithm is easy to fall into local optimum is avoided; in addition, the population also comprises the optimal individuals in the whole genetic process, so that the convergence of the algorithm is accelerated.
Step 3 b-1) assumes that the algorithm evolves to the q-th generation, wherein,
step 3 b-2) selecting q individuals optimal in the q-generation evolution process, and putting the q individuals into an adjusting population AP; if it isOnly the top 50 of the q individuals, which are the most excellent, are taken and put into the AP; if->Putting q individuals into the AP;
step 3 b-3) adjusting the size of the population AP to 100, and randomly initializing other individuals except the individual selected in the step 3 b-2) so as to increase the diversity of the population in the process of algorithm evolution;
and 4, performing cross mutation operation: performing cross operation on the new generation population P1 obtained in the step 3 and the adjustment population AP, and then performing mutation and string insertion operation on the population P1 only to obtain a population P2;
step 4 a), the population P1 and the regulatory population AP are subjected to cross operation, wherein the operation operators comprise single-point recombination, two-point recombination and gene recombination, the recombination operation is schematically shown in fig. 3, the left sides of (a), (b) and (c) of fig. 3 are individuals before recombination, the right sides are individuals after recombination, and related parameters are set as follows:
single point crossover recombination probability in fig. 3 (a): r1=0.1;
two-point crossover recombination probability in fig. 3 (b): r2=0.2;
probability of gene recombination in FIG. 3 (c): r3=0.1;
step 4 b) performing mutation and insertion operation on the population after crossing the P1 and the AP, wherein the mutation operation comprises genetic mutation, DC domain mutation and RNS mutation, the insertion operation comprises RIS insertion and genetic insertion, and related parameters are set as follows:
probability of genetic variation: 0.03;
probability of DC domain variation: 0.03;
RNS mutation probability: 0.01;
RIS string insertion probability: 0.05;
probability of gene insertion: 0.1;
step 5, updating the original population P0, reserving the optimal individuals in the evolution process, and then repeatedly executing the steps 2-5;
step 5 a) updates the original population P0: according to the image edge detection evaluation fitness function obtained in the step 2, calculating the fitness value of individuals in the new generation population P2 and the adjustment population AP obtained in the step 4, and selecting the first 100 individuals with the optimal fitness to form an original population P0;
step 5 b) preserving the optimal individuals of the calendar generation during evolution: according to the image edge detection evaluation fitness function obtained in the step 2, calculating fitness values of individuals in the new generation population P2 and the adjustment population AP obtained in the step 4, and selecting 1 individual with optimal fitness to be placed into the optimal population BP;
and 6, outputting individuals with the best fitness in the optimal population BP, and testing the individuals by using images in an image library.
According to the method, the experimental contents and the technical effects are described as follows in combination with the simulation experiment:
1. experimental environment:
the invention adopts Matlab R2018b software to carry out on a computer configured as an InterCore i 7.90 GHz, memory 16G and WINDOWS 11 system.
2. The experimental contents are as follows:
the present invention was tested for its performance with conventional gene expression programming on image edge detection problems. The images in the image library are randomly selected for processing, the image edge detection evaluation function value is calculated, and the edge detection result is output, as shown in fig. 4.
3. Analysis of results:
and randomly selecting images in the image library for processing, and calculating an image edge detection evaluation function value of the images, wherein the larger the numerical value is, the better the representative result is. A total of 20 experiments were performed to obtain a maximum fitness value max for each picture in the 20 experiments and a mean value mean for the 20 experiments.
The results are shown in the following table:
experimental results show that the method provided by the invention is superior to the conventional GEP algorithm in processing most of pictures.
The foregoing description of the preferred embodiments of the invention is not intended to be limiting, but rather is intended to cover all modifications, equivalents, alternatives, and improvements that fall within the spirit and scope of the invention.

Claims (6)

1. An image edge detection method based on improved gene expression programming, comprising:
s1, constructing an image feature set, initializing a gene expression programming algorithm according to the image feature set, and generating an original population P0, wherein the size of the original population P0 is n, and n is larger than or equal to 1;
s2, calculating the fitness value of each individual in the original population P0 according to the training set image and the image edge detection evaluation function, judging whether the shutdown criterion is met or not according to the set genetic algebra, if yes, executing the step S6, otherwise, executing the step S3;
s3, generating a new generation population P1 and an adjustment population AP according to the obtained fitness value; the new generation population P1 retains the optimal individuals of the original population P0; the individuals in the regulating population AP comprise two types, one part of the individuals are randomly initialized, and the other part of the individuals comprise an optimal individual set selected from the optimal individuals in the past in the whole genetic process;
s4, performing cross mutation operation: performing cross operation on the new generation population P1 and the adjustment population AP, and performing mutation and string insertion operation on the new generation population P1 only to obtain a population P2;
s5, selecting: according to the image edge detection evaluation function, calculating the fitness value of individuals in the population P2 and the adjustment population AP, and selecting an individual with optimal fitness to store in the optimal population BP; in addition, n optimal individuals before the fitness are selected to form an original population P0, and the steps S2-S5 are executed;
s6, outputting individuals with the best fitness in the optimal population BP, and testing the individuals by using images in an image library;
in step S3, the method for generating the new generation population P1 includes: adopting elite retention strategy to retain the optimal individuals in the original population P0 in P1; selecting the other n-1 individuals from the original population P0 by using a roulette selection method, and finally forming a new generation population P1 with the population size of n;
in step S3, the generation method of the population adjustment AP includes: in an optimal population BP for storing an optimal solution of the generation in the whole genetic process, selecting a part of individuals with optimal fitness value, putting the individuals into an adjustment population AP, and ensuring the convergence of the adjustment population; the remaining individuals were initialized randomly.
2. The method for image edge detection based on improved gene expression programming of claim 1, wherein the specific steps of step S1 include:
s1a, constructing an image feature set: according to the images in the image library, randomly selecting an original image and the corresponding image of the artificial mark edge to form a training set; gray processing is carried out on the original color images in the training set; arranging the gray images in a column mode according to pixel values to form a first column of a feature matrix; sequentially forming the 2 nd to 9 th columns of the feature matrix by 8 pixel values around the position of the first column pixel value in the original image according to the sequence from left to right and from top to bottom; finally generating a 9-dimensional image feature set;
s1b, initializing a gene expression programming algorithm to generate an original population P0, wherein each individual in the original population P0 is represented by a chromosome, each chromosome comprises 3 genes consisting of a head part and a tail part, the elements of the head part are from a function symbol set FS and a terminator set TS, the elements of the tail part are from the terminator set TS, and the lengths of the head part and the tail part of the genes satisfy the following conditions:
wherein t represents the length of the tail, h represents the length of the head, v represents the number of parameters of the function with the most variables needed in the function symbol set FS;
the terminator set TS contains an image feature set, a random number.
3. The image edge detection method programmed based on improved gene expression according to claim 1, wherein the image edge detection evaluation function in step S2 is:
wherein, fit is the fitness value, sensitivity is the ratio of the image edge points successfully detected, and specificity is the ratio of the image non-edge points successfully classified as non-edge points.
4. The method for detecting an image edge based on improved gene expression programming according to claim 1, wherein in step S4, the operators of the crossover operation include single-point recombination, two-point recombination, and gene recombination; the mutation manipulation includes genetic mutation, DC domain mutation, and RNS mutation; the insertion operation comprises RIS insertion and gene insertion.
5. An image edge detection system programmed based on improved gene expression, comprising:
an initialization module: constructing an image feature set, initializing a gene expression programming algorithm according to the image feature set, and generating an original population P0, wherein the size of the original population P0 is n, and n is larger than or equal to 1;
and the fitness and judgment module is used for: calculating the fitness value of each individual in the original population P0 according to the training set image and the image edge detection evaluation function, judging whether a shutdown criterion is met according to the set genetic algebra, if yes, transferring to an output and test module, otherwise, transferring to a new generation population and population regulation module;
new generation population and adjustment population module: generating a new generation population P1 and an adjustment population AP according to the obtained fitness value; the new generation population P1 retains the optimal individuals of the original population P0; the individuals in the regulating population AP comprise two types, one part of the individuals are randomly initialized, and the other part of the individuals comprise an optimal individual set selected from the optimal individuals in the past in the whole genetic process;
the cross mutation operation module: performing cross mutation operation: performing cross operation on the new generation population P1 and the adjustment population AP, and performing mutation and string insertion operation on the new generation population P1 only to obtain a population P2;
selecting an operation module: according to the image edge detection evaluation function, calculating the fitness value of individuals in the population P2 and the adjustment population AP, and selecting an individual with optimal fitness to store in the optimal population BP; in addition, n optimal individuals before the fitness are selected to form an original population P0, and the original population P0 is transferred to a fitness and judgment module;
and an output and test module: outputting individuals with the best fitness in the optimal population BP, and testing the individuals by using images in an image library;
the new generation population and regulation population module comprises a new generation population unit: for retaining optimal individuals in the original population P0 in P1 using elite retention policies; selecting the other n-1 individuals from the original population P0 by using a roulette selection method, and finally forming a new generation population P1 with the population size of n;
the new generation population and the population regulation module comprise population regulation units: the method comprises the steps of selecting a part of individuals with optimal fitness value from an optimal population BP for storing an optimal solution of the generation in the whole genetic process, putting the selected part of individuals into an adjustment population AP, and ensuring the convergence of the adjustment population; the remaining individuals were initialized randomly.
6. The improved gene expression programming-based image edge detection system of claim 5, wherein the initialization module comprises:
an image feature set unit configured to construct an image feature set: according to the images in the image library, randomly selecting an original image and the corresponding image of the artificial mark edge to form a training set; gray processing is carried out on the original color images in the training set; arranging the gray images in a column mode according to pixel values to form a first column of a feature matrix; sequentially forming the 2 nd to 9 th columns of the feature matrix by 8 pixel values around the position of the first column pixel value in the original image according to the sequence from left to right and from top to bottom; finally generating a 9-dimensional image feature set;
the programming initialization unit is used for initializing a gene expression programming algorithm to generate an original population P0, each individual in the original population P0 is represented by a chromosome, each chromosome comprises 3 genes consisting of a head part and a tail part, elements of the head part come from a function symbol set FS and a terminator set TS, elements of the tail part come from the terminator set TS, and the lengths of the head part and the tail part of the genes meet the following conditions:
wherein t represents the length of the tail, h represents the length of the head, v represents the number of parameters of the function with the most variables needed in the function symbol set FS;
the terminator set TS contains an image feature set, a random number.
CN202311134574.3A 2023-09-05 2023-09-05 Image edge detection method and system based on improved gene expression programming Active CN116862941B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311134574.3A CN116862941B (en) 2023-09-05 2023-09-05 Image edge detection method and system based on improved gene expression programming

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311134574.3A CN116862941B (en) 2023-09-05 2023-09-05 Image edge detection method and system based on improved gene expression programming

Publications (2)

Publication Number Publication Date
CN116862941A CN116862941A (en) 2023-10-10
CN116862941B true CN116862941B (en) 2023-11-14

Family

ID=88236315

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311134574.3A Active CN116862941B (en) 2023-09-05 2023-09-05 Image edge detection method and system based on improved gene expression programming

Country Status (1)

Country Link
CN (1) CN116862941B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104598770A (en) * 2015-01-12 2015-05-06 西安建筑科技大学 Wheat aphid quantity forecasting method and system based on human being evolution gene expression programming
CN105205535A (en) * 2015-09-25 2015-12-30 中国地质大学(武汉) Improved gene expression programming method
CN106250583A (en) * 2016-07-15 2016-12-21 西安电子科技大学 Dynamic job shop scheduling rule optimization methods based on double population gene expression programmings
CN114462583A (en) * 2022-03-17 2022-05-10 江苏至信信用评估咨询有限公司 MSP-GEP-Elman algorithm-based real-time short video user portrait prediction method and system
CN114841581A (en) * 2022-05-12 2022-08-02 新疆大学 Feature selection method in dynamic job shop scheduling rule based on GEP-VNS evolution
CN116070761A (en) * 2023-02-03 2023-05-05 武汉科技大学 Project scheduling rule mining method and system based on gene expression programming

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7127436B2 (en) * 2002-03-18 2006-10-24 Motorola, Inc. Gene expression programming algorithm

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104598770A (en) * 2015-01-12 2015-05-06 西安建筑科技大学 Wheat aphid quantity forecasting method and system based on human being evolution gene expression programming
CN105205535A (en) * 2015-09-25 2015-12-30 中国地质大学(武汉) Improved gene expression programming method
CN106250583A (en) * 2016-07-15 2016-12-21 西安电子科技大学 Dynamic job shop scheduling rule optimization methods based on double population gene expression programmings
CN114462583A (en) * 2022-03-17 2022-05-10 江苏至信信用评估咨询有限公司 MSP-GEP-Elman algorithm-based real-time short video user portrait prediction method and system
CN114841581A (en) * 2022-05-12 2022-08-02 新疆大学 Feature selection method in dynamic job shop scheduling rule based on GEP-VNS evolution
CN116070761A (en) * 2023-02-03 2023-05-05 武汉科技大学 Project scheduling rule mining method and system based on gene expression programming

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
个体最优共享GEP算法及其气象降水数据预测建模;彭昱忠;元昌安;李洁;许明涛;陈冰廉;;智能***学报(第03期);全文 *
双***协同进化的基因表达式编程及其在函数发现中的应用;王超学;吴书玲;张婧菁;;计算机工程与科学(第11期);全文 *
基于GEP自动聚类算法的视频关键帧提取方法;袁晖;元昌安;覃晓;彭昱忠;;广西师范学院学报(自然科学版)(第01期);全文 *
种群多样性的GEP算法在预测中的研究和应用;张锐;候沙沙;;哈尔滨理工大学学报(第04期);全文 *

Also Published As

Publication number Publication date
CN116862941A (en) 2023-10-10

Similar Documents

Publication Publication Date Title
Schrider Background selection does not mimic the patterns of genetic diversity produced by selective sweeps
CN106022392B (en) A kind of training method that deep neural network sample is accepted or rejected automatically
Cheng et al. Graph-regularized dual Lasso for robust eQTL mapping
CN110276357A (en) A kind of method for recognizing verification code based on convolutional neural networks
CN113112446A (en) Tunnel surrounding rock level intelligent judgment method based on residual convolutional neural network
CN112580662A (en) Method and system for recognizing fish body direction based on image features
CN109740481A (en) Atrial fibrillation Modulation recognition method of the CNN based on jump connection in conjunction with LSTM
CN116862941B (en) Image edge detection method and system based on improved gene expression programming
WO2021038793A1 (en) Learning system, learning method, and program
CN113935496A (en) Robustness improvement defense method for integrated model
CN113053536B (en) Infectious disease prediction method, system and medium based on hidden Markov model
CN112560034B (en) Malicious code sample synthesis method and device based on feedback type deep countermeasure network
Wang et al. A novel imperialist competitive algorithm for multithreshold image segmentation
CN116051924B (en) Divide-and-conquer defense method for image countermeasure sample
Ray et al. IntroUNET: identifying introgressed alleles via semantic segmentation
CN114120367A (en) Pedestrian re-identification method and system based on circle loss measurement under meta-learning framework
CN115619563A (en) Stock price analysis method based on neural network
Kvasnička et al. Emergence of modularity in genotype-phenotype mappings
CN109858127B (en) Blue algae bloom prediction method based on recursive time sequence deep confidence network
CN114239945A (en) Short-term power load prediction method, device, equipment and storage medium
CN113901877A (en) Method, device and equipment for detecting change of remote sensing image building and storage medium
CN113327251A (en) Highway asphalt pavement crack segmentation optimization algorithm based on improved mixed frog-leaping algorithm
CN113570046B (en) Data enhancement method, system, device and computer readable storage medium
CN112416293B (en) Neural network enhancement method, system and application thereof
CN112149738B (en) Method for improving transformation phenomenon in image recognition model field

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