WO2022267388A1 - 红树林高光谱图像分类方法、装置、电子设备及存储介质 - Google Patents

红树林高光谱图像分类方法、装置、电子设备及存储介质 Download PDF

Info

Publication number
WO2022267388A1
WO2022267388A1 PCT/CN2021/138814 CN2021138814W WO2022267388A1 WO 2022267388 A1 WO2022267388 A1 WO 2022267388A1 CN 2021138814 W CN2021138814 W CN 2021138814W WO 2022267388 A1 WO2022267388 A1 WO 2022267388A1
Authority
WO
WIPO (PCT)
Prior art keywords
dimensional
feature
gradient histogram
hyperspectral
mangrove
Prior art date
Application number
PCT/CN2021/138814
Other languages
English (en)
French (fr)
Inventor
李岩山
唐浩劲
刘学镇
林华明
谢维信
Original Assignee
深圳大学
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳大学 filed Critical 深圳大学
Publication of WO2022267388A1 publication Critical patent/WO2022267388A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Definitions

  • the present invention relates to the technical field of image processing, in particular to a mangrove hyperspectral image classification method, device, electronic equipment and storage medium.
  • hyperspectral images can detect the spectral information of hundreds of continuous bands in the target area from ultraviolet, visible light to near-infrared and mid-infrared regions, and successfully combine imaging technology and spectral technology in Together, a unique three-dimensional hyperspectral image cube data structure containing the spatial structure and spectral information of the target area is formed in units of pixels.
  • Hyperspectral imagery has become an important data source for mangrove monitoring because it can provide spatial information and spectral information of ground objects.
  • the current monitoring of mangrove vegetation using hyperspectral images is mainly achieved by two sub-networks sharing weights to measure the similarity between two inputs.
  • this method only simply extracts the spatial spectral features in a single dimension in the hyperspectral pixels, and does not fully consider the similar characteristics of spectral information in the mangrove hyperspectral pixels and the spatial spectral features in the spatial dimension, resulting in the extraction of The spatial spectral features of the model are not accurate, making the final classification accuracy rate low.
  • the main purpose of the present invention is to solve the technical problem of low classification accuracy of hyperspectral images of mangroves in the prior art.
  • the first aspect of the present invention provides a kind of mangrove hyperspectral image classification method, and described mangrove hyperspectral image classification method comprises:
  • the hyperspectral images are classified according to the similarity of the spatial spectral features.
  • the constructing the corresponding three-dimensional local cube neighborhood according to the hyperspectral pixel includes:
  • a three-dimensional local cube neighborhood of the hyperspectral pixel is constructed.
  • the use of the 3D gradient histogram feature algorithm to extract the feature descriptors in the 3D local cube neighborhood to obtain the local spatial spectral features includes:
  • the size of the block in the gradient histogram corresponding to the plane and the size of the histogram are set;
  • the gradient histogram feature descriptor of each plane is determined.
  • connection according to the gradient histogram feature descriptors of each pixel extracted from the three planes to obtain the local spatial spectral feature includes:
  • All the gradient histogram feature descriptors in the three planes are classified according to the same pixel, and the gradient histogram feature descriptors of the same pixel of the classification number are connected to obtain the three-dimensional gradient histogram feature of each pixel ;
  • a local spatial spectral feature of the hyperspectral pixel is generated.
  • the sample data pair is constructed based on the three-dimensional gradient histogram feature sequence, and the sample data pair is input into the spatial spectral twin network for similar Degree calculation, the obtained spatial spectral feature similarity includes:
  • each three-dimensional gradient histogram feature in the three-dimensional gradient histogram feature sequence with preset similar reference samples and heterogeneous reference samples to generate at least one sample data pair, wherein each sample data pair includes a positive sample and a counter sample;
  • the spatial spectral twin network includes a one-dimensional convolutional layer and a contrastive loss function layer, and the positive samples and negative samples are simultaneously input to the spatial
  • the similarity between the positive sample and the negative sample is calculated in the spectral twin network, and the spatial spectral feature similarity is obtained including:
  • the feature vector is input to the contrast loss function layer for distance calculation, and the Euclidean distance value of each three-dimensional gradient histogram feature is obtained;
  • the spatial spectral feature similarity is calculated according to the Euclidean distance value of each 3D gradient histogram feature.
  • the second aspect of the present invention provides a kind of mangrove hyperspectral image classification device, and described mangrove hyperspectral image classification device comprises:
  • the first extraction module is used to obtain the hyperspectral image of the mangrove vegetation, and extract the hyperspectral pixel of the region to be identified in the hyperspectral image;
  • a neighborhood construction module configured to construct a corresponding three-dimensional local cube neighborhood according to the hyperspectral pixel
  • the second extraction module is configured to use a three-dimensional gradient histogram feature algorithm to extract feature descriptors in the neighborhood of the three-dimensional local cube to obtain local spatial spectral features, wherein the local feature is composed of at least one three-dimensional gradient histogram feature The three-dimensional gradient histogram feature sequence;
  • a similarity calculation module is used to construct a sample data pair based on the three-dimensional gradient histogram feature sequence, and input the sample data pair into the space-spectrum twin network to calculate the similarity to obtain the space-spectrum feature similarity;
  • a classification module configured to classify the hyperspectral images according to the similarity of the spatial spectral features.
  • the neighborhood construction module includes:
  • a calculation unit configured to calculate the spatial domain information and spectral domain information of the hyperspectral pixel
  • a determining unit configured to determine the band size of the hyperspectral pixel according to the spatial domain information and spectral domain information
  • the construction unit is configured to construct a three-dimensional local cube neighborhood of the hyperspectral pixel according to the size of the band.
  • the second extraction module includes:
  • a plane extraction unit configured to extract the three-dimensional plane information of the neighborhood of the three-dimensional local cube
  • the descriptor extraction unit is used to extract the gradient histogram feature descriptor of each pixel point of the three planes in the three-dimensional plane information by using the three-dimensional gradient histogram feature algorithm;
  • the connecting unit is configured to connect according to the gradient histogram feature descriptors of the pixels extracted from the three planes to obtain local spatial spectral features.
  • the descriptor extraction unit is specifically configured to:
  • the size of the block in the gradient histogram corresponding to the plane and the size of the histogram are set;
  • the gradient histogram feature descriptor of each plane is determined.
  • connection unit is specifically used for:
  • All the gradient histogram feature descriptors in the three planes are classified according to the same pixel, and the gradient histogram feature descriptors of the same pixel of the classification number are connected to obtain the three-dimensional gradient histogram feature of each pixel ;
  • a local spatial spectral feature of the hyperspectral pixel is generated.
  • the similarity calculation module includes:
  • a sample generation unit configured to combine each of the three-dimensional gradient histogram features in the three-dimensional gradient histogram feature sequence with preset similar reference samples and heterogeneous reference samples to generate at least one sample data pair, wherein each sample The data pair includes a positive sample and a negative sample;
  • the similarity calculation unit is used to simultaneously input the positive sample and the negative sample into the spatial spectral twin network to calculate the similarity between the positive sample and the negative sample, and obtain the spatial spectral feature similarity.
  • the spatial-spectral twinning network includes a one-dimensional convolutional layer and a contrastive loss function layer, and the similarity calculation unit is specifically used for:
  • the feature vector is input to the contrast loss function layer for distance calculation, and the Euclidean distance value of each three-dimensional gradient histogram feature is obtained;
  • the spatial spectral feature similarity is calculated according to the Euclidean distance value of each 3D gradient histogram feature.
  • the third aspect of the present invention provides an electronic device, including: a memory, a processor, and a computer program stored in the memory and operable on the processor, wherein the processor executes the computer
  • the program implements each step in the mangrove hyperspectral image classification method provided in the first aspect above.
  • a fourth aspect of the present invention provides a computer-readable storage medium, the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it realizes the mangrove hyperspectral image classification provided by the above-mentioned first aspect steps in the method.
  • the local spatial spectral feature is a three-dimensional gradient histogram feature sequence, construct a sample data pair according to the three-dimensional gradient histogram feature sequence, and input the sample data pair to the spatial spectral twin network
  • the calculation of similarity is carried out to obtain the similarity of spatial spectral features, and the hyperspectral images are classified based on the similarity of spatial spectral features.
  • the above-mentioned three-dimensional gradient histogram feature extraction is performed on the three-dimensional local cube neighborhood of the pixel of the hyperspectral image of the mangrove vegetation, and then the extracted features are input into the spatial spectral twin network to calculate the similarity, through the spatial spectral twin network
  • the spatial spectral information in the hyperspectral image can be accurately identified, so as to achieve accurate classification and improve the accuracy of hyperspectral image classification based on spatial spectral features.
  • 1 is a schematic diagram of extracting three-dimensional gradient histogram features in an embodiment of the present invention
  • Fig. 2 is a structural diagram of a space-spectrum twin network in an embodiment of the present invention.
  • Fig. 3 is the schematic diagram of the first embodiment of the mangrove hyperspectral image classification method in the present invention.
  • Fig. 4 is the second embodiment schematic diagram of mangrove hyperspectral image classification method in the present invention.
  • Fig. 5 is a schematic diagram of an embodiment of a mangrove hyperspectral image classification device in the present invention.
  • Fig. 6 is another embodiment schematic diagram of mangrove hyperspectral image classification device in the present invention.
  • Fig. 7 is a schematic diagram of an embodiment of the electronic device in the present invention.
  • the embodiment of the present invention provides a method for classifying mangrove hyperspectral images based on a new spatial spectral twin network. Specifically, by introducing an improved 3D-HOG feature description algorithm, the spatial classification of mangrove hyperspectral images is realized. The extraction of spectral features, and a 1D-CNN-based spatial-spectral twin network architecture is proposed, which effectively realizes the analysis of the similarity between the spatial spectral features of mangrove vegetation. The similarity analysis is specifically using the distance measure Finally, effective classification is achieved, thereby effectively improving the classification accuracy of hyperspectral images.
  • the mangrove hyperspectral image is f(x, y, z), wherein, x and y represent the spatial coordinates of the mangrove hyperspectral image, and z represents the zth band of the mangrove hyperspectral image, visible , the hyperspectral pixel with the band number ⁇ is f(x,y, ⁇ ), where ⁇ represents the band number of the mangrove hyperspectral image.
  • the first embodiment of the mangrove hyperspectral image classification method in the embodiment of the present invention includes:
  • the hyperspectral image is specifically obtained by shooting the mangrove vegetation with the hyperspectral imager. Since the hyperspectral imager has imaging intervals when shooting, the hyperspectral image can be understood as imaging taken at multiple intervals. For the synthesized image, when extracting hyperspectral pixels, it is specifically extracted one by one based on the interval during imaging. Since the image correlation between adjacent bands during imaging is high, the hyperspectral image obtained after extraction Cell also includes sorting the hyperspectral pixels to obtain a sequence of hyperspectral pixels.
  • the three-dimensional local cube neighborhood when constructing the three-dimensional local cube neighborhood, it is constructed based on the spatial domain information and spectral domain information in the hyperspectral pixel of the mangrove, specifically, first calculate the spatial domain information and spectral domain information of the hyperspectral pixel domain information; then determine the band size of the hyperspectral pixel according to the spatial domain information and spectral domain information; finally, construct the three-dimensional local cube neighborhood of the hyperspectral pixel according to the band size.
  • each pixel is constructed into a For the corresponding three-dimensional local cube neighborhood, optionally, after the pixel points are extracted, they are classified and sorted according to the planes according to the coordinate information of the pixel points, so as to form the corresponding three-dimensional local cube neighborhood.
  • the local feature can be understood as a three-dimensional gradient histogram feature sequence composed of at least one three-dimensional gradient histogram feature, using the three-dimensional gradient histogram feature algorithm (3D-HOG algorithm) to analyze the three-dimensional local cube neighborhood from three extract the descriptors in each direction dimension, and then connect the extracted descriptors in each direction dimension to obtain the local spatial spectral features.
  • 3D-HOG algorithm three-dimensional gradient histogram feature algorithm
  • a hyperspectral pixel is composed of multiple three-dimensional pixels.
  • the spatial spectral feature of each pixel it is realized by extracting the spatial spectral feature of a single plane. After extracting each plane, the spatial spectral features of the pixels are obtained.
  • the gradient histogram feature extraction of the xy plane I xy is specifically calculated by calculating the gradient size and Direction, and set the corresponding cell unit size, block size and histogram size, the gradient histogram feature HOG xy of the plane can be finally obtained, similarly, the gradient histogram feature HOG xz of the xz plane and yz plane can be calculated and HOG yz .
  • 3DHOG ⁇ HOG xy , HOG xz , HOG yz ⁇ 1 , ⁇ HOG xy , HOG xz , HOG yz ⁇ 1+S , ..., ⁇ HOG xy , HOG xz , HOG yz ⁇ ⁇ -S , ⁇ HOG xy , HOG xz , HOG yz ⁇ ⁇ ⁇ .
  • the spatial-spectral twinning network is a twinning network architecture based on one-dimensional convolution 1D-CNN, which can simultaneously receive the input of two different samples, and measure the similarity of sample features to Classify the samples.
  • the Siamese network architecture is pre-trained using small samples of mangrove hyperspectral images.
  • the corresponding contrastive loss (Contrastive Loss) is calculated by constructing different positive and negative sample pairs, so that Effective network parameters are learned.
  • the similarity of sample positions it is realized by introducing a distance calculation framework in the network, specifically by calculating the Euclidean distance between features.
  • the network includes a Conv1D layer, a Spatial_Dropout1D layer, a MaxPooling1D layer, a Flatten layer, and a Dens layer, where Conv1D is a one-dimensional convolutional layer, and Spatial_Dropout1D belongs to Dropout Layer, mainly used to prevent overfitting, MaxPooling1D is the maximum pooling layer, Flatten is the flattening layer, Dense is the fully connected layer, and the extracted 3D-HOG features of the hyperspectral pixels are input into the network, through The network calculates the similarity to obtain the similarity between features, that is, the similarity of the spatial spectrum feature.
  • the similarity of the spatial spectral features is the spatial distance measure, specifically the Euclidean distance.
  • the retrieval and matching of images is realized by calculating the Euclidean distance between features, so that To realize the classification of hyperspectral images, in addition to the Euclidean distance, it can also be the equidistance measure of Mahalanobis distance, and realize the classification of hyperspectral images based on the calculated distance.
  • the three gradient histogram features are input into the one-dimensional convolutional Siamese network to calculate the similarity, so as to obtain a more effective representation
  • the spatial spectral feature of the pixel based on the 3D-HOG feature, describes the local information of the spatial domain and the spectral domain of the mangrove highlight image, so as to realize the joint extraction of the spatial spectral domain information of the mangrove hyperspectral image, and improve the spatial spectral feature.
  • the extraction accuracy of the hyperspectral image is calculated, and finally the similarity of the extracted features is calculated to classify the hyperspectral image, thus greatly improving the actual accuracy of the hyperspectral image classification.
  • the second embodiment of mangrove hyperspectral image classification method in the embodiment of the present invention comprises:
  • the mangrove hyperspectral image as f(x, y, ⁇ )
  • x and y represent the spatial coordinates of the mangrove hyperspectral image
  • z represent the zth band of the mangrove hyperspectral image.
  • the pixel of the mangrove hyperspectral image be f(x, y, ⁇ ), where ⁇ represents the number of bands of the mangrove hyperspectral image.
  • a local spatial spectral neighborhood with a size of n 1 *n 2 *n 3 at the kth band can be constructed, and the neighborhood
  • the three planes are xy plane I xy , xz plane I xz and yz plane I yz .
  • G xy1 (x,y,z) H(x,y+1,k)-H(x,y-1,k) ,
  • H(x,y,k) represents the pixel value of the pixel point (x,y,k)
  • G xy1 (x,y,k) represents the y-axis of the pixel point (x,y,k) in the plane I xy
  • the direction gradient, G xy2 (x, y, k) represents the x-axis direction gradient of the pixel point (x, y, k) in the plane I xy
  • G xy (x, y, k) and ⁇ xy (x, y, k) are the gradient magnitude and direction of each pixel point (x, y, k) in the I xy plane, respectively.
  • the construction of the neighbors of the xz plane I xz and the yz plane I yz is the same as the construction method of the xy plane I xy , and will not be repeated here.
  • the neighbors of the three planes After completing the neighborhood construction of the three planes, the neighbors of the three planes The domains are merged to obtain the 3D local cube neighborhood corresponding to the hyperspectral pixel.
  • the three-dimensional plane information specifically refers to the plane where the coordinate axis of the three-dimensional coordinate system is located as the plane adjacent to the three-dimensional local cube, that is, the x-y plane, x-z plane, and y-z plane.
  • the three-dimensional gradient histogram feature algorithm refers to an improved algorithm based on the traditional gradient histogram feature algorithm that can simultaneously extract gradient histogram features in three dimensions and connect them to form a spatial spectral feature
  • 3D-HOG features are used to describe the local information of the spatial domain and the spectral domain of the mangrove high light image, so as to realize the joint extraction of the spatial spectral domain information of the mangrove hyperspectral image.
  • the size of the block in the gradient histogram corresponding to the plane and the size of the histogram are set;
  • the gradient histogram feature descriptor of each plane is determined.
  • the gradient histogram feature HOG xz of this plane can be finally obtained.
  • it can be calculated Get the gradient histogram features HOG xz and HOG yz of the xz plane and yz plane.
  • a local spatial spectral feature of the hyperspectral pixel is generated.
  • the gradient histogram feature descriptor obtained in each plane is processed by the flattening layer and the fully connected layer in the spatial spectral twin network, and the output is a feature vector with a dimension of 128.
  • the feature vector is input to the comparison loss function layer to calculate the distance measure, and the corresponding similarity is predicted based on the calculated distance measure.
  • each sample data pair includes a positive sample and a negative sample
  • the spatial-spectral twinning network includes a one-dimensional convolutional layer and a contrastive loss function layer, and this step is specifically implemented as:
  • the feature vector is input to the contrast loss function layer for distance calculation, and the Euclidean distance value of each three-dimensional gradient histogram feature is obtained;
  • the spatial spectral feature similarity is calculated according to the Euclidean distance value of each 3D gradient histogram feature.
  • the contrastive loss function in this spatial-spectral Siamese network can be expressed as follows:
  • margin represents the preset threshold
  • d represents the similarity measure of the sample pair [ xi ,x j ] features, which can be expressed as follows:
  • this step when classifying mangrove vegetation according to the similarity of spatial spectral features, first obtain the data value of the reference sample of each category, and then form a sample pair with the sample to be tested and input it to the trained spatial spectral twin network Predict the spatial distance in , set a set of predicted distance values between the sample to be tested and all benchmark samples as ⁇ d 1 , d 2 ,..., d N ⁇ , by calculating min ⁇ d 1 , d 2 ,..., d N ⁇ To select a group with the smallest distance value as the optimal group, and the category of the benchmark sample in the optimal group will also be designated as the category of the sample to be tested.
  • the three-dimensional gradient histogram feature is extracted from the three-dimensional local cube neighborhood of the hyperspectral image of the mangrove vegetation, and then the extracted feature is input into the spatial spectral twin network to calculate the similarity
  • the spatial spectral twinning network can accurately identify the spatial spectral information in hyperspectral images, and the spatial spectral twinning network based on 3D-HOG features has achieved the highest classification accuracy, thereby improving the classification accuracy of hyperspectral images.
  • the mangrove hyperspectral image classification method in the embodiment of the present invention is described above, and the mangrove hyperspectral image classification device in the embodiment of the present invention is described below. Please refer to FIG. 5, the mangrove hyperspectral image classification device in the embodiment of the present invention One embodiment includes:
  • the first extraction module 501 is used to obtain the hyperspectral image of the mangrove vegetation, and extract the hyperspectral pixel of the region to be identified in the hyperspectral image;
  • a neighborhood construction module 502 configured to construct a corresponding three-dimensional local cube neighborhood according to the hyperspectral pixel
  • the second extraction module 503 is configured to use a three-dimensional gradient histogram feature algorithm to extract feature descriptors in the three-dimensional local cube neighborhood to obtain local spatial spectral features, wherein the local feature is composed of at least one three-dimensional gradient histogram feature
  • the three-dimensional gradient histogram feature sequence composed of;
  • a similarity calculation module 504 configured to construct a sample data pair based on the three-dimensional gradient histogram feature sequence, and input the sample data pair into the space-spectrum twin network to calculate the similarity to obtain the space-spectrum feature similarity;
  • a classification module 505 configured to classify the hyperspectral images according to the similarity of the spatial spectral features.
  • the device provided in this embodiment proposes a space-spectrum twin network structure based on one-dimensional convolution (1D-CNN) on the basis of the above-mentioned 3D-HOG feature vector, which is used to realize the space-spectrum feature of mangrove hyperspectral images Classification.
  • 1D-CNN one-dimensional convolution
  • 3D-HOG feature vector 3D-HOG feature vector
  • Fig. 6 is a detailed schematic diagram of each module of the mangrove hyperspectral image classification device, and the neighborhood construction module 502 includes:
  • a calculation unit 5021 configured to calculate the spatial domain information and spectral domain information of the hyperspectral pixel
  • a determining unit 5022 configured to determine the band size of the hyperspectral pixel according to the spatial domain information and spectral domain information
  • the construction unit 5023 is configured to construct a three-dimensional local cube neighborhood of the hyperspectral pixel according to the size of the waveband.
  • the second extraction module 503 includes:
  • a plane extraction unit 5031 configured to extract the three-dimensional plane information of the three-dimensional local cube neighborhood
  • the descriptor extraction unit 5032 is configured to use a three-dimensional gradient histogram feature algorithm to extract the gradient histogram feature descriptor of each pixel point of the three planes in the three-dimensional plane information;
  • connection unit 5033 is configured to perform connection according to the gradient histogram feature descriptors of each pixel extracted from the three planes to obtain local spatial spectral features.
  • the descriptor extraction unit 5032 is specifically used for:
  • the size of the block in the gradient histogram corresponding to the plane and the size of the histogram are set;
  • the gradient histogram feature descriptor of each plane is determined.
  • connection unit 5033 is specifically used for:
  • All the gradient histogram feature descriptors in the three planes are classified according to the same pixel, and the gradient histogram feature descriptors of the same pixel of the classification number are connected to obtain the three-dimensional gradient histogram feature of each pixel ;
  • a local spatial spectral feature of the hyperspectral pixel is generated.
  • the similarity calculation module 504 includes:
  • the sample generating unit 5041 is configured to combine each three-dimensional gradient histogram feature in the three-dimensional gradient histogram feature sequence with preset similar reference samples and heterogeneous reference samples to generate at least one sample data pair, where each The sample data pair includes a positive sample and a negative sample;
  • the similarity calculation unit 5042 is configured to simultaneously input the positive sample and the negative sample into the space-spectral twin network to calculate the similarity between the positive sample and the negative sample, and obtain the similarity of the spatial-spectrum feature.
  • the spatial-spectral twinning network includes a one-dimensional convolutional layer and a contrastive loss function layer, and the similarity calculation unit 5042 is specifically used for:
  • the feature vector is input to the contrast loss function layer for distance calculation, and the Euclidean distance value of each three-dimensional gradient histogram feature is obtained;
  • the spatial spectral feature similarity is calculated according to the Euclidean distance value of each 3D gradient histogram feature.
  • the local spatial spectral feature is obtained.
  • the local spatial spectral feature is a three-dimensional gradient histogram feature sequence, and the sample data pair is constructed according to the three-dimensional gradient histogram feature sequence, and the sample data pair is input into the spatial spectral twin network. Calculate the similarity to obtain the similarity of the spatial spectral features, and classify the hyperspectral images based on the similarity of the spatial spectral features.
  • the above-mentioned three-dimensional gradient histogram feature extraction is performed on the three-dimensional local cube neighborhood of the pixel of the hyperspectral image of the mangrove vegetation, and then the extracted features are input into the spatial spectral twin network to calculate the similarity, through the spatial spectral twin network
  • the spatial spectral information in the hyperspectral image can be accurately identified, so as to achieve accurate classification and improve the accuracy of hyperspectral image classification based on spatial spectral features.
  • the electronic device 700 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPU) 710 (such as , one or more processors) and memory 720, one or more storage media 730 (such as one or more mass storage devices) for storing application programs 733 or data 732.
  • CPU central processing units
  • storage media 730 such as one or more mass storage devices
  • the memory 720 and the storage medium 730 may be temporary storage or persistent storage.
  • the program stored in the storage medium 730 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the electronic device 700 .
  • the processor 710 may be configured to communicate with the storage medium 730 , and execute a series of instruction operations in the storage medium 730 on the electronic device 700 .
  • the application program 733 can be divided into the functions of the first extraction module 501, the neighborhood construction module 502, the second extraction module 503, the similarity calculation module 504 and the classification module 505 (modules in the virtual device).
  • the electronic device 700 may also include one or more power supplies 740, one or more wired or wireless network interfaces 750, one or more input and output interfaces 760, and/or, one or more operating systems 731, such as: Windows Serve, MacOSX, Unix, Linux, FreeBSD, etc.
  • Windows Serve Windows Serve
  • MacOSX Unix
  • Linux FreeBSD
  • FIG. 7 may also include more or fewer components than shown in the illustration, or combine some components, or arrange different components.
  • the embodiment of the present invention also provides a computer-readable storage medium, the computer-readable storage medium may be a non-volatile computer-readable storage medium, and the computer-readable storage medium may also be a volatile computer-readable storage medium Instructions or computer programs are stored in the computer-readable storage medium, and when the instructions or computer programs are executed, the computer is made to execute each step of the mangrove hyperspectral image classification method provided in the above embodiment.
  • the integrated unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a computer-readable storage medium.
  • the computer software product is stored in a storage medium , including several instructions to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the method described in each embodiment of the present invention.
  • the aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (read-only memory, ROM), random access memory (random access memory, RAM), magnetic disk or optical disk, and other various media that can store program codes.

Landscapes

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

Abstract

一种红树林高光谱图像分类方法、装置、电子设备及存储介质,通过对红树林植被的高光谱图像的像元的三维局部立方体邻域进行三维梯度直方图特征的提取,然后将提取到的特征输入至空谱孪生网络中计算相似度,通过空谱孪生网络可以准确地对高光谱图像中的空谱信息进行识别,从而实现精准的分类,提升了基于空谱特征对高光谱图像进行分类的准确率。

Description

红树林高光谱图像分类方法、装置、电子设备及存储介质 技术领域
本发明涉及图像处理技术领域,尤其涉及一种红树林高光谱图像分类方法、装置、电子设备及存储介质。
背景技术
高光谱图像借助于其可达纳米级别的分辨率,可以检测出目标区域从紫外、可见光到近红外和中红外区域的数百个连续波段的光谱信息,并且将成像技术与光谱技术成功结合在了一起,从而形成了以像素为单位的包含着目标区域空间结构以及光谱信息的独特的三维高光谱图像立方体数据结构。由于能够提供地物的空间信息和光谱信息,高光谱图像目前已经成为红树林监测方面的一项重要数据来源。
然而,目前使用高光谱图像对红树林植被进行监控主要由两个权值共享的子网络衡量两个输入间的相似度来实现。但是这种方式仅是简单的提取高光谱像元中单个维度上的空谱特征,并未充分考虑到红树林高光谱像元中光谱信息相似的特性以及空间维度上的空谱特征,导致提取的空谱特征并不准确,使得最后的分类准确率较低。
技术问题
本发明的主要目的在于解决现有技术中对红树林的高光谱图像的分类精准率较低的技术问题。
技术解决方案
本发明第一方面提供了一种红树林高光谱图像分类方法,所述红树林高光谱图像分类方法包括:
获取红树林植被的高光图谱图像,并提取所述高光谱图像中待识别区域的高光谱像元;
根据所述高光谱像元构造对应的三维局部立方体邻域;
利用三维梯度直方图特征算法,提取所述三维局部立方体邻域中的特征描述子,得到局部空谱特征,其中所述局部特征为由至少一个三维梯度直方图特征组成的三维梯度直方图特征序列;
基于所述三维梯度直方图特征序列构建样本数据对,并将所述样本数据对输入至空谱孪生网络中进行相似度的计算,得到空谱特征相似度;
根据所述空谱特征相似度对所述高光谱图像进行分类。
可选的,在本发明第一方面的第一种实现方式中,所述根据所述高光谱像元构造对应的三维局部立方体邻域包括:
计算所述高光谱像元的空域信息和光谱域信息;
根据所述空域信息和光谱域信息确定所述高光谱像元的波段大小;
根据所述波段大小,构造所述高光谱像元的三维局部立方体邻域。
可选的,在本发明第一方面的第二种实现方式中,所述利用三维梯度直方图特征算法,提取所述三维局部立方体邻域中的特征描述子,得到局部空谱特征包括:
提取所述三维局部立方体邻域的三维平面信息;
利用三维梯度直方图特征算法,提取所述三维平面信息中三个平面的每个像素点的梯度直方图特征描述子;
根据从三个平面提取到的各像素点的所述梯度直方图特征描述子进行连接,得到局部空谱特征。
可选的,在本发明第一方面的第三种实现方式中,所述利用三维梯度直方图特征算法,提取所述三维平面信息中三个平面的每个像素点的梯度直方图特征描述子包括:
计算所述三维平面信息中三个平面上的所有像素点的梯度大小和方向;
基于各平面的所述梯度大小和方向,设置平面对应的梯度直方图中块的尺寸和直方图的大小;
根据各平面的所述块的尺寸和直方图的大小,确定各平面的梯度直方图特征描述子。
可选的,在本发明第一方面的第四种实现方式中,所述根据从三个平面提取的各像素点的所述梯度直方图特征描述子进行连接,得到局部空谱特征包括:
将三个平面中的所有梯度直方图特征描述子,按照相同像素点进行分类,并将分类号的同像素点的梯度直方图特征描述子进行连接,得到每个像素点的三维梯度直方图特征;
计算所述高光谱图像中待识别区域的步长,以及各像素点的三维梯度直方图特征之间的相关度;
根据所述步长和所述相关性,生成得到所述高光谱像元的局部空谱特征。
可选的,在本发明第一方面的第五种实现方式中,所述基于所述三维梯度直方图特征序列构建样本数据对,并将所述样本数据对输入至空谱孪生网络中进行相似度的计算,得到空谱特征相似度包括:
将所述三维梯度直方图特征序列中的每个三维梯度直方图特征分别与预设的同类基准样本和异类基准样本进行组合,生成至少一个样本数据对,其中每个样本数据对包括一个正样本和一个反样本;
将所述正样本和反样本同时输入至空谱孪生网络中计算所述正样本和反样本之间的相似度,得到空谱特征相似度。
可选的,在本发明第一方面的第六种实现方式中,所述空谱孪生网络包括一维卷积层和对比损失函数层,所述将所述正样本和反样本同时输入至空谱孪生网络中计算所述正样本和反样本之间的相似度,得到空谱特征相似度包括:
将所述正样本和反样本同时输入至所述一维卷积层中,通过所述一维卷积层对所述正样本和反样本进行卷积计算,得到对应的特征向量;
将所述特征向量输入至所述对比损失函数层进行距离计算,得到各三维梯度直方图特征的欧氏距离值;
根据各三维梯度直方图特征的欧氏距离值计算空谱特征相似度。
本发明第二方面提供了一种红树林高光谱图像分类装置,所述红树林高光谱图像分类装置包括:
第一提取模块,用于获取红树林植被的高光图谱图像,并提取所述高光谱图像中待识别区域的高光谱像元;
邻域构建模块,用于根据所述高光谱像元构造对应的三维局部立方体邻域;
第二提取模块,用于利用三维梯度直方图特征算法,提取所述三维局部立方体邻域中的特征描述子,得到局部空谱特征,其中所述局部特征为由至少一个三维梯度直方图特征组成的三维梯度直方图特征序列;
相似度计算模块,用于基于所述三维梯度直方图特征序列构建样本数据对,并将所述样本数据对输入至空谱孪生网络中进行相似度的计算,得到空谱特征相似度;
分类模块,用于根据所述空谱特征相似度对所述高光谱图像进行分类。
可选的,在本发明第二方面的第一种实现方式中,所述邻域构建模块包括:
计算单元,用于计算所述高光谱像元的空域信息和光谱域信息;
确定单元,用于根据所述空域信息和光谱域信息确定所述高光谱像元的波段大小;
构建单元,用于根据所述波段大小,构造所述高光谱像元的三维局部立方体邻域。
可选的,在本发明第二方面的第二种实现方式中,所述第二提取模块包括:
平面提取单元,用于提取所述三维局部立方体邻域的三维平面信息;
描述子提取单元,用于利用三维梯度直方图特征算法,提取所述三维平面信息中三个平面的每个像素点的梯度直方图特征描述子;
连接单元,用于根据从三个平面提取到的各像素点的所述梯度直方图特征描述子进行连接,得到局部空谱特征。
可选的,在本发明第二方面的第三种实现方式中,所述描述子提取单元具体用于:
计算所述三维平面信息中三个平面上的所有像素点的梯度大小和方向;
基于各平面的所述梯度大小和方向,设置平面对应的梯度直方图中块的尺寸和直方图的大小;
根据各平面的所述块的尺寸和直方图的大小,确定各平面的梯度直方图特征描述子。
可选的,在本发明第二方面的第四种实现方式中,所述连接单元具体用于:
将三个平面中的所有梯度直方图特征描述子,按照相同像素点进行分类,并将分类号的同像素点的梯度直方图特征描述子进行连接,得到每个像素点的三维梯度直方图特征;
计算所述高光谱图像中待识别区域的步长,以及各像素点的三维梯度直方图特征之间的相关度;
根据所述步长和所述相关性,生成得到所述高光谱像元的局部空谱特征。
可选的,在本发明第二方面的第五种实现方式中,所述相似度计算模块包括:
样本生成单元,用于将所述三维梯度直方图特征序列中的每个三维梯度直方图特征分别与预设的同类基准样本和异类基准样本进行组合,生成至少一个样本数据对,其中每个样本数据对包括一个正样本和一个反样本;
相似度计算单元,用于将所述正样本和反样本同时输入至空谱孪生网络中计算所述正样本和反样本之间的相似度,得到空谱特征相似度。
可选的,在本发明第二方面的第六种实现方式中,所述空谱孪生网络包括一维卷积层和对比损失函数层,所述相似度计算单元具体用于:
将所述正样本和反样本同时输入至所述一维卷积层中,通过所述一维卷积层对所述正样本和反样本进行卷积计算,得到对应的特征向量;
将所述特征向量输入至所述对比损失函数层进行距离计算,得到各三维梯度直方图特征的欧氏距离值;
根据各三维梯度直方图特征的欧氏距离值计算空谱特征相似度。
本发明第三方面提供了一种电子设备,包括:存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现上述第一方面提供的红树林高光谱图像分类方法中的各个步骤。
本发明的第四方面提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现上述第一方面提供的红树林高光谱图像分类方法中的各个步骤。
有益效果
本发明的技术方案中,通过提取红树林植被的高光谱图像的高光谱像元,并构造高光谱像元的三维局部立方体邻域,利用三维梯度直方图特征算法提取三维局部立方体邻域中的特征描述子,基于特征描述子得到局部空谱特征,该局部空谱特征是三维梯度直方图特征序列,根据三维梯度直方图特征序列构建样本数据对,并将样本数据对输入至空谱孪生网络中进行相似度的计算,得到空谱特征相似度,基于空谱特征相似度对高光谱图像进行分类。由于上述对红树林植被的高光谱图像的像元的三维局部立方体邻域进行三维梯度直方图特征的提取,然后将提取到的特征输入至空谱孪生网络中计算相似度,通过空谱孪生网络可以准确地对高光谱图像中的空谱信息进行识别,从而实现精准的分类,提升了基于空谱特征对高光谱图像进行分类的准确率。
附图说明
图1为本发明实施例中提取三维梯度直方图特征的示意图;
图2为本发明实施例中空谱孪生网络的结构图;
图3为本发明中红树林高光谱图像分类方法的第一个实施例示意图;
图4为本发明中红树林高光谱图像分类方法的第二个实施例示意图;
图5为本发明中红树林高光谱图像分类装置的一个实施例示意图;
图6为本发明中红树林高光谱图像分类装置的另一个实施例示意图;
图7为本发明中电子设备的一个实施例示意图。
本发明的实施方式
本发明实施例提供了一种基于新的空谱孪生网络对红树林高光谱图像进行分类的方法,具体是通过引入一种改进的3D-HOG特征描述算法,实现了红树林高光谱图像的空谱特征的提取,同时提出了一种基于1D-CNN的空谱孪生网络的架构,有效地实现了对红树林植被的空谱特征之间相似性的分析,相似性的分析具体是采用距离度量的方式计算,最终实现有效分类,从而有效提升高光谱图像的分类准确率。
本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”、“第三”、“第四”等(如果存在)是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的实施例能够以除了在这里图示或描述的内容以外的顺序实施。此外,术语“包括”或“具有”及其任何变形,意图在于覆盖不排他的包含,例如,包含了一系 列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。
在本实施例中,红树林高光谱图像为f(x,y,z),其中,x和y表示红树林高光谱图像的空域坐标,z表示红树林高光谱图像的第z个波段,可见,波段数为λ的高光谱像元为f(x,y,λ),其中λ表示红树林高光谱图像的波段数。
为便于理解,下面对本发明实施例的具体流程进行描述,请参阅图1-3所示,本发明实施例中红树林高光谱图像分类方法的第一个实施例包括:
101、获取红树林植被的高光图谱图像,并提取高光谱图像中待识别区域的高光谱像元;
该步骤中,该高光谱图像具体是通过高光谱成像仪拍摄红树林植被得到,由于高光谱成像仪在拍摄时是存在成像间隔的,而高光谱图像可以理解为是通过多个间隔拍摄的成像合成的图像,对此,在提取高光谱像元时,具体是基于成像时的间隔来逐一提取,由于成像时的相邻波段之间的图像相关性较高,因此,提取后得到的高光谱像元还包括对高光谱像元进行排序,得到高光谱像元的序列。
102、根据高光谱像元构造对应的三维局部立方体邻域;
在该步骤中,在构造三维局部立方体邻域时,是基于红树林的高光谱像元中的空域信息和光谱域信息进行构建,具体的,首先计算所述高光谱像元的空域信息和光谱域信息;然后根据所述空域信息和光谱域信息确定所述高光谱像元的波段大小;最后根据所述波段大小,构造所述高光谱像元的三维局部立方体邻域。
在实际应用中,首先基于红树林的高光谱像元构建三个平面,基于三个平面得到三维坐标,提取高光谱像元中待识别区域的像素点,并结合三维坐标将各像素点构建出对应的三维局部立方体邻域,可选的,在提取到像素点后,根据像素点的坐标信息按照平面进行归类排序,从而组成对应的三维局部立方体邻域。
103、利用三维梯度直方图特征算法,提取三维局部立方体邻域中的特征描述子,得到由至少一个三维梯度直方图特征组成的局部空谱特征;
该步骤中,所述局部特征可以理解为是由至少一个三维梯度直方图特征组成的三维梯度直方图特征序列,利用三维梯度直方图特征算法(3D-HOG算法)对三维局部立方体邻域从三个方向维度进行描述子的提取,然后将各方向维度上提取到的描述子进行连接处理,得到局部空谱特征。在实际应用中,在得到局部空谱特征之前,首先需要将各维度上的描述子进行连接,得到每个维度上三维梯度直方图特征,然后将各维度上的三维梯度直方图特征进行关联和排序,得到局部空谱特征。
在实际应用中,高光谱像元有多各三维的像素点做组成,每个像素点在提取空谱特征时,是以单个平面的空谱特征提取的方式来实现,在提取到每个平面的空谱特征后,将三个不同维度的空谱特征进行连接,得到像素点的空谱特征,例如x-y平面I xy的梯度直方图特征提取具体是通过计算I xy所有像素点的梯度大小和方向,并设置相应的细胞单元大小,块的尺寸和直方图的大小,可最终得到该平面的梯度直方图特征HOG xy,同理,可计算得到x-z平面和y-z平面的 梯度直方图特征HOG xz和HOG yz。则在第k个波段像素点的3D-HOG特征可表示为:3DHOG k={HOG xy,HOG xz,HOG yz} k
由于红树林高光谱图像通常具有上百个波段,各个波段间的相关性较大,为了得到更为精炼的3D-HOG特征描述子,我们将以一定的步长间隔来提取像元的局部空谱特征。设步长为S,则像元f(x,y,λ)的3D-HOG特征描述子的最终表达形式为如下:
3DHOG={{HOG xy,HOG xz,HOG yz} 1,{HOG xy,HOG xz,HOG yz} 1+S,…,{HOG xy,HOG xz,HOG yz} λ-S,{HOG xy,HOG xz,HOG yz} λ}。
104、基于三维梯度直方图特征序列构建样本数据对,并将样本数据对输入至空谱孪生网络中进行相似度的计算,得到空谱特征相似度;
在本实施例中,该空谱孪生网络是基于一维卷积1D-CNN的孪生网络架构,该孪生网络架构可同时接收两个不同样本的输入,并对样本特征的相似度进行度量,以实现对样本的分类。
在实际应用中,该孪生网络架构为预先利用红树林高光谱图像的小样本训练得到,在训练的过程中具体是通过构造不同的正负样本对来计算相应的对比损失(Contrastive Loss),从而学习到有效的网络参数。而在对样本职啊的相似度进行计算时,是通过在网络中引进了距离计算架构来实现,具体是计算特征之间的欧式距离来实现。
在本实施例中,该空谱孪生网络的结构如图2所示,该网络包括Conv1D层、Spatial_Dropout1D层、MaxPooling1D层、Flatten层和Dens层,其中,Conv1D为一维卷积层,Spatial_Dropout1D属于Dropout层,主要用于防止过拟合,MaxPooling1D为最大池化层,Flatten为展平层,Dense则为全连接层,将提取得到的高光谱像元的3D-HOG特征输入到该网络中,通过该网络进行相似度的计算,得到特征之间的相似度,即是空谱特征相似度。
105、根据空谱特征相似度对高光谱图像进行分类。
在该步骤中,该空谱特征相似度即是空间距离度量,具体为欧式距离,在对高光谱图像进行分类时,具体是通过计算特征之间的欧式距离来实现图像的检索和匹配,从而实现对高光谱图像的分类,除了欧式距离之外,还可以是马氏距离等距离度量,基于计算到的距离实现对高光图谱进行分类。
本发明实施例中,在高光谱图像的三维梯度直方图特性的基础上,将三个梯度直方图特征输入至一维卷积的孪生网络中进行相似度的计算,以得到能够更为有效表示像元的空谱特征,基于3D-HOG特征对红树林高光图像的空间域和光谱域的局部信息进行描述,以实现对红树林高光谱图像空谱域信息的联合提取,提高了空谱特征的提取准确度,最后计算提取到的特征的相似度对高光谱图像进行分类,从而大大提升了高光谱图像分类的实际准确率。
请参阅图4,本发明实施例中红树林高光谱图像分类方法的第二个实施例包括:
201、提取红树林植被的高光谱图像中待识别区域的高光谱像元,并基于高光谱像元构造对应的三维局部立方体邻域;
该步骤中,在构造三维局部立方体邻域时,具体通过对高光谱像元中的每个像素点,构造其相应的三维局部立方体邻域,并取其邻域内的三个平面(x-y平面,x-z平面,y-z平面),基于三个平面进行三维局部立方体邻域的构造方法具体如下:
定义红树林高光谱图像为f(x,y,λ),x和y表示红树林高光谱图像的空域坐标,z表示红树林高光谱图像的第z个波段。设红树林高光谱图像的像元为f(x,y,λ),其中λ表示红树林高光谱图像的波段数。为了提取该像元在第k个波段的像素点的局部空谱特征,可构造其在第k个波段处的大小为n 1*n 2*n 3的局部空谱邻域,取其邻域内的三个平面分别为x-y平面I xy,x-z平面I xz和y-z平面I yz
设(x,y,k)为红树林高光谱图像元中第k个像素点,对于x-y平面I xy,其梯度计算公式如下:
G xy1(x,y,z)=H(x,y+1,k)-H(x,y-1,k)
G xy2(x,y,k)=H(x+1,y,k)-H(x-1,y,k)
Figure PCTCN2021138814-appb-000001
Figure PCTCN2021138814-appb-000002
其中H(x,y,k)表示像素点(x,y,k)的像素值,G xy1(x,y,k)表示平面I xy内的像素点(x,y,k)的y轴方向梯度,G xy2(x,y,k)表示平面I xy内的像素点(x,y,k)的x轴方向梯度。G xy(x,y,k)和α xy(x,y,k)分别为I xy平面中每一个像素点(x,y,k)的梯度大小和方向。
同理,x-z平面I xz和y-z平面I yz的邻域构造与x-y平面I xy的构造方式形同,这里不再重复赘述,在完成三个平面的邻域构造后,将三个平面的邻域合并,得到高光谱像元对应的三维局部立方体邻域。
202、提取三维局部立方体邻域的三维平面信息;
该步骤中,该三维平面信息具体指的是以三维坐标系统的坐标轴所在的平面作为三维局部立方体邻域的平面,即是x-y平面,x-z平面,y-z平面。
203、利用三维梯度直方图特征算法,提取三维平面信息中三个平面的每个像素点的梯度直方图特征描述子;
在本实施例中,该三维梯度直方图特征算法指的是基于传统的梯度直方图特征算法提出的一种改进的可以同时提取三个维度上的梯度直方图特征进行连接形成空谱特征的算法,具体是利用3D-HOG特征对红树林高光图像的空间域和光谱域的局部信息进行描述,以实现对红树林高光谱图像空谱域信息的联合提取。
在实际应用中,利用该三维梯度直方图特征算法分别对每个平面进行梯度直方图特征的提取,对于x-y平面I xy的梯度直方图特征提取,首先对x-y平面I xy中的每个像素点进行特征的提取,具体实现过程如下:
计算所述三维平面信息中三个平面上的所有像素点的梯度大小和方向;
基于各平面的所述梯度大小和方向,设置平面对应的梯度直方图中块的尺寸和直方图的大小;
根据各平面的所述块的尺寸和直方图的大小,确定各平面的梯度直方图特征描述子。
即是通过计算I xy所有像素点的梯度大小和方向,并设置相应的细胞单元大小,块的尺寸和直方图的大小,可最终得到该平面的梯度直方图特征HOG xz,同理,可计算得到x-z平面和y-z平面的梯度直方图特征HOG xz和HOG yz
204、根据从三个平面提取到的各像素点的梯度直方图特征描述子进行连接,得到局部空谱特征;
该步骤中,具体是将三个平面中的所有梯度直方图特征描述子,按照相同像素点进行分类,并将分类号的同像素点的梯度直方图特征描述子进行连接,得到每个像素点的三维梯度直方图特征;
计算所述高光谱图像中待识别区域的步长,以及各像素点的三维梯度直方图特征之间的相关度;
根据所述步长和所述相关性,生成得到所述高光谱像元的局部空谱特征。
在实际应用中,各平面中得到的梯度直方图特征描述子通过空谱孪生网络中的展平层和全连接层进行处理后,输出是维度为128的特征向量。将该特征向量输入到对比损失函数层进行距离度量的计算,并基于计算到的距离度量预测出对应的相似度。
205、将三维梯度直方图特征序列中的每个三维梯度直方图特征分别与预设的同类基准样本和异类基准样本进行组合,生成至少一个样本数据对;
该步骤中,每个样本数据对包括一个正样本和一个反样本;
具体的,设
Figure PCTCN2021138814-appb-000003
为输入到空谱孪生网络的一个样本数据对。在构造正数据对时,取普通样本数据与同类的基准样本构成正样本对,构造反数据对时,取普通样本数据与异类的基准样本构成反样本对,与此同时还需要输入该样本对的 相应的类别标签。设带有类别标签的3D-HOG特征向量集表示为
Figure PCTCN2021138814-appb-000004
则与x i相对应的类别标签为y i∈1,2,...,N,其中N为样本类别的个数。设S ij为样本对
Figure PCTCN2021138814-appb-000005
的标签,则其有以下表达式:
Figure PCTCN2021138814-appb-000006
因此,样本对中的样本来自于同一个类别,则设定该标签为1,相反的,如果样本对中的样本来自于同一个类别,设定该标签为0。
206、将样本数据对中的正样本和反样本同时输入至空谱孪生网络中计算正样本和反样本之间的相似度,得到空谱特征相似度。
在本实施例中,所述空谱孪生网络包括一维卷积层和对比损失函数层,该步骤具体实现为:
将所述正样本和反样本同时输入至所述一维卷积层中,通过所述一维卷积层对所述正样本和反样本进行卷积计算,得到对应的特征向量;
将所述特征向量输入至所述对比损失函数层进行距离计算,得到各三维梯度直方图特征的欧氏距离值;
根据各三维梯度直方图特征的欧氏距离值计算空谱特征相似度。
在实际应用中,该空谱孪生网络中的对比损失函数可表示为如下:
Figure PCTCN2021138814-appb-000007
其中margin表示预设的阈值,d表示样本对[x i,x j]特征的相似性度量,可表示为如下:
Figure PCTCN2021138814-appb-000008
最终可以看出,当两样本来自于同一类别时,得出的损失值L会依据d的增大而相应变大,而在两样本来自于不同类别时,得出的损失值L会依据d的减小而相应变大。
207、根据空谱特征相似度对所述高光谱图像进行分类。
该步骤中,在根据空谱特征相似度对红树林植被进行分类时,首先获取每个类别的基准样本的数据值,然后分别与待测样本构成样本对输入到已经训练好的空谱孪生网络中进行空间距离的预测,设待测样本与所有基准样本的一组预测距离值为{d 1,d 2,…,d N},通过计算min{d 1,d 2,…,d N}来选取距离值最小的一组判定为最优组,而最优组中的基准样本的类别也将被指定为待测样本的类别。
本发明实施例中,通过对红树林植被的高光谱图像的像元的三维局部立方体邻域进行三维梯度直方图特征的提取,然后将提取到的特征输入至空谱孪生网络中计算相似度,通过空谱孪生网络可以准确地对高光谱图像中的空谱信息进行识 别,基于3D-HOG特征的空谱孪生网络取得了最高的分类精度,从而提升了对高光谱图像分类准确率。
上面对本发明实施例中红树林高光谱图像分类方法进行了描述,下面对本发明实施例中红树林高光谱图像分类装置进行描述,请参阅图5,本发明实施例中红树林高光谱图像分类装置一个实施例包括:
第一提取模块501,用于获取红树林植被的高光图谱图像,并提取所述高光谱图像中待识别区域的高光谱像元;
邻域构建模块502,用于根据所述高光谱像元构造对应的三维局部立方体邻域;
第二提取模块503,用于利用三维梯度直方图特征算法,提取所述三维局部立方体邻域中的特征描述子,得到局部空谱特征,其中所述局部特征为由至少一个三维梯度直方图特征组成的三维梯度直方图特征序列;
相似度计算模块504,用于基于所述三维梯度直方图特征序列构建样本数据对,并将所述样本数据对输入至空谱孪生网络中进行相似度的计算,得到空谱特征相似度;
分类模块505,用于根据所述空谱特征相似度对所述高光谱图像进行分类。
本实施例提供的装置在上述3D-HOG特征矢量的基础上,提出了一种基于一维卷积(1D-CNN)的空谱孪生网络结构,用于实现红树林高光谱图像的空谱特征的分类。本文针对红树林高光谱图像样本数据少的特点,利用孪生网络构造大量的数据对用于训练,并通过距离度量的方式计算两个样本的相似度,最终实现有效分类。
进一步地,请参阅图6,图6为红树林高光谱图像分类装置各个模块的细化示意图,所述邻域构建模块502包括:
计算单元5021,用于计算所述高光谱像元的空域信息和光谱域信息;
确定单元5022,用于根据所述空域信息和光谱域信息确定所述高光谱像元的波段大小;
构建单元5023,用于根据所述波段大小,构造所述高光谱像元的三维局部立方体邻域。
在本发明的一些实施例,所述第二提取模块503包括:
平面提取单元5031,用于提取所述三维局部立方体邻域的三维平面信息;
描述子提取单元5032,用于利用三维梯度直方图特征算法,提取所述三维平面信息中三个平面的每个像素点的梯度直方图特征描述子;
连接单元5033,用于根据从三个平面提取到的各像素点的所述梯度直方图特征描述子进行连接,得到局部空谱特征。
在本发明的一些实施例,所述描述子提取单元5032具体用于:
计算所述三维平面信息中三个平面上的所有像素点的梯度大小和方向;
基于各平面的所述梯度大小和方向,设置平面对应的梯度直方图中块的尺寸和直方图的大小;
根据各平面的所述块的尺寸和直方图的大小,确定各平面的梯度直方图特征描述子。
在本发明的一些实施例,所述连接单元5033具体用于:
将三个平面中的所有梯度直方图特征描述子,按照相同像素点进行分类,并将分类号的同像素点的梯度直方图特征描述子进行连接,得到每个像素点的三维梯度直方图特征;
计算所述高光谱图像中待识别区域的步长,以及各像素点的三维梯度直方图特征之间的相关度;
根据所述步长和所述相关性,生成得到所述高光谱像元的局部空谱特征。
在本发明的一些实施例,所述相似度计算模块504包括:
样本生成单元5041,用于将所述三维梯度直方图特征序列中的每个三维梯度直方图特征分别与预设的同类基准样本和异类基准样本进行组合,生成至少一个样本数据对,其中每个样本数据对包括一个正样本和一个反样本;
相似度计算单元5042,用于将所述正样本和反样本同时输入至空谱孪生网络中计算所述正样本和反样本之间的相似度,得到空谱特征相似度。
在本发明的一些实施例,所述空谱孪生网络包括一维卷积层和对比损失函数层,所述相似度计算单元5042具体用于:
将所述正样本和反样本同时输入至所述一维卷积层中,通过所述一维卷积层对所述正样本和反样本进行卷积计算,得到对应的特征向量;
将所述特征向量输入至所述对比损失函数层进行距离计算,得到各三维梯度直方图特征的欧氏距离值;
根据各三维梯度直方图特征的欧氏距离值计算空谱特征相似度。
本发明实施例中,通过提取红树林植被的高光谱图像的高光谱像元,并构造高光谱像元的三维局部立方体邻域,利用三维梯度直方图特征算法提取三维局部立方体邻域中的特征描述子,基于特征描述子得到局部空谱特征,该局部空谱特征是三维梯度直方图特征序列,根据三维梯度直方图特征序列构建样本数据对,并将样本数据对输入至空谱孪生网络中进行相似度的计算,得到空谱特征相似度,基于空谱特征相似度对高光谱图像进行分类。由于上述对红树林植被的高光谱图像的像元的三维局部立方体邻域进行三维梯度直方图特征的提取,然后将提取到的特征输入至空谱孪生网络中计算相似度,通过空谱孪生网络可以准确地对高光谱图像中的空谱信息进行识别,从而实现精准的分类,提升了基于空谱特征对高光谱图像进行分类的准确率。
上面图5和图6从模块化功能实体的角度对本发明实施例中的红树林高光谱图像分类装置进行详细描述,下面从硬件处理的角度对本发明实施例中电子设备进行详细描述。
图7是本发明实施例提供了一种电子设备的结构示意图,该电子设备700可因配置或性能不同而产生比较大的差异,可以包括一个或一个以上处理器(centralprocessingunits,CPU)710(例如,一个或一个以上处理器)和存储器720,一个或一个以上存储应用程序733或数据732的存储介质730(例如一个或一个以上海量存储设备)。其中,存储器720和存储介质730可以是短暂存储或持久存储。存储在存储介质730的程序可以包括一个或一个以上模块(图示没标出),每个模块可以包括对电子设备700中的一系列指令操作。更进一步地,处理器710可以设置为与存储介质730通信,在电子设备700上执行存储介质730中的一系列指令操作。在实际应用中,该应用程序733可以被分割成第一提取模块501、邻域构建模块502、第二提取模块503、相似度计算模块504和分类模块505(虚拟装置中的模块)的功能。
电子设备700还可以包括一个或一个以上电源740,一个或一个以上有线或无线网络接口750,一个或一个以上输入输出接口760,和/或,一个或一个以上操作系统731,例如:Windows Serve,MacOSX,Unix,Linux,FreeBSD等等。 本领域技术人员可以理解,图7示出的电子设备结构还可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。
本发明实施例还提供了一种计算机可读存储介质,该计算机可读存储介质可以为非易失性计算机可读存储介质,该计算机可读存储介质也可以为易失性计算机可读存储介质,所述计算机可读存储介质中存储有指令或计算机程序,当所述指令或计算机程序被运行时,使得计算机执行上述实施例提供的红树林高光谱图像分类方法的各个步骤。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统或装置、单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read-onlymemory,ROM)、随机存取存储器(randomaccessmemory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。

Claims (10)

  1. 一种红树林高光谱图像分类方法,其特征在于,所述红树林高光谱图像分类方法包括:
    获取红树林植被的高光图谱图像,并提取所述高光谱图像中待识别区域的高光谱像元;
    根据所述高光谱像元构造对应的三维局部立方体邻域;
    利用三维梯度直方图特征算法,提取所述三维局部立方体邻域中的特征描述子,得到局部空谱特征,其中所述局部特征为由至少一个三维梯度直方图特征组成的三维梯度直方图特征序列;
    基于所述三维梯度直方图特征序列构建样本数据对,并将所述样本数据对输入至空谱孪生网络中进行相似度的计算,得到空谱特征相似度;
    根据所述空谱特征相似度对所述高光谱图像进行分类。
  2. 根据权利要求1所述的红树林高光谱图像分类方法,其特征在于,所述根据所述高光谱像元构造对应的三维局部立方体邻域包括:
    计算所述高光谱像元的空域信息和光谱域信息;
    根据所述空域信息和光谱域信息确定所述高光谱像元的波段大小;
    根据所述波段大小,构造所述高光谱像元的三维局部立方体邻域。
  3. 根据权利要求1所述的红树林高光谱图像分类方法,其特征在于,所述利用三维梯度直方图特征算法,提取所述三维局部立方体邻域中的特征描述子,得到局部空谱特征包括:
    提取所述三维局部立方体邻域的三维平面信息;
    利用三维梯度直方图特征算法,提取所述三维平面信息中三个平面的每个像素点的梯度直方图特征描述子;
    根据从三个平面提取到的各像素点的所述梯度直方图特征描述子进行连接,得到局部空谱特征。
  4. 根据权利要求3所述的红树林高光谱图像分类方法,其特征在于,所述利用三维梯度直方图特征算法,提取所述三维平面信息中三个平面的每个像素点的梯度直方图特征描述子包括:
    计算所述三维平面信息中三个平面上的所有像素点的梯度大小和方向;
    基于各平面的所述梯度大小和方向,设置平面对应的梯度直方图中块的尺寸和直方图的大小;
    根据各平面的所述块的尺寸和直方图的大小,确定各平面的梯度直方图特征描述子。
  5. 根据权利要求4所述的红树林高光谱图像分类方法,其特征在于,所述根据从三个平面提取的各像素点的所述梯度直方图特征描述子进行连接,得到局部空谱特征包括:
    将三个平面中的所有梯度直方图特征描述子,按照相同像素点进行分类,并将分类号的同像素点的梯度直方图特征描述子进行连接,得到每个像素点的三维梯度直方图特征;
    计算所述高光谱图像中待识别区域的步长,以及各像素点的三维梯度直方图特征之间的相关度;
    根据所述步长和所述相关性,生成得到所述高光谱像元的局部空谱特征。
  6. 根据权利要求1-5中任一项所述的红树林高光谱图像分类方法,其特征在于,所述基于所述三维梯度直方图特征序列构建样本数据对,并将所述样本数据对输入至空谱孪生网络中进行相似度的计算,得到空谱特征相似度包括:
    将所述三维梯度直方图特征序列中的每个三维梯度直方图特征分别与预设的同类基准样本和异类基准样本进行组合,生成至少一个样本数据对,其中每个样本数据对包括一个正样本和一个反样本;
    将所述正样本和反样本同时输入至空谱孪生网络中计算所述正样本和反样本之间的相似度,得到空谱特征相似度。
  7. 根据权利要求6所述的红树林高光谱图像分类方法,其特征在于,所述空谱孪生网络包括一维卷积层和对比损失函数层,所述将所述正样本和反样本同时输入至空谱孪生网络中计算所述正样本和反样本之间的相似度,得到空谱特征相似度包括:
    将所述正样本和反样本同时输入至所述一维卷积层中,通过所述一维卷积层对所述正样本和反样本进行卷积计算,得到对应的特征向量;
    将所述特征向量输入至所述对比损失函数层进行距离计算,得到各三维梯度直方图特征的欧氏距离值;
    根据各三维梯度直方图特征的欧氏距离值计算空谱特征相似度。
  8. 一种红树林高光谱图像分类装置,其特征在于,所述红树林高光谱图像分类装置包括:
    第一提取模块,用于获取红树林植被的高光图谱图像,并提取所述高光谱图像中待识别区域的高光谱像元;
    邻域构建模块,用于根据所述高光谱像元构造对应的三维局部立方体邻域;
    第二提取模块,用于利用三维梯度直方图特征算法,提取所述三维局部立方体邻域中的特征描述子,得到局部空谱特征,其中所述局部特征为由至少一个三维梯度直方图特征组成的三维梯度直方图特征序列;
    相似度计算模块,用于基于所述三维梯度直方图特征序列构建样本数据对,并将所述样本数据对输入至空谱孪生网络中进行相似度的计算,得到空谱特征相似度;
    分类模块,用于根据所述空谱特征相似度对所述高光谱图像进行分类。
  9. 一种电子设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现如权利要求1至7中任一项所述的红树林高光谱图像分类方法中的各个步骤。
  10. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1至7中任一项所述的红树林高光谱图像分类方法中的各个步骤。
PCT/CN2021/138814 2021-06-21 2021-12-16 红树林高光谱图像分类方法、装置、电子设备及存储介质 WO2022267388A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110685359.7A CN113420640B (zh) 2021-06-21 2021-06-21 红树林高光谱图像分类方法、装置、电子设备及存储介质
CN202110685359.7 2021-06-21

Publications (1)

Publication Number Publication Date
WO2022267388A1 true WO2022267388A1 (zh) 2022-12-29

Family

ID=77789490

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/138814 WO2022267388A1 (zh) 2021-06-21 2021-12-16 红树林高光谱图像分类方法、装置、电子设备及存储介质

Country Status (2)

Country Link
CN (1) CN113420640B (zh)
WO (1) WO2022267388A1 (zh)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116310459A (zh) * 2023-03-28 2023-06-23 中国地质大学(武汉) 基于多视图空谱联合的高光谱图像子空间聚类方法
CN116503669A (zh) * 2023-05-22 2023-07-28 齐鲁工业大学(山东省科学院) 轻量化层间多尺度密集网络的高光谱遥感图像分类方法
CN116595208A (zh) * 2023-07-17 2023-08-15 云南大学 高光谱图像的分类方法、装置及电子设备
CN117275080A (zh) * 2023-11-22 2023-12-22 深圳市美爱堂科技有限公司 基于计算机视觉的眼部状态识别方法及系统

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113420640B (zh) * 2021-06-21 2023-06-20 深圳大学 红树林高光谱图像分类方法、装置、电子设备及存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106022355A (zh) * 2016-05-09 2016-10-12 西北工业大学 基于3dcnn的高光谱图像空谱联合分类方法
WO2019047248A1 (zh) * 2017-09-07 2019-03-14 深圳大学 高光谱遥感图像的特征提取方法及装置
CN110163293A (zh) * 2019-05-28 2019-08-23 武汉轻工大学 基于深度学习的红肉分类方法、装置、设备及存储介质
CN111368896A (zh) * 2020-02-28 2020-07-03 南京信息工程大学 基于密集残差三维卷积神经网络的高光谱遥感图像分类方法
CN112990316A (zh) * 2021-03-18 2021-06-18 浪潮云信息技术股份公司 基于多显著性特征融合的高光谱遥感图像分类方法及系统
CN113420640A (zh) * 2021-06-21 2021-09-21 深圳大学 红树林高光谱图像分类方法、装置、电子设备及存储介质

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106022355A (zh) * 2016-05-09 2016-10-12 西北工业大学 基于3dcnn的高光谱图像空谱联合分类方法
WO2019047248A1 (zh) * 2017-09-07 2019-03-14 深圳大学 高光谱遥感图像的特征提取方法及装置
CN110163293A (zh) * 2019-05-28 2019-08-23 武汉轻工大学 基于深度学习的红肉分类方法、装置、设备及存储介质
CN111368896A (zh) * 2020-02-28 2020-07-03 南京信息工程大学 基于密集残差三维卷积神经网络的高光谱遥感图像分类方法
CN112990316A (zh) * 2021-03-18 2021-06-18 浪潮云信息技术股份公司 基于多显著性特征融合的高光谱遥感图像分类方法及系统
CN113420640A (zh) * 2021-06-21 2021-09-21 深圳大学 红树林高光谱图像分类方法、装置、电子设备及存储介质

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116310459A (zh) * 2023-03-28 2023-06-23 中国地质大学(武汉) 基于多视图空谱联合的高光谱图像子空间聚类方法
CN116310459B (zh) * 2023-03-28 2024-01-19 中国地质大学(武汉) 基于多视图空谱联合的高光谱图像子空间聚类方法
CN116503669A (zh) * 2023-05-22 2023-07-28 齐鲁工业大学(山东省科学院) 轻量化层间多尺度密集网络的高光谱遥感图像分类方法
CN116595208A (zh) * 2023-07-17 2023-08-15 云南大学 高光谱图像的分类方法、装置及电子设备
CN116595208B (zh) * 2023-07-17 2023-10-13 云南大学 高光谱图像的分类方法、装置及电子设备
CN117275080A (zh) * 2023-11-22 2023-12-22 深圳市美爱堂科技有限公司 基于计算机视觉的眼部状态识别方法及系统

Also Published As

Publication number Publication date
CN113420640A (zh) 2021-09-21
CN113420640B (zh) 2023-06-20

Similar Documents

Publication Publication Date Title
Zhang et al. Plant disease leaf image segmentation based on superpixel clustering and EM algorithm
WO2022267388A1 (zh) 红树林高光谱图像分类方法、装置、电子设备及存储介质
Yu et al. Multi-view harmonized bilinear network for 3d object recognition
JP6966875B2 (ja) 画像検索装置及びプログラム
Chen et al. Hyperspectral image classification using dictionary-based sparse representation
US9141871B2 (en) Systems, methods, and software implementing affine-invariant feature detection implementing iterative searching of an affine space
Sahillioğlu et al. Minimum-distortion isometric shape correspondence using EM algorithm
Nanni et al. Local phase quantization descriptor for improving shape retrieval/classification
CN109063757A (zh) 基于块对角表示和视图多样性的多视图子空间聚类方法
CN110751027B (zh) 一种基于深度多示例学习的行人重识别方法
CN110598715A (zh) 图像识别方法、装置、计算机设备及可读存储介质
Chen et al. Recognition and counting of wheat mites in wheat fields by a three-step deep learning method
Xu et al. Discriminative analysis for symmetric positive definite matrices on lie groups
Yu et al. 3D object representation learning: A set-to-set matching perspective
CN111414958B (zh) 一种视觉词袋金字塔的多特征图像分类方法及系统
WO2022257407A1 (zh) 高光谱图像分类方法、装置、电子设备及存储介质
JP2017129990A (ja) 画像認識装置、画像認識方法、及び画像認識プログラム
CN108388869B (zh) 一种基于多重流形的手写数据分类方法及系统
Gao et al. Occluded person re-identification based on feature fusion and sparse reconstruction
Li et al. A non-rigid 3D model retrieval method based on scale-invariant heat kernel signature features
Duan et al. Local feature learning for face recognition under varying poses
Hsieh et al. Video-based human action and hand gesture recognition by fusing factored matrices of dual tensors
Hou et al. Robust laplacian matrix learning for smooth graph signals
Liu et al. RFM-GAN: Robust feature matching with GAN-based neighborhood representation for agricultural remote sensing image registration
Patel et al. State-of-Art: Similarity Assessment for Content Based Image Retrieval System

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21946862

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE