CN111665249A - Light intensity adjusting method and system and optical detection equipment - Google Patents

Light intensity adjusting method and system and optical detection equipment Download PDF

Info

Publication number
CN111665249A
CN111665249A CN201910168778.6A CN201910168778A CN111665249A CN 111665249 A CN111665249 A CN 111665249A CN 201910168778 A CN201910168778 A CN 201910168778A CN 111665249 A CN111665249 A CN 111665249A
Authority
CN
China
Prior art keywords
value
gray
target
parameter value
range
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.)
Granted
Application number
CN201910168778.6A
Other languages
Chinese (zh)
Other versions
CN111665249B (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.)
Shenzhen Zhongke Flying Test Technology Co ltd
Skyverse Ltd
Original Assignee
Shenzhen Zhongke Flying Test 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 Shenzhen Zhongke Flying Test Technology Co ltd filed Critical Shenzhen Zhongke Flying Test Technology Co ltd
Priority to CN201910168778.6A priority Critical patent/CN111665249B/en
Publication of CN111665249A publication Critical patent/CN111665249A/en
Application granted granted Critical
Publication of CN111665249B publication Critical patent/CN111665249B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8806Specially adapted optical and illumination features
    • 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
    • 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/8806Specially adapted optical and illumination features
    • G01N2021/8835Adjustable illumination, e.g. software adjustable screen
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N2201/00Features of devices classified in G01N21/00
    • G01N2201/06Illumination; Optics
    • G01N2201/061Sources

Abstract

When the light intensity adjusting method is used for setting the target light intensity of the optical detection equipment, only an operator needs to input a light intensity adjusting parameter to obtain a target parameter value, then the target light intensity can be obtained by setting the target parameter value, the operation that the operator frequently adjusts voltage in the light intensity adjusting process is not needed, the light intensity adjusting efficiency is greatly improved, and the labor intensity of the operator is reduced.

Description

Light intensity adjusting method and system and optical detection equipment
Technical Field
The present application relates to the field of optical technologies, and in particular, to a method and a system for adjusting light intensity, and an optical detection apparatus.
Background
Optical Inspection equipment, such as Automated Optical Inspection (AOI) equipment, is equipment that detects common defects encountered in solder joint production based on Optical principles. During automatic detection, the optical detection equipment automatically scans a sample through a camera of the optical detection equipment, acquires an image, compares each structure in the image of the sample with qualified parameters in a database, detects defects in the sample through image processing, and finally displays/marks the defects through a display or an automatic mark for repair of maintenance personnel.
In the detection process of the optical detection equipment, whether the light intensity of the light source of the optical detection equipment meets the requirement or not directly influences the detection result of the sample, and the accurate sample detection result can be obtained only when the light intensity of the light source is the target light intensity.
In the light intensity adjustment process of the optical detection device in the prior art, an operator is usually required to adjust the voltage of the light source of the optical detection device for multiple times, so that the gray value of the image acquired by the optical detection device is the target gray value. However, this method of adjusting the light intensity is inefficient and requires frequent operation of the optical detection device by the operator, which increases the labor intensity of the operator.
Disclosure of Invention
In order to solve the technical problem, the application provides a light intensity adjusting method, a light intensity adjusting system and an optical detection device, so as to achieve the purposes of improving the light source adjusting efficiency of the optical detection device and reducing the labor intensity of an operator in the light intensity adjusting process.
In order to achieve the technical purpose, the embodiment of the application provides the following technical scheme:
an optical intensity adjusting method applied to an optical detection device and configured to acquire images of an object under test under different optical intensities, the optical intensity adjusting method comprising:
providing light intensity adjusting parameters, wherein the light intensity adjusting parameters comprise a target gray value and light source adjustable parameters;
acquiring a gray scale range to be searched of an image of an object to be detected through the optical detection equipment according to the adjustable parameters of the light source;
and when the target gray value is within the gray range to be searched, calculating to obtain a target parameter value according to the target gray value and the gray range to be searched, so that the optical detection equipment determines the target light intensity according to the target parameter value.
Optionally, the optical detection device includes an optical filter, the optical filter is used for adjusting the light intensity of the light beam emitted by the light source, and according to the adjustable parameter of the light source, the gray scale range to be searched for by acquiring the image of the object to be detected by the optical detection device includes:
and acquiring the gray scale range to be searched of the image of the object to be detected under the current optical filter by the optical detection equipment according to the adjustable parameters of the light source.
Optionally, when the target gray value is not within the gray range to be searched, replacing the current optical filter of the optical detection device according to the target gray value and the gray range to be searched, and returning to the step of obtaining the gray range to be searched of the image of the object to be detected under the current optical filter through the optical detection device according to the light source adjustable parameter.
Optionally, the replacing the current optical filter of the optical detection device according to the target gray value and the gray range to be searched includes:
judging whether the target gray value is larger than the upper limit gray value of the gray range to be searched, if so, switching the optical filter with the optical filtering capacity larger than that of the current optical filter into a new current optical filter; if not, the filter with the filtering capability smaller than that of the current filter is switched to a new current filter.
Optionally, the light intensity adjustment parameter further includes a reference target parameter value, and before the obtaining of the gray scale range to be searched of the image of the object to be detected by the optical detection device according to the light source adjustable parameter, the method further includes:
acquiring a gray value of a shot image of the optical detection equipment when an input parameter is a reference target parameter value as a reference gray value;
and determining the gray scale range to be searched according to the reference gray scale value, the target gray scale value and the acquisition gray scale range of the optical detection equipment.
Optionally, the determining the gray scale range to be searched according to the reference gray scale value, the target gray scale value and the collected gray scale range of the optical detection device includes:
judging whether the target gray value is larger than the reference gray value, if so, taking the gray value from the reference gray value to the upper limit range of the collection gray range of the optical detection equipment as the gray range to be searched; and if not, taking the lower limit of the acquisition gray scale range of the optical detection equipment to the gray scale value in the reference gray scale value range as the gray scale range to be searched.
Optionally, the gray scale range to be searched is a set including a plurality of different gray scale values;
the condition that the target gray value is in the range to be searched comprises the following conditions: the target gray value is larger than the minimum gray value in the gray range to be searched and smaller than the maximum gray value in the gray range to be searched.
Optionally, the calculating to obtain the target parameter value according to the target gray value and the gray range to be searched includes:
judging whether the gray scale value to be searched comprises a gray scale value which is the same as the target gray scale value or not, if so, acquiring a light source adjustable parameter value corresponding to the target gray scale value as the target parameter value;
if not, determining a first gray value and a second gray value in the gray range to be searched, acquiring a first light source adjustable parameter value corresponding to the first gray value and a second light source adjustable parameter value corresponding to the second gray value, and determining a light source adjustable parameter value corresponding to the target gray value as the target parameter value according to the gray value corresponding to the target gray value and the average value of the first light source adjustable parameter value and the second light source adjustable parameter value;
the first gray value is the gray value which is closest to the target gray value in the gray values which are larger than the target gray value in the gray range to be searched; and the second gray value is the gray value which is closest to the target gray value in the gray values which are smaller than the target gray value in the gray range to be searched.
Optionally, the determining, according to the gray value corresponding to the target gray value and the average value of the first light source adjustable parameter value and the second light source adjustable parameter value, the light source adjustable parameter value corresponding to the target gray value as the target parameter value includes:
taking the average value of the first light source adjustable parameter value and the second light source adjustable parameter value as a parameter value to be confirmed;
judging whether the difference value between the target gray value and the gray value corresponding to the parameter value to be confirmed is larger than a preset threshold value, and if not, taking the parameter value to be confirmed as the target parameter value;
if so, judging whether the gray value corresponding to the parameter value to be confirmed is larger than the target gray value, if so, taking the difference value between the parameter value to be confirmed and a preset increment as a new parameter value to be confirmed, and returning to the step of judging whether the difference value between the target gray value and the gray value corresponding to the parameter value to be confirmed is larger than a preset threshold value; and if not, taking the sum of the parameter value to be confirmed and the preset increment as a new parameter value to be confirmed, and returning to the step of judging whether the difference value of the target gray value and the gray value corresponding to the parameter value to be confirmed is larger than a preset threshold value or not.
Optionally, the determining, according to the gray value corresponding to the target gray value and the average value of the first light source adjustable parameter value and the second light source adjustable parameter value, the light source adjustable parameter value corresponding to the target gray value as the target parameter value includes:
taking the average value of the first light source adjustable parameter value and the second light source adjustable parameter value as a parameter value to be confirmed;
judging whether the difference value between the target gray value and the gray value corresponding to the parameter value to be confirmed is larger than a preset threshold value, and if not, taking the parameter value to be confirmed as the target parameter value;
if so, judging whether the adjusting times are larger than a preset maximum value, and if so, outputting adjusting failure information;
if not, when the gray value corresponding to the parameter value to be confirmed is larger than the target gray value, taking the difference value between the parameter value to be confirmed and a preset increment as a new parameter value to be confirmed, adding 1 to the adjustment frequency, and returning to the step of judging whether the difference value between the target gray value and the gray value corresponding to the parameter value to be confirmed is larger than a preset threshold value or not;
and when the gray value corresponding to the parameter value to be confirmed is smaller than the target gray value, taking the sum of the parameter value to be confirmed and the preset increment as a new parameter value to be confirmed, adding 1 to the adjustment frequency, and returning to the step of judging whether the difference value of the target gray value and the gray value corresponding to the parameter value to be confirmed is larger than a preset threshold value or not.
Optionally, the adjustable parameters of the light source include: voltage, current, or power of the light source.
An optical intensity adjustment system applied to an optical detection device and configured to acquire images of an object under test under different optical intensities, the optical intensity adjustment system comprising:
the parameter acquisition module is used for providing light intensity adjustment parameters, and the light intensity adjustment parameters comprise a target gray value and light source adjustable parameters;
the first gray scale acquisition module is used for acquiring a gray scale range to be searched of the image of the object to be detected through the optical detection equipment according to the adjustable parameter of the light source;
and the first judgment module is used for calculating and obtaining a target parameter value according to the target gray value and the gray range to be searched when the target gray value is within the gray range to be searched, so that the optical detection equipment determines the target light intensity according to the target parameter value.
Optionally, the optical detection device includes an optical filter, the optical filter is used to adjust the light intensity of the light beam emitted by the light source, and the first gray level obtaining module is specifically used to obtain the gray level range to be searched of the image of the object to be detected under the current optical filter through the optical detection device according to the light source adjustable parameter.
Optionally, the first determining module is further configured to, when the target gray value is not within the to-be-searched gray range, replace the current optical filter of the optical detection device according to the target gray value and the to-be-searched gray range, and return to the step of obtaining the to-be-searched gray range of the image of the object to be detected under the current optical filter by the optical detection device according to the light source adjustable parameter.
Optionally, the first determining module is configured to, according to the target gray value and the gray range to be searched, replace the current optical filter of the optical detection device, specifically, determine whether the target gray value is greater than an upper limit gray value of the gray range to be searched, and if so, switch the optical filter having a filtering capability greater than that of the current optical filter to a new current optical filter; if not, the filter with the filtering capability smaller than that of the current filter is switched to a new current filter.
Optionally, the light intensity adjusting parameter further includes a reference target parameter value, and the light source adjusting system further includes:
the second gray level acquisition module is used for acquiring a gray level value of a shot image of the optical detection equipment when the input parameter is a reference target parameter value as a reference gray level value;
and the second determining module is used for determining the gray scale range to be searched according to the reference gray scale value, the target gray scale value and the acquisition gray scale range of the optical detection equipment.
Optionally, the first determining module calculates and obtains a target parameter value according to the target gray value and the range of the gray values to be searched,
judging whether the gray scale value to be searched comprises a gray scale value which is the same as the target gray scale value or not, if so, acquiring a light source adjustable parameter value corresponding to the target gray scale value as the target parameter value;
if not, determining a first gray value and a second gray value in the gray range to be searched, acquiring a first light source adjustable parameter value corresponding to the first gray value and a second light source adjustable parameter value corresponding to the second gray value, and determining a light source adjustable parameter value corresponding to the target gray value as the target parameter value according to the gray value corresponding to the target gray value and the average value of the first light source adjustable parameter value and the second light source adjustable parameter value;
the first gray value is the gray value which is closest to the target gray value in the gray values which are larger than the target gray value in the gray range to be searched; and the second gray value is the gray value which is closest to the target gray value in the gray values which are smaller than the target gray value in the gray range to be searched.
Optionally, the first determining module includes:
the first average value calculating unit is used for taking the average value of the first light source adjustable parameter value and the second light source adjustable parameter value as a parameter value to be confirmed;
a first difference value judging unit, configured to judge whether a difference value between the target gray value and a gray value corresponding to the parameter value to be confirmed is greater than a preset threshold, and if not, take the parameter value to be confirmed as the target parameter value;
if so, judging whether the gray value corresponding to the parameter value to be confirmed is larger than the target gray value, if so, taking the difference value between the parameter value to be confirmed and a preset increment as a new parameter value to be confirmed, and returning to the step of judging whether the difference value between the target gray value and the gray value corresponding to the parameter value to be confirmed is larger than a preset threshold value; and if not, taking the sum of the parameter value to be confirmed and the preset increment as a new parameter value to be confirmed, and returning to the step of judging whether the difference value of the target gray value and the gray value corresponding to the parameter value to be confirmed is larger than a preset threshold value or not.
Optionally, the first determining module includes:
the second average value calculating unit is used for taking the average value of the first light source adjustable parameter value and the second light source adjustable parameter value as a parameter value to be confirmed;
a second difference value judging unit, configured to judge whether a difference value between the target gray value and a gray value corresponding to the parameter value to be confirmed is greater than a preset threshold, and if not, take the parameter value to be confirmed as the target parameter value;
if so, judging whether the adjusting times are larger than a preset maximum value, and if so, outputting adjusting failure information;
if not, when the gray value corresponding to the parameter value to be confirmed is larger than the target gray value, taking the difference value between the parameter value to be confirmed and a preset increment as a new parameter value to be confirmed, adding 1 to the adjustment frequency, and returning to the step of judging whether the difference value between the target gray value and the gray value corresponding to the parameter value to be confirmed is larger than a preset threshold value or not;
and when the gray value corresponding to the parameter value to be confirmed is smaller than the target gray value, taking the sum of the parameter value to be confirmed and the preset increment as a new parameter value to be confirmed, adding 1 to the adjustment frequency, and returning to the step of judging whether the difference value of the target gray value and the gray value corresponding to the parameter value to be confirmed is larger than a preset threshold value or not.
An optical detection apparatus comprising a light intensity adjustment system as claimed in any one of the preceding claims.
It can be seen from the above technical solutions that the embodiments of the present application provide a light intensity adjustment method, a light intensity adjustment system, and an optical detection apparatus, wherein the light intensity adjustment method first obtains a light intensity adjustment parameter, and determines a gray scale range to be searched according to a light source adjustable parameter in the light intensity adjustment parameter; then judging whether the target gray value is in the range of the gray value to be searched; when the target gray value is in the gray range to be searched, the light source of the optical detection device can obtain the target gray value under the current optical filter, so that the target parameter value can be obtained by calculation directly according to the target gray value and the gray range to be searched. After obtaining the target parameter value, the operator can obtain the target light intensity by setting the target parameter value. When the light intensity adjusting method is used for setting the target light intensity of the optical detection equipment, the target parameter value can be obtained only by inputting the light intensity adjusting parameter by an operator, then the target light intensity can be obtained by setting the target parameter value, the operation of frequently adjusting the voltage by the operator in the light intensity adjusting process is not needed, the light intensity adjusting efficiency is greatly improved, and the labor intensity of the operator is reduced.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a schematic flow chart of a method for adjusting light intensity according to an embodiment of the present application;
FIG. 2 is a schematic flow chart illustrating a method for adjusting light intensity according to another embodiment of the present application;
FIG. 3 is a flow chart illustrating a method for adjusting light intensity according to another embodiment of the present application;
FIG. 4 is a flowchart illustrating a method for adjusting light intensity according to still another embodiment of the present application;
FIG. 5 is a flow chart illustrating a method for adjusting light intensity according to an alternative embodiment of the present application;
fig. 6 is a schematic diagram of a specific process for calculating and obtaining a target parameter value according to a target gray value and a gray range to be searched according to an embodiment of the present application;
fig. 7 is a schematic diagram of a specific process for calculating and obtaining a target parameter value according to a target gray value and a gray range to be searched according to another embodiment of the present application;
fig. 8 is a schematic diagram of a specific process for obtaining a target parameter value by calculation according to a target gray-scale value and a gray-scale range to be searched according to another embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, 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 application.
As described in the background art, the precise adjustment of the light intensity of the light source of the optical detection device is to ensure whether the detection result is accurate, so that in the prior art, when the light intensity of the light source of the optical detection device is adjusted, an operator needs to set a voltage value first, then use the camera of the optical detection device to shoot under the light intensity of the light source corresponding to the voltage value, analyze whether the average gray value of the picture shot under the light intensity of the light source is the target gray value, and if the average gray value of the picture is not the target gray value, the operator needs to reset the light intensity of the light source of the optical detection device according to the average gray value of the picture until finding the target voltage position which can make the average gray value of the shot picture be the target gray value.
The method for adjusting the light intensity needs an operator to frequently set the voltage and analyze the gray value of the picture to finally obtain the target parameter value. And because the individual difference of the optical detection equipment, even if the same target gray value is the same, different target parameter values are also corresponding to different optical detection equipment, therefore, after the optical detection equipment is replaced, the process is still required to be repeated to adjust the light intensity, the efficiency of adjusting the light intensity is low, and the labor intensity of operators is high.
In view of this, an embodiment of the present application provides a light intensity adjusting method, as shown in fig. 1, applied to an optical detection apparatus, the light intensity adjusting method including:
s101: providing light intensity adjusting parameters, wherein the light intensity adjusting parameters comprise a target gray value and light source adjustable parameters;
s102: acquiring a gray scale range to be searched of an image of an object to be detected through the optical detection equipment according to the adjustable parameters of the light source;
s103: and when the target gray value is within the gray range to be searched, calculating to obtain a target parameter value according to the target gray value and the gray range to be searched, so that the optical detection equipment determines the target light intensity according to the target parameter value.
It should be noted that the adjustable parameter of the light source may be a voltage, a current, a power, or a resistance of the light source, which can determine the light intensity according to the parameter.
As mentioned above, the average gray value of the picture taken by the camera of the optical detection device under the irradiation of the light source is referred to as the gray value of the optical detection device under the current adjustable parameter of the light source; on this basis, the collection gray scale range of the optical detection device specifically refers to: the optical detection device detects a range of minimum gray values to maximum gray values in a picture taken in a current state.
In general, taking the adjustable parameter of the light source as the voltage value as an example, the range of the voltage value that can be set by the optical detection device is fixed. For example, if the voltage value that can be set by the optical detection device is 2V to 5V, when the voltage value is set to 2V by the optical detection device, the average gray value of the photographed picture is the lower limit of the collection gray range of the optical detection device in the current state, and if the gray value is 10, the lower limit of the collection gray range is 10; when the set voltage value of the optical detection device is 5V, the average gray value of the shot picture is the upper limit of the collection gray range of the optical detection device in the current state, and if the gray value is 50, the upper limit of the collection gray range is 50.
Correspondingly, when the gray scale range to be searched is the same as the acquisition gray scale range, under the assumption (that is, when the upper limit of the acquisition gray scale range is 50 and the lower limit is 10), if the target gray scale value is 60, the target gray scale value is not in the gray scale range to be searched because 60 is greater than 50; if the target gray-scale value is 30, the target gray-scale value is within the range of the gray-scale to be searched for because 10 < 30 < 50.
If the target gray value is 30, the target gray value is within the range of the gray value to be searched, which indicates that the light source of the optical detection device can obtain the target gray value in the current state, so that the target parameter value can be obtained by calculation directly according to the target gray value and the range of the gray value to be searched.
After obtaining the target parameter value, the operator can obtain the target light intensity by setting the target parameter value. When the light intensity adjusting method is used for setting the target light intensity of the optical detection equipment, the target parameter value can be obtained only by inputting the light intensity adjusting parameter by an operator, then the target light intensity can be obtained by setting the target parameter value, the operation of frequently adjusting the voltage by the operator in the light intensity adjusting process is not needed, the light intensity adjusting efficiency is greatly improved, and the labor intensity of the operator is reduced.
And aiming at different optical detection devices, the light intensity adjusting method provided by the embodiment of the application can obtain the target parameter value capable of obtaining the target gray value under the optical detection device under the condition of only obtaining the target gray value, and the applicability is high.
In a specific embodiment of the present application, as shown in fig. 2, the optical detection device includes an optical filter, the optical filter is used to adjust the light intensity of the light beam emitted by the light source, and according to the adjustable parameter of the light source, the obtaining of the gray scale range to be searched of the image of the object to be detected by the optical detection device includes:
s1021: and acquiring the gray scale range to be searched of the image of the object to be detected under the current optical filter by the optical detection equipment according to the adjustable parameters of the light source.
Generally, the optical detection device has a plurality of optical filters at the same time; the current optical filter is an optical filter arranged on a light path from light source emergent rays to an object to be detected in the optical detection equipment.
Still referring to fig. 2, when the target gray value is not within the gray range to be searched, replacing the current optical filter of the optical detection device according to the target gray value and the gray range to be searched, and returning to the step of obtaining the gray range to be searched of the image of the object to be detected under the current optical filter through the optical detection device according to the light source adjustable parameter.
Taking the example that the lower limit of the collected gray scale range is 10 and the upper limit of the collected gray scale range is 50; when the acquired light intensity adjustment parameters only comprise a target gray value and light source adjustable parameters, the acquired gray range is the to-be-searched gray range in the process of determining the target parameter values, if the target gray value is 60, the target gray value is not in the to-be-searched gray range, which indicates that the light source of the optical detection equipment cannot acquire the target gray value in the current state, so that after the current optical filter is replaced, the acquired gray range of the optical detection equipment under the current optical filter is taken as the to-be-searched gray range again, and the step of judging the target gray value and the to-be-searched gray range is returned;
it should be noted that, in a general case, when the filtering capability of the current optical filter is stronger, the upper limit gray value of the collection gray range of the optical detection device under the current optical filter is larger; when the filtering capability of the current optical filter is weak, the lower limit gray value of the collection gray range of the optical detection device under the current optical filter is smaller, so, referring to fig. 3, a specific step of replacing the current optical filter of the optical detection device according to the target gray value and the gray range to be searched is given in fig. 3, and the step includes:
s1031: judging whether the target gray value is larger than the upper limit gray value of the gray range to be searched, if so, switching the optical filter with the optical filtering capacity larger than that of the current optical filter into a new current optical filter; if not, the filter with the filtering capability smaller than that of the current filter is switched to a new current filter.
On the basis of the foregoing embodiment, in an embodiment of the present application, as shown in fig. 4, the light intensity adjustment parameter further includes a reference target parameter value, and before the obtaining, by the optical detection device, a gray scale range to be searched of the image of the object to be detected, according to the light source adjustable parameter, the method further includes:
s104: acquiring a gray value of a shot image of the optical detection equipment when an input parameter is a reference target parameter value as a reference gray value;
s105: and determining the gray scale range to be searched according to the reference gray scale value, the target gray scale value and the acquisition gray scale range of the optical detection equipment.
In this embodiment, when the obtained light intensity adjustment parameter includes a reference target parameter value corresponding to the target gray value in addition to the target gray value, a smaller range of the gray value to be searched relative to the collected gray range may be determined through steps S104 and S105, so as to improve the efficiency of determining the target parameter value in the range of the gray value to be searched.
In this embodiment, the reference target parameter value refers to an adjustable parameter value of the light source obtained through an empirical or theoretical method, and when the input parameter is the adjustable parameter value of the light source, the optical detection device can theoretically obtain the target light intensity. That is, when the input parameter is the light source adjustable parameter value, theoretically, the average gray value of the image of the object to be detected, which is obtained by the optical detection device under the illumination of the light source, is the target gray value.
Referring to fig. 5, fig. 5 shows a specific process of determining the gray scale range to be searched according to the reference gray scale value, the target gray scale value and the collected gray scale range of the optical detection device when the light intensity adjustment parameter includes the target gray scale value, the light source adjustable parameter and the reference target parameter value, including:
s1051: judging whether the target gray value is larger than the reference gray value, if so, taking the gray value from the reference gray value to the upper limit range of the collection gray range of the optical detection equipment as the gray range to be searched; and if not, taking the lower limit of the acquisition gray scale range of the optical detection equipment to the gray scale value in the reference gray scale value range as the gray scale range to be searched.
In addition, fig. 4 and 5 also show that when the light intensity adjustment parameter includes a target gray value and a reference target parameter value, it is determined whether the target gray value is within the gray range to be searched, and if so, a target parameter value is obtained by calculation according to the target gray value and the gray range to be searched, so that the optical detection device determines the target light intensity according to the target parameter value; if not, replacing the current optical filter of the optical detection equipment according to the target gray value and the gray range to be searched, and returning to the specific process of taking the acquisition gray range of the optical detection equipment under the current optical filter as the gray range to be searched, wherein the specific process comprises the following steps of:
s106: when the target gray value is within the gray range to be searched, calculating to obtain a target parameter value according to the target gray value and the gray range to be searched, so that the optical detection equipment determines the target light intensity according to the target parameter value;
and when the target gray value is not in the gray range to be searched, replacing the current optical filter of the optical detection equipment according to the target gray value and the gray range to be searched, and returning to the step of determining the gray range to be searched according to the reference gray value, the target gray value and the collected gray range of the optical detection equipment.
In some embodiments of the present application, the gray scale range to be searched may include only one lower limit gray scale value and one upper limit gray scale value; in other embodiments of the present application, the to-be-searched gray scale range further includes a plurality of gray scale values between the lower limit gray scale value and the upper limit gray scale value in addition to the lower limit gray scale value and the upper limit gray scale value, that is, the to-be-searched gray scale range is a set including a plurality of different gray scale values;
correspondingly, the condition that the target gray value is in the range to be searched comprises the following steps: the target gray value is larger than the minimum gray value in the gray range to be searched and smaller than the maximum gray value in the gray range to be searched.
Some embodiments below describe a process of calculating and obtaining a target parameter value according to the target gray value and the gray range to be searched.
In another embodiment of the present application, as shown in fig. 6, the calculating to obtain the target parameter value according to the target gray scale value and the gray scale range to be searched includes:
s1032: judging whether the gray scale value to be searched comprises a gray scale value which is the same as the target gray scale value or not, if so, acquiring a light source adjustable parameter value corresponding to the target gray scale value as the target parameter value;
if not, determining a first gray value and a second gray value in the gray range to be searched, acquiring a first light source adjustable parameter value corresponding to the first gray value and a second light source adjustable parameter value corresponding to the second gray value, and determining a light source adjustable parameter value corresponding to the target gray value as the target parameter value according to the gray value corresponding to the target gray value and the average value of the first light source adjustable parameter value and the second light source adjustable parameter value;
the first gray value is the gray value which is closest to the target gray value in the gray values which are larger than the target gray value in the gray range to be searched; and the second gray value is the gray value which is closest to the target gray value in the gray values which are smaller than the target gray value in the gray range to be searched.
In some embodiments of the present application, the light source adjustable parameter is a voltage, and accordingly, the first light source adjustable parameter value and the second light source adjustable parameter value are both voltage values, and the target parameter value is a voltage value. In some embodiments, the light source adjustable parameter is a current, and accordingly, both the first light source adjustable parameter value and the second light source adjustable parameter value are current values, and the target parameter value is a current value.
Referring to fig. 7, a specific process of determining, by using bisection, a light source adjustable parameter value corresponding to the target gray value as the target parameter value according to the gray value corresponding to the target gray value and the average value of the first light source adjustable parameter value and the second light source adjustable parameter value is shown in fig. 7, and specifically includes:
s1033: taking the average value of the first light source adjustable parameter value and the second light source adjustable parameter value as a parameter value to be confirmed;
s1034: judging whether the difference value between the target gray value and the gray value corresponding to the parameter value to be confirmed is larger than a preset threshold value, and if not, taking the parameter value to be confirmed as the target parameter value;
if so, judging whether the gray value corresponding to the parameter value to be confirmed is larger than the target gray value, if so, taking the difference value between the parameter value to be confirmed and a preset increment as a new parameter value to be confirmed, and returning to the step of judging whether the difference value between the target gray value and the gray value corresponding to the parameter value to be confirmed is larger than a preset threshold value; and if not, taking the sum of the parameter value to be confirmed and the preset increment as a new parameter value to be confirmed, and returning to the step of judging whether the difference value of the target gray value and the gray value corresponding to the parameter value to be confirmed is larger than a preset threshold value or not.
The preset increment refers to a preset step value of the light source adjustable parameter, and still taking the light source adjustable parameter as the voltage as an example, when the light source adjustable parameter is the voltage, the preset increment may be 0.1V or 0.05V, and the like. When the gray value corresponding to the parameter value to be confirmed is larger than the target gray value, the value of the parameter to be confirmed is larger, so that the brightness of the light source is larger, and the condition that the gray value corresponding to the parameter value to be confirmed is larger occurs, and at the moment, the parameter to be confirmed is reduced by making a difference between the parameter value to be confirmed and the preset increment. Similarly, when the gray value corresponding to the parameter value to be confirmed is smaller than the target gray value, which means that the parameter value to be confirmed is smaller, so that the brightness of the light source is smaller, and the gray value corresponding to the parameter value to be confirmed is smaller, the parameter to be confirmed is increased by summing the parameter value to be confirmed and the preset increment, and finally the purpose that the difference value between the target gray value and the gray value corresponding to the parameter value to be confirmed is smaller than the preset threshold value is achieved.
Referring to fig. 8, in fig. 8, another specific process of determining, as the target parameter value, the light source adjustable parameter value corresponding to the target gray value according to the gray value corresponding to the target gray value and the average value of the first light source adjustable parameter value and the second light source adjustable parameter value by using a bisection method is provided, and specifically includes:
s1035: taking the average value of the first light source adjustable parameter value and the second light source adjustable parameter value as a parameter value to be confirmed;
s1036: judging whether the difference value between the target gray value and the gray value corresponding to the parameter value to be confirmed is larger than a preset threshold value, and if not, taking the parameter value to be confirmed as the target parameter value;
if so, judging whether the adjusting times are larger than a preset maximum value, and if so, outputting adjusting failure information;
if not, when the gray value corresponding to the parameter value to be confirmed is larger than the target gray value, taking the difference value between the parameter value to be confirmed and a preset increment as a new parameter value to be confirmed, adding 1 to the adjustment frequency, and returning to the step of judging whether the difference value between the target gray value and the gray value corresponding to the parameter value to be confirmed is larger than a preset threshold value or not;
and when the gray value corresponding to the parameter value to be confirmed is smaller than the target gray value, taking the sum of the parameter value to be confirmed and the preset increment as a new parameter value to be confirmed, adding 1 to the adjustment frequency, and returning to the step of judging whether the difference value of the target gray value and the gray value corresponding to the parameter value to be confirmed is larger than a preset threshold value or not.
In this embodiment, compared to the embodiment shown in fig. 7, a step of determining whether the adjustment frequency is greater than the preset maximum value is added to avoid a situation that a parameter value meeting the requirement cannot be found in the process of determining the target voltage by bisection because the preset threshold is set too small, and the situation enters into a dead cycle.
Optionally, the value range of the preset threshold is 2 to 5, and the value range of the preset maximum value is 3 to 5 times. The smaller the value of the preset threshold value is, the smaller the error of the finally obtained target parameter value is. Generally, the value of the preset threshold cannot exceed 5, and after the value of the preset threshold exceeds 5, the error of the obtained target parameter value may be large, so that the detection accuracy of the optical detection device is problematic.
The following describes the light intensity adjusting system provided in the embodiment of the present application, and the light intensity adjusting system described below and the light intensity adjusting method described above may be referred to correspondingly.
Correspondingly, the embodiment of the present application provides a light intensity adjusting system, which is applied to an optical detection device and configured to be used for acquiring images of an object to be detected under different light intensities, and the light intensity adjusting system includes:
the parameter acquisition module is used for providing light intensity adjustment parameters, and the light intensity adjustment parameters comprise a target gray value and light source adjustable parameters;
the first gray scale acquisition module is used for acquiring a gray scale range to be searched of the image of the object to be detected through the optical detection equipment according to the adjustable parameter of the light source;
and the first judgment module is used for calculating and obtaining a target parameter value according to the target gray value and the gray range to be searched when the target gray value is within the gray range to be searched, so that the optical detection equipment determines the target light intensity according to the target parameter value.
Optionally, the optical detection device includes an optical filter, the optical filter is used to adjust the light intensity of the light beam emitted by the light source, and the first gray level obtaining module is specifically used to obtain the gray level range to be searched of the image of the object to be detected under the current optical filter through the optical detection device according to the light source adjustable parameter.
Optionally, the first determining module is further configured to, when the target gray value is not within the to-be-searched gray range, replace the current optical filter of the optical detection device according to the target gray value and the to-be-searched gray range, and return to the step of obtaining the to-be-searched gray range of the image of the object to be detected under the current optical filter by the optical detection device according to the light source adjustable parameter.
Optionally, the first determining module is configured to, according to the target gray value and the gray range to be searched, replace the current optical filter of the optical detection device, specifically, determine whether the target gray value is greater than an upper limit gray value of the gray range to be searched, and if so, switch the optical filter having a filtering capability greater than that of the current optical filter to a new current optical filter; if not, the filter with the filtering capability smaller than that of the current filter is switched to a new current filter.
Optionally, the light intensity adjusting parameter further includes a reference target parameter value, and the light source adjusting system further includes:
the second gray level acquisition module is used for acquiring a gray level value of a shot image of the optical detection equipment when the input parameter is a reference target parameter value as a reference gray level value;
and the second determining module is used for determining the gray scale range to be searched according to the reference gray scale value, the target gray scale value and the acquisition gray scale range of the optical detection equipment.
Optionally, the second determining module is specifically configured to determine whether the target gray value is greater than the reference gray value, and if so, take the gray value from the reference gray value to the upper limit of the collection gray range of the optical detection device as the gray range to be searched; and if not, taking the lower limit of the acquisition gray scale range of the optical detection equipment to the gray scale value in the reference gray scale value range as the gray scale range to be searched.
Optionally, the gray scale range to be searched is a set including a plurality of different gray scale values;
the condition that the target gray value is in the range to be searched comprises the following conditions: the target gray value is larger than the minimum gray value in the gray range to be searched and smaller than the maximum gray value in the gray range to be searched.
Optionally, the first determining module calculates and obtains a target parameter value according to the target gray value and the range of the gray values to be searched,
judging whether the gray scale value to be searched comprises a gray scale value which is the same as the target gray scale value or not, if so, acquiring a light source adjustable parameter value corresponding to the target gray scale value as the target parameter value;
if not, determining a first gray value and a second gray value in the gray range to be searched, acquiring a first light source adjustable parameter value corresponding to the first gray value and a second light source adjustable parameter value corresponding to the second gray value, and determining a light source adjustable parameter value corresponding to the target gray value as the target parameter value according to the gray value corresponding to the target gray value and the average value of the first light source adjustable parameter value and the second light source adjustable parameter value;
the first gray value is the gray value which is closest to the target gray value in the gray values which are larger than the target gray value in the gray range to be searched; and the second gray value is the gray value which is closest to the target gray value in the gray values which are smaller than the target gray value in the gray range to be searched.
Optionally, the first determining module includes:
the first average value calculating unit is used for taking the average value of the first light source adjustable parameter value and the second light source adjustable parameter value as a parameter value to be confirmed;
a first difference value judging unit, configured to judge whether a difference value between the target gray value and a gray value corresponding to the parameter value to be confirmed is greater than a preset threshold, and if not, take the parameter value to be confirmed as the target parameter value;
if so, judging whether the gray value corresponding to the parameter value to be confirmed is larger than the target gray value, if so, taking the difference value between the parameter value to be confirmed and a preset increment as a new parameter value to be confirmed, and returning to the step of judging whether the difference value between the target gray value and the gray value corresponding to the parameter value to be confirmed is larger than a preset threshold value; and if not, taking the sum of the parameter value to be confirmed and the preset increment as a new parameter value to be confirmed, and returning to the step of judging whether the difference value of the target gray value and the gray value corresponding to the parameter value to be confirmed is larger than a preset threshold value or not.
Optionally, the first determining module includes:
the second average value calculating unit is used for taking the average value of the first light source adjustable parameter value and the second light source adjustable parameter value as a parameter value to be confirmed;
a second difference value judging unit, configured to judge whether a difference value between the target gray value and a gray value corresponding to the parameter value to be confirmed is greater than a preset threshold, and if not, take the parameter value to be confirmed as the target parameter value;
if so, judging whether the adjusting times are larger than a preset maximum value, and if so, outputting adjusting failure information;
if not, when the gray value corresponding to the parameter value to be confirmed is larger than the target gray value, taking the difference value between the parameter value to be confirmed and a preset increment as a new parameter value to be confirmed, adding 1 to the adjustment frequency, and returning to the step of judging whether the difference value between the target gray value and the gray value corresponding to the parameter value to be confirmed is larger than a preset threshold value or not;
and when the gray value corresponding to the parameter value to be confirmed is smaller than the target gray value, taking the sum of the parameter value to be confirmed and the preset increment as a new parameter value to be confirmed, adding 1 to the adjustment frequency, and returning to the step of judging whether the difference value of the target gray value and the gray value corresponding to the parameter value to be confirmed is larger than a preset threshold value or not.
Correspondingly, the embodiment of the application also provides an optical detection device, which comprises the light intensity adjusting system in any embodiment.
The optical detection apparatus includes: the light source is used for emitting detection light to an object to be detected, and the detection light returns to signal light through the object to be detected; and the detector is used for detecting the signal light and acquiring detection information.
The detector is an image sensor and is used for imaging the object to be detected. The optical detection equipment further comprises a processing system which is used for acquiring the detection information of the object to be detected according to the image acquired by the detector.
To sum up, the embodiment of the present application provides a light intensity adjusting method, a system and an optical detection device, wherein the light intensity adjusting method first obtains a target gray value and an acquisition gray range of the optical detection device under a current optical filter, then determines whether the target gray value is within the to-be-searched gray range, and when the target gray value is not within the to-be-searched gray range, it indicates that a light source of the optical detection device cannot obtain the target gray value under the current optical filter, so after the current optical filter is replaced, the acquisition gray range of the optical detection device under the current optical filter is taken as the to-be-searched gray range again, and the step of determining the target gray value and the to-be-searched gray range is returned; when the target gray value is in the gray range to be searched, the light source of the optical detection device can obtain the target gray value under the current optical filter, so that the target parameter value can be obtained by calculation directly according to the target gray value and the gray range to be searched. After obtaining the target parameter value, the operator can obtain the target light intensity by setting the target parameter value. When the light intensity adjusting method is used for setting the target light intensity of the optical detection equipment, the target parameter value can be obtained only by inputting the light intensity adjusting parameter by an operator, then the target light intensity can be obtained by setting the target parameter value, the operation of frequently adjusting the voltage by the operator in the light intensity adjusting process is not needed, the light intensity adjusting efficiency is greatly improved, and the labor intensity of the operator is reduced.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (19)

1. An optical intensity adjusting method applied to an optical detection device and configured to acquire images of an object under test under different optical intensities, the optical intensity adjusting method comprising:
providing light intensity adjusting parameters, wherein the light intensity adjusting parameters comprise a target gray value and light source adjustable parameters;
acquiring a gray scale range to be searched of an image of an object to be detected through the optical detection equipment according to the adjustable parameters of the light source;
and when the target gray value is within the gray range to be searched, obtaining a target parameter value according to the target gray value and the gray range to be searched, so that the optical detection equipment determines the target light intensity according to the target parameter value.
2. The method as claimed in claim 1, wherein the optical detection device comprises a filter for adjusting the light intensity of the light emitted by the light source, and the obtaining the gray scale range to be searched of the image of the object to be detected by the optical detection device according to the light source adjustable parameter comprises:
and acquiring the gray scale range to be searched of the image of the object to be detected under the current optical filter by the optical detection equipment according to the adjustable parameters of the light source.
3. The method according to claim 2, wherein when the target gray value is not within the gray range to be searched, the current optical filter of the optical detection device is replaced according to the target gray value and the gray range to be searched, and the step of obtaining the gray range to be searched of the image of the object to be detected under the current optical filter by the optical detection device according to the adjustable parameter of the light source is returned.
4. The method of claim 3, wherein the replacing the current filter of the optical inspection apparatus according to the target gray scale value and the gray scale range to be searched comprises:
judging whether the target gray value is larger than the upper limit gray value of the gray range to be searched, if so, switching the optical filter with the optical filtering capacity larger than that of the current optical filter into a new current optical filter; if not, the filter with the filtering capability smaller than that of the current filter is switched to a new current filter.
5. The method according to claim 1, wherein the light intensity adjusting parameters further include a reference target parameter value, and before the obtaining of the gray scale range to be searched of the image of the object to be detected by the optical detecting device according to the light source adjusting parameters, the method further includes:
acquiring a gray value of a shot image of the optical detection equipment when an input parameter is a reference target parameter value as a reference gray value;
and determining the gray scale range to be searched according to the reference gray scale value, the target gray scale value and the acquisition gray scale range of the optical detection equipment.
6. The method of claim 5, wherein determining the range of grayscales to be searched for based on the reference grayscale value, the target grayscale value, and the collection grayscale range of the optical detection device comprises:
judging whether the target gray value is larger than the reference gray value, if so, taking the gray value from the reference gray value to the upper limit range of the collection gray range of the optical detection equipment as the gray range to be searched; and if not, taking the lower limit of the acquisition gray scale range of the optical detection equipment to the gray scale value in the reference gray scale value range as the gray scale range to be searched.
7. The method according to claim 1, wherein the gray scale range to be searched is a set comprising a plurality of different gray scale values;
the condition that the target gray value is in the range to be searched comprises the following conditions: the target gray value is larger than the minimum gray value in the gray range to be searched and smaller than the maximum gray value in the gray range to be searched.
8. The method of claim 7, wherein obtaining target parameter values according to the target gray scale value and the gray scale range to be searched comprises:
judging whether the gray scale value to be searched comprises a gray scale value which is the same as the target gray scale value or not, if so, acquiring a light source adjustable parameter value corresponding to the target gray scale value as the target parameter value;
if not, determining a first gray value and a second gray value in the gray range to be searched, acquiring a first light source adjustable parameter value corresponding to the first gray value and a second light source adjustable parameter value corresponding to the second gray value, and determining a light source adjustable parameter value corresponding to the target gray value as the target parameter value according to the gray value corresponding to the target gray value and the average value of the first light source adjustable parameter value and the second light source adjustable parameter value;
the first gray value is the gray value which is closest to the target gray value in the gray values which are larger than the target gray value in the gray range to be searched; and the second gray value is the gray value which is closest to the target gray value in the gray values which are smaller than the target gray value in the gray range to be searched.
9. The method of claim 8, wherein determining the light source adjustable parameter value corresponding to the target gray value as the target parameter value according to the gray value corresponding to the target gray value and the average value of the first light source adjustable parameter value and the second light source adjustable parameter value comprises:
taking the average value of the first light source adjustable parameter value and the second light source adjustable parameter value as a parameter value to be confirmed;
judging whether the difference value between the target gray value and the gray value corresponding to the parameter value to be confirmed is larger than a preset threshold value, and if not, taking the parameter value to be confirmed as the target parameter value;
if so, judging whether the gray value corresponding to the parameter value to be confirmed is larger than the target gray value, if so, taking the difference value between the parameter value to be confirmed and a preset increment as a new parameter value to be confirmed, and returning to the step of judging whether the difference value between the target gray value and the gray value corresponding to the parameter value to be confirmed is larger than a preset threshold value; and if not, taking the sum of the parameter value to be confirmed and the preset increment as a new parameter value to be confirmed, and returning to the step of judging whether the difference value of the target gray value and the gray value corresponding to the parameter value to be confirmed is larger than a preset threshold value or not.
10. The method of claim 8, wherein determining the light source adjustable parameter value corresponding to the target gray value as the target parameter value according to the gray value corresponding to the target gray value and the average value of the first light source adjustable parameter value and the second light source adjustable parameter value comprises:
taking the average value of the first light source adjustable parameter value and the second light source adjustable parameter value as a parameter value to be confirmed;
judging whether the difference value between the target gray value and the gray value corresponding to the parameter value to be confirmed is larger than a preset threshold value, and if not, taking the parameter value to be confirmed as the target parameter value;
if so, judging whether the adjusting times are larger than a preset maximum value, and if so, outputting adjusting failure information;
if not, when the gray value corresponding to the parameter value to be confirmed is larger than the target gray value, taking the difference value between the parameter value to be confirmed and a preset increment as a new parameter value to be confirmed, adding 1 to the adjustment frequency, and returning to the step of judging whether the difference value between the target gray value and the gray value corresponding to the parameter value to be confirmed is larger than a preset threshold value or not;
and when the gray value corresponding to the parameter value to be confirmed is smaller than the target gray value, taking the sum of the parameter value to be confirmed and the preset increment as a new parameter value to be confirmed, adding 1 to the adjustment frequency, and returning to the step of judging whether the difference value of the target gray value and the gray value corresponding to the parameter value to be confirmed is larger than a preset threshold value or not.
11. The method of claim 8, wherein the light source adjustable parameters comprise: voltage, current, or power of the light source.
12. An optical intensity adjustment system applied to an optical detection device and configured to acquire images of an object under test at different optical intensities, the optical intensity adjustment system comprising:
the parameter acquisition module is used for providing light intensity adjustment parameters, and the light intensity adjustment parameters comprise a target gray value and light source adjustable parameters;
the first gray scale acquisition module is used for acquiring a gray scale range to be searched of the image of the object to be detected through the optical detection equipment according to the adjustable parameter of the light source;
and the first judgment module is used for calculating and obtaining a target parameter value according to the target gray value and the gray range to be searched when the target gray value is within the gray range to be searched, so that the optical detection equipment determines the target light intensity according to the target parameter value.
13. The system according to claim 12, wherein the optical detection device comprises a filter, the filter is configured to adjust light intensity of a light beam emitted by the light source, and the first gray scale obtaining module is specifically configured to obtain, through the optical detection device, a gray scale range to be searched of the image of the object under the current filter according to the light source adjustable parameter.
14. The system according to claim 13, wherein the first determining module is further configured to, when the target gray value is not within the gray range to be searched, replace the current optical filter of the optical detection device according to the target gray value and the gray range to be searched, and return to the step of obtaining the gray range to be searched of the image of the object under the current optical filter by the optical detection device according to the light source adjustable parameter.
15. The system of claim 12, wherein the light intensity adjustment parameters further comprise reference target parameter values, the light source adjustment system further comprising:
the second gray level acquisition module is used for acquiring a gray level value of a shot image of the optical detection equipment when the input parameter is a reference target parameter value as a reference gray level value;
the second determining module is used for judging whether the target gray value is larger than the reference gray value or not, and if so, taking the gray value from the reference gray value to the gray value within the upper limit range of the acquisition gray range of the optical detection equipment as the gray range to be searched; and if not, taking the lower limit of the acquisition gray scale range of the optical detection equipment to the gray scale value in the reference gray scale value range as the gray scale range to be searched.
16. The system according to claim 12, wherein the first determining module calculates a target parameter value according to the target gray scale value and the gray scale range to be searched, in particular,
judging whether the gray scale value to be searched comprises a gray scale value which is the same as the target gray scale value or not, if so, acquiring a light source adjustable parameter value corresponding to the target gray scale value as the target parameter value;
if not, determining a first gray value and a second gray value in the gray range to be searched, acquiring a first light source adjustable parameter value corresponding to the first gray value and a second light source adjustable parameter value corresponding to the second gray value, and determining a light source adjustable parameter value corresponding to the target gray value as the target parameter value according to the gray value corresponding to the target gray value and the average value of the first light source adjustable parameter value and the second light source adjustable parameter value;
the first gray value is the gray value which is closest to the target gray value in the gray values which are larger than the target gray value in the gray range to be searched; and the second gray value is the gray value which is closest to the target gray value in the gray values which are smaller than the target gray value in the gray range to be searched.
17. The system of claim 16, wherein the first determining module comprises:
the first average value calculating unit is used for taking the average value of the first light source adjustable parameter value and the second light source adjustable parameter value as a parameter value to be confirmed;
a first difference value judging unit, configured to judge whether a difference value between the target gray value and a gray value corresponding to the parameter value to be confirmed is greater than a preset threshold, and if not, take the parameter value to be confirmed as the target parameter value;
if so, judging whether the gray value corresponding to the parameter value to be confirmed is larger than the target gray value, if so, taking the difference value between the parameter value to be confirmed and a preset increment as a new parameter value to be confirmed, and returning to the step of judging whether the difference value between the target gray value and the gray value corresponding to the parameter value to be confirmed is larger than a preset threshold value; and if not, taking the sum of the parameter value to be confirmed and the preset increment as a new parameter value to be confirmed, and returning to the step of judging whether the difference value of the target gray value and the gray value corresponding to the parameter value to be confirmed is larger than a preset threshold value or not.
18. The system of claim 16, wherein the first determining module comprises:
the second average value calculating unit is used for taking the average value of the first light source adjustable parameter value and the second light source adjustable parameter value as a parameter value to be confirmed;
a second difference value judging unit, configured to judge whether a difference value between the target gray value and a gray value corresponding to the parameter value to be confirmed is greater than a preset threshold, and if not, take the parameter value to be confirmed as the target parameter value;
if so, judging whether the adjusting times are larger than a preset maximum value, and if so, outputting adjusting failure information;
if not, when the gray value corresponding to the parameter value to be confirmed is larger than the target gray value, taking the difference value between the parameter value to be confirmed and a preset increment as a new parameter value to be confirmed, adding 1 to the adjustment frequency, and returning to the step of judging whether the difference value between the target gray value and the gray value corresponding to the parameter value to be confirmed is larger than a preset threshold value or not;
and when the gray value corresponding to the parameter value to be confirmed is smaller than the target gray value, taking the sum of the parameter value to be confirmed and the preset increment as a new parameter value to be confirmed, adding 1 to the adjustment frequency, and returning to the step of judging whether the difference value of the target gray value and the gray value corresponding to the parameter value to be confirmed is larger than a preset threshold value or not.
19. An optical inspection apparatus comprising a light intensity adjustment system as claimed in any one of claims 12 to 18.
CN201910168778.6A 2019-03-06 2019-03-06 Light intensity adjusting method and system and optical detection equipment Active CN111665249B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910168778.6A CN111665249B (en) 2019-03-06 2019-03-06 Light intensity adjusting method and system and optical detection equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910168778.6A CN111665249B (en) 2019-03-06 2019-03-06 Light intensity adjusting method and system and optical detection equipment

Publications (2)

Publication Number Publication Date
CN111665249A true CN111665249A (en) 2020-09-15
CN111665249B CN111665249B (en) 2021-08-31

Family

ID=72381364

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910168778.6A Active CN111665249B (en) 2019-03-06 2019-03-06 Light intensity adjusting method and system and optical detection equipment

Country Status (1)

Country Link
CN (1) CN111665249B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112345452A (en) * 2020-11-06 2021-02-09 罗建华 Lamplight adjusting method, storage medium and system
CN113376099A (en) * 2021-06-29 2021-09-10 安图实验仪器(郑州)有限公司 QPCR (quench-Polish-quench) excitation light intensity automatic adjustment method and QPCR excitation light intensity automatic adjustment system based on standard

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070115213A1 (en) * 2005-11-18 2007-05-24 Chao-Hung Hsu Apparatus and method for luminance adjustment of plasma display panel
CN101193140A (en) * 2006-11-22 2008-06-04 乐金电子(昆山)电脑有限公司 Brightness adjusting method for background lamp for mobile communication terminal
CN101466186A (en) * 2008-12-31 2009-06-24 张家瑞 Drive method and drive device capable of regulating high-power LED lighteness
CN101739991A (en) * 2009-12-03 2010-06-16 深超光电(深圳)有限公司 Liquid crystal display, light-dimming method and device of backlight module
US20120120124A1 (en) * 2010-11-17 2012-05-17 Boe Technology Group Co., Ltd. Voltage adustment method and apparatus of liquid crystal display panel
CN103237177A (en) * 2013-04-24 2013-08-07 广州视睿电子科技有限公司 Light source brightness adjustment method and device
CN103455214A (en) * 2013-08-23 2013-12-18 广州视睿电子科技有限公司 Light source brightness regulating method and device of touch frame
CN103680456A (en) * 2013-12-29 2014-03-26 京东方科技集团股份有限公司 Gray-scale brightness adjusting method and device for three-dimensional liquid crystal display panel
CN104505055A (en) * 2014-12-31 2015-04-08 深圳创维-Rgb电子有限公司 Method and device for adjusting backlight brightness
US20160035264A1 (en) * 2014-07-29 2016-02-04 Samsung Display Co., Ltd. Display device and method of driving the same
US20160173862A1 (en) * 2014-12-10 2016-06-16 Hisense Electric Co., Ltd. Method and device for adjusting grayscale brightness and 3d display device
US20180068602A1 (en) * 2017-07-04 2018-03-08 Shanghai Tianma AM-OLED Co., Ltd. Organic Light-Emitting Display Panel, Method And Apparatus For Testing The Same, And Method For Displaying On The Same
CN107957294A (en) * 2017-11-22 2018-04-24 广东欧珀移动通信有限公司 Ambient light intensity detection method, device, storage medium and electronic equipment

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070115213A1 (en) * 2005-11-18 2007-05-24 Chao-Hung Hsu Apparatus and method for luminance adjustment of plasma display panel
CN101193140A (en) * 2006-11-22 2008-06-04 乐金电子(昆山)电脑有限公司 Brightness adjusting method for background lamp for mobile communication terminal
CN101466186A (en) * 2008-12-31 2009-06-24 张家瑞 Drive method and drive device capable of regulating high-power LED lighteness
CN101739991A (en) * 2009-12-03 2010-06-16 深超光电(深圳)有限公司 Liquid crystal display, light-dimming method and device of backlight module
US20120120124A1 (en) * 2010-11-17 2012-05-17 Boe Technology Group Co., Ltd. Voltage adustment method and apparatus of liquid crystal display panel
CN103237177A (en) * 2013-04-24 2013-08-07 广州视睿电子科技有限公司 Light source brightness adjustment method and device
CN103455214A (en) * 2013-08-23 2013-12-18 广州视睿电子科技有限公司 Light source brightness regulating method and device of touch frame
CN103680456A (en) * 2013-12-29 2014-03-26 京东方科技集团股份有限公司 Gray-scale brightness adjusting method and device for three-dimensional liquid crystal display panel
US20160035264A1 (en) * 2014-07-29 2016-02-04 Samsung Display Co., Ltd. Display device and method of driving the same
US20160173862A1 (en) * 2014-12-10 2016-06-16 Hisense Electric Co., Ltd. Method and device for adjusting grayscale brightness and 3d display device
CN105741792A (en) * 2014-12-10 2016-07-06 青岛海信电器股份有限公司 Gray scale brightness adjusting method, device and 3D display device
CN104505055A (en) * 2014-12-31 2015-04-08 深圳创维-Rgb电子有限公司 Method and device for adjusting backlight brightness
US20180068602A1 (en) * 2017-07-04 2018-03-08 Shanghai Tianma AM-OLED Co., Ltd. Organic Light-Emitting Display Panel, Method And Apparatus For Testing The Same, And Method For Displaying On The Same
CN107957294A (en) * 2017-11-22 2018-04-24 广东欧珀移动通信有限公司 Ambient light intensity detection method, device, storage medium and electronic equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112345452A (en) * 2020-11-06 2021-02-09 罗建华 Lamplight adjusting method, storage medium and system
CN113376099A (en) * 2021-06-29 2021-09-10 安图实验仪器(郑州)有限公司 QPCR (quench-Polish-quench) excitation light intensity automatic adjustment method and QPCR excitation light intensity automatic adjustment system based on standard

Also Published As

Publication number Publication date
CN111665249B (en) 2021-08-31

Similar Documents

Publication Publication Date Title
US10489900B2 (en) Inspection apparatus, inspection method, and program
CN107515481B (en) Display panel detection method and device
TW201702586A (en) Optical film defect detection method and system thereof
CN109167928A (en) Fast automatic exposure method and system based on defects of display panel detection
CN113706495B (en) Machine vision detection system for automatically detecting lithium battery parameters on conveyor belt
CN111665249B (en) Light intensity adjusting method and system and optical detection equipment
KR20180118513A (en) Sheet inspection device and inspection system
CN104581135A (en) Light source brightness detection method and system
CN102479321A (en) Automatic identification system and method of difference image
CN108871185B (en) Method, device and equipment for detecting parts and computer readable storage medium
CN112070762A (en) Mura defect detection method and device for liquid crystal panel, storage medium and terminal
CN116030002A (en) Image defect classification method and system based on high dynamic technology
CN103297799B (en) Testing an optical characteristic of a camera component
CN104766310A (en) Light source detecting system and method
CN108965749A (en) Defect pixel detection and means for correcting and method based on texture recognition
CN116087104A (en) Scanning system and method for line scanning micro-distance camera
CN110148141A (en) A kind of silk-screen optical filter small pieces detection method of counting and equipment
CN113727022B (en) Method and device for collecting inspection image, electronic equipment and storage medium
US10241000B2 (en) Method for checking the position of characteristic points in light distributions
CN116129348A (en) Foreign matter detection method, foreign matter detection device, electronic equipment and computer readable storage medium
CN115690077A (en) Bubble plate back defect detection method and system
CN212409647U (en) Internal thread hole detection device
JP2020036227A (en) Imaging timing control device, imaging system, and imaging method
CN103630547B (en) There is flaw detection method and the pick-up unit thereof of the optical thin film of periodic structure
CN115803610A (en) Image acquisition method and device and storage medium

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
CB02 Change of applicant information

Address after: 518110 101, 201, 301, No.2, Shanghenglang fourth industrial zone, Tongsheng community, Dalang street, Longhua District, Shenzhen City, Guangdong Province

Applicant after: Shenzhen Zhongke feice Technology Co.,Ltd.

Address before: 518110 101, 201, 301, No.2, Shanghenglang fourth industrial zone, Tongsheng community, Dalang street, Longhua District, Shenzhen City, Guangdong Province

Applicant before: Shenzhen Zhongke Flying Test Technology Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant