Monitoring method for identifying the distribution of dominant species in alpine grasslands based on hyperspectral imaging technology

By using high -spectrum imaging technology on high -cold grasslands, combined with the Gabor filter and support vector machine model, the problem of data processing complexity and spectral hybrid effects in high -cold grassland vegetation monitoring achieves more accurate and efficient vegetation distribution monitoring.

CN118823577BActive Publication Date: 2025-01-28青海省草原总站
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410833257.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-26
Publication Date
2025-01-28
Estimated Expiration
2044-06-26

AI Technical Summary

Technical Problem

Hyperspectral imaging technology has problems such as data processing complexity, spectral mixing effects and environmental factors interference in vegetation monitoring in alpine grasslands, affecting the accuracy and efficiency of monitoring.

Method used

Adopt monitoring methods based on high spectrometer imaging technology, obtain high spectral images through flight devices, conduct pre -processing and feature extraction, use Gabor filters and support vector model models for texture and gradient feature extraction and classification to achieve the recognition and monitoring of vegetation distribution and monitoring Essence

Benefits of technology

It improves the accuracy and efficiency of high -cold grassland vegetation monitoring, reduces the effects of the complexity and spectral hybrid effects of data processing, and enhances the ability to identify vegetation distribution.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118823577B_ABST
    Figure CN118823577B_ABST
Patent Text Reader

Abstract

The present invention relates to a monitoring method for identifying the distribution of dominant species in alpine grasslands based on hyperspectral imaging technology. The method comprises: selecting an area to be monitored within a monitoring area of ​​the alpine grassland, and determining typical dominant plant species in the area to be monitored. Obtaining a hyperspectral image of the area to be monitored, and preprocessing the hyperspectral image to meet model training requirements. Extracting the texture features of the hyperspectral image through a Gabor filter, and extracting the gradient features of the hyperspectral image based on edge information in the hyperspectral image to obtain a texture feature vector and a gradient feature vector of the hyperspectral image. Splicing the texture feature vector and the gradient feature vector, constructing a training data set and a test data set of a support vector machine model, training the support vector machine model, and obtaining a classification model. Finally, calling the classification model to monitor the current hyperspectral image, and outputting the category to which the monitored object in the current hyperspectral image belongs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of hyperspectral imaging, and more specifically, relates to a monitoring method for identifying the distribution of dominant species in alpine grasslands based on hyperspectral imaging technology. Background Art

[0002] Alpine grassland is one of the important ecosystems in my country. Its unique ecological environment and rich biodiversity are of great significance to maintaining regional ecological balance and climate regulation. However, in recent years, due to the impact of climate change and human activities, the alpine grassland ecosystem is facing serious problems such as grassland degradation and biodiversity reduction. Timely and accurate monitoring of the distribution of plants on the alpine grassland is crucial to understanding and protecting this ecosystem. At present, alpine grassland vegetation monitoring mainly relies on traditional ground surveys and remote sensing technologies. Ground survey methods include sample plot surveys and line surveys. Although they can provide detailed information on plant species, they are labor-intensive, costly and have limited coverage. Remote sensing technology, especially multispectral imaging technology, has been widely used in vegetation monitoring. Multispectral imaging can analyze vegetation conditions through reflected light in several specific bands, and has the advantages of wide coverage and rapid data acquisition.

[0003] Hyperspectral imaging technology is a cutting-edge development in remote sensing technology. Its characteristic is that it can obtain continuous spectral information from multiple bands from visible light to near-infrared to form a hyperspectral data cube. This enables hyperspectral imaging to capture information on subtle spectral differences in plants and to more accurately identify and classify different plant species. Although hyperspectral imaging technology has shown great potential in vegetation monitoring, there are still some challenges and defects in practical applications: (1) Complex data processing: The amount of hyperspectral data is large, and data processing and analysis require powerful computing power and professional analysis algorithms, which increases the technical threshold and cost. (2) Spectral mixing effect: Due to the complexity of ground vegetation, the spectral mixing effect in hyperspectral data may cause the spectral characteristics of different plant species to overlap, affecting the classification accuracy. (3) Influence of environmental factors: The alpine grassland environment is complex and changeable. Environmental factors such as clouds and light changes interfere with the acquisition and processing of hyperspectral imaging data, requiring complex preprocessing and correction.

[0004] Although hyperspectral imaging technology has great potential in monitoring the distribution of alpine grassland vegetation, it still faces significant challenges in terms of data processing complexity, spectral mixing effects, interference from environmental factors, and ground verification. Solving these problems will be the focus of future research and application to achieve more accurate and efficient alpine grassland vegetation monitoring. Summary of the invention

[0005] In order to solve the deficiencies in the prior art, the purpose of the present invention is to solve the above-mentioned defects and further propose a monitoring method for identifying the distribution of dominant species in alpine grasslands based on hyperspectral imaging technology.

[0006] The present invention adopts the following technical solution.

[0007] The first aspect of the present invention discloses a monitoring method for identifying the distribution of dominant species in alpine grasslands based on hyperspectral imaging technology, the method comprising:

[0008] Selecting an area to be monitored within the monitoring area of ​​the alpine grassland, and determining typical dominant plant species in the area to be monitored based on typical dominant species already in the database;

[0009] A hyperspectral imaging device is mounted on a flying device to carry out aerial survey over the area to be monitored to obtain a hyperspectral image of the area to be monitored, and the hyperspectral image is preprocessed to meet the model training requirements;

[0010] Extracting texture features of the hyperspectral image through a Gabor filter, and extracting gradient features of the hyperspectral image based on edge information in the hyperspectral image to obtain a texture feature vector and a gradient feature vector of the hyperspectral image;

[0011] The texture feature vector and the gradient feature vector are concatenated to obtain a feature vector of the hyperspectral image, and a training data set and a test data set of a support vector machine model are constructed based on a plurality of the feature vectors, and the support vector machine model is trained to obtain a classification model;

[0012] Acquire a current hyperspectral image, and use the current hyperspectral image as an input of the classification model, so as to call the classification model to monitor the current hyperspectral image, and output the category to which the monitored object in the current hyperspectral image belongs;

[0013] The dimension of the feature vector corresponding to each of the hyperspectral images is the sum of the dimensions of the texture feature vector and the gradient feature vector of the hyperspectral image.

[0014] Furthermore, the method of carrying out aerial survey over the area to be monitored by using a flying device equipped with a hyperspectral imaging device to obtain a hyperspectral image of the area to be monitored, and preprocessing the hyperspectral image to meet the model training requirements includes:

[0015] Removing color information from the hyperspectral image and converting the hyperspectral image into a corresponding grayscale image;

[0016] Numerical representation is performed on pixels in the hyperspectral image converted into a grayscale image, and the numerical values ​​are normalized;

[0017] Here, let a pixel in the hyperspectral image be represented by V spectral values ​​as [s1, s2, …, s V ], after being converted into the grayscale image, the pixel is represented by a value S, and the expression is:

[0018]

[0019]

[0020] In the formula, S is the pixel value, V is the number of spectral values, v is the wavelength, ε v is the weight value corresponding to the pixel, m and n are the length and width of the hyperspectral image, p ij_v is the gray value of the pixel at position (i, j) under wavelength v, (i, j) is the position coordinate of the corresponding pixel in the hyperspectral image, p' ij_v is the average grayscale value of 9 adjacent pixels at position (i, j) under wavelength v;

[0021] The expression of the normalization process is:

[0022] S=S / S max ;

[0023] In the formula, S max is the maximum value of the pixel value S in the hyperspectral image.

[0024] Furthermore, the method of carrying out aerial survey over the area to be monitored by flying equipment equipped with a hyperspectral imaging device to obtain a hyperspectral image of the area to be monitored, and preprocessing the hyperspectral image to meet the model training requirements, further includes:

[0025] Performing size standardization processing on the hyperspectral image, and based on a grayscale image of the hyperspectral image, characterizing the hyperspectral image through an array of corresponding dimensions to obtain an image array of the hyperspectral image; and

[0026] The hyperspectral image is randomly cropped, and the cropped hyperspectral image is randomly rotated to obtain a plurality of sub-hyperspectral images, and the plurality of sub-hyperspectral images are added to the training data set of the support vector machine model.

[0027] Further, extracting the texture features of the hyperspectral image by using a Gabor filter, and extracting the gradient features of the hyperspectral image based on edge information in the hyperspectral image to obtain a texture feature vector and a gradient feature vector of the hyperspectral image, includes:

[0028] Obtaining a defined Gabor function to calculate each GM array in the hyperspectral image by using the defined Gabor function, and performing convolution calculation on the GM array and the image array IM to obtain a plurality of convolution results, wherein the convolution results are texture feature arrays in the hyperspectral image;

[0029] Summing up the absolute values ​​of all elements in the plurality of texture feature arrays to obtain a plurality of absolute value sum values, and combining the plurality of absolute value sum values ​​into a vector to obtain the texture feature vector;

[0030] The Gabor function is defined as:

[0031]

[0032] Where x and y are the position coordinates of the corresponding pixel in the hyperspectral image, G(x, y) is the Gabor function of the pixel at position (x, y), and λ, φ, σ, and γ are the wavelength, phase shift, standard deviation, and aspect ratio of the pixel at position (x, y), respectively.

[0033] Further, the extracting of the texture features of the hyperspectral image by using a Gabor filter, and extracting the gradient features of the hyperspectral image based on edge information in the hyperspectral image to obtain a texture feature vector and a gradient feature vector of the hyperspectral image, further includes:

[0034] Acquire edge information of the hyperspectral image, and calculate a gradient array DM of the image array IM, wherein the gradient array DM is obtained by subtracting adjacent elements of the image array IM and taking absolute values;

[0035] All elements in the gradient array DM are traversed, and based on the size comparison result between each element and a set threshold, the gradient array DM is subjected to binary processing to obtain an edge array SM of the hyperspectral image.

[0036] Further, the extracting of the texture features of the hyperspectral image by using a Gabor filter, and extracting the gradient features of the hyperspectral image based on edge information in the hyperspectral image to obtain a texture feature vector and a gradient feature vector of the hyperspectral image, further includes:

[0037] Based on the edge array SM, a defined gradient function is obtained, and according to the gradient function, an EM array corresponding to the gradient function y=x is obtained, wherein the gradient function includes a straight line function and a circular function;

[0038] A window sliding convolution is performed on the edge array SM through the EM array to obtain a convolution result array CM, and the absolute values ​​of all elements in the convolution result array CM are summed to form a vector with the results of summing the absolute values ​​of all elements in the convolution result array CM to obtain the gradient feature vector.

[0039] Furthermore, the texture feature vector and the gradient feature vector are concatenated to obtain the feature vector of the hyperspectral image, and a training data set and a test data set of a support vector machine model are constructed based on a plurality of the feature vectors, and the support vector machine model is trained to obtain a classification model, including:

[0040] Import the training data set and the test data set into the sklearn related library, initialize the support vector machine model, and use a linear function as the kernel function of the support vector machine model;

[0041] The support vector machine model is trained by using the feature vector of the hyperspectral image in the training data set as the input of the support vector machine model and using the category of the object corresponding to the feature vector as the output of the support vector machine model; and

[0042] The trained support vector machine model is tested based on the feature vectors of the hyperspectral images in the test data set and the categories of objects corresponding to the feature vectors to improve the prediction accuracy of the trained support vector machine model and obtain the classification model.

[0043] The second aspect of the present invention discloses a monitoring device for identifying the distribution of dominant species in alpine grasslands based on hyperspectral imaging technology, the device comprising:

[0044] A monitoring area selection module is used to select an area to be monitored within the monitoring area of ​​the alpine grassland, and determine the typical dominant plant species in the area to be monitored based on the typical dominant species already in the database;

[0045] An image preprocessing module is used to obtain a hyperspectral image of the area to be monitored by carrying a hyperspectral imaging device on a flying device to perform aerial survey over the area to be monitored, and to preprocess the hyperspectral image to meet the model training requirements;

[0046] A feature extraction module, used to extract texture features of the hyperspectral image through a Gabor filter, and extract gradient features of the hyperspectral image based on edge information in the hyperspectral image, so as to obtain a texture feature vector and a gradient feature vector of the hyperspectral image;

[0047] A model training module, used for splicing the texture feature vector and the gradient feature vector to obtain the feature vector of the hyperspectral image, and constructing a training data set and a test data set of a support vector machine model based on a plurality of the feature vectors, training the support vector machine model, and obtaining a classification model;

[0048] A real-time monitoring module, used to obtain a current hyperspectral image, and use the current hyperspectral image as an input of the classification model, so as to call the classification model to monitor the current hyperspectral image, and output the category to which the monitoring object in the current hyperspectral image belongs;

[0049] The dimension of the feature vector corresponding to each of the hyperspectral images is the sum of the dimensions of the texture feature vector and the gradient feature vector of the hyperspectral image.

[0050] The third aspect of the present invention discloses a terminal, including a processor and a storage medium; the characteristics are:

[0051] The storage medium is used to store instructions;

[0052] The processor is used to operate according to the instructions to execute the steps of the method described in the first aspect.

[0053] The fourth aspect of the present invention discloses a computer-readable storage medium having a computer program stored thereon, characterized in that when the program is executed by a processor, the steps of the method described in the first aspect are implemented.

[0054] The beneficial effects of the present invention are that, compared with the prior art, the present invention has the following advantages:

[0055] The monitoring area to be monitored is selected in the monitoring area of ​​the alpine grassland, and the typical dominant plant species in the monitoring area are determined according to the typical dominant species in the database. Then, the hyperspectral image of the monitoring area is obtained by aerial surveying over the monitoring area with a hyperspectral imaging device carried by a flying device, and the hyperspectral image is preprocessed to meet the model training requirements. Then, the texture features of the hyperspectral image are extracted by a Gabor filter, and the gradient features of the hyperspectral image are extracted based on the edge information in the hyperspectral image to obtain the texture feature vector and gradient feature vector of the hyperspectral image. The texture feature vector and the gradient feature vector are then spliced ​​to obtain the feature vector of the hyperspectral image, and the training data set and the test data set of the support vector machine model are constructed based on the obtained multiple feature vectors, and the support vector machine model is trained to obtain a classification model. Finally, the classification model is called to monitor the current hyperspectral image and output the category to which the monitored object in the current hyperspectral image belongs. This method extracts texture features and gradient feature vectors from hyperspectral images and combines them with a classification model trained by a support vector machine model to conduct real-time or periodic monitoring of vegetation distribution on alpine grasslands to determine the types of vegetation distribution, thereby achieving more accurate and efficient alpine grassland vegetation monitoring. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] Figure 1 A schematic flow chart of a monitoring method for identifying the distribution of dominant species in alpine grasslands based on hyperspectral imaging technology provided by the present invention. DETAILED DESCRIPTION

[0057] The present application is further described below in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and cannot be used to limit the protection scope of the present application.

[0058] like Figure 1 As shown, in one embodiment, a monitoring method for identifying the distribution of dominant species in alpine grasslands based on hyperspectral imaging technology includes the following steps:

[0059] Step S110, selecting a to-be-monitored area in the monitoring area of ​​the alpine grassland, and determining typical dominant plant species in the to-be-monitored area based on typical dominant species already in the database.

[0060] Step S120, a hyperspectral imaging device is mounted on a flying device to perform aerial survey over the area to be monitored to obtain a hyperspectral image of the area to be monitored, and the hyperspectral image is preprocessed to meet the model training requirements.

[0061] In some embodiments, the monitoring method for identifying the distribution of dominant species in alpine grasslands based on hyperspectral imaging technology provided by the present invention is to obtain a hyperspectral image of the area to be monitored by carrying a hyperspectral imaging device on a flying device to obtain an aerial survey over the area to be monitored, and preprocess the hyperspectral image to meet the model training requirements, specifically including the following steps:

[0062] Step S121, removing color information from the hyperspectral image and converting the hyperspectral image into a corresponding grayscale image.

[0063] Step S122, numerically represent the pixels in the hyperspectral image converted into a grayscale image, and normalize the numerical values.

[0064] In which, a pixel in the hyperspectral image is represented by V spectral values ​​[s1, s2, …, s V ], after being converted into a grayscale image, the pixel is represented by the value S, and the expression is:

[0065]

[0066]

[0067] In the formula, S is the pixel value, V is the number of spectral values, v is the wavelength, ε v is the weight value corresponding to the pixel, m and n are the length and width of the hyperspectral image, and p ij_v is the gray value of the pixel at position (i, j) under wavelength v, (i, j) is the position coordinate of the corresponding pixel in the hyperspectral image, p' ij_v is the average grayscale value of 9 adjacent pixels at position (i, j) under wavelength v.

[0068] The normalized expression is:

[0069] S=S / S max .

[0070] In the formula, S max is the maximum value of the pixel value S in the hyperspectral image.

[0071] In some embodiments, the monitoring method for identifying the distribution of dominant species in alpine grasslands based on hyperspectral imaging technology provided by the present invention includes performing aerial survey over the monitored area by carrying a hyperspectral imaging device on a flying device to obtain a hyperspectral image of the monitored area, and preprocessing the hyperspectral image to meet the model training requirements, and specifically further includes the following steps:

[0072] Step S123 , performing size standardization processing on the hyperspectral image, and based on the grayscale image of the hyperspectral image, characterizing the hyperspectral image through an array of corresponding dimensions to obtain an image array of the hyperspectral image.

[0073] Step S124, randomly cropping the hyperspectral image, and randomly rotating the cropped hyperspectral image to obtain a plurality of sub-hyperspectral images, and adding the plurality of sub-hyperspectral images to the training data set of the support vector machine model.

[0074] Step S130 , extracting texture features of the hyperspectral image through a Gabor filter, and extracting gradient features of the hyperspectral image based on edge information in the hyperspectral image, so as to obtain a texture feature vector and a gradient feature vector of the hyperspectral image.

[0075] In some embodiments, the monitoring method for identifying the distribution of dominant species in alpine grasslands based on hyperspectral imaging technology provided by the present invention extracts the texture features of the hyperspectral image through a Gabor filter, and extracts the gradient features of the hyperspectral image based on the edge information in the hyperspectral image to obtain the texture feature vector and gradient feature vector of the hyperspectral image, specifically comprising the following steps:

[0076] Step S131, obtaining a defined Gabor function to calculate each GM array in the hyperspectral image by using the defined Gabor function, and performing convolution calculation on the GM array and the image array IM to obtain a plurality of convolution results, where the convolution results are texture feature arrays in the hyperspectral image.

[0077] Step S132, performing absolute value summation on all elements in a plurality of texture feature arrays to obtain a plurality of absolute value summation values, and combining the plurality of absolute value summation values ​​into a vector to obtain a texture feature vector.

[0078] Among them, the Gabor function is defined as:

[0079]

[0080] Where x and y are the position coordinates of the corresponding pixel in the hyperspectral image, G(x, y) is the Gabor function of the pixel at position (x, y), and λ, φ, σ, and γ are the wavelength, phase shift, standard deviation, and aspect ratio of the pixel at position (x, y), respectively.

[0081] In some embodiments, the monitoring method for identifying the distribution of dominant species in alpine grasslands based on hyperspectral imaging technology provided by the present invention extracts the texture features of the hyperspectral image through a Gabor filter, and extracts the gradient features of the hyperspectral image based on the edge information in the hyperspectral image to obtain the texture feature vector and gradient feature vector of the hyperspectral image, and specifically includes the following steps:

[0082] Step S133, acquiring edge information of the hyperspectral image, and calculating the gradient array DM of the image array IM, where the gradient array DM is obtained by subtracting adjacent elements of the image array IM and taking the absolute values.

[0083] Step S134, traverse all elements in the gradient array DM, and perform binary processing on the gradient array DM based on the size comparison result between each element and the set threshold value, to obtain the edge array SM of the hyperspectral image.

[0084] In some embodiments, the monitoring method for identifying the distribution of dominant species in alpine grasslands based on hyperspectral imaging technology provided by the present invention extracts the texture features of the hyperspectral image through a Gabor filter, and extracts the gradient features of the hyperspectral image based on the edge information in the hyperspectral image to obtain the texture feature vector and gradient feature vector of the hyperspectral image, and specifically includes the following steps:

[0085] Step S135, obtaining a defined gradient function based on the edge array SM, and obtaining an EM array corresponding to the gradient function y=x according to the gradient function, wherein the gradient function includes a straight line function and a circular function.

[0086] Step S136, performing window sliding convolution on the edge array SM through the EM array to obtain the convolution result array CM, and summing the absolute values ​​of all elements in the convolution result array CM to form a vector with the sum of the absolute values ​​of all elements in the convolution result array CM to obtain a gradient feature vector.

[0087] Step S140, concatenating the texture feature vector and the gradient feature vector to obtain a feature vector of the hyperspectral image, and constructing a training data set and a test data set of a support vector machine model based on multiple feature vectors, training the support vector machine model, and obtaining a classification model.

[0088] In some embodiments, the monitoring method for identifying the distribution of dominant species in alpine grasslands based on hyperspectral imaging technology provided by the present invention concatenates texture feature vectors and gradient feature vectors to obtain feature vectors of hyperspectral images, and constructs a training data set and a test data set of a support vector machine model based on multiple feature vectors, trains the support vector machine model, and obtains a classification model, specifically comprising the following steps:

[0089] Step S141, importing the training data set and the test data set into the sklearn related library, initializing the support vector machine model, and using the linear function as the kernel function of the support vector machine model.

[0090] Step S142, using the feature vector of the hyperspectral image in the training data set as the input of the support vector machine model, and using the category of the object corresponding to the feature vector as the output of the support vector machine model, to train the support vector machine model.

[0091] Step S143, testing the trained support vector machine model based on the feature vectors of the hyperspectral images in the test data set and the categories of the objects corresponding to the feature vectors, so as to improve the prediction accuracy of the trained support vector machine model and obtain a classification model.

[0092] Step S150, obtaining a current hyperspectral image, and using the current hyperspectral image as an input of a classification model, so as to call the classification model to monitor the current hyperspectral image, and output the category to which the monitored object in the current hyperspectral image belongs.

[0093] In a specific embodiment, the present invention provides a monitoring method for identifying the distribution of dominant species in alpine grasslands based on hyperspectral imaging technology. Hyperspectral imaging technology is an advanced remote sensing technology that generates detailed spectral information for each pixel by capturing continuous spectral data from visible light to near infrared. These spectral data can reflect the chemical composition and physical properties of substances, and can therefore be used to identify and classify different substances. Hyperspectral imaging equipment captures light reflected or radiated from the surface of an object through a sensor, which decomposes the light into multiple continuous bands, each of which corresponds to a specific spectral range. Hyperspectral imaging typically generates data for hundreds of spectral bands, providing more detailed spectral information compared to the several bands of traditional multispectral imaging.

[0094] During data processing, hyperspectral imaging technology can: (1) Radiation correction: eliminate the impact of light intensity changes to ensure data reliability. (2) Geometric correction: correct geometric distortion caused by sensor movement or terrain undulations to ensure the spatial accuracy of the image.

[0095] In this embodiment, steps S1 to S6 are included.

[0096] Step S1, preparation.

[0097] Identify the study area: Select the alpine grassland area to be monitored.

[0098] Select typical dominant species: Determine the typical dominant plant species in the area.

[0099] Step S2: data collection.

[0100] Hyperspectral imaging instrument selection: Select hyperspectral imaging equipment suitable for the alpine grassland environment, considering its spectral range, resolution, and portability.

[0101] Regular aerial surveys: Use drones or airplanes equipped with hyperspectral imaging equipment to conduct regular aerial surveys over the study area to obtain hyperspectral images.

[0102] Step S3: image preprocessing.

[0103] The purpose of image preprocessing is: (1) remove the color information of the image and do not use color information as the basis for grassland vegetation classification. (2) ensure the consistency of the image size to facilitate subsequent feature extraction. (3) data enhancement, that is, converting one image into multiple images through methods such as rotation and cropping, which can increase the size of the data set and facilitate model training.

[0104] In this embodiment, the specific steps of image preprocessing are as follows:

[0105] First, remove the color information. Assume that a pixel in the hyperspectral image can be represented by V spectral values ​​as [s1, s2, …, s V ], after being converted into a grayscale image, this pixel only needs one value to represent it, assuming it is S:

[0106]

[0107] In the formula, S is the pixel value, V is the number of spectral values, v is the wavelength, ε v is the weight value corresponding to the pixel, m and n are the length and width of the hyperspectral image, and p ij_v is the gray value of the pixel at position (i, j) under wavelength v, (i, j) is the position coordinate of the corresponding pixel in the hyperspectral image, p' ij_v is the average grayscale value of 9 adjacent pixels at position (i, j) under wavelength v.

[0108] Then, the obtained values ​​are normalized:

[0109] S=S / S max .

[0110] In the formula, S max is the maximum value of the pixel value S in the image. After the conversion, an image that originally needed to be stored in an m*n*V-dimensional array now only needs an m*n*1-dimensional array, where m and n are the length and width of the image respectively, which can also save memory.

[0111] Secondly, size standardization. The size of all images is adjusted to 128*128 pixels. In the process of removing color information, the hyperspectral data has been converted into corresponding grayscale data. Therefore, a picture can be represented by an array with a dimension of 128*128*1. The array is named image array IM.

[0112] Finally, data enhancement. Randomly crop the image and then rotate it at a random angle to get another image. After multiple operations, one image can be converted into multiple images. Adding these newly generated images to the data set can increase the size of the training set. The larger the training set, the higher the accuracy of the model.

[0113] Step S4: feature extraction and analysis.

[0114] In this step, two features need to be extracted, one is texture feature and the other is gradient feature. The texture feature is represented by a 64-dimensional vector, and the gradient feature is also represented by a 64-dimensional vector. The two vectors are combined together to form a feature vector with a dimension of 128.

[0115] In the process of feature extraction and analysis, Gabor filter is first used to extract the texture information of the image. Gabor filter is a linear filter widely used in image processing and computer vision. It combines the frequency analysis capability of Fourier analysis and the spatial positioning characteristics in image processing, and can effectively extract the texture information of the image.

[0116] The specific steps are as follows:

[0117] First, define the Gabor function. The function is defined as follows:

[0118]

[0119] In the formula, x and y are the position coordinates of the corresponding pixel in the hyperspectral image, G(x, y) is the Gabor function of the pixel at position (x, y), and λ, φ, σ, and γ are the wavelength, phase offset, standard deviation, and aspect ratio of the pixel at position (x, y). When a set of λ, φ, σ, and γ is determined, a Gabor function is uniquely determined. Taking the values ​​of λ, φ, σ, and γ defined in Table 1 as an example, 64 Gabor functions are obtained. λ, φ, σ, and γ are taken according to the data in Table 1, and there are 64 combinations, defining 64 Gabor functions.

[0120] Table 1 Gabor function parameter values

[0121] parameter Value (select one of multiple data) λ 0.5、1、1.5、2 φ 0°、90° σ 0.5、1、1.5、2 γ 1、2

[0122] Secondly, calculate the 16*16 dimensional array GM. The calculation of the array GM can be expressed by the following formula. The G function is the Gabor function, which has been explained above and will not be repeated here: GM(i,j)=G(i-8,j-8), i is 1 to 16, and j is 1 to 16.

[0123] After obtaining the array GM, a sliding window filtering operation is performed. The specific method is to perform convolution calculation on the array GM and the image array IM, slide the GM array on the IM array like a window, and obtain a convolution result at each position. For example, a picture is divided into 8*8=64 windows. After the convolution calculation, an 8*8 array can be obtained. This array is the texture feature array, named WM.

[0124] After obtaining the texture feature array WM, the absolute values ​​of all elements in the texture feature array WM are summed to obtain the numerical value G. By repeating the above process, 64 Gabor functions can obtain 64 numerical values ​​G. These numerical values ​​G are combined into a vector named WV. WV is a texture feature vector with a dimension of 64.

[0125] In the process of gradient feature extraction, the gradient feature first focuses on the shape, size, position and other information in the image, which is also critical for the identification of grassland vegetation, especially when the texture differences between grassland vegetation are not obvious, its morphological characteristics may become the key to distinction. The specific steps are as follows:

[0126] Edge detection: First, obtain the edge information of the image. Assume that the image can be represented by a two-dimensional array IM, which is a 128*128-dimensional array. Calculate the gradient of the array IM. The gradient is represented by an array DM, which is a 128*128-dimensional array. The calculation method of DM is to make a difference between adjacent elements of the array IM and then take the absolute value, that is, DM(i,j)=abs(IM(i,j)-IM(i-1,j))+abs(IM(i,j)-IM(i,j-1)), i=2 to 128, j=2 to 128. In the formula, abs refers to the absolute value function, i and j are not equal to 1. When i or j is equal to 1, let DM(i,j)=0.

[0127] There are two processes involved in gradient feature extraction, one for gradient calculation and the other for binary processing. After obtaining the array DM, the array DM is binary processed, that is, the values ​​of the elements in the array DM are either assigned to 0 or 1. The specific method is to traverse the elements in DM. If the value of the element is greater than the set threshold, the element is assigned to 1. If the value of the element is less than the set threshold, the element is assigned to 0. The threshold takes the empirical value of 0.5, and the setting can also be changed according to the edge extraction effect. The DM obtained at this time is the edge array SM, which can be understood as the image array IM corresponds to the image, and the edge array SM corresponds to the line.

[0128] In this embodiment, based on the obtained edge array SM, the gradient feature vector is calculated using the edge array SM. First, a gradient function is defined. There are 64 gradient functions, 32 of which are linear functions and the other 32 are circular functions, which are expressed as follows:

[0129] y=x·tanθ.

[0130] In the formula, the value range of x and y is -8 to 8, the value range of θ is -90° to 90°, and the values ​​are taken at equal intervals, a total of 32. Then the above formula defines 32 straight line functions.

[0131] The other 32 circular functions are expressed as follows:

[0132] x 2 +y 2 =r 2 .

[0133] In the formula, the value range of x and y is -8 to 8, and the value range of r is 0 to The values ​​are taken at equal intervals, a total of 32, so the above formula defines 32 circular functions.

[0134] In this embodiment, each gradient function can be represented by an array EM of 16*16 dimensions. For example, when θ=45°, the line function is: y=x. The elements in the EM array are composed of 0 or 1, which defines a shape, and the shape is determined by the gradient function. Subsequently, the edge array SM is subjected to window sliding convolution using the array EM, similar to the texture feature extraction method, to obtain the convolution result array CM, which is an 8*8 dimensional array. The absolute values ​​of all elements of the CM array are then summed to obtain a value G. This process is essentially to detect the degree of correlation between the image and the gradient function. Again, taking y=x as an example, if there are more oblique line elements in the image, the obtained G value is larger, otherwise it is smaller. Among the 64 gradient functions, 64 values ​​G can be obtained. These values ​​are combined into a vector named GV. GV is a 64-dimensional vector, and GV is the gradient feature vector of the image.

[0135] Step S5: image classification.

[0136] Use machine learning algorithms such as support vector machine (SVM), random forest, neural network, etc. to classify vegetation.

[0137] In this embodiment, each image can obtain a texture feature vector WV and a gradient feature vector GV. The two vectors are concatenated together to obtain a feature vector CV, which is a 128-dimensional vector. That is, each image is converted into a 128-dimensional vector CV.

[0138] Use SVM to classify these vectors and train the classification model. This process can be completed using Python's machine learning library:

[0139] First, divide the prepared data into two parts: training set and test set, with the training set accounting for 70% and the test set accounting for 30%. Assuming that the training set is named x_train and y_train, and the test set is x_test and y_test, then each row in x_train and x_test represents the feature vector of an image sample with a dimension of 128, that is, the feature vector CV of the image. Each row in y_train and y_test represents the category corresponding to an image sample with a dimension of 1.

[0140] Secondly, create a model and train the model: import the sklearn related library, initialize an SVM model (support vector machine model), the model name can be model, and the kernel function selects a linear function: model =

[0141] svm.SVC(kernel = 'linear'). Train the model: model.fit(x_train, y_train). Use the test set to evaluate the model accuracy, and the accuracy is named score: score = accuracy_score(y_test, y_pred)).

[0142] In practical applications, the input is a picture, that is, the category of the object in the picture can be output. Taking grassland vegetation as an example, when a picture is input, the system will perform the following operations: First, the image is preprocessed to obtain a 128*128*1-dimensional array. Then, feature extraction is performed to obtain a 128-dimensional vector, assuming it is named CV. Finally, the model is called for prediction, assuming the category is N, that is: N = model.predict(CV, the category N to which the object in the picture belongs can be obtained.

[0143] Step S6: data verification and analysis.

[0144] The monitoring device for identifying the distribution of dominant species in alpine grasslands based on hyperspectral imaging technology provided by the present invention is described below. The monitoring device for identifying the distribution of dominant species in alpine grasslands based on hyperspectral imaging technology described below and the monitoring method for identifying the distribution of dominant species in alpine grasslands based on hyperspectral imaging technology described above can be referenced to each other.

[0145] In one embodiment, a monitoring device for identifying the distribution of dominant species in alpine grasslands based on hyperspectral imaging technology includes a monitoring area selection module, an image preprocessing module, a feature extraction module, a model training module, and a real-time monitoring module.

[0146] The monitoring area selection module is used to select the area to be monitored within the monitoring area of ​​the alpine grassland, and determine the typical dominant plant species in the area to be monitored based on the typical dominant species already in the database.

[0147] The image preprocessing module is used to obtain hyperspectral images of the area to be monitored by carrying hyperspectral imaging equipment on a flying device to conduct aerial surveys over the area to be monitored, and to preprocess the hyperspectral images to meet the model training requirements.

[0148] The feature extraction module is used to extract the texture features of the hyperspectral image through the Gabor filter, and to extract the gradient features of the hyperspectral image based on the edge information in the hyperspectral image, so as to obtain the texture feature vector and gradient feature vector of the hyperspectral image.

[0149] The model training module is used to concatenate the texture feature vector and the gradient feature vector to obtain the feature vector of the hyperspectral image, and to construct the training data set and the test data set of the support vector machine model based on multiple feature vectors, and to train the support vector machine model to obtain the classification model;

[0150] The real-time monitoring module is used to obtain the current hyperspectral image and use the current hyperspectral image as the input of the classification model to call the classification model to monitor the current hyperspectral image and output the category to which the monitored object in the current hyperspectral image belongs.

[0151] The dimension of the feature vector corresponding to each hyperspectral image is the sum of the dimensions of the texture feature vector and the gradient feature vector of the hyperspectral image.

[0152] In this embodiment, the monitoring device for identifying the distribution of dominant species in alpine grasslands based on hyperspectral imaging technology provided by the present invention, the image preprocessing module is specifically used for:

[0153] Remove the color information from the hyperspectral image and convert the hyperspectral image into a corresponding grayscale image.

[0154] The pixels in the hyperspectral image converted into a grayscale image are numerically represented and the values ​​are normalized.

[0155] In which, a pixel in the hyperspectral image is represented by V spectral values ​​[s1, s2, …, s V ], after being converted into a grayscale image, the pixel is represented by the value S, and the expression is:

[0156]

[0157] In the formula, S is the pixel value, V is the number of spectral values, v is the wavelength, ε v is the weight value corresponding to the pixel, m and n are the length and width of the hyperspectral image, and p ij_v is the gray value of the pixel at position (i, j) under wavelength v, (i, j) is the position coordinate of the corresponding pixel in the hyperspectral image, p' ij_v is the average grayscale value of 9 adjacent pixels at position (i, j) under wavelength v.

[0158] The normalized expression is:

[0159] S=S / S max .

[0160] In the formula, S max is the maximum value of the pixel value S in the hyperspectral image.

[0161] In this embodiment, the monitoring device for identifying the distribution of dominant species in alpine grasslands based on hyperspectral imaging technology provided by the present invention, the image preprocessing module is specifically used for:

[0162] The hyperspectral image is dimensionally standardized, and based on the grayscale image of the hyperspectral image, the hyperspectral image is characterized by an array of corresponding dimensions to obtain an image array of the hyperspectral image.

[0163] The hyperspectral image is randomly cropped and the cropped hyperspectral image is randomly rotated to obtain multiple sub-hyperspectral images, and the multiple sub-hyperspectral images are added to the training data set of the support vector machine model.

[0164] In this embodiment, the monitoring device for identifying the distribution of dominant species in alpine grasslands based on hyperspectral imaging technology provided by the present invention, the feature extraction module is specifically used for:

[0165] The defined Gabor function is obtained to calculate each GM array in the hyperspectral image through the defined Gabor function, and the GM array is convolved with the image array IM to obtain multiple convolution results, where the convolution results are texture feature arrays in the hyperspectral image.

[0166] The absolute values ​​of all elements in the plurality of texture feature arrays are summed to obtain a plurality of absolute value sum values, and the plurality of absolute value sum values ​​are combined into a vector to obtain a texture feature vector.

[0167] Among them, the Gabor function is defined as:

[0168]

[0169] Where x and y are the position coordinates of the corresponding pixel in the hyperspectral image, G(x, y) is the Gabor function of the pixel at position (x, y), and λ, φ, σ, and γ are the wavelength, phase shift, standard deviation, and aspect ratio of the pixel at position (x, y), respectively.

[0170] In this embodiment, the monitoring device for identifying the distribution of dominant species in alpine grasslands based on hyperspectral imaging technology provided by the present invention, the feature extraction module is specifically used for:

[0171] The edge information of the hyperspectral image is obtained, and the gradient array DM of the image array IM is calculated. The gradient array DM is obtained by subtracting the adjacent elements of the image array IM and taking the absolute values.

[0172] All elements in the gradient array DM are traversed, and the gradient array DM is binary processed based on the size comparison result between each element and the set threshold to obtain the edge array SM of the hyperspectral image.

[0173] In this embodiment, the monitoring device for identifying the distribution of dominant species in alpine grasslands based on hyperspectral imaging technology provided by the present invention, the feature extraction module is specifically used for:

[0174] The defined gradient function is obtained based on the edge array SM, and the EM array corresponding to the gradient function y=x is obtained according to the gradient function, wherein the gradient function includes a straight line function and a circular function.

[0175] A window sliding convolution is performed on the edge array SM through the EM array to obtain the convolution result array CM, and the absolute values ​​of all elements in the convolution result array CM are summed to form a vector with the sum of the absolute values ​​of all elements in the convolution result array CM to obtain the gradient feature vector.

[0176] In this embodiment, the monitoring device for identifying the distribution of dominant species in alpine grasslands based on hyperspectral imaging technology provided by the present invention, the model training module is specifically used for:

[0177] Import the training data set and the test data set into the sklearn related library, initialize the support vector machine model, and use the linear function as the kernel function of the support vector machine model.

[0178] The support vector machine model is trained by taking the feature vector of the hyperspectral image in the training data set as the input of the support vector machine model and taking the category of the object corresponding to the feature vector as the output of the support vector machine model.

[0179] The trained support vector machine model is tested based on the feature vectors of the hyperspectral images in the test data set and the categories of the objects corresponding to the feature vectors to improve the prediction accuracy of the trained support vector machine model and obtain a classification model.

[0180] The applicant of the present invention has made a detailed explanation and description of the implementation examples of the present invention in conjunction with the drawings in the specification. However, those skilled in the art should understand that the above implementation examples are only preferred implementation schemes of the present invention, and the detailed description is only to help readers better understand the spirit of the present invention, but not to limit the scope of protection of the present invention. On the contrary, any improvements or modifications based on the inventive spirit of the present invention should fall within the scope of protection of the present invention.

Claims

1. A monitoring method for identifying the distribution of dominant species in alpine grasslands based on hyperspectral imaging technology, characterized in that: The method comprises: Selecting an area to be monitored within the monitoring area of ​​the alpine grassland, and determining typical dominant plant species in the area to be monitored based on typical dominant species already in the database; A hyperspectral imaging device is mounted on a flying device to carry out aerial survey over the area to be monitored to obtain a hyperspectral image of the area to be monitored, and the hyperspectral image is preprocessed to meet the model training requirements; Extracting texture features of the hyperspectral image through a Gabor filter, and extracting gradient features of the hyperspectral image based on edge information in the hyperspectral image to obtain a texture feature vector and a gradient feature vector of the hyperspectral image; The texture feature vector and the gradient feature vector are concatenated to obtain a feature vector of the hyperspectral image, and a training data set and a test data set of a support vector machine model are constructed based on a plurality of the feature vectors, and the support vector machine model is trained to obtain a classification model; Acquire a current hyperspectral image, and use the current hyperspectral image as an input of the classification model, so as to call the classification model to monitor the current hyperspectral image, and output the category to which the monitored object in the current hyperspectral image belongs; Wherein, the dimension of the feature vector corresponding to each of the hyperspectral images is the sum of the dimensions of the texture feature vector and the gradient feature vector of the hyperspectral image; The method of carrying out aerial survey over the area to be monitored by using a flying device equipped with a hyperspectral imaging device to obtain a hyperspectral image of the area to be monitored, and preprocessing the hyperspectral image to meet the model training requirements includes: Removing color information from the hyperspectral image and converting the hyperspectral image into a corresponding grayscale image; Numerical representation is performed on pixels in the hyperspectral image converted into a grayscale image, and the numerical values ​​are normalized; Wherein, a pixel in the hyperspectral image is assumed to be V The spectral values ​​are expressed as , after being converted into the grayscale image, the pixel is represented by a value S, and the expression is: , ; In the formula, is the pixel value, V is the number of spectral values, is the wavelength, is the weight value corresponding to the pixel, m and n are the length and width of the hyperspectral image, The wavelength Down The gray value of the pixel at position, is the position coordinate of the corresponding pixel point in the hyperspectral image, The wavelength Down The average gray value of 9 adjacent pixels at the position; The expression of the normalization process is: ; In the formula, is the maximum value of the pixel value S in the hyperspectral image; The method further comprises: performing aerial survey over the area to be monitored by using a flying device equipped with a hyperspectral imaging device to obtain a hyperspectral image of the area to be monitored, and preprocessing the hyperspectral image to meet the model training requirements; Performing size standardization processing on the hyperspectral image, and based on a grayscale image of the hyperspectral image, characterizing the hyperspectral image through an array of corresponding dimensions to obtain an image array of the hyperspectral image; and The hyperspectral image is randomly cropped, and the cropped hyperspectral image is randomly rotated to obtain a plurality of sub-hyperspectral images, and the plurality of sub-hyperspectral images are added to the training data set of the support vector machine model; The extracting the texture features of the hyperspectral image by using a Gabor filter, and extracting the gradient features of the hyperspectral image based on edge information in the hyperspectral image to obtain a texture feature vector and a gradient feature vector of the hyperspectral image, includes: Obtaining a defined Gabor function to calculate each GM array in the hyperspectral image by using the defined Gabor function, and performing convolution calculation on the GM array and the image array IM to obtain a plurality of convolution results, wherein the convolution results are texture feature arrays in the hyperspectral image; Summing up the absolute values ​​of all elements in the plurality of texture feature arrays to obtain a plurality of absolute value sum values, and combining the plurality of absolute value sum values ​​into a vector to obtain the texture feature vector; The Gabor function is defined as: ; Where x and y are the position coordinates of the corresponding pixel points in the hyperspectral image. is the Gabor function of the pixel at the defined (x, y) position, are the wavelength, phase shift, standard deviation, and aspect ratio of the pixel at position (x, y); The method of extracting the texture features of the hyperspectral image by using a Gabor filter and extracting the gradient features of the hyperspectral image based on edge information in the hyperspectral image to obtain a texture feature vector and a gradient feature vector of the hyperspectral image also includes: Acquire edge information of the hyperspectral image, and calculate a gradient array DM of the image array IM, wherein the gradient array DM is obtained by subtracting adjacent elements of the image array IM and taking absolute values; All elements in the gradient array DM are traversed, and based on the size comparison result between each element and a set threshold, the gradient array DM is subjected to binary processing to obtain an edge array SM of the hyperspectral image.

2. The monitoring method for identifying the distribution of dominant species in alpine grasslands based on hyperspectral imaging technology according to claim 1 is characterized in that: The method of extracting the texture features of the hyperspectral image by using a Gabor filter and extracting the gradient features of the hyperspectral image based on edge information in the hyperspectral image to obtain a texture feature vector and a gradient feature vector of the hyperspectral image also includes: Obtain a defined gradient function based on the edge array SM, and obtain a gradient function according to the gradient function y=x The EM array corresponding to the time, the gradient function includes a straight line function and a circular function; A window sliding convolution is performed on the edge array SM through the EM array to obtain a convolution result array CM, and the absolute values ​​of all elements in the convolution result array CM are summed to form a vector with the results of summing the absolute values ​​of all elements in the convolution result array CM to obtain the gradient feature vector.

3. The monitoring method for identifying the distribution of dominant species in alpine grasslands based on hyperspectral imaging technology according to claim 2 is characterized in that: The texture feature vector and the gradient feature vector are concatenated to obtain the feature vector of the hyperspectral image, and a training data set and a test data set of a support vector machine model are constructed based on a plurality of the feature vectors, and the support vector machine model is trained to obtain a classification model, including: Import the training data set and the test data set into the sklearn related library, initialize the support vector machine model, and use a linear function as the kernel function of the support vector machine model; The support vector machine model is trained by using the feature vector of the hyperspectral image in the training data set as the input of the support vector machine model and using the category of the object corresponding to the feature vector as the output of the support vector machine model; and The trained support vector machine model is tested based on the feature vectors of the hyperspectral images in the test data set and the categories of objects corresponding to the feature vectors to improve the prediction accuracy of the trained support vector machine model and obtain the classification model.

4. A monitoring device for identifying the distribution of dominant species in alpine grasslands based on hyperspectral imaging technology, used to execute the method described in any one of claims 1 to 3, characterized in that: The device comprises: A monitoring area selection module is used to select a to-be-monitored area within the monitoring area of ​​the alpine grassland, and determine typical dominant plant species within the to-be-monitored area based on the typical dominant species already in the database; An image preprocessing module is used to obtain a hyperspectral image of the area to be monitored by carrying a hyperspectral imaging device on a flying device to perform aerial survey over the area to be monitored, and to preprocess the hyperspectral image to meet the model training requirements; A feature extraction module, used to extract texture features of the hyperspectral image through a Gabor filter, and extract gradient features of the hyperspectral image based on edge information in the hyperspectral image, so as to obtain a texture feature vector and a gradient feature vector of the hyperspectral image; A model training module, used for concatenating the texture feature vector and the gradient feature vector to obtain the feature vector of the hyperspectral image, and constructing a training data set and a test data set of a support vector machine model based on a plurality of the feature vectors, training the support vector machine model, and obtaining a classification model; A real-time monitoring module, used to obtain a current hyperspectral image, and use the current hyperspectral image as an input of the classification model, so as to call the classification model to monitor the current hyperspectral image, and output the category to which the monitoring object in the current hyperspectral image belongs; The dimension of the feature vector corresponding to each of the hyperspectral images is the sum of the dimensions of the texture feature vector and the gradient feature vector of the hyperspectral image.

5. A terminal comprising a processor and a storage medium; characterized in that: The storage medium is used to store instructions; The processor is configured to operate according to the instructions to execute the steps of the method according to any one of claims 1-3.

6. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method according to any one of claims 1 to 3 are implemented.

Citation Information

Patent Citations

  • Hyperspectral remote sensing image classification method and system based on multi-saliency feature fusion

    CN112990316A

  • Hyperspectral remote sensing image classification method and device, equipment and storage medium

    CN115761354A