CN112747906B - Light source detection method, detection device and readable storage medium - Google Patents

Light source detection method, detection device and readable storage medium Download PDF

Info

Publication number
CN112747906B
CN112747906B CN202110121990.4A CN202110121990A CN112747906B CN 112747906 B CN112747906 B CN 112747906B CN 202110121990 A CN202110121990 A CN 202110121990A CN 112747906 B CN112747906 B CN 112747906B
Authority
CN
China
Prior art keywords
light source
lighting
light
curve
light sources
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110121990.4A
Other languages
Chinese (zh)
Other versions
CN112747906A (en
Inventor
王非非
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Goertek Optical Technology Co Ltd
Original Assignee
Goertek Optical Technology Co Ltd
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 Goertek Optical Technology Co Ltd filed Critical Goertek Optical Technology Co Ltd
Priority to CN202110121990.4A priority Critical patent/CN112747906B/en
Publication of CN112747906A publication Critical patent/CN112747906A/en
Application granted granted Critical
Publication of CN112747906B publication Critical patent/CN112747906B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01MTESTING STATIC OR DYNAMIC BALANCE OF MACHINES OR STRUCTURES; TESTING OF STRUCTURES OR APPARATUS, NOT OTHERWISE PROVIDED FOR
    • G01M11/00Testing of optical apparatus; Testing structures by optical methods not otherwise provided for
    • G01M11/02Testing optical properties
    • G01M11/0207Details of measuring devices

Landscapes

  • Chemical & Material Sciences (AREA)
  • Analytical Chemistry (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Circuit Arrangement For Electric Light Sources In General (AREA)

Abstract

The invention discloses a detection method, a detection device and a readable storage medium of a light source, wherein the detection method comprises the following steps: acquiring a lighting position after a light source is started; continuously taking values through the lighting position to obtain a series of values representing the brightness intensity, and generating a fitting curve according to the series of values; judging the lighting quantity of the light sources according to the fitting curve; and comparing the lighting number with the number of the light sources which are powered on in advance, and determining whether the lighted light sources are consistent with the light sources which are powered on in advance. The technical scheme of the invention can quickly and effectively judge whether the light source is normally started or not, and improve the detection efficiency.

Description

Light source detection method, detection device and readable storage medium
Technical Field
The present invention relates to the field of light source detection technologies, and in particular, to a light source detection method, a light source detection device, and a readable storage medium.
Background
In manufacturing a module with a light source, it is generally necessary to detect whether the light source can be turned on normally. The existing detection method is to measure the lighting intensity of a light source, generally, the light intensity is relatively weak after a single light source is started, and the light intensity is relatively strong after a plurality of light sources are started. However, in the production and manufacturing process of some modules, brightness difference occurs in the light intensity of the light source due to the production process. Sometimes, a plurality of light sources can be normally started and belong to qualified products, but the light intensity is lower than the set standard, and the modules are easily judged to be unqualified products during judgment. Therefore, whether the light sources of the modules can be normally started or not needs to be observed manually, and the efficiency of detecting the light source performance is low due to the manual re-detection mode.
The above is only for the purpose of assisting understanding of the technical solutions of the present application, and does not represent an admission that the above is prior art.
Disclosure of Invention
Therefore, in order to solve the problem that the detection efficiency is low because the qualified products are easily judged to be unqualified products and the judgment needs to be performed again manually due to the fact that the brightness difference occurs in the existing module with the light source, a light source detection method, a light source detection device and a readable storage medium are needed to be provided, and the purpose of rapidly and effectively judging whether the light source is normally started is achieved, and the detection efficiency is improved.
In order to achieve the above object, the present invention provides a method for detecting a light source, the method comprising:
acquiring a lighting position after a light source is started;
continuously taking values through the lighting position to obtain a series of values representing the brightness intensity, and generating a fitting curve according to the series of values;
judging the lighting quantity of the light sources according to the fitting curve;
and comparing the lighting number with the number of the light sources which are powered on in advance, and determining whether the lighted light sources are consistent with the light sources which are powered on in advance.
Optionally, the light source includes a first light source and a second light source, the first light source and the second light source are arranged in parallel, the lighting position includes a first position corresponding to a center of the first light source, and the lighting position further includes a second position corresponding to a center of the second light source;
the step of continuously taking values throughout the lighting position further includes:
and continuously taking values through the first position and the second position.
Optionally, the step of determining the lighting number of the light source according to the fitted curve includes:
generating a curve function according to the fitting curve;
selecting the position points with the synchronous increasing or decreasing trend of the fitting curve, carrying out first derivation on the curve function according to the position points, and calculating to obtain the slope of the position points;
and judging the lighting number of the light sources according to the slope number of the position points.
Optionally, the fitted curve comprises three sections of curves which are synchronously increased or decreased, and the position points comprise three;
the step of judging the lighting number of the light sources according to the slope number of the position points comprises the following steps:
if the number of slopes of the position point is greater than or equal to two, both the first light source and the second light source are lighted;
and if the slope number of the position point is equal to one, one of the first light source and the second light source is lightened.
Optionally, the step of determining the lighting number of the light sources according to the fitted curve further includes:
generating a curve function according to the fitting curve;
carrying out secondary derivation on the curve function, and calculating the maximum value number of the curve function;
and judging the lighting number of the light source according to the maximum value number.
Optionally, the step of determining the lighting number of the light source according to the maximum number includes:
if the maximum number is greater than or equal to two, the first light source and the second light source are both lighted;
if the maximum number is equal to one, one of the first light source and the second light source is lighted.
In order to achieve the above object, the present invention also provides a light source detection device, including:
the acquisition module is used for acquiring the lighting position of the light source after being started;
the generating module is used for continuously taking values through the lighting position to obtain a series of values representing the brightness intensity and generating a fitting curve according to the series of values;
the judging module is used for judging the lighting quantity of the light sources according to the fitting curve;
and the comparison module is used for comparing the lighting quantity with the quantity of the light sources which are powered on in advance and determining whether the lighting light sources are consistent with the light sources which are powered on in advance.
Optionally, the light source includes a first light source and a second light source, the first light source and the second light source are arranged in parallel, the lighting position includes a first position corresponding to a center of the first light source, and the lighting position further includes a second position corresponding to a center of the second light source;
the generating module is further configured to continuously take values through the first position and the second position.
Optionally, the judging module includes a generating unit, a calculating unit and a judging unit;
the generating unit is used for generating a curve function according to the fitting curve;
the calculation unit is used for selecting the position points of the fitted curve with the synchronous increasing or decreasing trend, carrying out one derivation on the curve function according to the position points, and calculating the slope of the position points;
and the judging unit is used for judging the lighting number of the light source according to the slope number of the position point.
Further, in order to achieve the above object, the present invention also provides a readable storage medium having stored thereon a detection program of a light source, which when executed by a processor, implements the steps of the detection method of a light source as described above.
According to the technical scheme provided by the invention, the light source is started, the position area illuminated after the light source is started is obtained, namely the lighting position is obtained, and the numerical value of the brightness intensity is obtained from one end of the edge of the lighting position to the other end. Thereby obtaining a continuous series of values. And taking the position of the value as an abscissa and the brightness intensity as an ordinate to generate a fitting curve. The number of lights of the light source is judged by fitting a curve. For example, a portion of the location points is selected, and a derivative is taken once to calculate the slope of the portion of the location points. Or performing secondary derivation on the fitting curve to obtain maximum values after secondary derivation, and judging the lighting number of the light sources according to the number of the maximum values. After the lighting number of the light sources is determined, comparison is carried out according to the power supply which is switched on in advance, and whether the lighting power supply is consistent with the power supply which is switched on or not is further judged. If the lighted power supply is consistent with the power-on supply, the light source is qualified, and if the lighted power supply is inconsistent with the power-on supply, the light source is unqualified. Whether the light source is normally started or not can be quickly and effectively judged by analyzing the position of the optical center of the light source, so that the manual detection is avoided, and the detection efficiency is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the structures shown in the drawings without creative efforts.
FIG. 1 is a schematic flow chart of a first embodiment of a method for detecting a light source according to the present invention;
FIG. 2 is a schematic view of the detecting module and the module to be detected according to the present invention;
FIG. 3 is a flowchart illustrating a second embodiment of a method for inspecting a light source according to the present invention;
FIG. 4 is a schematic view of a first spot of light according to the present invention;
FIG. 5 is a schematic view of a second spot of the present invention;
FIG. 6 is a schematic diagram of a fitted curve formed when two light sources are lit according to the present invention;
FIG. 7 is a schematic diagram of a fitted curve formed when one of the light sources is illuminated in the present invention;
FIG. 8 is a schematic flow chart illustrating a method for detecting a light source according to a third embodiment of the present invention;
FIG. 9 is a schematic flow chart illustrating a fourth embodiment of a method for detecting a light source according to the present invention;
FIG. 10 is a flowchart illustrating a fifth embodiment of a method for detecting a light source according to the present invention;
FIG. 11 is a flowchart illustrating a sixth exemplary embodiment of a method for detecting a light source according to the present invention;
FIG. 12 is a schematic structural diagram of a detection apparatus for a light source according to the present invention.
The reference numbers illustrate:
reference numerals Name(s) Reference numerals Name (R)
10 Detection module 40 Generation module
20 Module to be tested 50 Judging module
210 The first light spot 510 Generating unit
220 Second light spot 520 Computing unit
230 Fitting curve 530 Judging unit
30 Acquisition module 60 Comparison module
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
The technical solutions in the embodiments of the present invention will be described clearly and completely with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that all directional indicators (such as upper, lower, left, right, front and rear … …) in the embodiment of the present invention are only used to explain the relative position relationship between the components, the movement situation, etc. in a specific posture (as shown in the drawing), and if the specific posture is changed, the directional indicator is changed accordingly.
In addition, the descriptions related to "first", "second", etc. in the present invention are only for descriptive purposes and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present invention, "a plurality" means at least two, e.g., two, three, etc., unless specifically limited otherwise.
In the present invention, unless otherwise explicitly stated or limited, the terms "connected", "fixed", and the like are to be understood broadly, for example, "fixed" may be fixedly connected, may be detachably connected, or may be integrated; can be mechanically or electrically connected; they may be directly connected or indirectly connected through intervening media, or they may be connected internally or in any other suitable relationship, unless expressly stated otherwise. The specific meanings of the above terms in the present invention can be understood by those skilled in the art according to specific situations.
In addition, the technical solutions in the embodiments of the present invention may be combined with each other, but it must be based on the realization of those skilled in the art, and when the technical solutions are contradictory or cannot be realized, such a combination of technical solutions should not be considered to exist, and is not within the protection scope of the present invention.
Referring to fig. 1, a first embodiment of the present invention provides a method for detecting a light source, where the light source may be installed in a TOF (time of flight) module. The light source is a TOF light source, the TOF light source emits infrared laser, the infrared laser is reflected on the surface of an object, the TOF module receives the laser reflected by the surface of the object again, and the distance is measured by calculating the flight time of the light. Usually be provided with a plurality of infrared laser light sources in the TOF module, after the TOF module is manufactured in production, whether need normally open a plurality of infrared laser light sources and detect. The detection method comprises the following steps:
step S10, acquiring the lighting position after the light source is started; generally, a single light source is turned on to form one light spot, and a plurality of light sources form a plurality of light spots. Under the condition that a plurality of light sources are all started, the positions where the light sources are arranged are closer to each other. The spots have overlapping portions with each other. In addition, the module to be detected is a TOF module, and the module for detection is also the TOF module. Referring to fig. 2, the relative positions of the module 20 to be tested and the detecting module 10 are fixed. The number of the modules 20 to be tested is multiple, one module 20 to be tested is tested, and after the module 20 to be tested is taken down, the other module 20 to be tested is tested, and the position of each test of the module 20 to be tested is fixed. During each detection, the light source of the detection module 10 is turned off, and only the light source of the module 20 to be detected is turned on. The infrared laser emitted by the light source of the module to be detected 20 is received by the infrared photosensitive component of the detection module 10. That is, the module under test 20 and the detecting module 10 are the same product, and can be understood as a standard product for detecting the product under test. The module to be tested 20 and the detection module 10 are both connected to the control terminal, and the light source of the module to be tested 20 is controlled to be turned on through the control terminal. The control terminal controls the detection module 10 to obtain the lighting position of the module 20 to be tested after the light source is turned on. The control terminal may comprise a computer or other intelligent terminal.
Step S20, continuously taking values through the lighting position to obtain a series of values representing the brightness intensity, and generating a fitting curve according to the series of values; specifically, the value of the luminance is taken from one end of the periphery of the lighting position toward the other end. The continuous value taking is carried out by taking pixel points as value units, and is simply carried out in a mode that one pixel point is followed by another pixel point. The central position of the single light source corresponds to higher brightness intensity, and the peripheral brightness intensity is lower. It is also known that the series of values obtained when a plurality of light sources are simultaneously turned on includes a change in the light intensity. The number of the light sources to be lit can be effectively determined by the change of the light intensity.
Step S30, judging the lighting number of the light source according to the fitting curve;
specifically, the position of the continuous value is the abscissa, and the brightness intensity is the ordinate. For example, the two light sources form light spots respectively, and the two light spots are overlapped, so that the light intensity of the overlapped part is the highest. The change condition of the light acquired through the two light spots is dark-bright-dark, which reflects that the wave crests appear in the bright place and the wave troughs appear in the dark place of the fitting curve, so that the lighting quantity of the light sources can be judged according to the quantity of the wave crests and the wave troughs.
In step S40, the number of lights to be turned on is compared with the number of light sources to be turned on in advance, and it is determined whether or not the light sources to be turned on and the light sources to be turned on in advance coincide with each other. Specifically, after the specific number of turned-on light sources is determined, it is necessary to determine whether the number of light sources to be turned on is the same as the number of turned-on light sources. For example, the TOF module includes two light sources, and determines whether the two light sources are turned on when it is determined that both of the two light sources are turned on. If the judgment shows that part of the light sources are turned on, namely only one light source is turned on, whether the light source which is powered on is turned on is judged. And under the condition that the single light source is started and powered on in advance and the plurality of light sources are started and powered on in advance, judging that the TOF module is qualified, otherwise, judging that the TOF module is unqualified. When the detection personnel detect the TOF module, the judgment result is displayed on the display screen.
In the technical scheme provided by the embodiment, the light source is started, the position area illuminated after the light source is started is obtained, namely the lighting position is obtained, and the numerical value of the brightness intensity is obtained from one end of the edge of the lighting position to the other end of the edge of the lighting position. Thereby acquiring a continuous series of values. And taking the position of the value as an abscissa and the brightness intensity as an ordinate to generate a fitting curve. The number of lights of the light source is judged by fitting a curve. For example, a portion of the location points is selected, and a derivative is taken once to calculate the slope of the portion of the location points. Or performing quadratic derivation on the fitted curve to obtain maximum values after the quadratic derivation, and judging the lighting number of the light sources according to the number of the maximum values. After the lighting number of the light sources is determined, comparison is carried out according to the power supply which is switched on in advance, and whether the lighting power supply is consistent with the power supply which is switched on or not is further judged. And if the lightened power supply is consistent with the power-on power supply, the light source is qualified, and if the lightened power supply is inconsistent with the power-on power supply, the light source is unqualified. Whether the light source is normally started or not can be quickly and effectively judged by analyzing the position of the optical center of the light source, so that the manual detection is avoided, and the detection efficiency is improved.
Referring to fig. 3, a second embodiment of the present invention is proposed on the basis of the first embodiment. The light source comprises a first light source and a second light source which are arranged in parallel, the lighting position comprises a first position corresponding to the center of the first light source, and the lighting position also comprises a second position corresponding to the center of the second light source;
the step of taking values continuously throughout the lighting position further comprises:
step S210, continuously taking values through the first position and the second position;
step S220, a series of values representing the brightness intensity is obtained, and a fitting curve is generated according to the series of values. Referring to fig. 4, the first light source correspondingly forms a first light spot 210. Referring to fig. 5, the second light source correspondingly forms a second light spot 220, and the center of the first light spot 110 is a first position. The second spot 220 is centered at the second position. That is, the through-value position passes through the centers of the first and second light spots 210 and 220. Generally, the center of the spot is brighter and the periphery of the spot is darker. The two light sources are also arranged in close proximity, typically with a distance of less than 1 cm between them. This results in the first spot 210 and the second spot 220 having overlapping portions that are brighter than the periphery of the single light source, or even the center of the two spots. Referring to fig. 6, the variation in brightness of the fitted curve 230 thus formed is dark-sub light-sub light-dark. Similarly, after fitting the curve 230 to form such a dark-sub bright-sub bright-dark brightness change, it can be inferred that both the first light source and the second light source are turned on. Referring to fig. 7, the variation in brightness of the fitted curve 230 is dark-light-dark when a single light source is turned on. Similarly, it can be inferred that only one of the first light source and the second light source is turned on after the fitted curve 230 forms such a dark-light-dark luminance change.
Referring to fig. 8, a third embodiment of the present invention is proposed on the basis of the second embodiment. The step of judging the lighting number of the light source according to the fitting curve comprises the following steps:
step S310, generating a curve function according to the fitting curve; specifically, a plane rectangular coordinate system is established, and a curve function is used for representing a fitting curve. For example, if the fitting curve is composed of a plurality of circular arcs, the circular arcs can be represented by a function representing a circle. That is, the curve function may be an independent function, or may be formed by combining a plurality of functions.
Step S320, selecting the position points with the synchronous increasing or decreasing trend of the fitting curve, carrying out first derivation on the curve function according to the position points, and calculating to obtain the slope of the position points;
specifically, the synchronous increasing trend is a trend toward a higher point of the luminance at a lower point of the luminance, and the synchronous decreasing trend is a trend toward a lower point of the luminance at a lower point of the luminance. If such a synchronous increment or synchronous decrement is present, a slope can be understood, and the slope is obtained by calculating the derivative of the curve function once.
In step S330, the number of light sources to be turned on is determined according to the slope of the position points.
The number of lit light sources directly affects the brightness change, and it can also be understood that the number of lit light sources is different, and the number of curve segments that are synchronously increased or decreased is also different. In the case where the number of segments of the curve that is synchronously increased or synchronously decreased is calculated from the slope expression, the number of lighting of the light source can be judged by the number of slopes calculated.
Referring to fig. 4, a fourth embodiment of the present invention is proposed on the basis of the third embodiment. The fitting curve comprises three sections of curves which are synchronously increased or decreased, and the number of the position points comprises three;
the step of judging the lighting number of the light source according to the slope number of the position points comprises the following steps:
step S331, if the number of slopes of the position point is greater than or equal to two, both the first light source and the second light source are lighted; according to the observation of the fitting curve, under the condition that the first light source and the second light source are both started, three curve sections which are synchronously increased or synchronously decreased are provided, and after corresponding three sections of point taking calculation, one derivation is carried out to obtain three slopes. If the first light source and the second light source are far away from each other, the first light spot and the second light spot are formed to be tangent, or a certain distance is reserved between the first light spot and the second light spot. The first spot and the second spot do not coincide, in which case one derivation can yield two slopes. On the contrary, after the derivative is performed at the corresponding position point once, if the calculated slope number is three or two, it is indicated that both the first light source and the second light source are turned on.
In step S332, if the slope amount of the position point is equal to one, one of the first light source and the second light source is turned on. In the case of one light source being turned on, the curve segment that is synchronously increasing or synchronously decreasing is one. After the point calculation of the corresponding curve segment, a slope is obtained by one derivation. The slope at other positions is zero. On the contrary, after the derivative is performed at the corresponding position point once, if the calculated slope number is one, it is indicated that one of the first light source and the second light source is turned on. As can be seen from this, after the derivation is performed once in steps S331 and S332, the number of slopes can be calculated, and then the number of lighting sources can be determined based on the number of slopes.
Referring to fig. 5, a fifth embodiment of the present invention is proposed on the basis of the second embodiment. The step of judging the lighting quantity of the light sources according to the fitting curve further comprises the following steps:
step S31, generating a curve function according to the fitting curve; specifically, a rectangular plane coordinate system is established, and a curve function is used for representing a fitting curve. For example, if the fitting curve is composed of a plurality of circular arcs, the circular arcs can be represented by a function representing a circle. That is, the curve function may be an independent function or a combination of a plurality of functions.
Step S32, carrying out secondary derivation on the curve function, and calculating to obtain the maximum value number of the curve function; in particular, the quadratic derivation is the number of extrema of the calculated curve function. According to the fitted curve, under the condition that the first light source and the second light source are both started, at least two light spots are formed, the number of points with higher brightness is obviously greater than one, and the number of maximum values obtained through calculation is also greater than one.
In step S33, the number of lit light sources is determined based on the maximum number. Each point of higher intensity may be understood as a maximum. The maximum value is significantly greater when all of the plurality of light sources are on than when a single light source is on, and therefore the number of lit light sources can be determined by the number of maximum values.
Referring to fig. 6, a sixth embodiment of the present invention is proposed on the basis of the fifth embodiment. The step of judging the lighting number of the light source according to the maximum value number comprises the following steps:
step S33a, if the maximum number is greater than or equal to two, both the first light source and the second light source are turned on;
specifically, when the first light source and the second light source are both turned on, a first light spot and a second light spot are formed, respectively, and the central brightness of the first light spot is higher, and the central brightness of the second light spot is also higher. Under the condition that the first light source and the second light source are arranged close to each other, the first light spot and the second light spot have an overlapped part, and the brightness of the overlapped part is higher. The intensity of the overlapping portion may be higher than the central intensities of the first and second light spots and may be lower than the central intensities of the first and second light spots. That is to say, in the case where the first light source and the second light source are disposed close to each other, there are three points having higher luminance, and three maximum values can be calculated after the second derivation. And otherwise, after the three maximum values are calculated, the first light source and the second light source are both lighted.
In case the first light source and the second light source are at a distance, for example, more than 1 cm apart. The edges of the first and second spots may be tangent or the first and second spots may be spaced apart by a distance. At the moment, the center point of the first light spot and the center point of the second light spot are both high-brightness points, the number of the high-brightness points is two, and two maximum values can be calculated after secondary derivation. Likewise, conversely, after two maxima are calculated, it is also said that both the first light source and the second light source are illuminated.
In step S33b, if the maximum number is equal to one, one of the first light source and the second light source is turned on.
Specifically, when one of the first light source and the second light source is turned on, it is described that only the first light spot of the first light source or the second light spot of the second light source is present, the luminance change of the fitting curve is dark-light-dark, only one point with higher luminance is present, and a maximum value can be obtained after the second derivation. And otherwise, after a maximum value is calculated, one of the first light source and the second light source is lighted.
In the present embodiment, the lighting number of the light source is effectively determined by the number of the maximum values after the second derivation by step S33a and step S33 b.
The present invention also provides a light source detection device, comprising: the device comprises an acquisition module 30, a generation module 40, a judgment module 50 and a comparison module 60.
An obtaining module 30, configured to obtain a lighting position after the light source is turned on; generally, a single light source is turned on to form one light spot, and a plurality of light sources form a plurality of light spots. Under the condition that a plurality of light sources are all started, the positions where the light sources are arranged are closer to each other. The spots have overlapping portions with each other. In addition, the module to be detected is a TOF module, and the module for detection is also a TOF module. The relative positions of the module to be detected and the detection module are fixed. The module to be tested is multiple, one module to be tested is detected, after the module to be tested is taken down, the other module to be tested is detected, and the position of each detection of the module to be tested is fixed. When the detection is carried out each time, the light source of the detection module is turned off, and only the light source of the module to be detected is turned on. And receiving the infrared laser emitted by the light source of the module to be detected through the infrared photosensitive part of the detection module. That is to say, the module to be tested and the detection module are the same product, and can be understood as using a standard product to detect the product to be tested. The module to be detected and the detection module are both connected to the control terminal, and the light source of the module to be detected is controlled to be turned on through the control terminal. And the control terminal controls the detection module to acquire the lighting position of the module to be detected after the light source is started. The control terminal may comprise a computer or other intelligent terminal.
The generating module 40 is configured to perform continuous value taking through the lighting position to obtain a series of values representing the brightness intensity, and generate a fitting curve according to the series of values; specifically, the value of the luminance is taken from one end of the periphery of the lighting position toward the other end. The continuous value taking is carried out by taking pixel points as value units, and is simply carried out in a mode that one pixel point is followed by another pixel point. The central position of the single light source corresponds to higher brightness intensity, and the peripheral brightness intensity is lower. It is also known that the series of values obtained when a plurality of light sources are simultaneously turned on includes a change in the light intensity. The number of the light sources can be effectively judged according to the change of the brightness intensity.
A judging module 50, configured to judge the lighting number of the light source according to the fitting curve; specifically, the position of the continuous value is the abscissa, and the brightness intensity is the ordinate. For example, the two light sources form light spots respectively, and the two light spots are overlapped, so that the light intensity of the overlapped part is the highest. The change condition of the light acquired through the two light spots is dark-bright-dark, which reflects that the wave crests appear in the bright place and the wave troughs appear in the dark place of the fitting curve, so that the lighting quantity of the light sources can be judged according to the quantity of the wave crests and the wave troughs.
And a comparison module 60 for comparing the number of the lighted light sources with the number of the light sources which are powered on in advance, and determining whether the lighted light sources are consistent with the light sources which are powered on in advance. Specifically, after the specific number of turned-on light sources is determined, it is necessary to determine whether the number of light sources that are turned on coincides with the number of turned-on light sources. For example, the TOF module includes two light sources, and determines whether the two light sources are turned on when it is determined that both of the two light sources are turned on. If the judgment shows that part of the light sources are turned on, namely only one light source is turned on, whether the light source which is powered on is turned on is judged. And under the condition that the single light source is started and powered on in advance and the plurality of light sources are started and powered on in advance, judging that the TOF module is qualified, otherwise, judging that the TOF module is unqualified. When the detection personnel detect the TOF module, the judgment result is displayed on the display screen.
In the technical scheme provided by the embodiment, the light source is started, the position area illuminated after the light source is started is obtained, namely the lighting position is obtained, and the numerical value of the brightness intensity is obtained from one end of the edge of the lighting position to the other end of the edge of the lighting position. Thereby obtaining a continuous series of values. And taking the position of the value as an abscissa and the brightness intensity as an ordinate to generate a fitting curve. The number of lighting of the light source is judged by fitting a curve. For example, a portion of the location points is selected, and a derivative is taken once to calculate the slope of the portion of the location points. Or performing secondary derivation on the fitting curve to obtain maximum values after secondary derivation, and judging the lighting number of the light sources according to the number of the maximum values. After the lighting number of the light sources is determined, comparison is carried out according to the power supply which is switched on in advance, and whether the lighting power supply is consistent with the power supply which is switched on or not is further judged. If the lighted power supply is consistent with the power-on supply, the light source is qualified, and if the lighted power supply is inconsistent with the power-on supply, the light source is unqualified. Whether the light source is normally started can be quickly and effectively judged by analyzing the position of the optical center of the light source, so that the manual detection is avoided, and the detection efficiency is improved.
Further, the light source comprises a first light source and a second light source, the first light source and the second light source are arranged in parallel, the lighting position comprises a first position corresponding to the center of the first light source, and the lighting position also comprises a second position corresponding to the center of the second light source;
the generating module 40 is further configured to continuously take values through the first position and the second position. The first light source correspondingly forms a first light spot, the second light source correspondingly forms a second light spot, and the center of the first light spot is a first position. The center of the second spot is the second position. That is, the through-value position passes through the centers of the first and second light spots. Generally, the center of the spot is brighter and the periphery of the spot is darker. The two light sources are also arranged in close proximity, typically with a distance of less than 1 cm between them. This results in the first and second spots having overlapping portions that are also brighter than the periphery of the single light source, or even brighter than the center of the two spots. The variation in brightness of the fitted curve thus formed is dark-sub bright-sub bright-dark. Similarly, it can be inferred that both the first light source and the second light source are on after fitting the curve to form such a dark-sub bright-sub bright-dark brightness change. The variation in brightness of the fitted curve when a single light source is on is dark-light-dark. Similarly, it can be inferred that only one of the first light source and the second light source is turned on after the fitting curve forms such a dark-light-dark luminance change.
Further, the judging module 50 includes a generating unit 510, a calculating unit 520, and a judging unit 530.
A generating unit 510, configured to generate a curve function according to the fitted curve; specifically, a rectangular plane coordinate system is established, and a curve function is used for representing a fitting curve. For example, if the fitting curve is composed of a plurality of circular arcs, the circular arcs can be represented by a function representing a circle. That is, the curve function may be an independent function or a combination of a plurality of functions.
The calculating unit 520 is configured to select a position point where the fitted curve has a synchronous increasing or decreasing trend, perform first derivation on the curve function according to the position point, and calculate a slope of the position point; specifically, the synchronous increasing trend is a trend that changes toward a higher point of luminance at a lower point of luminance, and the synchronous decreasing trend is a trend that changes toward a lower point of luminance at a lower high point of luminance. If such a synchronous increment or synchronous decrement is present, a slope can be understood, and the slope is obtained by calculating the derivative of the curve function once.
The determining unit 530 is configured to determine the lighting number of the light source according to the slope number of the position point. The number of light sources lit directly affects this change in brightness, and it can also be understood that the number of light sources lit differs, as do the number of curve segments that are synchronously increasing or decreasing. In the case where the number of segments of the curve that is synchronously increased or synchronously decreased is calculated from the slope expression, the number of lighting of the light source can be judged by the number of slopes calculated.
Further, the fitted curve comprises three sections of curves which are synchronously increased or decreased, and the position points comprise three;
the determining unit 530 is further configured to turn on both the first light source and the second light source if the number of slopes of the position point is greater than or equal to two; according to the observation of the fitting curve, under the condition that the first light source and the second light source are both started, three curve sections which are synchronously increased or synchronously decreased are provided, and after the corresponding three sections are subjected to point calculation, one derivation is carried out to obtain three slopes. If the first light source and the second light source are far apart, the formed first light spot and the second light spot are tangent, or a certain distance is reserved between the first light spot and the second light spot. The first and second spots do not coincide, in which case one derivation can yield two slopes. On the contrary, after the derivation is performed at the corresponding position point once, if the calculated slope number is three or two, it is determined that both the first light source and the second light source are turned on.
The determining unit 530 is further configured to turn on one of the first light source and the second light source if the number of slopes of the position point is equal to one. In the case of one light source being switched on, the curve segment that is synchronously increasing or synchronously decreasing is one. After the point calculation of the corresponding curve segment, a slope is obtained by one derivation. The slope at other positions is zero. On the contrary, after the derivation is performed at the corresponding position point once, if the calculated slope number is one, it is indicated that one of the first light source and the second light source is turned on. Therefore, after the derivation is performed once by the determining unit 530, the number of slopes can be calculated, and then the lighting number of the light source can be determined according to the number of slopes.
Further, the judging module 50 includes a generating unit 510, a calculating unit 520, and a judging unit 530.
A generating unit 510, configured to generate a curve function according to the fitted curve; specifically, a plane rectangular coordinate system is established, and a curve function is used for representing a fitting curve. For example, if the fitting curve is composed of a plurality of circular arcs, the circular arcs can be represented by a function representing a circle. That is, the curve function may be an independent function, or may be formed by combining a plurality of functions.
The calculating unit 520 is configured to perform secondary derivation on the curve function, and calculate the maximum number of the curve function; in particular, the quadratic derivation is the number of extrema of the calculated curve function. According to the fitted curve, under the condition that the first light source and the second light source are both started, at least two light spots are formed, the number of points with higher brightness is obviously greater than one, and the number of maximum values obtained through calculation is also greater than one.
A judging unit 530, configured to judge the lighting number of the light source according to the maximum number. Each point with higher brightness can be understood as a maximum. The maximum value is significantly greater than that of a single light source when all the light sources are turned on, so that the number of the turned-on light sources can be judged by the number of the maximum values.
Further, the determining unit 530 is further configured to, if the number of maximum values is greater than or equal to two, turn on both the first light source and the second light source; specifically, when the first light source and the second light source are both turned on, a first light spot and a second light spot are formed respectively, and the central brightness of the first light spot is higher and the central brightness of the second light spot is also higher. Under the condition that the first light source and the second light source are arranged close to each other, the first light spot and the second light spot have an overlapped part, and the brightness of the overlapped part is higher. The intensity of the overlapping portion may be higher than the central intensities of the first and second light spots or lower than the central intensities of the first and second light spots. That is to say, in the case where the first light source and the second light source are disposed close to each other, there are three points having higher luminance, and three maximum values can be calculated after the second derivation. And otherwise, after the three maximum values are calculated, the first light source and the second light source are both lighted.
The determining unit 530 is further configured to turn on one of the first light source and the second light source if the maximum number is equal to one. In case the first light source and the second light source are at a distance, for example, they are spaced apart by more than 1 cm. The edges of the first and second spots may be tangent or the first and second spots may be spaced apart by a distance. At the moment, the center point of the first light spot and the center point of the second light spot are both high-brightness points, the number of the high-brightness points is two, and two maximum values can be calculated after secondary derivation. Likewise, conversely, after two maxima are calculated, it is also said that both the first light source and the second light source are illuminated. Specifically, when one of the first light source and the second light source is turned on, it is described that only the first light spot of the first light source or the second light spot of the second light source is present, the luminance change of the fitting curve is dark-light-dark, only one point with higher luminance is present, and a maximum value can be obtained after the second derivation. And otherwise, after a maximum value is calculated, one of the first light source and the second light source is lighted.
The invention also provides a readable storage medium on which a detection program of a light source is stored, which when executed by a processor implements the steps of the detection method of a light source as described above.
The detailed implementation of the readable storage medium of the present invention may refer to the embodiments of the detection method of the light source, which are not described herein again.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention, and all equivalent structural changes made by using the contents of the present specification and the drawings, or any other related technical fields directly/indirectly applied to the present invention are included in the scope of the present invention.

Claims (6)

1. A method for detecting a light source, the method comprising:
acquiring a lighting position of the light source after the light source is started;
continuously taking values through the lighting position to obtain a series of values representing the brightness intensity, and generating a fitting curve according to the series of values;
judging the lighting quantity of the light sources according to the fitting curve;
comparing the lighting quantity with the quantity of the light sources which are powered on in advance, and determining whether the lighting light sources are consistent with the light sources which are powered on in advance;
the light source comprises a first light source and a second light source, the first light source and the second light source are arranged in parallel, the lighting position comprises a first position corresponding to the center of the first light source, and the lighting position also comprises a second position corresponding to the center of the second light source;
the step of performing successive values throughout the lighting position includes:
continuously taking values through the first position and the second position;
the step of judging the number of lighting of the light source according to the fitting curve includes:
generating a curve function according to the fitting curve;
selecting the position points with the synchronous increasing trend or the synchronous decreasing trend of the fitting curve, carrying out one-time derivation on the curve function according to the position points, and calculating the slope of the position points, wherein the synchronous increasing trend refers to the change from the lower point of the brightness to the higher point of the brightness, and the synchronous decreasing trend refers to the change from the higher point of the brightness to the lower point of the brightness;
and judging the lighting number of the light sources according to the slope number of the position points.
2. The method for detecting a light source according to claim 1, wherein the fitted curve includes three segments of curves which are synchronously increased or decreased, and the position points include three;
the step of judging the lighting number of the light source according to the slope number of the position point comprises the following steps:
if the number of slopes of the position point is greater than or equal to two, both the first light source and the second light source are lightened;
and if the slope number of the position point is equal to one, one of the first light source and the second light source is lightened.
3. The method for detecting a light source according to claim 1, wherein the step of determining the number of light sources lit according to the fitted curve further comprises:
generating a curve function according to the fitting curve;
carrying out secondary derivation on the curve function, and calculating the maximum value number of the curve function;
and judging the lighting number of the light source according to the maximum value number.
4. The method for detecting a light source according to claim 3, wherein said step of judging the number of lighted light sources based on the number of local maxima includes:
if the maximum number is greater than or equal to two, the first light source and the second light source are both lighted;
if the maximum number is equal to one, one of the first light source and the second light source is lighted.
5. A detection apparatus for a light source, the detection apparatus comprising:
the acquisition module is used for acquiring the lighting position of the light source after being started;
the generating module is used for continuously taking values through the lighting position to obtain a series of values representing the brightness intensity and generating a fitting curve according to the series of values;
the judging module is used for judging the lighting quantity of the light sources according to the fitting curve;
the comparison module is used for comparing the lighting quantity with the quantity of the light sources which are powered on in advance and determining whether the lighted light sources are consistent with the light sources which are powered on in advance;
the light source comprises a first light source and a second light source, the first light source and the second light source are arranged in parallel, the lighting position comprises a first position corresponding to the center of the first light source, and the lighting position also comprises a second position corresponding to the center of the second light source;
the generating module is further configured to continuously take values through the first position and the second position;
the judging module comprises a generating unit, a calculating unit and a judging unit;
the generating unit is used for generating a curve function according to the fitting curve;
the calculating unit is used for selecting the position points with the synchronous increasing trend or the synchronous decreasing trend of the fitting curve, performing one derivation on the curve function according to the position points, and calculating the slope of the position points, wherein the synchronous increasing trend refers to the change from the lower point of the brightness to the higher point of the brightness, and the synchronous decreasing trend refers to the change from the higher point of the brightness to the lower point of the brightness;
and the judging unit is used for judging the lighting quantity of the light sources according to the slope of the position points.
6. A readable storage medium, characterized in that the readable storage medium has stored thereon a detection program of a light source, which when executed by a processor implements the steps of the detection method of a light source according to any one of claims 1 to 4.
CN202110121990.4A 2021-01-28 2021-01-28 Light source detection method, detection device and readable storage medium Active CN112747906B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110121990.4A CN112747906B (en) 2021-01-28 2021-01-28 Light source detection method, detection device and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110121990.4A CN112747906B (en) 2021-01-28 2021-01-28 Light source detection method, detection device and readable storage medium

Publications (2)

Publication Number Publication Date
CN112747906A CN112747906A (en) 2021-05-04
CN112747906B true CN112747906B (en) 2022-07-22

Family

ID=75653274

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110121990.4A Active CN112747906B (en) 2021-01-28 2021-01-28 Light source detection method, detection device and readable storage medium

Country Status (1)

Country Link
CN (1) CN112747906B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104374551A (en) * 2014-11-24 2015-02-25 深圳科瑞技术股份有限公司 LED luminance uniformity detection method and system thereof
CN110736610A (en) * 2019-10-22 2020-01-31 歌尔股份有限公司 Method and device for measuring optical center deviation, storage medium and depth camera

Family Cites Families (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102013114264B4 (en) * 2013-12-18 2023-12-07 HELLA GmbH & Co. KGaA Headlights for vehicles
CN104655403B (en) * 2014-01-29 2017-04-19 广西科技大学 Luminance uniformity test method of dot-matrix light source
CN106773495B (en) * 2016-12-14 2018-05-18 深圳奥比中光科技有限公司 The automatic focusing method and system of projector with multiple lamp light source
CN106840389A (en) * 2016-12-30 2017-06-13 歌尔科技有限公司 Light source estimating and measuring method and device, intelligent electronic device based on multiple balls
CN107036032A (en) * 2017-06-07 2017-08-11 成都恒坤光电科技有限公司 A kind of split type car light
CN107702898A (en) * 2017-09-29 2018-02-16 昆明先科达科技有限公司 A kind of car headlamp detection method and device
CN109682576B (en) * 2017-10-19 2021-02-26 深圳光峰科技股份有限公司 Light source light spot detection method and detection device
CN110007550B (en) * 2018-01-04 2021-11-05 深圳光峰科技股份有限公司 Light source system and projection equipment
CN108510542B (en) * 2018-02-12 2020-09-11 北京七鑫易维信息技术有限公司 Method and device for matching light source and light spot
CN109186941A (en) * 2018-08-09 2019-01-11 信利光电股份有限公司 A kind of detection method and system of light source uniformity
CN109343242A (en) * 2018-11-12 2019-02-15 张家港康得新光电材料有限公司 A kind of test device and test method
CN209042243U (en) * 2018-12-25 2019-06-28 珠海市正远光电科技有限公司 The bifocal double light-source system integral LED car lights of twin shaft
EP3926388A4 (en) * 2019-02-14 2022-11-16 Hangzhou Uphoton Optoelectronics Technology Co., Ltd. Beam-splitting optical module and manufacturing method therefor
CN111929032B (en) * 2020-09-23 2021-01-22 歌尔股份有限公司 Light source detection method, detection device and readable storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104374551A (en) * 2014-11-24 2015-02-25 深圳科瑞技术股份有限公司 LED luminance uniformity detection method and system thereof
CN110736610A (en) * 2019-10-22 2020-01-31 歌尔股份有限公司 Method and device for measuring optical center deviation, storage medium and depth camera

Also Published As

Publication number Publication date
CN112747906A (en) 2021-05-04

Similar Documents

Publication Publication Date Title
CN106097361B (en) Defect area detection method and device
CN110049320B (en) Camera shielding detection method and device, electronic equipment and storage medium
CN108775958B (en) Brightness measuring and calibrating method and device based on light sensor and electronic equipment
CN107515481B (en) Display panel detection method and device
CN102636442B (en) For using treated tape to detect the system and method that the wavelength spectrum of various gases is analyzed
CN111145138B (en) Detection method, device and equipment for LED lamp panel and storage medium
CN110853031B (en) Exclusive detection method for lightening of indicator light of automobile combined instrument
CN112747906B (en) Light source detection method, detection device and readable storage medium
CN110398344B (en) Method, device and equipment for detecting backlight lamp panel of display equipment and storage medium
CN110611801B (en) Method and device for detecting dirt of projection module, readable storage medium and projector
CN107084989B (en) Method and system for adding AOI device database
CN111929032B (en) Light source detection method, detection device and readable storage medium
CN111854939B (en) Online detection method for LED flexible light bar
JP2021056182A (en) Apparatus and method for detecting surface defect of workpiece, surface inspection system for workpiece, and program
CN110220272A (en) Display control method and device of air conditioner, storage medium and air conditioner
CN113325299A (en) Quality inspection method for PCBA (printed circuit board assembly) and related components thereof
CN113612991A (en) Brightness uniformity detection method and device of light supplement type camera
CN105136819A (en) Method for detecting appearance contour of air conditioner
CN110441714B (en) Method and device for detecting indicator light and computer readable storage medium
CN108333805B (en) Method and device for automatically detecting coordinates of bad points, equipment and storage medium
CN114088353B (en) Color difference detection method, device and detection terminal
US11869179B2 (en) Abnormal part display apparatus, abnormal part display system, abnormal part display method, and abnormal part display program
JP2019045510A (en) Inspection device
CN112802018B (en) Integrity detection method, device and equipment for segmented circular workpiece and storage medium
CN113052845B (en) Method and device for detecting vehicle carpet lamp

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant