WO2019061114A1 - 用于物质检测的焦点检测方法、装置、存储介质及设备 - Google Patents

用于物质检测的焦点检测方法、装置、存储介质及设备 Download PDF

Info

Publication number
WO2019061114A1
WO2019061114A1 PCT/CN2017/103813 CN2017103813W WO2019061114A1 WO 2019061114 A1 WO2019061114 A1 WO 2019061114A1 CN 2017103813 W CN2017103813 W CN 2017103813W WO 2019061114 A1 WO2019061114 A1 WO 2019061114A1
Authority
WO
WIPO (PCT)
Prior art keywords
substance
time
laser emitter
tested
data
Prior art date
Application number
PCT/CN2017/103813
Other languages
English (en)
French (fr)
Inventor
骆磊
Original Assignee
深圳前海达闼云端智能科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳前海达闼云端智能科技有限公司 filed Critical 深圳前海达闼云端智能科技有限公司
Priority to CN201780002463.3A priority Critical patent/CN108076655B/zh
Priority to PCT/CN2017/103813 priority patent/WO2019061114A1/zh
Publication of WO2019061114A1 publication Critical patent/WO2019061114A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/62Systems in which the material investigated is excited whereby it emits light or causes a change in wavelength of the incident light
    • G01N21/63Systems in which the material investigated is excited whereby it emits light or causes a change in wavelength of the incident light optically excited
    • G01N21/65Raman scattering

Definitions

  • the present disclosure relates to the field of substance detection, and in particular, to a focus detection method, apparatus, storage medium and device for substance detection.
  • Raman detection equipment uses Raman scattering to detect the composition of substances. It is currently used in many fields, including professional oil exploration, drug testing, common safety inspections in life, anti-narcotics, etc., and with Raman detection. The cost of equipment is declining and there are more applications in the civilian market, such as pesticide testing, real and fake inspection.
  • the detection method of the current Raman detection device adopts non-contact detection, that is, the Raman detection device has no direct contact with the substance to be tested, so in the detection process, the focus shift of the Raman detection device may occur, and the consistency may not be consistent.
  • the problem of quasi-tested substances leads to inaccurate test results, and even the test results cannot be output, and need to be re-tested.
  • the present disclosure provides a focus detection method, apparatus, storage medium and device for substance detection for substance detection, which are used to solve the problem that the focus deviation causes an inaccurate measurement result in the detection process.
  • a focus detection method for substance detection is provided, which is applied to a detection device, the detection device comprising: an imaging device and a laser emitter, and the laser emission
  • the focus of the device is located on a focal plane of the camera device, and the method includes:
  • the prompt information is output, and the prompt information is used. The user is prompted to reset the laser emitter.
  • a focus detecting device for substance detection which is applied to a detecting device, the detecting device comprising: an image capturing device and a laser emitter, and a focus of the laser emitter is located at On the focal plane of the camera device, the focus detection device includes:
  • a data acquisition module configured to sequentially acquire Raman spectral data, a light spot area, and a determination area image feature at each acquisition time, where the determination area image feature is preset in the image of the test object located around the laser light spot Image features in the decision area within the distance;
  • a determining module configured to output prompt information when the spot area of the first collection time is not within the first threshold range, or the image feature of the determination area of the first collection time is not within the second threshold range
  • the prompt information is used to prompt the user to reset the laser emitter.
  • a computer readable storage medium including one or more programs for performing the first embodiment of the present disclosure The method described on the one hand.
  • a substance detecting apparatus comprising: the computer readable storage medium of the third aspect of the embodiments of the present disclosure;
  • One or more processors for executing a program in the computer readable storage medium.
  • the area of the laser spot can be acquired in real time when the substance is detected, and when the area of the spot meets the detection condition, the disclosure starts.
  • a prompt message for prompting the user to reset the laser emitter is output, and the focus shift can be found in time when Raman detection is performed.
  • FIG. 1a is a flowchart of a focus detection method for substance detection according to an exemplary embodiment of the present disclosure
  • Figure 1b is the position of the camera device and laser emitter in the focus detection method shown in Figure 1a Schematic diagram of relationship
  • FIG. 2 is a flowchart of another focus detection method for substance detection according to an exemplary embodiment of the present disclosure
  • FIG. 3 is a flowchart of another focus detection method for substance detection according to an exemplary embodiment of the present disclosure
  • FIG. 4 is a flowchart of still another focus detection method for substance detection according to an exemplary embodiment of the present disclosure
  • FIG. 5 is a block diagram of a focus detection apparatus for substance detection according to an exemplary embodiment of the present disclosure
  • FIG. 6 is a block diagram of another focus detecting device for substance detection according to an exemplary embodiment of the present disclosure.
  • FIG. 7 is a block diagram of another focus detecting apparatus for substance detection according to an exemplary embodiment of the present disclosure.
  • FIG. 8 is a block diagram of still another focus detecting device for substance detection according to an exemplary embodiment of the present disclosure.
  • FIG. 9 is a block diagram of an electronic device, according to an exemplary embodiment.
  • the application scenario is to use a detection device, for example, a Raman detection device for detecting a substance to be tested, the detection device being provided with a spectrometer sensor, a laser emitter and an imaging device, wherein the focus of the laser emitter is located at the focus of the camera device In the plane, the laser light spot of the laser emitter can be captured in the framing range of the camera, and a certain area around the laser spot (this area) The field is generally the area where the substance to be tested is located.
  • a detection device for example, a Raman detection device for detecting a substance to be tested
  • the detection device being provided with a spectrometer sensor, a laser emitter and an imaging device, wherein the focus of the laser emitter is located at the focus of the camera device In the plane, the laser light spot of the laser emitter can be captured in the framing range of the camera, and a certain area around the laser spot (this area)
  • the field is generally the area where the substance to be tested is located.
  • the laser spot here refers to the spot generated when the laser emitted by the laser emitter is irradiated on the substance to be tested, and the relative distance between the laser emitter and the substance to be tested is different.
  • the area of the laser spot is also different, and the position of the laser spot can reflect the position of the laser focus. Therefore, in the embodiment of the present disclosure, by monitoring the size of the laser spot, it is possible to identify whether the distance between the detecting device and the substance to be tested meets the requirements of the substance detection, and by detecting the image characteristics around the laser spot, It is identified whether the laser focus is away from the substance to be tested on the material plane.
  • the detecting device may be a device dedicated to Raman detection, having the spectrometer sensor, the laser emitter and the camera device described above, or the detecting device may be embedded on the mobile terminal, ie embedding the spectrometer sensor on the mobile terminal,
  • the laser transmitter and the camera device can be directly realized by using a camera of the smart terminal, wherein the mobile terminal can be, for example, a mobile terminal such as a smart phone, a tablet computer, a smart watch, or a PDA (English: Personal Digital Assistant, Chinese: Personal Digital Assistant). .
  • 1a is a flowchart of a focus detection method for substance detection, which is applied to a detection device, the detection device includes: an imaging device and a laser emitter, and a laser emitter, according to an exemplary embodiment of the present disclosure.
  • the focus is on the focal plane of the camera.
  • the focus of the laser emitter (the convergence point of the laser of the laser emitter after passing through the lens) is located on the focal plane of the imaging device, so that the imaging device can capture the light spot generated by the laser emitter on the substance to be tested. Therefore, the spot area of the laser emitter is collected, wherein the positional relationship between the laser emitter and the image pickup device is not limited, and the inclination angle of the camera of the image pickup device and the laser emitter is not limited.
  • the focus of the above-mentioned laser emitter is located on the focal plane of the imaging device, and the detection device can control the camera to automatically adjust the focal length (AF) after entering the substance detection App (application), and the focal length of the camera is adjusted according to the focal length.
  • the position of the plane is also changing, and the AF can be adjusted until the laser focus is on the focal plane of the camera. Because when the focus of the laser emitter is located at the focal plane of the camera, the image of the substance to be tested is the clearest. Since the focal length of the laser emitter is fixed, and the camera of the camera can adjust the focal length, the camera can be controlled to adjust the focal length. The focus of the laser emitter is located at the focal plane of the camera, and the substance to be tested is detected.
  • 1b is a schematic diagram showing the positional relationship between the image pickup device and the laser emitter in the focus detection method shown in FIG. 1a, and the deployment method of the image pickup device and the laser emitter shown in FIG.
  • 1b is an implementation scheme, the image pickup device and the laser emitter Set on the same plane, where ⁇ is the camera device Horizontal FOV (English: Field of View, Chinese: field of view) angle, f is the focal length of the camera, d is the focal length of the laser emitter, r is the laser spot (the laser spot of the laser emitter is the laser emitter)
  • the preset distance radius around the position where the focus is located (for example, the determination range is a circle, the specific implementation may be any shape, which is not limited herein), and b is the distance from the projection point of the substance to be tested to the edge of the FOV, a The distance from the center point of the camera to the center point of the laser emitter in the lateral projection.
  • the circle with radius r around the laser spot may be in the framing range in this direction, so the following conditions that the detection device needs to satisfy are obtained:
  • the FOV of the imaging device includes a certain area around the laser emitter spot (here, a circular area having a radius of r as an example). It should be noted that, in the other direction, that is, the longitudinal FOV angle, in the same manner as the above-described lateral FOV angle, it is necessary to satisfy the above conditions.
  • the focus of the laser emitter can be adjusted by the tilt angle of the camera and/or the tilt angle of the laser emitter so that the focus of the laser emitter is on the focal plane of the camera.
  • the method includes:
  • Step 101 sequentially acquire Raman spectral data, a light spot area, and a determination area image feature at each acquisition time, and determine that the regional image feature is an image feature in a determination region of the object to be tested that is located within a preset distance around the laser spot.
  • recording the Raman spectral data, the spot area, and the determining area image feature may be performed by the detecting device after the detecting device turns on the laser emitter, and the detecting device determines whether the current state can be detected. , start recording data. It is also possible for the user of the detection device to decide when to start recording data.
  • the determination area image feature is an image feature of the determination area in the image of the substance to be tested collected by the camera device, and the image of the determination area image at any acquisition time is: a percentage of the specified substance feature in the determination area, and the specified substance characteristic is It is determined based on the image characteristics of the determination area at the first acquisition time. That is to say, it can be understood that the determination region image feature may be a component ratio in the substance to be tested, and when the image feature of the determination region is first acquired, only the feature having the largest component proportion of the substance to be tested may be stored, and the component is designated as the component. The feature is used as a reference feature of the subsequently determined image of the region image.
  • the image of the determination area image acquired at the first acquisition time is 76% of a transparent liquid (only the component features with the largest proportion are analyzed), then the transparent liquid is used as the designated substance characteristic, and then the acquisition time is acquired.
  • the determination area image feature is the percentage of the transparent liquid in the substance to be tested as an image feature.
  • Step 102 When the spot area of the first collection time is not within the first threshold range, or the image of the determination area of the first collection time is not within the second threshold range, the prompt information is output, and the prompt information is used to prompt the user to reset the laser. launcher.
  • the first collection time is a certain time in the substance detection process, at which time, if the spot area is not within the first threshold range or the determination area image feature of the first collection time is not within the second threshold range In the case, it can be judged that the laser focus is shifted. Among them If the area of the spot is not within the first threshold, it indicates that the distance between the detecting device and the substance to be tested changes; if the image of the region is not within the second threshold, the focus is farther away from the object plane. substance). Then the data collected at this time is invalid and cannot accurately detect the substance. It should be noted that the process of substance detection is an integral process.
  • the integration process based on Raman spectroscopy data is usually divided into two types: integral of fixed integral duration and automatic signal-to-noise ratio detection.
  • the Raman spectral data is integrated, wherein the Raman spectral data at each acquisition time is obtained by superimposing the data collected by the spectrometer sensor in the time window corresponding to the acquisition time and the Raman spectral data at the previous moment of the acquisition time. of.
  • the Raman spectral data collected by the spectrometer sensor in the corresponding time window may be invalid, which may result in inaccurate integration results. Therefore, the detection device should pause the integration and wait for the Raman spectrum. Continue the integration after the data is restored.
  • the prompt information is outputted at the first collection time for prompting the user to reset the laser emitter, wherein the resetting may be adjusting the distance between the detecting device and the substance to be tested, or adjusting the position of the light spot.
  • the second threshold range is used to limit the variation range of the image features in the determination area, and may be preset according to a specific range of measurement data, and may be preset in the detection device or may be performed according to the specific needs of the user. For example, it is determined that the image of the area image is a percentage of a certain liquid, and the liquid having a second threshold value of 60% or more is set, and when the image of the determination area of the first collection time is 45% of the liquid, the prompt information is output.
  • the area of the laser spot can be acquired in real time when the substance is detected, and when the area of the spot satisfies the detection condition, the acquisition is started.
  • the Raman spectral data corresponding to the acquisition time, the spot area and the image characteristics of the determination area, and the above-mentioned data acquired at each acquisition time are analyzed in real time, and any of the spot area or the image of the determination area image acquired at any acquisition time.
  • a prompt message for prompting the user to reset the laser transmitter is output, and the focus offset can be found in time when performing Raman detection.
  • FIG. 2 is a flowchart of another focus detection method for substance detection according to an exemplary embodiment of the present disclosure. As shown in FIG. 2, step 101 includes:
  • Step 1011 After the laser emitter is turned on to start the irradiation of the substance to be tested, the spot area of the laser spot in the image of the substance to be tested collected by the camera device is monitored.
  • the area of the laser spot in the image of the substance to be tested is collected by the camera device in real time, and the laser spot refers to the laser irradiation.
  • the viewing range of the image capturing device of the detecting device can include a certain area around the spot of the laser emitter, and the positional relationship between the camera device and the laser emitter can be in the design stage of the detecting device.
  • the preset is also guaranteed by adjusting the tilt angle of the camera and the laser transmitter.
  • the imaging device can obtain the spot area by a certain frequency, and the spot area is too large, indicating that the detecting device is too close to the substance to be tested, the range of the laser irradiation is large, the energy is dispersed, and the detection result is inaccurate, and the spot area is too small or If it is zero, it means that the detecting device is too far away from the substance to be tested, and the laser irradiation cannot be focused, which makes it impossible to detect. Only when the spot area of the laser spot meets the preset condition, the detecting device can collect accurate data.
  • Step 1012 When it is detected that the spot area is within the first threshold range, the Raman spectrum data, the spot area, and the determination area image feature of each acquisition time are sequentially acquired.
  • the spot area is within the first threshold range, indicating that the laser spot coincides with the focus position of the laser emitter at this time, and the focus of the laser emitter is located on the focal plane of the camera.
  • the first threshold range may be based on a reasonable range of spot areas calculated by a large amount of measurement data, preset in the detection device, or may be set according to the specific needs of the user. At this time, the area of the spot collected by the image capturing device is judged. When the spot area is within the first threshold range, the data collected by the spectrometer sensor in the detecting device can effectively reflect the composition of the substance to be tested, and the data can be recorded.
  • FIG. 3 is a flowchart of another focus detection method for substance detection according to an exemplary embodiment of the present disclosure. As shown in FIG. 3, the method further includes:
  • Step 103 Acquire a spot area of the second collection time and a determination area image feature of the second collection time, and the second collection time is an arbitrary collection time after the output of the prompt information.
  • the spot area and the determination area image feature are continuously acquired for real-time monitoring whether the focus of the laser emitter is restored to a position that can be normally detected.
  • the Raman spectral data of each acquisition time can be further acquired, thereby serving as a data log, which facilitates subsequent viewing of the history record.
  • the steps in step 104 are performed.
  • Step 104 When the spot area of the second collection time is within the first threshold range, and the determination area image feature of the second collection time is within the second threshold range, then at the third collection time, according to the first collection time
  • the Raman spectral data of the previous moment acquires Raman spectral recovery data as the Raman spectral data of the third acquisition time, and the third acquisition time is the next moment of the second acquisition time.
  • the manner of obtaining the Raman spectral data of the third acquisition time may be:
  • the sensor data collected by the Raman spectroscopy sensor in the time window corresponding to the third acquisition time is superimposed with the Raman spectroscopy data of the previous time at the first acquisition time to obtain Raman spectroscopy recovery data, as the third acquisition
  • the Raman spectral data of the moment is superimposed with the Raman spectroscopy data of the previous time at the first acquisition time to obtain Raman spectroscopy recovery data, as the third acquisition
  • the Raman spectral data of the moment is superimposed with the Raman spectroscopy data of the previous time at the first acquisition time to obtain Raman spectroscopy recovery data, as the third acquisition
  • the Raman spectral data of the moment is superimposed with the Raman spectroscopy data of the previous time at the first acquisition time to obtain Raman spectroscopy recovery data, as the third acquisition
  • the Raman spectral data of the moment is superimposed with the Raman spectroscopy data of the previous time at the first acquisition time to obtain Raman spectroscopy recovery data, as the third acquisition The Ram
  • the Raman spectral data acquired for each acquisition time is obtained by superimposing the data collected by the spectrometer sensor in the time window corresponding to the acquisition time and the Raman spectral data of the previous moment of the acquisition time. (The Raman spectral data of the previous time corresponding to the first acquisition time is zero). The last time of the third collection time is the second collection time. At the second acquisition time, the acquired spot area is within the first threshold range and the determination area image feature is within the second threshold range, then the laser emitter can be determined.
  • the focus of the focus is restored to a position that can be normally detected within a time window between the second acquisition time and the last time of the second acquisition time, but the data collected by the spectrometer sensor in the time window corresponding to the second acquisition time cannot be guaranteed. It is completely correct, so it is not guaranteed that the Raman spectral data acquired at the second acquisition time is valid. Therefore, data recovery from the third acquisition time is required, and the accuracy of the Raman spectral data is ensured.
  • determining the spot area and the determining area image feature acquired in step 103 when the spot area is within the first threshold range, and determining that the area image feature is within the second threshold range, then indicating the laser emitter
  • the focus is restored to a position where it can be detected normally.
  • the acquisition frequency Take the acquisition frequency as 1/T.
  • the first acquisition time is T
  • the second acquisition time is 2T
  • the third acquisition time is 3T, and so on.
  • the spot area acquired at the time of 5T is not within the first threshold range, or the image of the determination area image acquired at the time of 5T is not within the second threshold range, then 5T is the first collection time.
  • 6T, 7T, ..., 10T corresponding to the acquired spot area and the determination area image feature can not meet the spot area within the first threshold range and the determination area image feature is within the second threshold range, at 11T, acquired
  • the spot area is within a first threshold range and the determination region image feature is at a second threshold Within the range, it can be determined that the focus of the laser emitter recovers to a position that can be normally detected within 10T to 11T, but the Raman spectral data acquired by 11T cannot be guaranteed to be valid, so 11T is the second acquisition time mentioned above,
  • the Raman spectral recovery data is acquired based on the Raman spectral data acquired by 4T.
  • the 12T Raman spectral data is obtained by superimposing 4T Raman spectral data on the data of the sensor collected by the Raman spectroscopy sensor in the time window corresponding to 11T to 12T. Then, the 12T Raman spectral data, the spot area, and the determination area image feature are continuously stored in the same table, and the process of substance recognition is continued. This avoids the problem of inaccurate or undetectable detection caused by invalid Raman spectral data when the focus is shifted.
  • FIG. 4 is a flowchart of still another focus detecting method for substance detection according to an exemplary embodiment of the present disclosure. As shown in FIG. 4, the method is in the step. Before 101, it also included:
  • Step 105 When the detection distance reaches a preset distance, the laser emitter is turned on to start the object to be tested, and the detection distance is the distance between the laser emitter and the substance to be tested. Alternatively, when a user-triggered turn-on signal is received, the laser emitter is turned on to begin illumination of the substance to be tested.
  • the detection distance can be measured by a sensor, and when the detection distance reaches a preset distance, the laser emitter is turned on again.
  • the preset distance can ensure that the spot area of the laser emitter is within a certain range, so that the laser emitter is turned on when the scene can be detected normally, to save energy and avoid invalid detection.
  • the laser transmitter can be manually turned on by the user as needed.
  • the output prompt information described in step 102 includes:
  • the prompt message for informing the user that the detection distance is not within the preset distance range is output, and the detection distance is the distance between the laser emitter and the substance to be tested.
  • a prompt message for prompting the user to realign the substance to be tested is output.
  • the case where the focus appears to be offset can be divided into two categories: the distance between the detecting device and the substance to be tested changes, or the focus deviates from the substance to be tested on the plane of the substance.
  • the spot area is not within the first threshold range, it indicates that the spot area is too large or too small, that is, the detection distance is exceeded.
  • the preset range is prompted to prompt the user to adjust the distance between the detecting device and the substance to be tested.
  • it is determined that the image feature of the area is not within the second threshold range, it indicates that the position of the focus changes with respect to the substance to be tested, that is, the focus is offset with respect to the substance to be tested, and the user is prompted to realign the spot with the light. Test the substance.
  • the detection method used by the detecting device in this embodiment is not specifically limited, it may be a detection method using a fixed integration time length or an automatic signal to noise ratio determination method.
  • the area of the laser spot can be acquired in real time when the substance is detected, and when the area of the spot satisfies the detection condition, the acquisition is started.
  • the Raman spectral data corresponding to the acquisition time, the spot area and the image characteristics of the determination area, and the above-mentioned data acquired at each acquisition time are analyzed in real time, and any of the spot area or the image of the determination area image acquired at any acquisition time.
  • a prompt message for prompting the user to reset the laser transmitter is output, and the focus offset can be found in time when performing Raman detection.
  • FIG. 5 is a block diagram of a focus detecting device for substance detection according to an exemplary embodiment of the present disclosure
  • the focus detecting device 200 is applied to a detecting device, and the detecting device includes: an image capturing device and a laser disposed on the same plane a transmitter, and the focal length of the camera is adjusted to be the same as the focal length of the laser transmitter.
  • the focus detecting device 200 includes:
  • the data acquisition module 201 is configured to sequentially acquire Raman spectral data, a spot area, and a determination area image feature at each acquisition time, and determine that the area image feature is a determination area in the image of the object to be tested that is located within a preset distance around the laser spot. Image features in .
  • the determining module 202 is configured to: when the spot area of the first collection time is not within the first threshold, or the image of the determination area of the first collection time is not within the second threshold, the prompt information is output, and the prompt information is used to prompt the user. Reset the laser emitter.
  • FIG. 6 is a block diagram of another focus detecting apparatus for substance detection according to an exemplary embodiment of the present disclosure.
  • the data collecting module 201 includes:
  • the spot monitoring sub-module 2011 is configured to monitor the spot area of the laser spot in the image of the substance to be tested collected by the camera device after the laser emitter is turned on to start the irradiation of the substance to be tested.
  • the collecting sub-module 2012 is configured to sequentially acquire Raman spectral data, a spot area, and a determination area image feature of each acquisition time when the spot area is monitored within a first threshold range.
  • FIG. 7 is a block diagram of another focus detecting device for substance detection according to an exemplary embodiment of the present disclosure.
  • the data collecting module 201 is further configured to acquire a spot area at a second collecting time.
  • the determination area image feature of the second collection time, and the second collection time is an arbitrary collection time after the output of the prompt information.
  • the focus detection device 200 further includes:
  • the data recovery module 203 is configured to: when the spot area of the second collection time is within the first threshold range, and when the determination area image feature of the second collection time is within the second threshold range, then at the third collection time, according to The Raman spectral data of the previous time at the first acquisition time acquires Raman spectral recovery data as the Raman spectral data of the third acquisition time, and the third acquisition time is the next time of the second acquisition time.
  • the data recovery module 203 is configured to superimpose the sensor data collected by the Raman spectroscopy sensor in a time window corresponding to the third collection time with the Raman spectroscopy data of the previous time at the first acquisition time to obtain Raman spectroscopy recovers data as Raman spectroscopy data at the third acquisition time.
  • FIG. 8 is a block diagram of still another focus detecting device for substance detection according to an exemplary embodiment of the present disclosure. As shown in FIG. 8, the focus detecting device 200 further includes:
  • the opening module 204 is configured to start the laser emitter to start the object to be tested when the detection distance reaches a preset distance before the laser emitter is turned on to start the irradiation of the substance to be tested, and the detection distance is the laser emitter and the substance to be tested. The distance between them. Alternatively, when a user-triggered turn-on signal is received, the laser emitter is turned on to begin illumination of the substance to be tested.
  • the determination region image feature of any acquisition time is: a percentage of the specified material feature in the determination region, and the specified material feature is determined according to the determination region image feature at the first acquisition time.
  • output prompt information including:
  • the prompt message for informing the user that the detection distance is not within the preset distance range is output, and the detection distance is the distance between the laser emitter and the substance to be tested.
  • the determination area image feature of the first collection time is not within the second threshold range, a prompt message for prompting the user to realign the substance to be tested is output.
  • the area of the laser spot can be acquired in real time when the substance is detected, and when the area of the spot satisfies the detection condition, the acquisition is started.
  • the Raman spectral data corresponding to the acquisition time, the spot area and the image characteristics of the determination area, and the above-mentioned data acquired at each acquisition time are analyzed in real time, and any of the spot area or the image of the determination area image acquired at any acquisition time.
  • a prompt message for prompting the user to reset the laser transmitter is output, and the focus offset can be found in time when performing Raman detection.
  • FIG. 9 is a block diagram of an electronic device 300, according to an exemplary embodiment.
  • the electronic device 300 can include a processor 301, a memory 302, a multimedia component 303, an input/output (I/O) interface 304, and a communication component 305.
  • a processor 301 can include a processor 301, a memory 302, a multimedia component 303, an input/output (I/O) interface 304, and a communication component 305.
  • I/O input/output
  • the processor 301 is configured to control the overall operation of the electronic device 300 to complete all or part of the steps of the substance detecting method described above.
  • the memory 302 is used to store various types of data to support operations at the electronic device 300, such as may include instructions for any application or method operating on the electronic device 300, as well as application related data, For example, contact data, sent and received messages, pictures, audio, video, and so on.
  • the memory 302 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as a static random access memory (SRAM), an electrically erasable programmable read only memory ( Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read Only Read-Only Memory (ROM), magnetic memory, flash memory, disk or optical disk.
  • the multimedia component 303 can include a screen and audio components.
  • the screen may be, for example, a touch screen, and the audio component is used to output and/or input an audio signal.
  • the audio component can include a microphone for receiving an external audio signal.
  • the received audio signal may be further stored in memory 302 or transmitted via communication component 305.
  • the audio component also includes at least one speaker for outputting an audio signal.
  • the I/O interface 304 provides an interface between the processor 301 and other interface modules, such as a keyboard, a mouse, a button, and the like. These buttons can be virtual buttons or physical buttons.
  • Communication component 305 for the electronic device 300 wired or wireless communication with 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 the corresponding communication component 305 can include: Wi-Fi module, Bluetooth module, NFC module.
  • the electronic device 300 may be configured by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), and digital signal processing devices (Digital).
  • ASICs Application Specific Integrated Circuits
  • DSPs Digital Signal Processors
  • Digital Digital
  • DSPD Signal Processing Device
  • PLD Programmable Logic Device
  • FPGA Field Programmable Gate Array
  • controller microcontroller, microprocessor or other electronic components Implemented to perform the substance detection method described above.
  • a computer readable storage medium comprising program instructions, such as a memory 302 comprising program instructions executable by processor 301 of electronic device 300 to perform the substance detection described above method.
  • the area of the laser spot can be acquired in real time when the substance is detected, and when the area of the spot satisfies the detection condition, the acquisition is started.
  • the Raman spectral data corresponding to the acquisition time, the spot area and the image characteristics of the determination area, and the above-mentioned data acquired at each acquisition time are analyzed in real time, and any of the spot area or the image of the determination area image acquired at any acquisition time.
  • a prompt message for prompting the user to reset the laser transmitter is output, and the focus offset can be found in time when performing Raman detection.

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)

Abstract

一种用于物质检测的用于物质检测的焦点检测方法、装置(200)、存储介质及设备(300),应用于检测装置(200),该检测装置(200)包括:摄像装置和激光发射器,且激光发射器的焦点位于摄像装置的焦平面上,该方法包括:依次获取每个采集时刻的拉曼光谱数据、光点面积以及判定区域图像特征(101)。当第一采集时刻的光点面积不在第一阈值范围内,或第一采集时刻的判定区域图像特征不在第二阈值范围内时,输出提示信息(102)。能够在进行拉曼检测时及时地发现焦点偏移。

Description

用于物质检测的焦点检测方法、装置、存储介质及设备 技术领域
本公开涉及物质检测领域,尤其涉及一种用于物质检测的焦点检测方法、装置、存储介质及设备。
背景技术
拉曼检测设备利用拉曼散射来检测物质的成分,当前在多个领域都有应用,包括专业的石油勘探,药物检测,到生活中常见安全检查,缉毒等场景,同时,随着拉曼检测设备的成本不断下降,在民用市场也有了更多的应用,例如用于农药检测,真假货检测等。
目前的拉曼检测设备的检测方法部分采用的是非接触检测,即拉曼检测设备与待测物质没有直接接触,因此在检测过程中,会出现拉曼检测设备的焦点偏移,不能保持一致对准待测物质的问题,导致检测结果不准确,甚至无法输出检测结果,需要重新检测。
发明内容
本公开提供一种用于物质检测的用于物质检测的焦点检测方法、装置、存储介质及设备,用以解决检测过程中焦点偏移导致测量结果不准确的问题。
为了实现上述目的,根据本公开实施例的第一方面,提供一种用于物质检测的焦点检测方法,应用于检测装置,所述检测装置包括:摄像装置和激光发射器,且所述激光发射器的焦点位于所述摄像装置的焦平面上,所述方法包括:
依次获取每个采集时刻的拉曼光谱数据、光点面积以及判定区域图像特征,所述判定区域图像特征为所述待测物质图像中位于所述激光光点周围预设距离内的判定区域中的图像特征;
当第一采集时刻的光点面积不在所述第一阈值范围内,或所述第一采集时刻的所述判定区域图像特征不在第二阈值范围内时,输出提示信息,所述提示信息用于提示用户重新设置所述激光发射器。
根据本公开实施例的第二方面,提供一种用于物质检测的焦点检测装置,应用于检测装置,所述检测装置包括:摄像装置和激光发射器,且所述激光发射器的焦点位于所述摄像装置的焦平面上,所述焦点检测装置包括:
数据采集模块,用于依次获取每个采集时刻的拉曼光谱数据、光点面积以及判定区域图像特征,所述判定区域图像特征为所述待测物质图像中位于所述激光光点周围预设距离内的判定区域中的图像特征;
判断模块,用于当第一采集时刻的光点面积不在所述第一阈值范围内,或所述第一采集时刻的所述判定区域图像特征不在第二阈值范围内时,输出提示信息,所述提示信息用于提示用户重新设置所述激光发射器。
根据本公开实施例的第三方面,提供一种计算机可读存储介质,所述计算机可读存储介质中包括一个或多个程序,所述一个或多个程序用于执行本公开实施例的第一方面所述的方法。
根据本公开实施例的第四方面,提供一种物质检测装置,包括:本公开实施例的第三方面所述的计算机可读存储介质;以及
一个或者多个处理器,用于执行所述计算机可读存储介质中的程序。
本公开通过上述技术方案,通过在检测装置上设置与激光发射器处于同一平面的摄像装置,能够在进行物质检测时实时地获取激光光点的面积,当光点的面积满足检测条件时,开始获取每个采集时刻对应的拉曼光谱数据、光点面积和判定区域图像特征,并对每个采集时刻获取的上述数据进行实时分析,当任一采集时刻获取的光点面积或判定区域图像特征中任一者不在阈值范围内时,输出用于提示用户重新设置激光发射器的提示消息,能够在进行拉曼检测时及时地发现焦点偏移。
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。
附图说明
图1a是根据本公开一示例性实施例提供的一种用于物质检测的焦点检测方法的流程图;
图1b是根据图1a所示的焦点检测方法中摄像装置和激光发射器的位置 关系示意图;
图2是根据本公开一示例性实施例提供的另一种用于物质检测的焦点检测方法的流程图;
图3是根据本公开一示例性实施例提供的另一种用于物质检测的焦点检测方法的流程图;
图4是根据本公开一示例性实施例提供的又一种用于物质检测的焦点检测方法的流程图;
图5是根据本公开一示例性实施例提供的一种用于物质检测的焦点检测装置的框图;
图6是根据本公开一示例性实施例提供的另一种用于物质检测的焦点检测装置的框图;
图7是根据本公开一示例性实施例提供的另一种用于物质检测的焦点检测装置的框图;
图8是根据本公开一示例性实施例提供的又一种用于物质检测的焦点检测装置的框图;
图9是根据一示例性实施例示出的一种电子设备的框图。
具体实施方式
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本公开相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本公开的一些方面相一致的装置和方法的例子。
在介绍本公开提供的用于物质检测的用于物质检测的焦点检测方法、装置、存储介质及设备之前,首先对本公开各个实施例所涉及应用场景进行介绍。该应用场景为利用检测装置,例如可以是拉曼检测设备对待测物质进行检测,该检测装置上设置有光谱仪传感器、激光发射器和摄像装置,其中激光发射器的焦点位于所述摄像装置的焦平面上,使得摄像装置的在取景范围能够拍摄到激光发射器的激光光点,以及激光光点周围的一定区域(这个区 域一般是待测物质所在的区域),另外,这里的激光光点,是指激光发射器发射的激光照射在待测物质上时产生的光点,激光发射器与待测物质的相对距离不同,该激光光点的面积大小也不同,该激光光点的位置能够反映出激光焦点的位置。因此在本公开实施例中,通过监测该激光光点的面积大小可识别出检测装置与待测物质之间的距离是否符合物质检测的要求,并且通过检测该激光光点周围的图像特征,可识别出激光焦点在物质平面上是否远离了待测物质。示例的,该检测装置可以是专用于拉曼检测的设备,具有上述的光谱仪传感器、激光发射器和摄像装置,或者,该检测装置可以嵌入在移动终端上,即在移动终端上嵌入光谱仪传感器、激光发射器,摄像设备可以直接利用智能终端的摄像头来实现,其中,该移动终端例如可以是智能手机、平板电脑、智能手表、PDA(英文:Personal Digital Assistant,中文:个人数字助理)等移动终端。
图1a是根据本公开一示例性实施例提供的一种用于物质检测的焦点检测方法的流程图,该方法应用于检测装置,该检测装置包括:摄像装置和激光发射器,且激光发射器的焦点位于摄像装置的焦平面上。
需要说明的是,激光发射器的焦点(激光发射器的激光经过透镜后的汇聚点)位于摄像装置的焦平面上,使得摄像装置能够拍摄到激光发射器照射在待测物质上产生的光点,从而采集该激光发射器的光点面积,其中,对激光发射器和摄像装置的位置关系不做限定,并且摄像装置的摄像头和激光发射器的倾角也不做限定。上述的激光发射器的焦点位于摄像装置的焦平面上,可以通过在进入物质检测App(应用程序)后,检测装置控制摄像装置自动调整焦距(AF),随着焦距的调整该摄像装置的焦平面的位置也在变化,通过AF可以一直调整到激光焦点处于摄像头焦平面上即可。因为当激光发射器的焦点位于摄像装置的焦平面时,待测物质图像是最清晰的,由于激光发射器的焦距固定,而摄像装置的摄像头可以调节焦距,因此可以控制摄像装置调节焦距,使激光发射器的焦点位于摄像装置的焦平面,再对待测物质进行检测。图1b是根据图1a所示的焦点检测方法中摄像装置和激光发射器的位置关系示意图,图1b所示的摄像装置和激光发射器的部署方式是一种实现方案,摄像装置和激光发射器设置在同一平面上,其中,β为摄像装置的 横向FOV(英文:Field of View,中文:视场)角,f为摄像装置的焦距,d为激光发射器的焦距,r为激光光点(此时激光发射器的光点即为激光发射器焦点所在的位置)周围的预设距离半径(以判定范围为圆形举例,具体实现可以是任意形状,此处不做限定),b为待测物质的投影点距离到FOV边缘的距离,a为摄像装置的中心点到激光发射器的中心点在横向投影的距离。
可知,当f=d时,待测物质图像最清晰,因此通过调节摄像装置,使f与d相同,此时:
tan(β/2)=(a+b)/d
可以得出:
b=d*tan(β/2)–a
只有当b>r时,则激光光点周围以r为半径的圆在此方向上才可能处于取景范围中,因此可得到该检测装置需要满足的如下条件:
d*tan(β/2)–a>r
能够使摄像装置的FOV包含激光发射器光点周围的一定区域(此处为以r为半径的圆形区域为例)。需要说明的是,在另一个方向上,即纵向FOV角,与上述横向FOV角的情景同理,也需要满足上述条件。当摄像装置和激光发射器没有设置在同一平面上时,可以通过调节摄像装置的倾角和/或激光发射器的倾角,使得激光发射器的焦点位于摄像装置的焦平面上。
如图1a所示,该方法包括:
步骤101,依次获取每个采集时刻的拉曼光谱数据、光点面积以及判定区域图像特征,判定区域图像特征为待测物质图像中位于激光光点周围预设距离内的判定区域中的图像特征。
举例来说,记录拉曼光谱数据、光点面积以及判定区域图像特征可以是在检测装置开启激光发射器,对待测物质进行照射后,由检测装置判断当前状态是否可以检测,如果可以进行检测时,开始记录数据。也可以是由检测装置的使用者决定何时开始记录数据。
关于采集时刻,示例的,可以设置一个采集频率f来获取拉曼光谱数据、光点面积以及判定区域图像特征,那么从开始进行物质检测起,每隔一个T=1/f就是一个采集时刻,即每个采集时刻之间的时间间隔为T,例如第一 个采集时刻为开始测量后的T,第二个采集时刻为开始测量后的2T,以此类推。
其中,判定区域图像特征是摄像装置采集的待测物质图像中判定区域的图像特征,任一采集时刻的判定区域图像特征为:在判定区域中指定物质特征所占的百分比,并且指定物质特征是根据在第一个采集时刻的判定区域图像特征确定的。即可以理解为,判定区域图像特征可以是待测物质中的某成分比例,且在首次获取判定区域图像特征时可以只需要存储待测物质中成分占比最大的特征,并以该成分为指定特征,作为后续获取的判定区域图像特征的基准特征。举例来说,在第一个采集时刻获取的判定区域图像特征是76%的某透明液体(只分析出占比最多的成分特征),那么以该透明液体为指定物质特征,之后的采集时刻获取的判定区域图像特征,均为该透明液体在待测物质中的百分比作为图像特征。在每获取一个采集时刻的拉曼光谱数据、光点面积以及判定区域图像特征后,将采集到的拉曼光谱数据、光点面积以及判定区域图像特征分别和相应的采集时刻作为一条记录存储在一张表中,以T为0.5s为例,如表1所示。
表1
采集时刻 拉曼光谱数据 光点面积 判定区域图像特征
0.5s 0-0.5s之间的拉曼光谱数据 S1 X1%的某物质
1s 0.5s-1s之间的拉曼光谱数据 S2 X2%的某物质
1.5s 1s-1.5s之间的拉曼光谱数据 S3 X3%的某物质
2s 1.5s-2s之间的拉曼光谱数据 S4 X4%的某物质
…… …… …… ……
步骤102,当第一采集时刻的光点面积不在第一阈值范围内,或第一采集时刻的判定区域图像特征不在第二阈值范围内时,输出提示信息,提示信息用于提示用户重新设置激光发射器。
示例的,该第一采集时刻为物质检测过程中的某一时刻,在该时刻,如果出现光点面积不在第一阈值范围内或第一采集时刻的判定区域图像特征不在第二阈值范围内的情况,即可判断出激光焦点出现偏移的情景。其中如 果光点面积不在第一阈值范围内,说明检测装置与待测物质之间的远近距离产生了变化;如果判定区域图像特征不在第二阈值范围内,则说明焦点在物质平面上远离了待测物质)。那么此时刻采集的数据是无效的,不能准确地检测物质。需要说明的是,物质检测的过程中是一个积分的过程,目前基于拉曼光谱数据的积分过程通常分为固定积分时长的积分和自动信噪比检测判定两类,其中都需要获取连续采集时刻的拉曼光谱数据进行积分,其中,每个采集时刻的拉曼光谱数据是该采集时刻对应的时间窗口中光谱仪传感器采集到的数据与该采集时刻的上一时刻的拉曼光谱数据进行叠加得到的。一旦某一采集时刻焦点出现偏移,那么该时刻对应的时间窗口中光谱仪传感器采集到的拉曼光谱数据可能是无效的,会导致积分结果不准确,因此检测装置应当暂停积分,等待拉曼光谱数据恢复后再继续积分。
因此在第一采集时刻输出提示信息,用于提示用户重新设置激光发射器,其中重新设置可以是调节检测装置与待测物质之间的距离,也可以是调节光点的位置。需要说明的是,第二阈值范围用于限制判定区域图像特征的变化范围,可以根据大量的测量数据统计出的合理的变化范围,在检测装置内部预设好,也可以根据用户的具体需求进行设定,例如判定区域图像特征为某液体的百分比,设置第二阈值范围为60%以上的该液体,当第一采集时刻的判定区域图像特征为45%的该液体时,输出提示信息。
综上所述,通过在检测装置上设置与激光发射器处于同一平面的摄像装置,能够在进行物质检测时实时地获取激光光点的面积,当光点的面积满足检测条件时,开始获取每个采集时刻对应的拉曼光谱数据、光点面积和判定区域图像特征,并对每个采集时刻获取的上述数据进行实时分析,当任一采集时刻获取的光点面积或判定区域图像特征中任一者不在阈值范围内时,输出用于提示用户重新设置激光发射器的提示消息,能够在进行拉曼检测时及时地发现焦点偏移。
图2是根据本公开一示例性实施例提供的另一种用于物质检测的焦点检测方法的流程图,如图2所示,步骤101包括:
步骤1011,在开启激光发射器开始对待测物质进行照射后,对摄像装置采集的待测物质图像中激光光点的光点面积进行监测。
示例的,为了确保检测结果的准确度,在激光发射器开启,对待测物质进行照射之后,利用摄像装置实时采集待测物质图像中激光光点的面积,激光光点指的是激光照射在待测物质上产生的光点,需要说明的是,该检测装置的摄像装置的取景范围能够包含激光发射器光点周围一定区域,摄像装置和激光发射器的位置关系可以是在检测装置的设计阶段预设好的,也可以通过调整摄像装置和激光发射器的倾角来保证。摄像设备可以通过一定频率来获取光点面积,光点面积过大,表示检测装置距离待测物质过近,激光照射的范围大,能量被分散,导致检测结果不准确,光点面积过小或为零,则表示检测装置距离待测物质过远,激光照射无法聚焦,导致无法检测,只有在激光光点的光点面积满足预设条件时,检测装置才能采集到准确的数据。
步骤1012,当监测到光点面积在第一阈值范围内时,依次获取每个采集时刻的拉曼光谱数据、光点面积以及判定区域图像特征。
需要说明的是,光点面积在第一阈值范围内,表示此时激光光点与激光发射器的焦点位置重合,此时激光发射器的焦点位于摄像装置的焦平面上。
举例来说,第一阈值范围可以根据大量的测量数据统计出的合理的光点面积范围,在检测装置内部预设好,也可以根据用户的具体需求进行设定。此时,对摄像设备采集的光点面积进行判断,当光点面积在第一阈值范围内时,表示检测装置中的光谱仪传感器采集的数据能够有效反映待测物质的成分,可以开始记录数据。
图3是根据本公开一示例性实施例提供的另一种用于物质检测的焦点检测方法的流程图,如图3所示,该方法还包括:
步骤103,获取第二采集时刻的光点面积,以及第二采集时刻的判定区域图像特征,第二采集时刻为输出提示信息之后的任意采集时刻。
示例的,在输出提示信息之后的每个采集时刻,继续获取光点面积以及判定区域图像特征,用于实时监测激光发射器的焦点是否恢复到能够正常检测的位置。另外,在输出提示信息之后的每个采集时刻,还可以继续获取每个采集时刻拉曼光谱数据,从而作为一个数据日志,方便后续查看历史记录。或者,也可以忽略输出提示信息之后采集时刻的拉曼光谱数据,因为此时激光发射器的焦点已经偏移,数据是无效的,因此可以忽略,直至出现步骤104 中的第三时刻,进行步骤104中的步骤。
步骤104,当第二采集时刻的光点面积在第一阈值范围内时,且第二采集时刻的判定区域图像特征在第二阈值范围内时,则在第三采集时刻,根据第一采集时刻的上一时刻的拉曼光谱数据获取拉曼光谱恢复数据,作为第三采集时刻的拉曼光谱数据,第三采集时刻为第二采集时刻的下一时刻。
其中,获取第三采集时刻的拉曼光谱数据的方式可以是:
将拉曼光谱传感器在第三采集时刻对应的时间窗口中采集的传感器数据,与第一采集时刻的上一时刻的拉曼光谱数据进行叠加,以得到拉曼光谱恢复数据,作为在第三采集时刻的拉曼光谱数据。
需要说明的是,对于每一个采集时刻获取的拉曼光谱数据,都是该采集时刻对应的时间窗口中光谱仪传感器采集到的数据与该采集时刻的上一时刻的拉曼光谱数据进行叠加获得的(第一个采集时刻对应的上一时刻的拉曼光谱数据为零)。而第三采集时刻的上一时刻是第二采集时刻,在第二采集时刻,获取的光点面积在第一阈值范围内且判定区域图像特征在第二阈值范围内,那么能够确定激光发射器的焦点在第二采集时刻和第二采集时刻的上一时刻之间的时间窗内恢复到了能够正常检测的位置,但是由于不能保证在第二采集时刻对应的时间窗口中光谱仪传感器采集到的数据是完全正确的,所以不能保证第二采集时刻获取的拉曼光谱数据有效,因此需要从第三采集时刻开始进行数据恢复,保证了拉曼光谱数据的准确度。
举例来说,对步骤103中获取的光点面积和判定区域图像特征进行判断,当光点面积在第一阈值范围内,并且判定区域图像特征在第二阈值范围内,那么表示激光发射器的焦点恢复到了能够正常检测的位置。以采集频率是1/T为例,第一个采集时刻为T,第二个采集时刻为2T,第三个采集时刻为3T,以此类推。
假设5T时刻获取的光点面积不在第一阈值范围内,或者5T时刻获取的判定区域图像特征不在第二阈值范围内,那么5T为上述第一采集时刻。之后6T、7T、……、10T对应获取的光点面积和判定区域图像特征都不能满足光点面积在第一阈值范围内且判定区域图像特征在第二阈值范围内,在11T时,获取的光点面积在第一阈值范围内且判定区域图像特征在第二阈值 范围内,那么能够确定激光发射器的焦点在10T至11T的时间内恢复到了能够正常检测的位置,但是不能保证11T获取的拉曼光谱数据有效,因此11T为是上述的第二采集时刻,则在下一采集时刻,即12T时,根据4T获取的拉曼光谱数据来获取拉曼光谱恢复数据。具体的,12T的拉曼光谱数据是拉曼光谱传感器在11T至12T对应的时间窗口中采集的传感器的数据,与4T的拉曼光谱数据进行叠加获得的。然后,将12T的拉曼光谱数据、光点面积和判定区域图像特征,继续存储在同一张表中,并继续进行物质识别的过程。这样就避免了焦点出现偏移时拉曼光谱数据无效导致的检测不准或无法检测的问题。
下面对激光发射器的开启条件进行说明,图4是根据本公开一示例性实施例提供的又一种用于物质检测的焦点检测方法的流程图,如图4所示,该方法在步骤101之前还包括:
步骤105,当检测距离达到预设距离时,开启激光发射器开始对待测物质进行照射,检测距离为激光发射器与待测物质之间的距离。或者,当接收到用户触发的开启信号时,开启激光发射器开始对待测物质进行照射。
示例的,检测距离可以通过传感器来测量,当检测距离达到预设距离时,再开启激光发射器。其中,该预设距离能够保证激光发射器的光点面积在一定范围内,从而使激光发射器在达到可正常检测的场景要求时才开启,以节省能源,避免无效的检测。或者,也可以由用户按照需求手动开启该激光发射器。
可选的,步骤102中所述的输出提示信息,包括:
当第一采集时刻的光点面积不在第一阈值范围内时,输出用于告知用户检测距离不在预设距离范围内的提示消息,检测距离为激光发射器与待测物质之间的距离。
当第一采集时刻的判定区域图像特征不在第二阈值范围内时,输出用于提示用户需要重新对准待测物质的提示消息。
示例的,焦点出现偏移的情况可以分为两类:检测装置与待测物质之间的远近距离产生了变化,或者焦点在物质所处平面上偏离了待测物质。当光点面积不在第一阈值范围内时,表示光点面积过大或过小,即检测距离超出 了预设范围,此时提示用户调节检测装置与待测物质之间的距离。当判定区域图像特征不在第二阈值范围内时,表示焦点所在位置相对于待测物质发生了变化,即焦点相对于待测物质出现了偏移,此时提示用户将光点重新对准该待测物质。
需要说明的是,当本实施例中检测装置所采用的检测方法不做具体限定,可以是采用固定积分时长的检测方法,或者自动信噪比判定方法。
综上所述,通过在检测装置上设置与激光发射器处于同一平面的摄像装置,能够在进行物质检测时实时地获取激光光点的面积,当光点的面积满足检测条件时,开始获取每个采集时刻对应的拉曼光谱数据、光点面积和判定区域图像特征,并对每个采集时刻获取的上述数据进行实时分析,当任一采集时刻获取的光点面积或判定区域图像特征中任一者不在阈值范围内时,输出用于提示用户重新设置激光发射器的提示消息,能够在进行拉曼检测时及时地发现焦点偏移。
图5是根据本公开一示例性实施例提供的一种用于物质检测的焦点检测装置的框图,该焦点检测装置200应用于检测装置,该检测装置包括:设置于同一平面的摄像装置和激光发射器,且摄像装置的焦距被调整为与激光发射器的焦距相同,如图5所示,该焦点检测装置200包括:
数据采集模块201,用于依次获取每个采集时刻的拉曼光谱数据、光点面积以及判定区域图像特征,判定区域图像特征为待测物质图像中位于激光光点周围预设距离内的判定区域中的图像特征。
判断模块202,用于当第一采集时刻的光点面积不在第一阈值范围内,或第一采集时刻的判定区域图像特征不在第二阈值范围内时,输出提示信息,提示信息用于提示用户重新设置激光发射器。
图6是根据本公开一示例性实施例提供的另一种用于物质检测的焦点检测装置的框图,如图6所示,数据采集模块201包括:
光点监测子模块2011,用于在开启激光发射器开始对待测物质进行照射后,对摄像装置采集的待测物质图像中激光光点的光点面积进行监测。
采集子模块2012,用于当监测到光点面积在第一阈值范围内时,依次获取每个采集时刻的拉曼光谱数据、光点面积以及判定区域图像特征。
图7是根据本公开一示例性实施例提供的另一种用于物质检测的焦点检测装置的框图,如图7所示,数据采集模块201,还用于获取第二采集时刻的光点面积,以及第二采集时刻的判定区域图像特征,第二采集时刻为输出提示信息之后的任意采集时刻。
焦点检测装置200还包括:
数据恢复模块203,用于当第二采集时刻的光点面积在第一阈值范围内时,且第二采集时刻的判定区域图像特征在第二阈值范围内时,则在第三采集时刻,根据第一采集时刻的上一时刻的拉曼光谱数据获取拉曼光谱恢复数据,作为第三采集时刻的拉曼光谱数据,第三采集时刻为第二采集时刻的下一时刻。
可选的,数据恢复模块203,用于将拉曼光谱传感器在第三采集时刻对应的时间窗口中采集的传感器数据,与第一采集时刻的上一时刻的拉曼光谱数据进行叠加,以得到拉曼光谱恢复数据,作为在第三采集时刻的拉曼光谱数据。
图8是根据本公开一示例性实施例提供的又一种用于物质检测的焦点检测装置的框图,如图8所示,焦点检测装置200还包括:
开启模块204,用于在开启激光发射器开始对待测物质进行照射之前,当检测距离达到预设距离时,开启激光发射器开始对待测物质进行照射,检测距离为激光发射器与待测物质之间的距离。或者,当接收到用户触发的开启信号时,开启激光发射器开始对待测物质进行照射。
可选的,任一采集时刻的判定区域图像特征为:在判定区域中指定物质特征所占的百分比,指定物质特征是根据在第一个采集时刻的判定区域图像特征确定的。
可选的,输出提示信息,包括:
当第一采集时刻的光点面积不在第一阈值范围内时,输出用于告知用户检测距离不在预设距离范围内的提示消息,检测距离为激光发射器与待测物质之间的距离。当第一采集时刻的判定区域图像特征不在第二阈值范围内时,输出用于提示用户需要重新对准待测物质的提示消息。
其中,上述各个模块所实现功能的具体说明已经在上述方法实施例中进 行了详细描述,此处不再赘述。
综上所述,通过在检测装置上设置与激光发射器处于同一平面的摄像装置,能够在进行物质检测时实时地获取激光光点的面积,当光点的面积满足检测条件时,开始获取每个采集时刻对应的拉曼光谱数据、光点面积和判定区域图像特征,并对每个采集时刻获取的上述数据进行实时分析,当任一采集时刻获取的光点面积或判定区域图像特征中任一者不在阈值范围内时,输出用于提示用户重新设置激光发射器的提示消息,能够在进行拉曼检测时及时地发现焦点偏移。
图9是根据一示例性实施例示出的一种电子设备300的框图。如图9所示,该电子设备300可以包括:处理器301,存储器302,多媒体组件303,输入/输出(I/O)接口304,以及通信组件305。
其中,处理器301用于控制该电子设备300的整体操作,以完成上述的物质检测方法中的全部或部分步骤。存储器302用于存储各种类型的数据以支持在该电子设备300的操作,这些数据例如可以包括用于在该电子设备300上操作的任何应用程序或方法的指令,以及应用程序相关的数据,例如联系人数据、收发的消息、图片、音频、视频等等。该存储器302可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,例如静态随机存取存储器(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),磁存储器,快闪存储器,磁盘或光盘。多媒体组件303可以包括屏幕和音频组件。其中屏幕例如可以是触摸屏,音频组件用于输出和/或输入音频信号。例如,音频组件可以包括一个麦克风,麦克风用于接收外部音频信号。所接收的音频信号可以被进一步存储在存储器302或通过通信组件305发送。音频组件还包括至少一个扬声器,用于输出音频信号。I/O接口304为处理器301和其他接口模块之间提供接口,上述其他接口模块可以是键盘,鼠标,按钮等。这些按钮可以是虚拟按钮或者实体按钮。通信组件305用于该电子设备 300与其他设备之间进行有线或无线通信。无线通信,例如Wi-Fi,蓝牙,近场通信(Near Field Communication,简称NFC),2G、3G或4G,或它们中的一种或几种的组合,因此相应的该通信组件305可以包括:Wi-Fi模块,蓝牙模块,NFC模块。
在一示例性实施例中,电子设备300可以被一个或多个应用专用集成电路(Application Specific Integrated Circuit,简称ASIC)、数字信号处理器(Digital Signal Processor,简称DSP)、数字信号处理设备(Digital Signal Processing Device,简称DSPD)、可编程逻辑器件(Programmable Logic Device,简称PLD)、现场可编程门阵列(Field Programmable Gate Array,简称FPGA)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述的物质检测方法。
在另一示例性实施例中,还提供了一种包括程序指令的计算机可读存储介质,例如包括程序指令的存储器302,上述程序指令可由电子设备300的处理器301执行以完成上述的物质检测方法。
综上所述,通过在检测装置上设置与激光发射器处于同一平面的摄像装置,能够在进行物质检测时实时地获取激光光点的面积,当光点的面积满足检测条件时,开始获取每个采集时刻对应的拉曼光谱数据、光点面积和判定区域图像特征,并对每个采集时刻获取的上述数据进行实时分析,当任一采集时刻获取的光点面积或判定区域图像特征中任一者不在阈值范围内时,输出用于提示用户重新设置激光发射器的提示消息,能够在进行拉曼检测时及时地发现焦点偏移。
以上结合附图详细描述了本公开的优选实施方式,但是,本公开并不限于上述实施方式中的具体细节,在本公开的技术构思范围内,可以对本公开的技术方案进行多种简单变型,这些简单变型均属于本公开的保护范围。
另外需要说明的是,在上述具体实施方式中所描述的各个具体技术特征,在不矛盾的情况下,可以通过任何合适的方式进行组合,为了避免不必要的重复,本公开对各种可能的组合方式不再另行说明。
此外,本公开的各种不同的实施方式之间也可以进行任意组合,只要其不违背本公开的思想,其同样应当视为本公开所公开的内容。

Claims (16)

  1. 一种用于物质检测的焦点检测方法,应用于检测装置,其特征在于,所述检测装置包括:摄像装置和激光发射器,且所述激光发射器的焦点位于所述摄像装置的焦平面上,所述方法包括:
    依次获取每个采集时刻的拉曼光谱数据、光点面积以及判定区域图像特征,所述判定区域图像特征为所述待测物质图像中位于所述激光光点周围预设距离内的判定区域中的图像特征;
    当第一采集时刻的光点面积不在第一阈值范围内,或所述第一采集时刻的所述判定区域图像特征不在第二阈值范围内时,输出提示信息,所述提示信息用于提示用户重新设置所述激光发射器。
  2. 根据权利要求1所述的方法,其特征在于,所述依次获取每个采集时刻的拉曼光谱数据、光点面积以及判定区域图像特征,包括:
    在开始利用所述激光发射器对待测物质进行照射后,对所述摄像装置采集的待测物质图像中激光光点的光点面积进行监测;
    当监测到所述光点面积在第一阈值范围内时,依次获取每个采集时刻的拉曼光谱数据、光点面积以及判定区域图像特征。
  3. 根据权利要求1或2所述的方法,其特征在于,所述方法还包括:
    获取第二采集时刻的光点面积,以及所述第二采集时刻的所述判定区域图像特征,所述第二采集时刻为输出提示信息之后的任意采集时刻;
    当所述第二采集时刻的光点面积在所述第一阈值范围内时,且所述第二采集时刻的所述判定区域图像特征在所述第二阈值范围内时,则在第三采集时刻,根据所述第一采集时刻的上一时刻的拉曼光谱数据获取拉曼光谱恢复数据,作为所述第三采集时刻的拉曼光谱数据,所述第三采集时刻为所述第二采集时刻的下一时刻。
  4. 根据权利要求3所述的方法,其特征在于,所述根据所述第一采集时刻的上一时刻的拉曼光谱数据获取拉曼光谱恢复数据,作为所述第三采集 时刻的拉曼光谱数据,包括:
    将拉曼光谱传感器在所述第三采集时刻对应的时间窗口中采集的传感器数据,与所述第一采集时刻的上一时刻的拉曼光谱数据进行叠加,以得到所述拉曼光谱恢复数据,作为在所述第三采集时刻的拉曼光谱数据。
  5. 根据权利要求2所述的方法,其特征在于,所述开始利用所述激光发射器对待测物质进行照射之前,所述方法还包括:
    当检测距离达到预设距离时,开启所述激光发射器开始对所述待测物质进行照射,所述检测距离为所述激光发射器与所述待测物质之间的距离;或者,
    当接收到用户触发的开启信号时,开启所述激光发射器开始对所述待测物质进行照射。
  6. 根据权利要求1所述的方法,其特征在于,任一采集时刻的所述判定区域图像特征为:在所述判定区域中指定物质特征所占的百分比,所述指定物质特征是根据在第一个采集时刻的判定区域图像特征确定的。
  7. 根据权利要求1所述的方法,其特征在于,所述输出提示信息,包括:
    当所述第一采集时刻的光点面积不在所述第一阈值范围内时,输出用于告知用户检测距离不在预设距离范围内的提示消息,所述检测距离为所述激光发射器与所述待测物质之间的距离;
    当所述第一采集时刻的所述判定区域图像特征不在第二阈值范围内时,输出用于提示用户需要重新对准所述待测物质的提示消息。
  8. 一种用于物质检测的焦点检测装置,应用于检测装置,其特征在在于,所述检测装置包括:摄像装置和激光发射器,且所述激光发射器的焦点位于所述摄像装置的焦平面上,所述焦点检测装置包括:
    数据采集模块,用于依次获取每个采集时刻的拉曼光谱数据、光点面积 以及判定区域图像特征,所述判定区域图像特征为所述待测物质图像中位于所述激光光点周围预设距离内的判定区域中的图像特征;
    判断模块,用于当第一采集时刻的光点面积不在所述第一阈值范围内,或所述第一采集时刻的所述判定区域图像特征不在第二阈值范围内时,输出提示信息,所述提示信息用于提示用户重新设置所述激光发射器。
  9. 根据权利要求8所述的焦点检测装置,其特征在于,所述数据采集模块包括:
    光点监测子模块,用于在开始利用所述激光发射器对待测物质进行照射后,对所述摄像装置采集的待测物质图像中激光光点的光点面积进行监测;
    采集子模块,用于当监测到所述光点面积在第一阈值范围内时,依次获取每个采集时刻的拉曼光谱数据、光点面积以及判定区域图像特征。
  10. 根据权利要求8或9所述的焦点检测装置,其特征在于,所述数据采集模块,还用于获取第二采集时刻的光点面积,以及所述第二采集时刻的所述判定区域图像特征,所述第二采集时刻为输出提示信息之后的任意采集时刻;
    所述焦点检测装置,还包括:
    数据恢复模块,用于当所述第二采集时刻的光点面积在所述第一阈值范围内时,且所述第二采集时刻的所述判定区域图像特征在所述第二阈值范围内时,则在第三采集时刻,根据所述第一采集时刻的上一时刻的拉曼光谱数据获取拉曼光谱恢复数据,作为所述第三采集时刻的拉曼光谱数据,所述第三采集时刻为所述第二采集时刻的下一时刻。
  11. 根据权利要求10所述的焦点检测装置,其特征在于,所述数据恢复模块,用于将拉曼光谱传感器在所述第三采集时刻对应的时间窗口中采集的传感器数据,与所述第一采集时刻的上一时刻的拉曼光谱数据进行叠加,以得到所述拉曼光谱恢复数据,作为在所述第三采集时刻的拉曼光谱数据。
  12. 根据权利要求9所述的焦点检测装置,其特征在于,所述焦点检测装置还包括:
    开启模块,用于在开始利用所述激光发射器对待测物质进行照射之前,当检测距离达到预设距离时,开启所述激光发射器开始对所述待测物质进行照射,所述检测距离为所述激光发射器与所述待测物质之间的距离;或者,当接收到用户触发的开启信号时,开启所述激光发射器开始对所述待测物质进行照射。
  13. 根据权利要求8所述的焦点检测装置,其特征在于,任一采集时刻的所述判定区域图像特征为:在所述判定区域中指定物质特征所占的百分比,所述指定物质特征是根据在第一个采集时刻的判定区域图像特征确定的。
  14. 根据权利要求8所述的焦点检测装置,其特征在于,所述输出提示信息,包括:
    当所述第一采集时刻的光点面积不在所述第一阈值范围内时,输出用于告知用户检测距离不在预设距离范围内的提示消息,所述检测距离为所述激光发射器与所述待测物质之间的距离;
    当所述第一采集时刻的所述判定区域图像特征不在第二阈值范围内时,输出用于提示用户需要重新对准所述待测物质的提示消息。
  15. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中包括一个或多个程序,所述一个或多个程序用于执行权利要求1至7中任一项所述的方法。
  16. 一种电子设备,其特征在于,包括:
    权利要求15中所述的计算机可读存储介质;以及
    一个或者多个处理器,用于执行所述计算机可读存储介质中的程序。
PCT/CN2017/103813 2017-09-27 2017-09-27 用于物质检测的焦点检测方法、装置、存储介质及设备 WO2019061114A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201780002463.3A CN108076655B (zh) 2017-09-27 2017-09-27 用于物质检测的焦点检测方法、装置、存储介质及设备
PCT/CN2017/103813 WO2019061114A1 (zh) 2017-09-27 2017-09-27 用于物质检测的焦点检测方法、装置、存储介质及设备

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2017/103813 WO2019061114A1 (zh) 2017-09-27 2017-09-27 用于物质检测的焦点检测方法、装置、存储介质及设备

Publications (1)

Publication Number Publication Date
WO2019061114A1 true WO2019061114A1 (zh) 2019-04-04

Family

ID=62157214

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/103813 WO2019061114A1 (zh) 2017-09-27 2017-09-27 用于物质检测的焦点检测方法、装置、存储介质及设备

Country Status (2)

Country Link
CN (1) CN108076655B (zh)
WO (1) WO2019061114A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021194774A1 (en) * 2020-03-27 2021-09-30 Gemological Institute Of America, Inc. (Gia) Imaging assisted scanning spectroscopy for gem identification

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101666745A (zh) * 2009-09-30 2010-03-10 太原市海通自动化技术有限公司 具有自调整校准功能的激光感生光谱测量装置及控制方法
US20140028996A1 (en) * 2012-07-26 2014-01-30 Seagate Technology Llc Accuracy and precision in raman spectroscopy
CN103674839A (zh) * 2013-11-12 2014-03-26 清华大学 一种基于光斑检测的可视化样品定位操作系统及方法
CN106442467A (zh) * 2016-10-31 2017-02-22 北京信息科技大学 空间自调焦激光共焦成像拉曼光谱探测方法与装置
CN106483114A (zh) * 2015-08-31 2017-03-08 杜晨光 一种可见光辅助对焦的便携式拉曼光谱仪
CN106770154A (zh) * 2016-10-31 2017-05-31 北京信息科技大学 空间自调焦激光差动共焦拉曼光谱探测方法与装置
CN107065124A (zh) * 2017-05-19 2017-08-18 广州大学 一种基于液晶空间光调制器实现光束聚焦反馈控制的方法

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103529014A (zh) * 2013-10-31 2014-01-22 江西农业大学 可精确调节共焦区域的显微共焦拉曼外光路装置
US20160091366A1 (en) * 2014-09-25 2016-03-31 Frank Jiann-Fu Yang Auto-focus raman spectrometer system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101666745A (zh) * 2009-09-30 2010-03-10 太原市海通自动化技术有限公司 具有自调整校准功能的激光感生光谱测量装置及控制方法
US20140028996A1 (en) * 2012-07-26 2014-01-30 Seagate Technology Llc Accuracy and precision in raman spectroscopy
CN103674839A (zh) * 2013-11-12 2014-03-26 清华大学 一种基于光斑检测的可视化样品定位操作系统及方法
CN106483114A (zh) * 2015-08-31 2017-03-08 杜晨光 一种可见光辅助对焦的便携式拉曼光谱仪
CN106442467A (zh) * 2016-10-31 2017-02-22 北京信息科技大学 空间自调焦激光共焦成像拉曼光谱探测方法与装置
CN106770154A (zh) * 2016-10-31 2017-05-31 北京信息科技大学 空间自调焦激光差动共焦拉曼光谱探测方法与装置
CN107065124A (zh) * 2017-05-19 2017-08-18 广州大学 一种基于液晶空间光调制器实现光束聚焦反馈控制的方法

Also Published As

Publication number Publication date
CN108076655A (zh) 2018-05-25
CN108076655B (zh) 2020-10-02

Similar Documents

Publication Publication Date Title
JP5267617B2 (ja) 分析装置および分析方法
JP5902354B2 (ja) 撮影装置及び3次元計測装置
KR101740355B1 (ko) 지능형 디바이스를 테스트하기 위한 방법 및 장치
US9668117B2 (en) Method and device for analyzing social relationship
US9179838B2 (en) Eye/gaze tracker and method of tracking the position of an eye and/or a gaze point of a subject
JP5226903B1 (ja) 追尾装置及び追尾方法
US20130162839A1 (en) Tracking device and tracking method for prohibiting a tracking operation when a tracked subject is obstructed
JP6464013B2 (ja) 撮影装置および方法
CN107135351B (zh) 拍照方法及拍照装置
WO2019090490A1 (zh) 发射功率控制方法、装置、存储介质及电子设备
WO2019024059A1 (zh) 拉曼检测方法、装置以及存储介质
TWI844575B (zh) 執行分析量測之方法及裝置
JP2008167295A (ja) 撮像装置及び撮像方法
WO2020134641A1 (zh) 数据处理方法及装置
CN108234892A (zh) 摄像装置及摄像方法
WO2017000491A1 (zh) 获取虹膜图像的方法、装置及红膜识别设备
JP2019078755A5 (zh)
US9202115B2 (en) Event detection system and method using image analysis
WO2019061114A1 (zh) 用于物质检测的焦点检测方法、装置、存储介质及设备
JP2007212724A5 (zh)
WO2019036941A1 (zh) 物质检测方法、装置、存储介质及电子设备
US20170150051A1 (en) Information processing apparatus, information processing method, and program
WO2019080013A1 (zh) 拉曼检测方法、装置、存储介质及电子设备
CN112088293B (zh) 预防暗光条件使用电子显示器造成视力减退的方法和系统
WO2019140579A1 (zh) 对待检测物质进行拉曼检测的方法和终端

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: 17927555

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 18/09/2020)

122 Ep: pct application non-entry in european phase

Ref document number: 17927555

Country of ref document: EP

Kind code of ref document: A1