WO2019183902A1 - Lens detection method and apparatus, electronic device, and computer readable storage medium - Google Patents

Lens detection method and apparatus, electronic device, and computer readable storage medium Download PDF

Info

Publication number
WO2019183902A1
WO2019183902A1 PCT/CN2018/081181 CN2018081181W WO2019183902A1 WO 2019183902 A1 WO2019183902 A1 WO 2019183902A1 CN 2018081181 W CN2018081181 W CN 2018081181W WO 2019183902 A1 WO2019183902 A1 WO 2019183902A1
Authority
WO
WIPO (PCT)
Prior art keywords
lens
index
dirty
detecting
smoke
Prior art date
Application number
PCT/CN2018/081181
Other languages
French (fr)
Chinese (zh)
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 PCT/CN2018/081181 priority Critical patent/WO2019183902A1/en
Priority to CN201880001153.4A priority patent/CN108780050B/en
Publication of WO2019183902A1 publication Critical patent/WO2019183902A1/en

Links

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/01Arrangements or apparatus for facilitating the optical investigation
    • G01N21/15Preventing contamination of the components of the optical system or obstruction of the light path
    • 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/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8851Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
    • 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/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/94Investigating contamination, e.g. dust
    • 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/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/95Investigating the presence of flaws or contamination characterised by the material or shape of the object to be examined
    • G01N21/958Inspecting transparent materials or objects, e.g. windscreens
    • 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/01Arrangements or apparatus for facilitating the optical investigation
    • G01N21/15Preventing contamination of the components of the optical system or obstruction of the light path
    • G01N2021/155Monitoring cleanness of window, lens, or other parts
    • G01N2021/157Monitoring by optical means
    • 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/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8851Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
    • G01N2021/8887Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges based on image processing techniques
    • 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/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/95Investigating the presence of flaws or contamination characterised by the material or shape of the object to be examined
    • G01N21/958Inspecting transparent materials or objects, e.g. windscreens
    • G01N2021/9583Lenses

Definitions

  • the present application relates to the field of optical detection technologies, and in particular, to a method and apparatus for detecting a lens, an electronic device, and a computer readable storage medium.
  • the inventors have found that when obtaining a spectrum of a substance, when the laser is irradiated onto a dark or flammable article, it may cause smoke or burning of the substance due to laser focusing.
  • the detection device is often very close to the substance to be tested during the detection. If the smoke is slightly larger due to laser irradiation or the smoke lasts for a long time, the smoke particles may be adsorbed on the lens, which may result in a decrease in the signal-to-noise ratio of the detection result. Furthermore, the detection time is prolonged or the known substance is not recognized, and even a recognition error occurs, which has a great influence on the user.
  • the embodiment of the present application further provides a computer readable storage medium, which stores a computer program, and when the computer program is executed by a processor, implements the above method for detecting a lens.
  • FIG. 1 is a flow chart of a method for detecting a lens in a first embodiment of the present application
  • FIG. 4 is a flow chart of a method for detecting a lens in a second embodiment of the present application.
  • FIG. 5 is a schematic structural diagram of an apparatus for detecting a lens in a third embodiment of the present application.
  • Step 101 In the process of detecting the spectrum of the substance, obtaining a dirty factor that affects the lens dirty index.
  • the soiling factors include a lens dirty lift index and/or a dirt likelihood index. If the dirty factor includes the lens dirty lifting index, a specific implementation method for obtaining the dirty factor affecting the lens dirty index is: determining the substance generating smoke and obtaining the smoke index during the detecting process, and determining the lens dirty lifting index according to the smoke index. . If the fouling factor includes the index of possible contamination, a specific implementation method for obtaining the fouling factor affecting the lens dirty index is to obtain the spectrum of the detected substance, analyze and determine the signal-to-noise ratio of the spectrum, and determine according to the signal-to-noise ratio. Dirty possibility index.
  • the dirty factor is not limited to the above-mentioned lens dirtyness increase index and the dirtiness possibility index, and may include other factors such as detecting environmental factors, detecting substance factors, and the like, although the lens is dirty in the embodiment.
  • the pollution improvement index and the pollution possibility index are specifically described as examples. In practice, the corresponding pollution factors affecting the lens dirty factors can be obtained according to the needs, and no specific restrictions are imposed here.
  • Step 102 Update the lens dirty index according to the dirty factor.
  • the smoke index includes the smoke degree index, the distance between the substance and the lens, and the length of time from the generation to the disappearance of the smoke.
  • a specific process for determining the substance generating smoke and obtaining the smoke index during the detection process is: obtaining an image of the substance photographed by the camera on the optical detecting device; determining the substance generating smoke by analyzing the image, and obtaining the smoke degree index, the substance and the lens through the image The distance value and the length of time from the generation to the disappearance of the smoke.
  • the signal-to-noise ratio is inversely proportional to the probability of contamination in the second constraint relationship.

Abstract

The present application relates to the technical field of optical detection, and in particular, to a lens detection method and apparatus, an electronic device, and a computer readable storage medium. The lens detection method is applied to an optical detection device having a lens, and comprises: obtaining a contamination factor affecting a lens contamination index during detecting a spectrum of a substance, and updating the lens contamination index according to the contamination factor, the lens contamination index being used for indicating a contamination degree of the lens. The method can solve the problem of lens contamination state detection in an optical detection device.

Description

