Method, apparatus and computer readable medium for detecting contaminants on a surface of a sample

文档序号:1844546 发布日期:2021-11-16 浏览:24次 中文

阅读说明:本技术 检测样品表面污染物的方法、装置和计算机可读取介质 (Method, apparatus and computer readable medium for detecting contaminants on a surface of a sample ) 是由 徐大勇 李华杰 王道铨 堵劲松 骆永昌 孟庆华 林志平 李辉 苏子淇 王锐亮 李 于 2021-08-20 设计创作,主要内容包括:本公开提供一种检测样品表面污染物的方法、装置和计算机可读取介质。其中,检测样品表面污染物的方法包括:获取样品光谱;对样品光谱进行主成分分析,取前三个主成分所对应的波段数据生成假彩色图像;从假彩色图像中识别受污染区和未污染区;分别获取受污染区与未污染区的光谱;比较受污染区与未污染区的光谱差异,以及根据所述差异定位一个或多个特征波长;根据所述特征波长确定污染物的一个或多个性质。(The present disclosure provides a method, apparatus, and computer-readable medium for detecting contaminants on a surface of a sample. The method for detecting the pollutants on the surface of the sample comprises the following steps: acquiring a sample spectrum; performing principal component analysis on the sample spectrum, and generating a false color image by taking wave band data corresponding to the first three principal components; identifying contaminated and uncontaminated regions from the false color image; respectively acquiring spectrums of a polluted area and an uncontaminated area; comparing the spectral difference of the contaminated area with the uncontaminated area and locating one or more characteristic wavelengths according to the difference; one or more properties of the contaminant are determined from the characteristic wavelength.)

1. A method of detecting contaminants on a surface of a sample, comprising:

-obtaining a sample spectrum;

performing principal component analysis on the sample spectrum, and taking the wave band data corresponding to the first three principal components to generate a false color image;

-identifying contaminated and uncontaminated areas from the false colour image;

-acquiring spectra of the contaminated and uncontaminated regions, respectively;

-comparing the spectral difference of the contaminated area with the uncontaminated area and locating one or more characteristic wavelengths according to said difference;

-determining one or more properties of the contaminant from the characteristic wavelength.

2. The method of claim 1, wherein the sample spectrum is a hyperspectral image of the sample.

3. The method of claim 2, the hyperspectral image being acquired under one or more of the following spectral test conditions:

the wavelength range of the hyperspectral region is 400-2500 nm;

the number of the hyperspectral wave bands is 250-300;

-the spectral resolution of the hyperspectrum is below 15 nm;

spatial resolution of the hyperspectral region of 1mm2Below/pixel.

4. The method of claim 1, wherein the step of obtaining a sample spectrum comprises: and acquiring an original spectrum, and screening an interested area from the original spectrum according to the reflectivity of the sample.

5. The method of claim 4, wherein the sample is a cigarette rod and the region of interest is defined as: a region with a reflectivity of greater than 0.45 at a wavelength of 1300 nm.

6. The method of claim 1, the step of identifying contaminated and uncontaminated regions from the false color image comprising: the contaminated region is determined using an edge detection algorithm.

7. The method of claim 6, wherein the contaminated region is a connected area of at least 3 pixels or more.

8. The method of claim 1, wherein the operation of obtaining spectra of contaminated and uncontaminated regions comprises: calculating average spectra of the contaminated area and the uncontaminated area respectively, and performing envelope elimination operation on the average spectra.

9. The method of claim 1, the step of locating one or more characteristic wavelengths according to the difference comprising: the spectra of the contaminated and uncontaminated regions are subtracted to obtain a relative spectrum, and the wavelength of the absorption characteristic peak position of the relative spectral curve is determined.

10. The method of claim 1, determining one or more properties of a contaminant from the characteristic wavelength comprising: the type of contaminant is determined based on the characteristic wavelength.

11. An apparatus for detecting contaminants on a surface of a sample, comprising:

a memory; and

a processor coupled to the memory, the processor configured to perform the method of detecting contamination of a sample surface of any of claims 1-10 based on instructions stored in the memory device;

preferably, the means for detecting contamination on the surface of the sample further comprises a spectrometer that outputs a spectrum of the sample to the reservoir.

12. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method for detecting contamination of a surface of a sample according to any one of claims 1 to 10.

Technical Field

The invention relates to the field of spectrum detection, in particular to a method and a device for detecting pollutants on the surface of a sample and a computer readable medium.

Background

