A hyperspectral spectrum segment optimization method for detection tasks based on genetic algorithm

Through the preferred method of highlight spectrum segments based on genetic algorithms, the limitations of ignoring background miscellaneous waves and unprepared spectrum combinations in existing technologies have been solved, and more efficient spectral letter ratio estimates and target detection performance have been achieved.

CN118015464BActive Publication Date: 2025-01-28HARBIN INST OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410164684.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-02-05
Publication Date
2025-01-28
Estimated Expiration
2044-02-05

AI Technical Summary

Technical Problem

The existing hyperspectral image object detection method has limitations in terms of segment optimization, focusing on distinguishing the energy levels of the target and background, ignoring the impact of background clutter on object detection, and evaluating the spectral segment separately without considering the spectrum. Enhanced detection performance brought by segment combination.

Method used

Adopt the preferred method of high -gloss spectrum segment based on genetic algorithm -oriented tasks, build an adaptive function model through the spectrum letter ratio, and use the cluster algorithm to classify similar backgrounds into the same cluster, and set the weight to weighted the background, combine the combination of Select, cross, and mutation operations randomly search optimization, and select the optimal spectrum combination.

Benefits of technology

Effectively screen out the spectrum section of the spectrum detection capacity or better, which improves the accuracy of the background accuracy of the spectral letter ratio, enhances the distinction between the target and the background, and reduces the virtual alarm rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118015464B_ABST
    Figure CN118015464B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for optimizing hyperspectral spectral segments for detection tasks based on a genetic algorithm. The method is as follows: loading a hyperspectral image, flattening the two dimensions of the height and width of the hyperspectral image into a one-dimensional tensor, and performing binary chromosome encoding on the processed hyperspectral image; constructing a fitness function model using the spectral signal-to-noise ratio, classifying similar backgrounds into the same cluster through a clustering algorithm, setting a weight for each type of background, and adopting two strategies for weighted suppression of the background for different detection targets, so as to further improve the accuracy of the spectral signal-to-noise ratio in estimating the background; using the selection operation, crossover operation, and mutation operation of the genetic algorithm to perform random global search optimization, calculate individual fitness, search for individuals with the smallest fitness, and obtain the spectral segment optimization result. The present invention uses two sets of hyperspectral data sets to test and verify the algorithm, proving that the method can effectively screen out a spectral segment subset that is equivalent to or better than the full spectral segment detection capability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of image processing, and relates to a spectrum segment optimization method for hyperspectral target detection, and specifically to a spectrum segment optimization method for hyperspectral target detection based on a genetic algorithm weighted constraint target. Background Art

[0002] In recent years, hyperspectral imaging technology has been widely used in the fields of biophysical parameter inversion, complex environment classification, small target detection, etc. Hyperspectral images can effectively distinguish objects through subtle spectral differences due to their high spectral resolution, multiple spectral bands, continuous spectral bands, and large amount of information, which significantly improves the quality, details, and credibility of data analysis. However, the huge amount of data in hyperspectral images consumes a lot of computing resources, increases the difficulty of statistical and geometric analysis, and restricts the development of hyperspectral image target detection. Therefore, it is of great significance to design a suitable data dimensionality reduction algorithm to reduce the redundancy and computational cost of spectral information while retaining the key spectral information of the target.