检测镜头的方法及装置、电子设备和计算机可读存储介质Method and device for detecting lens, electronic device and computer readable storage medium 技术领域Technical field
本申请涉及光学检测技术领域,尤其涉及一种检测镜头的方法及装置、电子设备和计算机可读存储介质。The present application relates to the field of optical detection technologies, and in particular, to a method and apparatus for detecting a lens, an electronic device, and a computer readable storage medium.
背景技术Background technique
当前专业光学物质检测设备,有些是以发射激光照射到物质表面,并激发物质光谱,根据该物质光谱进行物质的检测和识别,如拉曼光谱仪等。At present, some professional optical substance testing equipments use a laser to illuminate the surface of a substance and excite the spectrum of the substance, and detect and identify the substance according to the spectrum of the substance, such as a Raman spectrometer.
技术问题technical problem
发明人在实现本申请的过程中发现,在获得物质光谱时,因为激光聚焦的原因,当激光照射到深色或易燃物品上时,可能会造成物质冒烟或燃烧。然而,检测时检测设备往往和待测物质非常接近,若因为激光照射产生烟雾稍大或烟雾持续时间较久,会出现烟雾颗粒吸附在镜头上的情况,就会造成检测结果信噪比降低,进而出现检测时间延长或已知物质的未识别,甚至会出现识别错误的现象,给使用者造成较大影响。In the course of realizing the present application, the inventors have found that when obtaining a spectrum of a substance, when the laser is irradiated onto a dark or flammable article, it may cause smoke or burning of the substance due to laser focusing. However, the detection device is often very close to the substance to be tested during the detection. If the smoke is slightly larger due to laser irradiation or the smoke lasts for a long time, the smoke particles may be adsorbed on the lens, which may result in a decrease in the signal-to-noise ratio of the detection result. Furthermore, the detection time is prolonged or the known substance is not recognized, and even a recognition error occurs, which has a great influence on the user.
因此,需要一种能够检测镜头脏污状况的技术。Therefore, there is a need for a technique that is capable of detecting the dirty condition of a lens.
技术解决方案Technical solution
本申请部分实施例所要解决的技术问题在于提供一种检测镜头的方法及装置、电子设备和计算机可读存储介质,用以解决光学检测设备中如何确定检测镜头脏污状况的问题。A technical problem to be solved by some embodiments of the present application is to provide a method and apparatus for detecting a lens, an electronic device, and a computer readable storage medium for solving the problem of how to detect a dirty state of a lens in an optical detecting device.
本申请的一个实施例提供了一种检测镜头的方法,应用于具有镜头的光学检测设备,包括:在检测物质的光谱的过程中,获取影响镜头脏污指数的脏污因素;根据脏污因素更新镜头脏污指数,其中,镜头脏污指数用于表示镜头的脏污程度。An embodiment of the present application provides a method for detecting a lens, which is applied to an optical detecting device having a lens, comprising: obtaining a dirty factor affecting a lens dirty index in a process of detecting a spectrum of a substance; Update the lens dirty index, where the lens dirty index is used to indicate the degree of dirtiness of the lens.
本申请的一个实施例还提供了一种检测镜头的装置,包括:获取模块,用于在检测物质的光谱的过程中,获取影响镜头脏污指数的脏污因素;更新模块,用于根据脏污因素更新镜头脏污指数,其中,镜头脏污指数用于表示镜头的脏污程度。An embodiment of the present application further provides an apparatus for detecting a lens, comprising: an obtaining module, configured to acquire a dirty factor affecting a lens dirty index in a process of detecting a spectrum of a substance; and an update module for using the dirty The dirty factor updates the lens dirty index, where the lens dirty index is used to indicate the degree of contamination of the lens.
本申请实施例还提供了一种电子设备,包括:至少一个处理器;以及,与至少一个处理器通信连接的存储器;其中,存储器存储有可被至少一个处理器执行的指令,该指令被至少一个处理器执行,以使至少一个处理器能够执行上述的检测镜头的方法。An embodiment of the present application further provides an electronic device, including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being at least A processor executes to enable at least one processor to perform the method of detecting a lens as described above.
本申请实施例还提供了一种计算机可读存储介质,存储有计算机程序,该计算机程序被处理器执行时实现上述的检测镜头的方法。The embodiment of the present application further provides a computer readable storage medium, which stores a computer program, and when the computer program is executed by a processor, implements the above method for detecting a lens.
有益效果Beneficial effect
相对于现有技术而言,本申请部分实施例中在检测物质的光谱的过程中,获取影响镜头脏污指数的脏污因素,根据本次检测获得的脏污因素更新镜头脏污指数,从而使得能够通过该镜头脏污指数判断镜头的脏污程度,以便于提示用户及时清洁镜头,提高了该光学检测设备的智能程度,且为使用者带来良好的用户体验。In the process of detecting the spectrum of the substance in some embodiments of the present application, the dirty factor affecting the lens dirty index is obtained, and the lens dirty index is updated according to the dirty factor obtained by the detection, thereby The lens can be judged to be dirty by the lens dirty index, so as to prompt the user to clean the lens in time, the intelligence of the optical detecting device is improved, and the user is provided with a good user experience.
附图说明DRAWINGS
一个或多个实施例通过与之对应的附图中的图片进行示例性说明,这些示例性说明并不构成对实施例的限定,附图中具有相同参考数字标号的元件表示为类似的元件,除非有特别申明,附图中的图不构成比例限制。The one or more embodiments are exemplified by the accompanying drawings in the accompanying drawings, and FIG. The figures in the drawings do not constitute a scale limitation unless otherwise stated.
图1是本申请第一实施例中检测镜头的方法流程图;1 is a flow chart of a method for detecting a lens in a first embodiment of the present application;
图2是本申请第一实施例中光学检测设备的结构示意图;2 is a schematic structural diagram of an optical detecting device in a first embodiment of the present application;
图3是本申请第一实施例中另一光学检测设备的结构示意图;3 is a schematic structural diagram of another optical detecting device in the first embodiment of the present application;
图4是本申请第二实施例中检测镜头的方法流程图;4 is a flow chart of a method for detecting a lens in a second embodiment of the present application;
图5是本申请第三实施例中检测镜头的装置结构示意图;FIG. 5 is a schematic structural diagram of an apparatus for detecting a lens in a third embodiment of the present application; FIG.
图6是本申请第四实施例中电子设备的结构示意图。FIG. 6 is a schematic structural diagram of an electronic device in a fourth embodiment of the present application.
本发明的实施方式Embodiments of the invention
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请部分实施例进行进一步详细说明。应当理解,此处所描述的具体实施例仅用以解释本申请,并不用于限定本申请。然而,本领域的普通技术人员可以理解,在本申请的各实施例中,为了使读者更好地理解本申请而提出了许多技术细节。但是,即使没有这些技术细节和基于以下各实施例的种种变化和修改,也可以实现本申请所要求保护的技术方案。In order to make the objects, the technical solutions and the advantages of the present application more clear, some embodiments of the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It is understood that the specific embodiments described herein are merely illustrative of the application and are not intended to be limiting. However, those of ordinary skill in the art will appreciate that in the various embodiments of the present application, numerous technical details are set forth in order to provide the reader with a better understanding of the application. However, the technical solutions claimed in the present application can be implemented without these technical details and various changes and modifications based on the following embodiments.
本申请的第一实施例涉及一种检测镜头的方法,应用于光学检测设备,具体流程如图1所示,包括以下步骤:A first embodiment of the present application relates to a method for detecting a lens, which is applied to an optical detecting device. The specific process is as shown in FIG. 1 and includes the following steps:
步骤101:在检测物质的光谱的过程中,获取影响镜头脏污指数的脏污因素。Step 101: In the process of detecting the spectrum of the substance, obtaining a dirty factor that affects the lens dirty index.
在一个具体实现中,脏污因素包括镜头脏污提升指数和/或脏污可能性指数。若脏污因素包括镜头脏污提升指数,获取影响镜头脏污指数的脏污因素的一个具体实现方式为:在检测过程中确定物质产生烟雾并获取烟雾指数,根据烟雾指数确定镜头脏污提升指数。若脏污因素包括脏污可能性指数,获取影响镜头脏污指数的脏污因素的一个具体实现方式为:获取检测得到的物质的光谱,分析并确定光谱的信噪比,根据信噪比确定脏污可能性指数。若脏污因素包括镜头脏污提升指数和脏污可能性指数,获取影响镜头脏污指数的脏污因素的一个具体实现方式为:在检测过程中确定物质产生烟雾并获取烟雾指数,根据烟雾指数确定镜头脏污提升指数;以及获取检测得到的物质的光谱,分析并确定光谱的信噪比,根据信噪比确定脏污可能性指数。In one implementation, the soiling factors include a lens dirty lift index and/or a dirt likelihood index. If the dirty factor includes the lens dirty lifting index, a specific implementation method for obtaining the dirty factor affecting the lens dirty index is: determining the substance generating smoke and obtaining the smoke index during the detecting process, and determining the lens dirty lifting index according to the smoke index. . If the fouling factor includes the index of possible contamination, a specific implementation method for obtaining the fouling factor affecting the lens dirty index is to obtain the spectrum of the detected substance, analyze and determine the signal-to-noise ratio of the spectrum, and determine according to the signal-to-noise ratio. Dirty possibility index. If the dirty factor includes the lens dirtyness increase index and the dirtiness possibility index, a specific implementation method for obtaining the dirty factor affecting the lens dirty index is: determining the substance generating smoke and obtaining the smoke index during the detection process, according to the smoke index Determine the lens dirty lifting index; and obtain the spectrum of the detected substance, analyze and determine the signal-to-noise ratio of the spectrum, and determine the soiling probability index according to the signal-to-noise ratio.
可以理解的是,脏污因素并不局限于上述提到的镜头脏污提升指数和脏污可能性指数,还可能包括检测环境因素、检测物质因素等其他因素,本实施方式中虽然以镜头脏污提升指数和脏污可能性指数为例进行具体说明,实际中可根据需要获取对应的影响镜头脏污因素的脏污因素,此处不做具体的限制。It can be understood that the dirty factor is not limited to the above-mentioned lens dirtyness increase index and the dirtiness possibility index, and may include other factors such as detecting environmental factors, detecting substance factors, and the like, although the lens is dirty in the embodiment. The pollution improvement index and the pollution possibility index are specifically described as examples. In practice, the corresponding pollution factors affecting the lens dirty factors can be obtained according to the needs, and no specific restrictions are imposed here.
步骤102:根据脏污因素更新镜头脏污指数。Step 102: Update the lens dirty index according to the dirty factor.
其中,镜头脏污指数用于表示镜头的脏污程度。Among them, the lens dirty index is used to indicate the degree of dirtiness of the lens.
具体的,当脏污因素包括镜头脏污提升指数时,根据镜头脏污提升指数更新镜头脏污指数;当脏污因素包括脏污可能性指数时,根据脏污可能性指数更新镜头脏污指数;当脏污因素包括镜头脏污提升指数和脏污可能性指数时,根据镜头脏污提升指数和脏污可能性指数更新镜头脏污指数。其中,镜头脏污提升指数与物质检测过程中的烟雾指数相关,脏污可能性指数与物质光谱的信噪比相关。也就是说,在更新镜头脏污指数时根据烟雾指数和/或物质光谱的信噪比更新镜头脏污指数。Specifically, when the dirty factor includes the lens dirtyness increase index, the lens dirty index is updated according to the lens dirtyness increase index; when the dirty factor includes the dirtyness possibility index, the lens dirty index is updated according to the dirtyness possibility index. When the dirty factor includes the lens dirtyness increase index and the dirtiness possibility index, the lens dirty index is updated according to the lens dirtyness increase index and the dirtiness possibility index. Among them, the lens dirt lifting index is related to the smoke index in the material detection process, and the soiling possibility index is related to the signal-to-noise ratio of the material spectrum. That is to say, the lens dirty index is updated according to the signal-to-noise ratio of the smoke index and/or the material spectrum when the lens dirty index is updated.
在一个具体实现中,计算镜头脏污指数与脏污因素之和,将镜头脏污指数的取值更新为所得的和值。例如,更新镜头脏污指数的取值可表示为:i=m+n,其中,i表示更新的镜头脏污指数,m表示镜头脏污提升指数,n表示脏污可能性指数。In a specific implementation, the sum of the lens dirty index and the dirty factor is calculated, and the value of the lens dirty index is updated to the obtained sum value. For example, the value of the updated lens dirty index can be expressed as: i=m+n, where i represents an updated lens dirty index, m represents a lens dirtyness increase index, and n represents a dirtyness possibility index.
具体实现中,烟雾指数包括烟雾程度指数、物质与镜头的距离值和烟雾从产生到消失的时长。在检测过程中确定物质产生烟雾并获取烟雾指数的一个具体过程为:获取光学检测设备上摄像头拍摄的物质的图像;通过分析图像确定物质产生烟雾,并通过图像获取烟雾程度指数、物质与镜头的距离值以及烟雾从产生到消失的时长。In the specific implementation, the smoke index includes the smoke degree index, the distance between the substance and the lens, and the length of time from the generation to the disappearance of the smoke. A specific process for determining the substance generating smoke and obtaining the smoke index during the detection process is: obtaining an image of the substance photographed by the camera on the optical detecting device; determining the substance generating smoke by analyzing the image, and obtaining the smoke degree index, the substance and the lens through the image The distance value and the length of time from the generation to the disappearance of the smoke.
其中,烟雾指数与镜头脏污提升指数之间满足第一约束关系:m=f(a、t、d),m表示镜头脏污提升指数,a表示烟雾程度指数,d表示物质与镜头的距离值,t表示烟雾从产生到消失的时长。其中,a、d和t均为烟雾指数。需要说明的是,第一约束关系中烟雾程度指数与镜头脏污提升指数呈正比,物质与镜头的距离值与镜头脏污提升指数呈反比,烟雾从产生到消失的时长与镜头脏污提升指数呈正比。Among them, the first constraint relationship is satisfied between the smoke index and the lens dirty lifting index: m=f(a, t, d), m represents the lens dirty lifting index, a represents the smoke degree index, and d represents the distance between the substance and the lens. The value, t, represents the length of time from the generation to the disappearance of smoke. Among them, a, d and t are smoke indices. It should be noted that the smoke degree index in the first constraint relationship is proportional to the lens soil growth index. The distance between the material and the lens is inversely proportional to the lens soil growth index. The time from the generation to the disappearance of the smoke and the lens pollution increase index It is proportional.
其中,信噪比与脏污可能性指数之间满足第二约束关系:n=f(sn),n表示脏污可能性指数,sn表示信噪比。第二约束关系中信噪比与脏污可能性指数呈反比。Wherein, the second constraint relationship is satisfied between the signal-to-noise ratio and the pollution possibility index: n=f(sn), n represents a pollution possibility index, and sn represents a signal-to-noise ratio. The signal-to-noise ratio is inversely proportional to the probability of contamination in the second constraint relationship.
需要说明的是,在第二约束关系中,设置有信噪比的临界值,sn与信噪比临界值相等时,n=0,说明镜头脏污可能性为零;sn小于信噪比临界值时,n为正数,sn越小n越大,说明镜头脏污可能性越高;sn大于信噪比临界值时,n为负数,sn越大n越小,说明镜头脏污可能性越低。该信噪比临界值可以通过多次试验确定,也可以是人为设置的经验值,具体不做限制。It should be noted that, in the second constraint relationship, the threshold value of the signal-to-noise ratio is set, and when sn and the signal-to-noise ratio threshold are equal, n=0, indicating that the lens is less likely to be dirty; sn is smaller than the signal-to-noise ratio threshold. When the value is n, n is a positive number. The smaller the sn is, the larger n is, which indicates that the lens is more likely to be dirty. When sn is greater than the signal-to-noise ratio threshold, n is a negative number. The larger the sn is, the smaller n is, indicating the possibility of lens contamination. The lower. The signal-to-noise ratio threshold can be determined by multiple experiments, or it can be an artificially set empirical value, and is not limited.
具体实现中,以拉曼检测终端为例,在激光透镜的同一水平面上设置一摄像头,如图2所示,光学检测设备10中摄像头20和激光透镜30位于同一水平面,物质40位于激光透镜30焦点位置。该摄像头与检测设备发出的激光光轴的倾角可为任意角度,该摄像头与激光透镜的位置不做限制,但摄像头的拍摄范围内包含有激光对焦点以及激光对焦点周边一定范围。In a specific implementation, a Raman detecting terminal is taken as an example, and a camera is disposed on the same horizontal surface of the laser lens. As shown in FIG. 2, the camera 20 and the laser lens 30 are located at the same horizontal plane in the optical detecting device 10, and the substance 40 is located in the laser lens 30. Focus position. The tilt angle of the laser optical axis emitted by the camera and the detecting device can be any angle, and the position of the camera and the laser lens is not limited, but the shooting range of the camera includes a laser focus point and a certain range around the laser focus point.
值得一提的是,光学检测设备在检测到物质有烟雾产生时,该光学检测设备可降低激光的光功率,并发出物质产生烟雾的提示,具体提示方式包括但不限于以下几种:物质可能为深色,受到激光照射产生烟雾;或提示物质为易燃物。例如,用户可根据烟雾程度指数设置报警烟雾等级,若设定烟雾程度指数等于3时为报警烟雾等级,在光学检测设备检测到有烟雾产生时,判断该烟雾程度指数是否大于报警烟雾等级,在烟雾程度指数大于报警烟雾等级时发出提示。另外,还可根据物质与镜头的距离值设置烟雾报警等级,具体不做限制。It is worth mentioning that when the optical detecting device detects the smoke generation of the material, the optical detecting device can reduce the optical power of the laser and issue a prompt for the substance to generate smoke, and the specific prompting manners include but are not limited to the following: the substance may It is dark, exposed to light by laser; or the substance is flammable. For example, the user can set the alarm smoke level according to the smoke level index. If the smoke level index is equal to 3, the alarm smoke level is set. When the optical detection device detects the occurrence of smoke, it is determined whether the smoke level index is greater than the alarm smoke level. A prompt is issued when the smoke level index is greater than the alarm smoke level. In addition, the smoke alarm level can be set according to the distance between the substance and the lens, and there is no limitation.
可以理解的是,检测过程中确定物质产生烟雾需要通过检测装置完成,如,该光学检测设备用于放置待检测的物质的置物台周边设置有烟雾探测器,用于检测物质是否产生烟雾。或者,在该光学检测设备的透镜的周边设置摄像头,通过检测摄像头拍摄的图像判断物质是否产生烟雾。也就是说,上述通过摄像头获取烟雾指数的方式是一种举例说明,实际也可在该光学检测设备上设置其他传感器,直接通过设置的传感器检测烟雾指数,检测烟雾指数的具体方式可根据实际需要调整,此处不做限制。It can be understood that determining the substance to generate smoke during the detection process needs to be completed by the detecting device. For example, the optical detecting device is provided with a smoke detector around the stage for placing the substance to be detected for detecting whether the substance generates smoke. Alternatively, a camera is provided around the lens of the optical detecting device, and it is determined whether or not the substance generates smoke by detecting an image taken by the camera. That is to say, the above manner of obtaining the smoke index through the camera is an example. Actually, other sensors may be disposed on the optical detecting device, and the smoke index is directly detected by the set sensor, and the specific manner of detecting the smoke index may be according to actual needs. Adjustment, no restrictions here.
值得一提的是,若该光学检测设备设置有摄像头,分析摄像头拍摄的图像可由光学检测设备的处理器进行对比处理,确定烟雾指数,或者,在该光学检测设备上设置通讯装置,与远程服务器连接,通过远程服务器处理摄像头拍摄的图像获得烟雾指数。需要说明的是,对于如何处理摄像头拍摄图像,本申请不做限制。It is worth mentioning that if the optical detecting device is provided with a camera, the image taken by the analyzing camera can be compared and processed by the processor of the optical detecting device to determine the smoke index, or the communication device is set on the optical detecting device, and the remote server Connected, the image taken by the camera is processed by the remote server to obtain the smoke index. It should be noted that the present application does not limit how to process the camera to capture images.
需要说明的是,若光学检测设备中不包括能够识别烟雾的传感器或其他元件,则该光学检测设备可选择获取脏污可能性指数去更新镜头脏污指数。It should be noted that if the optical detecting device does not include a sensor or other component capable of recognizing the smoke, the optical detecting device may select to obtain a dirtyness possibility index to update the lens dirty index.
在光学检测设备检测物质时,为了保证得到物质光谱准确可靠,需要确定物质位于镜头的焦点位置。以具有摄像头的光学检测设备为例,设备在打开激光的同时,开启摄像头,通过摄像头拍摄激光光斑的图像,如图3所示,若物质处于激光光斑之内,且激光光斑的直径小于预设值,则说明物质位于该光学检测设备的焦点位置;或者,该光学检测设备设置有其他的测距装置,能够检测物质与镜头的距离值,需要说明的是,由于镜头已确定,则该镜头的焦点也是确定的,也就是说焦点到透镜的距离值是固定的,则通过测距装置获取到物质与透镜的距离值之后,根据该距离值判断物质是否位于透镜的焦点位置。When the optical detection device detects a substance, in order to ensure that the spectrum of the obtained substance is accurate and reliable, it is necessary to determine that the substance is at the focus position of the lens. Taking an optical detecting device with a camera as an example, the device turns on the camera while turning on the laser, and images the laser spot through the camera, as shown in FIG. 3, if the substance is within the laser spot, and the diameter of the laser spot is smaller than the preset. The value indicates that the substance is located at the focus position of the optical detecting device; or the optical detecting device is provided with other ranging devices capable of detecting the distance between the substance and the lens. It should be noted that since the lens is determined, the lens is The focus is also determined, that is, the distance from the focus to the lens is fixed, and after the distance value between the substance and the lens is acquired by the distance measuring device, whether the substance is located at the focus position of the lens is determined according to the distance value.
具体的说,上述具体实现中,激光光斑的直径可设置一个较小的取值范围,当激光光斑直径在该取值范围之内,均判定物质位于激光焦点位置,物质放置正确。上述通过摄像头或测距装置确定物质放置正确的方式均是举例说明,实际还可根据物质特性或其他机械结构确定物质正确放置,此处不做具体限定。Specifically, in the above specific implementation, the diameter of the laser spot can be set to a small value range. When the laser spot diameter is within the range of values, the substance is determined to be at the laser focus position, and the substance is placed correctly. The above manner of determining the correct placement of the substance by the camera or the distance measuring device is an example. Actually, the substance may be correctly placed according to the material characteristics or other mechanical structures, and is not specifically limited herein.
具体的说,获取信噪比是在物质光谱收集结束后,根据收集的光谱确定信噪比,并根据该信噪比更新镜头脏污指数,因此,更新镜头脏污指数是在物质检测完成之后,以便用户了解检测完成之后的镜头的脏污程度。Specifically, the signal-to-noise ratio is obtained after the material spectrum is collected, the signal-to-noise ratio is determined according to the collected spectrum, and the lens dirty index is updated according to the signal-to-noise ratio. Therefore, updating the lens dirty index is after the substance detection is completed. In order to let the user know the degree of contamination of the lens after the detection is completed.
值得一提的是,在获得物质光谱之后,将物质光谱通过预处理算法进行处理,如进行去噪归一化等处理,调用光谱匹配算法得到物质名称和属性,并将物质名称和物质属性等光谱处理结果显示给用户。具体如何处理物质光谱并获得物质名称和物质属性,本申请中不做具体说明。It is worth mentioning that after obtaining the material spectrum, the material spectrum is processed by a preprocessing algorithm, such as performing denoising normalization, calling the spectral matching algorithm to obtain the substance name and attribute, and the substance name and material attribute, etc. The results of the spectral processing are displayed to the user. How to deal with the material spectrum and obtain the substance name and material property are not specifically described in this application.
相对于现有技术而言,本申请部分实施例中在检测物质的光谱的过程中,获取影响镜头脏污指数的脏污因素,根据本次检测获得的脏污因素更新镜头脏污指数,从而使得能够通过该镜头脏污指数判断镜头的脏污程度,以便于提示用户及时清洁镜头,提高了该光学检测设备的智能程度,且为使用者带来良好的用户体验。In the process of detecting the spectrum of the substance in some embodiments of the present application, the dirty factor affecting the lens dirty index is obtained, and the lens dirty index is updated according to the dirty factor obtained by the detection, thereby The lens can be judged to be dirty by the lens dirty index, so as to prompt the user to clean the lens in time, the intelligence of the optical detecting device is improved, and the user is provided with a good user experience.
本申请的第二实施例涉及一种检测镜头的方法,第二实施例与第一实施例大致相同,主要区别之处在于,具体说明了确定该光学检测设备的脏污程度的实现方式,具体流程如图4所示。The second embodiment of the present application relates to a method for detecting a lens. The second embodiment is substantially the same as the first embodiment. The main difference is that the implementation manner for determining the degree of contamination of the optical detecting device is specifically described. The process is shown in Figure 4.
需要说明的是,本实施例中包括步骤201至步骤204,其中,步骤203和步骤204与第一实施中的步骤101和步骤102大致相同,此处不再赘述,下面主要说明不同之处,未在本实施方式中详尽描述的技术细节,可参见第一实施例,此处不再赘述。It should be noted that, in this embodiment, step 201 to step 204 are included, where step 203 and step 204 are substantially the same as steps 101 and 102 in the first embodiment, and details are not described herein again. For details of the technical details that are not described in detail in this embodiment, refer to the first embodiment, and details are not described herein again.
步骤201:将镜头脏污指数与门限值比较,获得比较结果。Step 201: Compare the lens dirty index with a threshold value to obtain a comparison result.
需要说明的是,上述的门限值可以是用户根据经验自行设置在该光学检测设备中的。It should be noted that the foregoing threshold value may be set by the user according to experience in the optical detecting device.
具体的,镜头脏污指数可以是刚打开光学检测设备时,该光学检测设备给出的预设的镜头脏污指数,或者是上一次完成物质检测之后的更新的镜头脏污指数。Specifically, the lens dirty index may be a preset lens dirty index given by the optical detecting device just after the optical detecting device is turned on, or an updated lens dirty index after the last time the substance detecting is completed.
步骤202:若确定比较结果指示镜头需要清洁,则发出需要清洁镜头的提示。Step 202: If it is determined that the comparison result indicates that the lens needs to be cleaned, a prompt to clean the lens is issued.
具体的,在光学检测设备启动之后,检测物质光谱之前,为了保证获得的物质光谱准确可靠,根据门限值确定镜头脏污程度。在镜头脏污指数大于门限值时,表示镜头需要清洁,该光学检测设备发出需要清洁镜头的提示。需要说明的是,在镜头脏污指数与门限值比较之后,若确定镜头不需要清洁,则直接进行物质检测。Specifically, before the optical detecting device is started, before the spectrum of the substance is detected, in order to ensure that the obtained material spectrum is accurate and reliable, the degree of lens contamination is determined according to the threshold value. When the lens dirty index is greater than the threshold value, it indicates that the lens needs to be cleaned, and the optical detecting device issues a prompt to clean the lens. It should be noted that after the lens dirty index is compared with the threshold value, if it is determined that the lens does not need to be cleaned, the substance detection is directly performed.
另外,该光学检测设备发出需要清洁镜头的提示时,若获取到擦拭镜头的指令,则将镜头脏污指数更新为初始值;若未获取到擦拭镜头的指令,则直接进行物质的光谱检测。需要说明的是,该光学检测设备通过提示使用户在检测物质光谱之前了解到当前镜头的脏污程度,并进行处理进而保证后续检测时能正确识别物质。In addition, when the optical detecting device issues a prompt to clean the lens, if the command to wipe the lens is obtained, the lens dirty index is updated to an initial value; if the command to wipe the lens is not obtained, the spectral detection of the substance is directly performed. It should be noted that the optical detecting device prompts the user to know the degree of contamination of the current lens before detecting the spectrum of the substance, and performs processing to ensure that the substance can be correctly identified in the subsequent detection.
值得一提的是,上述步骤201和步骤202可以在检测物质之前执行,也可以在物质检测完成之后执行,若在物质检测完成之后,光学检测设备的镜头脏污指数大于门限值,发出需要清洁镜头的提示,若用户并未选择清洁镜头,则保存该更新的镜头脏污值,并在下一次开机检测时执行步骤201和步骤202。It is worth mentioning that the above steps 201 and 202 can be performed before the detection of the substance, or after the substance detection is completed. If the lens detection index of the optical detection device is greater than the threshold after the substance detection is completed, the need is issued. The prompt for cleaning the lens, if the user does not choose to clean the lens, saves the updated lens dirty value, and performs steps 201 and 202 at the next power-on detection.
一个具体实现中,在物质检测完成之后上述步骤201和步骤202,若光学检测设备在开启时的镜头脏污指数小于门限值,则更新镜头脏污指数可表示为i=m+n+i 0 ,其中,i 0表示开机时获取的镜头脏污指数,m表示镜头脏污提升指数,n表示脏污可能性指数,i表示更新的镜头脏污指数。判断
Figure 516563dest_path_image001
与门限值的大小关系,并根据判断结果发出清洁镜头的提示,一般情况下,i≥0,若出现,则m+n+i 0<0将镜头脏污指数设置为零。
In a specific implementation, after the substance detection is completed, the above steps 201 and 202, if the lens dirty index of the optical detecting device is less than the threshold value, the updated lens dirty index can be expressed as i=m+n+i 0 , where i 0 represents the lens dirty index obtained at power-on, m represents the lens dirty lifting index, n represents the dirty possibility index, and i represents the updated lens dirty index. Judge
Figure 516563dest_path_image001
According to the size of the threshold value, and according to the judgment result, the prompt for cleaning the lens is issued. In general, i≥0, if it appears, m+n+i 0 <0 sets the lens dirty index to zero.
上述具体实现中,设置i 0为零,n也为零,若m的值大于门限值,则说明该光学物质检测中物质有产生近距离长时间的烟雾,而造成镜片脏污程度较高,即,物质与镜片的距离值较近,烟雾从产生到消失的时长较长,烟雾指数较高。设置i 0为零,m也为零,若获得的n为负数,则n的绝对值为正数,可能大于门限值,也就是说,单次获得的信噪比表明镜片脏污程度低;需要说明的是,n若为正数,由于用户操作正确性的判断不一定完全准确,且影响信噪比的原因较多,出现一次获得的n大于门限值时,需要再次获取信噪比确定n,不能仅根据一次的信噪比就确定镜头脏污。 In the above specific implementation, i 0 is set to zero, and n is also zero. If the value of m is greater than the threshold value, it means that the material in the optical substance detection has a long-distance smoke, and the lens is highly dirty. That is, the distance between the substance and the lens is relatively close, the duration of the smoke from the generation to the disappearance is longer, and the smoke index is higher. Set i 0 to zero, m is also zero. If n is negative, the absolute value of n is positive, which may be greater than the threshold. That is, the signal-to-noise ratio obtained in a single time indicates that the lens is dirty. It should be noted that if n is a positive number, the judgment of the correctness of the user operation may not be completely accurate, and there are many reasons for affecting the signal-to-noise ratio. When the obtained n is greater than the threshold value, the signal noise needs to be acquired again. The ratio of n is determined, and the lens contamination cannot be determined based only on the signal-to-noise ratio of one time.
与现有技术相比,本实施例提供的检测镜头的方法,根据门限值判断镜头的脏污程度,使得镜头脏污程度的判断更为可靠,保证在良好的检测环境中进行物质检测,进而使得到的物质光谱更可靠准确。Compared with the prior art, the method for detecting a lens provided by the embodiment determines the degree of contamination of the lens according to the threshold value, so that the judgment of the degree of dirtiness of the lens is more reliable, and the substance detection is performed in a good detection environment. In turn, the resulting material spectrum is more reliable and accurate.
本申请的第三实施例涉及一种检测镜头的装置,包括:获取模块501和更新模块502,其结构框图如图5。A third embodiment of the present application relates to an apparatus for detecting a lens, comprising: an obtaining module 501 and an updating module 502, and a structural block diagram thereof is shown in FIG. 5.
获取模块501,用于在检测物质的光谱的过程中,获取影响镜头脏污指数的脏污因素。The obtaining module 501 is configured to obtain a dirty factor that affects the lens dirty index during the process of detecting the spectrum of the substance.
更新模块502,用于根据脏污因素更新镜头脏污指数,其中,镜头脏污指数用于表示镜头的脏污程度。The update module 502 is configured to update the lens dirty index according to the dirty factor, wherein the lens dirty index is used to indicate the degree of dirt of the lens.
需要说明的是,该检测镜头的装置还包括:比较模块、提示模块和确定模块;比较模块用于,将镜头脏污指数与门限值比较,获得比较结果;提示模块用于,若确定比较结果指示镜头需要清洁,则发出需要清洁镜头的提示;确定模块用于,确定物质位于镜头的焦点位置。It should be noted that the apparatus for detecting a lens further includes: a comparison module, a prompting module, and a determining module; the comparing module is configured to compare the lens dirty index with a threshold value to obtain a comparison result; and the prompting module is configured to: if the comparison is determined The result indicates that the lens needs to be cleaned, and a prompt is required to clean the lens; the determination module is used to determine that the substance is at the focus of the lens.
具体的,脏污因素包括镜头脏污提升指数和/或脏污可能性指数;获取模块具体用于,在检测过程中确定物质产生烟雾并获取烟雾指数,根据烟雾指数确定镜头脏污提升指数;和/或,获取检测得到的物质的光谱,分析并确定光谱的信噪比,根据信噪比确定脏污可能性指数。Specifically, the dirty factor includes a lens dirty lifting index and/or a dirt possibility index; the obtaining module is specifically configured to determine a substance generating smoke and obtain a smoke index during the detecting process, and determine a lens dirty lifting index according to the smoke index; And/or, obtaining the spectrum of the detected substance, analyzing and determining the signal-to-noise ratio of the spectrum, and determining the soiling possibility index according to the signal-to-noise ratio.
本实施例是与上述检测镜头的方法对应的虚拟装置实施例,上述方法实施例中技术细节在本实施例中依然适用,此处不再赘述。This embodiment is a virtual device embodiment corresponding to the method for detecting a lens. The technical details in the foregoing method embodiments are still applicable in this embodiment, and details are not described herein again.
需要说明的是,以上所述的装置实施例仅仅是示意性的,并不对本申请的保护范围构成限定,在实际应用中,本领域的技术人员可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的,此处不做限制。It should be noted that the foregoing device embodiments are merely illustrative and do not limit the scope of protection of the present application. In practical applications, those skilled in the art may select some or all of the modules according to actual needs. To achieve the purpose of the solution of the embodiment, no limitation is made herein.
本申请的第四实施例涉及一种电子设备,其结构如图6所示。包括:至少一个处理器601;以及,与至少一个处理器601通信连接的存储器602。A fourth embodiment of the present application relates to an electronic device having a structure as shown in FIG. The method includes: at least one processor 601; and a memory 602 communicatively coupled to the at least one processor 601.
具体的,存储器602存储有可被至少一个处理器601执行的指令。In particular, memory 602 stores instructions that are executable by at least one processor 601.
具体的,处理器601用于执行该存储器中存储的指令。Specifically, the processor 601 is configured to execute an instruction stored in the memory.
具体的,处理器601还用于执行第一和第二实施例中有关检测镜头的方法。Specifically, the processor 601 is further configured to execute the method for detecting a lens in the first and second embodiments.
具体的,处理器601用于:在检测物质的光谱的过程中,获取影响镜头脏污指数的脏污因素;根据脏污因素更新镜头脏污指数,其中,镜头脏污指数用于表示镜头的脏污程度。Specifically, the processor 601 is configured to: in the process of detecting a spectrum of the substance, obtain a dirty factor that affects a lens dirty index; and update a lens dirty index according to the dirty factor, wherein the lens dirty index is used to represent the lens The degree of soiling.
需要说明的是,本实施例中的处理器能够执行上述的方法实施例中实施步骤,具体的执行功能并未详细说明,可参见方法实施例中的技术细节,此处不再赘述。It should be noted that the processor in this embodiment can perform the steps in the foregoing method embodiments, and the specific implementation functions are not described in detail. For details, refer to the technical details in the method embodiments, and details are not described herein.
本申请的第五实施例涉及一种计算机可读存储介质,该可读存储介质为计算机可读存储介质,该计算机可读存储介质中存储有计算机指令,该计算机指令使计算机能够执行本申请第一或第二方法实施例中涉及的镜头检测的方法。A fifth embodiment of the present application is directed to a computer readable storage medium, which is a computer readable storage medium having stored therein computer instructions that enable a computer to perform the present application A method of lens detection involved in one or second method embodiments.
需要说明的是,本领域的技术人员能够理解,上述实施例中显示方法是通过程序来指令相关的硬件来完成的,该程序存储在一个存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random-Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。It should be noted that those skilled in the art can understand that the display method in the above embodiment is completed by a program instructing related hardware, and the program is stored in a storage medium, and includes a plurality of instructions for making a device (may be It is a single chip, a chip, etc. or a processor that performs all or part of the steps of the methods described in various embodiments of the present application. The foregoing storage medium includes: a USB flash drive, a mobile hard disk, a read-only memory (ROM), and a random access memory (RAM, Random-Access). A variety of media that can store program code, such as a memory, a disk, or an optical disk.
本领域的普通技术人员可以理解,上述各实施例是实现本申请的具体实施例,而在实际应用中,可以在形式上和细节上对其作各种改变,而不偏离本申请的精神和范围。A person skilled in the art can understand that the above embodiments are specific embodiments of the present application, and various changes can be made in the form and details without departing from the spirit and scope of the application. range.

Claims (12)

  1. 一种检测镜头的方法,其中,应用于具有镜头的光学检测设备,包括:A method of detecting a lens, wherein the method is applied to an optical detecting device having a lens, comprising:
    在检测物质的光谱的过程中,获取影响镜头脏污指数的脏污因素;In the process of detecting the spectrum of the substance, obtaining a dirty factor that affects the lens dirty index;
    根据所述脏污因素更新所述镜头脏污指数,其中,所述镜头脏污指数用于表示镜头的脏污程度。The lens dirty index is updated according to the dirty factor, wherein the lens dirty index is used to indicate the degree of soiling of the lens.
  2. 根据权利要求1所述的检测镜头的方法,其中,所述获取影响镜头脏污指数的脏污因素之前,所述检测镜头的方法包括:The method of detecting a lens according to claim 1, wherein the method of detecting a lens comprises: before the obtaining a dirty factor affecting a lens dirty index:
    将所述镜头脏污指数与门限值比较,获得比较结果;Comparing the lens dirty index with a threshold value to obtain a comparison result;
    若确定所述比较结果指示所述镜头需要清洁,则发出需要清洁所述镜头的提示。If it is determined that the comparison result indicates that the lens needs to be cleaned, a prompt to clean the lens is issued.
  3. 根据权利要求2所述的检测镜头的方法,其中,所述发出需要清洁所述镜头的提示之后,所述获取影响镜头脏污指数的脏污因素之前,所述检测镜头的方法还包括:The method of detecting a lens according to claim 2, wherein the method for detecting a lens further comprises: after the prompting the cleaning of the lens, the obtaining a dirty factor affecting a lens dirty index, the method further comprising:
    若获取到擦拭所述镜头的指令,则将所述镜头脏污指数更新为初始值。If an instruction to wipe the lens is obtained, the lens dirty index is updated to an initial value.
  4. 根据权利要求2或3所述的检测镜头的方法,其中,所述脏污因素包括镜头脏污提升指数和/或脏污可能性指数;The method of detecting a lens according to claim 2 or 3, wherein the contamination factor comprises a lens dirtyness increase index and/or a soiling possibility index;
    所述获取影响镜头脏污指数的脏污因素,包括:The obtaining the dirty factors affecting the lens dirty index includes:
    在检测过程中确定所述物质产生烟雾并获取烟雾指数,根据所述烟雾指数确定所述镜头脏污提升指数;Determining, during the detecting process, that the substance generates smoke and obtaining a smoke index, and determining the lens dirtyness increase index according to the smoke index;
    和/或,and / or,
    获取检测得到的所述物质的光谱,分析并确定所述光谱的信噪比,根据所述信噪比确定所述脏污可能性指数。Obtaining a spectrum of the detected substance, analyzing and determining a signal-to-noise ratio of the spectrum, and determining the soiling probability index according to the signal-to-noise ratio.
  5. 根据权利要求4所述的检测镜头的方法,其中,所述烟雾指数包括烟雾程度指数、所述物质与所述镜头的距离值和烟雾从产生到消失的时长;The method of detecting a lens according to claim 4, wherein said smoke index comprises a smoke degree index, a distance value of said substance from said lens, and a duration of time from generation to disappearance of smoke;
    所述在检测过程中确定所述物质产生烟雾并获取烟雾指数,包括:The determining that the substance produces smoke and obtaining a smoke index during the detecting process comprises:
    获取所述光学检测设备上摄像头拍摄的所述物质的图像;Obtaining an image of the substance photographed by a camera on the optical detecting device;
    通过分析所述图像确定所述物质产生烟雾,并通过分析所述图像获取所述烟雾程度指数、所述物质与所述镜头的距离值以及烟雾从产生到消失的时长。The substance is determined to produce smoke by analyzing the image, and the smoke degree index, the distance value of the substance from the lens, and the length of time from the generation to the disappearance of the smoke are obtained by analyzing the image.
  6. 根据权利要求5所述的检测镜头的方法,其中,所述根据所述烟雾指数确定所述镜头脏污提升指数,包括:The method of detecting a lens according to claim 5, wherein the determining the lens dirtyness improvement index according to the smoke index comprises:
    根据所述烟雾指数与所述镜头脏污提升指数之间满足的第一约束关系,确定所述镜头脏污提升指数;Determining the lens dirtyness improvement index according to a first constraint relationship that is satisfied between the smoke index and the lens dirtyness increase index;
    其中,所述第一约束关系中所述烟雾程度指数与所述镜头脏污提升指数呈正比,所述物质与所述镜头的距离值与所述镜头脏污提升指数呈反比,所述烟雾从产生到消失的时长与所述镜头脏污提升指数呈正比。Wherein the smoke degree index in the first constraint relationship is proportional to the lens dirtyness increase index, and the distance value of the substance from the lens is inversely proportional to the lens dirtyness increase index, the smoke is from The length of time until it disappears is proportional to the lens's dirtyness increase index.
  7. 根据权利要求4所述的检测镜头的方法,其中,所述根据所述信噪比确定所述脏污可能性指数,包括:The method of detecting a lens according to claim 4, wherein the determining the dirt likelihood index according to the signal to noise ratio comprises:
    根据所述信噪比与所述脏污可能性指数之间满足的第二约束关系,确定所述脏污可能性指数;Determining the soiling possibility index according to a second constraint relationship between the signal to noise ratio and the dirt likelihood index;
    其中,所述第二约束关系中所述信噪比与所述脏污可能性指数呈反比。The signal-to-noise ratio in the second constraint relationship is inversely proportional to the dirt probability index.
  8. 根据权利要求3所述的检测镜头的方法,其中,所述根据所述脏污因素更新所述镜头脏污指数,包括:The method of detecting a lens according to claim 3, wherein the updating the lens dirty index according to the dirty factor comprises:
    计算所述镜头脏污指数与所述脏污因素之和,将所述镜头脏污指数的取值更新为所得的和值。Calculating the sum of the lens dirty index and the dirty factor, and updating the value of the lens dirty index to the obtained sum value.
  9. 根据权利要求1所述的检测镜头状况的方法,其中,所述获取影响镜头脏污指数的脏污因素之前,所述检测镜头状况的方法包括:The method of detecting a condition of a lens according to claim 1, wherein the method of detecting a condition of the lens comprises: before the obtaining a dirty factor that affects a dirty index of the lens:
    确定所述物质位于所述镜头的焦点位置。It is determined that the substance is at a focus position of the lens.
  10. 一种检测镜头的装置,其中,包括:A device for detecting a lens, comprising:
    获取模块,用于在检测物质的光谱的过程中,获取影响镜头脏污指数的脏污因素;Obtaining a module for obtaining a dirty factor affecting a lens dirty index in the process of detecting a spectrum of the substance;
    更新模块,用于根据所述脏污因素更新所述镜头脏污指数,其中,所述镜头脏污指数用于表示镜头的脏污程度。And an update module, configured to update the lens dirty index according to the dirty factor, wherein the lens dirty index is used to indicate the degree of soiling of the lens.
  11. 一种电子设备,其中,包括:An electronic device, comprising:
    至少一个处理器;以及,At least one processor; and,
    与所述至少一个处理器通信连接的存储器;其中,a memory communicatively coupled to the at least one processor; wherein
    所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行如权利要求1~9任一项所述的检测镜头的方法。The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-9 The method of detecting the lens.
  12. 一种计算机可读存储介质,存储有计算机程序,其中,所述计算机程序被处理器执行时实现权利要求1~9任一项所述的检测镜头的方法。A computer readable storage medium storing a computer program, wherein the computer program is executed by a processor to implement the method of detecting a lens according to any one of claims 1 to 9.
PCT/CN2018/081181 2018-03-29 2018-03-29 Lens detection method and apparatus, electronic device, and computer readable storage medium WO2019183902A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2018/081181 WO2019183902A1 (en) 2018-03-29 2018-03-29 Lens detection method and apparatus, electronic device, and computer readable storage medium
CN201880001153.4A CN108780050B (en) 2018-03-29 2018-03-29 Method and device for detecting lens, electronic equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/081181 WO2019183902A1 (en) 2018-03-29 2018-03-29 Lens detection method and apparatus, electronic device, and computer readable storage medium

Publications (1)

Publication Number Publication Date
WO2019183902A1 true WO2019183902A1 (en) 2019-10-03

Family

ID=64029124

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/081181 WO2019183902A1 (en) 2018-03-29 2018-03-29 Lens detection method and apparatus, electronic device, and computer readable storage medium

Country Status (2)

Country Link
CN (1) CN108780050B (en)
WO (1) WO2019183902A1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111524125A (en) * 2020-04-28 2020-08-11 北京海益同展信息科技有限公司 Equipment cleaning method, device and system, electronic equipment and storage medium
CN111970506A (en) * 2020-10-20 2020-11-20 常州市瑞泰光电有限公司 Lens dirt detection method, device and equipment
CN114589160A (en) * 2022-01-25 2022-06-07 深圳大方智能科技有限公司 Camera protection method for indoor construction
CN114732323A (en) * 2022-03-31 2022-07-12 云鲸智能(深圳)有限公司 Sewage detection method and device, cleaning equipment and storage medium
CN117007529A (en) * 2023-10-07 2023-11-07 哈尔滨海鸿基业科技发展有限公司 Quick auto-focusing microscopic Raman spectrum diagnostic apparatus

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112702488B (en) * 2020-12-24 2022-06-24 上海炬佑智能科技有限公司 Test structural part, ToF device and lens contamination detection method
CN114531542A (en) * 2022-01-18 2022-05-24 华为技术有限公司 Lens contamination detection method and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008268055A (en) * 2007-04-23 2008-11-06 Olympus Corp Foreign material inspecting device, and foreign material inspection method
CN201562117U (en) * 2009-11-06 2010-08-25 天津三星光电子有限公司 Digital camera having automatic lens cleaning function
CN106575366A (en) * 2014-07-04 2017-04-19 光实验室股份有限公司 Methods and apparatus relating to detection and/or indicating a dirty lens condition
CN107749918A (en) * 2017-09-14 2018-03-02 深圳天珑无线科技有限公司 User is prompted to wipe method, mobile terminal and the storage medium of camera lens

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN2793773Y (en) * 2004-08-06 2006-07-05 英保达股份有限公司 Lens cleaner of camera equipment
JP2007215151A (en) * 2006-01-12 2007-08-23 Canon Inc Imaging apparatus, control method thereof, and program
CN101206180B (en) * 2006-12-20 2010-09-29 鸿富锦精密工业(深圳)有限公司 Lens module detecting device and detecting method
JP4328359B2 (en) * 2007-01-15 2009-09-09 オリンパス株式会社 Observation device with immersion objective
JP5953658B2 (en) * 2011-05-25 2016-07-20 ソニー株式会社 ROBOT CONTROL DEVICE, ROBOT DEVICE CONTROL METHOD, COMPUTER PROGRAM, PROGRAM STORAGE MEDIUM, AND ROBOT DEVICE
CN103986855B (en) * 2014-03-19 2017-05-17 北京天地玛珂电液控制系统有限公司 Coal mine fully mechanized coal mining face vidicon having automatic dust removal function
US9538170B1 (en) * 2015-09-08 2017-01-03 Hon Hai Precision Co., Ltd. Camera lens cleaning system and method of using same
CN105915840B (en) * 2016-04-05 2019-04-30 三峡大学 A method of the factory smoke discharge based on vision signal monitors automatically
CN106254861A (en) * 2016-07-26 2016-12-21 乐视控股(北京)有限公司 The method of inspection of photographic head and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008268055A (en) * 2007-04-23 2008-11-06 Olympus Corp Foreign material inspecting device, and foreign material inspection method
CN201562117U (en) * 2009-11-06 2010-08-25 天津三星光电子有限公司 Digital camera having automatic lens cleaning function
CN106575366A (en) * 2014-07-04 2017-04-19 光实验室股份有限公司 Methods and apparatus relating to detection and/or indicating a dirty lens condition
CN107749918A (en) * 2017-09-14 2018-03-02 深圳天珑无线科技有限公司 User is prompted to wipe method, mobile terminal and the storage medium of camera lens

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111524125A (en) * 2020-04-28 2020-08-11 北京海益同展信息科技有限公司 Equipment cleaning method, device and system, electronic equipment and storage medium
CN111524125B (en) * 2020-04-28 2023-09-01 京东科技信息技术有限公司 Equipment cleaning method, device, system, electronic equipment and storage medium
CN111970506A (en) * 2020-10-20 2020-11-20 常州市瑞泰光电有限公司 Lens dirt detection method, device and equipment
CN114589160A (en) * 2022-01-25 2022-06-07 深圳大方智能科技有限公司 Camera protection method for indoor construction
CN114589160B (en) * 2022-01-25 2023-05-16 深圳大方智能科技有限公司 Camera protection method for indoor construction
CN114732323A (en) * 2022-03-31 2022-07-12 云鲸智能(深圳)有限公司 Sewage detection method and device, cleaning equipment and storage medium
CN114732323B (en) * 2022-03-31 2023-07-14 云鲸智能(深圳)有限公司 Sewage detection method, device, cleaning equipment and storage medium
CN117007529A (en) * 2023-10-07 2023-11-07 哈尔滨海鸿基业科技发展有限公司 Quick auto-focusing microscopic Raman spectrum diagnostic apparatus
CN117007529B (en) * 2023-10-07 2024-01-12 哈尔滨海鸿基业科技发展有限公司 Quick auto-focusing microscopic Raman spectrum diagnostic apparatus

Also Published As

Publication number Publication date
CN108780050B (en) 2020-10-09
CN108780050A (en) 2018-11-09

Similar Documents

Publication Publication Date Title
WO2019183902A1 (en) Lens detection method and apparatus, electronic device, and computer readable storage medium
US9420276B2 (en) Calibration of light-field camera geometry via robust fitting
JP4644283B2 (en) Dirt detection method
JP5691669B2 (en) Biological information processing apparatus, biological information processing method, and biological information processing program
CN109781733A (en) Flaw detection apparatus, defect detecting method and computer readable storage medium
CN108229480A (en) A kind of recognition methods, device and the equipment of number meter reading
CN110059579B (en) Method and apparatus for in vivo testing, electronic device, and storage medium
WO2017114368A1 (en) Method and device for processing photosensitive quality of camera module, and storage medium
TW201421990A (en) Device, method and computer readable storage medium thereof for detecting object
JP6616906B1 (en) Detection device and detection system for defective photographing data
JP6579350B2 (en) Defocus estimation from single image based on Laplacian of Gaussian approximation
CN109753886B (en) Face image evaluation method, device and equipment
WO2020062803A1 (en) Abnormal traffic analysis method and apparatus based on model tree algorithm, and electronic device and non-volatile readable storage medium
CN113902652A (en) Speckle image correction method, depth calculation method, device, medium, and apparatus
JP2012163777A (en) Image processing device, imaging device and program
CN109040724B (en) Light spot distortion detection method and device of structured light projector and readable storage medium
CN115937324B (en) Assembly quality evaluation method, device, equipment and storage medium
CN116168030A (en) Pole piece defect detection method and device, electronic equipment and storage medium
TWI751184B (en) Methods of generating three-dimensional (3-d) information of a sample and three-dimensional (3-d) measurement systems
CN113096024B (en) Flying spot removing method for depth data, system and electronic equipment thereof
JP2011029710A (en) Image processor, image processing program, and imaging apparatus
JP2020021314A (en) Image processing system and image processing method
US11821808B2 (en) Signature recognition on optical-fiber connector endfaces
CN111767829B (en) Living body detection method, device, system and storage medium
CN111062887B (en) Image definition judging method based on improved Retinex algorithm

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

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 1205 DATED 02/02/2021)

122 Ep: pct application non-entry in european phase

Ref document number: 18911810

Country of ref document: EP

Kind code of ref document: A1