CN108064340B - Focus deviation determination method, device, storage medium and electronic apparatus - Google Patents
Focus deviation determination method, device, storage medium and electronic apparatus Download PDFInfo
- Publication number
- CN108064340B CN108064340B CN201780002523.1A CN201780002523A CN108064340B CN 108064340 B CN108064340 B CN 108064340B CN 201780002523 A CN201780002523 A CN 201780002523A CN 108064340 B CN108064340 B CN 108064340B
- Authority
- CN
- China
- Prior art keywords
- raman spectrum
- peak
- spectrum data
- recorded
- raman
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 42
- 238000001237 Raman spectrum Methods 0.000 claims abstract description 211
- 238000001514 detection method Methods 0.000 claims abstract description 108
- 238000001069 Raman spectroscopy Methods 0.000 claims abstract description 87
- 101100134058 Caenorhabditis elegans nth-1 gene Proteins 0.000 claims description 7
- 238000004364 calculation method Methods 0.000 claims description 7
- 238000000605 extraction Methods 0.000 claims description 3
- 230000003595 spectral effect Effects 0.000 claims description 2
- 238000004891 communication Methods 0.000 description 7
- 238000010586 diagram Methods 0.000 description 7
- 239000000126 substance Substances 0.000 description 7
- 230000005236 sound signal Effects 0.000 description 4
- 239000000463 material Substances 0.000 description 3
- 239000003814 drug Substances 0.000 description 2
- 229940079593 drug Drugs 0.000 description 2
- 238000007689 inspection Methods 0.000 description 2
- 239000000203 mixture Substances 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000003491 array Methods 0.000 description 1
- 238000013480 data collection Methods 0.000 description 1
- 230000007613 environmental effect Effects 0.000 description 1
- 238000002474 experimental method Methods 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000007781 pre-processing Methods 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N21/00—Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
- G01N21/62—Systems in which the material investigated is excited whereby it emits light or causes a change in wavelength of the incident light
- G01N21/63—Systems in which the material investigated is excited whereby it emits light or causes a change in wavelength of the incident light optically excited
- G01N21/65—Raman scattering
Landscapes
- Health & Medical Sciences (AREA)
- Nuclear Medicine, Radiotherapy & Molecular Imaging (AREA)
- Physics & Mathematics (AREA)
- Life Sciences & Earth Sciences (AREA)
- Chemical & Material Sciences (AREA)
- Analytical Chemistry (AREA)
- Biochemistry (AREA)
- General Health & Medical Sciences (AREA)
- General Physics & Mathematics (AREA)
- Immunology (AREA)
- Pathology (AREA)
- Investigating, Analyzing Materials By Fluorescence Or Luminescence (AREA)
- Spectrometry And Color Measurement (AREA)
Abstract
A method, an apparatus, a storage medium and an electronic device for judging focus deviation are provided, the method comprises: in the process of emitting laser by Raman detection equipment and collecting Raman spectrum, recording accumulated collected Raman spectrum data of a spectrometer sensor of the Raman detection equipment at intervals of a fixed time, or recording accumulated collected Raman spectrum data of the spectrometer sensor of the Raman detection equipment at every time when the brightness value of the collected Raman spectrum increases by a fixed value; extracting peak information of the Raman spectrum data recorded each time; determining the growth rate from each peak of the Raman spectrum data recorded at the nth time to the (n + 1) th time according to the peak information recorded at the nth time and the peak information recorded at the (n + 1) th time; judging whether the increasing rates of all wave crests recorded at the nth time are consistent or not; and when the increasing rates of the peaks recorded at the nth time are inconsistent, determining that the laser emitted by the Raman detection device is out of focus.
Description
Technical Field
The present disclosure relates to the field of substance detection, and in particular, to a method and an apparatus for determining focus offset, a storage medium, and an electronic device.
Background
Raman detection devices utilize raman scattering to detect the components of substances, and are currently used in a variety of fields, including professional oil exploration, drug detection, and scenes such as common safety inspection and drug enforcement in life.
The existing raman detection equipment usually adopts non-contact detection, and all needs to manually align the focal point of laser to an article to be detected. However, when the human eye directly looks at the laser focus, the laser focus is inevitably deviated and even aligned to other objects without being perceived by the user. The consequence caused by laser deviation may be that the signal-to-noise ratio determination of the detection cannot pass, re-detection is required, and serious misjudgment may also occur, for example, an article aligned in the deviation process is also used as an article to be detected, so that the article to be detected is determined as a mixture by the detection result, and serious misjudgment is caused, for example, the total detection time is 2 seconds, the article to be detected is correctly irradiated in the first 1 second, then the plastic plate beside the article is irradiated in 0.4 second, and then the article to be detected is correctly irradiated in 0.6 second, and then the final identification result may determine that the article to be detected is a mixture, the specific component is 80% of the actual substance of the article to be detected, and 20% of the actual substance is plastic.
Disclosure of Invention
The disclosure mainly aims to provide a method and a device for judging focus deviation, a storage medium and an electronic device, which are used for solving the technical problem that the deviation of a laser focus is not easy to be perceived in a Raman detection process.
In order to achieve the above object, according to a first aspect of embodiments of the present disclosure, there is provided a method for determining a focus deviation, including: in the process of emitting laser by Raman detection equipment and collecting Raman spectrum, recording accumulated collected Raman spectrum data of a spectrometer sensor of the Raman detection equipment at intervals of a fixed time, or recording accumulated collected Raman spectrum data of the spectrometer sensor of the Raman detection equipment at every time when the brightness value of the collected Raman spectrum increases by a fixed value; extracting peak information of the Raman spectrum data recorded each time; determining the growth rate from each peak of the N-th recorded Raman spectrum data to the N +1 th recording according to the peak information of the N-th recorded Raman spectrum data and the peak information of the N + 1-th recorded Raman spectrum data, wherein N is a positive integer larger than 0 and smaller than N, and N is the total number of times of recording the Raman spectrum data; judging whether the increasing rates of all wave crests of the n-th recorded Raman spectrum data are consistent or not; and when the increasing rates of the peaks of the n-th recorded Raman spectrum data are not consistent, determining that the laser emitted by the Raman detection device is out of focus.
According to a second aspect of the embodiments of the present disclosure, there is provided an apparatus for determining a focus deviation, the apparatus including:
the data recording module is used for recording accumulated collected Raman spectrum data of a spectrometer sensor of the Raman detection equipment at intervals of a fixed time length in the process of emitting laser by the Raman detection equipment and collecting the Raman spectrum, or recording accumulated collected Raman spectrum data of the spectrometer sensor of the Raman detection equipment at every time when the brightness value of the collected Raman spectrum increases by a fixed value;
the peak value extraction module is used for extracting peak information of the Raman spectrum data recorded each time;
the calculation module is used for determining the growth rate from each peak of the N-th recorded Raman spectrum data to the N + 1-th recording according to the peak information of the N-th recorded Raman spectrum data and the peak information of the N + 1-th recorded Raman spectrum data, wherein N is a positive integer larger than 0 and smaller than N, and N is the total number of times of recording the Raman spectrum data;
the comparison and judgment module is used for judging whether the increase rates of all wave crests of the Raman spectrum data recorded for the nth time are consistent or not;
and the determining module is used for determining that the laser emitted by the Raman detection device is out of focus when the growth rates of all wave peaks of the n-th recorded Raman spectrum data are not consistent.
According to a third aspect of embodiments of the present disclosure, there is provided a computer readable storage medium having one or more programs embodied therein for performing the method of the first aspect of embodiments of the present disclosure.
According to a fourth aspect of the embodiments of the present disclosure, there is provided an electronic apparatus including: the computer-readable storage medium of the third aspect of the embodiments of the present disclosure; and one or more processors for executing the program in the computer-readable storage medium.
For the Raman spectrum of an object to be detected, the growth proportions of all wave crests appearing at different positions of the object to be detected are equal, through the technical scheme provided by the disclosure, the accumulated collected Raman spectrum of the spectrometer sensor is recorded for many times, whether the growth proportions of all the wave crests are consistent or not is judged, whether the laser focus is deviated or not can be determined according to the judgment result, the user does not need to judge through experience, the situation that the Raman spectrum of other objects is mixed in the collected Raman spectrum due to the deviation of the focus is avoided, and the accuracy of material detection can be improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
Fig. 1 is a schematic flowchart of a method for determining a focus offset according to an embodiment of the present disclosure;
fig. 2a and 2b are schematic diagrams of peaks of raman spectral data provided by an embodiment of the present disclosure;
fig. 3 is a block diagram of a device for determining focus deviation according to an embodiment of the present disclosure;
fig. 4 is a block diagram of an electronic device provided by an embodiment of the present disclosure.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
Before describing the method, the apparatus, the storage medium, and the electronic device for determining a focus offset provided by the present disclosure, an application scenario related to various embodiments of the present disclosure is first described. The application scene is that the Raman detection equipment is used for detecting substances of an object to be detected, and the Raman detection equipment is provided with a laser transmitter and a spectrometer sensor. The laser emitter emits laser to irradiate the object to be detected, the object to be detected scatters Raman spectrum under the irradiation of the laser, and the spectrometer sensor is used for collecting Raman spectrum data. It should be noted that the raman spectrum data collected by the spectrometer sensor is accumulated in real time, that is, the raman spectrum data collected by the spectrometer sensor is the total data accumulated from the beginning to the current time without clearing the sensor data.
Fig. 1 is a flowchart of a method for determining a focus offset according to an embodiment of the present disclosure, as shown in fig. 1, the method includes:
and S11, in the process of emitting laser by the Raman detection device and collecting Raman spectra, recording accumulated collected Raman spectrum data of the spectrometer sensor of the Raman detection device every other fixed time, or recording accumulated collected Raman spectrum data of the spectrometer sensor of the Raman detection device every time the brightness value of the collected Raman spectra increases by a fixed value.
It should be noted that, in the detection process of the raman detection device, usually, the laser is turned on in the first half of the time to irradiate the object to be detected and collect the raman spectrum, and the laser is turned off in the second half of the time, but the original holding posture is still maintained, and the sensor is turned on to collect the interference information of the circuit, the ambient light, and the like. In this case, the recording of the raman spectrum data described in the above-described step S11 is performed during a period in which the raman detection apparatus continuously emits the laser light to collect the raman spectrum.
Specifically, step S11 includes the following two ways:
first, in step S11, the step of recording accumulated collected raman spectrum data of the spectrometer sensor of the raman detection device every fixed time interval may include: dividing the detection time length into N time slices according to the total laser emission time length M of the Raman detection equipment; and recording the accumulated collected Raman spectrum data of the spectrometer sensor of the Raman detection device once every interval time length M/N.
For example, in a possible implementation manner, the raman detection device may set a fixed time length (i.e., the total laser emission time length M) for laser emission, such as 2s, and the raman spectrum collection is considered to be finished when the time is reached. N may be a value that is preset in consideration of the total time length M and the calculation capability of the raman spectroscopy device in combination. The larger M is, the larger each time slice is, the more the judgment precision is possibly influenced, and the larger N is, the smaller each time slice is, the higher the requirement on the computing power is.
Second, the step of recording the accumulated collected raman spectrum data of the spectrometer sensor of the raman detection device every time the brightness value of the collected raman spectrum increases by a fixed value in step S11 may include: dividing the brightness of the Raman spectrum data into N brightness slices according to a total detection brightness value B of the Raman detection equipment, wherein the total detection brightness value refers to that the Raman detection equipment stops detecting when the brightness value of the collected Raman spectrum data reaches B; and recording the collected Raman spectrum data by the spectrometer sensor of the Raman detection device once every B/N increase of the brightness value of the collected Raman spectrum.
For example, in a possible implementation manner, the raman detection apparatus may further set a maximum value of one peak, for example, when the vertical axis reaches 40000 (sensor brightness value), the current integration time length is considered to reach the standard, and the raman spectrum collection is ended. In this case, the detected total brightness value B is a sensor brightness value set by the raman detection device. In addition, N may be a value set in advance in consideration of the total luminance value B and the calculation capability of the raman spectroscopy device in combination.
In particular, the two modes can be alternatively executed in the embodiment of the present disclosure.
And S12, extracting peak information of the Raman spectrum data recorded each time.
Illustratively, table 1 below shows peak information of the extracted raman spectrum data in the case where the above-described manner one is adopted.
TABLE 1
Referring to table 1, when the laser emission duration of the raman detection device reaches M, the collection of raman spectrum information is stopped, and data is recorded N times in total. It is worth noting that each time data is recorded, the spectrometer sensor starts collecting the raman spectrum and accumulates the collected total raman spectrum data at the current moment.
As another example, table 2 below shows peak information of the extracted raman spectrum data in the case of the above-described mode two.
TABLE 2
Referring to table 2, when the brightness value of the raman spectrum collected by the raman detection device reaches B, the collection of raman spectrum information is stopped, and data is recorded N times in total.
In addition, referring to tables 1 and 2, peak information extracted according to each recorded raman spectrum data of the embodiment of the present disclosure may include a peak value of a peak and an appearance position. Specifically, the peak information is illustrated in fig. 2a and 2b below.
Fig. 2a is a schematic diagram of the raman spectrum data 2 in table 1, and as shown in fig. 2a, the raman spectrum data 2 includes two peaks, the peaks are y12 and y22, respectively, and the positions where the peaks occur are X1 and X2 position points on the X axis, respectively, so that the peak information recorded in table 1 is (X1, y12) and (X2, y 22). Fig. 2b is a schematic diagram of the raman spectrum data 3 in table 1, and as shown in fig. 2b, the raman spectrum data 3 includes two peaks, the peaks are y12, y22 and y33, respectively, and the positions where the peaks occur are X1, X2 and X3 position points of the X axis, respectively, so that the peak information recorded in table 1 is (X1, y13), (X2, y23) and (X3, y 33).
And S13, determining the growth rate from each peak of the n-th recorded Raman spectrum data to the n + 1-th recording according to the peak information of the n-th recorded Raman spectrum data and the peak information of the n + 1-th recorded Raman spectrum data.
Wherein N is a positive integer greater than 0 and less than N, and N is the total number of times of recording raman spectrum data.
Still taking fig. 2a and 2b as an example, as can be seen from table 1, the raman spectrum data 2 recorded at the 2 nd time includes two peaks (x1, y12) and (x2, y22), which correspond to the peaks (x1, y13) and (x2, y23) in the raman spectrum data 3 from the 3 rd time of recording, so that the increasing rate from the peak (x1, y12) to the 3 rd time of recording is (y13-y12)/y12, and the increasing rate from the peak (x2, y22) to the 3 rd time of recording is (y23-y22)/y 22.
In addition, in one possible implementation, the peak information of each recorded raman spectrum data extracted in step S12 includes a peak value of a peak whose peak value exceeds a preset threshold value in each recorded raman spectrum data and a position where the peak value appears. Thus, step S13 specifically includes: determining the growth rate of the first peak according to the peak value of the first peak and the peak value of the peak with the same position as the first peak in the n-1 th recorded Raman spectrum data, wherein the first peak is any peak of which the peak in the n-th recorded Raman spectrum data exceeds a preset threshold value.
That is, the peak information recorded in table 1 or table 2 is information of a peak having a peak value larger than a preset threshold value. As y0 shown in fig. 2a and 2b, the peaks recorded in table 1 are information of peaks larger than y 0.
And S14, judging whether the growth rates of the peaks of the Raman spectrum data recorded at the nth time are consistent.
For example, the peak (x1, y12) in the raman spectrum data 2 of the 2 nd recording in table 1 has a growth rate of (y13-y12)/y12 by the 3 rd recording, and the peak (x2, y22) has a growth rate of (y23-y22)/y22 by the 3 rd recording.
Therefore, if (y13-y12)/y13 is equal to (y23-y22)/y23, the growth rates of the peaks in the 2 nd recording raman spectrum data match, or if (y13-y12)/y13- (y23-y22)/y23 is equal to 0, the growth rates of the peaks in the 2 nd recording raman spectrum data match.
It should be noted that, because a certain error range should be left due to the influence of the actual environmental factors, in the embodiment of the present disclosure, during the specific implementation, it may be determined whether the difference or the ratio of the growth rates of the respective peaks is within the preset error range, when the difference or the ratio of the growth rates of the respective peaks is within the preset error range, it is determined that the growth rates of the respective peaks are consistent, and when the difference or the ratio of the growth rates of the respective peaks is not within the preset error range, it is determined that the growth rates of the respective peaks are inconsistent.
And S15, when the growth rates of the peaks of the n-th recorded Raman spectrum data are not consistent, determining that the laser emitted by the Raman detection device is out of focus.
Because the growth ratios of the peaks appearing at different positions of the Raman spectrum of an object to be detected are equal, if the growth rates of the peaks of the Raman spectrum data recorded for the nth time are inconsistent, the Raman spectrum data of other substances are collected, and the focus deviation of laser emitted by the Raman detection equipment can be determined.
Therefore, by adopting the steps of the method, the accumulated collected raman spectra of the spectrometer sensor are recorded for many times, whether the growth ratios of the peaks are consistent or not is judged, whether the laser focus is shifted or not can be determined according to the judgment result, and a user does not need to judge through experience, so that the situation that the raman spectra of other objects are mixed in the collected raman spectra due to the shift of the focus is avoided, and the accuracy of material detection can be improved.
It should be noted that, when the growth rates of the peaks of the n-th recorded raman spectrum data are identical, a new peak may appear at a new position in the n + 1-th recorded raman spectrum data, for example, referring to fig. 2a and 2b, the 2-nd recorded raman spectrum data has a new peak at the x3 position, and since the peak is not recorded at the same position of the n-th recorded raman spectrum data, it is impossible to determine whether the growth rate of the newly appearing peak is identical to the growth rates of the other peaks, and thus it is impossible to determine that the laser light emitted by the raman detection apparatus is not out of focus when the growth rates of the peaks of the n-th recorded raman spectrum data are identical.
Therefore, in the embodiment of the present disclosure, if the growth rates of the peaks of the n-th recorded raman spectrum data are consistent, and a peak having a peak value exceeding a preset threshold does not appear at a new position in the n + 1-th recorded raman spectrum data compared to the peak of the n-th recorded raman spectrum data, it may be determined that the laser emitted by the raman detection apparatus does not have a focus deviation between the n-th recording and the n + 1-th recording. However, when the growth rates of the peaks of the i-th recorded raman spectrum data are consistent and a new peak whose peak exceeds a preset threshold appears at a new position in the i + 1-th recorded raman spectrum data compared with the peak of the i-th recorded raman spectrum data, it is necessary to further determine the growth rate of the newly appearing peak by combining with the i + 2-th recorded raman spectrum data to determine whether a focus deviation occurs, where i is a positive integer greater than 0 and smaller than N-1.
For the last recording, if the growth rates of the peaks of the raman spectrum data recorded at the N-1 th time are consistent, and a new peak whose peak exceeds a preset threshold appears at a new position in the raman spectrum data recorded at the N th time compared with the peak of the raman spectrum data recorded at the N-1 th time, an additional method is required to determine whether the focus is not deviated, for example, the method provided by the embodiment of the present disclosure may determine whether the growth rate of the new peak is consistent with the growth rate of each peak of the raman spectrum data recorded at the N-1 th time according to the data of the raman spectrum data recorded at the N-1 th time at the new position and the peak of the newly appearing peak, and if the growth rate of the new peak is consistent with the growth rate of each peak of the raman spectrum data recorded at the N-1 th time, determining that the laser emitted by the Raman detection equipment does not have focus deviation from the N-1 th record to the N-th record; and if the growth rate of the new peak is inconsistent with the growth rate of each peak of the Raman spectrum data recorded at the Nth-1 st time, determining that the laser emitted by the Raman detection device is out of focus between the Nth record and the Nth record.
That is, although the N-1 th recorded raman spectrum data may have no peak or a peak at the new position, the peak is not extracted and thus is not recorded in table 1 because the peak does not exceed a preset threshold (y 0 shown in fig. 2a or 2 b), but the increase rate of the newly occurring peak may be determined using the actual value of the N-1 th recorded raman spectrum data at the new position.
Therefore, in specific implementation, the smaller the setting of the preset threshold y0, the more the number of extracted peaks is, the smaller the probability that a new peak appears in the subsequently recorded raman spectrum data compared with the previously recorded raman spectrum data is, the larger the value of the preset threshold y0 is, and it may also occur that the peak of another article does not reach y0 within the time that the laser irradiates another article due to jitter. Specifically, the threshold value y0 and the total number of times N recorded may be calibrated in advance through experiments according to the scene and the user.
Further, when determining that the laser focus is deviated, the method for determining the deviation of the focus provided by the embodiment of the present disclosure may output a warning message to warn the user that the laser focus is deviated, and the user decides whether to perform the raman detection again, or may simultaneously clear data of the spectrometer sensor when outputting the warning message, and forcibly require the user to perform the raman detection again. The present disclosure is not limited thereto.
It is also worth mentioning that for the sake of simplicity, the above method embodiments are all described as a series of combinations of actions, but those skilled in the art should understand that the present disclosure is not limited by the order of the actions described. For example, steps S12 to S15 may be performed between each recording of raman spectrum data and the next recording of raman spectrum data, so as to realize real-time inspection and reminding, and once the focus deviation is determined, the user may be immediately reminded and take countermeasures, such as stopping laser emission, to prepare for detection anew. However, in the case that the time interval between two recordings is too short, the calculation capability of the raman detection apparatus may not be sufficient to support the preprocessing and peak-extracting algorithm at the interval between two recordings, and therefore, steps S12 to S15 may be performed after the raman spectrum data collection is completed, for example, the laser emission time reaches the preset total time or the peak reaches the peak triggering stop time, in this case, if it is determined that the focus shift occurs during the raman detection, the substance detection result may still be output, so that the user may decide whether to perform the detection again.
Fig. 3 is a block diagram of an apparatus for determining a focus deviation according to an embodiment of the present disclosure, which is used to implement the steps of the method for determining a focus deviation provided by the above method embodiment, and as shown in fig. 3, the apparatus includes:
the data recording module 301 is configured to record raman spectrum data accumulated and collected by a spectrometer sensor of the raman detection device every other fixed time interval in a process of emitting laser by the raman detection device and collecting a raman spectrum, or record raman spectrum data accumulated and collected by the spectrometer sensor of the raman detection device every time a brightness value of the collected raman spectrum increases by a fixed value;
a peak extracting module 302, configured to extract peak information of the raman spectrum data recorded each time;
the calculating module 303 is configured to determine, according to peak information of the nth recorded raman spectrum data and peak information of the N +1 th recorded raman spectrum data, a growth rate from each peak of the nth recorded raman spectrum data to the N +1 th recording, where N is a positive integer greater than 0 and smaller than N, and N is a total number of times of recording the raman spectrum data;
a comparison and judgment module 304, configured to judge whether the growth rates of the peaks of the n-th recorded raman spectrum data are consistent;
a determining module 305, configured to determine that the laser emitted by the raman detection device is out of focus when the growth rates of the peaks of the n-th recorded raman spectrum data are not consistent.
Optionally, the data recording module 301 includes:
the first molecular dividing module is used for dividing the detection time length into N time slices according to the total laser emission time length M of the Raman detection equipment;
and the first data recording sub-module is used for recording accumulated collected Raman spectrum data of a spectrometer sensor of the Raman detection device once every interval time length M/N.
Optionally, the data recording module 301 includes:
the second division submodule is used for dividing the brightness of the Raman spectrum data into N brightness slices according to a total detection brightness value B of the Raman detection equipment, wherein the total detection brightness value is that the Raman detection equipment stops detecting when the brightness value of the collected Raman spectrum data reaches B;
and the second data recording sub-module is used for recording the accumulated collected Raman spectrum data of the spectrometer sensor of the Raman detection device once every B/N increase of the collected Raman spectrum brightness value.
Optionally, the peak extracting module 302 is configured to:
extracting the peak value of the peak value exceeding a preset threshold value in the Raman spectrum data recorded each time and the position where the peak value appears;
the calculation module 303 is configured to:
determining the growth rate of the first peak according to the peak value of the first peak and the peak value of the peak with the same position as the first peak in the n +1 th recorded Raman spectrum data, wherein the first peak is any peak of which the peak in the nth recorded Raman spectrum data exceeds a preset threshold.
Optionally, the comparison and judgment module 304 is configured to:
judging whether the difference or the ratio of the growth rates of the wave crests is within a preset error range, determining that the growth rates of the wave crests are consistent when the difference or the ratio of the growth rates of the wave crests is within the preset error range, and determining that the growth rates of the wave crests are inconsistent when the difference or the ratio of the growth rates of the wave crests is not within the preset error range.
Optionally, the determining module 305 is further configured to:
and when the growth rates of the peaks of the n-th recorded Raman spectrum data are consistent and the peak of the n + 1-th recorded Raman spectrum data does not exceed the preset threshold value compared with the peak of the n-th recorded Raman spectrum data, determining that the laser emitted by the Raman detection device does not have focus deviation between the n-th recording and the n + 1-th recording.
Optionally, the determining module 305 is further configured to:
when the increasing rates of all peaks of the Raman spectrum data recorded at the N-1 th time are consistent and a new peak with a peak value exceeding a preset threshold value appears at a new position in the Raman spectrum data recorded at the Nth time compared with all peaks of the Raman spectrum data recorded at the N-1 th time, judging whether the increasing rate of the new peak is consistent with the increasing rate of all peaks of the Raman spectrum data recorded at the N-1 th time or not according to the data of the Raman spectrum data recorded at the N-1 th time at the new position and the peak value of the newly appeared peak;
if the growth rate of the new peak is consistent with the growth rate of each peak of the Raman spectrum data recorded at the Nth-1 st time, determining that the laser emitted by the Raman detection equipment does not have focus deviation between the Nth record and the Nth record;
and if the growth rate of the new peak is inconsistent with the growth rate of each peak of the Raman spectrum data recorded at the Nth-1 st time, determining that the laser emitted by the Raman detection device is out of focus between the Nth record and the Nth record.
For the Raman spectrum of an object to be detected, the growth proportions of all wave crests appearing at different positions of the object to be detected are equal, by adopting the device provided by the embodiment of the disclosure, the accumulated collected Raman spectrum of the spectrometer sensor is recorded by the device for many times, whether the growth proportions of all the wave crests are consistent or not is judged, and whether the laser focus is deviated or not can be determined according to the judgment result, so that a user does not need to judge through experience, the condition that the Raman spectrum of other objects is mixed in the collected Raman spectrum due to the deviation of the focus is avoided, and the accuracy of material detection can be improved.
Fig. 4 is a block diagram illustrating an electronic device 400 according to an example embodiment. As shown in fig. 4, the electronic device 400 may include: a processor 401, a memory 402, a multimedia component 403, an input/output (I/O) interface 404, and a communication component 405.
The processor 401 is configured to control the overall operation of the electronic device 400, so as to complete all or part of the steps in the above-mentioned method for determining a focus offset. The memory 402 is used to store various types of data to support operation at the electronic device 400, such as instructions for any application or method operating on the electronic device 400 and application-related data, such as contact data, transmitted and received messages, pictures, audio, video, and so forth. The Memory 402 may be implemented by any type of volatile or non-volatile Memory device or combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic Memory, flash Memory, magnetic disk or optical disk. The multimedia components 403 may include a screen and an audio component. Wherein the screen may be, for example, a touch screen and the audio component is used for outputting and/or inputting audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signal may further be stored in the memory 402 or transmitted through the communication component 405. The audio assembly also includes at least one speaker for outputting audio signals. The I/O interface 404 provides an interface between the processor 401 and other interface modules, such as a keyboard, mouse, buttons, etc. These buttons may be virtual buttons or physical buttons. The communication component 405 is used for wired or wireless communication between the electronic device 400 and other devices. Wireless communication, such as Wi-Fi, bluetooth, Near Field Communication (NFC), 2G, 3G, or 4G, or a combination of one or more of them, so that the corresponding communication component 405 may include: Wi-Fi module, bluetooth module, NFC module.
In an exemplary embodiment, the electronic Device 400 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components, and is used to perform the above-mentioned method for determining the focus deviation.
The embodiment of the present disclosure also provides a computer-readable storage medium 1, where the computer-readable storage medium 1 includes one or more programs, and the one or more programs are used for executing the above-mentioned method for determining a focus deviation.
The present disclosure also provides an electronic device including the above-described computer-readable storage medium 1, and one or more processors for executing a program in the computer-readable storage medium 1. The electronic device also includes a laser emitter, a spectrometer sensor, and the like.
The electronic device can be a mobile phone or a tablet computer and other terminal devices.
The preferred embodiments of the present disclosure are described in detail with reference to the accompanying drawings, however, the present disclosure is not limited to the specific details of the above embodiments, and various simple modifications may be made to the technical solution of the present disclosure within the technical idea of the present disclosure, and these simple modifications all belong to the protection scope of the present disclosure.
It should be noted that, in the foregoing embodiments, various features described in the above embodiments may be combined in any suitable manner, and in order to avoid unnecessary repetition, various combinations that are possible in the present disclosure are not described again.
In addition, any combination of various embodiments of the present disclosure may be made, and the same should be considered as the disclosure of the present disclosure, as long as it does not depart from the spirit of the present disclosure.
Claims (16)
1. A method for determining a focus bias, comprising:
in the process of emitting laser by Raman detection equipment and collecting Raman spectrum, recording accumulated collected Raman spectrum data of a spectrometer sensor of the Raman detection equipment at intervals of a fixed time, or recording accumulated collected Raman spectrum data of the spectrometer sensor of the Raman detection equipment at every time when the brightness value of the collected Raman spectrum increases by a fixed value;
extracting peak information of the Raman spectrum data recorded each time;
determining the growth rate from each peak of the N-th recorded Raman spectrum data to the N +1 th recording according to the peak information of the N-th recorded Raman spectrum data and the peak information of the N + 1-th recorded Raman spectrum data, wherein N is a positive integer larger than 0 and smaller than N, and N is the total number of times of recording the Raman spectrum data;
judging whether the increasing rates of all wave crests of the n-th recorded Raman spectrum data are consistent or not;
and when the increasing rates of the peaks of the n-th recorded Raman spectrum data are not consistent, determining that the laser emitted by the Raman detection device is out of focus.
2. The method of claim 1, wherein recording the accumulated collected raman spectral data of the spectrometer sensor of the raman detection device once every fixed time interval comprises:
dividing the detection time length into N time slices according to the total laser emission time length M of the Raman detection equipment;
and recording the accumulated collected Raman spectrum data of the spectrometer sensor of the Raman detection device once every interval time length M/N.
3. The method of claim 1, wherein recording the accumulated collected raman spectrum data by the spectrometer sensor of the raman detection device every time the brightness value of the collected raman spectrum increases by a fixed value comprises:
dividing the brightness of the Raman spectrum data into N brightness slices according to a total detection brightness value B of the Raman detection equipment, wherein the total detection brightness value refers to that the Raman detection equipment stops detecting when the brightness value of the collected Raman spectrum data reaches B;
and recording the collected Raman spectrum data by the spectrometer sensor of the Raman detection device once every B/N increase of the brightness value of the collected Raman spectrum.
4. The method of any one of claims 1 to 3, wherein extracting peak information for each recorded Raman spectrum data comprises:
extracting the peak value of the peak value exceeding a preset threshold value in the Raman spectrum data recorded each time and the position where the peak value appears;
determining the growth rate from each peak of the n-th recorded raman spectrum data to the n +1 th recording according to the peak information of the n-th recorded raman spectrum data and the peak information of the n +1 th recorded raman spectrum data, including:
determining the growth rate of the first peak according to the peak value of the first peak and the peak value of the peak with the same position as the first peak in the n +1 th recorded Raman spectrum data, wherein the first peak is any peak of which the peak in the nth recorded Raman spectrum data exceeds a preset threshold.
5. The method according to any one of claims 1 to 3, wherein the determining whether the growth rates of the peaks of the n-th recorded Raman spectrum data are consistent comprises:
judging whether the difference or the ratio of the growth rates of the wave crests is within a preset error range, determining that the growth rates of the wave crests are consistent when the difference or the ratio of the growth rates of the wave crests is within the preset error range, and determining that the growth rates of the wave crests are inconsistent when the difference or the ratio of the growth rates of the wave crests is not within the preset error range.
6. The method of claim 4, further comprising:
and if the growth rates of the peaks of the n-th recorded Raman spectrum data are consistent, and compared with the peaks of the n-th recorded Raman spectrum data, the peaks of which the peak values exceed the preset threshold value do not appear at new positions in the n + 1-th recorded Raman spectrum data, determining that the laser emitted by the Raman detection device does not have focus deviation between the n-th recording and the n + 1-th recording.
7. The method of claim 4, further comprising: when the increasing rates of all peaks of the Raman spectrum data recorded at the N-1 th time are consistent and a new peak with a peak value exceeding a preset threshold value appears at a new position in the Raman spectrum data recorded at the Nth time compared with all peaks of the Raman spectrum data recorded at the N-1 th time, judging whether the increasing rate of the new peak is consistent with the increasing rate of all peaks of the Raman spectrum data recorded at the N-1 th time or not according to the data of the Raman spectrum data recorded at the N-1 th time at the new position and the peak value of the newly appeared peak;
if the growth rate of the new peak is consistent with the growth rate of each peak of the Raman spectrum data recorded at the Nth-1 st time, determining that the laser emitted by the Raman detection equipment does not have focus deviation between the Nth record and the Nth record;
and if the growth rate of the new peak is inconsistent with the growth rate of each peak of the Raman spectrum data recorded at the Nth-1 st time, determining that the laser emitted by the Raman detection device is out of focus between the Nth record and the Nth record.
8. An apparatus for determining a focus deviation, the apparatus comprising:
the data recording module is used for recording accumulated collected Raman spectrum data of a spectrometer sensor of the Raman detection equipment at intervals of a fixed time length in the process of emitting laser by the Raman detection equipment and collecting the Raman spectrum, or recording accumulated collected Raman spectrum data of the spectrometer sensor of the Raman detection equipment at a time when the brightness value of the collected Raman spectrum increases by a fixed value;
the peak value extraction module is used for extracting peak information of the Raman spectrum data recorded each time;
the calculation module is used for determining the growth rate from each peak of the N-th recorded Raman spectrum data to the N + 1-th recording according to the peak information of the N-th recorded Raman spectrum data and the peak information of the N + 1-th recorded Raman spectrum data, wherein N is a positive integer larger than 0 and smaller than N, and N is the total number of times of recording the Raman spectrum data;
the comparison and judgment module is used for judging whether the increase rates of all wave crests of the Raman spectrum data recorded for the nth time are consistent or not;
and the determining module is used for determining that the laser emitted by the Raman detection device is out of focus when the growth rates of all wave peaks of the n-th recorded Raman spectrum data are not consistent.
9. The apparatus of claim 8, wherein the data logging module comprises:
the first molecular dividing module is used for dividing the detection time length into N time slices according to the total laser emission time length M of the Raman detection equipment;
and the first data recording sub-module is used for recording accumulated collected Raman spectrum data of a spectrometer sensor of the Raman detection device once every interval time length M/N.
10. The apparatus of claim 8, wherein the data logging module comprises:
the second division submodule is used for dividing the brightness of the Raman spectrum data into N brightness slices according to a total detection brightness value B of the Raman detection equipment, wherein the total detection brightness value is that the Raman detection equipment stops detecting when the brightness value of the collected Raman spectrum data reaches B;
and the second data recording sub-module is used for recording the accumulated collected Raman spectrum data of the spectrometer sensor of the Raman detection device once every B/N increase of the collected Raman spectrum brightness value.
11. The apparatus of any one of claims 8-10, wherein the peak extraction module is configured to:
extracting the peak value of the peak value exceeding a preset threshold value in the Raman spectrum data recorded each time and the position where the peak value appears;
the calculation module is configured to:
determining the growth rate of the first peak according to the peak value of the first peak and the peak value of the peak with the same position as the first peak in the n +1 th recorded Raman spectrum data, wherein the first peak is any peak of which the peak in the nth recorded Raman spectrum data exceeds a preset threshold.
12. The apparatus according to any one of claims 8 to 10, wherein the comparing and determining module is configured to:
judging whether the difference or the ratio of the growth rates of the wave crests is within a preset error range, determining that the growth rates of the wave crests are consistent when the difference or the ratio of the growth rates of the wave crests is within the preset error range, and determining that the growth rates of the wave crests are inconsistent when the difference or the ratio of the growth rates of the wave crests is not within the preset error range.
13. The apparatus of claim 11, wherein the determining module is further configured to:
and when the growth rates of the peaks of the n-th recorded Raman spectrum data are consistent and the peak of the n + 1-th recorded Raman spectrum data does not exceed the preset threshold value compared with the peak of the n-th recorded Raman spectrum data, determining that the laser emitted by the Raman detection device does not have focus deviation between the n-th recording and the n + 1-th recording.
14. The apparatus of claim 11, wherein the determining module is further configured to:
when the increasing rates of all peaks of the Raman spectrum data recorded at the N-1 th time are consistent and a new peak with a peak value exceeding a preset threshold value appears at a new position in the Raman spectrum data recorded at the Nth time compared with all peaks of the Raman spectrum data recorded at the N-1 th time, judging whether the increasing rate of the new peak is consistent with the increasing rate of all peaks of the Raman spectrum data recorded at the N-1 th time or not according to the data of the Raman spectrum data recorded at the N-1 th time at the new position and the peak value of the newly appeared peak;
if the growth rate of the new peak is consistent with the growth rate of each peak of the Raman spectrum data recorded at the Nth-1 st time, determining that the laser emitted by the Raman detection equipment does not have focus deviation between the Nth record and the Nth record;
and if the growth rate of the new peak is inconsistent with the growth rate of each peak of the Raman spectrum data recorded at the Nth-1 st time, determining that the laser emitted by the Raman detection device is out of focus between the Nth record and the Nth record.
15. A computer-readable storage medium, characterized in that the computer-readable storage medium includes one or more programs for performing the method of any one of claims 1 to 7.
16. An electronic device, comprising:
the computer-readable storage medium recited in claim 15; and
one or more processors to execute the program in the computer-readable storage medium.
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2017/108734 WO2019084817A1 (en) | 2017-10-31 | 2017-10-31 | Method and device for determining focus deviation, storage medium and electronic apparatus |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108064340A CN108064340A (en) | 2018-05-22 |
CN108064340B true CN108064340B (en) | 2020-06-16 |
Family
ID=62142050
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201780002523.1A Active CN108064340B (en) | 2017-10-31 | 2017-10-31 | Focus deviation determination method, device, storage medium and electronic apparatus |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN108064340B (en) |
WO (1) | WO2019084817A1 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110032988B (en) * | 2019-04-23 | 2020-11-13 | 北京理工大学 | Real-time Noise Reduction Enhancement Method for Ultraviolet Raman Spectroscopy System |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6351306B1 (en) * | 1999-10-19 | 2002-02-26 | Kaiser Optical Systems, Inc. | Optical measurement probe calibration configurations |
CN102121902A (en) * | 2011-03-15 | 2011-07-13 | 南京工业大学 | Online Raman spectrometer correction device and correction method thereof |
CN103505221A (en) * | 2012-06-28 | 2014-01-15 | 广西科学院 | Lossless method for quantitatively detecting blood glucose by utilizing Raman spectrum |
CN103926197A (en) * | 2013-09-06 | 2014-07-16 | 北京理工大学 | High spatial resolution biaxial differential confocal spectrum microscopic imaging method and apparatus |
CN104316506A (en) * | 2014-10-14 | 2015-01-28 | 上海交通大学 | Raman probe and Raman signal detection system and method capable of focusing automatically |
CN104931481A (en) * | 2015-06-23 | 2015-09-23 | 北京理工大学 | Laser biaxial differential confocal induction breakdown-Raman spectrum imaging detecting method and device |
CN105372222A (en) * | 2014-08-22 | 2016-03-02 | 中国科学院生态环境研究中心 | Detection method of divalent heavy metal |
CN106596499A (en) * | 2016-11-01 | 2017-04-26 | 北京华泰诺安技术有限公司 | Real-time Raman spectrum calibration method |
CN106770153A (en) * | 2016-11-15 | 2017-05-31 | 北京蓝色星语科技有限公司 | A kind of adjustable Raman spectrum system of spatial offset and Raman spectroscopic detection method |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6992765B2 (en) * | 2002-10-11 | 2006-01-31 | Intralase Corp. | Method and system for determining the alignment of a surface of a material in relation to a laser beam |
US8306780B2 (en) * | 2009-01-26 | 2012-11-06 | Exelis Inc. | Data quality and ancillary data checking for Raman sensor |
CN104458701B (en) * | 2014-12-11 | 2016-06-01 | 青岛橡胶谷知识产权有限公司 | Raman spectrum explosive substance identifier automatic calibrating method |
CN106383105B (en) * | 2016-08-29 | 2021-02-12 | 上海交通大学 | Raman spectrum measuring device and method capable of automatically adjusting sample measuring distance |
CN106770168B (en) * | 2016-12-26 | 2023-11-14 | 同方威视技术股份有限公司 | Article inspection device and method based on Raman spectrum |
-
2017
- 2017-10-31 CN CN201780002523.1A patent/CN108064340B/en active Active
- 2017-10-31 WO PCT/CN2017/108734 patent/WO2019084817A1/en active Application Filing
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6351306B1 (en) * | 1999-10-19 | 2002-02-26 | Kaiser Optical Systems, Inc. | Optical measurement probe calibration configurations |
CN102121902A (en) * | 2011-03-15 | 2011-07-13 | 南京工业大学 | Online Raman spectrometer correction device and correction method thereof |
CN103505221A (en) * | 2012-06-28 | 2014-01-15 | 广西科学院 | Lossless method for quantitatively detecting blood glucose by utilizing Raman spectrum |
CN103926197A (en) * | 2013-09-06 | 2014-07-16 | 北京理工大学 | High spatial resolution biaxial differential confocal spectrum microscopic imaging method and apparatus |
CN105372222A (en) * | 2014-08-22 | 2016-03-02 | 中国科学院生态环境研究中心 | Detection method of divalent heavy metal |
CN104316506A (en) * | 2014-10-14 | 2015-01-28 | 上海交通大学 | Raman probe and Raman signal detection system and method capable of focusing automatically |
CN104931481A (en) * | 2015-06-23 | 2015-09-23 | 北京理工大学 | Laser biaxial differential confocal induction breakdown-Raman spectrum imaging detecting method and device |
CN106596499A (en) * | 2016-11-01 | 2017-04-26 | 北京华泰诺安技术有限公司 | Real-time Raman spectrum calibration method |
CN106770153A (en) * | 2016-11-15 | 2017-05-31 | 北京蓝色星语科技有限公司 | A kind of adjustable Raman spectrum system of spatial offset and Raman spectroscopic detection method |
Non-Patent Citations (1)
Title |
---|
The Influence of Out-of-Focus Sample Regions on the Surface Specificity of Confocal Raman Microscopy;NEIL EVERALL;《Society for Applied Spectroscopy》;20081231;第62卷(第6期);591-598 * |
Also Published As
Publication number | Publication date |
---|---|
CN108064340A (en) | 2018-05-22 |
WO2019084817A1 (en) | 2019-05-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111274426B (en) | Category labeling method and device, electronic equipment and storage medium | |
US11798193B2 (en) | Multi-dimensional image detection on at least two acquired images | |
CN109658572B (en) | Image processing method and device, electronic equipment and storage medium | |
CN109446994B (en) | Gesture key point detection method and device, electronic equipment and storage medium | |
CN111049978A (en) | Notification information display method and device | |
US10055669B2 (en) | Methods and systems of determining a minimum blob size in video analytics | |
US20180047173A1 (en) | Methods and systems of performing content-adaptive object tracking in video analytics | |
US20100310122A1 (en) | Method and Device for Detecting Stationary Targets | |
CN113705389B (en) | Face recognition module testing method and device, storage medium and electronic equipment | |
CN108918427B (en) | Method, apparatus, storage medium, and electronic device for detecting substance | |
CN107995948B (en) | Substance detection method, substance detection device, storage medium, and electronic apparatus | |
CN108064340B (en) | Focus deviation determination method, device, storage medium and electronic apparatus | |
Anghelescu et al. | Human footstep detection using seismic sensors | |
CN116707965A (en) | Threat detection method and device, storage medium and electronic equipment | |
CN115174872A (en) | Monitoring method and device | |
CN111666015A (en) | Suspension short message display method and device | |
CN111062401A (en) | Stacked object identification method and device, electronic device and storage medium | |
CN108076655B (en) | Focus detection method, apparatus, storage medium, and device for substance detection | |
CN110781842A (en) | Image processing method and device, electronic equipment and storage medium | |
CN110361374B (en) | Substance detection method, substance detection device, storage medium, and electronic apparatus | |
WO2019080013A1 (en) | Raman detection method and apparatus, storage medium, and electronic device | |
CN117874245A (en) | Knowledge graph-based group partner mining method and device, electronic equipment and medium | |
US20170006212A1 (en) | Device, system and method for multi-point focus | |
CN113810328A (en) | Abnormal account determination method, device and storage medium | |
CN107944372B (en) | Method and device for identifying signal validity and computer storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right |
Effective date of registration: 20220601 Address after: 1904-010, 20th floor, building 4, No. 11, Changchun Bridge Road, Haidian District, Beijing 100089 Patentee after: BEIJING CLOUDOPTEK TECHNOLOGY Co.,Ltd. Address before: 518000 Room 201, building A, No. 1, Qian Wan Road, Qianhai Shenzhen Hong Kong cooperation zone, Shenzhen, Guangdong (Shenzhen Qianhai business secretary Co., Ltd.) Patentee before: CLOUDMINDS (SHENZHEN) HOLDINGS Co.,Ltd. |
|
TR01 | Transfer of patent right |