The present invention relates to the field of computer processing, and more particularly relates to a method and apparatus for computing illumination mixed lights, a computer device and a storage medium.
Two mixed colored light is adopted in the traditional method for computing illumination mixed lights, and the obtained mixed colored light is on a straight line of two points no matter how the two-colored lights are mixed. Many points deviate from a point defined in Energy Star, resulting in color tolerance. The color tolerance acceptable to human eyes is within 3SDCM (McAdam ellipse).
However, the traditional method for computing illumination mixed lights is not accurate, and the color tolerance generated by mixing the lights according to this traditional method will be greater than 3SDCM, resulting in poor light mixing effect.
Based on this, it is necessary to provide a method and apparatus for computing illumination mixed lights capable of reducing color tolerance and enhancing light mixing effect, a computer device and a storage medium with respect to the above problems.
In a first aspect, an embodiment of the present invention provides a method for computing illumination mixed lights, including:
acquiring a first chromaticity coordinate point corresponding to a first colored light, and acquiring a second chromaticity coordinate point corresponding to a second colored light;
acquiring a target chromaticity coordinate point, and computing a first lumen mixing ratio of the first colored light and the second colored light according to the target chromaticity coordinate point, the first chromaticity coordinate point and the second chromaticity coordinate point;
determining a middle chromaticity coordinate point corresponding to a middle-colored light obtained by mixing the first colored light and the second colored light according to the first lumen mixing ratio;
determining a first compensation colored light and a second compensation colored light which are matched with the middle chromaticity coordinate point according to the middle chromaticity coordinate point; and
conducting compensation computation on the middle-colored light according to the first compensation colored light and the second compensation colored light, and determining a second lumen mixing ratio corresponding to the first compensation colored light, the second compensation colored light and the middle colored light when mixed to the target chromaticity coordinate point.
In a second aspect, an embodiment of the present invention provides an apparatus for computing illumination mixed lights, including:
a coordinate point acquiring module configured for acquiring a first chromaticity coordinate point corresponding to a first colored light and acquiring a second chromaticity coordinate point corresponding to a second colored light;
a ratio computing module configured for acquiring a target chromaticity coordinate point and computing a first lumen mixing ratio of the first colored light and the second colored light according to the target chromaticity coordinate point, the first chromaticity coordinate point and the second chromaticity coordinate point;
a coordinate point determining module configured for determining a middle chromaticity coordinate point corresponding to a middle-colored light obtained by mixing the first colored light and the second colored light according to the first lumen mixing ratio;
a compensation colored light determining module configured for determining a first compensation colored light and a second compensation colored light which are matched with the middle chromaticity coordinate point according to the middle chromaticity coordinate point; and
a ratio determining module configured for conducting compensation computation on the middle colored light according to the first compensation colored light and the second compensation colored light and determining a second lumen mixing ratio corresponding to the first compensation colored light, the second compensation colored light and the middle colored light when mixed to the target chromaticity coordinate point.
In a third aspect, an embodiment of the present invention provides a computer device, including a memory and a processor, wherein the memory stores computer programs that, when executed by the processor, enable the processor to execute the steps of:
acquiring a first chromaticity coordinate point corresponding to a first colored light, and acquiring a second chromaticity coordinate point corresponding to a second colored light;
acquiring a target chromaticity coordinate point, and computing a first lumen mixing ratio of the first colored light and the second colored light according to the target chromaticity coordinate point, the first chromaticity coordinate point and the second chromaticity coordinate point;
determining a middle chromaticity coordinate point corresponding to a middle-colored light obtained by mixing the first colored light and the second colored light according to the first lumen mixing ratio;
determining a first compensation colored light and a second compensation colored light which are matched with the middle chromaticity coordinate point according to the middle chromaticity coordinate point; and
conducting compensation computation on the middle-colored light according to the first compensation colored light and the second compensation colored light, and determining a second lumen mixing ratio corresponding to the first compensation colored light, the second compensation colored light and the middle colored light when mixed to the target chromaticity coordinate point.
In a fourth aspect, an embodiment of the present invention provides a computer readable storage medium, storing computer programs that, when executed by the processor, enable the processor to execute the steps of:
acquiring a first chromaticity coordinate point corresponding to a first colored light, and acquiring a second chromaticity coordinate point corresponding to a second colored light;
acquiring a target chromaticity coordinate point, and computing a first lumen mixing ratio of the first colored light and the second colored light according to the target chromaticity coordinate point, the first chromaticity coordinate point and the second chromaticity coordinate point;
determining a middle chromaticity coordinate point corresponding to a middle-colored light obtained by mixing the first colored light and the second colored light according to the first lumen mixing ratio;
determining a first compensation colored light and a second compensation colored light which are matched with the middle chromaticity coordinate point according to the middle chromaticity coordinate point; and
conducting compensation computation on the middle-colored light according to the first compensation colored light and the second compensation colored light, and determining a second lumen mixing ratio corresponding to the first compensation colored light, the second compensation colored light and the middle colored light when mixed to the target chromaticity coordinate point.
In the above method and apparatus for computing illumination mixed lights, the computer device and the storage medium, firstly, the first lumen mixing ratio of the first colored light and the second colored light is determined according to the target chromaticity coordinate point; the middle colored light obtained according to the first lumen mixing ratio has a large color tolerance; then, the first compensation colored light and the second compensation colored light are matched according to the middle chromaticity coordinate point; compensation computation is conducted on the middle colored light; and the second lumen mixing ratio corresponding to the first compensation colored light, the second compensation colored light and the middle colored light is determined when mixed to the target chromaticity coordinate point. The first colored light, the second colored light, the first compensation colored light and the second compensation colored light are mixed according to the computed first lumen mixing ratio and the second lumen mixing ratio so that the target chromaticity coordinate point can be completely mixed, thereby greatly reducing the color tolerance and enhancing the light mixing effect.
In order to more clearly describe the embodiment of the present invention or the technical solution in the prior art, drawings to be used in the describing the embodiment or the prior art will be introduced briefly. Apparently, the drawings described below are only some embodiments of the present invention. For those ordinary skilled in the art, other drawings can also be obtained according to the structures shown by these drawings without contributing creative labor.
For the purpose of making objects, technical solutions and advantages of the present application clearer, the present application is further described in detail below in conjunction with drawings and embodiments. It should be understood that the described specific embodiments are merely used to explain the present invention and not to limit present invention.
As shown in
Step 102: acquiring a first chromaticity coordinate point corresponding to a first colored light, and acquiring a second chromaticity coordinate point corresponding to a second colored light.
Different colored lights correspond to different chromaticity coordinate points.
Chromaticity coordinate means a coordinate of a color, with x for a transverse axis and y for a vertical axis. With the chromaticity coordinate, a single point can be identified uniquely on a chromaticity map. This point accurately represents a light emitting color. In addition to x and y, the color temperature can also be used to represent the light emitting color of an illumination light source. In one embodiment, the first colored light is warm white, and the second colored light is cool white. The determination of the first chromaticity coordinate point and the second chromaticity coordinate point can be obtained by finding a factory specification of an LED light source that emits the corresponding colored light. In order to be more accurate, the chromaticity coordinate points can also be measured by a measuring device (for example, an integrating ball).
Step 104: acquiring a target chromaticity coordinate point, and computing a first lumen mixing ratio of the first colored light and the second colored light according to the target chromaticity coordinate point, the first chromaticity coordinate point and the second chromaticity coordinate point.
The target chromaticity coordinate point means a coordinate point corresponding to a target colored light to be obtained by mixing lights. The target chromaticity coordinate point can be customized according to actual needs. For example, in order to reduce color tolerance, the target chromaticity coordinate point is defined as a point on Energy Star, and of course, can also be defined as a point on a Planckian locus curve and any custom point. After the target chromaticity coordinate point is determined, the mixing ratio of the first colored light and the second colored light can be computed according to a color mixing principle. The mixing ratio essentially means a lumen mixing ratio. In order to distinguish from a subsequent mixing ratio, the mixing ratio is called a “first lumen mixing ratio”. The lumen is a luminous flux. Because the luminous flux is in the unit of lm, the luminous flux is also called “lumen”.
In one embodiment, tristimulus values in the mathematical theory of color mixing can be written as follows:
X=x* (Y/y); Y=Y; Z=(Y/y) * (1-x-y)
In the formula, x and y are respectively a horizontal coordinate and a vertical of a chromaticity coordinate point, and X, Y and Z are respectively the tristimulus values. A final color obtained by mixing depends on the tristimulus values. The following is an example of mixing two colored lights:
Xmix=X1+X2; Ymix=Y1+Y2; Zmix=Z1+Z2
Then, the following is obtained by mixing:
xmix=Xmix/(Xmix+Ymix+Zmix)
ymix=Ymix/(Xmix+Ymix+Zmix)
φmix=Ymix.
X1, Y1 and Z1 are tristimulus values corresponding to the first colored light, and X2, Y2 and Z2 are tristimulus values corresponding to the second colored light. xmix and ymix are chromaticity coordinate points obtained by mixing, i.e., x value and y value of the middle chromaticity coordinate point. pmix is a luminous flux (lumen) obtained by mixing. Therefore, if the target chromaticity coordinate point, the first chromaticity coordinate point and the second chromaticity coordinate point are known, the mixing ratio of the first colored light and the second colored light can be computed.
In one embodiment, the first colored light may be selected from warm white (such as colored light with a color temperature of 2700K), and the second colored light may be selected from cool white (such as colored light with a color temperature of 6500K).
Step 106: determining a middle chromaticity coordinate point corresponding to a middle-colored light obtained by mixing the first colored light and the second colored light according to the first lumen mixing ratio.
The middle chromaticity coordinate point means a chromaticity coordinate point corresponding to the middle-colored light obtained by mixing the first colored light and the second colored light according to the “first lumen mixing ratio”. Because the middle colored light obtained by two mixed colored lights can only be on the two-point straight line, if the target chromaticity coordinate point is not on the two-point straight line, then there will be a certain deviation between the middle chromaticity coordinate point of the obtained middle colored light and the target chromaticity coordinate point. Thus, it is necessary to separately compute the middle chromaticity coordinate point corresponding to the middle-colored light.
Step 108: determining a first compensation colored light and a second compensation colored light which are matched with the middle chromaticity coordinate point according to the middle chromaticity coordinate point.
After the middle chromaticity coordinate point corresponding to the middle-colored light is obtained, in order to reduce the color tolerance, it is necessary to compensate the middle-colored light into the target colored light. The first compensation colored light and the second compensation colored light matched with the middle chromaticity coordinate point are selected according to the middle chromaticity coordinate point of the middle-colored light. The first compensation colored light and the second compensation colored light may be selected from red, green, blue and other basic colored lights, and of course, can also be selected from other colored lights. As long as the color gamut range determined by the selected first compensation colored light, the second compensation colored light, the first colored light and the second colored light includes the target chromaticity coordinate point and the middle chromaticity coordinate point, the target colored light can be mixed. In one embodiment, two colored lights are respectively selected from three basic colored lights of red, green and blue according to the position relationship between the middle chromaticity coordinate point and the target chromaticity coordinate point as the first compensation colored light and the second compensation colored light.
Step 110: conducting compensation computation on the middle colored light according to the first compensation colored light and the second compensation colored light, and determining a second lumen mixing ratio corresponding to the first compensation colored light, the second compensation colored light and the middle colored light when mixed to the target chromaticity coordinate point.
After the first compensation colored light and the second compensation colored light are determined, a first compensation chromaticity coordinate point corresponding to the first compensation colored light and a second compensation chromaticity coordinate point corresponding to the second compensation colored light are acquired, and a mixing ratio, i.e., a second lumen mixing ratio corresponding to the first compensation colored light, the second compensation colored light and the middle colored light when mixed to the target chromaticity coordinate point is computed according to the first compensation chromaticity coordinate point, the second compensation chromaticity coordinate point and the middle chromaticity coordinate point. The first compensation colored light, the second compensation colored light and the middle-colored light are mixed according to the second lumen mixing ratio to mix a target colored light corresponding to the target chromaticity coordinate point. The color tolerance of the mixed target colored light can be reduced to be within 1SCDM which cannot be perceived by human eyes, thereby greatly enhancing the light mixing effect.
In the above method for computing illumination mixed lights, firstly, the first lumen mixing ratio of the first colored light and the second colored light is determined according to the target chromaticity coordinate point; then, the first colored light and the second colored light are mixed to obtain the middle colored light; because the middle colored light has a large color tolerance, the first compensation colored light and the second compensation colored light are matched continuously according to the middle chromaticity coordinate point; compensation computation is conducted on the middle colored light; and the second lumen mixing ratio corresponding to the first compensation colored light, the second compensation colored light and the middle colored light is determined when mixed to the target chromaticity coordinate point. The first colored light, the second colored light, the first compensation colored light and the second compensation colored light are mixed according to the first lumen mixing ratio and the second lumen mixing ratio so that the target chromaticity coordinate point can be completely mixed, thereby greatly reducing the color tolerance and enhancing the light mixing effect.
In one embodiment, the step of determining a first compensation colored light and a second compensation colored light which are matched with the middle chromaticity coordinate point according to the middle chromaticity coordinate point includes: acquiring a third chromaticity coordinate point corresponding to a third colored light, a fourth chromaticity coordinate point corresponding to a fourth colored light and a fifth chromaticity coordinate point corresponding to a fifth colored light; determining a color gamut range of the target chromaticity coordinate point according to the third chromaticity coordinate point, the fourth chromaticity coordinate point, the fifth chromaticity coordinate point and the middle chromaticity coordinate point; and selecting two colored lights as the first compensation colored light and the second compensation colored light from the third colored light, the fourth colored light and the fifth colored light according to the color gamut range.
The third colored light, the fourth colored light and the fifth colored light form a large color gamut region. The middle chromaticity coordinate point falls into the large color gamut region, and target chromaticity coordinate point also falls into the large color gamut region. In order to compensate the middle-colored light to obtain the target colored light, firstly, it is necessary to determine which small color gamut range the target colored light falls into. The large color gamut region is divided into three small color gamut ranges according to the chromaticity coordinate points of the third colored light, the fourth colored light, the fifth colored light and the middle-colored light. In one embodiment, a schematic diagram of dividing into three small color gamut ranges is shown in
In one embodiment, the color gamut range of the target chromaticity coordinate point is determined according to the third chromaticity coordinate point, the fourth chromaticity coordinate point, the fifth chromaticity coordinate point and the middle chromaticity coordinate point includes: respectively computing triangle areas formed by any three points of the third chromaticity coordinate point, the fourth chromaticity coordinate point, the fifth chromaticity coordinate point, the middle chromaticity coordinate point and the target chromaticity coordinate point; determining a target triangle area matched with the target chromaticity coordinate point according to the computed triangle areas; and using the target triangle area as the color gamut range corresponding to the target chromaticity coordinate point.
In order to compute the color gamut range corresponding to the target chromaticity coordinate point, the triangle areas formed by any three points of the third chromaticity coordinate point, the fourth chromaticity coordinate point, the fifth chromaticity coordinate point, the middle chromaticity coordinate point and the target chromaticity coordinate point are respectively computed. Any three points are selected from five points. Ten triangles are obtained through permutation and combination to compute the areas of the ten triangles respectively.
In one embodiment, the third colored light, the fourth colored light and the fifth colored light are respectively three basic colored lights of red (R), green (G) and blue (B). As shown in
In one embodiment, the steps of conducting compensation computation on the middle colored light according to the first compensation colored light and the second compensation colored light and determining a second lumen mixing ratio corresponding to the first compensation colored light, the second compensation colored light and the middle colored light when mixed to the target chromaticity coordinate point includes: acquiring a first compensation chromaticity coordinate point of the first compensation colored light, and acquiring a second compensation chromaticity coordinate point of the second compensation colored light; and determining a second lumen mixing ratio corresponding to the first compensation colored light, the second compensation colored light and the middle colored light when mixed to the target chromaticity coordinate point according to the first compensation chromaticity coordinate point, the second compensation chromaticity coordinate point and the middle chromaticity coordinate point.
After the first compensation colored light and the second compensation colored light are determined, the first compensation chromaticity coordinate point corresponding to the first compensation colored light and the second compensation chromaticity coordinate point corresponding to the second compensation colored light are respectively acquired. Then, by taking the target chromaticity coordinate point as a target point, the first compensation colored light, the second compensation colored light and the middle-colored light are used as colored lights with known coordinates. Then, the second lumen mixing ratio corresponding to the first compensation colored light, the second compensation colored light and the middle-colored light can be obtained through computation. As long as the lights are mixed according to the second lumen mixing ratio, the target colored light corresponding to the target chromaticity coordinate point can be obtained.
In one embodiment, the method for computing illumination mixed lights further includes: acquiring a color temperature corresponding to the target chromaticity coordinate point, and acquiring a mixing ratio of the first colored light, the second colored light, the first compensation colored light and the second compensation colored light corresponding to the target colored light; and conducting associative storage on the color temperature and the corresponding mixing ratio.
After the target chromaticity coordinate point is obtained, the color temperature corresponding to the target chromaticity coordinate point is acquired, and then a mixing ratio of the first colored light, the second colored light, the first compensation colored light and the second compensation colored light corresponding to the target colored light is acquired. Namely, the final mixing ratio of the first colored light, the second colored light, the first compensation colored light and the second compensation colored light is computed according to the first lumen mixing ratio and the second lumen mixing ratio. Associative storage is conducted on the color temperature and the corresponding mixing ratio. When it is necessary to obtain the target colored light corresponding to the color temperature, the mixing ratio corresponding to the color temperature is acquired, and then the first colored light, the second colored light, the first compensation colored light, and the second compensation colored light are mixed in accordance with the mixing ratio, so as to obtain the target colored light corresponding to the color temperature.
In one embodiment, the method for computing illumination mixed lights further includes: determining a target color temperature corresponding to the current illumination according to a preset condition, and determining a target mixing ratio corresponding to the target color temperature according to the correspondence between the color temperature and the mixing ratio; and mixing the first colored light, the second colored light, the first compensation colored light and the second compensation colored light according to the target mixing ratio to obtain the target colored light corresponding to the target color temperature.
In an illumination application scenario, the color temperature corresponding to the current illumination needs to be determined in real time in order for the illumination to be able to change over time or automatically adjust with the outside illumination intensity. For example, if the illumination light can change with time, for example, the color temperature from 8 to 9 o'clock in the morning is set to 2700K, and the color temperature from 9 to 10 o'clock is set to 3000K, etc., then the target color temperature of the current illumination can be determined after the current time is acquired. Then the target mixing ratio corresponding to the target color temperature is determined according to the correspondence between a pre-stored color temperature and the mixing ratio. Then, the first colored light, the second colored light, the first compensation colored light and the second compensation colored light are mixed according to the target mixing ratio.
In one embodiment, the step of determining a middle chromaticity coordinate point corresponding to a middle colored light obtained by mixing the first colored light and the second colored light according to the first lumen mixing ratio includes: acquiring a target lumen value, and determining a first lumen value corresponding to the first colored light and a second lumen value corresponding to the second colored light according to the target lumen and the first lumen mixing ratio; and determining a middle chromaticity coordinate point corresponding to the middle colored light obtained by mixing the first colored light and the second colored light according to the first lumen and the second lumen.
If a set target lumen is acquired, under the condition that the first lumen mixing ratio is known, the lumen corresponding to the first colored light and the lumen corresponding to the second colored light can be determined and then mixed to obtain the middle-colored light. Because the lumen ratio of the first colored light and the second colored light can only be obtained according to the first chromaticity coordinate point, the second chromaticity coordinate point and the target chromaticity coordinate point, then the specific lumens of the first colored light and the second colored light can be computed after the target lumen is given; and then the first lumen and the second lumen are computed and the middle chromaticity coordinate point corresponding to the mixed middle colored light can be computed.
In one embodiment, the first lumen mixing ratio and the second lumen mixing ratio are computed through the above method for computing illumination mixed lights. The mixing ratio corresponding to the first colored light, the second colored light, the first compensation colored light and the second compensation colored light is obtained according to the first lumen mixing ratio and the second lumen mixing ratio. Actual light mixing is guided according to the mixing ratio to greatly reduce the color tolerance of the obtained target colored light.
In one experimental verification, RGBWW (R red light, G green light, B blue light, W warm white and W cool white) 5-color temperature LED is used with 256 bit as division and 125 bits as the benchmark data; with a 0-255 controller, RGBWW 5 LEDs are divided into required current values using the PWM (pulse width modulation) principle. After the LEDs, the required lumens are transmitted. Then, the obtained target colored light is adjusted according to the set lumens of five-path colored lights. By comparing the chromaticity coordinate point measured by an integrating sphere with the target chromaticity coordinate point, it is found that they are very close.
SCDM=(g11*Δx*Δx+2g12*Δx*Δy+g22*Δy*Δy)1/2
where Δx represents an error of x1 value relative to the target value; and Δy represents an error of y1 value relative to the target value. g11, g12 and g22 are coefficients determined by standard colors.
The above method for computing illumination mixed lights can accurately compute the mixing ratio of 4 colored lights (the first colored light, the second colored light, the first compensation colored light and the second compensation colored light). The color tolerance of the target colored light obtained by mixing colors in practical applications according to the computed mixing ratio is less than 1SCDM, thereby greatly reducing the color tolerance and enhancing the color mixing effect. The method for computing illumination mixed lights is universal and applicable to any illumination product.
As shown in
a coordinate point acquiring module 702 configured for acquiring a first chromaticity coordinate point corresponding to a first colored light and acquiring a second chromaticity coordinate point corresponding to a second colored light;
a ratio computing module 704 configured for acquiring a target chromaticity coordinate point and computing a first lumen mixing ratio of the first colored light and the second colored light according to the target chromaticity coordinate point, the first chromaticity coordinate point and the second chromaticity coordinate point;
a coordinate point determining module 706 configured for determining a middle chromaticity coordinate point corresponding to a middle-colored light obtained by mixing the first colored light and the second colored light according to the first lumen mixing ratio;
a compensation colored light determining module 708 configured for determining a first compensation colored light and a second compensation colored light which are matched with the middle chromaticity coordinate point according to the middle chromaticity coordinate point; and
a ratio determining module 710 configured for conducting compensation computation on the middle colored light according to the first compensation colored light and the second compensation colored light and determining a second lumen mixing ratio corresponding to the first compensation colored light, the second compensation colored light and the middle colored light when mixed to the target chromaticity coordinate point.
In one embodiment, the compensation colored light determining module is also configured for acquiring a third chromaticity coordinate point corresponding to a third colored light, a fourth chromaticity coordinate point corresponding to a fourth colored light and a fifth chromaticity coordinate point corresponding to a fifth colored light; determining a color gamut range of the target chromaticity coordinate point according to the third chromaticity coordinate point, the fourth chromaticity coordinate point, the fifth chromaticity coordinate point and the middle chromaticity coordinate point; and selecting two colored lights as the first compensation colored light and the second compensation colored light from the third colored light, the fourth colored light and the fifth colored light according to the color gamut range.
In one embodiment, the compensation colored light determining module is also configured for respectively computing triangle areas formed by any three points of the third chromaticity coordinate point, the fourth chromaticity coordinate point, the fifth chromaticity coordinate point, the middle chromaticity coordinate point and the target chromaticity coordinate point; determining a target triangle area matched with the target chromaticity coordinate point according to the computed triangle areas; and using the target triangle area as the color gamut range corresponding to the target chromaticity coordinate point.
In one embodiment, the ratio determining module is also configured for acquiring a first compensation chromaticity coordinate point of the first compensation colored light, and acquiring a second compensation chromaticity coordinate point of the second compensation colored light; and determining a second lumen mixing ratio corresponding to the first compensation colored light, the second compensation colored light and the middle colored light when mixed to the target chromaticity coordinate point according to the first compensation chromaticity coordinate point, the second compensation chromaticity coordinate point and the middle chromaticity coordinate point.
As shown in
a storage module 712 configured for acquiring the color temperature corresponding to the target chromaticity coordinate point, and acquiring a mixing ratio of the first colored light, the second colored light, the first compensation colored light and the second compensation colored light corresponding to the target colored light; and conducting associative storage on the color temperature and the corresponding mixing ratio.
As shown in
a target mixing ratio determining module 714 configured for determining a target color temperature corresponding to the current illumination according to a preset condition, and determining a target mixing ratio corresponding to the target color temperature according to the correspondence between the color temperature and the mixing ratio; and
a mixing module 716 configured for mixing the first colored light, the second colored light, the first compensation colored light and the second compensation colored light according to the target mixing ratio to obtain the target colored light corresponding to the target color temperature.
In one embodiment, the coordinate point determining module is also configured for acquiring a target lumen value , and determining a first lumen value corresponding to the first colored light and a second lumen value corresponding to the second colored light according to the target lumen and the first lumen mixing ratio; and determining a middle chromaticity coordinate point corresponding to the middle colored light obtained by mixing the first colored light and the second colored light according to the first lumen and the second lumen.
In one embodiment, the method for computing illumination mixed lights provided by the present application may be realized in the form of the computer programs which can be operated on the computer device shown in
In another application scenario, light mixing computation is conducted through the server (for example, the cloud server). The server acquires the chromaticity coordinate points corresponding to the LED light sources inputted by the input unit and the target chromaticity coordinate point, computes the mixing ratio corresponding to the target chromaticity coordinate point, and sends the obtained mixing ratio to the lamp through a communication module. Then, the lamp controls the LED light sources through the driving module.
In the last application scenario, light mixing computation is conducted through the terminal. The terminal receives the chromaticity coordinate points corresponding to the LED light sources inputted by the input unit and the target chromaticity coordinate point, computes the mixing ratio corresponding to the target chromaticity coordinate point, and sends the obtained mixing ratio to the lamp through a communication module. Then, the lamp controls the LED light sources through the driving module.
A computer device includes a memory and a processor, wherein the memory stores computer programs that, when executed by the processor, enable the processor to execute the steps of: acquiring a first chromaticity coordinate point corresponding to a first colored light, and acquiring a second chromaticity coordinate point corresponding to a second colored light; acquiring a target chromaticity coordinate point, and computing a first lumen mixing ratio of the first colored light and the second colored light according to the target chromaticity coordinate point, the first chromaticity coordinate point and the second chromaticity coordinate point; determining a middle chromaticity coordinate point corresponding to a middle colored light obtained by mixing the first colored light and the second colored light according to the first lumen mixing ratio; determining a first compensation colored light and a second compensation colored light which are matched with the middle chromaticity coordinate point according to the middle chromaticity coordinate point; and conducting compensation computation on the middle colored light according to the first compensation colored light and the second compensation colored light, and determining a second lumen mixing ratio corresponding to the first compensation colored light, the second compensation colored light and the middle colored light when mixed to the target chromaticity coordinate point.
In one embodiment, the step of determining a first compensation colored light and a second compensation colored light which are matched with the middle chromaticity coordinate point according to the middle chromaticity coordinate point includes: acquiring a third chromaticity coordinate point corresponding to a third colored light, a fourth chromaticity coordinate point corresponding to a fourth colored light and a fifth chromaticity coordinate point corresponding to a fifth colored light; determining a color gamut range of the target chromaticity coordinate point according to the third chromaticity coordinate point, the fourth chromaticity coordinate point, the fifth chromaticity coordinate point and the middle chromaticity coordinate point; and selecting two colored lights as the first compensation colored light and the second compensation colored light from the third colored light, the fourth colored light and the fifth colored light according to the color gamut range.
In one embodiment, the step of determining a color gamut range of the target chromaticity coordinate point according to the third chromaticity coordinate point, the fourth chromaticity coordinate point, the fifth chromaticity coordinate point and the middle chromaticity coordinate point includes: respectively computing triangle areas formed by any three points of the third chromaticity coordinate point, the fourth chromaticity coordinate point, the fifth chromaticity coordinate point, the middle chromaticity coordinate point and the target chromaticity coordinate point; determining a target triangle area matched with the target chromaticity coordinate point according to the computed triangle areas; and using the target triangle area as the color gamut range corresponding to the target chromaticity coordinate point.
In one embodiment, the steps of conducting compensation computation on the middle colored light according to the first compensation colored light and the second compensation colored light and determining a second lumen mixing ratio corresponding to the first compensation colored light, the second compensation colored light and the middle colored light when mixed to the target chromaticity coordinate point includes: acquiring a first compensation chromaticity coordinate point of the first compensation colored light, and acquiring a second compensation chromaticity coordinate point of the second compensation colored light; and determining a second lumen mixing ratio corresponding to the first compensation colored light, the second compensation colored light and the middle colored light when mixed to the target chromaticity coordinate point according to the first compensation chromaticity coordinate point, the second compensation chromaticity coordinate point and the middle chromaticity coordinate point.
In one embodiment, the above computer programs, when executed by the processor, are also configured for executing the steps of: acquiring a color temperature corresponding to the target chromaticity coordinate point, and acquiring a mixing ratio of the first colored light, the second colored light, the first compensation colored light and the second compensation colored light corresponding to the target colored light; and conducting associative storage on the color temperature and the corresponding mixing ratio.
In one embodiment, the above computer programs, when executed by the processor, are also configured for executing the steps of: determining a target color temperature corresponding to the current illumination according to a preset condition, and determining a target mixing ratio corresponding to the target color temperature according to the correspondence between the color temperature and the mixing ratio; and mixing the first colored light, the second colored light, the first compensation colored light and the second compensation colored light according to the target mixing ratio to obtain the target colored light corresponding to the target color temperature.
In one embodiment, the step of determining a middle chromaticity coordinate point corresponding to a middle colored light obtained by mixing the first colored light and the second colored light according to the first lumen mixing ratio includes: acquiring a target lumen value, and determining a first lumen value corresponding to the first colored light and a second lumen value corresponding to the second colored light according to the target lumen and the first lumen mixing ratio; and determining a middle chromaticity coordinate point corresponding to the middle colored light obtained by mixing the first colored light and the second colored light according to the first lumen and the second lumen.
A computer readable storage medium stores computer programs that, when executed by the processor, enable the processor to execute the steps of:
acquiring a first chromaticity coordinate point corresponding to a first colored light, and acquiring a second chromaticity coordinate point corresponding to a second colored light; acquiring a target chromaticity coordinate point, and computing a first lumen mixing ratio of the first colored light and the second colored light according to the target chromaticity coordinate point, the first chromaticity coordinate point and the second chromaticity coordinate point; determining a middle chromaticity coordinate point corresponding to a middle colored light obtained by mixing the first colored light and the second colored light according to the first lumen mixing ratio; determining a first compensation colored light and a second compensation colored light which are matched with the middle chromaticity coordinate point according to the middle chromaticity coordinate point; and conducting compensation computation on the middle colored light according to the first compensation colored light and the second compensation colored light, and determining a second lumen mixing ratio corresponding to the first compensation colored light, the second compensation colored light and the middle colored light when mixed to the target chromaticity coordinate point.
In one embodiment, the step of determining a first compensation colored light and a second compensation colored light which are matched with the middle chromaticity coordinate point according to the middle chromaticity coordinate point includes: acquiring a third chromaticity coordinate point corresponding to a third colored light, a fourth chromaticity coordinate point corresponding to a fourth colored light and a fifth chromaticity coordinate point corresponding to a fifth colored light; determining a color gamut range of the target chromaticity coordinate point according to the third chromaticity coordinate point, the fourth chromaticity coordinate point, the fifth chromaticity coordinate point and the middle chromaticity coordinate point; and selecting two colored lights as the first compensation colored light and the second compensation colored light from the third colored light, the fourth colored light and the fifth colored light according to the color gamut range.
In one embodiment, the step of determining a color gamut range of the target chromaticity coordinate point according to the third chromaticity coordinate point, the fourth chromaticity coordinate point, the fifth chromaticity coordinate point and the middle chromaticity coordinate point includes: respectively computing triangle areas formed by any three points of the third chromaticity coordinate point, the fourth chromaticity coordinate point, the fifth chromaticity coordinate point, the middle chromaticity coordinate point and the target chromaticity coordinate point; determining a target triangle area matched with the target chromaticity coordinate point according to the computed triangle areas; and using the target triangle area as the color gamut range corresponding to the target chromaticity coordinate point.
In one embodiment, the steps of conducting compensation computation on the middle colored light according to the first compensation colored light and the second compensation colored light and determining a second lumen mixing ratio corresponding to the first compensation colored light, the second compensation colored light and the middle colored light when mixed to the target chromaticity coordinate point includes: acquiring a first compensation chromaticity coordinate point of the first compensation colored light, and acquiring a second compensation chromaticity coordinate point of the second compensation colored light; and determining a second lumen mixing ratio corresponding to the first compensation colored light, the second compensation colored light and the middle colored light when mixed to the target chromaticity coordinate point according to the first compensation chromaticity coordinate point, the second compensation chromaticity coordinate point and the middle chromaticity coordinate point.
In one embodiment, the above computer programs, when executed by the processor, are also configured for executing the steps of: acquiring a color temperature corresponding to the target chromaticity coordinate point, and acquiring a mixing ratio of the first colored light, the second colored light, the first compensation colored light and the second compensation colored light corresponding to the target colored light; and conducting associative storage on the color temperature and the corresponding mixing ratio.
In one embodiment, the above computer programs, when executed by the processor, are also configured for executing the steps of: determining a target color temperature corresponding to the current illumination according to a preset condition, and determining a target mixing ratio corresponding to the target color temperature according to the correspondence between the color temperature and the mixing ratio; and mixing the first colored light, the second colored light, the first compensation colored light and the second compensation colored light according to the target mixing ratio to obtain the target colored light corresponding to the target color temperature.
In one embodiment, the step of determining a middle chromaticity coordinate point corresponding to a middle colored light obtained by mixing the first colored light and the second colored light according to the first lumen mixing ratio includes: acquiring a target lumen value, and determining a first lumen value corresponding to the first colored light and a second lumen value corresponding to the second colored light according to the target lumen and the first lumen mixing ratio; and determining a middle chromaticity coordinate point corresponding to the middle colored light obtained by mixing the first colored light and the second colored light according to the first lumen and the second lumen.
Those ordinary skilled in the art can understand that the realization of all or part of the processes in the above embodiment method may be completed by instructing the relevant hardware through the computer programs. The programs can be stored in a non-volatile computer readable storage medium. The programs, when executed, can include the processes in the above method embodiments. Any reference to the memory, the storage medium, a database or other media used in each embodiment provided in the present application may include a non-volatile and/or volatile memory. The non-volatile memory may include a read-only memory (ROM), a programmable ROM (PROM), an electrically programmable ROM (EPROM), an electrically erasable programmable ROM (EEPROM), or a flash memory. The volatile memory may include a random access memory (RAM) or an external cache memory. As an illustration rather than a limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM(DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), Synchlink DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct rambus dynamic RAM (DRDRAM) and rambus dynamic RAM(RDRAM).
The technical features of the above embodiments may be combined in any manner. For simplicity of description, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, these technical features shall be considered as the scope recorded in the Description.
The above embodiments only express several implementation modes of the present application, and are described more specifically in detail, but shall not be consequently interpreted as a limitation to the scope of the patent for the present application. It should be noted that, for those ordinary skilled in the art, several variations and improvements can also be made without departing from the concept of the present application, all of which belong to the protection scope of the present application. Therefore, the protection scope of the patent for the present application shall be subject to appended claims.
Number | Date | Country | Kind |
---|---|---|---|
201910105677.4 | Feb 2019 | CN | national |
This application is a continuation of international PCT application serial no. PCT/CN2019/076130, filed on Feb. 26, 2019, which claims the priority benefit of China application no. 201910105677.4, filed on Feb. 1, 2019. The entirety of each of the above-mentioned patent applications is hereby incorporated by reference herein and made a part of this specification.
Number | Date | Country | |
---|---|---|---|
Parent | PCT/CN2019/076130 | Feb 2019 | US |
Child | 16420182 | US |