[0003] At present, a large number of studies have been carried out on the topic of dimensionality reduction of hyperspectral images. The dimensionality reduction methods are mainly divided into two categories: feature extraction and spectral segment optimization. The feature extraction method only considers the spectral dimension feature extraction, maps or transforms the original high-dimensional spectral data into a low-dimensional space, and extracts the characteristic information that meets the current task. The spectral segment optimization method aims to select a small subset of spectral segments to reduce spectral redundancy and computational cost while retaining the key spectral information of the target. Compared with the feature extraction method, the results of spectral segment optimization can be easily applied to subsequent information processing and guide the setting of the number of spectral segments in specific applications such as hyperspectral target detection. Therefore, designing a suitable spectral segment optimization algorithm is of great significance for hyperspectral target detection. Spectral segment optimization algorithms can be roughly divided into two categories according to whether the prior knowledge of the target spectrum is considered: unsupervised spectral segment optimization and supervised spectral segment optimization. Compared with unsupervised spectral segment optimization, supervised spectral segment optimization focuses on the subtle differences of specific targets under different backgrounds, and can select more targeted spectral segment subsets for target detection. However, the existing supervised spectral segment optimization methods have certain limitations. These methods often focus on distinguishing the energy levels of the target and the background, and ignore the impact of background clutter fluctuations on target detection. Most of them evaluate spectral segments individually and select the top few with the highest evaluation indices without considering the enhanced detection performance brought by the combination of spectral segments. Summary of the invention

[0004] In order to solve the problems of data redundancy and difficulty in dimensionality reduction processing in hyperspectral image target detection, the present invention suppresses the background through two weighting strategies, uses a genetic algorithm to simultaneously select multiple spectral segments, reveals the advantages of the potential characteristics of the spectral segment combination, and designs a hyperspectral segment optimization method for detection tasks based on a genetic algorithm.

[0005] The objective of the present invention is achieved through the following technical solutions:

[0006] A method for selecting hyperspectral bands for detection tasks based on genetic algorithms comprises the following steps:

[0007] Step 1: Load the hyperspectral image, flatten the height and width of the hyperspectral image into a one-dimensional tensor, and perform binary chromosome encoding on the processed hyperspectral image;

[0008] Step 2: Use the spectral signal-to-clutter ratio to build a fitness function model, classify similar backgrounds into the same cluster through a clustering algorithm, set a weight for each type of background, and adopt two strategies of improving target discrimination and reducing background clutter fluctuations to suppress the background in a weighted manner for different detection targets, so as to further improve the accuracy of spectral signal-to-clutter ratio in estimating background.

[0009] Step 3: Use the selection operation, crossover operation, and mutation operation of the genetic algorithm to perform random global search optimization, calculate the individual fitness, search for the individual with the smallest fitness, and obtain the spectrum segment optimization result.

[0010] Compared with the prior art, the present invention has the following advantages:

[0011] (1) Aiming at the field of hyperspectral image target detection, the present invention proposes a spectral SCR model for constrained energy minimization (CEM) spectral segment optimization. Different from the existing classification-oriented models, the present invention takes target discrimination and background clutter fluctuation as the main factors for finding the characteristic spectral segments for target detection applications, avoiding the exclusion of spectral segments with low image quality but strong detection capability.

[0012] (2) The present invention proposes a background feature estimation strategy based on k-means clustering and weight allocation. This method can improve the accuracy of the spectral signal-to-noise ratio estimation fitness and closely align it with the actual background distribution, thereby selecting a spectral segment subset with stronger background suppression.

[0013] (3) The present invention proposes a search method based on genetic algorithm. Different from the traditional forward or backward search strategy, this method considers the potential impact of the combination relationship of spectral segment subsets on the detection ability. The genetic operation of chromosome encoding, crossover and mutation is used to limit the search space, thereby ensuring the rapid discovery of the optimal subset of global spectral segments.

[0014] (4) The algorithm was tested and verified using two sets of hyperspectral datasets, demonstrating that the method can effectively screen out spectral subsets with detection capabilities equivalent to or better than the full spectrum. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 It is a flow chart of spectrum segment optimization for hyperspectral target detection based on genetic algorithm weighted constraint target;

[0016] Figure 2 Comparison of the spectrum optimization results of the present invention and other methods;

[0017] Figure 3 Schematic diagram of selecting operations for genetic algorithms;

[0018] Figure 4 This is a schematic diagram of the crossover operation of the genetic algorithm;

[0019] Figure 5 Schematic diagram of genetic algorithm mutation operation. DETAILED DESCRIPTION

[0020] The technical solution of the present invention is further described below in conjunction with the accompanying drawings, but is not limited thereto. Any modification or equivalent replacement of the technical solution of the present invention without departing from the spirit and scope of the technical solution of the present invention should be included in the protection scope of the present invention.

[0021] The present invention provides a method for selecting hyperspectral spectral segments for detection tasks based on a genetic algorithm. The fitness function is constructed by using the spectral signal-to-clutter ratio (SCR). The fitness function containing two weighting strategies is designed to accurately estimate the background. Finally, a search strategy based on a genetic algorithm is used to efficiently select a global spectral segment combination for hyperspectral target detection tasks. Figure 1 As shown, the method comprises the following steps:

[0022] Step 1: Load the hyperspectral image, flatten the height and width of the hyperspectral image into a one-dimensional tensor, and perform binary chromosome encoding on the processed hyperspectral image. The specific steps are as follows:

[0023] Step 1: Load a hyperspectral image of size m×n×L, where m is the height of the hyperspectral image, n is the width of the hyperspectral image, and L is the number of spectral bands of the hyperspectral image;

[0024] Step 1 and 2: Flatten the hyperspectral image to obtain a tensor of N×L, where N=m×n;

[0025] Step 13: Based on the tensor, a chromosome with L genes is given. Each gene represents whether the corresponding spectrum segment is selected, and is assigned a value of 1 or 0. Therefore, each chromosome is a (1×L)-dimensional binary vector;

[0026] Step 14: For a scale of N P The population of all chromosome vectors is combined into one (N P ×L)-dimensional binary matrix

[0027] Step 15: The population matrix C is randomly initialized according to the following constraints:

[0028]

[0029] Step 2: Use the spectral signal-to-clutter ratio to build a fitness function model, classify similar backgrounds into the same cluster through a clustering algorithm, set a weight for each type of background, and adopt two strategies of improving target discrimination and reducing background clutter fluctuations to suppress the background in a weighted manner for different detection targets, so as to further improve the accuracy of the spectral signal-to-clutter ratio in estimating the background. The specific steps are as follows:

[0030] Step 21: Use the constrained energy minimization (CEM) algorithm to separate specific spectral features and output the detection image D CEM , the specific steps are as follows:

[0031] Step 2-1: Assume X = [r1, r2, ..., r N ] is a hyperspectral image with N pixels, where r i =(r i1 ,r i2 ,r i3 ,...r iL ) T , 1≤i≤N, the target spectrum information in the known image d=(d1,d2,d3,...d L ) T ;

[0032] Step 212: The CEM algorithm satisfies the following constraints by using a linear FIR filter w = (w1, w2, w3, ..., w L ) T , minimize the output energy of the filter:

[0033]

[0034] Where d T represents the target spectral information in the hyperspectral image, and w represents the linear FIR filter parameters.

[0035] Step 213: The CEM algorithm gives the optimized filter parameters as follows:

[0036]

[0037] In the formula represents the autocorrelation matrix, and d represents the target spectral information in the hyperspectral image.

[0038] Step 214: In the field of hyperspectral target detection, the final output of CEM is represented as a detection map D CEM , this process can be expressed as follows:

[0039] DCEM =X T w CEM

[0040] Where X T represents the hyperspectral image, w CEM Represents the filter parameters after CEM algorithm optimization.

[0041] Step 22: Use the detection image D output by the CEM algorithm CEM The signal-to-clutter ratio (SCR) is used to construct the fitness function in the genetic algorithm. Since the SCR of the detection image implicitly represents the spectral contrast between the target and the background, the present invention refers to it as the spectral SCR of the hyperspectral image. The definition of SCR is as follows:

[0042]

[0043] Where μ t Indicates D CEM The average value of the target pixels in b Representative D CEM The average value of background pixels in , σ b Representative D CEM The parameters in the SCR definition can be further expanded as follows:

[0044]

[0045]

[0046]

[0047] Where r t represents the target pixel, r b Represents background pixels, N t Indicates the number of target pixels, N b represents the number of background pixels, is a column vector of all 1s, X T represents the hyperspectral image, w CEM Represents the filter parameters after CEM algorithm optimization.

[0048] Step 2 and 3: Since the background mean is estimated using the spectral SCR of the detection image, it is easily affected by the relative area and fluctuation size of different background types. The present invention uses a weighted constrained target method to estimate the background, and the specific steps are as follows:

[0049] Step 231: Use the k-means clustering algorithm, denoted as KM (D b ,k), the background area D bThe algorithm effectively divides Db into a series of sub-regions {S1, S2, ..., S k}, each sub-region corresponds to a background type in the detection map.

[0050] Step 232: After the clusters are defined, use the following formula to calculate the mean of each cluster

[0051]

[0052] Where |S i | represents cluster S i The number of pixels in the image, x represents the detection image D CEM The mean of the cluster.

[0053] Step 233: The present invention adopts two weighted estimation methods to estimate the background according to different target detection task requirements: (1) suppressing the background according to the size of the background area to improve the detection rate; (2) suppressing clutter according to the size of the background fluctuation to reduce the false alarm rate.

[0054] For method (1), the weights are determined by the number of pixels of each background type. Where N i is the number of pixels of the i-th background type, is the total number of pixels for all background types.

[0055] For method (2), the weights are calculated based on the mean square error (MSE) of each background type. Where MSE i is the MSE of the i-th background type in the detection graph, It is the sum of the MSE of the background types whose pixel values ​​are greater than the target.

[0056] According to the target detection task requirements, determine the final weighting coefficient α i If more pixels of background need to be suppressed, the weight k of method (1) is increased; if a background with stronger fluctuations needs to be suppressed, the weight (1-k) of method (2) is increased. The final weighting coefficient is expressed as:

[0057]

[0058] Where k is a factor used to adjust the weight of the two weighting methods.

[0059] Step 24: Derived the overall background average by taking the weighted average of the above background cluster averages

[0060]

[0061] Step 25: In summary, based on the spectral SCR construction, the background estimation weighted fitness function is defined as:

[0062]

[0063] When the mean of the target class exceeds the mean of the background class, the fitness value is inversely proportional to the SCR, which means that the greater the distance between the target class and the background class, the higher the fitness value. When the mean of the target class is less than the mean of the background class, the fitness is set to a fixed value C, which is 10 by default in the algorithm.

[0064] Step 3: Use the selection, crossover, and mutation operations of the genetic algorithm to perform random global search optimization, calculate individual fitness, search for the individual with the smallest fitness, and obtain the spectrum segment optimization result. The specific steps are as follows:

[0065] Step 31: Use tournament selection algorithm based on competition strategy. Figure 3 As shown in the figure, the core idea of ​​the algorithm is to randomly select a part of individuals from the population, and then hold a "tournament" among these individuals according to their fitness. The individual with the highest fitness in each tournament is selected as the next generation. This method ensures that genetic information is preferentially transmitted from individuals with high fitness, while maintaining genetic diversity within the population.

[0066] Step 32: Perform the crossover operation of the genetic algorithm, using represents the t-th generation population, such as Figure 4 As shown, represents the i-th spectrum segment preferred subset in the t-th generation. The algorithm first detects The difference between the two, randomly select the site with the value of '1' from the above different genes, exchange it with the corresponding '0', and then generate a new individual according to the predetermined number of spectrum segments Make sure the number of selected spectral bands is the same as the predetermined number of spectral bands.

[0067] Step 33: Perform mutation operation of genetic algorithm. The mutation operator uses a fixed low probability to change the gene values ​​at multiple positions on the chromosome. Figure 5 When a gene with a value of 1 / 0 in a chromosome mutates, another gene with a value of 0 / 1 is randomly selected and their values ​​are exchanged to ensure that the number of selected spectrum segments remains unchanged after the mutation.

[0068] Step 3 and 4: After the mutation operation is completed, the chromosomes of the new generation population are obtained. Then the fitness is recalculated to determine whether the termination condition is met. If not, the selection operation, crossover operation and mutation operation are continued. If the termination condition is met, the individual with the smallest fitness value is selected as the preferred subset of the spectrum. In this method, the termination condition is defined as: the process reaches a predetermined number of generations, or the fitness value remains unchanged before the predetermined number of generations is reached.

[0069] Step 4: Use two widely used hyperspectral datasets to test and verify the algorithm. The specific steps are as follows:

[0070] The present invention uses online accessible hyperspectral datasets, including the Airport–Beach–Urban (ABU) dataset and the AVIRIS San Diego dataset, to evaluate the detection capability of the proposed spectral segment optimization method for the optimal subset.

[0071] In all experiments, the mutation rate was uniformly set to 0.05, the population size was set to 100, the number of cluster backgrounds was set to 5, and the weight factor of background estimation was set to 0.5. Figure 2 The results of the present invention and other spectrum segment optimization methods are shown in Figure 1. The spectrum segment subset selected by the present invention has a stronger target and background distinction and a smoother background.

Claims

1. A hyperspectral spectrum segment optimization method for detection tasks based on genetic algorithm, characterized in that The method comprises the following steps: Step 1: Load the hyperspectral image, flatten the height and width of the hyperspectral image into a one-dimensional tensor, and perform binary chromosome encoding on the processed hyperspectral image; Step 2: Use the spectral signal-to-clutter ratio to build a fitness function model, classify similar backgrounds into the same cluster through a clustering algorithm, set a weight for each type of background, and adopt two strategies of improving target discrimination and reducing background clutter fluctuations to suppress the background in a weighted manner for different detection targets, so as to further improve the accuracy of the spectral signal-to-clutter ratio in estimating the background. The specific steps are as follows: Step 21: Use CEM algorithm to separate specific spectral features and output detection image D CEM ; Step 22: Use the detection image D output by the CEM algorithm CEM The signal-to-noise ratio SCR is used to construct the fitness function in the genetic algorithm, where SCR is defined as follows: Where μ t Indicates D CEM The average value of the target pixels in b Representative D CEM The average value of background pixels in b Representative D CEM Standard deviation of the background; Step 2 and 3: Use the weighted constrained target method to estimate the background. The specific steps are as follows: Step 231: Use the k-means clustering algorithm, denoted as KM (D b ,k), the background area D b Divide into k different clusters {S1,S2,...,S k }; Step 232: After the clusters are defined, use the following formula to calculate the mean of each cluster Where |S i | represents cluster S i The number of pixels in the image, x represents the detection image D CEM The mean of the cluster in ; Step 233: According to different target detection task requirements, two weighted estimation methods are used to estimate the background: (1) suppress the background according to the size of the background area to improve the detection rate; (2) Suppress clutter and reduce false alarm rate according to the size of background fluctuations; For method (1), the weights are determined by the number of pixels of each background type: Where N i is the number of pixels of the i-th background type, is the total number of pixels of all background types; For method (2), the weight is calculated according to the mean square error (MSE) of each background type: Where MSE i is the MSE of the i-th background type in the detection graph, It is the sum of the MSE of the background types whose pixel values ​​are greater than the target; According to the target detection task requirements, determine the final weighting coefficient α i : Where k is a factor used to adjust the weight of the two weighting methods; Step 24: Derive the overall background average by taking the weighted average of the background cluster averages Step 25: Based on the spectral SCR construction, the fitness function of the background estimation weight is defined as: When the mean of the target class exceeds the mean of the background class, the fitness value is inversely proportional to the SCR, which means that the greater the distance between the target class and the background class, the higher the fitness value; when the mean of the target class is less than the mean of the background class, the fitness is set to a constant value C; Step 3: Use the selection operation, crossover operation, and mutation operation of the genetic algorithm to perform random global search optimization, calculate the individual fitness, search for the individual with the smallest fitness, and obtain the spectrum segment optimization result.

2. The method for optimizing hyperspectral spectrum segments for detection tasks based on genetic algorithm according to claim 1, characterized in that The specific steps of step one are as follows: Step 1: Load a hyperspectral image of size m×n×L, where m is the height of the hyperspectral image, n is the width of the hyperspectral image, and L is the number of spectral bands of the hyperspectral image; Step 1 and 2: Flatten the hyperspectral image to obtain a tensor of N×L, where N=m×n; Step 13: Based on the tensor, a chromosome with L genes is given. Each gene represents whether the corresponding spectrum segment is selected, and is assigned a value of 1 or 0. Each chromosome is a (1×L)-dimensional binary vector. Step 14: For a scale of N P The population of all chromosome vectors is combined into one (N P ×L)-dimensional binary matrix Step 15: The population matrix C is randomly initialized according to the following constraints:

3. The method for optimizing hyperspectral spectrum segments for detection tasks based on genetic algorithm according to claim 1, characterized in that The specific steps of step 21 are as follows: Step 2-1: Assume X = [r1, r2, ..., r N ] is a hyperspectral image with N pixels, where 1≤i≤N, the target spectral information in the image is known Step 2: The CEM algorithm passes through a linear FIR filter under the following constraints: Minimize the output energy of the filter: In the formula represents the target spectral information in the hyperspectral image, and w represents the linear FIR filter parameter; Step 213: The CEM algorithm gives the optimized filter parameters as follows: In the formula represents the autocorrelation matrix; Step 214: In the field of hyperspectral target detection, the final output of CEM is represented as a detection map D CEM , this process is expressed as: In the formula represents the hyperspectral image, w CEM Represents the filter parameters after CEM algorithm optimization.

4. The method for optimizing hyperspectral spectrum segments for detection tasks based on genetic algorithm according to claim 1, characterized in that The parameters in the SCR definition are further expanded as follows: Where r t represents the target pixel, r b Represents background pixels, N t Indicates the number of target pixels, N b represents the number of background pixels, is a column vector of all ones, represents the hyperspectral image, w CEM Represents the filter parameters after CEM algorithm optimization.

5. The method for optimizing hyperspectral spectrum segments for detection tasks based on genetic algorithm according to claim 1, characterized in that The specific steps of step three are as follows: Step 31: Use the tournament selection algorithm based on competition strategy to randomly select a part of individuals from the population, and then hold a "tournament" among these individuals according to their fitness. The individual with the highest fitness in each tournament is selected as the next generation. Step 32: Perform the crossover operation of the genetic algorithm, using represents the t-th generation population, with represents the preferred subset of the i-th spectrum in the t-th generation, first detect The difference between the two, randomly select the sites with the value of '1' from different genes, exchange them with the corresponding '0', and then generate new individuals according to the predetermined number of spectrum segments. Ensure that the number of selected spectrum segments is the same as the predetermined number of spectrum segments; Step 33: Perform mutation operation of genetic algorithm. The mutation operator uses a fixed low probability to change the gene values ​​at multiple positions on the chromosome. When a gene with a value of 1 / 0 in the chromosome mutates, another gene with a value of 0 / 1 is randomly selected and their values ​​are exchanged to ensure that the number of selected spectrum segments remains unchanged after mutation. Step 3 and 4: After the mutation operation is completed, the chromosomes of the new generation population are obtained, and then the fitness is recalculated to determine whether the termination condition is met; if not, the selection operation, crossover operation and mutation operation are continued; if the termination condition is met, the individual with the smallest fitness value is selected as the preferred subset of the spectrum segment.

6. The method for selecting hyperspectral bands for detection tasks based on genetic algorithm according to claim 5, characterized in that The termination condition is defined as: the process reaches a predetermined number of generations, or the fitness value remains unchanged before reaching the predetermined number of generations.

Citation Information

Patent Citations

  • EL image detection and defect identification method for solar cells

    CN109120230A

  • High-altitude throwing real-time detection method based on improved Gaussian mixture algorithm

    CN115984763A