WO2021052240A1 - Laser probe classification method and device capable of automatically selecting spectral lines on basis of image features - Google Patents
Laser probe classification method and device capable of automatically selecting spectral lines on basis of image features Download PDFInfo
- Publication number
- WO2021052240A1 WO2021052240A1 PCT/CN2020/114530 CN2020114530W WO2021052240A1 WO 2021052240 A1 WO2021052240 A1 WO 2021052240A1 CN 2020114530 W CN2020114530 W CN 2020114530W WO 2021052240 A1 WO2021052240 A1 WO 2021052240A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- image
- spectral
- classification
- laser probe
- feature
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2218/00—Aspects of pattern recognition specially adapted for signal processing
- G06F2218/12—Classification; Matching
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
- G06F18/241—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
- G06F18/2411—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on the proximity to a decision surface, e.g. support vector machines
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/20—Image preprocessing
- G06V10/30—Noise filtering
Definitions
- the invention belongs to the related technical field of laser probe component analysis, and more specifically, relates to a laser probe classification method and device for automatically selecting spectral lines based on image features.
- Laser probes are laser-induced breakdown spectroscopy (LIBS), which is an elemental analysis technology that uses plasma spectra generated by laser focusing on the sample surface to analyze the composition and content of substances.
- LIBS laser-induced breakdown spectroscopy
- XRD X-ray diffusion
- XRF X Ray Fluorescence
- ICP-MS Inductively coupled plasma-Mass Spectrometry
- LIBS technology has simple sample preparation and can achieve rapid in-situ Advantages such as detection.
- LIBS technology has been widely used in pesticide residue detection, geological survey, rock and ore detection and other fields, and research related to its analysis methods has also developed rapidly.
- the choice of analysis line has a crucial influence on the analysis structure.
- the current commonly used method of line selection is still the traditional manual line selection method.
- the manual line selection method is generally based on multiple factors such as spectral intensity, background intensity, signal-to-background ratio, signal-to-noise ratio, and whether there is self-absorption. Comprehensive judgment to select the analysis line, therefore, manual line selection has a higher accuracy rate.
- the existing automatic line selection method has also developed to a certain extent, such as the paper "In situ classification of rocks using stand-off laser induced breakdown spectroscopy with a compact spectrometer” (WTLi et al., Journal of Analytical Atomic Spectrometry 33.3 (2016): 461-467.) also proposed an automatic line selection method based on wavelet transform algorithm, and combined with LDA algorithm for rock classification.
- the automatic route selection method is not yet mature, and there is no method that can be universally applied and has a standardized operation process, and there are relatively few classification methods based on automatic route selection.
- the present invention provides a laser probe classification method and device that automatically selects spectral lines based on image features, which solves the problem of low line selection efficiency and easy line selection results in the existing classification methods. Affected by human factors, the analysis process is time-consuming and the analysis performance is poor. The analysis method can automatically perform the line selection process before classification, and effectively avoid human factors while improving the line selection efficiency, thereby improving the classification efficiency and classification accuracy.
- a laser probe classification method that automatically selects spectral lines based on image features.
- the laser probe classification method includes the following steps:
- step (1) firstly, the plasma spectrum is displayed graphically, and the size of the spectral image is set; then, the spectral line area of the plasma spectrum displayed in the graphical display is intercepted, and the intercepted spectral line area is stored Is an image, from which a spectral image is obtained.
- the image feature is a corner feature
- the corner feature is an acceleration section test feature, a minimum feature value feature, or a Harris feature.
- the point set CornerSet4 is the set of corner points corresponding to the analysis line to be sought.
- the actual spectral wavelength value and the coordinate value of the spectral image feature of the two different points in the plasma spectrum are determined according to the correspondence between the historical spectrum and the spectral image; the actual spectral wavelength value and the spectral image characteristic coordinate value are compared according to the obtained coordinates of the two points.
- the coordinate values of the image features are linearly fitted to obtain a linear relationship expression, and then the extracted image feature coordinates are converted into the actual wavelength of the analysis line based on the linear relationship expression.
- the two points are respectively located at the front end and the back end of the spectral band.
- classification algorithm is any one of the following algorithms: linear discriminant analysis algorithm, support vector machine classification algorithm, neural network classification algorithm, and K nearest neighbor algorithm.
- step (3) the spectral intensity of the analysis line corresponding to the product to be classified is input into the classification model, and the classification model classifies the product to be classified according to the received spectral intensity data.
- a laser probe classification device that automatically selects spectral lines based on image features.
- the laser probe classification and analysis device uses the above-mentioned laser probe that automatically selects spectral lines based on image features. According to the classification method to classify the products to be classified.
- the laser probe classification method and device for automatically selecting spectral lines based on image features mainly has the following beneficial effects:
- the classification method is based on automatic line selection classification based on image features.
- the entire classification process does not require manual intervention, and the classification result is not affected by human factors.
- the method of the present invention Higher efficiency, stronger applicability, and more stable analysis results.
- This method recognizes the position of the corner point and the corresponding analysis line wavelength through image features before classification, and effectively extracts the analysis line with greater relative intensity through the detection of the top angle of the spectrum. The stronger the relative intensity of the spectral line, the more It is conducive to qualitative or quantitative analysis.
- the existing line selection method generally first performs algorithm transformation on the spectrum, and then selects the line by calculating the signal-to-background ratio or signal-to-noise ratio of the spectrum. In this process, the spectral background or noise There is often a large error in the determination of, which affects line selection and classification performance.
- the classification method provided by the present invention does not have the above problems.
- the image features can be corner features or other image features, where the corner features can be accelerated segment test features (FAST features), minimum feature value features (MinEigen features), Harris features;
- the classification algorithm can be commonly used Machine learning algorithms such as linear discriminant analysis algorithm, support vector machine algorithm, the above image features and classification algorithms can be combined with each other, so the method of automatic line selection and classification based on image features has better practicability and flexibility.
- Fig. 1 is a schematic flow chart of a laser probe classification method based on image features that automatically selects spectral lines according to the present invention
- FIG. 2 is a schematic diagram of a laser probe classification device that automatically selects spectral lines based on image features provided by the present invention
- Fig. 3 is a schematic diagram of the principle of Harris corner feature detection of spectral image involved in the laser probe classification method based on image feature automatic selection of spectral lines in Fig. 1;
- FIG. 4 is a schematic diagram of Harris corner screening involved in the laser probe classification method based on image feature automatic selection of spectral lines in FIG. 1;
- FIG. 5 is a schematic diagram of the Harris corner point detection process involved in the laser probe classification method based on image feature automatic selection of spectral lines in FIG. 1;
- FIG. 5 is a schematic diagram of the Harris corner point detection process involved in the laser probe classification method based on image feature automatic selection of spectral lines in FIG. 1;
- FIG. 6 are respectively the schematic diagrams of Harris corner screening results obtained by using the laser probe classification method of automatically selecting spectral lines based on image features in FIG. 1;
- Figure 7 is a schematic diagram of the analysis line position of manual line selection
- FIG. 8 is a schematic diagram of the correspondence between the coordinates of the image corner points and the actual wavelength of the analysis line involved in the laser probe classification method of automatically selecting spectral lines based on image features in FIG. 1;
- FIG. 9 is a schematic diagram of the linear relationship between the coordinates of the image corner points and the actual wavelength of the analysis line involved in the laser probe classification method based on the image feature automatically selecting the spectral line in FIG. 1;
- FIG. 10 are schematic diagrams of analysis results obtained by using the existing manual line selection classification method and the laser probe classification method of automatically selecting spectral lines based on image features in FIG. 1, respectively.
- the present invention provides a laser probe classification method that automatically selects spectral lines based on image features.
- the laser probe classification method first needs to convert the LIBS spectrum into a spectral image, and then Extract image features from the spectral image, then establish a linear correspondence between the image features and the wavelength of the analysis line and calculate the actual wavelength of the analysis line. Finally, extract the intensity of the analysis line and combine it with the classification algorithm to realize the identification and classification of the sample .
- the laser probe classification method mainly includes the following steps:
- the sample 7 is placed in the sample placement area of the laser probe classification device, and the control system and the optical path system of the laser probe classification device are combined to realize the spectrum collection of the plasma.
- the laser probe classification device for automatically selecting spectral lines based on image features provided by the present invention, the laser probe classification device includes a spectrometer 1, a laser 2, a control unit 3, a microprocessor 4, a collecting head 5, and a focusing mirror 6. , Connecting the line 8 and the optical fiber 9, the laser 2 and the focusing lens 6 are arranged along the horizontal direction.
- the control unit 3 is connected to the microprocessor 4, the control unit 3 is respectively connected to the spectrometer 1 and the laser 2 through the connecting wire 8, and the collection head 5 is connected to the optical fiber 9 through the optical fiber 9.
- the collecting head 5 is located above the focusing mirror 6 and forms a certain angle with the horizontal plane. After the collecting head 5, the plasma spectrum is transmitted to the spectrometer 1 via the optical fiber 9.
- the laser 2 is used to generate high energy density laser
- the focusing mirror 6 is used to focus the high energy density laser generated by the laser 2
- the control unit 3 is used to coordinate and control the operation of the laser 2 and the spectrometer 1 , And collect other sensor signals of the system.
- the collection head 5 is used to collect the plasma spectrum generated by the laser beam irradiated on the surface of the sample 7, and the microprocessor 4 is used to control the entire laser probe system and store the generated Spectral data.
- the high-energy-density laser beam generated by the laser 2 is focused by the focusing mirror 6 and then irradiated on the surface of the sample 7.
- the sample 7 is ablated by the high-energy-density laser beam to generate plasma, and the plasma emission spectrum After being collected by the collecting head 5, it is transmitted to the spectrometer 1 via the optical fiber 9.
- the entire spectrum collection process is realized through coordinated control of the control unit 3 and the microprocessor 4.
- the plasma spectrum is composed of a wavelength column and an intensity value column.
- the wavelength is the horizontal axis and the spectral intensity is the vertical axis; and in this embodiment, the horizontal and vertical axes need to be removed to intercept the spectrum. Display the area, and take the intercepted area as the spectral image.
- the resolution of the spectral image depends on the preset value.
- the plasma spectrum data is displayed graphically, and then the size of the spectral image is set, and the length of the image is L and the width is H, and then the spectral line region of the plasma surface spectrum displayed graphically is intercepted, This area is the entire spectral area excluding the abscissa and ordinate axis of the spectrum. Finally, the obtained L*H image area is stored as a PNG format image, which is a spectral image.
- S3 Perform image feature and image feature coordinate extraction on the spectral image, and identify the coordinate of the image feature in the spectral image.
- the image features can be corner features or other image texture features or shape features, etc.
- the corner features can be accelerated segment test features (FAST features), minimum feature value features (MinEigen features) or Harris features, etc.
- FAST features accelerated segment test features
- MinEigen features minimum feature value features
- Harris features etc.
- the parameter Q is the coefficient of determination of the image corner feature, the smaller the Q is, the more image corners can be detected in the spectral image, and vice versa.
- first set Q Q1
- Q1 is a small value to obtain all corner point features in the spectral image, to obtain a corner point set CornerSet1, which has m corner point features in total.
- step S4 specifically includes the following steps:
- S42 Perform a linear fit to the actual spectral wavelength value and the coordinate value of the spectral image feature according to the obtained coordinates of the two points to obtain a linear relationship expression, and then convert the extracted image feature coordinates into analysis based on the linear relationship expression The actual wavelength of the line.
- the coordinates of the extracted (mn) image features are converted into actual analysis line wavelengths to obtain (mn) analysis line wavelengths.
- the conversion basis is the linear correspondence between the image features and the actual wavelengths of the analysis line.
- N S a*b
- the dimensions of the extracted analysis line intensity matrix are (mn) rows and N S Column.
- S6 Combine the obtained spectrum intensity of the analysis line with the classification algorithm to construct a classification model, and then use the classification model to classify the sample.
- the classification algorithm is any one of the following algorithms: linear discriminant analysis algorithm, support vector machine classification algorithm, neural network classification algorithm and K nearest neighbor algorithm; corresponding to the product to be classified
- the spectral intensity of the analysis line is input to the classification model, and then the classification model classifies the products to be classified.
- Step one sample preparation and spectrum collection.
- This example uses 24 kinds of igneous rock samples, which are natural stones without any polishing or other treatments; in this example, the maximum single laser pulse energy is 6.3mJ, the frequency is 10Hz, the wavelength is 1064.310nm, and the focal length of the focusing lens It is 25mm, the band of the spectrometer is 268nm ⁇ 430nm, and the detector of the spectrometer is 4094 pixels.
- the spectrum collection method collects 4 points for each rock sample, and each point collects 25 spectra, so a total of 100 spectra are collected for each sample.
- Step 2 Perform image processing on the plasma spectrum to obtain a spectrum image.
- the average spectrum of all the spectra in this embodiment is calculated, and the average spectrum is displayed graphically.
- the length L and width H of the spectral image are set to 740 and 600, respectively, and the image storage format is PNG format.
- the imaging of the spectrum is mainly carried out through the library functions of Matlab.
- the average spectrum is displayed graphically through the plot (xWvData, yItyData) function, where xWvData is the wavelength data of the spectrum, yItyData is the intensity data of the spectrum, and then through getframe
- the () function intercepts the spectral region of the image with the set resolution, and finally saves the intercepted spectral image through the imwrite() function.
- Step three image corner feature extraction.
- the image feature used in this embodiment is Harris corner feature.
- the corner feature set is CornerSet1, and the feature number is 324.
- set Q2 to 0.21 to obtain the corner points of the trough position and the low-intensity peak position, the corner point set is CornerSet2, and the number of corner points n is 153.
- Step 4 Convert the corner coordinates to the actual wavelength of the analysis line.
- point A (42.51, 279.55) and B (685.37, 422.67).
- 42.51 and 685.37 are the abscissa values of corner points A and B
- 279.55 and 422.67 are the actual wavelength values of the analysis line corresponding to the corner points.
- Step five extract the spectral intensity of the analysis line.
- Step 6 Combine the classification algorithm to establish a classification model for classification.
- the classification algorithm used is the linear discriminant analysis (LDA) algorithm.
- LDA linear discriminant analysis
- the ratio of the number of spectra in the training set to the number of spectra in the test set is 8:2, and the data dimension of the training set is 171 ⁇ 1920, the data dimension of the test set is 171 ⁇ 480.
- the above data is trained and tested to obtain a classification model.
- the comparison between the method (IFALS-LDA) provided by the present invention and the manual line selection classification method (MLS-LDA) to classify 24 rock samples is shown in Figure 10.
- the analysis lines of the manual line selection classification method are shown in Table 1. . It can be seen from Figure 10 that the overall average classification accuracy of the MLS-LDA classification is 94.38%, while the overall average classification accuracy of the IFALS-LDA classification is 98.54%. After adopting the method of the present invention, the overall classification accuracy rate is effectively improved, and the increase range is 4.16%. In order to further verify the method of the present invention, the classification model was subjected to 10-fold cross-validation after the classification, wherein the cross-validation accuracy rates of MLS-LDA and IFALS-LDA were 95% and 98.18%, respectively.
- the MLS-LDA method requires 2760s in the entire classification process, while the IFALS-LDA method is a classification method based on automatic line selection, and the time required is only about 4.34s.
- Table 2 shows the comparison of comprehensive classification performance indexes of MLS-LDA and IFALS-LDA.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Artificial Intelligence (AREA)
- Computer Vision & Pattern Recognition (AREA)
- General Engineering & Computer Science (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Evolutionary Computation (AREA)
- Evolutionary Biology (AREA)
- Bioinformatics & Computational Biology (AREA)
- Life Sciences & Earth Sciences (AREA)
- Signal Processing (AREA)
- Multimedia (AREA)
- Investigating, Analyzing Materials By Fluorescence Or Luminescence (AREA)
Abstract
The present invention relates to the related technical field of laser probe component analysis, and provides a laser probe classification method and device capable of automatically selecting spectral lines on the basis of image features. The method comprises the following steps: (1) acquiring a plasma spectrum of a sample, and imaging the plasma spectrum to obtain a spectral image; (2) extracting image features and image feature coordinates of the spectral image, and converting the extracted image feature coordinates into actual wavelengths of analytical lines according to linear correspondences between the image features and the actual wavelengths of the analytical lines; and (3) extracting spectral intensity of the analytical lines, constructing a classification model by combining the obtained intensity of the analytical lines with a classification algorithm, and then classifying, by means of the classification model, a product to be classified. The present invention improves the classification efficiency and the classification precision, has a high automation degree, and can effectively avoid human factors while improving the line selection efficiency.
Description
本发明属于激光探针成分分析相关技术领域,更具体地,涉及一种基于图像特征自动选择谱线的激光探针分类方法及装置。The invention belongs to the related technical field of laser probe component analysis, and more specifically, relates to a laser probe classification method and device for automatically selecting spectral lines based on image features.
激光探针即激光诱导击穿光谱技术(Laser-induced breakdown spectroscopy,简称LIBS),它是一种利用激光聚焦在样品表面产生的等离子体光谱来分析物质成分及含量的元素分析技术。激光探针技术相比于传统的化学分析技术如XRD(X-ray diffraction)、XRF(X Ray Fluorescence)、ICP-MS(Inductively coupled plasma-Mass Spectrometry)等具有制样简单、可以实现原位快速检测等优点。LIBS技术在农残检测、地质勘测、岩石矿石检测等领域已经应用非常广泛,其分析方法相关的研究也有迅速的发展。Laser probes are laser-induced breakdown spectroscopy (LIBS), which is an elemental analysis technology that uses plasma spectra generated by laser focusing on the sample surface to analyze the composition and content of substances. Compared with traditional chemical analysis techniques such as XRD (X-ray diffusion), XRF (X Ray Fluorescence), ICP-MS (Inductively coupled plasma-Mass Spectrometry), laser probe technology has simple sample preparation and can achieve rapid in-situ Advantages such as detection. LIBS technology has been widely used in pesticide residue detection, geological survey, rock and ore detection and other fields, and research related to its analysis methods has also developed rapidly.
在基于LIBS技术的定量或者定性分析中,分析线的选择对分析结构有至关重要的影响。在LIBS技术中,目前常用的选线方法仍为传统的手动选线法,手动选线法一般是通过对光谱强度、背景强度、信背比、信噪比以及是否有自吸收等多重因素的综合判断来选择分析线,因此,手动选线具有较高的准确率。目前,本领域的相关研究人员已经做了一些研究,例如论文《Quantitative analysis of Lead Zirconate Titanate(PZT)ceramics by laser-induced breakdown spectroscopy(LIBS)in combination with multivariate calibration》(Rafael,Microchemical Journal 130(2017):21-26.)公开了一种基于手动选线和PLS算法的元素多元分析方法,并对陶瓷中的铅、锆、钛等元素进行了定量分析,但是该方法的缺点也十分明显,例如手动选线需要对目标谱线进行逐一判断,因此选线效率较低;而且该方法非常依赖选线经验,分析结果受人为影响比较明显。现有的自动选线法也有了一定的发展,如论文《In situ classification of rocks using stand-off laser induced breakdown spectroscopy with a compact spectrometer》(W.T.Li等人,Journal of Analytical Atomic Spectrometry 33.3(2018):461-467.)也提出了一种基于小波变换算法的自动选线法,并以此结合LDA算法进行了岩石分类。然而,在LIBS技术中,自动选线法还不成熟,尚未有能普遍应用且具有标准化操作流程的方法,基于自动选线的分类方法也相对比较少。In quantitative or qualitative analysis based on LIBS technology, the choice of analysis line has a crucial influence on the analysis structure. In the LIBS technology, the current commonly used method of line selection is still the traditional manual line selection method. The manual line selection method is generally based on multiple factors such as spectral intensity, background intensity, signal-to-background ratio, signal-to-noise ratio, and whether there is self-absorption. Comprehensive judgment to select the analysis line, therefore, manual line selection has a higher accuracy rate. At present, relevant researchers in this field have done some research, such as the paper "Quantitative analysis of Lead Zirconate Titanate (PZT) ceramics by laser-induced breakdown spectroscopy (LIBS) in combination with multivariate calibration" (Rafael, Microchemical Journal 130 (2017) ):21-26.) discloses an element multivariate analysis method based on manual line selection and PLS algorithm, and quantitatively analyzes the elements such as lead, zirconium, titanium in ceramics, but the shortcomings of this method are also very obvious. For example, manual line selection needs to judge the target spectrum one by one, so the line selection efficiency is low; and this method relies heavily on line selection experience, and the analysis results are obviously affected by humans. The existing automatic line selection method has also developed to a certain extent, such as the paper "In situ classification of rocks using stand-off laser induced breakdown spectroscopy with a compact spectrometer" (WTLi et al., Journal of Analytical Atomic Spectrometry 33.3 (2018): 461-467.) also proposed an automatic line selection method based on wavelet transform algorithm, and combined with LDA algorithm for rock classification. However, in the LIBS technology, the automatic route selection method is not yet mature, and there is no method that can be universally applied and has a standardized operation process, and there are relatively few classification methods based on automatic route selection.
【发明内容】[Summary of the invention]
针对现有技术的以上缺陷或改进需求,本发明提供了一种基于图像特征自动选择谱线的激光探针分类方法及装置,其是解决现有分类方法中选线效率低、选线结果容易受人为因素影响,导致分析过程耗时长、分析性能差的问题。所述分析方法可以使分类前的选线过程自动进行,在提高选线效率的同时有效避免人为因素,从而提高了分类效率及分类精度。In view of the above defects or improvement needs of the prior art, the present invention provides a laser probe classification method and device that automatically selects spectral lines based on image features, which solves the problem of low line selection efficiency and easy line selection results in the existing classification methods. Affected by human factors, the analysis process is time-consuming and the analysis performance is poor. The analysis method can automatically perform the line selection process before classification, and effectively avoid human factors while improving the line selection efficiency, thereby improving the classification efficiency and classification accuracy.
为实现上述目的,按照本发明的一个方面,提供了一种基于图像特征自动选择谱线的激光探针分类方法,该激光探针分类方法包括以下步骤:To achieve the above objective, according to one aspect of the present invention, a laser probe classification method that automatically selects spectral lines based on image features is provided. The laser probe classification method includes the following steps:
(1)采集样品的等离子体光谱,并对所述等离子体光谱进行图像化处理以得到光谱图像;(1) Collect the plasma spectrum of the sample, and perform image processing on the plasma spectrum to obtain a spectral image;
(2)对所述光谱图像进行图像特征及图像特征坐标提取,并依据图像特征与分析线实际波长的线性对应关系,将所提取的图像特征坐标转换为分析线的实际波长;(2) Perform image feature and image feature coordinate extraction on the spectral image, and convert the extracted image feature coordinate into the actual wavelength of the analysis line according to the linear correspondence between the image feature and the actual wavelength of the analysis line;
(3)提取分析线的光谱强度,并将得到的分析线的强度及分类算法相结合来构建分类模型,进而采用所述分类模型对待分类产品进行分类。(3) Extract the spectral intensity of the analysis line, and combine the obtained intensity of the analysis line and the classification algorithm to construct a classification model, and then use the classification model to classify the products to be classified.
进一步地,步骤(1)中,首先,将等离子体光谱进行图像化显示,并设置光谱图像的尺寸;接着,截取图像化显示的等离子体光谱的谱线区域,并将截取的谱线区域存储为图像,由此得到光谱图像。Further, in step (1), firstly, the plasma spectrum is displayed graphically, and the size of the spectral image is set; then, the spectral line area of the plasma spectrum displayed in the graphical display is intercepted, and the intercepted spectral line area is stored Is an image, from which a spectral image is obtained.
进一步地,所述图像特征为角点特征,所述角点特征为加速段测试特征、最小特征值特征或者Harris特征。Further, the image feature is a corner feature, and the corner feature is an acceleration section test feature, a minimum feature value feature, or a Harris feature.
进一步地,步骤(2)中,首先,设置图像角点特征的决定系数Q=Q1, 以获取光谱图像中的所有角点特征,得到角点集合CornerSet1;之后,设置Q=Q2,且Q2>Q1,以获取光谱图像中位于波谷位置和波峰位置的角点特征,得到角点集合CornerSet2;接着,计算得到角点集合CornerSet1和角点集合CornerSet2的差集,以得到角点集合CornerSet4,该角点集合CornerSet4即对应所求分析线的角点集合。Further, in step (2), first, set the coefficient of determination Q=Q1 for the corner features of the image to obtain all corner features in the spectral image to obtain the corner set CornerSet1; then, set Q=Q2, and Q2> Q1, to obtain the corner point features at the trough position and the peak position in the spectral image to obtain the corner point set CornerSet2; then, calculate the difference between the corner point set CornerSet1 and the corner point set CornerSet2 to obtain the corner point set CornerSet4. The point set CornerSet4 is the set of corner points corresponding to the analysis line to be sought.
进一步地,根据历史光谱和光谱图像的对应关系确定该等离子体光谱中两个不同点的实际光谱波长值和光谱图像特征的坐标值;根据得到的两个点的坐标对实际光谱波长值和光谱图像特征的坐标值进行线性拟合以得到线性关系表达式,继而基于所述线性关系表达式将提取的图像特征坐标转换为分析线的实际波长。Further, the actual spectral wavelength value and the coordinate value of the spectral image feature of the two different points in the plasma spectrum are determined according to the correspondence between the historical spectrum and the spectral image; the actual spectral wavelength value and the spectral image characteristic coordinate value are compared according to the obtained coordinates of the two points. The coordinate values of the image features are linearly fitted to obtain a linear relationship expression, and then the extracted image feature coordinates are converted into the actual wavelength of the analysis line based on the linear relationship expression.
进一步地,该两个点分别位于光谱波段的前端和后端。Further, the two points are respectively located at the front end and the back end of the spectral band.
进一步地,两个点的坐标分别为(x
1,y
1)及(x
2,y
2),则对应的线性关系表达式为y=kx+b,其中k=(y
2-y
1)/(x
2-x
1),b=y
1–kx
1。
Further, the coordinates of the two points are (x 1 , y 1 ) and (x 2 , y 2 ) respectively, and the corresponding linear relationship expression is y=kx+b, where k=(y 2 -y 1 ) /(x 2 -x 1 ), b=y 1 -kx 1 .
进一步地,所述分类算法为以下算法中的任意一种:线性判别分析算法、支持向量机分类算法、神经网络分类算法及K近邻算法。Further, the classification algorithm is any one of the following algorithms: linear discriminant analysis algorithm, support vector machine classification algorithm, neural network classification algorithm, and K nearest neighbor algorithm.
进一步地,步骤(3)中,将待分类产品对应的分析线的光谱强度输入所述分类模型,所述分类模型依据收到的光谱强度数据对待分类产品进行分类。Further, in step (3), the spectral intensity of the analysis line corresponding to the product to be classified is input into the classification model, and the classification model classifies the product to be classified according to the received spectral intensity data.
按照本发明的另一个方面,提供了一种基于图像特征自动选择谱线的激光探针分类装置,所述激光探针分类析装置是采用如上所述的基于图像特征自动选择谱线的激光探针分类方法来对待分类产品进行分类的。According to another aspect of the present invention, there is provided a laser probe classification device that automatically selects spectral lines based on image features. The laser probe classification and analysis device uses the above-mentioned laser probe that automatically selects spectral lines based on image features. According to the classification method to classify the products to be classified.
总体而言,通过本发明所构思的以上技术方案与现有技术相比,本发明提供的基于图像特征自动选择谱线的激光探针分类方法及装置主要具有以下有益效果:In general, compared with the prior art through the above technical solutions conceived by the present invention, the laser probe classification method and device for automatically selecting spectral lines based on image features provided by the present invention mainly has the following beneficial effects:
1.所述分类方法是基于图像特征自动选线分类的,整个分类过程可以无需人工干预,分类结果亦不受人为因素的影响,相比于现有的手动选线 分类方法,本发明的方法效率更高,适用性较强,分析结果更稳定。1. The classification method is based on automatic line selection classification based on image features. The entire classification process does not require manual intervention, and the classification result is not affected by human factors. Compared with the existing manual line selection classification method, the method of the present invention Higher efficiency, stronger applicability, and more stable analysis results.
2.本方法在分类前通过图像特征识别角点位置及对应的分析线波长,有效的通过对光谱顶端夹角的检测提取到了具有更大相对强度的分析线,谱线相对强度越强,越有利于定性或定量分析;而现有的选线方法一般是先对光谱进行算法变换,然后通过计算光谱的信背比或信噪比进行选线的,而在该过程中,光谱背景或噪声的确定往往存在较大误差,影响选线及分类性能,本发明所提供的分类方法无上述问题。2. This method recognizes the position of the corner point and the corresponding analysis line wavelength through image features before classification, and effectively extracts the analysis line with greater relative intensity through the detection of the top angle of the spectrum. The stronger the relative intensity of the spectral line, the more It is conducive to qualitative or quantitative analysis. The existing line selection method generally first performs algorithm transformation on the spectrum, and then selects the line by calculating the signal-to-background ratio or signal-to-noise ratio of the spectrum. In this process, the spectral background or noise There is often a large error in the determination of, which affects line selection and classification performance. The classification method provided by the present invention does not have the above problems.
3.所述图像特征可以为角点特征或其他图像特征,其中角点特征可以是加速段测试特征(FAST特征)、最小特征值特征(MinEigen特征)、Harris特征;所述分类算法可以为常用的机器学习算法如线性判别分析算法、支持向量机算法,以上图像特征和分类算法可以相互结合,因此基于图像特征自动选线分类的方法具有较好的实用性及灵活性。3. The image features can be corner features or other image features, where the corner features can be accelerated segment test features (FAST features), minimum feature value features (MinEigen features), Harris features; the classification algorithm can be commonly used Machine learning algorithms such as linear discriminant analysis algorithm, support vector machine algorithm, the above image features and classification algorithms can be combined with each other, so the method of automatic line selection and classification based on image features has better practicability and flexibility.
图1是本发明提供的基于图像特征自动选择谱线的激光探针分类方法的流程示意图;Fig. 1 is a schematic flow chart of a laser probe classification method based on image features that automatically selects spectral lines according to the present invention;
图2是本发明提供的基于图像特征自动选择谱线的激光探针分类装置的示意图;2 is a schematic diagram of a laser probe classification device that automatically selects spectral lines based on image features provided by the present invention;
图3是图1中的基于图像特征自动选择谱线的激光探针分类方法涉及的光谱图像Harris角点特征检测的原理示意图;Fig. 3 is a schematic diagram of the principle of Harris corner feature detection of spectral image involved in the laser probe classification method based on image feature automatic selection of spectral lines in Fig. 1;
图4是图1中的基于图像特征自动选择谱线的激光探针分类方法涉及的Harris角点筛选示意图;4 is a schematic diagram of Harris corner screening involved in the laser probe classification method based on image feature automatic selection of spectral lines in FIG. 1;
图5是图1中的基于图像特征自动选择谱线的激光探针分类方法涉及的Harris角点检测流程示意图;FIG. 5 is a schematic diagram of the Harris corner point detection process involved in the laser probe classification method based on image feature automatic selection of spectral lines in FIG. 1; FIG.
图6中的(a)、(b)、(c)及(d)分别是采用图1中的基于图像特征自动选择谱线的激光探针分类方法得到的Harris角点筛选结果示意图;(A), (b), (c), and (d) in FIG. 6 are respectively the schematic diagrams of Harris corner screening results obtained by using the laser probe classification method of automatically selecting spectral lines based on image features in FIG. 1;
图7是手动选线的分析线位置示意图;Figure 7 is a schematic diagram of the analysis line position of manual line selection;
图8是图1中的基于图像特征自动选择谱线的激光探针分类方法涉及的图像角点坐标与分析线实际波长的对应示意图;8 is a schematic diagram of the correspondence between the coordinates of the image corner points and the actual wavelength of the analysis line involved in the laser probe classification method of automatically selecting spectral lines based on image features in FIG. 1;
图9是图1中的基于图像特征自动选择谱线的激光探针分类方法涉及的图像角点坐标与分析线实际波长的线性关系示意图;9 is a schematic diagram of the linear relationship between the coordinates of the image corner points and the actual wavelength of the analysis line involved in the laser probe classification method based on the image feature automatically selecting the spectral line in FIG. 1;
图10中的(a)及(b)分别是采用现有的手动选线分类方法及图1中的基于图像特征自动选择谱线的激光探针分类方法得到的分析结果示意图。(A) and (b) in FIG. 10 are schematic diagrams of analysis results obtained by using the existing manual line selection classification method and the laser probe classification method of automatically selecting spectral lines based on image features in FIG. 1, respectively.
在所有附图中,相同的附图标记用来表示相同的元件或结构,其中:1-光谱仪,2-激光器,3-控制单元,4-微处理器,5-采集头,6-聚焦镜,7-样品,8-连接线,9-光纤。In all the drawings, the same reference numerals are used to denote the same elements or structures, among which: 1-spectrometer, 2-laser, 3-control unit, 4-microprocessor, 5-collecting head, 6-focusing mirror , 7-sample, 8-connector, 9-fiber.
为了使本发明的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。此外,下面所描述的本发明各个实施方式中所涉及到的技术特征只要彼此之间未构成冲突就可以相互组合。In order to make the objectives, technical solutions, and advantages of the present invention clearer, the following further describes the present invention in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present invention, but not to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
请参阅图1、图2、图3及图4,本发明提供的基于图像特征自动选择谱线的激光探针分类方法,所述激光探针分类方法首先需要将LIBS光谱转化为光谱图像,然后对该光谱图像提取图像特征,再将该图像特征与分析线波长建立线性对应关系并计算出分析线实际波长,最后提取分析线强度,并将其与分类算法相结合,实现样品的识别与分类。Please refer to Figure 1, Figure 2, Figure 3 and Figure 4, the present invention provides a laser probe classification method that automatically selects spectral lines based on image features. The laser probe classification method first needs to convert the LIBS spectrum into a spectral image, and then Extract image features from the spectral image, then establish a linear correspondence between the image features and the wavelength of the analysis line and calculate the actual wavelength of the analysis line. Finally, extract the intensity of the analysis line and combine it with the classification algorithm to realize the identification and classification of the sample .
所述激光探针分类方法主要包括以下步骤:The laser probe classification method mainly includes the following steps:
S1,采用激光探针分类装置采集样品的等离子体光谱。S1, using a laser probe sorting device to collect the plasma spectrum of the sample.
具体地,将样品7放置在所述激光探针分类装置的样品放置区域,结合所述激光探针分类装置的控制系统及光路系统来实现等离子体的光谱采集。其中,本发明提供的基于图像特征自动选择谱线的激光探针分类装置, 所述激光探针分类装置包括光谱仪1、激光器2、控制单元3、微处理器4、采集头5、聚焦镜6、连接线8及光纤9,所述激光器2与所述聚焦镜6沿水平方向设置。所述控制单元3连接于所述微处理器4,所述控制单元3通过所述连接线8分别连接于所述光谱仪1及所述激光器2,所述采集头5通过所述光纤9连接于所述光谱仪1。所述采集头5位于所述聚焦镜6的上方,其与水平面之间形成一定的夹角,等离子体光谱经所述采集头5后再经所述光纤9传输至所述光谱仪1中。Specifically, the sample 7 is placed in the sample placement area of the laser probe classification device, and the control system and the optical path system of the laser probe classification device are combined to realize the spectrum collection of the plasma. Wherein, the laser probe classification device for automatically selecting spectral lines based on image features provided by the present invention, the laser probe classification device includes a spectrometer 1, a laser 2, a control unit 3, a microprocessor 4, a collecting head 5, and a focusing mirror 6. , Connecting the line 8 and the optical fiber 9, the laser 2 and the focusing lens 6 are arranged along the horizontal direction. The control unit 3 is connected to the microprocessor 4, the control unit 3 is respectively connected to the spectrometer 1 and the laser 2 through the connecting wire 8, and the collection head 5 is connected to the optical fiber 9 through the optical fiber 9. The spectrometer 1. The collecting head 5 is located above the focusing mirror 6 and forms a certain angle with the horizontal plane. After the collecting head 5, the plasma spectrum is transmitted to the spectrometer 1 via the optical fiber 9.
所述激光器2用于产生高能量密度激光,所述聚焦镜6用于聚焦所述激光器2产生的高能量密度激光,所述控制单元3用于协调控制所述激光器2和所述光谱仪1工作,并采集系统的其他传感信号,所述采集头5用于采集激光光束照射在样品7表面所产生的等离子体光谱,所述微处理器4用于控制整个激光探针系统和存储产生的光谱数据。The laser 2 is used to generate high energy density laser, the focusing mirror 6 is used to focus the high energy density laser generated by the laser 2, and the control unit 3 is used to coordinate and control the operation of the laser 2 and the spectrometer 1 , And collect other sensor signals of the system. The collection head 5 is used to collect the plasma spectrum generated by the laser beam irradiated on the surface of the sample 7, and the microprocessor 4 is used to control the entire laser probe system and store the generated Spectral data.
所述激光器2产生的高能量密度激光束经过所述聚焦镜6聚焦后照射在所述样品7的表面,所述样品7经由高能量密度的激光束烧蚀后产生等离子体,等离子体发射光谱经所述采集头5采集后再经所述光纤9传输至所述光谱仪1中。其中,整个光谱采集过程经由所述控制单元3及所述微处理器4协调控制实现。The high-energy-density laser beam generated by the laser 2 is focused by the focusing mirror 6 and then irradiated on the surface of the sample 7. The sample 7 is ablated by the high-energy-density laser beam to generate plasma, and the plasma emission spectrum After being collected by the collecting head 5, it is transmitted to the spectrometer 1 via the optical fiber 9. Wherein, the entire spectrum collection process is realized through coordinated control of the control unit 3 and the microprocessor 4.
S2,对所述等离子体光谱进行图像化处理以得到光谱图像。S2: Perform image processing on the plasma spectrum to obtain a spectrum image.
具体地,等离子体光谱是由波长列和强度值列组成的,在光谱图像绘制时,以波长为横轴,光谱强度为纵轴;而本实施方式中,需要去除横纵坐标轴以截取光谱显示区域,并以截取的区域为光谱图像,该光谱图像的分辨率取决于预设值。Specifically, the plasma spectrum is composed of a wavelength column and an intensity value column. When drawing a spectral image, the wavelength is the horizontal axis and the spectral intensity is the vertical axis; and in this embodiment, the horizontal and vertical axes need to be removed to intercept the spectrum. Display the area, and take the intercepted area as the spectral image. The resolution of the spectral image depends on the preset value.
在一个实施方式中,首先将等离子体光谱数据进行图像化显示,再设置光谱图像的尺寸,设该图像的长为L,宽为H,然后截取图像化显示的等离子体面光谱的谱线区域,此区域为除去光谱横纵坐标轴以外的整个光谱区域。最后,将所得到的L*H的图像区域存储为PNG格式的图像,该图像 即光谱图像。In one embodiment, the plasma spectrum data is displayed graphically, and then the size of the spectral image is set, and the length of the image is L and the width is H, and then the spectral line region of the plasma surface spectrum displayed graphically is intercepted, This area is the entire spectral area excluding the abscissa and ordinate axis of the spectrum. Finally, the obtained L*H image area is stored as a PNG format image, which is a spectral image.
S3,对所述光谱图像进行图像特征及图像特征坐标提取,并在所述光谱图像中标识该图像特征的坐标。S3: Perform image feature and image feature coordinate extraction on the spectral image, and identify the coordinate of the image feature in the spectral image.
具体地,图像特征可以为角点特征或者其他图像纹理特征或形状特征等,其中角点特征可以是加速段测试特征(FAST特征)、最小特征值特征(MinEigen特征)或Harris特征等,请参阅图5及图6,步骤S3具体包括以下步骤:Specifically, the image features can be corner features or other image texture features or shape features, etc., where the corner features can be accelerated segment test features (FAST features), minimum feature value features (MinEigen features) or Harris features, etc., please refer to As shown in Fig. 5 and Fig. 6, step S3 specifically includes the following steps:
S31,以图像角点特征为例,参数Q为图像角点特征的决定系数,Q越小,在光谱图像中能检测的图像角点越多,反之越少。在该步骤中,首先设置Q=Q1,Q1为一较小值,以获取光谱图像中的所有角点特征,得到角点集合CornerSet1,该点集合CornerSet1中共有角点特征m个。S31, taking the image corner feature as an example, the parameter Q is the coefficient of determination of the image corner feature, the smaller the Q is, the more image corners can be detected in the spectral image, and vice versa. In this step, first set Q=Q1, and Q1 is a small value to obtain all corner point features in the spectral image, to obtain a corner point set CornerSet1, which has m corner point features in total.
S32,设置Q=Q2,且Q2>Q1,以获取光谱图像中位于波谷位置和位于低强度峰值的波峰位置的角点特征,得到角点集合CornerSet2,该集合CornerSet2中共有角点特征n个。S32: Set Q=Q2 and Q2>Q1 to obtain corner features at the trough position and the peak position at the low-intensity peak in the spectral image, to obtain a corner set CornerSet2, which has n corner features in total.
S33,计算得到角点集合CornerSet1和角点集合CornerSet2的差集,以得到角点集合CornerSet4,该角点集合CornerSet4即对应所求分析线的角点集合,则该角点集合CornerSet4中共有角点特征(m-n)个。S33: Calculate the difference set between the corner point set CornerSet1 and the corner point set CornerSet2 to obtain the corner point set CornerSet4. The corner point set CornerSet4 corresponds to the corner point set of the desired analysis line, and the corner point set CornerSet4 shares the corner points. Features (mn).
S4,依据图像特征与分析线实际波长的线性对应关系,将所提取的图像特征坐标转换为分析线的实际波长。S4: According to the linear correspondence between the image feature and the actual wavelength of the analysis line, the extracted image feature coordinates are converted into the actual wavelength of the analysis line.
具体地,请参阅图8及图9,步骤S4具体包括以下步骤:Specifically, referring to FIG. 8 and FIG. 9, step S4 specifically includes the following steps:
S41,根据历史光谱和光谱图像的对应关系确定该等离子体光谱中两个不同点的实际光谱波长值和光谱图像特征的坐标值,其中,这两个点应位于光谱波段较靠前端和后端的位置。S41. Determine the actual spectral wavelength values of two different points in the plasma spectrum and the coordinate values of the spectral image features according to the correspondence between the historical spectrum and the spectral image, where these two points should be located closer to the front and back of the spectral band. position.
S42,根据得到的两个点的坐标对实际光谱波长值和光谱图像特征的坐标值进行线性拟合以得到线性关系表达式,继而基于所述线性关系表达式将提取的图像特征坐标转换为分析线的实际波长。S42: Perform a linear fit to the actual spectral wavelength value and the coordinate value of the spectral image feature according to the obtained coordinates of the two points to obtain a linear relationship expression, and then convert the extracted image feature coordinates into analysis based on the linear relationship expression The actual wavelength of the line.
在一个实施方式中,将所提取的(m-n)个图像特征的坐标转换为实际分析线波长,得到(m-n)条分析线波长,转换依据是图像特征与分析线实际波长之间的线性对应关系;首先,根据历史光谱和光谱图像的对应关系,确定光谱中两个不同点的实际光谱波长值和光谱图像角点特征的坐标值,如A(x1,y1),B(x2,y2)这两个点应位于光谱波段较靠前端和后端的位置,如图8所示。之后,根据两个点A(x
1,y
1)、B(x
2,y
2)的坐标,对实际光谱波长值和光谱图像角点特征的坐标值进行线性拟合,以得到线性关系表达式y=kx+b,其中k=(y
2-y
1)/(x
2-x
1),b=y
1–kx
1。
In one embodiment, the coordinates of the extracted (mn) image features are converted into actual analysis line wavelengths to obtain (mn) analysis line wavelengths. The conversion basis is the linear correspondence between the image features and the actual wavelengths of the analysis line. ; First, according to the corresponding relationship between the historical spectrum and the spectral image, determine the actual spectral wavelength values of the two different points in the spectrum and the coordinate values of the corner points of the spectral image, such as A(x1, y1), B(x2, y2). The two points should be located closer to the front and back of the spectral band, as shown in Figure 8. After that, according to the coordinates of the two points A (x 1 , y 1 ) and B (x 2 , y 2 ), the actual spectral wavelength value and the coordinate value of the corner feature of the spectral image are linearly fitted to obtain the linear relationship expression The formula y=kx+b, where k=(y 2 -y 1 )/(x 2 -x 1 ), b=y 1 -kx 1 .
S5,提取分析线的光谱强度。S5, extract the spectral intensity of the analysis line.
具体地,设实验中有样品数为a,每个样品采集的光谱数为b,则光谱总数为N
S=a*b,所提取的分析线强度矩阵的维度为(m-n)行和N
S列。
Specifically, assuming that the number of samples in the experiment is a and the number of spectra collected for each sample is b, the total number of spectra is N S =a*b, and the dimensions of the extracted analysis line intensity matrix are (mn) rows and N S Column.
S6,将得到的分析线的光谱强度与分类算法相结合来构建分类模型,进而采用所述分类模型对样品进行分类。S6: Combine the obtained spectrum intensity of the analysis line with the classification algorithm to construct a classification model, and then use the classification model to classify the sample.
具体地,请参阅图7和图10,所述分类算法为以下算法中的任意一种:线性判别分析算法、支持向量机分类算法、神经网络分类算法及K近邻算法;将待分类的产品对应的分析线的光谱强度输入所述分类模型,进而所述分类模型对待分类的产品进行分类。Specifically, please refer to Figures 7 and 10, the classification algorithm is any one of the following algorithms: linear discriminant analysis algorithm, support vector machine classification algorithm, neural network classification algorithm and K nearest neighbor algorithm; corresponding to the product to be classified The spectral intensity of the analysis line is input to the classification model, and then the classification model classifies the products to be classified.
实施例1Example 1
本发明第一实施例提供的基于图像特征自动选择谱线的激光探针分类方法主要包括以下步骤:The laser probe classification method for automatically selecting spectral lines based on image features provided by the first embodiment of the present invention mainly includes the following steps:
步骤一,样品准备及光谱采集。本实施例采用24种火成岩岩石样品,该样品为天然石块,未经任何打磨或其他处理;本实施例中,激光最大单脉冲能量为6.3mJ,频率为10Hz,波长为1064.310nm,聚焦镜焦距为25mm,光谱仪的波段为268nm~430nm,光谱仪探测器为4094像素。另外,光谱采集方式为每个岩石样品采集4个点,每个点采集25幅光谱,因此每个样品总共采集100幅光谱。Step one, sample preparation and spectrum collection. This example uses 24 kinds of igneous rock samples, which are natural stones without any polishing or other treatments; in this example, the maximum single laser pulse energy is 6.3mJ, the frequency is 10Hz, the wavelength is 1064.310nm, and the focal length of the focusing lens It is 25mm, the band of the spectrometer is 268nm~430nm, and the detector of the spectrometer is 4094 pixels. In addition, the spectrum collection method collects 4 points for each rock sample, and each point collects 25 spectra, so a total of 100 spectra are collected for each sample.
步骤二,对等离子体光谱进行图像化处理,以得到光谱图像。首先,计算本实施例中的所有光谱的平均光谱,并将该平均光谱进行图像化显示。在本实施例中,光谱图像的长度L和宽度H分别设置为740和600,图像存储格式为PNG格式。另外,光谱的图像化主要通过Matlab的库函数来进行,首先通过plot(xWvData,yItyData)函数来图像化显示平均光谱,其中,xWvData为光谱的波长数据,yItyData为光谱的强度数据,然后通过getframe()函数截取设定分辨率的图像的光谱区域,最后通过imwrite()函数保存所截取的光谱图像。Step 2: Perform image processing on the plasma spectrum to obtain a spectrum image. First, the average spectrum of all the spectra in this embodiment is calculated, and the average spectrum is displayed graphically. In this embodiment, the length L and width H of the spectral image are set to 740 and 600, respectively, and the image storage format is PNG format. In addition, the imaging of the spectrum is mainly carried out through the library functions of Matlab. First, the average spectrum is displayed graphically through the plot (xWvData, yItyData) function, where xWvData is the wavelength data of the spectrum, yItyData is the intensity data of the spectrum, and then through getframe The () function intercepts the spectral region of the image with the set resolution, and finally saves the intercepted spectral image through the imwrite() function.
步骤三,图像角点特征提取。本实施例中采用的图像特征为Harris角点特征。在该步骤中,首先设值Q1为0.005,获得光谱图像的全部角点特征及其坐标,角点特征集合为CornerSet1,特征数为m为324。然后,设置Q2为0.21,以获取波谷位置和低强度波峰位置的角点,角点集合为CornerSet2,角点数量n为153。最后,计算CornerSet1和CornerSet2的差集以得到CornerSet4,其中(m–n)的值为171,即0.005<Q<0.21范围内的角点,该集合CornerSet4中的角点的坐标即为分析线的位置,如图7所示。Step three, image corner feature extraction. The image feature used in this embodiment is Harris corner feature. In this step, first set the value Q1 to 0.005 to obtain all the corner features and their coordinates of the spectral image, the corner feature set is CornerSet1, and the feature number is 324. Then, set Q2 to 0.21 to obtain the corner points of the trough position and the low-intensity peak position, the corner point set is CornerSet2, and the number of corner points n is 153. Finally, calculate the difference set of CornerSet1 and CornerSet2 to get CornerSet4, where the value of (m–n) is 171, that is, the corner points in the range of 0.005<Q<0.21, and the coordinates of the corner points in the set CornerSet4 are the analysis lines Location, as shown in Figure 7.
步骤四,将角点坐标转换为分析线实际波长。在该步骤中,首先,根据等离子体光谱和光谱图像的对应关系,查询光谱中两个不同点的光谱波长值和光谱图像角点特征的坐标值,在该实施例中取点A(42.51,279.55)和B(685.37,422.67)。其中,42.51和685.37为角点A和B横坐标值,279.55和422.67为角点所对应的分析线的实际波长值。然后,根据A、B点坐标值,对角点特征坐标值和实际波长值进行线性拟合,以得到线性关系表达式y=0.2226x+270.1190。Step 4: Convert the corner coordinates to the actual wavelength of the analysis line. In this step, first, according to the corresponding relationship between the plasma spectrum and the spectral image, query the spectral wavelength values of two different points in the spectrum and the coordinate values of the corner points of the spectral image. In this embodiment, point A (42.51, 279.55) and B (685.37, 422.67). Among them, 42.51 and 685.37 are the abscissa values of corner points A and B, and 279.55 and 422.67 are the actual wavelength values of the analysis line corresponding to the corner points. Then, according to the coordinate values of points A and B, linear fitting is performed on the characteristic coordinate values of the corner points and the actual wavelength values to obtain the linear relationship expression y=0.226x+270.1190.
步骤五,提取分析线的光谱强度。在本实施例中,样品数为a=24,每个样品采集的光谱数为b=100,则光谱总数为N
S=a*b=2400,此处所提取的分析线强度矩阵的维度为171行和2400列。
Step five, extract the spectral intensity of the analysis line. In this embodiment, the number of samples is a=24, and the number of spectra collected by each sample is b=100, then the total number of spectra is N S =a*b=2400, and the dimension of the extracted analysis line intensity matrix is 171 Rows and 2400 columns.
步骤六,结合分类算法建立分类模型进行分类。在本实施例中,采用的分类算法为线性判别分析(LDA)算法,在与该算法相结合时,训练集光谱数和测试集光谱数之比为8:2,训练集数据维度为171×1920,测试集数据维度为171×480。在该步骤中,将以上数据进行训练和测试,得到分类模型。Step 6: Combine the classification algorithm to establish a classification model for classification. In this embodiment, the classification algorithm used is the linear discriminant analysis (LDA) algorithm. When combined with this algorithm, the ratio of the number of spectra in the training set to the number of spectra in the test set is 8:2, and the data dimension of the training set is 171× 1920, the data dimension of the test set is 171×480. In this step, the above data is trained and tested to obtain a classification model.
本发明提供的方法(IFALS-LDA)和手动选线分类法(MLS-LDA)对24种岩石样品进行分类的结果对比如图10所示,其中手动选线分类法的分析线详见表1。由图10可以看出,MLS-LDA分类法的总体平均分类准确率为94.38%,而IFALS-LDA分类法的总体平均分类准确率为98.54%。采用本发明的方法后,总体分类准确率得到了有效提高,提高幅度为4.16%。为了进一步验证本发明方法,在分类结束后对该分类模型进行了10折交叉验证,其中MLS-LDA和IFALS-LDA的交叉验证准确率分别为95%和98.18%。The comparison between the method (IFALS-LDA) provided by the present invention and the manual line selection classification method (MLS-LDA) to classify 24 rock samples is shown in Figure 10. The analysis lines of the manual line selection classification method are shown in Table 1. . It can be seen from Figure 10 that the overall average classification accuracy of the MLS-LDA classification is 94.38%, while the overall average classification accuracy of the IFALS-LDA classification is 98.54%. After adopting the method of the present invention, the overall classification accuracy rate is effectively improved, and the increase range is 4.16%. In order to further verify the method of the present invention, the classification model was subjected to 10-fold cross-validation after the classification, wherein the cross-validation accuracy rates of MLS-LDA and IFALS-LDA were 95% and 98.18%, respectively.
表1 手动选线法所选分析线明细表Table 1 List of analysis lines selected by manual line selection method
另外,在分类效率方面,整个分类过程,MLS-LDA法需要的时间为2760s,而IFALS-LDA法是基于自动选线的分类方法,其所需的时间仅为4.34s左右。以上表明,IFALS-LDA分类法可以大幅减小LIBS技术的分类时间,提高分类效率。MLS-LDA和IFALS-LDA的综合分类性能指标对比 如表2所示。In addition, in terms of classification efficiency, the MLS-LDA method requires 2760s in the entire classification process, while the IFALS-LDA method is a classification method based on automatic line selection, and the time required is only about 4.34s. The above shows that the IFALS-LDA classification method can greatly reduce the classification time of LIBS technology and improve the classification efficiency. Table 2 shows the comparison of comprehensive classification performance indexes of MLS-LDA and IFALS-LDA.
表2 MLS-LDA和IFALS-LDA的综合分类性能指标Table 2 Comprehensive classification performance indicators of MLS-LDA and IFALS-LDA
观测指标Observation index | MLS-LDAMLS-LDA | IFALS-LDAIFALS-LDA |
预测准确率(%)Forecast accuracy rate (%) | 94.3894.38 | 98.5498.54 |
交叉验证准确率(%)Cross-validation accuracy rate (%) | 95.0095.00 | 98.1898.18 |
运行时间(s)Running time (s) | 2760.002760.00 | 4.364.36 |
分析线数量Number of analysis lines | 4646 | 171171 |
操作模式Operation mode | 手动选线Manual line selection | 自动选线Automatic line selection |
本领域的技术人员容易理解,以上所述仅为本发明的较佳实施例而已,并不用以限制本发明,凡在本发明的精神和原则之内所作的任何修改、等同替换和改进等,均应包含在本发明的保护范围之内。Those skilled in the art can easily understand that the above descriptions are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modification, equivalent replacement and improvement, etc. made within the spirit and principle of the present invention, All should be included in the protection scope of the present invention.
Claims (10)
- 一种基于图像特征自动选择谱线的激光探针分类方法,其特征在于,该激光探针分类方法包括以下步骤:A laser probe classification method for automatically selecting spectral lines based on image features is characterized in that the laser probe classification method includes the following steps:(1)采集样品的等离子体光谱,并对所述等离子体光谱进行图像化处理以得到光谱图像;(1) Collect the plasma spectrum of the sample, and perform image processing on the plasma spectrum to obtain a spectral image;(2)对所述光谱图像进行图像特征及图像特征坐标提取,并依据图像特征与分析线实际波长的线性对应关系,将所提取的图像特征坐标转换为分析线的实际波长;(2) Perform image feature and image feature coordinate extraction on the spectral image, and convert the extracted image feature coordinate into the actual wavelength of the analysis line according to the linear correspondence between the image feature and the actual wavelength of the analysis line;(3)提取分析线的光谱强度,并将得到的分析线的强度及分类算法相结合来构建分类模型,进而采用所述分类模型对待分类产品进行分类。(3) Extract the spectral intensity of the analysis line, and combine the obtained intensity of the analysis line and the classification algorithm to construct a classification model, and then use the classification model to classify the products to be classified.
- 如权利要求1所述的基于图像特征自动选择谱线的激光探针分类方法,其特征在于:步骤(1)中,首先,将等离子体光谱进行图像化显示,并设置光谱图像的尺寸;接着,截取图像化显示的等离子体光谱的谱线区域,并将截取的谱线区域存储为图像,由此得到光谱图像。The laser probe classification method for automatically selecting spectral lines based on image features according to claim 1, characterized in that: in step (1), first, the plasma spectrum is imaged and displayed, and the size of the spectrum image is set; , Intercept the spectral line area of the plasma spectrum displayed in the image, and store the intercepted spectral line area as an image, thereby obtaining the spectral image.
- 如权利要求1所述的基于图像特征自动选择谱线的激光探针分类方法,其特征在于:所述图像特征为角点特征,所述角点特征为加速段测试特征、最小特征值特征或者Harris特征。The laser probe classification method for automatically selecting spectral lines based on image features according to claim 1, wherein the image feature is a corner point feature, and the corner point feature is an acceleration section test feature, a minimum feature value feature, or Harris characteristics.
- 如权利要求3所述的基于图像特征自动选择谱线的激光探针分类方法,其特征在于:步骤(2)中,首先,设置图像角点特征的决定系数Q=Q1,以获取光谱图像中的所有角点特征,得到角点集合CornerSet1;之后,设置Q=Q2,且Q2>Q1,以获取光谱图像中位于波谷位置和波峰位置的角点特征,得到角点集合CornerSet2;接着,计算得到角点集合CornerSet1和角点集合CornerSet2的差集,以得到角点集合CornerSet4,该角点集合CornerSet4即对应所求分析线的角点集合。The laser probe classification method for automatically selecting spectral lines based on image features according to claim 3, characterized in that: in step (2), first, the determination coefficient Q=Q1 of the image corner feature is set to obtain the spectral image Then, set Q=Q2 and Q2>Q1 to obtain the corner features at the trough position and the peak position in the spectral image to obtain the corner set CornerSet2; then, calculate the corner point set CornerSet1. The difference of the corner set CornerSet1 and the corner set CornerSet2 to obtain the corner set CornerSet4, the corner set CornerSet4 is the corner set corresponding to the desired analysis line.
- 如权利要求4所述的基于图像特征自动选择谱线的激光探针分类方 法,其特征在于:根据历史光谱和光谱图像的对应关系确定该等离子体光谱中两个不同点的实际光谱波长值和光谱图像特征的坐标值;根据得到的两个点的坐标对实际光谱波长值和光谱图像特征的坐标值进行线性拟合以得到线性关系表达式,继而基于所述线性关系表达式将提取的图像特征坐标转换为分析线的实际波长。The laser probe classification method for automatically selecting spectral lines based on image features according to claim 4, wherein the actual spectral wavelength values of two different points in the plasma spectrum are determined according to the correspondence between historical spectra and spectral images. The coordinate value of the spectral image feature; according to the obtained coordinates of the two points, the actual spectral wavelength value and the coordinate value of the spectral image feature are linearly fitted to obtain a linear relationship expression, and then the image to be extracted based on the linear relationship expression The characteristic coordinates are converted to the actual wavelength of the analysis line.
- 如权利要求5所述的基于图像特征自动选择谱线的激光探针分类方法,其特征在于:该两个点分别位于光谱波段的前端和后端。The laser probe classification method for automatically selecting spectral lines based on image features according to claim 5, wherein the two points are respectively located at the front and back ends of the spectral band.
- 如权利要求5所述的基于图像特征自动选择谱线的激光探针分类方法,其特征在于:两个点的坐标分别为(x 1,y 1)及(x 2,y 2),则对应的线性关系表达式为y=kx+b,其中k=(y 2-y 1)/(x 2-x 1),b=y 1–kx 1。 The laser probe classification method for automatically selecting spectral lines based on image features according to claim 5, characterized in that: the coordinates of the two points are (x 1 , y 1 ) and (x 2 , y 2 ) respectively, then corresponding The linear relationship expression of is y=kx+b, where k=(y 2 -y 1 )/(x 2 -x 1 ), b=y 1 -kx 1 .
- 如权利要求1-7任一项所述的基于图像特征自动选择谱线的激光探针分类方法,其特征在于:所述分类算法为以下算法中的任意一种:线性判别分析算法、支持向量机分类算法、神经网络分类算法及K近邻算法。The laser probe classification method for automatically selecting spectral lines based on image features according to any one of claims 1-7, wherein the classification algorithm is any one of the following algorithms: linear discriminant analysis algorithm, support vector Machine classification algorithm, neural network classification algorithm and K nearest neighbor algorithm.
- 如权利要求1-7任一项所述的基于图像特征自动选择谱线的激光探针分类方法,其特征在于:步骤(3)中,将待分类产品对应的分析线的光谱强度输入所述分类模型,所述分类模型依据收到的光谱强度数据对待分类产品进行分类。The laser probe classification method for automatically selecting spectral lines based on image features according to any one of claims 1-7, characterized in that: in step (3), the spectral intensity of the analysis line corresponding to the product to be classified is input into the A classification model, which classifies the products to be classified according to the received spectral intensity data.
- 一种基于图像特征自动选择谱线的激光探针分类装置,其特征在于:所述激光探针分类装置是采用权利要求1-9任一项所述的基于图像特征自动选择谱线的激光探针分类方法来对待分类产品进行分类的。A laser probe classification device that automatically selects spectral lines based on image features, characterized in that: the laser probe classification device adopts the laser probe that automatically selects spectral lines based on image features according to any one of claims 1-9. According to the classification method to classify the products to be classified.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910891729.5 | 2019-09-20 | ||
CN201910891729.5A CN110751048B (en) | 2019-09-20 | 2019-09-20 | Laser probe classification method and device based on image characteristic automatic spectral line selection |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2021052240A1 true WO2021052240A1 (en) | 2021-03-25 |
Family
ID=69276823
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2020/114530 WO2021052240A1 (en) | 2019-09-20 | 2020-09-10 | Laser probe classification method and device capable of automatically selecting spectral lines on basis of image features |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN110751048B (en) |
WO (1) | WO2021052240A1 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117890486A (en) * | 2024-03-15 | 2024-04-16 | 四川吉利学院 | Magnetic shoe internal defect detection method based on sparse cut space projection |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110751048B (en) * | 2019-09-20 | 2022-06-14 | 华中科技大学 | Laser probe classification method and device based on image characteristic automatic spectral line selection |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030132142A1 (en) * | 1996-02-16 | 2003-07-17 | Huron Valley Steel Corporation | Metal scrap sorting system |
CN105139412A (en) * | 2015-09-25 | 2015-12-09 | 深圳大学 | Hyperspectral image corner detection method and system |
CN106770194A (en) * | 2017-01-20 | 2017-05-31 | 华中科技大学 | Cereal crops place of production discrimination method based on wavelet transformation LIBS |
CN108596246A (en) * | 2018-04-23 | 2018-09-28 | 浙江科技学院 | The method for building up of soil heavy metal content detection model based on deep neural network |
CN109063773A (en) * | 2018-08-03 | 2018-12-21 | 华中科技大学 | A method of laser microprobe nicety of grading is improved using characteristics of image |
CN110751048A (en) * | 2019-09-20 | 2020-02-04 | 华中科技大学 | Laser probe classification method and device based on image characteristic automatic spectral line selection |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104730041B (en) * | 2013-12-20 | 2017-03-22 | 武汉新瑞达激光工程有限责任公司 | Method and apparatus for improving plastic identification precision of laser probe |
US20150346103A1 (en) * | 2014-05-29 | 2015-12-03 | Bwt Property, Inc. | Laser Induced Breakdown Spectroscopy (LIBS) Apparatus and Method for Performing Spectral Imaging of a Sample Surface |
CN107817239B (en) * | 2016-09-13 | 2019-06-18 | 中国科学院沈阳自动化研究所 | A kind of LIBS spectral correction method based on plasma position information |
AU2017347026B2 (en) * | 2016-10-21 | 2022-08-11 | National Research Council Of Canada | Laser-induced breakdown spectroscopy system and method, and detection system and method therefor |
CN108573105A (en) * | 2018-04-23 | 2018-09-25 | 浙江科技学院 | The method for building up of soil heavy metal content detection model based on depth confidence network |
CN109975273A (en) * | 2019-03-07 | 2019-07-05 | 四川大学 | A kind of petrographic classification method based on laser induced breakdown spectroscopy |
-
2019
- 2019-09-20 CN CN201910891729.5A patent/CN110751048B/en active Active
-
2020
- 2020-09-10 WO PCT/CN2020/114530 patent/WO2021052240A1/en active Application Filing
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030132142A1 (en) * | 1996-02-16 | 2003-07-17 | Huron Valley Steel Corporation | Metal scrap sorting system |
CN105139412A (en) * | 2015-09-25 | 2015-12-09 | 深圳大学 | Hyperspectral image corner detection method and system |
CN106770194A (en) * | 2017-01-20 | 2017-05-31 | 华中科技大学 | Cereal crops place of production discrimination method based on wavelet transformation LIBS |
CN108596246A (en) * | 2018-04-23 | 2018-09-28 | 浙江科技学院 | The method for building up of soil heavy metal content detection model based on deep neural network |
CN109063773A (en) * | 2018-08-03 | 2018-12-21 | 华中科技大学 | A method of laser microprobe nicety of grading is improved using characteristics of image |
CN110751048A (en) * | 2019-09-20 | 2020-02-04 | 华中科技大学 | Laser probe classification method and device based on image characteristic automatic spectral line selection |
Non-Patent Citations (2)
Title |
---|
KONG HAIYANG, SUN LAN-XIANG; HU JING-TAO; ZHANG PENG: "Automatic Method for Selecting Characteristic Lines Based on Genetic Algorithm to Quantify Laser-Induced Breakdown Spectroscopy", SPECTROSCOPY AND SPECTRAL ANALYSIS, vol. 36, no. 5, 1 May 2016 (2016-05-01), pages 1451 - 1457, XP055793065, DOI: 10.3964/j.issn.1000-0593(2016)05-1451-07 * |
ZHANG PENG, SUN LANXIANG, YU HAIBIN, ZENG PENG, QI LIFENG, XIN YONG: "An Image Auxiliary Method for Quantitative Analysis of Laser-Induced Breakdown Spectroscopy", ANALYTICAL CHEMISTRY, AMERICAN CHEMICAL SOCIETY, vol. 90, no. 7, 3 April 2018 (2018-04-03), pages 4686 - 4694, XP055793066, ISSN: 0003-2700, DOI: 10.1021/acs.analchem.7b05284 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117890486A (en) * | 2024-03-15 | 2024-04-16 | 四川吉利学院 | Magnetic shoe internal defect detection method based on sparse cut space projection |
CN117890486B (en) * | 2024-03-15 | 2024-05-14 | 四川吉利学院 | Magnetic shoe internal defect detection method based on sparse cut space projection |
Also Published As
Publication number | Publication date |
---|---|
CN110751048B (en) | 2022-06-14 |
CN110751048A (en) | 2020-02-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11644395B2 (en) | Multi-spectral imaging including at least one common stain | |
US12029594B2 (en) | Systems and methods for enhanced imaging and analysis | |
US8280140B2 (en) | Classifying image features | |
WO2017073737A1 (en) | Analysis device | |
Bhargava | Towards a practical Fourier transform infrared chemical imaging protocol for cancer histopathology | |
DE112015003362T5 (en) | VIRTUAL INSPECTION SYSTEMS WITH A MULTIPLE OF MODES | |
CN113155809B (en) | Novel spectral detection method for ore classification and real-time quantitative analysis | |
WO2021052240A1 (en) | Laser probe classification method and device capable of automatically selecting spectral lines on basis of image features | |
CN107436285A (en) | Fast high-flux bloom spectrum detection device and detection method based on linear light source excitation | |
CN109063773B (en) | Method for improving laser probe classification precision by using image features | |
Clemens et al. | Quantum cascade laser-based mid-infrared spectrochemical imaging of tissue and biofluids | |
JP2009250867A (en) | X-ray analyzer with energy dispersive x-ray spectrometer | |
Fang et al. | Super-resolution Raman imaging towards visualisation of nanoplastics | |
EP2332073B1 (en) | Shape parameter for hematology instruments | |
JP2023511761A (en) | Methods and systems for adjusting training gates to adapt to flow cytometer data | |
CN104990908B (en) | The confocal induced breakdown Raman spectrum imaging detection method of laser twin shaft and device | |
CN207036660U (en) | Fast high-flux bloom spectrum detection device based on linear light source excitation | |
US20220155209A1 (en) | Method for Optimal Scaling of Cytometry Data for Machine Learning Analysis and Systems for Same | |
CN107421639A (en) | Plasma three-dimensional information diagnostic system during material surface handling process | |
DE102024104587A1 (en) | DEEP LEARNING TECHNIQUES FOR RAPID DETECTION OF ANOMALIES IN EXPERIMENTAL DATA | |
CN117848928A (en) | Star form particulate matter particle shape recognition device and method based on multi-angle scattering spectrum | |
CN117288661A (en) | Method, medium and system for outputting cell mass removal signal by flow cytometer |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 20865221 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 20865221 Country of ref document: EP Kind code of ref document: A1 |