CN112135402B - RGB light path current adjusting method, terminal equipment and storage medium - Google Patents
RGB light path current adjusting method, terminal equipment and storage medium Download PDFInfo
- Publication number
- CN112135402B CN112135402B CN202011037033.5A CN202011037033A CN112135402B CN 112135402 B CN112135402 B CN 112135402B CN 202011037033 A CN202011037033 A CN 202011037033A CN 112135402 B CN112135402 B CN 112135402B
- Authority
- CN
- China
- Prior art keywords
- current
- channel
- color
- rgb
- maximum
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
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/105—Controlling the light source in response to determined parameters
- H05B47/14—Controlling the light source in response to determined parameters by determining electrical parameters of the light source
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02B—CLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO BUILDINGS, e.g. HOUSING, HOUSE APPLIANCES OR RELATED END-USER APPLICATIONS
- Y02B20/00—Energy efficient lighting technologies, e.g. halogen lamps or gas discharge lamps
- Y02B20/40—Control techniques providing energy savings, e.g. smart controller or presence detection
Landscapes
- Circuit Arrangement For Electric Light Sources In General (AREA)
Abstract
The invention relates to an RGB light path current adjusting method, a terminal device and a storage medium, wherein the method comprises the following steps: s1: calculating the color to be outputInitial current of each channel corresponding to the color; s2: calculating the maximum duty ratio current of each channel according to the initial current and the maximum value of each channel; s3: setting parameter M = I out /I max Wherein, I out Represents the sum of the maximum values of the currents that can be actually output by each channel, I max And the parameter H represents the sum of three paths of maximum duty ratio currents, and the actual output current of each path of channel is set according to the magnitude relation between H and M. The invention combines the characteristics of the output current of the product, improves the actual display effect of RGB three primary colors, improves the accuracy of color output, keeps the maximum luminous flux of color light in real time, improves the customer experience and increases the product competitiveness.
Description
Technical Field
The present invention relates to the field of optical path adjustment, and in particular, to an RGB optical path current adjustment method, a terminal device, and a storage medium.
Background
The common RGB colored lamp controlled by the intelligent module receives the signal of the intelligent module and converts the signal into the current values of the RGB three light sources, and different colors are prepared according to different current values. In practical implementation, white light is generally used as a reference color, the reference color is adjusted according to the light parameters of the actual light source of the lamp to determine the current ratios of the three light sources, and then the current ratios are proportionally reduced according to the maximum driving current and used as the maximum current values of the light sources. The method is simple to implement, but because of the difference of optical parameters of the light sources, the current ratio of each path of light source is not 1.
Disclosure of Invention
In order to solve the above problem, the present invention provides an RGB optical path current adjusting method, a terminal device, and a storage medium.
The specific scheme is as follows:
an RGB light path current regulation method comprises the following steps:
s1: calculating initial current of each channel corresponding to the color to be output according to the reference color current of each channel in the RGB three channels;
s2: calculating the maximum duty ratio current of each channel according to the initial current and the maximum value of each channel;
s3: setting parameter M = I out /I max Wherein, I out Represents the sum of the maximum values of the currents that can be actually output by the channels, I max Representing the maximum value of the current maximum values which can be actually output by each channel, representing the sum of the three maximum duty ratio currents by a parameter H, and judging H>Whether M is true or not is judged, if yes, the actual output current of each channel is set as the product of the ratio of the parameters M and H and the maximum duty ratio current; otherwise, setting the actual output current of each channel as the maximum duty ratio current.
Further, the calculation process of the initial current of each channel corresponding to the color to be output includes: calculating the values of RGB three primary colors corresponding to the color to be output, calculating the duty ratio of each color in the three primary colors according to the values of the three primary colors, and calculating the initial current of each channel in the RGB three channels according to the duty ratio of each color and the reference color current.
Further, setting the values of the three primary colors to be A, B, C respectively, the duty ratio a 1 、B 1 、C 1 Respectively as follows:
A 1 =A/255,B 1 =B/255,C 1 =C/255
setting the reference color current of each color to be D, E, F respectively, then setting the initial current X of each channel in the RGB three channels 1 、Y 1 、Z 1 Respectively as follows:
X 1 =A1*D,Y 1 =B1*E,Z 1 =C1*F。
further, the maximum duty ratio current X of each channel 2 、Y 2 、Z 2 The calculation formulas of (A) and (B) are respectively as follows:
X 2 =X 1 /N,Y 2 =Y 1 /N,Z 2 =Z 1 /N
wherein, X 1 、Y 1 、Z 1 Respectively represents the initial current of each channel in the RGB three channels, and N represents the maximum value in the initial current.
An RGB optical path current adjusting terminal device includes a processor, a memory, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the steps of the method described above in the embodiment of the present invention are implemented.
A computer-readable storage medium, in which a computer program is stored, which, when being executed by a processor, carries out the steps of the method as described above for an embodiment of the invention.
By adopting the technical scheme, the invention combines the characteristics of the output current of the product, improves the actual display effect of RGB three primary colors, improves the accuracy of color output, keeps the maximum luminous flux of color light in real time, improves the customer experience and increases the product competitiveness.
Drawings
Fig. 1 is a flowchart illustrating a first embodiment of the present invention.
Detailed Description
To further illustrate the various embodiments, the invention provides the accompanying drawings. The accompanying drawings, which are incorporated in and constitute a part of this disclosure, illustrate embodiments of the invention and, together with the description, serve to explain the principles of the embodiments. Those skilled in the art will appreciate still other possible embodiments and advantages of the present invention with reference to these figures.
The invention will now be further described with reference to the accompanying drawings and detailed description.
The first embodiment is as follows:
the embodiment of the invention provides an RGB light path current adjusting method, as shown in FIG. 1, the method comprises the following steps:
s1: and calculating the initial current of each channel corresponding to the color to be output according to the reference color current of each channel in the RGB three channels.
The specific calculation steps include:
s11: the values A, B, C of the RGB three primary colors corresponding to the color to be output are calculated.
In this embodiment, hexadecimal color codes are used as the color library data, and the code consists of six hexadecimal codes, where each two bits represent the value of one color in the RGB three primary colors, a, B, and C = [0,255].
In this embodiment, the decoration to be output is a lamp, and after the user selects a color to be output, the hexadecimal code corresponding to each color is obtained from the color library as the value of A, B, C.
S12: calculating duty ratio A of each color in RGB three primary colors according to the values of the three primary colors 1 、B 1 、C 1 :
A 1 =A/255,B 1 =B/255,C 1 =C/255
S13: duty ratio A according to each color 1 、B 1 、C 1 And reference color current D, E, F of each color, calculating initial current X of each channel in the RGB three channels 1 、Y 1 、Z 1 :
X 1 =A1*D,Y 1 =B1*E,Z 1 =C1*F
The initial current is the current control mode of the existing RGB colored lamp.
S2: and calculating the maximum duty ratio current of each channel according to the initial current and the maximum value of each channel.
And step S2 is used for increasing the duty ratio of the current, so that the maximum duty ratio is increased to 100%.
Set maximum value N = MAX (X) in initial current 1 ,Y 1 ,Z 1 ) Then the maximum duty ratio current X of each channel 2 、Y 2 、Z 2 The calculation formulas of (A) and (B) are respectively as follows:
X 2 =X 1 /N,Y 2 =Y 1 /N,Z 2 =Z 1 /N
s3: setting parameter M = I out /I max Wherein, I out Indicates that each channel canSum of the maximum values of the currents actually output, I max Representing the maximum value of the current maximum values which can be actually output by each channel, representing the sum of the three maximum duty ratio currents by a parameter H, and judging H>If M is true, setting the actual output current of each channel as the product of the ratio of the parameters M and H and the maximum duty ratio current, namely the calculation formulas of the actual output current X, Y, Z of each channel are respectively as follows: x = M X 2 /H,Y=M*Y 2 /H,Z=M*Z 2 H; otherwise, setting the actual output current of each channel as the maximum duty ratio current, that is, the actual output currents X, Y, Z of each channel are respectively X = X 2 ,Y=Y 2 ,Z=Z 2 。
Since when the luminaire for some reason may cause I out <3*I max At this time, the actual power cannot reach the theoretical maximum power, and further operation in step S3 is required to ensure the completeness and reliability of the product function and life.
According to the first embodiment of the invention, through the operation of the steps, the characteristics of the output current of the product are combined, the actual display effect of RGB three primary colors is improved, the accuracy of color output is improved, the maximum luminous flux of color light is kept in real time, the customer experience is improved, and the product competitiveness is increased.
Example two:
the invention further provides an RGB optical path current adjusting terminal device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the steps in the above method embodiment of the first embodiment of the invention are implemented.
Further, as an executable scheme, the RGB optical path current adjusting terminal device may be a desktop computer, a mobile phone, a palm computer, a cloud server, or other computing devices. The RGB light path current regulation terminal equipment can comprise, but is not limited to, a processor and a memory. It is understood by those skilled in the art that the above-mentioned RGB optical path current adjusting terminal device is only an example of the RGB optical path current adjusting terminal device, and does not constitute a limitation on the RGB optical path current adjusting terminal device, and may include more or less components than the above, or combine some components, or different components, for example, the RGB optical path current adjusting terminal device may further include an input-output device, a network access device, a bus, and the like, which is not limited by the embodiment of the present invention.
Further, as an executable solution, the Processor may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, a discrete hardware component, and the like. The general processor may be a microprocessor or the processor may be any conventional processor, etc., and the processor is a control center of the RGB optical path current regulation terminal device, and various interfaces and lines are used to connect various parts of the entire RGB optical path current regulation terminal device.
The memory may be configured to store the computer program and/or module, and the processor may implement various functions of the RGB optical path current adjusting terminal device by running or executing the computer program and/or module stored in the memory and calling data stored in the memory. The memory can mainly comprise a program storage area and a data storage area, wherein the program storage area can store an operating system and an application program required by at least one function; the storage data area may store data created according to the use of the mobile phone, and the like. In addition, the memory may include high speed random access memory, and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other volatile solid state storage device.
The invention also provides a computer-readable storage medium, in which a computer program is stored, which, when being executed by a processor, carries out the steps of the above-mentioned method of an embodiment of the invention.
The RGB optical path current adjusting terminal device integrated module/unit, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments may be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, read-Only Memory (ROM), random Access Memory (RAM), software distribution medium, and the like.
While the invention has been particularly shown and described with reference to a preferred embodiment, it will be understood by those skilled in the art that various changes in form and detail may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.
Claims (3)
1. An RGB light path current regulation method is characterized by comprising the following steps:
s1: calculating initial current of each channel corresponding to the color to be output according to the reference color current of each channel in the RGB three channels; the calculation process of the initial current of each channel corresponding to the color to be output comprises the following steps: calculating the value of RGB (red, green and blue) three primary colors corresponding to the color to be output, calculating the duty ratio of each color in the three primary colors according to the value of the three primary colors, and calculating the initial current of each channel in the RGB three channels according to the duty ratio of each color and the reference color current;
setting the values of the three primary colors to be A, B, C respectively, the duty ratio A 1 、B 1 、C 1 Respectively as follows:
A 1 =A/255,B 1 =B/255,C 1 =C/255
setting the reference color current of each color to be D, E, F respectively, then setting the initial current X of each channel in the RGB three channels 1 、Y 1 、Z 1 Respectively as follows:
X 1 =A1*D,Y 1 =B1*E,Z 1 =C1*F
s2: calculating the maximum duty ratio current of each channel according to the initial current and the maximum value of each channel; maximum duty cycle current X of each channel 2 、Y 2 、Z 2 The calculation formulas of (A) and (B) are respectively as follows:
X 2 =X 1 /N,Y 2 =Y 1 /N,Z 2 =Z 1 /N
wherein, X 1 、Y 1 、Z 1 Respectively representing initial currents of all channels in the RGB three channels, wherein N represents the maximum value of the initial currents;
s3: setting parameter M = I out /I max Wherein, I out Represents the sum of the maximum values of the currents that can be actually output by the channels, I max Representing the maximum value of the current maximum values which can be actually output by each channel, representing the sum of the three maximum duty ratio currents by a parameter H, and judging H>Whether M is true or not, if yes, setting the actual output current of each channel as the product of the ratio of the parameters M and H and the maximum duty ratio current; otherwise, setting the actual output current of each channel as the maximum duty ratio current.
2. The utility model provides a RGB light path current regulation terminal equipment which characterized in that: comprising a processor, a memory and a computer program stored in the memory and running on the processor, the processor implementing the steps of the method as claimed in claim 1 when executing the computer program.
3. A computer-readable storage medium storing a computer program, characterized in that: which computer program, when being executed by a processor, carries out the steps of the method as claimed in claim 1.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011037033.5A CN112135402B (en) | 2020-09-28 | 2020-09-28 | RGB light path current adjusting method, terminal equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011037033.5A CN112135402B (en) | 2020-09-28 | 2020-09-28 | RGB light path current adjusting method, terminal equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112135402A CN112135402A (en) | 2020-12-25 |
CN112135402B true CN112135402B (en) | 2022-12-09 |
Family
ID=73840839
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011037033.5A Active CN112135402B (en) | 2020-09-28 | 2020-09-28 | RGB light path current adjusting method, terminal equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112135402B (en) |
Family Cites Families (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101582220B (en) * | 2008-05-13 | 2013-04-17 | 北京中视中科光电技术有限公司 | Control device and control method for display system with a plurality of lasers |
CN101621880B (en) * | 2009-04-16 | 2011-02-16 | 青岛海信电器股份有限公司 | Three-color light source color point adjustment method and adjustment system |
CN105430790B (en) * | 2015-11-13 | 2019-12-27 | 欧普照明股份有限公司 | Light mixing method for LED light source and linear lighting lamp |
CN205179455U (en) * | 2015-11-13 | 2016-04-20 | 欧普照明股份有限公司 | Linear illumination lamps and lanterns |
CN106162981A (en) * | 2016-05-22 | 2016-11-23 | 上海大学 | Light mixing method based on three-primary color LED |
CN107085858B (en) * | 2017-03-24 | 2019-04-05 | 广州市雅江光电设备有限公司 | A kind of bearing calibration of blend color |
DE102017125405B4 (en) * | 2017-10-30 | 2021-03-18 | Melexis Technologies Nv | Method and device for calibrating and operating RGB-LED lighting |
CN110337158B (en) * | 2019-07-01 | 2021-11-05 | 深圳和而泰智能照明有限公司 | Light emitting control method and device of light emitting diode |
-
2020
- 2020-09-28 CN CN202011037033.5A patent/CN112135402B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN112135402A (en) | 2020-12-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110211191B (en) | Mixed color correction method and device, terminal equipment and readable storage medium | |
CN113453396B (en) | WRGB color mixing method and device based on additive color mixing, terminal equipment and storage medium | |
CN110337158B (en) | Light emitting control method and device of light emitting diode | |
CN108337496A (en) | White balancing treatment method, processing unit, processing equipment and storage medium | |
CN111800923B (en) | Light control method and device, readable storage medium and terminal equipment | |
CN104076928A (en) | Method for adjusting color tone of text display area | |
CN104835460A (en) | Image processing apparatus, image processing method, display panel driver and display apparatus | |
WO2022021796A1 (en) | Dynamic control method and system for light device, and related device | |
CN111083834B (en) | LED calibration method, device, equipment and system | |
CN112135402B (en) | RGB light path current adjusting method, terminal equipment and storage medium | |
CN112750171B (en) | Color adjustment method, device, medium and electronic equipment | |
CN113260127B (en) | Color temperature adjusting method, terminal equipment and computer readable storage medium | |
CN104601786A (en) | Method for controlling information reminder light of terminal, and terminal | |
CN117975876A (en) | Display screen correction method, device, computer equipment and storage medium | |
CN113939058A (en) | Color temperature controllable multi-path light source color mixing method and device and terminal equipment | |
CN113129813B (en) | White balance adjusting method and device and computer equipment | |
CN115175401A (en) | RGB LED adjusting method and related assembly | |
CN111653232B (en) | LED screen color gamut calibration method and device | |
CN114449704A (en) | Light control method, system, electronic equipment and computer readable storage device | |
CN114783354A (en) | Color cast compensation method, architecture and medium | |
CN113992900A (en) | White balance correction method, white balance correction device, terminal equipment and computer readable storage medium | |
CN112612992A (en) | Color temperature optimization method and device, terminal equipment and storage medium | |
CN112148288A (en) | Interface color setting method, device, equipment and storage medium | |
WO2024152207A1 (en) | Light-emitting control method and apparatus, electronic device, and computer-readable storage medium | |
WO2019184037A1 (en) | Led dimming method, apparatus and device, and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |