CN107657264A - One kind carries out soil profile kind identification method based on KNN classification - Google Patents
One kind carries out soil profile kind identification method based on KNN classification Download PDFInfo
- Publication number
- CN107657264A CN107657264A CN201710430616.6A CN201710430616A CN107657264A CN 107657264 A CN107657264 A CN 107657264A CN 201710430616 A CN201710430616 A CN 201710430616A CN 107657264 A CN107657264 A CN 107657264A
- Authority
- CN
- China
- Prior art keywords
- soil
- spectrum
- trough
- curve
- interpolation
- 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.)
- Granted
Links
- 239000002689 soil Substances 0.000 title claims abstract description 228
- 238000000034 method Methods 0.000 title claims abstract description 49
- 230000003595 spectral effect Effects 0.000 claims abstract description 73
- 238000001228 spectrum Methods 0.000 claims abstract description 39
- 238000012360 testing method Methods 0.000 claims abstract description 31
- 238000012545 processing Methods 0.000 claims abstract description 24
- 239000000284 extract Substances 0.000 claims abstract description 14
- 238000012549 training Methods 0.000 claims abstract description 13
- 238000009795 derivation Methods 0.000 claims abstract description 6
- 238000000605 extraction Methods 0.000 claims description 27
- 239000011159 matrix material Substances 0.000 claims description 19
- 238000004422 calculation algorithm Methods 0.000 claims description 7
- 238000002310 reflectometry Methods 0.000 claims description 5
- 238000009499 grossing Methods 0.000 claims description 4
- 238000004611 spectroscopical analysis Methods 0.000 claims description 3
- 230000003321 amplification Effects 0.000 claims description 2
- 238000003199 nucleic acid amplification method Methods 0.000 claims description 2
- 238000013480 data collection Methods 0.000 claims 3
- 235000013399 edible fruits Nutrition 0.000 claims 1
- 238000005096 rolling process Methods 0.000 claims 1
- 238000005516 engineering process Methods 0.000 description 5
- XEEYBQQBJWHFJM-UHFFFAOYSA-N Iron Chemical compound [Fe] XEEYBQQBJWHFJM-UHFFFAOYSA-N 0.000 description 4
- 238000010521 absorption reaction Methods 0.000 description 4
- 238000013528 artificial neural network Methods 0.000 description 4
- 238000011160 research Methods 0.000 description 3
- 238000005070 sampling Methods 0.000 description 3
- 238000004458 analytical method Methods 0.000 description 2
- 229910052742 iron Inorganic materials 0.000 description 2
- 238000010606 normalization Methods 0.000 description 2
- 238000000985 reflectance spectrum Methods 0.000 description 2
- 238000010183 spectrum analysis Methods 0.000 description 2
- 229920000297 Rayon Polymers 0.000 description 1
- 244000273928 Zingiber officinale Species 0.000 description 1
- 235000006886 Zingiber officinale Nutrition 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 235000008397 ginger Nutrition 0.000 description 1
- 230000008595 infiltration Effects 0.000 description 1
- 238000001764 infiltration Methods 0.000 description 1
- 238000002386 leaching Methods 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
- 239000000463 material Substances 0.000 description 1
- 238000005259 measurement Methods 0.000 description 1
- 239000000203 mixture Substances 0.000 description 1
- 238000003062 neural network model Methods 0.000 description 1
- 238000012567 pattern recognition method Methods 0.000 description 1
- 230000000704 physical effect Effects 0.000 description 1
- 238000007781 pre-processing Methods 0.000 description 1
- 238000001055 reflectance spectroscopy Methods 0.000 description 1
- 238000004856 soil analysis Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N21/00—Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
- G01N21/17—Systems in which incident light is modified in accordance with the properties of the material investigated
- G01N21/25—Colour; Spectral properties, i.e. comparison of effect of material on the light at two or more different wavelengths or wavelength bands
- G01N21/31—Investigating relative effect of material at wavelengths characteristic of specific elements or molecules, e.g. atomic absorption spectrometry
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N21/00—Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
- G01N21/17—Systems in which incident light is modified in accordance with the properties of the material investigated
- G01N21/25—Colour; Spectral properties, i.e. comparison of effect of material on the light at two or more different wavelengths or wavelength bands
- G01N21/31—Investigating relative effect of material at wavelengths characteristic of specific elements or molecules, e.g. atomic absorption spectrometry
- G01N21/35—Investigating relative effect of material at wavelengths characteristic of specific elements or molecules, e.g. atomic absorption spectrometry using infrared light
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N21/00—Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
- G01N21/17—Systems in which incident light is modified in accordance with the properties of the material investigated
- G01N21/47—Scattering, i.e. diffuse reflection
- G01N21/4738—Diffuse reflection, e.g. also for testing fluids, fibrous materials
Landscapes
- Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Spectroscopy & Molecular Physics (AREA)
- Life Sciences & Earth Sciences (AREA)
- General Physics & Mathematics (AREA)
- Pathology (AREA)
- General Health & Medical Sciences (AREA)
- Biochemistry (AREA)
- Analytical Chemistry (AREA)
- Immunology (AREA)
- Chemical & Material Sciences (AREA)
- Health & Medical Sciences (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Bioinformatics & Computational Biology (AREA)
- General Engineering & Computer Science (AREA)
- Evolutionary Computation (AREA)
- Evolutionary Biology (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Artificial Intelligence (AREA)
- Investigating Or Analysing Materials By Optical Means (AREA)
Abstract
本发明公开了一种基于KNN分类进行土壤剖面类型识别方法,包括以下几个步骤:S1、针对一光谱曲线,提取其波谷特征;S2、针对一光谱曲线,提取其波峰特征;S3、针对训练集和测试集数据,提取土壤光谱曲线波谷特征,存入数据集合c1;S4、针对训练集和测试集数据,经差分求导处理后,提取土壤光谱一阶导数曲线波峰波谷特征,存入数据集合c2;S5、合并数据集合c1、c2,得到属性数据集L,对属性数据集L进行归一化操作后,基于KNN分类方法,进行测试集土壤光谱曲线的土壤类型识别;S6、基于最大占比原则,确定测试集土壤剖面的土壤类型。本方法在超高维分类方面具有更大优势,满足在样本数据维度高、土壤类型较多的情况下使用。
The invention discloses a soil profile type identification method based on KNN classification, which comprises the following steps: S1, extracting the trough characteristics of a spectral curve; S2, extracting the peak characteristics of a spectral curve; S3, training Collect and test set data, extract the trough characteristics of the soil spectral curve, and store them in the data set c1; S4, for the training set and test set data, after differential derivation processing, extract the peak and trough features of the first derivative curve of the soil spectrum, and store them in the data Set c2; S5, merge the data sets c1 and c2 to obtain the attribute data set L, after normalizing the attribute data set L, based on the KNN classification method, carry out the soil type identification of the soil spectral curve of the test set; S6, based on the maximum According to the proportion principle, the soil type of the soil profile of the test set is determined. This method has greater advantages in ultra-high-dimensional classification, and can be used in the case of high-dimensional sample data and many soil types.
Description
技术领域technical field
本发明属于土壤遥感领域,具体涉及一种基于最邻近规则(K-Nearest Neighbor,简称KNN)进行土壤类型识别的方法。The invention belongs to the field of soil remote sensing, and in particular relates to a method for identifying soil types based on K-Nearest Neighbor (KNN for short).
背景技术Background technique
土壤分类是依据土壤实体性状的综合差异,划分出不同级别的土壤类型,以便因地制宜地推广农业技术和土壤改良技术。对于土壤类型的识别需要获取大量的土体形态、物理、化学乃至生物等诊断信息,其中部分信息(如形态、容重等) 可以通过肉眼观察或简单测量得到,但大多数物理、化学信息在传统上需要经过实验室测试分析方可获得。所以,对土壤类型的识别和鉴定通常成本较高,而且需要土壤分类专家的参与。Soil classification is based on the comprehensive differences in soil physical properties, classifying soil types at different levels, so as to promote agricultural technology and soil improvement technology according to local conditions. The identification of soil types needs to obtain a large amount of diagnostic information such as soil morphology, physics, chemistry, and even biology. Some of the information (such as morphology, bulk density, etc.) It can only be obtained after laboratory testing and analysis. Therefore, the identification and identification of soil types is usually costly and requires the involvement of soil taxonomy experts.
目前,为了满足快速发展的大规模高精度土壤信息需求,快速获取和持续更新土壤信息是土壤资源研究领域的核心研究内容之一。传统方法由于其成本高、效率低,通常存在采样尺度偏大、采样密度偏稀疏、调查频率偏低等问题,难于满足对土壤信息进行动态、快速、低成本获取和更新的需求。At present, in order to meet the rapidly developing demand for large-scale and high-precision soil information, rapid acquisition and continuous updating of soil information is one of the core research contents in the field of soil resource research. Due to its high cost and low efficiency, traditional methods usually have problems such as large sampling scale, sparse sampling density, and low survey frequency, making it difficult to meet the needs of dynamic, rapid, and low-cost acquisition and update of soil information.
土壤的基本物质组成变化既是土壤发生发育过程的反映,是确定土壤诊断指标和类型划分的依据,同时也是影响土壤反射光谱的主要因素。在土壤调查与制图中,利用光谱分析技术实现土壤类型的快速、准确、自动识别在理论上是可行的。实现上述应用的关键在于,在相对标准的测定条件下获取土壤的光谱数据,建立完善的土壤光谱库,进而研发有效的模式识别方法以达到土壤光谱识别和分类的目标。The change of basic material composition of soil is not only the reflection of soil development process, but also the basis for determining soil diagnostic index and type classification, and also the main factor affecting soil reflectance spectrum. In soil survey and mapping, it is theoretically feasible to use spectral analysis technology to realize rapid, accurate and automatic identification of soil types. The key to realizing the above applications is to obtain soil spectral data under relatively standard measurement conditions, establish a complete soil spectral library, and then develop effective pattern recognition methods to achieve the goal of soil spectral identification and classification.
刘焕军等(2008,2017)基于BP神经网络方法,得到了吉林农安县黑土、黑钙土等五种主要土壤土类的精确分类(参见《基于反射光谱特性的土壤分类研究》,刘焕军,张柏,张渊智,等.光谱学与光谱分析,2008,28(3):624-628.;利用多层感知器神经网络模型结合光谱特征参数的土壤分类方法,刘焕军,张新乐等. 中国专利.CN 106650819A.2017-05-10.),该方法中的相关土壤类型较少,用BP 神经网络方法有一定优势。但当面对较多土壤类型和大量土壤样本时,该方法的学习时间过长,甚至可能达不到学习的目的,从而在面对较多土壤类型和大量土壤样本数据时,总体分类效果并不理想。此外,相关方法中仅采用了0-20cm耕层土样,对于同一剖面中不同深度的土壤光谱信息,未能充分利用。Liu Huanjun et al. (2008, 2017) based on the BP neural network method, obtained the accurate classification of five main soil types including black soil and chernozem in Nong'an County, Jilin Province (see "Research on Soil Classification Based on Reflectance Spectral Characteristics", Liu Huanjun, Zhang Bo , Zhang Yuanzhi, et al. Spectroscopy and Spectral Analysis, 2008,28(3):624-628.; Soil classification method using multi-layer perceptron neural network model combined with spectral characteristic parameters, Liu Huanjun, Zhang Xinle, etc. Chinese patent. CN 106650819A .2017-05-10.), there are fewer relevant soil types in this method, and the BP neural network method has certain advantages. However, when faced with many soil types and a large number of soil samples, the learning time of this method is too long, and may even fail to achieve the purpose of learning, so when faced with many soil types and a large number of soil sample data, the overall classification effect is not good. not ideal. In addition, only 0-20cm plow layer soil samples were used in related methods, and the soil spectral information at different depths in the same section was not fully utilized.
发明内容Contents of the invention
针对上述技术问题,本发明拟针对土壤剖面中不同深度的土壤光谱信息,在提取训练集和测试集土壤光谱曲线特征的基础上,基于KNN分类方法,准确、快速地进行测试集土壤剖面的土壤类型识别。In view of the above-mentioned technical problems, the present invention aims at the soil spectral information at different depths in the soil profile, on the basis of extracting the characteristics of the soil spectral curves of the training set and the test set, and based on the KNN classification method, accurately and quickly perform the soil analysis of the soil profile of the test set. type identification.
为了实现上述技术目的,本发明采用如下具体技术方案:In order to realize above-mentioned technical purpose, the present invention adopts following concrete technical scheme:
一种基于KNN分类进行土壤剖面类型识别方法,包括以下几个步骤:A method for identifying soil profile types based on KNN classification, comprising the following steps:
S1、针对一光谱曲线,提取其波谷特征;S1. Aiming at a spectral curve, extracting its trough features;
S2、针对一光谱曲线,提取其波峰特征;S2. Aiming at a spectral curve, extracting its peak features;
S3、针对训练集和测试集数据,提取土壤光谱曲线波谷特征,存入数据集合 c1;S3. According to the training set and test set data, extract the trough characteristics of the soil spectral curve, and store them in the data set c1;
S4、针对训练集和测试集数据,经差分求导处理后,采用步骤S1和步骤S2 方法,提取土壤光谱一阶导数曲线波峰波谷特征,存入数据集合c2;S4. For the training set and the test set data, after differential derivation processing, the method of step S1 and step S2 is used to extract the peak and valley characteristics of the first order derivative curve of the soil spectrum, and store it in the data set c2;
S5、合并步骤S3和步骤S4分别得到的数据集合c1、c2,得到属性数据集L,对属性数据集L进行归一化操作后,基于KNN分类方法,进行测试集土壤光谱曲线的土壤类型识别;S5. Combine the data sets c1 and c2 respectively obtained in step S3 and step S4 to obtain the attribute data set L. After normalizing the attribute data set L, based on the KNN classification method, carry out the soil type identification of the soil spectral curve of the test set ;
S6、基于最大占比原则,确定测试集土壤剖面的土壤类型。S6. Based on the principle of maximum proportion, determine the soil type of the soil profile of the test set.
所述步骤S1具体包括:The step S1 specifically includes:
S1.1:波谷提取,利用波谷提取算法提取波谷,并存入集合 G={gb|b=0,…,M-1}中,其中,M为波谷数量,gb={r'a|a=0,…,N-1}为一波谷元素集合,N为该波谷中的点的数量;S1.1: Valley extraction, using the valley extraction algorithm to extract valleys and store them in the set G={g b |b=0,...,M-1}, where M is the number of valleys, g b ={r' a |a=0,...,N-1} is a set of trough elements, and N is the number of points in the trough;
S1.2:波谷特征提取,针对一波谷gb,执行以下操作:S1.2: Valley feature extraction, for a wave valley g b , perform the following operations:
a)提取出满足下述条件的最小值点r'min,该点即为该波谷的谷底点; r'min≤r'c(c=0,..,N-1)a) Extract the minimum value point r' min meeting the following conditions, which is the bottom point of the valley; r' min ≤ r' c (c=0,...,N-1)
其中,r'c为该波谷中任一点处的光谱反射率值;Wherein, r'c is the spectral reflectance value at any point in the trough;
b)根据公式(1)和公式(2),计算该波谷的深度H和宽度Q;b) Calculate the depth H and width Q of the trough according to formula (1) and formula (2);
H=(r'0+r'N-1)/2-r'min (1)H=(r' 0 +r' N-1 )/2-r' min (1)
Q=N (2)Q=N (2)
其中,r'0为波谷起始点值,r'N-1为波谷终止点值。Among them, r' 0 is the value of the starting point of the trough, and r' N-1 is the value of the ending point of the trough.
c)循环执行步骤a)至步骤b),直至完成该光谱曲线所有波谷的特征提取;c) cyclically execute step a) to step b), until the feature extraction of all valleys of the spectral curve is completed;
d)将不同波谷的谷底点波段位置min,谷底点值r'min,波谷深度H和波谷宽度Q逐行保存到矩阵VM*4中。d) Save the valley point band position min, valley point value r' min , valley depth H and valley width Q of different valleys into the matrix V M*4 row by row.
所述步骤S2具体包括:Described step S2 specifically comprises:
S2.1:波峰提取,利用波峰提取算法提取波峰,并存入集合 G'={g'b'|b'=0,…,M'-1}中,其中M'为波峰数量,g'b'={r”a'|a'=0,…,N'-1}为一波峰元素集合,N'为该波峰中的点数量;S2.1: Peak extraction, use the peak extraction algorithm to extract the peaks, and store them in the set G'={g'b'|b'=0,...,M'-1}, where M' is the number of peaks, g'b' = {r” a' |a'=0,...,N'-1} is a set of peak elements, and N' is the number of points in the peak;
S2.2:波峰特征提取,针对一波峰g'b',执行以下操作:S2.2: Peak feature extraction, for a peak g'b' , perform the following operations:
a)提取出满足下述条件的最大值点r”max,该点即为该波峰的峰顶点;a) Extract the maximum value point r" max that meets the following conditions, and this point is the peak apex of the wave peak;
r”max≥r”c'(c'=0,..,N'-1)r" max ≥ r" c '(c'=0,...,N'-1)
其中,r”c'为该波峰中任一点处的光谱反射率值;Wherein, r"c' is the spectral reflectance value at any point in the peak;
b)根据公式(3),(4),计算该波峰的深度H'和宽度Q';b) According to the formula (3), (4), calculate the depth H' and the width Q' of the peak;
H'=(r”0+r”N'-1)/2-r”max (3)H'=(r” 0 +r” N'-1 )/2-r” max (3)
Q'=N' (4)Q'=N' (4)
其中,r”0为波峰起始点值,r”N'-1为波峰终止点值。Among them, r” 0 is the value of the starting point of the peak, and r” N’-1 is the value of the ending point of the peak.
c)循环执行步骤a)至步骤b),直至完成该光谱曲线所有波峰的特征提取;c) cyclically execute step a) to step b), until the feature extraction of all peaks of the spectral curve is completed;
d)将不同波峰的峰顶点波段位置max,峰顶点值r”max,波峰高度H'和波峰宽度Q'逐行保存到矩阵V'M'*4中。d) Save the peak apex band position max, peak apex value r” max , peak height H' and peak width Q' of different peaks into the matrix V'M'*4 row by row.
所述步骤S3具体包括:Described step S3 specifically comprises:
S3.1:读取训练集和测试集中任一土壤剖面光谱数据,采用等积二次样条插值方法,针对土壤剖面各发生层的反射率值,进行深度插值处理,获得预设距离间隔、不同深度处的土壤光谱反射率T={ti,j|i=0,...,n-1;j=0,...,m-1},其中,n表示插值后的土壤光谱曲线数量,m表示土壤光谱波段数,ti,j表示插值所生成的第i条光谱曲线在波段j处的反射率值;S3.1: Read the spectral data of any soil profile in the training set and test set, adopt the equal-area quadratic spline interpolation method, and perform depth interpolation processing for the reflectance values of each occurrence layer of the soil profile to obtain the preset distance interval, Soil spectral reflectance at different depths T={t i,j |i=0,...,n-1; j=0,...,m-1}, where n represents the soil spectrum after interpolation The number of curves, m represents the number of soil spectral bands, t i,j represents the reflectance value of the i-th spectral curve generated by interpolation at band j;
S3.2:数据平滑,针对经深度插值处理所获得的土壤光谱反射率,进行11 点移动平均平滑处理,得到平滑后数据集合T';S3.2: data smoothing, for the soil spectral reflectance obtained through depth interpolation processing, perform 11-point moving average smoothing processing to obtain the smoothed data set T';
S3.3:包络线去处处理,利用包络线去除法,对T'中任一光谱曲线进行归一化处理,结果存入集合R={re|e=0,…,h-1}中;其中,re表示该光谱曲线在波段e+350 处反射率的归一化结果,h为该光谱曲线波段数量;S3.3: Envelope removal processing, use the envelope removal method to normalize any spectral curve in T', and store the results in the set R={r e |e=0,...,h-1 }; where r e represents the normalized result of the reflectance of the spectral curve at the band e+350, and h is the number of bands of the spectral curve;
S3.4:波谷特征提取,对集合R中插值土层数据执行前述步骤S3,得到各插值土层土壤光谱曲线特征矩阵SP*4,其中,P表示该插值土层光谱曲线的波谷数量;抽取矩阵S的前两个波谷特征,保存至集合c1中;S3.4: trough feature extraction, perform the aforementioned step S3 on the interpolation soil layer data in the set R, obtain the characteristic matrix S P*4 of the soil spectral curve of each interpolation soil layer, wherein, P represents the number of troughs of the interpolation soil layer spectral curve; Extract the first two trough features of the matrix S and save them in the set c1;
S3.5:循环执行步骤S3.1至步骤S3.4,直至完成所有土壤光谱剖面的数据处理。S3.5: cyclically execute steps S3.1 to S3.4 until the data processing of all soil spectral profiles is completed.
所述步骤S4具体包括:Described step S4 specifically comprises:
S4.1:利用前述步骤S3.3得到任一土壤剖面光谱数据平滑后数据集合T';S4.1: Utilize the aforementioned steps S3.3 to obtain the smoothed data set T' of any soil profile spectral data;
S4.2:根据公式(5),对数据T'进行差分和放大处理,结果存入集合 Y={yi,j|i=0,...,n-1;j=0,...,m-1}中;S4.2: According to the formula (5), the data T' is differentially and amplified, and the result is stored in the set Y={y i, j |i=0,...,n-1; j=0,... .,m-1} in;
其中,D为放大因子;Among them, D is the amplification factor;
S4.3:包络线去除处理,利用包络线去除法,对集合Y中任一光谱曲线进行归一化处理,结果存入集合R={re|e=0,…,h-1}中;其中,re表示该光谱曲线在波段e+350处反射率的归一化结果,h为该光谱曲线波段数;S4.3: Envelope removal processing, use the envelope removal method to normalize any spectral curve in the set Y, and store the results in the set R={r e |e=0,...,h-1 }; where r e represents the normalized result of the reflectivity of the spectral curve at the band e+350, and h is the number of bands of the spectral curve;
S4.4:波谷特征提取,对集合R中插值土层数据执行前述步骤S4,得到各插值土层土壤光谱曲线特征矩阵UX*4,其中,X表示该插值土层一阶导数曲线的波谷数量;选取各插值土层土壤光谱曲线特征矩阵UX*4中第一个波谷的谷底值与谷底波段作为该插值土层的土壤光谱一阶导数曲线波谷特征保存至集合c2中;S4.4: Wave trough feature extraction, perform the aforementioned step S4 on the interpolation soil layer data in the set R, and obtain the soil spectral curve characteristic matrix U X*4 of each interpolation soil layer, where X represents the trough of the first-order derivative curve of the interpolation soil layer Quantity; select the bottom value and the bottom wave band of the first trough in each interpolation soil layer soil spectral curve characteristic matrix U X * 4 as the soil spectrum first derivative curve trough feature of the interpolation soil layer and save it in the set c2;
S4.5:波峰特征提取,对集合Y中任一插值土层数据执行前述步骤S2,得到各插值土层土壤光谱曲线特征矩阵WZ*4,其中,Z表示该插值土层一阶导数曲线的波峰数量;选取各插值土层土壤光谱曲线特征矩阵WZ*4中第一个波峰的峰顶值与峰顶波段作为该插值土层的土壤光谱一阶导数曲线波峰特征保存至集合 c2中;S4.5: Peak feature extraction, perform the aforementioned step S2 on any interpolation soil layer data in the set Y, and obtain the soil spectral curve characteristic matrix W Z*4 of each interpolation soil layer, where Z represents the first-order derivative curve of the interpolation soil layer The number of peaks; select the peak value and peak band of the first peak in the soil spectral curve characteristic matrix W Z*4 of each interpolation soil layer as the peak characteristic of the soil spectrum first derivative curve of the interpolation soil layer and save it in the set c2 ;
S4.6:循环执行步骤S4.1至S4.5,直至完成所有土壤光谱剖面的数据处理。S4.6: cyclically execute steps S4.1 to S4.5 until the data processing of all soil spectral profiles is completed.
所述步骤S5具体包括:Described step S5 specifically comprises:
S5.1:合并步骤S3和步骤S4分别得到的数据集合c1、c2,得到属性数据集 L={li,j|i=0,...,l1-1;j=0,...,l2-1},其中,l1表示全部土壤剖面插值土层数量,l2表示每个土层特征数量;S5.1: Combine the data sets c1 and c2 respectively obtained in step S3 and step S4 to obtain attribute data set L={l i,j |i=0,...,l1-1; j=0,... ,l2-1}, where, l1 represents the number of interpolated soil layers of the entire soil profile, and l2 represents the number of characteristics of each soil layer;
S5.2:根据公式(6),对数据集L中所有特征元素li,j进行归一化操作,得到归一化后特征集合L';S5.2: According to the formula (6), perform normalization operation on all feature elements l i,j in the data set L, and obtain the normalized feature set L';
l'i,j=(li,j-lmin,j)/(lmax,j-lmin,j) (6)l' i,j =(l i,j -l min,j )/(l max,j -l min,j ) (6)
其中,lmin,j为所有插值土层第j个特征的最小值,lmax,j为所有插值土层第j 个特征的最大值;Among them, l min,j is the minimum value of the jth feature of all interpolation soil layers, and l max,j is the maximum value of the jth feature of all interpolation soil layers;
S5.3:设置参数k,调用KNN算法,得到测试集样本各插值土层光谱曲线的分类结果。S5.3: Set the parameter k, call the KNN algorithm, and obtain the classification results of the interpolated soil layer spectral curves of the test set samples.
所述步骤S6具体包括:Described step S6 specifically comprises:
S6.1:计算一土壤剖面中各插值土层光谱曲线分类结果中各土壤类型的比重λ(A);找到λ(A)的最大值MAXλ(A),则认为该剖面为类A;S6.1: Calculate the proportion λ(A) of each soil type in the classification results of each interpolated soil layer spectral curve in a soil profile; find the maximum value MAX λ(A) of λ(A) , then consider the profile to be class A;
S6.2:循环执行步骤S6.1,直至完成测试集中所有土壤剖面的土壤类型判别。S6.2: Step S6.1 is executed cyclically until the soil type discrimination of all soil profiles in the test set is completed.
本发明与现有的土壤识别技术相比,具有以下有益效果:Compared with the existing soil identification technology, the present invention has the following beneficial effects:
本发明提出了一种综合利用包络线去除处理后土壤光谱曲线特征和求导处理后土壤光谱曲线特征,运用KNN分类方法进行土壤剖面类型快速识别的方法,该方法主要具有以下特点:The present invention proposes a method of comprehensively utilizing the characteristics of the soil spectral curve after envelope removal processing and the soil spectral curve characteristics after derivation processing, and using the KNN classification method to quickly identify the type of soil profile. The method mainly has the following characteristics:
1)充分利用了不同深度土壤样本的光谱信息。1) Make full use of the spectral information of soil samples at different depths.
2)综合利用了土壤光谱曲线特征和求导处理后土壤光谱曲线特征。2) The characteristics of the soil spectral curve and the characteristics of the soil spectral curve after derivation processing are comprehensively used.
3)使用的KNN方法,比BP神经网络方法,在超高维分类方面具有更大优势,满足在样本数据维度高、土壤类型较多的情况下使用。3) Compared with the BP neural network method, the KNN method used has greater advantages in ultra-high-dimensional classification, which can be used in the case of high-dimensional sample data and many soil types.
附图说明Description of drawings
图1为本发明方法的流程图;Fig. 1 is the flowchart of the inventive method;
具体实施方式Detailed ways
下面结合附图和实施例对本发明的技术方案做进一步详细说明。The technical solutions of the present invention will be described in further detail below in conjunction with the accompanying drawings and embodiments.
本实施例使用的土壤样本采自649个剖面。这些剖面按照中国土壤系统分类划分为10个土纲、23个亚纲、56个土类及120个亚类。采用Cary 5000分光光度计(AgilentTechnologies)测量样本的350-2500nm漫反射光谱,光谱采样间隔为1nm。The soil samples used in this example were collected from 649 profiles. These profiles are divided into 10 soil classes, 23 subclasses, 56 soil classes and 120 subclasses according to the Chinese Soil System Classification. A Cary 5000 spectrophotometer (Agilent Technologies) was used to measure the 350-2500 nm diffuse reflectance spectrum of the sample, and the spectral sampling interval was 1 nm.
本实施例选择其中的553个土壤光谱剖面数据作为训练集,96个土壤光谱剖面数据作为测试集。针对数据预处理、光谱特征提取、基于KNN的光谱分类、土壤剖面类型识别等的整个过程,进一步详细说明本发明。图1为本发明方法的流程图。In this embodiment, 553 soil spectral profile data are selected as a training set, and 96 soil spectral profile data are selected as a test set. For the whole process of data preprocessing, spectral feature extraction, spectral classification based on KNN, soil profile type identification, etc., the present invention is further described in detail. Fig. 1 is the flowchart of the method of the present invention.
1.土壤光谱曲线特征提取。1. Feature extraction of soil spectral curves.
1-1、读取训练集和测试集中任一土壤剖面光谱数据,设置插值间隔为1cm,采用等积二次样条插值方法,针对土壤剖面各插值土层的反射率值,进行深度插值处理,获得不同深度处以1cm为间隔的土壤光谱反射率 T={ti,j|i=0,...,73432;j=0,...,2150},如下表1所示。1-1. Read the spectral data of any soil profile in the training set and test set, set the interpolation interval to 1cm, and use the equal-area quadratic spline interpolation method to perform depth interpolation processing for the reflectance values of each interpolated soil layer in the soil profile , obtain soil spectral reflectance T={t i,j |i=0,...,73432; j=0,...,2150} at different depths at intervals of 1 cm, as shown in Table 1 below.
表1Table 1
1-2、针对经深度插值处理所获得的土壤光谱反射率ti,j,进行11点移动平均平滑处理,得到平滑后数据集合T',如下表2所示。1-2. For the soil spectral reflectance t i,j obtained through depth interpolation, perform 11-point moving average smoothing to obtain the smoothed data set T', as shown in Table 2 below.
表2Table 2
1-3、波谷特征提取。对集合T′中任一插值土层数据进行包络线去除处理,执行前述步骤S1,得到各插值土层土壤光谱曲线特征矩阵。如下表3所示;1-3. Valley feature extraction. Perform envelope removal processing on any interpolated soil layer data in the set T′, and perform the aforementioned step S1 to obtain the soil spectral curve characteristic matrix of each interpolated soil layer. As shown in Table 3 below;
表3table 3
2.土壤光谱一阶导数曲线特征提取。2. Feature extraction of soil spectral first derivative curve.
2-1、利用前述步骤S3.3得到土壤剖面光谱数据平滑后数据集合T′(如表2 所示);2-1. Using the aforementioned step S3.3 to obtain the smoothed data set T′ of the soil profile spectral data (as shown in Table 2);
2-2、根据公式(5),对数据T′进行差分和放大处理,结果存入集合Y中,如下表4所示;2-2. According to the formula (5), the data T' is differentially and amplified, and the result is stored in the set Y, as shown in Table 4 below;
表4Table 4
2-3、波谷特征提取,对集合Y中任一插值土层数据进行包络线去除处理,执行前述步骤S1,得到各插值土层土壤光谱一阶导数曲线波谷特征矩阵U。选取各插值土层土壤光谱一阶导数曲线波谷特征矩阵U中第一个波谷的谷底值与谷底波段作为该插值土层的一阶导数曲线波谷特征保存至集合c2中;2-3. Valley feature extraction: Perform envelope removal processing on any interpolated soil layer data in the set Y, and perform the aforementioned step S1 to obtain the valley feature matrix U of the first-order derivative curve of the soil spectrum of each interpolated soil layer. Select the valley bottom value and the valley bottom wave band of the first valley in the first derivative curve valley feature matrix U of each interpolation soil layer soil spectrum as the first derivative curve valley characteristics of the interpolation soil layer and save them in the set c2;
2-4、波峰特征提取,对集合Y中任一插值土层数据进行包络线去除处理,执行前述步骤S2,得到各插值土层土壤光谱一阶导数曲线波峰特征矩阵W。选取各插值土层土壤光谱一阶导数曲线波峰特征矩阵W中第一个波峰的峰顶值与峰顶波段作为该插值土层的一阶导数曲线波峰特征保存至集合c2中;2-4. Peak feature extraction: Perform envelope removal processing on any interpolated soil layer data in the set Y, and perform the aforementioned step S2 to obtain the peak characteristic matrix W of the first-order derivative curve of the soil spectrum of each interpolated soil layer. Select the peak value and peak band of the first peak in the peak feature matrix W of the soil spectrum first-order derivative curve of each interpolation soil layer as the peak feature of the first-order derivative curve of the interpolation soil layer and save them in the set c2;
2-5、循环执行步骤2-1至2-4,直至完成训练集和测试集中所有土壤光谱剖面的数据处理,如下表5所示;2-5. Perform steps 2-1 to 2-4 in a loop until the data processing of all soil spectral profiles in the training set and test set is completed, as shown in Table 5 below;
表5table 5
3.测试集土壤插值土层光谱曲线的土壤类型识别。3. Soil type identification of test set soil interpolation soil layer spectral curve.
3-1、合并数据集合c1、c2,得到特征数据集L,参与计算的曲线特征主要包括:土壤光谱曲线差值深度UpperDepth、LowerDepth,第一个吸收谷的谷底位置Position1、谷底值Value1、波谷深度Depth1、波谷宽度xDistance1,第二个吸收谷的谷底位置Position2、谷底值Value2、波谷深度Depth2、波谷宽度 xDistance2,土壤光谱一阶导数曲线第一个吸收谷的谷底位置P1、谷底值V1,第一个吸收峰的峰顶位置P2、峰顶值V2;如下表6所示;3-1. Merge the data sets c1 and c2 to obtain the feature data set L. The curve features involved in the calculation mainly include: soil spectral curve difference depth UpperDepth, LowerDepth, the position of the bottom of the first absorption valley Position1, the bottom value Value1, and the bottom of the wave Depth1, trough width xDistance1, the position of the bottom of the second absorption valley Position2, the value of the bottom of the valley Value2, the depth of the trough Depth2, the width of the trough xDistance2, the position of the bottom of the first absorption valley of the soil spectrum first derivative curve P1, the bottom of the valley value V1, the first The peak position P2 and the peak value V2 of an absorption peak; as shown in Table 6 below;
表6Table 6
3-2、根据公式(6),对数据集L中所有特征元素li,j进行归一化操作,得到归一化后特征集合L′,如下表7所示;3-2. According to the formula (6), perform normalization operation on all feature elements l i, j in the data set L to obtain the normalized feature set L′, as shown in Table 7 below;
表7Table 7
3-3、设置参数k=201,使用R.NET调用KNN算法,得到测试集样本各插值土层光谱曲线的分类结果,如下表8所示;3-3. Set the parameter k=201, use R.NET to call the KNN algorithm, and obtain the classification results of each interpolated soil layer spectral curve of the test set sample, as shown in Table 8 below;
表8Table 8
4.测试集土壤光谱剖面的土壤类型判别4. Soil type discrimination of test set soil spectral profile
4-1、计算测试集中第一个土壤剖面中各差值土层光谱曲线分类结果中各土壤类型的比重λ(A),如下表9所示,判断该剖面为干润砂质新成土;4-1. Calculate the proportion λ(A) of each soil type in the classification results of the spectral curves of the differential soil layers in the first soil profile in the test set, as shown in Table 9 below, and judge that the profile is dry sandy new soil ;
表9Table 9
4-2、循环执行步骤4-1,直至完成测试集中所有土壤剖面的土壤类型判别,结果如下表10所示;4-2. Repeat step 4-1 until the soil type discrimination of all soil profiles in the test set is completed, and the results are shown in Table 10 below;
表10Table 10
上述应用实施例中,仅进行了土壤土类的识别。该方法同样可适用于土纲、亚纲、亚类等不同级别土壤类型的识别;并且本实施例中,仅基于可见-近红外漫反射光谱数据进行土壤类型的识别,该方法同样可适用于中红外漫反射光谱等其它类型的土壤光谱数据。In the above application examples, only the identification of soil types is performed. This method is also applicable to the identification of soil types at different levels such as soil classes, subclasses, and subclasses; and in this embodiment, the identification of soil types is only based on visible-near-infrared diffuse reflectance spectral data, and this method is also applicable to Other types of soil spectral data such as mid-infrared diffuse reflectance spectroscopy.
5.测试分析。5. Test analysis.
由上述实施例可知:在土壤剖面的土类识别层面,该识别方法对于淡色潮湿雏形土,简育水耕人为土,铁聚水耕人为土,黏化湿润富铁土,潜育水耕人为土等土类的识别率达到了60%以上。本实施例中,测试集数据涵盖6个省份,涉及21 个土壤类型、96个土壤样品,整体分类精度达到了54.8%。随着训练集剖面数据的不断丰富和不同类型土壤剖面数据的不断平衡,识别精度将不断提高。It can be seen from the above-mentioned examples that: at the level of soil type identification of the soil profile, the identification method is suitable for light-colored moist rudimentary soil, simplified hydroponic artificial soil, iron-accumulating hydroponic artificial soil, viscose moist iron-rich soil, gleation hydroponic artificial soil, etc. The recognition rate of soil type has reached more than 60%. In this embodiment, the test set data covers 6 provinces, involves 21 soil types and 96 soil samples, and the overall classification accuracy reaches 54.8%. With the continuous enrichment of profile data in the training set and the continuous balance of different types of soil profile data, the recognition accuracy will continue to improve.
与刘焕军等(2008,2017)的方法相比,本方法有以下特点:Compared with the method of Liu Huanjun et al. (2008, 2017), this method has the following characteristics:
1)充分利用了不同深度土壤样本的光谱信息;1) Make full use of the spectral information of soil samples at different depths;
2)利用了土壤光谱曲线特征和求导处理后土壤光谱曲线特征;2) Utilize the characteristics of the soil spectral curve and the characteristics of the soil spectral curve after derivation processing;
3)使用的KNN方法,比BP神经网络方法,在超高维分类方面具有更大优势,可满足在样本数据维度高、土壤类型较多的情况下使用。3) The KNN method used has greater advantages in ultra-high-dimensional classification than the BP neural network method, and can be used in the case of high-dimensional sample data and many soil types.
Claims (7)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710430616.6A CN107657264B (en) | 2017-06-09 | 2017-06-09 | KNN classification-based soil profile type identification method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710430616.6A CN107657264B (en) | 2017-06-09 | 2017-06-09 | KNN classification-based soil profile type identification method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107657264A true CN107657264A (en) | 2018-02-02 |
CN107657264B CN107657264B (en) | 2020-11-06 |
Family
ID=61127534
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710430616.6A Expired - Fee Related CN107657264B (en) | 2017-06-09 | 2017-06-09 | KNN classification-based soil profile type identification method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107657264B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111693491A (en) * | 2020-07-30 | 2020-09-22 | 重庆理工大学 | Method for measuring refractive index of transparent fluid based on Fabry-Perot interference |
CN112580697A (en) * | 2020-12-04 | 2021-03-30 | 国网山东省电力公司电力科学研究院 | Method and system for selecting grounding of power transmission line tower |
CN114324216A (en) * | 2022-01-06 | 2022-04-12 | 中国科学院南京土壤研究所 | Soil numerical value classification method based on soil layer combination characteristics |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070073491A1 (en) * | 2005-09-14 | 2007-03-29 | The Regents Of The University Of California | Method for soil content prediction based on a limited number of mid-infrared absorbances |
CN102096825A (en) * | 2011-03-23 | 2011-06-15 | 西安电子科技大学 | Graph-based semi-supervised high-spectral remote sensing image classification method |
CN102565058A (en) * | 2011-12-26 | 2012-07-11 | 北京林业大学 | Soil section analysis device and method based on image processing |
CN105758819A (en) * | 2016-02-29 | 2016-07-13 | 上海交通大学 | Method for detecting organic components of soil by utilizing near infrared spectrum |
CN106126879A (en) * | 2016-06-07 | 2016-11-16 | 中国科学院合肥物质科学研究院 | A kind of soil near-infrared spectrum analysis Forecasting Methodology based on rarefaction representation technology |
CN106124449A (en) * | 2016-06-07 | 2016-11-16 | 中国科学院合肥物质科学研究院 | A kind of soil near-infrared spectrum analysis Forecasting Methodology based on degree of depth learning art |
CN106650819A (en) * | 2016-12-30 | 2017-05-10 | 东北农业大学 | Soil classification method through combination of multi-layer perceptron neural networks with spectral characteristic parameters |
-
2017
- 2017-06-09 CN CN201710430616.6A patent/CN107657264B/en not_active Expired - Fee Related
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070073491A1 (en) * | 2005-09-14 | 2007-03-29 | The Regents Of The University Of California | Method for soil content prediction based on a limited number of mid-infrared absorbances |
CN102096825A (en) * | 2011-03-23 | 2011-06-15 | 西安电子科技大学 | Graph-based semi-supervised high-spectral remote sensing image classification method |
CN102565058A (en) * | 2011-12-26 | 2012-07-11 | 北京林业大学 | Soil section analysis device and method based on image processing |
CN105758819A (en) * | 2016-02-29 | 2016-07-13 | 上海交通大学 | Method for detecting organic components of soil by utilizing near infrared spectrum |
CN106126879A (en) * | 2016-06-07 | 2016-11-16 | 中国科学院合肥物质科学研究院 | A kind of soil near-infrared spectrum analysis Forecasting Methodology based on rarefaction representation technology |
CN106124449A (en) * | 2016-06-07 | 2016-11-16 | 中国科学院合肥物质科学研究院 | A kind of soil near-infrared spectrum analysis Forecasting Methodology based on degree of depth learning art |
CN106650819A (en) * | 2016-12-30 | 2017-05-10 | 东北农业大学 | Soil classification method through combination of multi-layer perceptron neural networks with spectral characteristic parameters |
Non-Patent Citations (3)
Title |
---|
A. M. SALEH ET AL.: "Identification and Mapping of Some Soil Types Using Field Spectrometry and Spectral Mixture Analyses: A Case Study of North Sinai, Egypt", 《ARAB J GEOSCI》 * |
刘焕军 等: "基于反射光谱特性的土壤分类研究", 《光谱学与光谱分析》 * |
郭熙 等: "高光谱特征辨别潴育型麻沙泥田和潮沙泥田水稻土", 《农业工程学报》 * |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111693491A (en) * | 2020-07-30 | 2020-09-22 | 重庆理工大学 | Method for measuring refractive index of transparent fluid based on Fabry-Perot interference |
CN111693491B (en) * | 2020-07-30 | 2023-01-06 | 重庆理工大学 | Method for Measuring Refractive Index of Transparent Fluid Based on Far-Pertin Interferometry |
CN112580697A (en) * | 2020-12-04 | 2021-03-30 | 国网山东省电力公司电力科学研究院 | Method and system for selecting grounding of power transmission line tower |
CN112580697B (en) * | 2020-12-04 | 2023-05-26 | 国网山东省电力公司电力科学研究院 | Power transmission line tower grounding selection method and system |
CN114324216A (en) * | 2022-01-06 | 2022-04-12 | 中国科学院南京土壤研究所 | Soil numerical value classification method based on soil layer combination characteristics |
Also Published As
Publication number | Publication date |
---|---|
CN107657264B (en) | 2020-11-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108416686B (en) | A classification method of eco-geological environment types based on coal resource development | |
CN107727592B (en) | A coal-rock interface identification method based on coal-rock hyperspectral reflection characteristics | |
Jin et al. | Spatio-temporal distribution of NDVI and its influencing factors in China | |
CN111696123A (en) | Remote sensing image water area segmentation and extraction method based on super-pixel classification and identification | |
CN113255986B (en) | Multi-step daily runoff forecasting method based on meteorological information and deep learning algorithm | |
CN102663417B (en) | Feature selection method for pattern recognition of small sample data | |
CN113887635B (en) | A kind of watershed similarity classification method and classification device | |
Duan et al. | Using remote sensing to identify soil types based on multiscale image texture features | |
CN104502288A (en) | Soil lead content measurement method using visible and near-infrared spectroscopy technology | |
CN107064177B (en) | Water Content Recognition Method of UWB Soil Signal Based on Adaptive Fuzzy Inference | |
CN105424641A (en) | Crude oil type near infrared spectrum identification method | |
CN111882573B (en) | A method and system for extracting cultivated land plots based on high-resolution image data | |
Huang et al. | Detection of scab in wheat ears using in situ hyperspectral data and support vector machine optimized by genetic algorithm | |
CN107657264A (en) | One kind carries out soil profile kind identification method based on KNN classification | |
CN111652092A (en) | A method for monitoring forest cover changes based on Sentinel-2A data | |
CN110378925B (en) | Ecological water reserve estimation method of airborne L iDAR and multispectral remote sensing technology | |
Bressane et al. | Statistical analysis of texture in trunk images for biometric identification of tree species | |
CN112697218B (en) | Reservoir capacity curve reconstruction method | |
Wang et al. | The minimum level for soil allocation using topsoil reflectance spectra: Genus or species? | |
CN115753633B (en) | Non-contact tunnel face surrounding rock water content detection method and system | |
CN109784142A (en) | A kind of EO-1 hyperion object detection method based on condition random projection | |
CN107192671B (en) | A kind of soil types recognition methods based on spectrum SURFACES MATCHING | |
Zheng et al. | Extraction of impervious surface with Landsat based on machine learning in Chengdu urban, China | |
Li et al. | Deterioration identification of stone cultural heritage based on hyperspectral image texture features | |
CN118351980B (en) | Method and system for detecting performance of concrete material |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20201106 |
|
CF01 | Termination of patent right due to non-payment of annual fee |