CN115937685A - Hyperspectral classification identification method based on superpixel segmentation - Google Patents

Hyperspectral classification identification method based on superpixel segmentation Download PDF

Info

Publication number
CN115937685A
CN115937685A CN202211663866.1A CN202211663866A CN115937685A CN 115937685 A CN115937685 A CN 115937685A CN 202211663866 A CN202211663866 A CN 202211663866A CN 115937685 A CN115937685 A CN 115937685A
Authority
CN
China
Prior art keywords
segmentation
pixel
hyperspectral
class
superpixel
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202211663866.1A
Other languages
Chinese (zh)
Inventor
纪谦茂
刘萍
李群芳
武蕾
姚英军
孟宪苓
纪荣荣
曹书森
李阳
王春畅
张志恒
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Liaocheng Industrial Technology Research Institute Co ltd
Shandong Post And Telecom Engineering Co ltd
Shandong Shenlan Zhipu Digital Technology Co ltd
Original Assignee
Liaocheng Industrial Technology Research Institute Co ltd
Shandong Post And Telecom Engineering Co ltd
Shandong Shenlan Zhipu Digital Technology Co ltd
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 Liaocheng Industrial Technology Research Institute Co ltd, Shandong Post And Telecom Engineering Co ltd, Shandong Shenlan Zhipu Digital Technology Co ltd filed Critical Liaocheng Industrial Technology Research Institute Co ltd
Priority to CN202211663866.1A priority Critical patent/CN115937685A/en
Publication of CN115937685A publication Critical patent/CN115937685A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02ATECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
    • Y02A40/00Adaptation technologies in agriculture, forestry, livestock or agroalimentary production
    • Y02A40/10Adaptation technologies in agriculture, forestry, livestock or agroalimentary production in agriculture

Landscapes

  • Image Analysis (AREA)

Abstract

The invention relates to the field of remote sensing monitoring, in particular to a hyperspectral classification and identification method based on superpixel segmentation, which comprises the following steps: firstly, extracting true color RGB visual wave bands in hyperspectral three-dimensional cube data by using a continuous projection algorithm; step two, performing super-pixel segmentation on the RGB image, and evaluating the segmentation precision of a segmentation result; thirdly, according to the segmentation precision, adjusting the label number and the segmentation weight of the segmentation algorithm, balancing the color proximity and the space proximity of the superpixels, and forming a final segmentation result through multiple iterations; and fourthly, segmenting the class of the superpixel in the spectral dimension by using a spectral information divergence segmentation algorithm on the superpixel of the segmentation result to finish the classification and identification of the target. The invention combines the advantages of the super-pixel segmentation technology on the space distribution information in the target identification with the feature of the hyperspectral image and spectrum image integration, and improves the accuracy of hyperspectral classification identification.

Description