In the production and processing process of cigarettes, due to the reasons of uneven drying moisture of tobacco shreds, uneven feeding and perfuming, oil leakage of processing equipment and the like, the surfaces of the rolled cigarettes are easy to be polluted, colored cigarettes are produced, and the product image and the health of consumers are influenced. Therefore, in the actual production process, the polluted cigarettes should be found and removed in time, and the reasons are searched and hidden dangers are eliminated. At present, the color spot cigarette is mainly discovered to be mainly patrolled by operators or fed back by consumers, the timeliness is poor, the discovery rate is low, the reason for generating the color spots is mainly determined by manual experience and is checked one by one, and the efficiency is low.

Chinese patent 201610234421.X invented a method and system for detecting cigarette color spot pollution, and invented a method for determining pollution source by near infrared. This patent is only traceed back to the pollution sources of the cigarette that pollutes, can't carry out real-time on-line monitoring to need complex operation, mainly show: firstly, each pollution source and cigarette material need to be polluted, a first spectrum curve is obtained and modeled, and the model is used for identifying the pollution source of the polluted cigarette to be detected; secondly, the result accuracy is greatly influenced by the modeling method, the robustness of the model and the stability of cigarette paper batches, in order to ensure the result accuracy, different batches of cigarette materials need to be modeled again, 200 samples are needed for each modeling test of each pollution source, the test quantity is huge, and the method is not convenient to implement specifically.

In the identification of pollution sources of macular cigarette based on ATR-FTIR technology (food and machinery, 2019(11)), the identification of pollutants is realized by comparing spectra of pollution spots on self-made macular cigarette and actual macular cigarette, and the detection is that a sample to be detected is placed on a crystal material (generally Zn, Se, Ge, Si crystals and diamonds) and the structural information of chemical components on the surface layer of the sample is obtained by collecting reflection signals on the surface of the sample. The method is similar to the method disclosed in the patent 201610234421.X, a spectral database needs to be established by utilizing all pollutants and all cigarette paper to self-prepare a yellow spot tobacco sample, the accuracy and the stability of a judgment result are difficult to guarantee due to the fact that the types of the cigarette paper are various and the cigarette paper for different batches has differences, and the polluted position needs to be cut out during detection, so that online monitoring cannot be realized.

Tracing and identifying cigarette yellow spot pollutants (Guizhou agricultural science, 2019,47(5)) adopts a Fourier transform infrared spectroscopy (FT-IR) method and a gas chromatography mass spectrometry (Gc/MS) method to analyze and identify the yellow spot cigarette surface pollutants generated in the cigarette production process. The method solves the problem of mixing of the spectral information of the pollutants and the polluted paper base, but the sample needs to be pretreated, the operation is complex, the detection time is long, and the online monitoring can not be realized.

All the methods are the technical schemes provided aiming at tracing the pollution source after the cigarette pollution is found artificially, the operation is complicated, and the online detection cannot be realized.

Disclosure of Invention

Aiming at the problems that the method is complicated to operate, the accuracy is influenced by batch difference of pollutants and model stability, and online detection and identification cannot be carried out, the invention provides the method for detecting the pollutants on the surface of the sample, and the method can automatically identify whether the sample (such as a cigarette) is polluted and judge the source of the pollutants.

In some aspects, the present disclosure provides a method of detecting contaminants on a surface of a sample, comprising:

-obtaining a sample spectrum;

performing principal component analysis on the sample spectrum, and taking the wave band data corresponding to the first three principal components to generate a false color image;

-identifying contaminated and uncontaminated areas from the false colour image;

-acquiring spectra of the contaminated and uncontaminated regions, respectively;

-comparing the spectral difference of the contaminated area with the uncontaminated area and locating one or more characteristic wavelengths according to the difference;

-determining one or more properties of the contaminant from the characteristic wavelength.

According to the scheme, the polluted area and the uncontaminated area are identified by the false color image obtained through principal component analysis, and the identification precision is effectively improved.

According to the scheme, by comparing the spectrums of the polluted region and the uncontaminated region, the influence of cigarette background on the components of the polluted region is effectively eliminated, and the spectrum characteristics of the polluted region are highlighted.

In some embodiments, the sample spectrum is a hyperspectral image of the sample.

In some embodiments, the hyperspectral image is acquired under one or more of the following spectral test conditions:

the wavelength range of the hyperspectral region is 400-2500nm (for example, 400-1000nm or 1000-2500 nm);

the number of the hyperspectral wave bands is 250-300;

-the spectral resolution of the hyperspectrum is below 15 nm;

spatial resolution of the hyperspectral region of 1mm2Below/pixel.

In some embodiments, the step of obtaining a spectrum of the sample comprises: and acquiring an original spectrum, and screening an interested area from the original spectrum according to the reflectivity of the sample.

In some embodiments, the sample is a cigarette rod and the region of interest is defined as: a region with a reflectivity of greater than 0.45 at a wavelength of 1300 nm.

The parameter setting effectively distinguishes the cigarette area from the non-cigarette area,

in some embodiments, the step of identifying contaminated and uncontaminated regions from the false color image comprises: the contaminated region is determined using an edge detection algorithm.

In some embodiments, the contaminated region is a connected region of at least 3 pixels or more.

In some embodiments, the operation of obtaining spectra of the contaminated region and the uncontaminated region comprises: calculating the average spectrum of the polluted area and the average spectrum of the uncontaminated area respectively, and performing envelope elimination operation on the average spectra.

Envelope removal operation is respectively carried out on the spectrums of the polluted region and the uncontaminated region, so that the spectrum information of the polluted region and the uncontaminated region is effectively enhanced, and the accuracy of the method is synergistically enhanced with other steps of the method.

In some embodiments, the step of locating one or more characteristic wavelengths according to the difference comprises: the spectra of the contaminated and uncontaminated regions are subtracted to obtain a relative spectrum, and the wavelength of the absorption characteristic peak position of the relative spectral curve is determined.

In some embodiments, determining one or more properties of the contaminant from the characteristic wavelengths comprises: the chemical composition of the contaminant is determined based on the characteristic wavelength.

In some embodiments, the method comprises the steps of automatically identifying a polluted region and an uncontaminated region through data processing by a spectral imaging technology, judging whether the cigarette is polluted or not, simultaneously obtaining spectral information of the polluted region and the uncontaminated region, comparing a spectrum of the polluted region and a spectrum of the uncontaminated region with a spectrum envelope corresponding to the polluted region to obtain spectrum information after the envelope is removed, comparing the spectrum of the polluted region with the spectrum of the uncontaminated region after the envelope is removed to obtain a relative spectral curve of the polluted region, and matching the absorption characteristic peak position of the relative spectral curve with a characteristic peak of a pollutant substance to determine the pollution source of the polluted cigarette.

In some embodiments, the method for detecting the pollution cigarette and the pollution source thereof comprises the following steps:

(1) by using the spectral imaging equipment, a cigarette spectral image is obtained and subjected to spectral correction, the spectral range can be 400-1000nm or 1000-2500nm, the spectral resolution is not more than 15nm, and the spatial resolution is not more than 1mm 2/pixel.

(2) Deducting cigarette background, and extracting cigarette empty-spectrum information;

(3) performing principal component analysis on cigarette spectra, synthesizing false color images of the first 3 principal components, and identifying a polluted region and an uncontaminated region through image analysis;

(4) respectively calculating the average spectrum of a polluted region and the average spectrum of an uncontaminated region, calculating an envelope curve of the corresponding spectrum, and dividing the average spectrum by the envelope curve to obtain a spectrum with the envelope curve removed;

(5) comparing the spectrum of the polluted region with the spectrum of the uncontaminated region after envelope curve removal to obtain a relative spectrum curve of the polluted region;

(6) finding out the wavelength corresponding to the absorption peak position of the relative spectrum curve, and comparing the wavelength with the absorption characteristic peak wavelength of the pollution source substance, wherein the substance with the closest wavelength is the pollutant polluting the cigarette.

In some aspects, the present disclosure provides an apparatus for detecting contaminants on a surface of a sample, comprising:

a memory; and

a processor coupled to the memory, the processor configured to perform any of the above methods of detecting contamination of a surface of a sample based on instructions stored in the memory device.

In some aspects, the present disclosure provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements any of the above-described methods of detecting contamination of a surface of a sample.

Description of the terms

The present disclosure, if the following terms are used, may have the following meanings.

The term "hyperspectral" refers to spectral data obtained by an imaging method that obtains spatially resolved spectral information by providing a spectrum for each pixel within a target image. Typically, hyperspectral imaging is achieved by combining a first method of acquiring spectral data with a second method of acquiring spatial imaging data, wherein both methods may be performed by a single imaging device, among other things. The data thus obtained may preferably be presented in a three-dimensional graphical representation by using two spatial dimensions covering the spatial imaging data and one spectral dimension comprising the spectral data. Such a three-dimensional graphical representation may also be referred to as a "hyperspectral cube". Spatially resolved spectroscopic information can be used for a variety of applications including, but not limited to, determining the chemical composition of a target in a non-contact, non-destructive manner.

The term "principal component analysis" is a statistical method that uses an orthogonal transformation to convert a set of observations of a possibly correlated variable into a set of values of a linearly uncorrelated variable called a principal component. It finds the dominant component of the data set and converts the data into a new low-dimensional subspace. The principal components, which may be represented by feature vectors, mathematically correspond to directions in the original N-dimensional space, such that the first principal component accounts for as much of the variance in the data as possible, and each subsequent component accounts for as much of the remaining variance as possible. The first three component wave bands are obtained by utilizing principal component analysis, and a false color image can be generated to realize information visualization.

The term "edge detection algorithm" refers to a computer algorithm that identifies edges (e.g., abrupt changes or gradients in image brightness). The edge detection algorithm may identify edge features and use the edge features to predict edges within the written surface of the digital video. The edge detection algorithm may include a Canny edge detector. The term "edge feature" as used herein refers to a feature of a digital image that represents one or more edges. For example, an edge feature may include a change in brightness or strong gradient within a digital image that indicates an edge (e.g., line segment).

The term "envelope elimination" (continuous removed) enhances the spectral analysis method of absorption features of interest, which effectively highlights the absorption and reflection characteristics of the spectral curve. The "envelope" may be defined as a straight line connecting the convex peak points on the spectral curve point by point, and making the external angle of the broken line on the peak point greater than 180 °, dividing the value on the original spectral curve by the corresponding value on the envelope, i.e. spectral envelope removal.

Advantageous effects

The technical scheme of the disclosure can have one or more of the following advantages:

1. the operation is simple and convenient, and the manual pollution position identification is not needed;

2. the cigarette paper quality difference is independent of pollutants, so that the result difference caused by the difference of cigarette paper of different brands and the quality stability difference of cigarette paper of different batches of uniform brands is avoided;

3. modeling is not needed, and a large number of modeling tests and result differences caused by modeling methods and model quality are avoided.

Drawings

FIG. 1 is a graph showing the spectral curves of a contaminated area and an uncontaminated area on a cigarette;

FIG. 2 is a graph showing a relative spectrum of a contaminated region of a cigarette;

FIG. 3 is a flow chart of a method of detecting contaminants on a surface of a sample;

FIG. 4 is a schematic view of some apparatus for detecting contaminants on a sample surface;

FIG. 5 is a schematic view of still another apparatus for detecting contaminants on a surface of a sample.

Detailed Description

Embodiments of the present invention will be described in detail below with reference to examples, but those skilled in the art will appreciate that the following examples are only illustrative of the present invention and should not be construed as limiting the scope of the present invention. The examples, in which specific conditions are not specified, were conducted under conventional conditions or conditions recommended by the manufacturer. The reagents or instruments used are not indicated by the manufacturer, and are all conventional products commercially available.

The following describes embodiments of the present invention in further detail with reference to the accompanying drawings.

The sample to be tested is cigarette, cigarette filter stick and cigarette packaging material, such as cigarette paper, forming paper, tipping paper and the like.

(1) Cigarette is subjected to high-spectrum imager (Image-lambda-N25E-HS, SWIR)Performing spectrum detection, wherein the parameters of the spectrometer are set as follows: the wavelength range is 1000-2500nm, the number of wave bands is 288, the spectral resolution is 12nm, and the spatial resolution is 0.1mm2Collecting cigarette spectrum images;

(2) extracting cigarette blank-spectrum information according to 1300nm for a threshold value with the reflectivity larger than 0.45, and extracting image space position information with the reflectivity larger than 0.45, namely deducting a non-cigarette background image;

(3) carrying out PCA (principal component analysis) dimension reduction on cigarette spectra, providing the first 3 main component wave bands, synthesizing a false color image, searching the edge of a polluted area by using an edge detection method in an image processing technology, and taking an area with more than 3 continuous pixels as the polluted area;

(4) calculating the average spectrum of the polluted area and the average spectrum of the uncontaminated area respectively, calculating an envelope curve corresponding to the spectrums, and dividing the average spectrum by an envelope curve corresponding to the spectrums to obtain the spectrums with the envelope curves removed as shown in figure 1 (spectrum curves of the polluted area and the uncontaminated area on the cigarette);

(5) comparing the spectrum of the polluted region with the spectrum of the uncontaminated region after envelope curve removal (excluding), and obtaining a relative spectrum curve of the polluted region, as shown in FIG. 2 (relative spectrum curve of the polluted region of cigarette);

(6) the characteristic absorption peak wavelength of the cigarette polluted area relative to the spectral curve is 1946nm and 1452nm, and the absorption peak wavelength is closest to the absorption peak wavelength of water through database query, so that the cigarette pollution source can be judged to be water.

FIG. 3 is a flow chart of a method of detecting contaminants on a sample surface. As shown in fig. 3, a method for detecting contaminants on a surface of a sample, comprising:

s101, acquiring a sample spectrum;

s102, carrying out principal component analysis on the sample spectrum, and generating a false color image by taking wave band data corresponding to the first three principal components;

s103, identifying polluted areas and uncontaminated areas from the false color image;

s104, respectively acquiring spectrums of a polluted region and an uncontaminated region;

s105, comparing the spectral difference of the polluted region and the uncontaminated region, and positioning one or more characteristic wavelengths according to the difference;

s106 determines one or more properties of the contaminant from the characteristic wavelength.

FIG. 4 shows a schematic view of some devices for detecting contaminants on the surface of a sample.

As shown in fig. 4, the apparatus 7 for detecting contamination on the surface of a sample of this embodiment includes: a memory 71 and a processor 72 coupled to the memory 71, the processor 72 being configured to perform a method of detecting contamination of a surface of a sample according to any of the embodiments of the present disclosure based on instructions stored in the memory 71.

The memory 71 may include, for example, a system memory, a fixed nonvolatile storage medium, and the like. The system memory stores, for example, an operating system, an application program, a Boot Loader (Boot Loader), a database, and other programs.

FIG. 5 is a schematic view of still another apparatus for detecting contaminants on a surface of a sample.

As shown in fig. 5, the apparatus 8 for detecting contamination on the surface of a sample of this embodiment includes: a memory 810 and a processor 820 coupled to the memory 810, the processor 820 being configured to perform the detection of contaminants on the surface of the sample in any of the embodiments described above based on instructions stored in the memory 810.

Memory 810 may include, for example, system memory, fixed non-volatile storage media, and the like. The system memory stores, for example, an operating system, an application program, a Boot Loader (Boot Loader), and other programs.

The apparatus 8 for detecting contamination on a surface of a sample may further include an input output interface 830, a network interface 840, a storage interface 850, and the like. These interfaces 830, 840, 850 and between the memory 810 and the processor 820 may be connected, for example, by a bus 860. The input/output interface 830 provides a connection interface for input/output devices such as a display, a mouse, a keyboard, and a touch screen. The network interface 840 provides a connection interface for various networking devices. The storage interface 850 provides a connection interface for external storage devices such as an SD card and a usb disk.

As will be appreciated by one skilled in the art, embodiments of the present disclosure may be provided as a method, system, or computer program product. Accordingly, the present disclosure may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present disclosure may take the form of a computer program product embodied on one or more computer-usable non-transitory storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.

So far, the method of detecting contamination on a surface of a sample, the apparatus for detecting contamination on a surface of a sample, and the computer-readable storage medium according to the present disclosure have been described in detail. Some details that are well known in the art have not been described in order to avoid obscuring the concepts of the present disclosure. It will be fully apparent to those skilled in the art from the foregoing description how to practice the presently disclosed embodiments.

The method and system of the present disclosure may be implemented in a number of ways. For example, the methods and systems of the present disclosure may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above-described order for the steps of the method is for illustration only, and the steps of the method of the present disclosure are not limited to the order specifically described above unless specifically stated otherwise. Further, in some embodiments, the present disclosure may also be embodied as programs recorded in a recording medium, the programs including machine-readable instructions for implementing the methods according to the present disclosure. Thus, the present disclosure also covers a recording medium storing a program for executing the method according to the present disclosure.

Although some specific embodiments of the present disclosure have been described in detail by way of example, it should be understood by those skilled in the art that the foregoing examples are for purposes of illustration only and are not intended to limit the scope of the present disclosure. It will be appreciated by those skilled in the art that modifications may be made to the above embodiments without departing from the scope and spirit of the present disclosure. The scope of the present disclosure is defined by the appended claims.

11页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种电子陶瓷表面缺陷检测系统

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!