CN112888120A - Method and device for adjusting color temperature of lamp and computer readable storage medium - Google Patents
Method and device for adjusting color temperature of lamp and computer readable storage medium Download PDFInfo
- Publication number
- CN112888120A CN112888120A CN202110039369.3A CN202110039369A CN112888120A CN 112888120 A CN112888120 A CN 112888120A CN 202110039369 A CN202110039369 A CN 202110039369A CN 112888120 A CN112888120 A CN 112888120A
- Authority
- CN
- China
- Prior art keywords
- color temperature
- lamp
- rotation
- angular velocity
- knob
- 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
Links
Images
Classifications
-
- H—ELECTRICITY
- H05—ELECTRIC TECHNIQUES NOT OTHERWISE PROVIDED FOR
- H05B—ELECTRIC HEATING; ELECTRIC LIGHT SOURCES NOT OTHERWISE PROVIDED FOR; CIRCUIT ARRANGEMENTS FOR ELECTRIC LIGHT SOURCES, IN GENERAL
- H05B47/00—Circuit arrangements for operating light sources in general, i.e. where the type of light source is not relevant
- H05B47/10—Controlling the light source
- H05B47/165—Controlling the light source following a pre-assigned programmed sequence; Logic control [LC]
Landscapes
- Circuit Arrangement For Electric Light Sources In General (AREA)
Abstract
The invention discloses a color temperature adjusting method of a lamp, which is applied to a color temperature adjusting device of the lamp, wherein the color temperature adjusting device of the lamp is provided with a knob for adjusting the color temperature of the lamp, and the color temperature adjusting method of the lamp comprises the following steps: acquiring a rotation angle, a rotation direction and a rotation angular velocity of the knob, and determining the color temperature variation of the lamp according to the rotation angle; correcting the color temperature variation according to the rotation angular velocity; determining a target color temperature according to the corrected color temperature variation, the current color temperature of the lamp and the rotation direction; adjusting the color temperature of the lamp to the target color temperature. The invention also discloses a color temperature adjusting device of the lamp and a computer readable storage medium. The invention improves the flexibility of the color temperature adjustment of the lamp.
Description
Technical Field
The invention relates to the technical field of smart home, in particular to a color temperature adjusting method and device of a lamp and a computer readable storage medium.
Background
Along with the improvement of the life quality of people, the smart home lamp with adjustable light is derived. Besides basic lamp source switching and brightness control, the lamp can also realize color temperature adjustment. The color temperature adjustment is to adjust the cold and warm color of the light source, and the red and yellow are warm colors and the blue is cold color, namely, the color temperature of the lamp can be from 100 to infinity.
At present, the color temperature of a lamp can be adjusted through a knob, a unit rotation angle of the knob corresponds to a fixed color temperature adjustment value, when the color temperature of the lamp needs to be adjusted by a user, the knob needs to be rotated by a fixed angle, and the color temperature of the lamp cannot be adjusted flexibly.
Disclosure of Invention
The invention mainly aims to provide a method and a device for adjusting color temperature of a lamp and a computer readable storage medium, aiming at solving the problem of low flexibility of adjusting the color temperature of the lamp.
In order to achieve the above object, the present invention provides a color temperature adjusting method of a lamp, applied to a color temperature adjusting apparatus of a lamp, the color temperature adjusting apparatus of the lamp being provided with a knob for adjusting a color temperature of the lamp, the color temperature adjusting method of the lamp comprising the steps of:
acquiring a rotation angle, a rotation direction and a rotation angular velocity of the knob, and determining the color temperature variation of the lamp according to the rotation angle;
correcting the color temperature variation according to the rotation angular velocity;
determining a target color temperature according to the corrected color temperature variation, the current color temperature of the lamp and the rotation direction;
adjusting the color temperature of the lamp to the target color temperature.
In one embodiment, the step of correcting the color temperature variation amount according to the rotation angular velocity includes:
determining a compensation coefficient corresponding to the rotation angular velocity;
determining a correction value according to the compensation coefficient and the rotation angular velocity;
and correcting the color temperature variation according to the correction value.
In one embodiment, the compensation factor is determined according to a section in which the rotation angular velocity is located, and the factor is larger when the value corresponding to the section is larger; or the compensation coefficient is determined according to the color temperature adjusting range value of the lamp, and the color temperature adjusting range value and the compensation coefficient are in positive correlation.
In one embodiment, the step of correcting the color temperature variation amount according to the rotation angular velocity includes:
determining whether the rotational angular velocity is greater than a first preset velocity;
increasing the color temperature variation according to the rotational angular velocity when the rotational angular velocity is greater than a first preset velocity;
and when the rotation angular velocity is smaller than a second preset velocity, reducing the color temperature variation according to the rotation angular velocity, wherein the second preset velocity is smaller than the first preset velocity.
In one embodiment, the step of acquiring the rotation angle of the knob comprises:
determining a first gear before the knob is rotated and a second gear after the knob is rotated;
determining the gear change quantity of the knob according to the first gear and the second gear;
and determining the rotation angle of the knob according to the gear change quantity and the angle corresponding to the gear of the knob.
In one embodiment, the step of determining the target color temperature according to the modified color temperature variation, the current color temperature of the lamp, and the rotation direction includes:
when the rotating direction is a color temperature increasing direction, increasing the color temperature variation according to the corrected color temperature variation to obtain a target color temperature;
and when the rotating direction is a color temperature reducing direction, reducing the color temperature variable quantity according to the corrected color temperature variable quantity to obtain the target color temperature.
In an embodiment, after the step of determining the color temperature variation of the lamp according to the rotation angle, the method further includes:
judging whether the color temperature variation meets a correction condition;
and executing the step of correcting the color temperature variation according to the rotational angular velocity when the color temperature variation satisfies a correction condition.
In one embodiment, the correction condition includes at least one of:
the rotation angular velocity is greater than a first preset velocity;
the rotation angular velocity is less than a second preset velocity, and the second preset velocity is less than the first preset velocity;
the difference value between the current color temperature and the limit color temperature of the lamp is larger than a first preset difference value, wherein the limit color temperature is the maximum color temperature of the lamp when the rotation direction is the color temperature increasing direction, and the limit color temperature is the minimum color temperature of the lamp when the rotation direction is the color temperature decreasing direction;
the difference between the current color temperature and the limit color temperature of the lamp is smaller than a second preset difference, wherein the limit color temperature is the maximum color temperature of the lamp when the rotation direction is the color temperature increasing direction, the limit color temperature is the minimum color temperature of the lamp when the rotation direction is the color temperature decreasing direction, and the first preset difference is larger than the second preset difference.
In order to achieve the above object, the present invention further provides a device for adjusting color temperature of a lamp, which comprises a knob, a memory, a processor and an adjusting program stored in the memory and operable on the processor, wherein the knob is connected to the processor, and the adjusting program, when executed by the processor, implements the steps of the method for adjusting color temperature of a lamp as described above.
To achieve the above object, the present invention also provides a computer-readable storage medium storing a tuning program which, when executed by a processor, implements the steps of the color temperature tuning method of a lamp as described above.
The color temperature adjusting device of the lamp acquires the rotation angle, the rotation direction and the rotation angular velocity of the knob, determines the color temperature variation of the lamp according to the rotation angle, corrects the color temperature variation according to the rotation angular velocity, determines the target color temperature according to the corrected color temperature variation, the current color temperature and the rotation direction of the lamp, and finally adjusts the color temperature of the lamp to the target color temperature. When the color temperature of the lamp is adjusted, the color temperature change amount corresponding to the rotation angle of the rotation angular velocity correction knob of the knob is introduced, and the rotation angular velocity of the knob represents the rapid adjustment requirement or the slow adjustment requirement of the user on the color temperature of the lamp, so that the color temperature adjusting device of the lamp achieves the purpose of flexibly adjusting the color temperature of the lamp according to the requirement of the user, and the flexibility of adjusting the color temperature of the lamp is improved.
Drawings
Fig. 1 is a schematic hardware configuration diagram of a color temperature adjusting apparatus of a lamp according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart of a first embodiment of a color temperature adjusting method of a lamp according to the present invention;
FIG. 3 is a schematic view of a knob of the color temperature adjusting device of the lamp of the present invention;
FIG. 4 is a schematic flow chart of a second embodiment of the color temperature adjusting method of the lamp according to the present invention;
fig. 5 is a schematic flow chart of a third embodiment of a color temperature adjusting method of a lamp according to the invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The main solution of the embodiment of the invention is as follows: acquiring a rotation angle, a rotation direction and a rotation angular velocity of the knob, and determining the color temperature variation of the lamp according to the rotation angle; correcting the color temperature variation according to the rotation angular velocity; determining a target color temperature according to the corrected color temperature variation, the current color temperature of the lamp and the rotation direction; adjusting the color temperature of the lamp to the target color temperature.
When the color temperature of the lamp is adjusted, the color temperature change amount corresponding to the rotation angle of the rotation angular velocity correction knob of the knob is introduced, and the rotation angular velocity of the knob represents the rapid adjustment requirement or the slow adjustment requirement of the user on the color temperature of the lamp, so that the color temperature adjusting device of the lamp achieves the purpose of flexibly adjusting the color temperature of the lamp according to the requirement of the user, and the flexibility of adjusting the color temperature of the lamp is improved.
As shown in fig. 1, fig. 1 is a schematic hardware structure diagram of a color temperature adjusting device of a lamp according to an embodiment of the present invention.
As shown in fig. 1, an embodiment of the present invention relates to a color temperature adjusting device for a lamp, which is used for adjusting the color temperature of the lamp. The color temperature adjusting apparatus of a lamp may include: a processor 101, e.g. a CPU, a communication bus 102, a memory 103 and knobs 104. Wherein the communication bus 102 is used for enabling connection communication between these components. The memory 103 may be a high-speed RAM memory or a non-volatile memory (e.g., a disk memory). The memory 103 may alternatively be a storage device separate from the aforementioned processor 101. It will be appreciated by the person skilled in the art that the construction shown in fig. 1 does not constitute a definition of the color temperature adjusting means of the lamp, and may comprise more or less components than shown, or some components in combination, or a different arrangement of components.
As shown in fig. 1, a memory 103, which is a kind of computer storage medium, may include therein a regulation program.
In the apparatus shown in fig. 1, the processor 101 may be configured to call the adjustment program stored in the memory 103 and perform the following operations:
acquiring a rotation angle, a rotation direction and a rotation angular velocity of the knob, and determining the color temperature variation of the lamp according to the rotation angle;
correcting the color temperature variation according to the rotation angular velocity;
determining a target color temperature according to the corrected color temperature variation, the current color temperature of the lamp and the rotation direction;
adjusting the color temperature of the lamp to the target color temperature.
In one embodiment, the processor 101 may call the adjustment program stored in the memory 103, and further perform the following operations:
determining a compensation coefficient corresponding to the rotation angular velocity;
determining a correction value according to the compensation coefficient and the rotation angular velocity;
and correcting the color temperature variation according to the correction value.
In one embodiment, the processor 101 may call the adjustment program stored in the memory 103, and further perform the following operations:
the compensation coefficient is determined according to a section where the rotation angular velocity is located, and the coefficient is larger when the value corresponding to the section is larger; or the compensation coefficient is determined according to the color temperature adjusting range value of the lamp, and the color temperature adjusting range value and the compensation coefficient are in positive correlation.
In one embodiment, the processor 101 may call the adjustment program stored in the memory 103, and further perform the following operations:
determining whether the rotational angular velocity is greater than a first preset velocity;
increasing the color temperature variation according to the rotational angular velocity when the rotational angular velocity is greater than a first preset velocity;
and when the rotation angular velocity is smaller than a second preset velocity, reducing the color temperature variation according to the rotation angular velocity, wherein the second preset velocity is smaller than the first preset velocity.
In one embodiment, the processor 101 may call the adjustment program stored in the memory 103, and further perform the following operations:
determining a first gear before the knob is rotated and a second gear after the knob is rotated;
determining the gear change quantity of the knob according to the first gear and the second gear;
and determining the rotation angle of the knob according to the gear change quantity and the angle corresponding to the gear of the knob.
In one embodiment, the processor 101 may call the adjustment program stored in the memory 103, and further perform the following operations:
when the rotating direction is a color temperature increasing direction, increasing the color temperature variation according to the corrected color temperature variation to obtain a target color temperature;
and when the rotating direction is a color temperature reducing direction, reducing the color temperature variable quantity according to the corrected color temperature variable quantity to obtain the target color temperature.
In one embodiment, the processor 101 may call the adjustment program stored in the memory 103, and further perform the following operations:
judging whether the color temperature variation meets a correction condition;
and executing the step of correcting the color temperature variation according to the rotational angular velocity when the color temperature variation satisfies a correction condition.
In one embodiment, the processor 101 may call the adjustment program stored in the memory 103, and further perform the following operations:
the rotation angular velocity is greater than a first preset velocity;
the rotation angular velocity is less than a second preset velocity, and the second preset velocity is less than the first preset velocity;
the difference value between the current color temperature and the limit color temperature of the lamp is larger than a first preset difference value, wherein the limit color temperature is the maximum color temperature of the lamp when the rotation direction is the color temperature increasing direction, and the limit color temperature is the minimum color temperature of the lamp when the rotation direction is the color temperature decreasing direction;
the difference between the current color temperature and the limit color temperature of the lamp is smaller than a second preset difference, wherein the limit color temperature is the maximum color temperature of the lamp when the rotation direction is the color temperature increasing direction, the limit color temperature is the minimum color temperature of the lamp when the rotation direction is the color temperature decreasing direction, and the first preset difference is larger than the second preset difference.
According to the above scheme, the color temperature adjusting device of the lamp acquires the rotation angle, the rotation direction and the rotation angular velocity of the knob, determines the color temperature variation of the lamp according to the rotation angle, corrects the color temperature variation according to the rotation angular velocity, determines the target color temperature according to the corrected color temperature variation, the current color temperature of the lamp and the rotation direction, and finally adjusts the color temperature of the lamp to the target color temperature. When the color temperature of the lamp is adjusted, the color temperature change amount corresponding to the rotation angle of the rotation angular velocity correction knob of the knob is introduced, and the rotation angular velocity of the knob represents the rapid adjustment requirement or the slow adjustment requirement of the user on the color temperature of the lamp, so that the color temperature adjusting device of the lamp achieves the purpose of flexibly adjusting the color temperature of the lamp according to the requirement of the user, and the flexibility of adjusting the color temperature of the lamp is improved.
Based on the hardware architecture of the color temperature adjusting device of the lamp, the embodiment of the color temperature adjusting method of the lamp is provided.
Referring to fig. 2, fig. 2 is a first embodiment of the color temperature adjusting method of a lamp according to the present invention, which includes the steps of:
step S10, obtaining the rotation angle, rotation direction and rotation angular velocity of the knob, and determining the color temperature variation of the lamp according to the rotation angle;
in the present embodiment, the color temperature adjusting device whose subject is a lamp is implemented, and for convenience of description, the device is hereinafter referred to as the color temperature adjusting device of the lamp. The device is provided with a knob, please refer to fig. 3 specifically. The user can adjust the color temperature of the lamp by rotating the knob. The lamp refers to a dimming lamp, and the dimming lamp is used for adjusting the cold and warm color tones of the light source, namely adjusting the red and yellow and other warm colors of the lamp to the blue and other cold colors, or adjusting the blue and other cold colors of the lamp to the red and yellow and other warm colors. The dimming lamp can be a color-adjusting skylight, an environment lamp and a special photographic light supplement lamp.
The knob can be an electrodeless knob, namely the knob can rotate in two directions infinitely. When the knob is rotated, the device can detect the rotation angle of the knob. For example, the rotation shaft of the knob is engaged with the gear, the device records the rotation angle of the gear, and the rotation angle of the gear is the same as the rotation angle of the knob if the gear and the rotation shaft are the same in size. The device may also detect the direction of rotation of the knob and the rotational angular velocity.
The rotation direction is the direction in which the knob rotates, and the direction includes clockwise rotation and counterclockwise rotation.
The rotation angular velocity is the angle of rotation of the knob within the length of rotation. That is, the device starts timing when the knob starts to rotate and stops timing when the knob stops rotating, the obtained timing duration is the rotation duration of the knob, and the device divides the rotation angle of the knob by the rotation duration to obtain the knob duration of the knob.
In addition, the knob can be provided with a rotation gear, and the rotation of the knob is calculated by the gear, that is, the rotation angle is necessarily integral multiple of the angle corresponding to the gear. In this regard, the device may determine a first gear before the rotation of the knob and a second gear after the rotation of the knob, so as to determine the number of gear changes of the knob according to the first gear and the second gear, and each gear of the knob corresponds to a fixed angle. The angle corresponding to the gear is the rotation angle required for the knob to jump from the previous gear to the next gear. The product of the gear change number and the fixed angle is the rotation angle of the knob, namely the rotation angle of the knob is determined by the device according to the gear change number and the angle corresponding to the gear of the knob. For example, if the first gear is the 1 st gear and the second gear is the 6 th gear, the number of the knob changes to 5 gears, and the corresponding angle of each gear is 30 °, and the rotation angle of the knob is 150 °.
After the device determines the knob angle, the rotation direction and the rotation angular velocity of the knob, the device determines the color temperature variation according to the rotation angle. The color temperature change amount is an absolute value. The device stores a mapping relation between the rotation angle and the color temperature change amount, for example, the color temperature change amount corresponding to 1 ° is 5 k. If the rotation angle is 150 °, the color temperature variation is 750 k. If the calculation is carried out by the gear, the color temperature variation is 300k when the knob rotates one gear.
Step S20, correcting the color temperature change amount according to the rotational angular velocity;
in this embodiment, the device may display the current color temperature of the lamp, and the user may make adjustments based on the current color temperature. Based on the visualization of the color temperature, the rotational angular velocity may characterize the user's requirements for adjusting the color temperature. For example, the larger the rotation angular velocity, the faster the color temperature adjustment is required, i.e., the more eager the user is for color temperature adjustment, the most limited the amount of change in the color temperature of the device needs to be increased. It is understood that the larger the rotational angular velocity, the larger the magnitude of increase of the device with respect to the amount of change in color temperature. The device may determine a color temperature increment value according to the rotational angular velocity, the color temperature increment value being larger as the rotational angular velocity is larger, and the device increases the color temperature variation amount according to the color temperature increment value. In this regard, the device may correct the color temperature change amount based on the rotational angular velocity to obtain a corrected rotational angular velocity.
Step S30, determining a target color temperature according to the corrected color temperature variation, the current color temperature of the lamp and the rotation direction;
the rotation direction includes a color temperature increasing direction and a color temperature decreasing direction, for example, when the rotation direction is clockwise rotation, the rotation direction is a color temperature increasing direction; when the rotation direction is counterclockwise rotation, the rotation direction is a color temperature decreasing direction. When the rotating direction is the color temperature increasing direction, the device increases the current color temperature according to the corrected color temperature variation to obtain the target color temperature; and if the rotating direction is the color temperature reducing direction, reducing the current color temperature according to the corrected color temperature variation to obtain the target color temperature.
Step S40, adjusting the color temperature of the lamp to the target color temperature.
After the target color temperature is obtained, the device adjusts the color temperature of the lamp to the target color temperature, so that the color temperature of the lamp is adjusted.
In the technical solution provided in this embodiment, the color temperature adjusting device of the lamp acquires the rotation angle, the rotation direction, and the rotation angular velocity of the knob, determines the color temperature variation of the lamp according to the rotation angle, corrects the color temperature variation according to the rotation angular velocity, determines the target color temperature according to the corrected color temperature variation, the current color temperature of the lamp, and the rotation direction, and finally adjusts the color temperature of the lamp to the target color temperature. When the color temperature of the lamp is adjusted, the color temperature change amount corresponding to the rotation angle of the rotation angular velocity correction knob of the knob is introduced, and the rotation angular velocity of the knob represents the rapid adjustment requirement or the slow adjustment requirement of the user on the color temperature of the lamp, so that the color temperature adjusting device of the lamp achieves the purpose of flexibly adjusting the color temperature of the lamp according to the requirement of the user, and the flexibility of adjusting the color temperature of the lamp is improved.
Referring to fig. 4, fig. 4 is a second embodiment of the color temperature adjusting method of the lamp of the present invention, and based on the first embodiment, the step S20 includes:
step S21 of determining a compensation coefficient corresponding to the rotational angular velocity;
step S22 of determining a correction value based on the compensation coefficient and the rotational angular velocity;
and step S23, correcting the color temperature variation according to the correction value.
In this embodiment, the device is provided with a compensation coefficient corresponding to the rotational angular velocity. The compensation coefficient may be determined according to a section in which the rotational angular velocity is present, and the compensation coefficient may be increased as the value corresponding to the section is increased. In addition, the compensation coefficient can be determined according to the color temperature adjustment range value of the lamp, and the larger the color temperature adjustment range value is, the larger the compensation coefficient is, that is, the color temperature adjustment range value and the compensation coefficient are in a positive correlation relationship.
After the compensation coefficient is obtained, the device can determine a correction value according to the compensation coefficient and the rotation angular velocity. The correction value may be obtained by multiplying the rotation angular velocity by the coefficient. The device corrects the color temperature variation according to the correction value. For example, the corrected color temperature change amount Y is P1 × X + P2, where P1 is a compensation coefficient for an X angular velocity, X is a rotational angular velocity, and P2 is a basic shift position adjustment color temperature change amount. Examples are given below:
if the P1 compensation coefficient is set to be 1, the color temperature variation of P2 basic shift corresponding to the angle of one shift is set to be 300K, and the user rotates the knob by 1 shift in 50ms, which results in 360 degree angle variation, then the X rotation angular velocity: x360 degrees/0.05 seconds 720 degrees/second, the corrected output Y color temperature change amount: y1 × 720+300 — 1020K.
In the technical solution provided in this embodiment, the apparatus determines a compensation coefficient corresponding to the rotational angular velocity, and determines a correction value according to the compensation coefficient and the rotational angular velocity, thereby correcting the color temperature variation according to the correction value.
Referring to fig. 5, fig. 5 is a third embodiment of the color temperature adjusting method of the lamp according to the present invention, and based on the first or second embodiment, the step S20 includes:
a step S24 of determining whether the rotational angular velocity is greater than a first preset velocity;
a step S25 of increasing the color temperature variation amount according to the rotational angular velocity when the rotational angular velocity is greater than a first preset velocity;
and a step S26 of reducing the color temperature change amount according to the rotational angular velocity when the rotational angular velocity is smaller than a second preset velocity, the second preset velocity being smaller than the first preset velocity.
In the embodiment, the rotation angular velocity can reflect the requirement of the user for color temperature adjustment to some extent. The demand may be a fast adjustment demand or a slow adjustment demand, where the fast adjustment demand may be understood as a demand of a user to adjust the color temperature of the lamp to a target color temperature fast, and the slow adjustment demand may be understood as a demand of the user to adjust the color temperature of the lamp to the target color temperature accurately.
In this regard, the apparatus determines whether the rotational angular velocity is greater than a first preset velocity. If the rotational angular velocity is greater than the first preset velocity, it can be determined that the user has a requirement for rapidly increasing the color temperature, and the device increases the color temperature variation according to the rotational angular velocity, that is, the color temperature variation can be increased by Y-P1X + P2. If the rotation angular velocity is smaller than a second preset velocity, the color temperature variation is reduced according to the rotation angular velocity, and the second preset velocity is smaller than the first preset velocity. The device can reduce the color temperature variation by Y-P2-P1X.
When the rotation angular velocity is greater than or equal to the second preset velocity and less than or equal to the first preset velocity, the device does not need to correct the color temperature variation. The first predetermined speed and the second predetermined speed may be any suitable values, and the reduced color temperature variation is greater than or equal to zero when the rotation angular velocity is the second predetermined speed.
In the technical solution provided in this embodiment, the apparatus determines whether the rotational angular velocity is greater than a first preset velocity, and increases the amount of change in color temperature when the rotational angular velocity is greater than the first preset velocity; and if the rotation angular velocity is less than a second preset velocity, reducing the color temperature variation.
In one embodiment, the apparatus determines whether the color temperature variation of the lamp satisfies the correction condition after determining the color temperature variation according to the rotational angular velocity, and if the color temperature variation satisfies the correction condition, the apparatus needs to correct the color temperature variation according to the rotational angular velocity, and if the color temperature variation does not satisfy the correction condition, the apparatus directly adjusts the color temperature of the lamp according to the color temperature variation.
The correction condition includes at least one of:
1. the rotation angular speed of the knob is greater than a first preset speed;
2. the rotation angular speed of the knob is less than a second preset speed;
3. the difference value between the current color temperature and the limit color temperature of the lamp is larger than a first preset difference value, when the rotation direction is the color temperature increasing direction, the limit color temperature is the maximum color temperature of the lamp, and when the rotation direction is the color temperature decreasing direction, the limit color temperature is the minimum color temperature of the lamp;
4. the difference between the current color temperature and the limit color temperature of the lamp is smaller than a second preset difference, the limit color temperature is the maximum color temperature of the lamp when the rotation direction is the color temperature increasing direction, the limit color temperature is the minimum color temperature of the lamp when the rotation direction is the color temperature decreasing direction, and the first preset difference is larger than the second preset difference.
It should be noted that, the difference between the current color temperature and the limit color temperature of the lamp is greater than the first preset difference, that is, it can be determined that the adjustment width between the current color temperature and the maximum color temperature or the minimum color temperature of the lamp is large, and the user can perform rapid color temperature adjustment; and the difference between the current color temperature and the limit color temperature of the lamp is smaller than the second preset difference, namely the adjustment width between the current color temperature and the maximum color temperature or the minimum color temperature of the lamp can be determined to be smaller, and the user can adjust the color temperature with high precision.
The present invention further provides a device for adjusting color temperature of a lamp, the device for adjusting color temperature of a lamp includes a knob, a memory, a processor, and an adjusting program stored in the memory and executable on the processor, the knob is connected to the processor, and the adjusting program, when executed by the processor, implements the steps of the method for adjusting color temperature of a lamp according to the above embodiments.
The present invention also provides a computer-readable storage medium storing a tuning program which, when executed by a processor, implements the steps of the color temperature tuning method of a lamp as described in the above embodiments.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.
Claims (10)
1. A color temperature adjusting method of a lamp, characterized by being applied to a color temperature adjusting device of a lamp provided with a knob for adjusting a color temperature of the lamp, the color temperature adjusting method of the lamp comprising the steps of:
acquiring a rotation angle, a rotation direction and a rotation angular velocity of the knob, and determining the color temperature variation of the lamp according to the rotation angle;
correcting the color temperature variation according to the rotation angular velocity;
determining a target color temperature according to the corrected color temperature variation, the current color temperature of the lamp and the rotation direction;
adjusting the color temperature of the lamp to the target color temperature.
2. The color temperature adjusting method of a lamp according to claim 1, wherein said step of correcting said color temperature changing amount in accordance with said angular velocity of rotation comprises:
determining a compensation coefficient corresponding to the rotation angular velocity;
determining a correction value according to the compensation coefficient and the rotation angular velocity;
and correcting the color temperature variation according to the correction value.
3. The color temperature adjusting method of a lamp according to claim 2, wherein the compensation coefficient is determined in accordance with a section in which the angular velocity of rotation is present, the larger the value corresponding to the section is, the larger the coefficient is; or the compensation coefficient is determined according to the color temperature adjusting range value of the lamp, and the color temperature adjusting range value and the compensation coefficient are in positive correlation.
4. The color temperature adjusting method of a lamp according to claim 1, wherein said step of correcting said color temperature changing amount in accordance with said angular velocity of rotation comprises:
determining whether the rotational angular velocity is greater than a first preset velocity;
increasing the color temperature variation according to the rotational angular velocity when the rotational angular velocity is greater than a first preset velocity;
and when the rotation angular velocity is smaller than a second preset velocity, reducing the color temperature variation according to the rotation angular velocity, wherein the second preset velocity is smaller than the first preset velocity.
5. The method of adjusting color temperature of a lamp according to claim 1, wherein the step of acquiring the rotation angle of the knob comprises:
determining a first gear before the knob is rotated and a second gear after the knob is rotated;
determining the gear change quantity of the knob according to the first gear and the second gear;
and determining the rotation angle of the knob according to the gear change quantity and the angle corresponding to the gear of the knob.
6. The method of claim 1, wherein the step of determining the target color temperature according to the modified color temperature variation, the current color temperature of the lamp, and the rotation direction comprises:
when the rotating direction is a color temperature increasing direction, increasing the color temperature variation according to the corrected color temperature variation to obtain a target color temperature;
and when the rotating direction is a color temperature reducing direction, reducing the color temperature variable quantity according to the corrected color temperature variable quantity to obtain the target color temperature.
7. The color temperature adjusting method of a lamp according to any one of claims 1 to 6, wherein said step of determining a color temperature change amount of the lamp based on said rotation angle is followed by further comprising:
judging whether the color temperature variation meets a correction condition;
and executing the step of correcting the color temperature variation according to the rotational angular velocity when the color temperature variation satisfies a correction condition.
8. The color temperature adjusting method of a lamp according to claim 7, wherein the correction condition includes at least one of:
the rotation angular velocity is greater than a first preset velocity;
the rotation angular velocity is less than a second preset velocity, and the second preset velocity is less than the first preset velocity;
the difference value between the current color temperature and the limit color temperature of the lamp is larger than a first preset difference value, wherein the limit color temperature is the maximum color temperature of the lamp when the rotation direction is the color temperature increasing direction, and the limit color temperature is the minimum color temperature of the lamp when the rotation direction is the color temperature decreasing direction;
the difference between the current color temperature and the limit color temperature of the lamp is smaller than a second preset difference, wherein the limit color temperature is the maximum color temperature of the lamp when the rotation direction is the color temperature increasing direction, the limit color temperature is the minimum color temperature of the lamp when the rotation direction is the color temperature decreasing direction, and the first preset difference is larger than the second preset difference.
9. A color temperature adjusting apparatus for a lamp, characterized in that the color temperature adjusting apparatus for a lamp comprises a knob, a memory, a processor, and an adjusting program stored in the memory and executable on the processor, the knob being connected to the processor, the adjusting program, when executed by the processor, implementing the steps of the color temperature adjusting method for a lamp according to any one of claims 1-8.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a tuning program which, when executed by a processor, implements the steps of the color temperature tuning method of a lamp according to any one of claims 1-8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110039369.3A CN112888120B (en) | 2021-01-12 | 2021-01-12 | Method and device for adjusting color temperature of lamp and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110039369.3A CN112888120B (en) | 2021-01-12 | 2021-01-12 | Method and device for adjusting color temperature of lamp and computer readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112888120A true CN112888120A (en) | 2021-06-01 |
CN112888120B CN112888120B (en) | 2022-10-14 |
Family
ID=76044875
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110039369.3A Active CN112888120B (en) | 2021-01-12 | 2021-01-12 | Method and device for adjusting color temperature of lamp and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112888120B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114554660A (en) * | 2022-01-13 | 2022-05-27 | 广东睿住智能科技有限公司 | Light control method and device, electronic equipment and storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103062658A (en) * | 2012-12-30 | 2013-04-24 | 四川新力光源股份有限公司 | Light emitting diode (LED) illuminating device capable of adjusting color temperature |
CN106529141A (en) * | 2016-10-26 | 2017-03-22 | 天津怡和嘉业医疗科技有限公司 | Parameter adjusting method and apparatus |
CN109068434A (en) * | 2018-04-11 | 2018-12-21 | 长春中国光学科学技术馆 | A kind of displaying device adjusting colour temperature and brightness |
CN109495779A (en) * | 2018-10-15 | 2019-03-19 | 咪咕音乐有限公司 | Bullet screen adjusting method and device and computer readable storage medium |
-
2021
- 2021-01-12 CN CN202110039369.3A patent/CN112888120B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103062658A (en) * | 2012-12-30 | 2013-04-24 | 四川新力光源股份有限公司 | Light emitting diode (LED) illuminating device capable of adjusting color temperature |
CN106529141A (en) * | 2016-10-26 | 2017-03-22 | 天津怡和嘉业医疗科技有限公司 | Parameter adjusting method and apparatus |
CN109068434A (en) * | 2018-04-11 | 2018-12-21 | 长春中国光学科学技术馆 | A kind of displaying device adjusting colour temperature and brightness |
CN109495779A (en) * | 2018-10-15 | 2019-03-19 | 咪咕音乐有限公司 | Bullet screen adjusting method and device and computer readable storage medium |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114554660A (en) * | 2022-01-13 | 2022-05-27 | 广东睿住智能科技有限公司 | Light control method and device, electronic equipment and storage medium |
CN114554660B (en) * | 2022-01-13 | 2024-01-26 | 广东睿住智能科技有限公司 | Light control method, device, electronic equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN112888120B (en) | 2022-10-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108954706B (en) | Control method of air conditioner, air conditioner and storage medium | |
CN106686319B (en) | A kind of control method and its device of image exposure | |
US8350787B2 (en) | Brightness correction device and brightness correction method | |
CN113108434B (en) | Air conditioner, method of controlling the same, and computer-readable storage medium | |
CN109166559A (en) | The gamma value adjustment method and device of display panel | |
CN110830778B (en) | Imaging device color correction method, imaging device color correction device, electronic device and storage medium | |
CN111508450A (en) | Screen color conversion method and device, storage medium and electronic equipment | |
CN112888120B (en) | Method and device for adjusting color temperature of lamp and computer readable storage medium | |
US9329466B2 (en) | Image projection apparatus in which lamp power is determined by measured illuminance | |
US10819885B2 (en) | Gamma value tuning method and device of display panel | |
WO2016192188A1 (en) | Method and terminal for adjusting cpu operation parameter | |
US20130082993A1 (en) | Apparatus and method for controlling image output in projector apparatus | |
CN112432344B (en) | Air conditioner, control method thereof and computer storage medium | |
TWI720862B (en) | Display device and color adjusting method | |
CN114430600B (en) | Breathing lamp control method, knob type switch and storage medium | |
CN114203086A (en) | Method, device and equipment for thermal compensation correction | |
CN112929625A (en) | Display material rendering method and device | |
CN110853578A (en) | Voltage compensation method and device | |
CN113380176B (en) | Method, device, terminal and medium for automatically adjusting display color temperature of screen of mobile terminal | |
WO2018150464A1 (en) | Display device, program and display method | |
CA2363249C (en) | System and method for achieving optimal display contrast in a mobile communication device | |
US20060087581A1 (en) | Exposure control method | |
JPH08320671A (en) | Liquid crystal display device | |
CN113903299B (en) | Display brightness regulation and control method, device, equipment, storage medium and display screen | |
JP6115109B2 (en) | Gamma characteristic acquisition apparatus, method and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
PE01 | Entry into force of the registration of the contract for pledge of patent right | ||
PE01 | Entry into force of the registration of the contract for pledge of patent right |
Denomination of invention: Method, device, and computer-readable storage medium for adjusting the color temperature of lamps Effective date of registration: 20230914 Granted publication date: 20221014 Pledgee: Industrial and Commercial Bank of China Limited Foshan Beijiao sub branch Pledgor: Guangdong Ruizhu Intelligent Technology Co.,Ltd. Registration number: Y2023980056856 |