Image Pattern Recognition Algorithm Based on Improved Genetic Algorithm

Image recognition is an important part of artificial intelligence. In recent years, the technology has been developed rapidly and has been widely used in various fields. However, the existing image recognition technology is still not perfect, especially in the complex environment; the recognition accuracy still needs to be improved. To solve this problem, this paper proposes an image pattern recognition algorithm based on improved genetic algorithm. There are many algorithms for image recognition, but the mainstream algorithm is genetic algorithm. Genetic algorithm also shows its unique advantages in the field of image recognition. Aiming at the problem that the accuracy of existing image pattern recognition is not enough, this paper optimizes and improves the traditional genetic algorithm of image recognition. By improving the calculation method and genetic steps, the adaptability of genetic algorithm in the field of image recognition is improved. In order to further verify the actual effect of this algorithm, the corresponding comparative experiments are carried out. The experimental results show that the accuracy of the traditional genetic algorithm is 73.7%, and the improved genetic algorithm is 98.3%. The analysis shows that the improved genetic algorithm can better meet the actual needs of image pattern recognition. According to the characteristics of image recognition, the genetic algorithm can improve the accuracy and robustness of image recognition while ensuring the image quality.


Introduction
Image recognition is an important subject in image processing. It is widely used in computer vision, moving object tracking and recognition, image sequence compression and other fields. In the understanding of images, recognition technology plays an important role and is the basis of image understanding [1][2][3] . From the perspective of vision, "seeing" is to find the target from the image based on prior knowledge, while "perception" is to extract the target features from the input image, and then combine with the existing target model to achieve the purpose of understanding [4][5] .
There are many image recognition algorithms, but they all follow the basic principles of high efficiency, stability and speed. Some scholars use the number of close points between two images to improve the stability of the recognition algorithm, but the algorithm has the disadvantages of large amount of calculation and easy deformation. On this basis, the academic community proposed an image feature point recognition algorithm, based on color and geometric features, to improve the accuracy of image recognition. However, the performance of the algorithm depends on the quality of feature extraction and has the disadvantage of low stability [6][7][8] . At present, neural network is also used in image recognition, but the disadvantage of this method is that it cannot automatically select feature points, the initial state of the network has a great impact on the iterative process, and the calculation cost is high. Therefore, genetic algorithm has been applied to the process of image recognition by more and more scholars because of its strong search ability, simple and universal, strong robustness and other advantages [9][10] .
This paper deeply studies the main methods of image pattern recognition in China, and understands the application of genetic algorithm in image recognition. It is known that there are still some technical problems such as low accuracy and incomplete feature extraction. Genetic algorithm plays an important role in the whole image recognition. Therefore, this paper proposes an image pattern recognition algorithm based on improved genetic algorithm. It is hoped that through the optimization and improvement of genetic algorithm, the accuracy of existing image pattern recognition can be improved. Aiming at the existing problems, this paper optimizes the structure of genetic algorithm and simplifies the calculation steps. According to the practical needs of image pattern recognition, the traditional genetic steps are optimized and improved, which makes the improved genetic algorithm more suitable for application in the field of image pattern recognition. In this paper, the comparative experiments show that the improved algorithm has great advantages over the traditional algorithm. At the same time, it improves the accuracy of image recognition and strengthens the robustness of the system. The analysis shows that the research in this paper has achieved ideal results and made a contribution to the application of genetic algorithm in image pattern recognition.

Overview of Image Recognition
Image recognition is to compare the target area with the data prepared in advance, and then recognize it. The technology is divided into three processes: image processing, analysis and understanding. In image recognition, it is necessary to filter out useless features and identify key features. In the field of artificial intelligence, image recognition is also a very important part. The main purpose of image recognition is to use computer instead of artificial steps to simulate the work of human brain, and to complete the tasks that human brain cannot complete. With the popularity and application of various electronic devices, image recognition has been widely used in all aspects of life. The workflow of image recognition can be divided into the following parts: (1) Read image Use the program to read the image you want to recognize in preparation for the next step.
(2) Pretreatment This is the preparatory work of image recognition, which can improve the speed of subsequent image processing and reduce the difficulty of the algorithm. (

3) Search features
The features of the image are detected to find out the meaningful features for image recognition, and some pseudo features are ignored.
(4) Feature classification After extracting features from the image, the features are classified according to the set attributes. (5) Feature matching When the program reads the image to be recognized, the features of the extracted image are analyzed and compared. Genetic algorithm is a search algorithm based on natural selection and genetic principles. It starts from the initial stage of random population, according to certain operation rules, it retains the best individual, eliminates the different individuals, and guides the search program to approach the best solution. There are several differences between genetic algorithm and traditional optimization algorithm

Definition and Characteristics of Genetic Algorithm
(1) Genetic algorithm encodes the parameter set directly.
(2) Genetic algorithm starts from multiple initial points rather than from a single point, which overcomes the dependence of traditional optimization methods on initial optimization.
(3) Genetic algorithm uses the objective function to calculate the fitness value, which does not need other derivation and auxiliary information, and has less dependence on the problem.
(4) Genetic algorithm has essential parallelism. The simplest method is to let multiple computers independently calculate the evolution of independent population, and finally select the optimal individual.
(5) Genetic algorithm uses probability transition rules, and does not need deterministic rules.

Improvement of Genetic Algorithm
On the premise of ensuring the effectiveness of the algorithm, the crossover probability and mutation probability are improved as follows: The cross probability c P and mutation probability m p of standard GA are determined in advance, so the adaptability is poor. Therefore, according to the building block theory of GA , the adaptive crossover and mutation probabilities are designed: According to formula (3), the pattern with high average fitness and low order will increase exponentially. From the angle machine problem in statistical decision theory, it can be seen that the algorithm can obtain the optimal feasible solution. At the end of the period, the mutation operator is enhanced, the local search ability is improved, and the super individual is avoided, which is conducive to the algorithm approaching the optimal solution.

Optimization and Improvement of Genetic Operation
The optimal solution is obtained by modifying the chromosome sequence through crossover and mutation. The standard genetic algorithm needs a lot of time to converge to the optimal solution, so it is necessary to modify it.
(1) When the average value of the two candidate solutions is less than the average value of the cross solutions, the optimal solution is selected from the perspective of crossover, and then the fitness function of the candidate solutions is weighted.
(2) For a small part of the optimal solution pool, the possible solutions are kept unchanged to ensure that the optimal solutions are not lost. The remaining small part is changed by adding a small constant parameter solution, corresponding to the local extremum near the optimal solution. When a large range of random interference is added to the rotation angle, the parametric model is amplified to prove that the solution after mutation replaces the previous solution. Once the possible solution converges to the near optimal solution, the probability of mutation operation will gradually decrease.

Purpose of the Experiment
In this experiment, the purpose of the experiment is to explore the influence of the improved genetic algorithm on the target image recognition accuracy under different image conditions. The basic process of the experiment is as follows: firstly, the source image and the target to be recognized are selected; on this basis, the target recognition process is completed by using the designed hardware recognition system, and the optimal matching template and corresponding pixel coordinates are obtained. In order to clearly display the recognition effect and complete the target recognition process, the coordinate values of pixels are marked in MATLAB software environment, and the recognition results are displayed intuitively. Combined with specific source images, the accuracy of target recognition is analyzed according to the final target recognition results.

Experimental Methods
The image with complex background and poor illumination condition is used as the source image to identify the vehicle in the image. According to the shape characteristics of the car target, the initial matching template and its inner and outer pixels are designed. In this experiment, a total of 30 tests were carried out, and 15 random tests were conducted for the traditional genetic algorithm and the improved genetic algorithm. Record the x-coordinate, y-coordinate and rotation angle of the template center respectively. Through data analysis, the experimental results of the two algorithms are compared and analyzed.

Experimental Results and Analysis
According to the experimental data, the results of Table 1, Figure 1 and Figure 2 are sorted out. The experimental results show that with the increase of the complexity of the source image, the recognition accuracy of the traditional algorithm is further reduced. The correct recognition rate is 73.3%. Therefore, in order to improve the recognition accuracy of complex image conditions as much as possible, the system can be adjusted according to the specific application environment. In this paper, the improved genetic algorithm, the recognition accuracy of 98.3%. The analysis shows that the improved genetic algorithm further improves the recognition accuracy and robustness of the traditional genetic algorithm. The traditional genetic algorithm can set the rotation angle of the matching template to zero, because the target will not rotate, so it can avoid the results of three, five, eight and twelve experiments. From the overall results, the image recognition ability of the improved genetic algorithm is obviously better than that of the traditional genetic algorithm.

Image Enhancement Based on Genetic Algorithm
The purpose of image enhancement is to improve the visual quality of images. There is no unified objective standard for the visual quality of images, so users can make subjective evaluation. There is no unified theory for image enhancement effect. The existing enhancement methods are better for one image, but may not be suitable for another image. In the field of remote sensing and medical image, image enhancement technology can be applied to improve the captured image or the image reconstructed by ray, so as to identify and analyze more effectively. Image enhancement technology can be divided into three categories: spatial domain method, frequency domain method and fuzzy processing method. The object of spatial domain processing is the image itself, and the frequency domain processing is to calculate the transformation coefficient of the image in a certain transformation domain of the image, and the image enhancement effect is obtained by inverse transformation. It mainly includes histogram equalization, histogram transformation, edge extraction and so on. The fuzzy enhancement method is to blur the original image data in the spatial domain, transform it into the fuzzy image data in the feature plane, and then use various attributes in the feature plane to process the image information. Finally, the processed information data is reflected to the spatial domain to obtain the enhanced image.

Conclusions
In recent years, China's artificial intelligence technology has been rapid development, at the same time, genetic algorithm has also been widely used, and especially in the field of image processing has become one of the core technologies. At present, there are still many deficiencies in image pattern recognition technology in China, such as incomplete feature extraction and low correct recognition rate, which hinder the development of this field. The research of image pattern recognition algorithm based on improved genetic algorithm is optimized and improved according to the main shortcomings of existing image pattern recognition. At the same time, the accuracy of recognition is improved. The analysis shows that genetic algorithm is still one of the most effective and widely used algorithms in the field of image pattern recognition. Therefore, it is of great significance to optimize and improve the genetic algorithm for the development of this field.