Light source illumination adjustment method, device, computer equipment and medium

By comparing the difference between the sampling value of the LED light source and the standard sampling value in real time and adjusting the PWM level according to the difference value, the problem of unstable illuminance of the LED light source when the temperature rises or the use time is long, and the stable adjustment of the light source illuminance is achieved.

CN115696671BActive Publication Date: 2025-06-06LUSTER TERABAND PHOTONICS TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211358100.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-01
Publication Date
2025-06-06
Estimated Expiration
2042-11-01

AI Technical Summary

Technical Problem

When the internal temperature of the LED light source increases, the ambient temperature increases or the long service life, the illuminance is unstable, resulting in a decrease in illuminance.

Method used

By obtaining the initial sampling value of the light source in real time, comparing the difference between it and the initial standard sampling value, if the preset threshold is exceeded, the initial PWM level is adjusted to an alternative PWM level, and the illuminance of the light source is adjusted based on the duty cycle of the alternative PWM level. If the alternative sampling value is still unstable, further determine the target standard relationship and preset target adjustment threshold, and update the PWM level to stabilize the light source illuminance.

Benefits of technology

Real-time adjustment of the illuminance of the light source is achieved, and the illuminance of the light source is stabilized, avoiding the reduction in illuminance caused by rising temperatures or long use time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115696671B_ABST
    Figure CN115696671B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of light source illumination adjustment, and specifically, to a method, device, computer equipment and medium for adjusting the illumination of a light source, which can solve the problem of unstable illumination of a light source when the temperature of the light source rises or the light source is used for a long time to a certain extent. The initial sampling value of the light source is obtained in real time, and the relationship between the absolute value of the difference between the initial sampling value and the initial standard sampling value and the preset initial adjustment threshold is determined. If adjustment is required, the PWM level is adjusted multiple times based on the initial standard relationship, and the corresponding light source illumination is verified to be stable according to the target standard relationship corresponding to the adjusted PWM level; if the absolute value of the difference between the sampling value corresponding to the adjusted light source illumination and the initial standard sampling value does not exceed the preset target adjustment threshold, the adjustment is ended, and the illumination of the light source is adjusted through the above process, the illumination of the light source is stabilized, and the reduction of the illumination of the light source in the case of rising internal temperature of the light source, rising ambient temperature or long use of the light source is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of light source illumination adjustment, and in particular to a light source illumination adjustment method, device, computer equipment and medium. Background Art

[0002] In the application field of machine vision, machine vision includes optical lighting and imaging, image acquisition and transmission, data image processing and analysis, information decision-making and execution; among them, the hardware of optical lighting and imaging mainly includes light source, camera and lens, and the light source provides suitable lighting for the application scene.

[0003] LED (Light Emitting Diode) light source is a light emitting diode light source. It has the advantages of small size, long life, high luminous efficiency, strong safety and reliability. It can be used continuously for up to 100,000 hours and is used as a light source for photographing in machine vision inspection systems. In related technologies, taking LED light source as an example, when the lighting is turned on, heat will be generated inside the LED. However, when the temperature inside the light source rises, the ambient temperature rises, or the LED is used for more than about 40,000 hours, the illumination of the LED light source will decrease. Summary of the invention

[0004] In order to solve the problem of unstable light source illumination when the internal temperature of the light source increases, the ambient temperature increases, or the light source is used for a long time, the present application provides a light source illumination adjustment method, device, computer equipment and medium.

[0005] The embodiment of the present application is implemented as follows:

[0006] A first aspect of an embodiment of the present application provides a method for adjusting the illumination of a light source, comprising the following steps:

[0007] Get the initial sampling value of the light source. The light source controls the illumination by the duty cycle in the initial PWM level.

[0008] If the absolute value of the difference between the initial sampling value and the initial standard sampling value is greater than a preset initial adjustment threshold, the initial PWM level is adjusted to an alternative PWM level, and the illumination of the light source is adjusted based on the duty cycle in the alternative PWM level; wherein the initial standard sampling value and the initial PWM level have a corresponding linear relationship in the initial standard relationship;

[0009] If the absolute value of the difference between the candidate sampling value and the initial standard sampling value is greater than the preset initial adjustment threshold, the target standard relationship and the preset target adjustment threshold are determined based on the initial sampling value, the initial PWM level and the candidate sampling value, the candidate PWM level, wherein the candidate sampling value is obtained under the illumination of the light source controlled by the candidate PWM level;

[0010] Based on the target standard relationship, a target PWM level corresponding to the candidate sampling value is determined, and the illumination of the light source is controlled according to the duty cycle in the target PWM level.

[0011] A second aspect of an embodiment of the present application provides a light source illumination adjustment device, comprising an acquisition module, a first determination module, a second determination module and an execution module; wherein:

[0012] An acquisition module is used to acquire an initial sampling value of a light source, where the light source controls the illumination by the duty cycle in the initial PWM level;

[0013] A first determination module, if the absolute value of the difference between the initial sampling value and the initial standard sampling value is greater than a preset initial adjustment threshold, adjusts the initial PWM level to an alternative PWM level, and adjusts the illumination of the light source based on the duty cycle in the alternative PWM level; wherein the initial standard sampling value and the initial PWM level have a corresponding linear relationship in the initial standard relationship;

[0014] The second determination module determines the target standard relationship and the preset target adjustment threshold value based on the initial sampling value, the initial PWM level and the alternative sampling value and the alternative PWM level if the absolute value of the difference between the alternative sampling value and the initial standard sampling value is greater than the preset initial adjustment threshold value, wherein the alternative sampling value is obtained under the illumination of the light source controlled by the alternative PWM level;

[0015] The execution module determines the target PWM level corresponding to the candidate sampling value based on the target standard relationship, and controls the illumination of the light source according to the duty cycle in the target PWM level.

[0016] A third aspect of an embodiment of the present application provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and wherein the processor implements the steps of the light source illumination adjustment method of the first aspect when executing the computer program.

[0017] A fourth aspect of an embodiment of the present application provides a computer storage medium, characterized in that a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the processor executes the steps of the light source illumination adjustment method of the first aspect.

[0018] The beneficial effects of the present application are as follows: by acquiring the initial sampling value of the light source in real time, and judging that the illumination of the light source has changed and needs to be adjusted by the absolute value of the difference between the initial sampling value and the initial standard sampling value exceeding the preset initial adjustment threshold, wherein the initial standard sampling value and the initial PWM level have a corresponding linear relationship in the initial standard relationship; further, adjusting the initial PWM level to an alternative PWM level, and adjusting the illumination of the light source based on the duty cycle in the alternative PWM level; if the absolute value of the difference between the alternative sampling value and the initial standard sampling value obtained under the illumination of the light source controlled by the alternative PWM level is greater than the preset initial adjustment threshold, based on the initial sampling value, the initial PWM level and the alternative sampling value, the alternative PWM level, the target standard relationship and the preset target adjustment threshold can be determined, so as to update the initial standard relationship to the target standard relationship; finally, based on the target standard relationship, determining the target PWM level corresponding to the alternative sampling value, and controlling the illumination of the light source according to the duty cycle in the target PWM level, the illumination of the light source is adjusted through the above process, the illumination of the light source is stabilized, and the reduction of the illumination of the light source in situations such as the increase of the internal temperature of the light source, the increase of the ambient temperature or the long use time of the light source is improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0020] Figure 1 A system block diagram showing the application of the light source illumination adjustment method in some embodiments of the present application;

[0021] Figure 2 A schematic diagram showing a flow chart of a method for adjusting illumination of a light source provided by some embodiments of the present application;

[0022] Figure 3 A schematic diagram showing the relationship between sampling values ​​and PWM levels in some embodiments of the present application is shown;

[0023] Figure 4 A schematic diagram of a process for adjusting the PWM level in some embodiments of the present application is shown;

[0024] Figure 5 A schematic diagram of a process for determining a target standard relationship and a preset target adjustment threshold value according to an embodiment of the present application is shown;

[0025] Figure 6 A schematic diagram showing a flow chart of another method for adjusting illumination of a light source provided in some embodiments of the present application;

[0026] Figure 7 A schematic structural diagram of a light source illumination adjustment device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0027] In order to make the purpose, implementation mode and advantages of the present application clearer, the exemplary implementation mode of the present application will be clearly and completely described below in conjunction with the drawings in the exemplary embodiments of the present application. Obviously, the described exemplary embodiments are only part of the embodiments of the present application, rather than all the embodiments.

[0028] It should be noted that the brief description of terms in this application is only for the convenience of understanding the embodiments described below, and is not intended to limit the embodiments of this application. Unless otherwise specified, these terms should be understood according to their common and usual meanings.

[0029] The terms "first", "second", "third", etc. in the specification and claims of this application and the above drawings are used to distinguish similar or similar objects or entities, and do not necessarily mean to limit a specific order or sequence, unless otherwise noted. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances.

[0030] The terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover but not exclude inclusion, for example, a product or device comprising a list of components is not necessarily limited to all the components expressly listed but may include other components not expressly listed or inherent to such product or device.

[0031] Taking LED light source as an example, the illumination of LED light source controlled by pulse width modulation (PWM) may be unstable when the lighting is turned on. After the lighting is turned on and used for a period of time, heat will be generated inside the LED. If the temperature inside the light source rises, the ambient temperature rises, or the LED is used for a long time, the illumination of the LED light source may decrease and become unstable.

[0032] In the visual system, the output of PWM can be adjusted through algorithms to achieve light source illumination adjustment. In the process of adjusting the light source illumination through PWM, taking the LED light source as an example, there is a linear increasing function relationship between the illumination of the LED light source controlled by PWM and the duty cycle of PWM, that is, the larger the duty cycle of PWM, the greater the illumination of the LED light source.

[0033] In order to solve the above-mentioned unstable illumination of the light source, the embodiments of the present application provide a method, device, computer equipment and medium for adjusting the illumination of the light source, which are applied to the light source control of the visual system, by acquiring the initial sampling value of the light source in real time, and judging that the illumination of the light source has changed and needs to be adjusted by the absolute value of the difference between the initial sampling value and the initial standard sampling value exceeding the preset initial adjustment threshold, wherein the initial standard sampling value and the initial PWM level have a corresponding linear relationship in the initial standard relationship; further, the initial PWM level is adjusted to an alternative PWM level, and the illumination of the light source is adjusted based on the duty cycle in the alternative PWM level; if the illumination of the light source controlled by the alternative PWM level is The absolute value of the difference between the alternative sampling value and the initial standard sampling value obtained under the condition of the above conditions is greater than the preset initial adjustment threshold value. Based on the initial sampling value, the initial PWM level and the alternative sampling value and the alternative PWM level, the target standard relationship and the preset target adjustment threshold value can be determined to update the initial standard relationship to the target standard relationship. Finally, based on the target standard relationship, the target PWM level corresponding to the alternative sampling value is determined, and the illuminance of the light source is controlled according to the duty cycle in the target PWM level. The illuminance of the light source is adjusted through the above process, the illuminance of the light source is stabilized, and the reduction in the illuminance of the light source caused by the increase in the internal temperature of the light source, the increase in the ambient temperature or the long use time of the light source is improved.

[0034] The following is a detailed description of the light source illumination adjustment method, device, computer equipment and medium of the embodiments of the present application in conjunction with the accompanying drawings.

[0035] Figure 1 A system block diagram showing the application of the light source illumination adjustment method in some embodiments of the present application is shown. Figure 1 As shown, the light source system at least includes an LED light source, a photosensitive device and a controller, the photosensitive device is electrically connected to the controller, and the controller is electrically connected to the LED light source.

[0036] The photosensitive device is arranged on one side of the LED light source, or multiple light sensors are arranged, and one or more photosensitive devices can be arranged for each LED light source. The LED illumination is collected by the photosensitive device. The photosensitive device can be connected to the controller through the I2C bus, and the controller adjusts the illumination of the LED light source through the PWM output. The sampling value of the photosensitive device and the illumination of the light source have a linear increasing function relationship within the sampling range, that is, the greater the illumination of the light source, the greater the sampling value.

[0037] It should be understood that since there is a linear increasing function relationship between the illumination of the LED light source and the duty cycle of PWM, there is also a linear increasing function relationship between the sampling value of the photosensitive device and the illumination of the light source within the sampling range, that is, there is also a linear relationship between the sampling value of the photosensitive device and the duty cycle of PWM.

[0038] Figure 2A schematic diagram of a method for adjusting the illumination intensity of a light source is shown in some embodiments of the present application. Figure 2 As shown, an embodiment of the present application provides a method for adjusting the illumination of a light source.

[0039] The light source illumination adjustment method comprises the following steps:

[0040] S110 , obtaining an initial sampling value of the light source, wherein the illumination of the light source is controlled by the duty cycle in the initial PWM level.

[0041] There is a linear increasing function relationship between the illumination of a PWM-controlled light source and the duty cycle of PWM. Therefore, according to the illumination requirements of the actual application scenario of the light source, the illumination of the light source can be controlled by controlling PWM.

[0042] For the initial PWM level, as well as other PWM levels in the embodiments of the present application, the levels can be divided according to the minimum configurable duty cycle. For example, the minimum configurable PWM duty cycle is P. When the PWM level is 1, the corresponding duty cycle is P; when the PWM level is 2, the corresponding duty cycle is 2P; when the PWM level is N, the corresponding duty cycle is NP, and so on.

[0043] That is, the initial PWM level refers to the illumination required for the light source application, and the corresponding level is determined according to the linear increasing function relationship between the illumination of the light source and the duty cycle of the PWM.

[0044] The light source works under the duty cycle control of the initial PWM level. At this time, the illumination of the light source is detected in real time by the photosensitive device to obtain the initial sampling value corresponding to the illumination of the light source.

[0045] The photosensitive device may be a light sensor (Light-Sensor), also called a brightness sensor, which is used to sense light intensity, or an ambient light sensor (Ambient Light Sensor); there is a linear relationship between the sampling value of this type of photosensitive device and the illumination of the light source.

[0046] S120: If the absolute value of the difference between the initial sampling value and the initial standard sampling value is greater than a preset initial adjustment threshold, adjust the initial PWM level to an alternative PWM level, and adjust the illumination of the light source based on the duty cycle in the alternative PWM level.

[0047] Among them, there is a corresponding linear relationship between the initial standard sampling value and the initial PWM level in the initial standard relationship; that is, the initial standard relationship is the linear relationship between the sampling value of the photosensitive device and the duty cycle of the PWM. It should be understood that the initial standard relationship is a linear relationship for adjusting the illumination of the system where the light source is located. If the illumination of the light source is affected by the system startup, the internal temperature of the light source, the ambient temperature, or the long use time of the LED, resulting in unstable illumination of the light source, the data in the initial linear relationship is compared with the actually collected data to determine whether the illumination of the light source needs to be adjusted.

[0048] If the absolute value of the difference between the initial sampling value and the initial standard sampling value is less than or equal to the preset initial adjustment threshold, there is no need to adjust the initial PWM level; the system where the light source is located controls the illumination of the light source through the initial PWM level, and the collected initial sampling value conforms to the sampling data corresponding to the illumination, that is, the illumination of the light source is stable at this time and does not need to be adjusted.

[0049] If the absolute value of the difference between the initial sampling value and the initial standard sampling value is greater than the preset initial adjustment threshold, the initial PWM level is adjusted to the alternative PWM level, and the illumination of the light source is adjusted based on the duty cycle in the alternative PWM level.

[0050] It should be understood that when the initial PWM level and the alternative PWM level correspond to the minimum matching duty cycle, the illumination of the light source is adjusted based on the corresponding duty cycle in the alternative PWM level; and when the initial PWM level and the alternative PWM level correspond to multiple duty cycle data, the illumination of the light source is adjusted based on a certain duty cycle in the alternative PWM level.

[0051] The preset initial adjustment threshold can be determined by data of a linear relationship corresponding to the initial standard relationship.

[0052] For example, the linear relationship corresponding to the initial standard relationship can be determined by the following formula:

[0053] Y=aX+b

[0054] Where Y is the initial standard sampling value, X is the PWM level, and a and b are constants.

[0055] Through the above linear relationship, the preset initial adjustment threshold S=a can be determined.

[0056] Figure 3 A schematic diagram showing the relationship between the sampling value and the PWM level in some embodiments of the present application is shown. Figure 3 As shown, the initial standard relationship is the straight line marked by Y=aX+b in the figure, and (X0, Y1) is a point on the initial standard relationship. For example, when the initial PWM level is X0, the initial standard sampling value of the light source illumination is Y1.

[0057] It should be noted that the initial PWM level and the alternative PWM level are different levels in the PWM level and correspond to different sampling values. In the initial standard relationship, the initial PWM level and the initial sampling value have this linear relationship, and the alternative PWM level and the alternative sampling value also have this linear relationship. Figure 4 FIG. 4 shows a schematic diagram of a process for adjusting the PWM level in some embodiments of the present application. Figure 4 As shown, the initial PWM level is adjusted to the alternative PWM level, including:

[0058] S201 : If the initial sampling value is lower than the initial standard sampling value, the duty cycle is increased from the initial PWM level to the alternative PWM level.

[0059] It should be understood that the alternative PWM level is a level that is greater than the initial PWM level in the initial standard relationship.

[0060] S202: If the initial sampling value is higher than the initial standard sampling value, reduce the duty cycle from the initial PWM level to the alternative PWM level.

[0061] It should be understood that the alternative PWM level is a level that is less than the initial PWM level in the initial standard relationship.

[0062] For example, if the initial PWM level is X0, the initial PWM level is adjusted up to the alternative PWM level, which is one level higher than the initial PWM level, and the alternative PWM level is X0+1; the initial PWM level is adjusted down to the alternative PWM level, which is one level lower than the initial PWM level, and the alternative PWM level is X0-1.

[0063] like Figure 3 As shown, for example, when the collected initial sampling value is Y0, |Y0-Y1|>S (that is, the absolute value of the difference between the initial sampling value and the initial standard sampling value is greater than the preset initial adjustment threshold), and Y0<Y1, the initial PWM level X0 is adjusted to the alternative PWM level X0+1.

[0064] S130: If the absolute value of the difference between the candidate sampling value and the initial standard sampling value is greater than the preset initial adjustment threshold, determine the target standard relationship and the preset target adjustment threshold based on the initial sampling value, the initial PWM level and the candidate sampling value, the candidate PWM level.

[0065] The alternative sampling value is obtained by controlling the illumination of the light source by the duty cycle of the alternative PWM level.

[0066] Based on the comparison between the data in the initial linear relationship and the actually collected data, it is determined whether the candidate sampling value corresponding to the adjusted light source illumination needs further adjustment of the light source illumination.

[0067] If the absolute value of the difference between the candidate sampling value and the initial standard sampling value is less than or equal to the preset initial adjustment threshold, the initial PWM level in the initial standard relationship is adjusted to the candidate PWM level, and the target standard relationship is determined.

[0068] If the alternative PWM level is adjusted up by one level, the initial standard relationship can be adjusted to the target standard relationship: Y = a (X-1) + b, where the variables are the same as those in the initial standard relationship. If the alternative PWM level is adjusted down by one level, the initial standard relationship can be adjusted to the target standard relationship: Y = a (X + 1) + b, where the variables are the same as those in the initial standard relationship.

[0069] If the absolute value of the difference between the candidate sampling value and the initial standard sampling value is greater than the preset initial adjustment threshold, the target standard relationship and the preset target adjustment threshold are determined based on the initial sampling value, the initial PWM level and the candidate sampling value, the candidate PWM level.

[0070] The adjusted data needs to be verified to determine whether it can be used as the target standard relationship and the preset target adjustment threshold. Multiple verifications may be required at this time. When multiple verifications exist, the corresponding alternative PWM levels may include a first alternative PWM level and a second alternative PWM level.

[0071] Figure 5 The schematic diagram of the process of determining the target standard relationship and the preset target adjustment threshold in the embodiment of the present application is shown as follows: Figure 5 As shown, the target standard relationship and the preset target adjustment threshold determination include the following steps:

[0072] S301 : Determine a first intermediate standard relationship and a preset first intermediate adjustment threshold based on an initial sampling value, an initial PWM level, an alternative sampling value, and a first alternative PWM level.

[0073] Among them, the first intermediate standard relationship can be determined based on the initial sampling value, initial PWM level (X0, Y0) and the alternative sampling value, alternative PWM level (X0+1, Y0′), such as Figure 3 Y = a 0 X+b 0 At the same time, the preset initial adjustment threshold is updated to determine the preset first intermediate adjustment value S′=a 0 , determining in the first intermediate standard relationship that the initial standard sampling value corresponds to the first intermediate PWM level.

[0074] S302 , obtaining a first intermediate sampling value of the light source, wherein the first intermediate sampling value is obtained by the light source under a duty cycle controlled illumination of a first intermediate PWM level, and the first intermediate PWM level is an alternative sampling value determined by a first intermediate standard relationship.

[0075] S303. If the absolute value of the difference between the first intermediate sampling value and the initial standard sampling value is greater than the preset first intermediate adjustment threshold, it is necessary to adjust the initial PWM level to a second alternative PWM level, and determine a second intermediate standard relationship and a preset second intermediate adjustment threshold based on the second alternative PWM level, use the second intermediate standard relationship as the target standard relationship, and preset the second intermediate adjustment threshold as the preset target adjustment threshold.

[0076] That is to say, after adjusting to the second alternative PWM level (if the first alternative PWM level is higher than the initial PWM level, the second alternative PWM level is higher than the first alternative PWM level; if the first alternative PWM level is lower than the initial PWM level, the second alternative PWM level is lower than the first alternative PWM level), the operation of step 130 is performed again until the condition of step 340 is met, and the corresponding second intermediate standard relationship is used as the target standard relationship, and the second intermediate adjustment threshold is preset as the preset target adjustment threshold.

[0077] S304: If the absolute value of the difference between the first intermediate sampling value and the initial standard sampling value is less than or equal to the preset first intermediate adjustment threshold, the first intermediate standard relationship is used as the target standard relationship, and the preset first intermediate adjustment threshold is used as the preset target adjustment threshold.

[0078] like Figure 2 As shown, the method further includes: S140, determining a target PWM level corresponding to the candidate sampling value based on the target standard relationship, and controlling the illumination of the light source according to the duty cycle in the target PWM level.

[0079] Figure 6 A schematic diagram of a flow chart of another method for adjusting the illumination intensity of a light source provided in some embodiments of the present application is shown. Figure 6 As shown, the data adjustment of the light source illumination is in an infinite cycle. In each illumination adjustment operation, combined with Figure 3 The linear relationship shown in FIG. 1 is a linear relationship between the illumination intensity of the light source and the illumination intensity of the light source. The method for adjusting the illumination intensity of the light source includes the following steps:

[0080] S210, obtaining an initial sampling value Y0 of the light source, which is the illumination of the light source controlled at the initial PWM level X0.

[0081] It is determined whether the absolute value of the difference between the initial sampling value and the initial standard sampling value exceeds a preset initial adjustment threshold.

[0082] If the absolute value of the difference between the initial sampling value and the initial standard sampling value is less than or equal to the preset initial adjustment threshold, S220, there is no need to adjust the initial PWM level.

[0083] If the absolute value of the difference between the initial sampling value and the initial standard sampling value is greater than the preset initial adjustment threshold, S230, the initial PWM level is adjusted to the alternative PWM level. If the initial sampling value is lower than the initial standard sampling value, the initial PWM level X0 is adjusted up by one level, that is, the alternative PWM level is X0+1; if the initial sampling value is higher than the initial standard sampling value, the initial PWM level X0 is adjusted down by one level, that is, the alternative PWM level is X0-1.

[0084] S240: Obtain adjusted candidate sampling values.

[0085] It is determined whether the absolute value of the difference between the candidate sampling value and the initial standard sampling value exceeds a preset initial adjustment threshold.

[0086] If the absolute value of the difference between the candidate sampling value and the initial standard sampling value is less than or equal to the preset initial adjustment threshold, the process goes to step 290 .

[0087] If the absolute value of the difference between the candidate sampling value and the initial standard sampling value is greater than the preset initial adjustment threshold, S250, based on the initial sampling value, initial PWM level and the candidate sampling value, candidate PWM level, determine a new intermediate standard level and a new preset intermediate adjustment threshold.

[0088] If it is adjusted higher, a new intermediate standard relationship Y=a is determined based on (x0, Y0) and (X0+1, Y0′) 0 X+b 0 If it is lowered, a new intermediate standard relationship Y=a is determined based on (x0, Y0) and (X0-1, Y0′) 0 X+b 0 ; and a new preset intermediate adjustment threshold S′=a 0 .

[0089] S260 , based on the new intermediate standard relationship, determine the intermediate PWM level X1 ′ corresponding to the initial standard sampling value Y1 .

[0090] S270 , obtaining an intermediate sampling value Y1 ′ corresponding to the intermediate PWM level.

[0091] Determine whether the absolute value of the difference between the intermediate sampling value Y1′ and the initial standard sampling value Y1 exceeds the adjustment threshold S′. If not, proceed to step 280; if exceeded, proceed to step 230 and make adjustments again.

[0092] S280: Update the target standard relationship Y=cX+d. The target standard relationship can be Y=a 0X+b 0 OK, it can also be the adjusted Y=a 1 X+b 1 It can also be determined by Y=a(X-1)+b, or Y=a(X+1)+b.

[0093] The embodiment of the present application provides a method for adjusting the illumination of a light source, which is applied to the light source control of a visual system, and obtains the initial sampling value of the light source in real time, and determines that the illumination of the light source has changed and needs to be adjusted by the absolute value of the difference between the initial sampling value and the initial standard sampling value exceeding a preset initial adjustment threshold, wherein the initial standard sampling value and the initial PWM level have a corresponding linear relationship in the initial standard relationship; further, the initial PWM level is adjusted to an alternative PWM level, and the illumination of the light source is adjusted based on the duty cycle in the alternative PWM level; if the alternative sampling value obtained under the illumination of the light source controlled by the alternative PWM level is different from the initial standard sampling value, The absolute value of the difference between the standard sampling values ​​is greater than the preset initial adjustment threshold. Based on the initial sampling value, the initial PWM level and the alternative sampling value, the alternative PWM level, the target standard relationship and the preset target adjustment threshold can be determined to update the initial standard relationship to the target standard relationship; finally, based on the target standard relationship, the target PWM level corresponding to the alternative sampling value is determined, and the illumination of the light source is controlled according to the duty cycle in the target PWM level. The illumination of the light source is adjusted through the above process, the illumination of the light source is stabilized, and the reduction in the illumination of the light source caused by the increase in the internal temperature of the light source, the increase in the ambient temperature or the long use time of the light source is improved.

[0094] Figure 7 A schematic diagram of the structure of a light source illumination adjustment device provided in an embodiment of the present application is shown. Figure 7 The light source illumination adjustment device 700 includes an acquisition module 710 , a first determination module 720 , a second determination module 730 and an execution module 740 .

[0095] An acquisition module is used to acquire an initial sampling value of a light source, where the light source controls the illumination by the duty cycle in the initial PWM level;

[0096] A first determination module, if the absolute value of the difference between the initial sampling value and the initial standard sampling value is greater than a preset initial adjustment threshold, adjusts the initial PWM level to an alternative PWM level, and adjusts the illumination of the light source based on the duty cycle in the alternative PWM level; wherein the initial standard sampling value and the initial PWM level have a corresponding linear relationship in the initial standard relationship;

[0097] The second determination module determines the target standard relationship and the preset target adjustment threshold value based on the initial sampling value, the initial PWM level and the alternative sampling value and the alternative PWM level if the absolute value of the difference between the alternative sampling value and the initial standard sampling value is greater than the preset initial adjustment threshold value, wherein the alternative sampling value is obtained under the illumination of the light source controlled by the alternative PWM level;

[0098] The execution module determines the target PWM level corresponding to the candidate sampling value based on the target standard relationship, and controls the illumination of the light source according to the duty cycle in the target PWM level.

[0099] In some embodiments, the first determination module includes an adjustment unit, and the adjustment unit is used to adjust the initial PWM level to the candidate PWM level, specifically including:

[0100] If the initial sampling value is lower than the initial standard sampling value, the duty cycle is increased from the initial PWM level to the alternative PWM level;

[0101] If the initial sampling value is higher than the initial standard sampling value, the duty cycle is reduced from the initial PWM level to the alternative PWM level.

[0102] In some embodiments, it also includes:

[0103] If the absolute value of the difference between the candidate sampling value and the initial standard sampling value is less than or equal to the preset initial adjustment threshold, the initial PWM level in the initial standard relationship is adjusted to the candidate PWM level, and the target standard relationship is determined.

[0104] In some embodiments, the candidate PWM levels include a first candidate PWM level and a second candidate PWM level, and the second determination module includes an updating unit for determining a target standard relationship and a preset target adjustment threshold based on the initial sampling value, the initial PWM level and the candidate sampling value and the candidate PWM level, specifically including:

[0105] Determine a first intermediate standard relationship and a preset first intermediate adjustment threshold based on the initial sampling value, the initial PWM level, the candidate sampling value, and the first candidate PWM level;

[0106] Acquire a first intermediate sampling value of the light source, wherein the first intermediate sampling value is obtained when the light source is under a duty cycle controlled illumination of a first intermediate PWM level, and the first intermediate PWM level is determined by the candidate sampling value through a first intermediate standard relationship;

[0107] If the absolute value of the difference between the first intermediate sampling value and the initial standard sampling value is greater than the preset first intermediate adjustment threshold, it is necessary to adjust the initial PWM level to a second candidate PWM level, and determine a second intermediate standard relationship and a preset second intermediate adjustment threshold based on the second candidate PWM level, use the second intermediate standard relationship as the target standard relationship, and preset the second intermediate adjustment threshold as the preset target adjustment threshold;

[0108] If the absolute value of the difference between the first intermediate sampling value and the initial standard sampling value is less than or equal to the preset first intermediate adjustment threshold, the first intermediate standard relationship is used as the target standard relationship, and the preset first intermediate adjustment threshold is used as the preset target adjustment threshold.

[0109] The embodiment of the present application provides a light source illumination adjustment device, including an acquisition module, a first determination module, a second determination module and an execution module, which acquires the initial sampling value of the light source in real time, and determines that the illumination of the light source has changed and needs to be adjusted by the absolute value of the difference between the initial sampling value and the initial standard sampling value exceeding a preset initial adjustment threshold, wherein the initial standard sampling value and the initial PWM level have a corresponding linear relationship in the initial standard relationship; further, the initial PWM level is adjusted to an alternative PWM level, and the illumination of the light source is adjusted based on the duty cycle in the alternative PWM level; if the alternative PWM level is obtained under the illumination of the light source, the duty cycle of the alternative PWM level is adjusted; The absolute value of the difference between the selected sampling value and the initial standard sampling value is greater than the preset initial adjustment threshold. Based on the initial sampling value, the initial PWM level and the alternative sampling value, the alternative PWM level, the target standard relationship and the preset target adjustment threshold can be determined to update the initial standard relationship to the target standard relationship; finally, based on the target standard relationship, the target PWM level corresponding to the alternative sampling value is determined, and the illumination of the light source is controlled according to the duty cycle in the target PWM level. The illumination of the light source is adjusted through the above process, the illumination of the light source is stabilized, and the reduction in the illumination of the light source caused by the increase in the internal temperature of the light source, the increase in the ambient temperature or the long use time of the light source is improved.

[0110] The computer device also provided in the embodiment of the present application includes a memory and a processor, the memory stores a computer program, and the processor executes the computer program. The computer program is used to implement the above-mentioned light source illumination adjustment method. The implementation principle and technical effect are similar to those of the above-mentioned method embodiment and will not be repeated here.

[0111] The embodiment of the present application also provides a computer storage medium, on which a computer program is stored. The computer program is executed by a processor to execute the above-mentioned light source illumination adjustment method. Its implementation principle and technical effect are similar to those of the above-mentioned method embodiment, and will not be repeated here.

[0112] The following paragraphs will compare and list the Chinese terms involved in this application specification and their corresponding English terms to facilitate reading and understanding.

[0113] For the convenience of explanation, the above description has been made in conjunction with specific embodiments. However, the above discussion in some embodiments is not intended to be exhaustive or limit the embodiments to the specific forms disclosed above. According to the above teachings, various modifications and variations can be obtained. The selection and description of the above embodiments are to better explain the principles and practical applications, so that those skilled in the art can better use the embodiments and various different variations of the embodiments suitable for specific use considerations.

Claims

1. A method for adjusting the illumination of a light source, It is characterized in that include: Obtaining an initial sampling value of a light source, wherein the light source is controlled in illumination by a duty cycle in an initial PWM level; If the absolute value of the difference between the initial sampling value and the initial standard sampling value is greater than a preset initial adjustment threshold, the initial PWM level is adjusted to an alternative PWM level, and the illumination of the light source is adjusted based on the duty cycle in the alternative PWM level; wherein the initial standard sampling value and the initial PWM level have a corresponding linear relationship in the initial standard relationship; If the absolute value of the difference between the candidate sampling value and the initial standard sampling value is greater than the preset initial adjustment threshold, a target standard relationship and a preset target adjustment threshold are determined based on the initial sampling value, the initial PWM level and the candidate sampling value, the candidate PWM level, wherein the candidate sampling value is obtained when the illumination of the light source is controlled by the candidate PWM level; Based on the target standard relationship, determining the target PWM level corresponding to the candidate sampling value, and controlling the illumination of the light source according to the duty cycle in the target PWM level; the target standard relationship is a linear relationship between the candidate sampling value and the target PWM level; The candidate PWM levels include a first candidate PWM level and a second candidate PWM level, and the determining of a target standard relationship and a preset target adjustment threshold based on the initial sampling value, the initial PWM level, the candidate sampling value, and the candidate PWM level further includes: Determining a first intermediate standard relationship and a preset first intermediate adjustment threshold based on the initial sampling value, the initial PWM level, the candidate sampling value, and the first candidate PWM level; Acquire a first intermediate sampling value of the light source, wherein the first intermediate sampling value is obtained by the light source under a duty cycle controlled illumination of a first intermediate PWM level, and the first intermediate PWM level is determined by the candidate sampling value through the first intermediate standard relationship; If the absolute value of the difference between the first intermediate sampling value and the initial standard sampling value is greater than the preset first intermediate adjustment threshold, the initial PWM level is adjusted to the second candidate PWM level, and a second intermediate standard relationship and a preset second intermediate adjustment threshold are determined based on the second candidate PWM level, the second intermediate standard relationship is used as the target standard relationship, and the preset second intermediate adjustment threshold is used as the preset target adjustment threshold; If the absolute value of the difference between the first intermediate sampling value and the initial standard sampling value is less than or equal to the preset first intermediate adjustment threshold, the first intermediate standard relationship is used as the target standard relationship, and the preset first intermediate adjustment threshold is used as the preset target adjustment threshold.

2. The method for adjusting the illumination intensity of a light source according to claim 1, It is characterized in that The adjusting the initial PWM level to the candidate PWM level comprises: If the initial sampling value is lower than the initial standard sampling value, the duty cycle is increased from the initial PWM level to the alternative PWM level; If the initial sampling value is higher than the initial standard sampling value, the duty cycle is reduced from the initial PWM level to the alternative PWM level.

3. The method for adjusting the light source illumination according to claim 1, It is characterized in that Also includes: If the absolute value of the difference between the candidate sampling value and the initial standard sampling value is less than or equal to the preset initial adjustment threshold, the initial PWM level in the initial standard relationship is adjusted to the candidate PWM level, and the target standard relationship is determined.

4. The method for adjusting the illumination intensity of a light source according to claim 1, It is characterized in that The initial sampling value is determined by collecting data from a photosensitive device, including: When the illumination of the light source is collected by a photosensitive device, the initial sampling value of the light source is determined based on the measurement value of the photosensitive device; or, When the illumination of the light source is collected by a plurality of photosensitive devices, the initial sampling value of the light source is determined based on a plurality of measurement values ​​of the plurality of photosensitive devices.

5. The method for adjusting the illumination intensity of a light source according to claim 1, It is characterized in that The preset initial adjustment threshold is determined based on the initial standard relationship, and the preset target adjustment threshold is determined based on the target standard relationship.

6. The method for adjusting the illumination intensity of a light source according to claim 1, It is characterized in that The initial PWM level, the candidate PWM level, or the target PWM level corresponds to one or more configured duty cycles.

7. A light source illumination adjustment device, It is characterized in that include: An acquisition module, used for acquiring an initial sampling value of a light source, wherein the illumination of the light source is controlled by a duty cycle in an initial PWM level; A first determination module, if the absolute value of the difference between the initial sampling value and the initial standard sampling value is greater than a preset initial adjustment threshold, adjusts the initial PWM level to an alternative PWM level, and adjusts the illumination of the light source based on the duty cycle in the alternative PWM level; wherein the initial standard sampling value and the initial PWM level have a corresponding linear relationship in the initial standard relationship; A second determination module, if the absolute value of the difference between the candidate sampling value and the initial standard sampling value is greater than the preset initial adjustment threshold, determines the target standard relationship and the preset target adjustment threshold based on the initial sampling value, the initial PWM level and the candidate sampling value, the candidate PWM level, wherein the candidate sampling value is obtained when the illumination of the light source is controlled by the candidate PWM level; An execution module determines a target PWM level corresponding to the candidate sampling value based on the target standard relationship, and controls the illumination of the light source according to a duty cycle in the target PWM level.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program. It is characterized in that When the processor executes the computer program, the steps of the light source illumination adjustment method according to any one of claims 1 to 6 are implemented.

9. A computer storage medium, It is characterized in that The computer storage medium stores a computer program, and when the computer program is executed by a processor, the processor executes the steps of the light source illumination adjustment method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Light source uniformity adjusting method, system and device

    CN114828355A

  • Lighting Control System and Method

    US20130300305A1