Hyperspectral classification identification method based on superpixel segmentation
Technical Field
The invention relates to the field of remote sensing monitoring, in particular to a hyperspectral classification and identification algorithm based on superpixel segmentation.
Background
The hyperspectral remote sensing imaging technology is a leading-edge technology in the field of remote sensing detection. The hyperspectral image means that the spectral resolution is 10 -2 Three-dimensional spectral images in the range of the order of λ. Several tens to several hundreds of imaging spectrometers are arranged on different space platforms and are continuous in the ultraviolet, visible, near infrared and middle infrared regions of electromagnetic spectrumThe subdivided spectral bands simultaneously image the target region. Due to the integration of the maps, the multispectral image has spatial characteristics such as texture and shape of the multispectral image, contains richer spectral characteristic information, brings a new technical breakthrough to the field of remote sensing images, and has great development prospects in the fields of target classification and identification, ground object classification and the like.
The traditional hyperspectral image classification and identification method mostly depends on characteristic information of spectral dimensions, the differences of the spectral information are extracted through different methods to identify and judge the types of ground objects, but the actual ground surface coverage is extremely complex, the method has limitations on the identification of complex situations such as 'same-object different-spectrum', 'same-spectrum foreign matter' and the like due to the lack of utilization of image space information characteristics, and the classification and identification results of the ground objects are irregular and lack of space consistency.
Disclosure of Invention
In order to solve the problems, the scheme provides a hyperspectral classified identification method based on superpixel segmentation, and combines the advantages of a superpixel segmentation technology in target identification on space distribution information retention and the feature of hyperspectral image spectrum-image integration, so that the accuracy of hyperspectral classified identification is improved.
The invention provides the following technical scheme: a hyperspectral classification and identification method based on superpixel segmentation comprises the following steps: firstly, extracting true color RGB visual wave bands in hyperspectral three-dimensional cube data by using a continuous projection algorithm; secondly, performing super-pixel segmentation on the RGB image, and evaluating the segmentation precision of a segmentation result; thirdly, adjusting the label number and the segmentation weight of the segmentation algorithm according to the segmentation precision, balancing the color proximity and the space proximity of the superpixels, and forming a final segmentation result through multiple iterations; and fourthly, segmenting the class of the superpixel in the spectral dimension by using a spectral information divergence segmentation algorithm on the superpixel of the segmentation result to finish the classification and identification of the target.
In the first step, an RGB true color image contained in the hyperspectral data cube is obtained, because the hyperspectral image usually covers a spectral range of more than 400-1000nm and contains more than dozens of even hundreds of spectral wave bands, the hyperspectral image is too redundant in subsequent data processing and use, the true color image accords with the visual habit of human eyes, and the most real spatial characteristics such as shape, texture and the like can be better expressed on the basis of not losing the dimension of the hyperspectral image, and the specific steps are as follows: selecting a visible light part in the hyperspectral image to form a new hyperspectral subimage, and selecting a wave band within the range of 400-780 nm; three pure wave band intervals are divided from three wave bands of red, green and blue in RGB, wherein the red is 630-780nm, the green is 500-570nm and the blue is 420-470nm; the continuous projection method is used in each waveband range, a wavelength is selected in advance, then the wavelength is projected to other wavelengths respectively, the size of a projection vector on each wavelength is compared, the wavelength of the maximum projection vector is extracted to serve as an undetermined wavelength, then the undetermined wavelength replaces the preselected wavelength to continue to carry out cycle iteration, the undetermined wavelength obtained through multiple iterations is subjected to cross validation by adopting a multivariate linear regression analysis model, and the waveband with the minimum root mean square error is taken as the optimal value of waveband selection.
Defining an initial iteration vector as x k(0) Assuming that the number of variables to be extracted is M, the column of the three-dimensional matrix of the spectral image is J, and optionally selecting one column of the spectral matrix and the jth column, assigning the jth column of the modeling set to x j Is marked as x k(0) The set of unselected column vector positions is denoted as s,
Figure BDA0004008406930000021
separately calculate x j Projection of the remaining column vectors:
Figure BDA0004008406930000022
the spectral wavelength of the largest projection vector is extracted,
Figure BDA0004008406930000023
let x j =p x J ∈ s, m = m +1, if m<M, then the formula (1) is circularly calculated,
the last proposed variable is { x k(m) =0, \ 8230;, M-1} for k in each cycle (o) And M, respectively establishing a multiple linear regression analysis model to obtain a modeling set interactive verification root mean square error corresponding to different candidate wave bands, wherein the wave band corresponding to the minimum root mean square error value is the optimal wave band, respectively obtaining three optimal wave bands of R, G and B by using a continuous projection method, and forming a true color image as original data of the super-pixel segmentation.
And in the second step, performing super-pixel segmentation on the RGB image extracted from the hyperspectral image as original data, and performing clustering segmentation processing on pixels on the surface feature target based on the space and color information in the image data. A seed point (cluster center) is initialized, and a division distance is set. And according to the set number of the super pixels, uniformly distributing seed points in the image, and defining an initial region of the category to which the seed points belong, wherein the initial center is the center of the defined region. To segment the entire image into superpixels, the first thing to do is to calculate the step size. Now, the size of each super pixel is calculated, and the value of the size is the ratio of the number of the super pixels set by the total number of the pixels, so that the distance (step length) between the adjacent seed points is approximately equal to the arithmetic square root of the size of the super pixel. To avoid locating the superpixel on the edge and reduce the chance of seeding the superpixel with noisy pixels, the point with the smallest gradient within the 3 x 3 domain of the central node is selected as the central node of the initial superpixel. And then calculating the color of the pixel point and the space (R, G, B, X, Y) five-dimensional Euclidean distance, wherein different dimensions need to be normalized to ensure the relatively consistent influence weight of the space and the color, when the space proximity is more important, the obtained super-pixel is ensured to be more compact (lower area-perimeter ratio is ensured), and when the space shape is more important, the obtained super-pixel is ensured to be more closely adhered to the edge of the image, and the size and the shape of the super-pixel are smaller. The distance is calculated by adopting a search strategy different from that of the traditional kmean method, namely, the whole image is not searched but a search range with a step length of four times that of the image centered on the initial clustering center is selected, so that the calculation amount can be greatly reduced by limiting the search area, and the algorithm can be controlled to be linear complexity. Through repeated iteration, the clustering convergence can also generate a multi-connectivity condition and an over-small super-pixel size, a single super-pixel is cut into a plurality of discontinuous super-pixels and the like, and the conditions can be solved by enhancing connectivity. And adopting an algorithm of four-neighborhood or eight-neighborhood connected components to reallocate discontinuous superpixels and undersize superpixels to adjacent superpixels, and allocating traversed pixel points to corresponding labels until all points are traversed. The effect of removing isolated points and the like can be realized, and the result of super-pixel segmentation is obtained.
After RGB wave bands are extracted, the RGB image is subjected to super-pixel segmentation, and the specific method comprises the following steps:
first, initializing a cluster center: according to the set number of the super-pixels, a plurality of seed points are uniformly distributed in the whole image, assuming that the picture contains N pixel points in total and is pre-divided into K super-pixels with the same size, the size of each super-pixel is M/K, the step length of the adjacent seed points is expressed as S = sqrt (M/K),
reselecting the seed points in the m-m neighborhood of the seed points, and firstly calculating gradient values of all pixel points in the current neighborhood; then the seed points are moved to the place with the minimum gradient in the neighborhood range, thus avoiding the seed points falling on the contour boundary with larger gradient so as to avoid influencing the effect of subsequent clustering segmentation,
distributing a class label to each pixel point in the neighborhood around each seed point, namely which cluster center the pixel belongs to, limiting the search range of superpixel segmentation to 2s x 2s, and accelerating algorithm convergence, wherein the expected superpixel size is S x 2s, but the search range is 2s x 2s;
the distance measurement comprises color and space distance, and for each searched pixel point, the distance between the pixel point and the seed point is respectively calculated, and a specific distance formula is as follows:
Figure BDA0004008406930000041
Figure BDA0004008406930000042
Figure BDA0004008406930000043
wherein d is c Representing the color distance, d s Represents the spatial distance, M s Is the maximum spatial distance within the class, M s = S = sqrt (M/K), for each cluster, maximum colour distance M c Different pictures and different clusters, so a fixed constant n is taken, and the value range of n is 1,40]The final distance metric D' is as follows:
Figure BDA0004008406930000051
each pixel point is searched by a plurality of seed points, so that each pixel point has a distance with the surrounding seed points, and the seed point corresponding to the minimum value is taken as the clustering center of the pixel point;
iterative optimization, in theory, the above steps are iterated continuously until the error is converged (it can be understood that the clustering center of each pixel point is not changed any more), practice finds that 10 iterations can obtain ideal effect on most images, so the general iteration number is 10,
to enhance connectivity, the following defects may occur through the above iterative optimization: multiple connectivity situations, super-pixel undersize, single super-pixel being cut into multiple discontinuous super-pixels, etc., occur, which can be addressed by enhancing connectivity. The main idea is as follows: and (3) newly building a mark table, wherein the elements in the table are all-1, the discontinuous superpixels and the oversize superpixels are redistributed to the adjacent superpixels according to the Z-shaped trend (from left to right and from top to bottom), and the traversed pixel points are distributed to the corresponding labels until all the points are traversed.
In the third step, the segmentation precision is evaluated by constructing a confusion matrix, calculating evaluation parameters such as recall rate and precision rate, adjusting segmentation algorithm parameters, repeatedly adjusting segmentation weight parameters such as segmentation distance and the preset number of superpixels, outputting a model algorithm with higher precision, more balanced color proximity and space proximity and better segmentation on a target boundary, and evaluating the segmentation precision by utilizing the confusion matrix, the precision rate and the recall rate, wherein the specific steps are as follows:
the structure of the confusion matrix includes true classes (TP): the true class of the sample is the positive class, and the result of the model identification is also the positive class; false negative class (FN): the true class of the sample is the positive class, but the model identifies it as the negative class; false positive class (FP): the true class of the sample is the negative class, but the model identifies it as the positive class; true negative class (TN): the true class of the sample is the negative class, and the model identifies it as a negative class,
each column of the confusion matrix represents a prediction category, the total number of each column representing the number of data predicted for that category; each row represents a true attribution category of data, and the total number of data in each row represents the number of data instances in the category; the value in each column represents the number of classes for which real data is predicted;
the Precision ratio Precision represents the proportion of the samples which are truly positive in the samples which are identified as positive by the model, and generally, the higher the Precision ratio is, the better the effect of the model is
Precision = TP/(TP+FP) (6)
The Recall rate Recall shows how many samples can be predicted by the classifier in the actual positive samples, the Recall rate shows that the number of the samples which are correctly identified as the positive class by the model accounts for the total number of the positive class samples, generally, the higher the Recall, the more positive class samples are correctly predicted by the model, the better the effect of the model,
Recall = TP/(TP+FN) (7)。
in the fourth step, the hyperspectral image is masked by using the segmentation result of the superpixel segmentation vector to form a hyperspectral subimage corresponding to each superpixel block, and the hyperspectral subimage passes through lightDetermining the category of each hyperspectral subimage by a spectral information divergence method, and further completing hyperspectral target classification and identification; determining the category of each super pixel in a spectral domain by a Spectral Information Divergence (SID), firstly, taking a pixel x = (x) on a hyperspectral image 1 ,x 2 ,…,x L ) T Wherein x is 1 ,x 2 ,…,x L The radiance or reflectance value at the pixel position is respectively assigned on each band, L is the total number of bands, and taking x as a random variable, the probability density can be expressed as:
Figure BDA0004008406930000061
thus using vector p = { p = { (p) } 1 ,p 2 ,…,p L Expressing the probability density distribution, and taking another pixel y = (y) in the same way 1 ,y 2 ,…y L ) T The probability density distribution is q = { q = { q = 1 ,q 2 ,…,q L Therein of
Figure BDA0004008406930000062
At this time, the divergence of the spectral information between two pixels is defined as:
SID(x,y)=D(x||y)+D(y||x) (9)
wherein D (x | | y) and D (y | | | x) become Kullback-leibler information functions, which are respectively expressed as:
Figure BDA0004008406930000063
Figure BDA0004008406930000064
and finally obtaining a result of the hyperspectral classification and identification of the wheat stripe rust by calculating the divergence of the spectral information and using the divergence in the spectral domain for segmentation.
According to the method, the hyperspectral image classification and identification problems are taken as research objects, the method is based on the characteristic of integration of hyperspectral remote sensing imaging technology maps, the method is mainly used for neglecting the spatial information characteristics of hyperspectral images by the traditional methods such as hyperspectral spectral information divergence classification and the like, particularly under the complex ground surface coverage type, the spectral information divergence segmentation is limited in classification and identification of complex situations such as same-spectrum foreign matters, same-object different spectrums and the like, and a series of problems such as irregularity and lack of spatial consistency exist in the classification and identification results of ground objects, a similar spatial down-sampling mode based on the superpixel segmentation theory is designed, the hyperspectral images are firstly segmented into a plurality of superpixels according to the color and spatial information by means of clustering, meanwhile, the spectral information of the superpixels is also averaged, a new pixel is made, and the segmentation of spectral dimensions is continued. And then, a new hyperspectral image formed by the superpixels is subjected to the division of the divergence of spectral information. The method fully utilizes rich information of hyperspectral image data space and spectral dimensionality, can effectively improve the hyperspectral image classification and identification precision, and solves a series of problems of irregular classification and identification result space.
The method can be applied to the field of remote sensing land feature classification and identification, particularly remote sensing monitoring of agricultural diseases and insect pests, such as hyperspectral remote sensing monitoring of wheat stripe rust, and can extract each disease area of the wheat stripe rust with high precision and accurately mark the position of the focus of the wheat stripe rust by processing a series of hyperspectral data of wheat. In the field of quality grading of agricultural products, particularly in the aspect of fruit and vegetable freshness detection, by acquiring hyperspectral images of fruits and vegetables and processing and analyzing the hyperspectral images, surface deterioration and collision traces of the fruits and vegetables can be acquired in real time, and the method is favorable for quality grading of the fruits and vegetables and health and safety monitoring.
Drawings
Fig. 1 is a flowchart of a hyperspectral classification and identification method according to an embodiment of the present invention.
FIG. 2 is an original image according to an embodiment of the present invention.
FIG. 3 is a diagram of a super-pixel segmentation result according to an embodiment of the present invention.
FIG. 4 is a result diagram of a hyperspectral classification recognition method according to an embodiment of the present invention.
FIG. 5 is a comparison of a conventional search method and a superpixel segmentation search range.
Fig. 6 is a diagram of a confusion matrix structure.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are only one embodiment of the present invention, and not all embodiments. All other embodiments that can be derived by a person skilled in the art from the detailed description of the invention without inventive step are within the scope of the invention.
As can be seen from the attached figure 1, the hyperspectral classified identification method based on the superpixel segmentation comprises the following steps of: firstly, extracting true color RGB visual wave bands in hyperspectral three-dimensional cube data by using a continuous projection algorithm; secondly, performing super-pixel segmentation on the RGB image, and evaluating the segmentation precision of a segmentation result; thirdly, according to the segmentation precision, adjusting the label number and the segmentation weight of the segmentation algorithm, balancing the color proximity and the space proximity of the superpixels, and forming a final segmentation result through multiple iterations; and fourthly, segmenting the class of the superpixel in the spectral dimension by using a spectral information divergence segmentation algorithm on the superpixel of the segmentation result to finish the classification and identification of the target.
In the first step, a target hyperspectral image is obtained through a spectral imaging device, a group of hyperspectral images of real hyperspectral wheat stripe rust is adopted, the spatial size of the hyperspectral image is 960 x 1101, the number of spectral bands is 360, and the covered spectral interval is 385-1026nm. According to the standard reflection spectrum calculation, the red light wave band is in band 143 (630 nm) to band 226 (780 nm), the green light wave band is in band 68 (500 nm) -band 108 (570 nm), and the blue light wave band is in band 21 (420 nm) -band 51 (470 nm), the wave band intervals corresponding to the three colors are respectively extracted to be used as a new independent hyperspectral image, namely a three-dimensional array, and the hyperspectral image is brought into the following continuous projection algorithm for processing.
The sequential projection algorithm comprisesDefining an initial iteration vector as x k(0) Assuming that the number of variables to be extracted is M, the column of the three-dimensional matrix of the spectral image is J, and optionally selecting one column of the spectral matrix and the jth column, assigning the jth column of the modeling set to x j Is marked as x k(0) The set of unselected column vector positions is denoted as s,
Figure BDA0004008406930000081
separately calculate x j Projection of the remaining column vectors:
Figure BDA0004008406930000091
the spectral wavelength of the largest projection vector is extracted,
Figure BDA0004008406930000092
let x be j =p x J ∈ s, m = m +1, if m<M, then the formula (1) is circularly calculated,
the last proposed variable is { x k(m) =0, \ 8230;, M-1} for k in each cycle (0) And M, respectively establishing a multiple linear regression analysis model to obtain a modeling set interactive verification root mean square error corresponding to different candidate wave bands, wherein the wave band corresponding to the minimum root mean square error value is the optimal wave band, respectively obtaining three optimal wave bands of R, G and B by using a continuous projection method, and forming a true color image as original data of superpixel segmentation.
And in the second step, performing super-pixel segmentation on the RGB image extracted from the hyperspectral image as original data, and performing clustering segmentation on pixels on the surface feature target based on space and color information in the image data. After RGB wave bands are extracted, the RGB image is subjected to super-pixel segmentation, and the specific method comprises the following steps:
first, initializing a cluster center: according to the number of the set superpixels, uniformly distributing a plurality of seed points in the whole image, assuming that the picture contains N pixel points in total, 1056960 pixel points in the specific implementation mode, and pre-dividing the picture into K superpixels with the same size, 1000 superpixels in the specific implementation mode; then the size of each super-pixel is M/K, the step size of the neighboring seed points is denoted as S = sqrt (M/K),
reselecting the seed points in the m-m neighborhood of the seed points, generally selecting m =3, and firstly calculating gradient values of all pixel points in the current neighborhood; then the seed point is moved to the place with the minimum gradient in the neighborhood range, thus avoiding the seed point falling on the contour boundary with larger gradient to avoid influencing the effect of subsequent clustering segmentation,
a class label is distributed to each pixel point in the neighborhood around each seed point, namely which cluster center belongs to, the search is different from the standard k-means in the whole image (shown in the left side of figure 5), the search range of the super-pixel segmentation SLIC is limited to 2S x 2S (shown in the right side of figure 5), the algorithm convergence can be accelerated, the search range of the super-pixel segmentation is limited to 2S x 2S, the algorithm convergence can be accelerated, and the specific difference is shown in figure 5; note that the desired superpixel size is S × S, but the range searched is 2s × 2s; as shown in fig. 5;
the distance measurement comprises color and space distance, and for each searched pixel point, the distance between the pixel point and the seed point is respectively calculated, and a specific distance formula is as follows:
Figure BDA0004008406930000101
Figure BDA0004008406930000102
Figure BDA0004008406930000103
wherein d is c Distance of representative color,d s Represents the spatial distance, M s Is the maximum spatial distance within the class, M s = S = sqrt (M/K), for each cluster, maximum colour distance M c Different pictures and different clusters, so a fixed constant n is taken, and the value range of n is 1,40]The final distance metric F' is as follows:
Figure BDA0004008406930000104
each pixel point is searched by a plurality of seed points, so that each pixel point has a distance with the surrounding seed points, and the seed point corresponding to the minimum value is taken as the clustering center of the pixel point;
iterative optimization, wherein the iteration times are 10, and 10 iterations can obtain ideal effects on most images;
to enhance connectivity, the following defects may occur through the above iterative optimization: multiple connectivity situations, super-pixel undersize, single super-pixel being cut into multiple discontinuous super-pixels, etc., occur, which can be addressed by enhancing connectivity. The main idea is as follows: and newly building a marking table, wherein the elements in the table are all-1, the discontinuous superpixels and the oversize superpixels are redistributed to the adjacent superpixels according to the Z-shaped trend, and the traversed pixel points are distributed to the corresponding labels until all the points are traversed.
FIG. 3 is the result obtained by superpixel segmentation of the wheat stripe rust image.
In the third step, the precision of the segmentation is evaluated by using a confusion matrix, the precision rate and the recall rate, wherein the confusion matrix is shown in FIG. 6;
the structure of the confusion matrix includes true classes (TP): the true class of the sample is the positive class, and the result of the model identification is also the positive class; false negative class (FN): the true class of the sample is the positive class, but the model identifies it as the negative class; false positive class (FP): the true class of the sample is the negative class, but the model identifies it as the positive class; true negative class (TN): the true class of the sample is the negative class, and the model identifies it as a negative class,
each column of the confusion matrix represents a prediction category, the total number of each column representing the number of data predicted for that category; each row represents a true attribution category of data, and the total number of data in each row represents the number of data instances in the category; the value in each column represents the number of classes for which real data is predicted;
the Precision ratio Precision represents the proportion of the samples which are truly positive in the samples which are identified as positive by the model, and generally, the higher the Precision ratio is, the better the effect of the model is
Precision = TP/(TP+FP) (6)
The Recall rate Recall shows how much the classifier can predict in the actual positive samples, and the Recall rate shows the ratio of the number of samples correctly identified as positive to the total number of positive samples by the model,
Recall = TP/(TP+FN) (7)。
in the fourth step, the category of each super pixel is determined in the spectral domain by a spectral information divergence method (SID), and firstly, a pixel c = (c) on the hyperspectral image is taken 1 ,c 2 ,…,x L ) T Wherein x is 1 ,x 2 ,…,x L Respectively assigning a radiance value or a reflectivity value at the position of a pixel on each waveband, wherein L is the total number of the wavebands, and x is taken as a random variable, and the probability density can be expressed as:
Figure BDA0004008406930000111
thus using vector p = { p = { (p) } 1 ,p 2 ,…,p L Expressing the probability density distribution, and taking another pixel y = (y) in the same way 1 ,y 2 ,…y L ) T The probability density distribution is q = { q = { q = 1 ,q 2 ,…,q L Therein of
Figure BDA0004008406930000112
At this time, the divergence of the spectral information between two pixels is defined as:
SID(x,y)=D(x||y)+D(y||x) (9)
wherein D (x | | y) and D (y | | | x) become Kullback-leibler information functions, which are respectively expressed as:
Figure BDA0004008406930000121
Figure BDA0004008406930000122
and finally obtaining a result of the hyperspectral classification and identification of the wheat stripe rust by calculating the divergence of the spectral information and using the divergence in the spectral domain for segmentation. As shown in fig. 4.
Although the embodiments of the present invention have been described with reference to the accompanying drawings, it is not intended to limit the scope of the present invention, and it should be understood by those skilled in the art that various modifications and variations can be made without inventive efforts by those skilled in the art based on the technical solution of the present invention.

Claims (7)

1. A hyperspectral classification and identification method based on superpixel segmentation is characterized by comprising the following steps:
firstly, extracting true color RGB visual wave bands in hyperspectral three-dimensional cube data by using a continuous projection algorithm;
secondly, performing super-pixel segmentation on the RGB image, and evaluating the segmentation precision of a segmentation result;
thirdly, according to the segmentation precision, adjusting the label number and the segmentation weight of the segmentation algorithm, balancing the color proximity and the space proximity of the superpixels, and forming a final segmentation result through multiple iterations;
and fourthly, segmenting the class of the superpixel in the spectral dimension by using a spectral information divergence segmentation algorithm on the superpixel of the segmentation result to finish the classification and identification of the target.
2. The hyperspectral classification and identification method based on superpixel segmentation as claimed in claim 1, which is characterized in that:
selecting a visible light part in a hyperspectral image to form a new hyperspectral subimage, and selecting a waveband within the range of 400-780 nm; three pure wave band intervals are divided from red, green and blue wave bands in RGB, wherein the red is 630-780nm, the green is 500-570nm and the blue is 420-470nm; the continuous projection method is used in each waveband range, a wavelength is selected in advance, then the wavelength is projected onto other wavelengths, the size of a projection vector on each wavelength is compared, the wavelength of the maximum projection vector is extracted to serve as an undetermined wavelength, then the undetermined wavelength replaces a preselected wavelength to continue to carry out cycle iteration, the undetermined wavelength obtained through multiple iterations is subjected to cross validation by adopting a multivariate linear regression analysis model, and the waveband with the minimum root-mean-square error is taken as the optimal value of waveband selection.
3. The hyperspectral classification and identification method based on superpixel segmentation as claimed in claim 2, wherein: the sequential projection algorithm may comprise the steps of,
defining an initial iteration vector as x k(0) Assuming that the number of variables to be extracted is M, the column of the three-dimensional matrix of the spectral image is J, and one column of the spectral matrix and the jth column are selected optionally, the jth column of the modeling set is assigned to x j Is marked as x k(0) The set of unselected column vector positions is denoted as s,
Figure FDA0004008406920000021
separately calculate x j Projection of the remaining column vectors:
Figure FDA0004008406920000022
the spectral wavelength of the largest projection vector is extracted,
Figure FDA0004008406920000023
let x j =p x J ∈ s, m = m +1, if m<M, then the formula (1) is circularly calculated,
the last proposed variable is { x } k(m) =0, \ 8230;, M-1} for k in each cycle (0) And M, respectively establishing a multiple linear regression analysis model to obtain a modeling set interactive verification root mean square error corresponding to different candidate wave bands, wherein the wave band corresponding to the minimum root mean square error value is the optimal wave band, respectively obtaining three optimal wave bands of R, G and B by using a continuous projection method, and forming a true color image as original data of superpixel segmentation.
4. The hyperspectral classification and identification method based on superpixel segmentation as claimed in claim 1, which is characterized in that:
and in the second step, performing super-pixel segmentation on the RGB image extracted from the hyperspectral image as original data, and performing clustering segmentation on pixels on the surface feature target based on space and color information in the image data.
5. The hyperspectral classification and identification method based on superpixel segmentation as claimed in claim 4, wherein:
after RGB wave bands are extracted, the RGB image is subjected to super-pixel segmentation, and the specific method comprises the following steps:
first, initializing a cluster center: according to the set number of the super-pixels, a plurality of seed points are uniformly distributed in the whole image, assuming that the picture contains N pixel points in total and is pre-divided into K super-pixels with the same size, the size of each super-pixel is M/K, the step length of the adjacent seed points is expressed as S = sqrt (M/K),
reselecting seed points in the m-m neighborhood of the seed points, and firstly calculating gradient values of all pixel points in the current neighborhood; then the seed points are moved to the place with the minimum gradient in the neighborhood range, thus avoiding the seed points falling on the contour boundary with larger gradient so as to avoid influencing the effect of subsequent clustering segmentation,
distributing a class label to each pixel point in the neighborhood around each seed point, namely which cluster center the pixel belongs to, limiting the search range of superpixel segmentation to 2S x 2S, wherein the expected superpixel size is S x S, but the search range is 2S x 2S;
the distance measurement comprises color and space distance, and for each searched pixel point, the distance between the pixel point and the seed point is respectively calculated, and a specific distance formula is as follows:
Figure FDA0004008406920000031
Figure FDA0004008406920000032
Figure FDA0004008406920000033
wherein d is c Represents the color distance, d s Represents the spatial distance, M s Is the maximum spatial distance within the class, M s = S = sqrt (M/K), for each cluster, maximum colour distance M c Different pictures and different clusters, so a fixed constant n is taken, and the value range of n is 1,40]The final distance measure D' is as follows:
Figure FDA0004008406920000034
each pixel point is searched by a plurality of seed points, so that each pixel point has a distance with the surrounding seed points, and the seed point corresponding to the minimum value is taken as the clustering center of the pixel point;
and (4) iterative optimization, wherein the iteration number is 10,
and (3) enhancing connectivity, newly establishing a marking table, wherein the elements in the table are all-1, redistributing discontinuous superpixels and super-small-size superpixels to adjacent superpixels according to the Z-shaped trend, and allocating traversed pixel points to corresponding labels until all points are traversed.
6. The hyperspectral classification and identification method based on superpixel segmentation as claimed in claim 1, which is characterized in that:
in the third step, the confusion matrix, the precision and the recall rate are used to evaluate the segmentation precision,
the structure of the confusion matrix includes true classes (TP): the true class of the sample is the positive class, and the result of the model identification is also the positive class; false negative class (FN): the true class of the sample is the positive class, but the model identifies it as the negative class; false positive class (FP): the true class of the sample is the negative class, but the model identifies it as the positive class; true negative class (TN): the true class of the sample is the negative class, and the model identifies it as a negative class,
each column of the confusion matrix represents a prediction category, the total number of each column representing the number of data predicted for that category; each row represents a true attribution category of data, and the total number of data in each row represents the number of data instances in the category; the value in each column represents the number of classes for which real data is predicted;
the Precision ratio Precision represents the proportion of the samples which are truly positive in the samples which are identified as positive by the model, and generally, the higher the Precision ratio is, the better the effect of the model is
Precision=TP/(TP+FP) (6)
The Recall rate Recall represents how many samples in the actual positive samples can be predicted by the classifier, and the Recall rate represents the ratio of the number of samples correctly identified as the positive class by the model to the total number of the positive class samples,
Recall=TP/(TP+FN) (7)。
7. the hyperspectral classification and identification method based on superpixel segmentation as claimed in claim 1, which is characterized in that:
in the fourth step, the category of each super pixel is determined in the spectral domain by a spectral information divergence method (SID), and firstly, a pixel x = (x) on the hyperspectral image is taken 1 ,x 2 ,…,x L ) T Wherein x is 1 ,x 2 ,…,x L Respectively assigning a radiance value or a reflectivity value at the position of a pixel on each waveband, wherein L is the total number of the wavebands, and x is taken as a random variable, and the probability density can be expressed as:
Figure FDA0004008406920000041
thus using vector p = { p = { (p) } 1 ,p 2 ,…,p L Expressing the probability density distribution, and taking another pixel y = (y) in the same way 1 ,y 2 ,…y L ) T The probability density distribution is q = { q = { q = 1 ,q 2 ,…,q L Therein of
Figure FDA0004008406920000051
At this time, the divergence of the spectral information between two pixels is defined as:
SID(x,y)=D(x||y)+D(y||x) (9)
wherein D (x | | y) and D (y | | | x) become Kullback-leibler information functions, which are respectively expressed as:
Figure FDA0004008406920000052
Figure FDA0004008406920000053
and finally obtaining a result of the hyperspectral classification and identification of the wheat stripe rust by calculating the divergence of the spectral information and using the divergence in the spectral domain for segmentation.
CN202211663866.1A 2022-12-20 2022-12-20 Hyperspectral classification identification method based on superpixel segmentation Pending CN115937685A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211663866.1A CN115937685A (en) 2022-12-20 2022-12-20 Hyperspectral classification identification method based on superpixel segmentation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211663866.1A CN115937685A (en) 2022-12-20 2022-12-20 Hyperspectral classification identification method based on superpixel segmentation

Publications (1)

Publication Number Publication Date
CN115937685A true CN115937685A (en) 2023-04-07

Family

ID=86699067

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211663866.1A Pending CN115937685A (en) 2022-12-20 2022-12-20 Hyperspectral classification identification method based on superpixel segmentation

Country Status (1)

Country Link
CN (1) CN115937685A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117848972A (en) * 2024-03-07 2024-04-09 宝鸡西工钛合金制品有限公司 Titanium alloy anodic oxidation pretreatment method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117848972A (en) * 2024-03-07 2024-04-09 宝鸡西工钛合金制品有限公司 Titanium alloy anodic oxidation pretreatment method
CN117848972B (en) * 2024-03-07 2024-05-10 宝鸡西工钛合金制品有限公司 Titanium alloy anodic oxidation pretreatment method

Similar Documents

Publication Publication Date Title
Bhargava et al. Fruits and vegetables quality evaluation using computer vision: A review
US8311338B2 (en) Method and system for learning a same-material constraint in an image
Kim et al. Classification of grapefruit peel diseases using color texture feature analysis
CN102308306B (en) A constraint generator for use in image segregation
US7949181B2 (en) Segmentation of tissue images using color and texture
CN108830870A (en) Satellite image high-precision field boundary extracting method based on Multi-scale model study
Kumari et al. Hybridized approach of image segmentation in classification of fruit mango using BPNN and discriminant analyzer
EP2638508B1 (en) System and method for identifying complex tokens in an image
Cointault et al. In‐field Triticum aestivum ear counting using colour‐texture image analysis
CN110163101B (en) Method for rapidly distinguishing seeds of traditional Chinese medicinal materials and rapidly judging grades of seeds
US20140294296A1 (en) Spatially varying log-chromaticity normals for use in an image process
US20130114911A1 (en) Post processing for improved generation of intrinsic images
CN108960276B (en) Sample expansion and consistency discrimination method for improving spectral image supervision classification performance
CN115937685A (en) Hyperspectral classification identification method based on superpixel segmentation
CN114332534B (en) Hyperspectral image small sample classification method
CN115690513A (en) Urban street tree species identification method based on deep learning
Sukhanov et al. Fusion of LiDAR, hyperspectral and RGB data for urban land use and land cover classification
WO2015171355A1 (en) A method for identifying color-based vectors for analysis of frames of a video
US20130114905A1 (en) Post processing for improved generation of intrinsic images
CN111259913A (en) Cell spectral image classification method based on bag-of-word model and textural features
Sandoval et al. Crop classification using different color spaces and rbf neural networks
US8842907B2 (en) Method for performing a multi-clustering merge for use in an image process
CN113205143A (en) Multi-scale superpixel hyperspectral remote sensing image classification method based on space-spectrum coupling characteristics
US8849018B2 (en) Log-chromaticity clustering pipeline for use in an image process
PS et al. Deep Learning Model to Enhance Precision Agriculture using Superpixel

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination