Image Matching Method, Apparatus, and Storage Medium
By calculating the maximum mutual information coefficient MIC value between pixel points in the image and selecting matching pixel points using genetic algorithms, the problem of insufficient image matching efficiency and accuracy in the prior art is solved, and more efficient and accurate image recognition is achieved.
Patent Information
- Application Number
- CN202010871071.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-08-26
- Publication Date
- 2025-06-27
- Estimated Expiration
- 2040-08-26
AI Technical Summary
Existing fast image matching methods have efficiency and accuracy problems when selecting feature points. The color histogram cannot describe objects or objects in the image, and extracting geometric features will increase calculation time.
By calculating the maximum mutual information coefficient MIC value between the control group image and the pixel points in the training set sample, the matching pixel points corresponding to the control group image is selected using a genetic algorithm, and the matching image is matched based on these matching pixel points.
This improves image recognition rate, reduces matching time, improves matching efficiency, and enhances user's sensitivity to use.
Smart Images

Figure CN114202667B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular, to an image matching method, apparatus, and storage medium. Background Art
[0002] In the context of the development and commercialization of 5G technology, fast image recognition services have become typical 5G applications, including face recognition, animal recognition, plant recognition, item recognition, landmark recognition, etc. The core of image recognition is how to select feature points. If the number of feature points is large, the recognition time will increase; if the number of feature points is small, the image content cannot be accurately recognized. Therefore, how to select effective feature points is particularly important. Fast image matching is achieved by extracting the key features of an image. The existing fast image matching method is to extract grayscale features and then establish a color histogram. However, the color histogram describes the proportion of different colors in the entire image and cannot describe the objects or entities in the image. To solve this problem, geometric shape features of the image can be extracted, but this will increase the calculation time and reduce the efficiency. Summary of the Invention
[0003] In view of this, a technical problem to be solved by the present invention is to provide an image matching method, apparatus, and storage medium.
[0004] According to a first aspect of the present disclosure, there is provided an image matching method, including: obtaining a control group image, a training set sample, and a test set sample according to an image set corresponding to an identification object; calculating a maximum mutual information coefficient (MIC) value between the control group image and pixel points in the training set sample; obtaining matching pixel points corresponding to the control group image according to the MIC value and using the test set sample; and performing a matching process on an image to be matched according to the matching pixel points to obtain a matching result.
[0005] Optionally, calculating the maximum mutual information coefficient (MIC) value between the control group image and pixel points in the training set sample includes: regarding each pixel point in the control group image and the training set sample as an image feature; generating a control group feature vector corresponding to one control group image and a feature matrix corresponding to multiple training set samples based on the pixel values of the image features, where each row of the feature matrix is a sample feature vector corresponding to one training set sample; and calculating the MIC value according to the control group feature vector and the feature matrix.
[0006] Optionally, calculating the MIC value according to the control group feature vector and the feature matrix includes: calculating the MIC value of each image feature based on all sample feature vectors in the feature matrix and the control group feature vector.
[0007] Optionally, obtaining the matching pixel points corresponding to the control group image according to the MIC value and using the test set samples includes: obtaining the average MIC value corresponding to all image features; selecting a first group of image features and a second group of image features from all the image features; wherein, the MIC value of each image feature in the first group of image features is greater than the average MIC value, and the MIC value of each image feature in the second group of image features is less than or equal to the average MIC value; generating a primary population of image features based on the first group of image features and the second group of image features; using a preset genetic algorithm and using the test set samples to perform genetic algorithm iterative processing on the primary population to obtain an adaptive population; wherein, the fitness function in the genetic algorithm is used to represent the image recognition rate of using all the image features in the primary population, intermediate population or the adaptive population to recognize the test set samples; the image features in the adaptive population are the matching pixel points.
[0008] Optionally, the matching process for the image to be matched according to the matching pixel points includes: obtaining all the matching pixel points corresponding to all the image features in the adaptive population, generating a first feature vector corresponding to the control group image and a second feature vector corresponding to the image to be matched based on all the matching pixel points; performing a matching process on the first feature vector and the second feature vector.
[0009] Optionally, the control group image, the training set samples and the test set samples include: grayscale images.
[0010] According to a second aspect of the present disclosure, there is provided an image matching device, including: a sample generation module, configured to obtain a control group image, training set samples and test set samples according to an image set corresponding to an identification object; a mutual trust information calculation module, configured to calculate a maximum mutual information coefficient (MIC) value between pixel points in the control group image and the training set samples; a feature pixel determination module, configured to obtain matching pixel points corresponding to the control group image according to the MIC value and using the test set samples; a matching process module, configured to perform a matching process on the image to be matched according to the matching pixel points to obtain a matching result.
[0011] Optionally, the mutual trust information calculation module includes: a feature acquisition unit, configured to regard each pixel point in the control group image and the training set samples as an image feature; generating a control group feature vector corresponding to one control group image and a feature matrix corresponding to multiple training set samples based on the pixel values of the image features; wherein, each row of the feature matrix is a sample feature vector corresponding to one training set sample; an information calculation unit, configured to calculate the MIC value according to the control group feature vector and the feature matrix.
[0012] Optionally, the information calculation unit is specifically configured to calculate the MIC value of each image feature based on all sample feature vectors in the feature matrix and the control group feature vector.
[0013] Optionally, the feature pixel determination module includes: a primary population determination unit, configured to obtain the average MIC value corresponding to all image features; select a first image feature group and a second image feature group from all the image features; wherein, the MIC value of each image feature in the first image feature group is greater than the average MIC value, and the MIC value of each image feature in the second image feature group is less than or equal to the average MIC value; generate a primary population of image features based on the first image feature group and the second image feature group; an adaptation population determination unit, configured to perform genetic algorithm iterative processing on the primary population by using a preset genetic algorithm and using the test set samples to obtain an adaptation population; wherein, the fitness function in the genetic algorithm is used to represent the image recognition rate of recognizing the test set samples by using all the image features in the primary population, the intermediate population or the adaptation population, and the image features in the adaptation population are the matching pixel points.
[0014] Optionally, the matching processing module is configured to obtain all matching pixel points corresponding to all image features in the adaptation population, generate a first feature vector corresponding to the control group image and a second feature vector corresponding to the image to be matched based on all the matching pixel points; and perform matching processing on the first feature vector and the second feature vector.
[0015] According to a third aspect of the present disclosure, there is provided an image matching device, including: a memory; and a processor coupled to the memory, the processor being configured to execute the method as described above based on instructions stored in the memory.
[0016] According to a fourth aspect of the present disclosure, there is provided a computer-readable storage medium storing computer instructions, and the instructions are executed by a processor to perform the method as described above.
[0017] The image matching method, device, and storage medium of the present disclosure calculate the MIC value between the control group image and the pixel points in the training set samples, obtain the matching pixel points corresponding to the control group image according to the MIC value and using the test set samples, perform matching processing on the image to be matched according to the matching pixel points, and obtain the matching result; based on the fact that the pixel correlation between different pictures of the same recognition object is a non-linear relationship, the MIC value is selected to represent the correlation between feature vectors, and the genetic algorithm is used. By comparing the recognition accuracy of the test sample images, appropriate feature pixel points are selected as the matching pixel points for image recognition, which can improve the recognition rate of the image, reduce the matching time, improve the matching efficiency, and improve the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] To more clearly illustrate the technical solutions in the embodiments of the present disclosure or the prior art, the following will briefly introduce the accompanying drawings required for the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only some embodiments of the present disclosure. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0019] Figure 1 FIG. is a schematic flowchart of an embodiment of the image matching method according to the present disclosure;
[0020] Figure 2 FIG. is a schematic flowchart of calculating the MIC value in an embodiment of the image matching method according to the present disclosure;
[0021] Figure 3 FIG. is a schematic flowchart of determining the matching pixel points in an embodiment of the image matching method according to the present disclosure;
[0022] Figure 4 FIG. is a schematic flowchart of another embodiment of the image matching method according to the present disclosure;
[0023] Figure 5 FIG. is a schematic block diagram of an embodiment of the image matching device according to the present disclosure;
[0024] Figure 6 FIG. is a schematic block diagram of the mutual trust information calculation module in an embodiment of the image matching device according to the present disclosure;
[0025] Figure 7 FIG. is a schematic block diagram of the feature pixel determination module in an embodiment of the image matching device according to the present disclosure;
[0026] Figure 8 FIG. is a schematic block diagram of another embodiment of the image matching device according to the present disclosure. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0027] The present disclosure will be described more fully hereinafter with reference to the accompanying drawings, in which exemplary embodiments of the present disclosure are illustrated. The technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present disclosure. Apparently, the described embodiments are only a part rather than all of the embodiments of the present disclosure. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present disclosure without creative efforts shall fall within the scope of protection of the present disclosure.
[0028] The "first", "second", etc. in the following text are only used for descriptive distinction and have no other special meanings.
[0029] Figure 1 As shown in the flowchart of an embodiment of the image matching method according to the present disclosure, Figure 1 as follows:
[0030] Step 101: Obtain a control group image, a training set sample, and a test set sample according to the image set corresponding to the recognition object.
[0031] In one embodiment, image features are generally divided into grayscale, texture, and geometric shape, etc. Grayscale and texture belong to internal features, and geometric shape belongs to external features. Since the grayscale feature is independent of the size and direction of the image and is insensitive to the background color of the image, the grayscale feature is widely used in image recognition. The control group image, the training set sample, and the test set sample are all grayscale images.
[0032] Step 102: Calculate the maximal information coefficient (MIC) value between the pixels of the control group image and the training set sample.
[0033] Step 103: Obtain the matching pixels corresponding to the control group image according to the MIC value and using the test set sample.
[0034] Step 104: Perform matching processing on the image to be matched according to the matching pixels to obtain a matching result.
[0035] The image matching method of the present disclosure proposes a fast image matching technical solution based on MIC and an improved genetic algorithm, and realizes the application of image recognition services in a 5G and broadband network environment; by calculating the MIC value between each pixel of the control image and the training sample image, using the genetic algorithm and comparing the recognition accuracy of the test sample image, the appropriate feature pixels are selected as the matching pixels for image recognition for fast image matching.
[0036] After being trained and optimized in the cloud, the image matching method of the present disclosure can be used for applications of image recognition services in 5G and broadband network environments.
[0037] Figure 2 FIG. is a schematic flowchart of calculating the MIC value in an embodiment of the image matching method according to the present disclosure, as Figure 2 shown:
[0038] Step 201: Take each pixel point in the control group image and the training set samples as an image feature.
[0039] Step 202: Generate a control group feature vector corresponding to one control group image and a feature matrix corresponding to multiple training set samples based on the pixel values of the image features; wherein, each row of the feature matrix is a sample feature vector corresponding to one training set sample.
[0040] Step 203: Calculate the MIC value according to the control group feature vector and the feature matrix.
[0041] In one embodiment, the recognition object can be a human face, a commodity, a geographical identifier, etc. In the image set of a certain recognition object, randomly select one image as the control group image, and use the remaining two-thirds of the images as the training set samples, and the remaining images as the test set samples. The control group image, the training set samples, and the test set samples include 32*32 pixel points, and each pixel point is a feature (image feature), and there are 1024 features to choose from.
[0042] The number of training set samples is m, and the i-th pixel point of all m images constitutes a vector x i (m*1), and there are 1024 feature vectors composed of pixel points in total. The feature matrix of the k-th training set sample image is:
[0043]
[0044] Connect the row vectors of the feature matrix end to end to obtain a row vector containing all pixel points of the k-th image:
[0045] (x k,1 x k,2 … x k,32 x k,33 … x k,64 x k,65 … x k,1024 );
[0046] Form the following m*1024 matrix with the pixel point vectors of m training set samples:
[0047]
[0048] This matrix is a feature matrix, and the feature matrix is (x1, x2, …, x 1024 ), where x1 = (x 1,i x 2,i … x m,i ), i = 1, 2, 3, …, 1024.
[0049] The control group feature vector corresponding to a control group image is:
[0050] (y1, y2, …, y 1024 ).
[0051] There are multiple methods to calculate the MIC value based on the control group feature vector and the feature matrix. For example, based on all the sample feature vectors in the feature matrix and the control group feature vector, calculate the MIC value of each image feature.
[0052] In one embodiment, the Maximal Information Coefficient (MIC) is a way to calculate data correlation, used to measure the degree of association between two variables, and has higher accuracy compared to Mutual Information (MI). MIC has generality and fairness. Generality means that there are enough sample quantities for statistics, so that more extensive association information can be obtained, rather than being limited to a certain specific function type or all function relationships; fairness means that for different types, if the noise is the same, the statistically obtained values are also the same.
[0053] The algorithm principle of MIC: Given a finite set D of ordered pairs, divide the x variables in D into x grids and the y variables into y grids, allowing empty grids, and such a division is called an x - y grid. Given a grid G, divide the cells of G according to the points in D, that is, the cell division of G needs to be based on the probability that the points in D fall into a certain cell, denoted by D| G ; then, calculate the mutual information of two random variables X and Y according to the following formula:
[0054]
[0055] where p(x, y) represents the joint probability of the distribution function, and p(x) and p(y) represent the marginal probabilities of the distribution function. In the D set, p(x), p(y), and p(x, y) represent the proportion of the number of data points falling into a certain grid to the total number of data points.
[0056] According to the following formula 1 - 2, calculate the maximal mutual information, including all possible grids G of x columns and y rows, and I(D| G ) represents the mutual information of D| G :
[0057] I* (D, x, y) = maxI(D| G ) (1 - 2);
[0058] Normalize the maximum mutual information value and establish the feature matrix M(D). The formula is as follows:
[0059]
[0060] Finally, obtain the MIC value according to the following formula 1 - 4.
[0061]
[0062] Obtain the training set sample feature x obtained previously i and the feature y of the control group image i , and use various existing methods to calculate the maximum information coefficient MIC(x i and the feature y of the control group image i between the features, and obtain 1024 data of MIC(x i , y i ), i = 1, 2, 3,..., 1024. For example, obtain the training set sample feature x i and the feature y of the control group image i , and according to formulas (1 - 1) to (1 - 4), divide two pixel points into the x - y grid, randomly divide the grid size, calculate M(D) (i.e., formula 1 - 3) each time it is divided, and after multiple divisions, obtain the MIC value, that is, obtain the maximum information coefficient MIC(x i , y i ), i = 1, 2, 3,..., 1024, a total of 1024 data.
[0063] Figure 3 is a schematic flow diagram for determining matching pixel points in an embodiment of the image matching method according to the present disclosure, as Figure 3 shown:
[0064] Step 301, obtain the average value of MIC corresponding to all image features.
[0065] Step 302, select the first image feature group and the second image feature group from all image features; among them, the MIC value of each image feature in the first image feature group is greater than the average value of MIC, and the MIC value of each image feature in the second image feature group is less than or equal to the average value of MIC.
[0066] Step 303, generate the initial population of image features based on the first image feature group and the second image feature group.
[0067] Step 304: Use the preset genetic algorithm to perform genetic algorithm iterative processing on the initial population using the test set samples to obtain an adaptive population. Among them, the fitness function in the genetic algorithm is used to represent the image recognition rate of using all image features in the initial population or the adaptive population to recognize the test set samples. The image features in the adaptive population are matching pixel points. Various existing genetic algorithms can be used to obtain the adaptive population.
[0068] In one embodiment, the genetic algorithm is a computational model that simulates the natural selection of Darwin's biological evolution theory and the biological evolution process of genetic mechanisms. It is a method for searching for the optimal solution by simulating the natural evolution process. The genetic algorithm starts from a population representing the possible potential solution set of the problem, and a population consists of a certain number of individuals encoded by genes. Each individual is actually an entity with characteristics of a chromosome. After the initial population is generated, according to the principle of survival of the fittest and survival of the fittest, it evolves generation by generation to produce better and better approximate solutions. In each generation, individuals are selected according to the fitness of the individuals in the problem domain, and combination crossover and mutation are performed with the help of genetic operators of natural genetics to generate a population representing a new solution set.
[0069] This disclosure combines an adaptive genetic algorithm to select image features and proposes an improved genetic algorithm for selecting image feature points, which not only considers the problem of premature convergence of the population but also considers the superiority and inferiority of a certain individual, thereby improving the effectiveness of image feature point selection.
[0070] If n features (n < N) are selected from N features, the number of feature subsets obtained is:
[0071]
[0072] When the total number of features N is relatively large, this combination number is very large. Therefore, some search techniques need to be used to obtain the optimal feature value. The genetic algorithm is widely used and repeatedly performs genetic operations on the population containing possible solutions according to the evolutionary principles of survival of the fittest and survival of the fittest to find the optimal or approximate optimal solution.
[0073] The crossover probability P of the simple genetic algorithm c and the mutation probability P mThey are all specified artificially in advance, with poor adaptability. At the same time, when solving complex problems or when the solution space is very large, the convergence speed is slow or it converges to a local optimal solution. Therefore, the adaptive genetic algorithm is proposed. It dynamically adjusts the crossover probability and mutation probability according to the evolution of the population to achieve the purpose of overcoming premature convergence and accelerating the search speed. However, the ordinary adaptive genetic algorithm usually randomly selects a gene to flip the value. In many cases, the new individuals generated are difficult to fully approach the optimal individual.
[0074] The present disclosure proposes a strategy of multi-bit mutation, so that various mutation combinations can be formed, thus expanding the search space. However, if the number of mutated bits is large, the genetic algorithm may degenerate into a random search and it is also easy to destroy excellent patterns and individuals. The present disclosure proposes the following mutation principle: Denote f max as the maximum fitness value in the current generation; f min as the minimum fitness value in the current generation; f i as the fitness value of an individual; M i as the number of mutated bits that the individual should mutate, then there is:
[0075]
[0076] where N is a constant. In practical applications, generally take N as 1 / 3 to 1 / 4 of the chromosome string length L; indicates the quality level of the individual f i in the current generation. The larger this value is, the worse the individual quality is, and vice versa. Through the formula 1-6, the number of mutations can be dynamically adjusted according to the quality level of the individual. Combining this operator with the adaptive genetic algorithm can achieve better results. Calculate and adjust the number of mutated bits of the chromosome of the sample individual through the formula 1-6. The operator is the number of mutated bits of the chromosome, and its role is to accelerate the convergence speed of the genetic algorithm operation.
[0077] Let the order of a certain pattern h be O(H), the chromosome string length be L, the number of mutated bits be M, the mutation probability be P m , n i h (t) be an individual of this pattern before the mutation operation, and n i h (t + 1) is the number of individuals of this individual after the mutation operation, then:
[0078]
[0079] Among them:
[0080]
[0081] It can be shown from the above formula that when an individual is to mutate, if the product of its order and the number of mutated bits is greater than the chromosome length, it can be considered that the maximum probability of the individual's pattern being destroyed is 1. According to the selection calculation of P in the adaptive genetic algorithm m and the adaptive multi-bit mutation operator of the present disclosure, the above formula can be changed to:
[0082]
[0083] The above formula shows that the smaller the fitness of an individual, the smaller its chance of survival; the larger the fitness, the greater its chance of survival. On the one hand, individuals with poor fitness have a small chance of survival, and on the other hand, their mutation search range also becomes larger, thus increasing the search space of the genetic algorithm.
[0084] The adaptive genetic algorithm controls Pc and Pm according to the overall convergence situation of the current population: the more convergent the population, the larger Pc and Pm are, while the improved genetic algorithm of the present disclosure considers the superiority and inferiority of an individual in the current generation in the population, and the worse it is, the more mutated bits there are.
[0085] Applying the improved genetic algorithm to the above 1024 MIC eigenvalues, theoretically, the larger the MIC value, the stronger the correlation of the feature point, but not every feature point with a large MIC value is a key feature point, and it needs to be tested and evaluated by the test set. 30% of the feature points are selected in the initial generation, among which 20% of the feature points randomly selected with MIC values greater than the average value and 10% of the feature points less than the MIC average value. On this basis, the image recognition rate is analyzed by the test set, which is used as the fitness function, and the above-introduced mutation factor is used to improve the existing adaptive genetic algorithm and improve the rate of feature selection.
[0086] The mutation factor can be used to quickly eliminate the inferior chromosomes in the sample group and accelerate the reproduction of excellent chromosomes. Using the test set, the improved genetic algorithm is used to select pixel features. First, the conversion from the problem space to the genetic space is realized to form a chromosome coding pattern; the evaluation function (the accuracy of image recognition) is determined; through the mutation operator of formula 1-6, the convergence speed of the population is accelerated, and high-quality features are found as soon as possible to improve the rate of feature selection.
[0087] For example, taking face recognition as an example, face data from the Yale database is selected, including 15 people, with 11 pictures per person, containing images with different facial expressions and different illuminations. From the 11 images, 1 is randomly selected into the control group, 7 into the training group, and 3 into the test group. First, calculate the MIC values between the images in the control group and the feature vectors of the samples in the training group, a total of 1024 MIC values, and calculate their average value. Represent the 1024 features by the binary method, such as (0,0,1,0,1,……,0,0,1), where 0 means not selecting the pixel feature and 1 means selecting the pixel feature (image feature).
[0088] Among the existing 1024 features, 308 feature points are selected, including 205 greater than the MIC average value and 103 less than the MIC average value. 20 groups are randomly selected as the initial population. Using the test set, the image recognition rate is calculated as the fitness function. The 1 / 4 individuals with low recognition rates are eliminated, and the 1 / 4 with high recognition rates are retained. The remaining individuals are searched according to the mutation gene values defined above and the crossover probability defined by the original adaptive genetic algorithm until the optimal feature combination is obtained.
[0089] In one embodiment, all matching pixel points corresponding to all image features in the adaptation population are obtained, and a first feature vector corresponding to the control group image and a first feature vector corresponding to the image to be matched are generated based on all the matching pixel points; the first feature vector and the second feature vector are subjected to a matching process. Each element of the first feature vector and the second feature vector is the gray value corresponding to the image features in the control group image and the image to be matched. Existing multiple image fast matching algorithms can be used to determine whether the image to be matched matches the control group image based on the matching result.
[0090] Figure 4 It is a schematic flowchart of another embodiment of the image matching method according to the present disclosure, as Figure 4 shown:
[0091] Step 401, preprocess the image data. In the image set corresponding to the recognition object, 1 image can be selected as the control group image, two-thirds of the remaining images are used as the training set samples, and the rest are used as the test set samples.
[0092] Step 402, establish a feature vector and a feature matrix for the control group image and the training set samples based on the gray level features.
[0093] Step 403, calculate the MIC value between the feature vectors of the control group image and the training set samples.
[0094] Step 404, based on the improved genetic algorithm, select appropriate MIC values and use the test set to select the optimal feature vector. The elements in the optimal feature vector correspond to the pixel points with strong correlation and high recognition rate, and are used as the feature matching vector.
[0095] Step 405, input the image to be matched, extract the corresponding feature vector for matching, and return the matching result. For the input image to be matched, the gray values of the corresponding image feature points (pixel points) are extracted to generate a feature vector, and this feature vector is matched with the feature vector corresponding to the control group image, and the matching result is returned.
[0096] In one embodiment, as Figure 5As shown in the figure, the present disclosure provides an image matching device 50, including a sample generation module 51, a mutual trust information calculation module 52, a feature pixel determination module 53, and a matching processing module 54. The sample generation module 51 obtains a control group image, a training set sample, and a test set sample according to an image set corresponding to an identification object. The mutual trust information calculation module 52 calculates the maximum mutual information coefficient MIC value between the pixels in the control group image and the training set sample.
[0097] The feature pixel determination module 53 obtains the matching pixels corresponding to the control group image according to the MIC value and by using the test set sample. The matching processing module 54 performs matching processing on the image to be matched according to the matching pixels to obtain a matching result.
[0098] In one embodiment, as Figure 6 shown, the mutual trust information calculation module 52 includes: a feature acquisition unit 521 and an information calculation unit 522. The feature acquisition unit 521 takes each pixel in the control group image and the training set sample as an image feature, and generates a control group feature vector corresponding to one control group image and a feature matrix corresponding to multiple training set samples based on the pixel values of the image features; wherein, each row of the feature matrix is a sample feature vector corresponding to one training set sample.
[0099] The information calculation unit 522 calculates the MIC value according to the control group feature vector and the feature matrix. For example, the information calculation unit 522 calculates the MIC value of each image feature based on all the sample feature vectors and the control group feature vector in the feature matrix.
[0100] In one embodiment, as Figure 7 shown, the feature pixel determination module 53 includes: an initial population determination unit 531 and an adaptive population determination unit 532. The initial population determination unit 531 obtains the average MIC value corresponding to all the image features. The initial population determination unit 531 selects a first image feature group and a second image feature group from all the image features; wherein, the MIC value of each image feature in the first image feature group is greater than the average MIC value, and the MIC value of each image feature in the second image feature group is less than or equal to the average MIC value. The initial population determination unit 531 generates an initial population of image features based on the first image feature group and the second image feature group.
[0101] The adaptive population determination unit 532 performs genetic algorithm iterative processing on the initial population by using a preset genetic algorithm and the test set sample to obtain an adaptive population; wherein, the fitness function in the genetic algorithm is used to represent the image recognition rate of using all the image features in the initial population or the adaptive population to identify the test set sample, and the image features in the adaptive population are the matching pixels.
[0102] In one embodiment, the matching processing module 54 obtains all matching pixel points corresponding to all image features in the adaptation group, and generates a first feature vector corresponding to the control group image and a second feature vector corresponding to the image to be matched based on all the matching pixel points; wherein, the image features in the adaptation group are the matching pixel points. The matching processing module 54 performs a matching process on the first feature vector and the second feature vector.
[0103] Figure 8 FIG. is a schematic diagram of a module according to another embodiment of the image matching device of the present disclosure. As Figure 8 shown, the device may include a memory 801, a processor 802, a communication interface 803, and a bus 804. The memory 801 is used to store instructions, and the processor 802 is coupled to the memory 801. The processor 802 is configured to execute the image matching method described above based on the instructions stored in the memory 801.
[0104] The memory 801 may be a high-speed RAM memory, a non-volatile memory, etc. The memory 801 may also be a memory array. The memory 801 may also be partitioned, and the partitions may be combined into virtual volumes according to certain rules. The processor 802 may be a central processing unit CPU, or an application specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the image matching method of the present disclosure.
[0105] In one embodiment, the present disclosure provides a computer-readable storage medium storing computer instructions that are executed by a processor to perform the image matching method in any of the above embodiments.
[0106] In the image matching method, device, and storage medium provided in the above embodiments, the maximum mutual information coefficient MIC value between the control group image and the pixel points in the training set sample is calculated. Based on the MIC value and using the test set sample, the matching pixel points corresponding to the control group image are obtained. The image to be matched is matched based on the matching pixel points to obtain a matching result. Based on the fact that the pixel correlation between different pictures of the same recognition object is a non-linear relationship, the MIC value is selected to represent the correlation between feature vectors. The genetic algorithm is used, and by comparing the recognition accuracy of the test sample images, the appropriate feature pixel points are selected as the matching pixel points for image recognition, which can improve the recognition rate of the image, reduce the matching time, improve the matching efficiency, and improve the user experience.
[0107] This disclosure is described with reference to the flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the disclosure. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and combinations of flows and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing device to produce a machine, such that the instructions executed by the processor of the computer or other programmable data processing device produce a means for realizing the functions specified in one or more of the flows Figure 1 one or more of the flows and / or blocks Figure 1 or a means for realizing the functions specified in one or more of the blocks.
[0108] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory produce a manufacture including an instruction means that realizes the functions specified in one or more of the flows Figure 1 one or more of the flows and / or blocks Figure 1 or a means for realizing the functions specified in one or more of the blocks.
[0109] These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process, and thus the instructions executed on the computer or other programmable device provide steps for realizing the functions specified in one or more of the flows Figure 1 one or more of the flows and / or blocks Figure 1 or a means for realizing the functions specified in one or more of the blocks.
[0110] The above are only the preferred embodiments of the present disclosure and are not intended to limit the present disclosure. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present disclosure shall be included within the protection scope of the present disclosure.
Claims
1. An image matching method, comprising: Obtaining a control group image, a training set sample, and a test set sample according to an image set corresponding to an identification object; Calculating the maximum mutual information coefficient (MIC) value between the pixels of the control group image and the training set samples; Obtaining matching pixels corresponding to the control group image according to the MIC value and using the test set samples; Wherein, a genetic algorithm is used, and by comparing the recognition accuracy of the test set sample images, feature pixels are selected as the matching pixels for image recognition; Performing matching processing on the image to be matched according to the matching pixels to obtain a matching result.
2. The method according to claim 1, wherein the calculating the maximum mutual information coefficient (MIC) value between the pixels of the control group image and the training set samples comprises: Regarding each pixel in the control group image and the training set samples as an image feature; Generating a control group feature vector corresponding to one control group image and a feature matrix corresponding to multiple training set samples based on the pixel values of the image features; wherein each row of the feature matrix is a sample feature vector corresponding to one training set sample; Calculating the MIC value according to the control group feature vector and the feature matrix.
3. The method according to claim 2, wherein the calculating the MIC value according to the control group feature vector and the feature matrix comprises: Calculating the MIC value of each image feature based on all the sample feature vectors in the feature matrix and the control group feature vector.
4. The method according to claim 2, wherein the obtaining matching pixels corresponding to the control group image according to the MIC value and using the test set samples comprises: Obtaining the average MIC value corresponding to all image features; Selecting a first group of image features and a second group of image features from all the image features; wherein the MIC value of each image feature in the first group of image features is greater than the average MIC value, and the MIC value of each image feature in the second group of image features is less than or equal to the average MIC value; Generating an initial population of image features based on the first group of image features and the second group of image features; Using a preset genetic algorithm and using the test set samples to perform genetic algorithm iterative processing on the initial population to obtain an adaptive population; Wherein, the fitness function in the genetic algorithm is used to represent the image recognition rate of using all the image features in the initial population, intermediate population, or the adaptive population to recognize the test set samples; the image features in the adaptive population are the matching pixels.
5. The method according to claim 4, wherein the performing matching processing on the image to be matched according to the matching pixels comprises: Obtaining all the matching pixels corresponding to all the image features in the adaptive population, and generating a first feature vector corresponding to the control group image and a second feature vector corresponding to the image to be matched based on all the matching pixels; Performing matching processing on the first feature vector and the second feature vector.
6. The method according to any one of claims 1 to 5, wherein the control group image, the training set samples, and the test set samples include: grayscale images.
7. An image matching device, comprising: a sample generation module, configured to obtain a control group image, training set samples, and test set samples according to an image set corresponding to an identification object; a mutual information calculation module, configured to calculate a maximum mutual information coefficient MIC value between pixels of the control group image and the training set samples; a feature pixel determination module, configured to obtain matching pixels corresponding to the control group image according to the MIC value and by using the test set samples; wherein, by using a genetic algorithm and by comparing the recognition accuracy of the test set sample images, feature pixel points are selected as matching pixel points for image recognition; a matching processing module, configured to perform matching processing on an image to be matched according to the matching pixels to obtain a matching result.
8. The device according to claim 7, wherein the mutual information calculation module includes: a feature acquisition unit, configured to regard each pixel of the control group image and the training set samples as an image feature; generate a control group feature vector corresponding to a control group image and a feature matrix corresponding to a plurality of training set samples based on pixel values of the image features; wherein each row of the feature matrix is a sample feature vector corresponding to a training set sample; an information calculation unit, configured to calculate the MIC value according to the control group feature vector and the feature matrix.
9. The device according to claim 8, wherein the information calculation unit is specifically configured to calculate the MIC value of each image feature based on all sample feature vectors in the feature matrix and the control group feature vector.
10. The device according to claim 8, wherein the feature pixel determination module includes: a primary population determination unit, configured to obtain an average MIC value corresponding to all image features; select a first image feature group and a second image feature group from all the image features; wherein the MIC value of each image feature in the first image feature group is greater than the average MIC value, and the MIC value of each image feature in the second image feature group is less than or equal to the average MIC value; generate a primary population of image features based on the first image feature group and the second image feature group; an adaptive population determination unit, configured to perform genetic algorithm iterative processing on the primary population by using a preset genetic algorithm and by using the test set samples to obtain an adaptive population; wherein the fitness function in the genetic algorithm is used to represent the image recognition rate of recognizing the test set samples by using all image features in the primary population, the intermediate population, or the adaptive population, and the image features in the adaptive population are the matching pixels.
11. The device according to claim 10, wherein The matching processing module is configured to obtain all matching pixel points corresponding to all image features in the adaptation group, generate a first feature vector corresponding to the control group image and a second feature vector corresponding to the image to be matched based on all the matching pixel points; and perform a matching process on the first feature vector and the second feature vector.
12. An image matching device, comprising: A memory; And a processor coupled to the memory, the processor being configured to execute the method according to any one of claims 1 to 6 based on instructions stored in the memory.
13. A computer-readable storage medium storing computer instructions, the instructions being executed by a processor to perform the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Mutual information image selected block and sift (scale-invariant feature transform) characteristic based remote sensing image registration method
CN104200461A
Visible light broadband spectrum image registration method
CN104318583A