Scene-adaptive LED illumination spectrum generation method, medium and equipment

The image of the illuminated object is acquired and processed through the camera. Combined with the power complementary algorithm, the problems of over-rendering and insufficient basic illumination of LED lighting equipment are solved, and spectral adaptation is achieved to ensure consistency of lighting brightness and cost reduction.

CN119277593APending Publication Date: 2025-01-07GUANGDONG SENPU INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411716490.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-27
Publication Date
2025-01-07

AI Technical Summary

Technical Problem

Existing LED lighting equipment calculates the color average based on RGB values ​​during the color extraction process, resulting in over-rendering or insufficient basic illumination of the object, and is costly and cannot be analyzed from the nature of the spectrum.

Method used

The spatial environment image of the illuminated object is obtained through the camera, image compression and pixel color weight processing are performed, and the spectral characteristics of the LED lighting equipment are adjusted to ensure that the white light power is not less than 80%, and spectral adaptation is achieved.

Benefits of technology

Effectively make up for the shortcomings of the white LED light source module in a certain band range, ensure the consistency of lighting brightness of multiple groups of LED lighting equipment in the same spatial environment, simplify the system structure, reduce costs, and realize the spectrum of the illuminated object when switching adapt.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119277593A_ABST
    Figure CN119277593A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of illumination, in particular to a scene-adaptive LED illumination spectrum generation method, medium and equipment, and the method comprises the following steps: carrying out the color sampling of an illuminated object space through a camera sensing device, and obtaining space image data; cutting and matching the spatial image data according to the actual light-emitting angle of the LED light-emitting module, and converting the spatial image data into RGB color data; carrying out partition processing on the obtained RGB color data, carrying out weighted average according to the RGB color space value of each pixel point in the color picking region, and determining the target color space RGB value of the color picking region; performing power configuration conversion on the obtained RGB value of the target color space; and converting the power values of the four colors of RGBW into duty ratio data values and outputting the duty ratio data values so as to adjust the luminous intensity and spectral characteristics of the LED lighting equipment. According to the invention, when the illuminated object is switched, the LED illumination equipment can realize a spectrum self-adaption function.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of lighting technology, and in particular to a method, medium and device for generating an LED lighting spectrum for an adaptive scene. Background Art

[0002] In actual lighting application scenarios, choosing different lighting spectra for different illuminated objects can make the entire lighting application environment more realistic. Therefore, improving the matching of the spectral characteristics of LED lighting equipment with the illuminated objects and increasing the color restoration ability of the illuminated objects are increasingly becoming the mainstream trend and direction of the market.

[0003] The mainstream LED lighting equipment currently on the market basically uses LED light sources that simulate the solar spectrum and LED light sources with a high color rendering index to restore the original color of the illuminated objects and highlight the value of the goods. However, due to the diverse shapes and color levels of different illuminated objects, as well as the frequent changes in the display of objects, it is impossible to meet all the requirements of adaptation. At the same time, over-rendering may occur, resulting in a deviation between the color of the object visually seen by the customer when purchasing and the actual color of the object.

[0004] In addition, there are already cameras or color sensors that are used to identify colors and control LED lighting equipment through WiFi or Bluetooth wireless communications to achieve the purpose of dimming and color adjustment.

[0005] However, the inventors of this application found that the above technology has at least the following technical problems in the process of implementing the technical solution of the invention in the embodiment of this application:

[0006] In the process of color extraction, the color average is calculated based on the RGB values ​​of all pixels in the image, and the color of the light is controlled by the color average, or the similarity color value and spectrum formula are obtained by judging the collected color data and the color ratio set in the database. This method is firstly costly, and secondly, it does not analyze the essence of the spectrum, which also leads to the problem of over-rendering or insufficient basic illumination of the object. Summary of the invention

[0007] The embodiments of the present application solve the problems of over-rendering or insufficient basic illumination in the prior art by providing a scene-adaptive LED lighting spectrum generation method, medium, and device, and achieve the following: by acquiring a spatial environment image of the illuminated object, performing image compression, and processing pixel points and color weights, the deficiencies of conventional white light LED light source modules in a certain band or band range can be compensated; at the same time, through a power complementary algorithm, while ensuring that the white light power is not less than a limit of 80%, the visual discomfort caused by the difference in lighting brightness of multiple groups of LED lighting devices in the same large space environment can be guaranteed, and when the illuminated object is switched, the LED lighting device can achieve the function of spectrum adaptation without the need for the help of other wireless devices or control devices.

[0008] The present invention provides a method for generating an LED lighting spectrum for an adaptive scene, which comprises the following steps:

[0009] Step S1, sampling the color of the space of the object being illuminated by a camera sensor device to obtain spatial image data;

[0010] Step S2, cropping and matching the spatial image data according to the actual light-emitting angle of the LED light-emitting module, so that the cropped spatial image data is consistent with the angle of the LED light-emitting module, and then converting the spatial image data into RGB color data;

[0011] Step S3, partitioning the obtained RGB color data, performing weighted averaging according to the RGB color space value of each pixel in the color picking area, and determining the target color space RGB value of the color picking area; Step S4, performing power configuration conversion on the obtained target color space RGB value to obtain the power values ​​of the four colors RGBW;

[0012] Step S5: convert the power values ​​of the four colors RGBW into duty cycle data values ​​for output, so as to adjust the luminous intensity and spectral characteristics of the LED lighting device.

[0013] The image collected by the camera sensor device in step S1 is data of a 16:9 rectangular 60D angle, and the spatial image data of corresponding length and width are cropped according to the ratio of the angle in step S2.

[0014] Wherein, in said step S2, the method of converting the spatial image data into RGB color data is:

[0015] R=1.164*(Y-16)+1.596*(Cr-128);

[0016] G=1.164*(Y-16)-0.813*(Cr-128)-0.392*(Cb-128);

[0017] B=1.164*(Y-16)+2.017*(Cb-128).

[0018] The partition processing method in step S3 is: partitioning the rectangular data area in equal proportion in length and width directions.

[0019] Wherein, when performing the partitioning process in step S3, three color picking areas a, b, and c are formed, and the RGB data of the pixels in each color picking area are weighted averaged to obtain the RGB color average of each area, and based on the color average, the color weight corresponding to the RGB color space value of each pixel area is determined; according to the RGB color space value and the color weight, the target color space value of the color picking area is determined;

[0020] When the color value deviation of each color in the RGB color data of the three color picking areas a, b, and c is within 10%, it is considered that the color weights of the three color picking areas a, b, and c are similar, and then the RGB color data of the three areas are weighted averaged to obtain the target color space value of the color picking area;

[0021] When the color value deviation of two colors in the RGB color data of the three color picking areas a, b, and c is within 10%, and one color value exceeds 10%, the RGB color data of the two adjacent areas are weighted averaged, and the RGB data of the area exceeding the 10% deviation is discarded to obtain the target color space value of the color picking area;

[0022] When the color values ​​of the RGB color data of the three color picking areas a, b, and c all exceed the deviation range of 10%, it is considered that the color weights of the three color picking areas a, b, and c are not similar, and then the RGB color data of the three color picking areas a, b, and c are weighted averaged to obtain the target color space value of the color picking area.

[0023] The method of converting the obtained target color space RGB value into power configuration in step S4 to obtain the power values ​​of the four colors RGBW is as follows:

[0024] Pr = (R * BASE_POWER_R) / 255;

[0025] Pg = (G*BASE_POWER_G) / 255;

[0026] Pb = (B*BASE_POWER_B) / 255;

[0027] Prgb=Pr+Pg+Pb;

[0028] When Prgb≤BASE_POWER_RGB condition 1, Ptotal=Prgb+Pw, Pw=K*BASE_POWER_W, K is the adjustment coefficient of white light power;

[0029] Get the actual power values ​​of the four LED light sources, RGBW;

[0030] When Prgb>BASE_POWER_RGB condition 2, Pr, Pg, and Pb are compressed in equal proportion until condition 1 is met, and then condition 1 is followed;

[0031] The BASE_POWER_RGB setting value is 20% of Ptotal; Ptotal is the total power of the LED light source module;

[0032] Among them, Prgb represents the actual total power of RGB three colors, Pr represents the power of red light, Pg represents the power of green light, Pb represents the power of blue light, and Pw represents the power of white light;

[0033] BASE_POWER_R, BASE_POWER_G, BASE_POWER_B are the powers of the three fixed red, green and blue light sources respectively, BASE_POWER_W is the power of the fixed white light source, and BASE_POWER_RGB is the sum of the powers of the three fixed red, green and blue light sources.

[0034] The method of converting the power values ​​of the four colors RGBW into duty cycle data values ​​for output in step S5 is: the duty cycle data range is 0-255;

[0035] R:255*Pr / BASE_POWER_R;

[0036] G:255*Pg / BASE_POWER_G;

[0037] B:255*Pb / BASE_POWER_B;

[0038] W:255*Pw / BASE_POWER_W.

[0039] The present invention also provides a computer storage medium, wherein the computer storage medium stores computer instructions, and when the computer instructions are called, they are used to execute the method for generating LED lighting spectrum for adaptive scenes.

[0040] The present invention also provides an electronic device, wherein the electronic device comprises: a processor; and a memory arranged to store computer executable instructions, wherein the executable instructions, when executed, enable the processor to execute the method for generating LED lighting spectrum for adaptive scenes.

[0041] One or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages:

[0042] 1. Since the spatial environment image of the illuminated object is obtained through the camera sensor device, the image data is cut according to the actual light-emitting angle of the LED light-emitting module to achieve the matching of the light-emitting angle of the LED light-emitting module with the actually collected image data; according to the RGB color space value of each pixel point in the color picking area, the color average value corresponding to the RGB color space value is determined; based on the color average value, the color weight corresponding to the RGB color space value of each pixel point area is determined; according to the RGB color space value and the color weight, the target color space value of the color picking area is determined, which makes up for the problem that the conventional white light LED light source module is insufficient in a certain band or within a band range.

[0043] 2. The LED light source module is composed of independent white light LEDs and RGB three-color LEDs, forming RGBW 4-channel independent control. Power conversion is performed through the acquired RGB color data, and the actual RGB output power is normalized with the actual W output power. At the same time, the minimum power of white light is limited to no less than 80%, ensuring the energy of basic white light illumination. The RGB power and the white light power are complementary, so that the actual output power data of each LED lighting device remains consistent, which can ensure that the visual discomfort caused by the difference in lighting brightness of multiple groups of LED lighting devices in the same large space environment is eliminated.

[0044] 3. When the illuminated object switches, the LED lighting device can realize the function of spectrum adaptation without the help of other wireless devices or control devices. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Figure 1 It is a flow chart of a method for generating a scene-adaptive LED lighting spectrum according to the present invention;

[0046] Figure 2 A schematic diagram of pattern data sampling and image partitioning according to the present invention. DETAILED DESCRIPTION

[0047] The embodiment of the present application solves the problems of over-rendering or insufficient basic illumination in the prior art by providing a method for generating an LED lighting spectrum for an adaptive scene, and achieves that by acquiring a spatial environment image of the illuminated object, performing image compression, and processing pixel points and color weights, the deficiencies of conventional white light LED light source modules in a certain band or within a band range can be compensated; at the same time, through a power complementary algorithm, while ensuring that the white light power is not less than a limit of 80%, the visual discomfort caused by the difference in lighting brightness of multiple groups of LED lighting equipment in the same large space environment can be guaranteed.

[0048] The technical solution in the embodiment of the present application is to solve the above problems, and the overall idea is as follows:

[0049] A method for generating LED lighting spectrum for adaptive scenes includes the following steps: step S1, color sampling of the illuminated object space is performed through a camera sensor device to obtain spatial image data; step S2, cropping and matching the spatial image data according to the actual luminous angle of the LED light-emitting module, so that the cropped spatial image data is consistent with the angle of the LED light-emitting module, and then converting the spatial image data into RGB color data; step S3, partitioning the obtained RGB color data, performing weighted averaging according to the RGB color space value of each pixel point in the color-taking area, and determining the target color space RGB value of the color-taking area; step S4, performing power configuration conversion on the obtained target color space RGB value to obtain the power values ​​of the four colors of RGBW. Step S5, converting the power values ​​of the four colors of RGBW into duty cycle data values ​​for output to adjust the luminous intensity and spectral characteristics of the LED lighting device. Specifically, in the embodiment of the present application, the spatial environment image of the illuminated object is obtained through the camera sensor device, and the image data is cropped according to the actual luminous angle of the LED light-emitting module, so that the image data matches the luminous angle of the LED light-emitting module. By processing the RGB color space value of each pixel in the color picking area, the target color space value is determined, thereby improving the accuracy of color acquisition; the LED light source module is composed of independent white light LEDs and RGB three-color LEDs, forming RGBW 4-channel independent control; power conversion is performed through the acquired RGB color data to ensure that the actual RGB output power is normalized with the actual white light output power, and the minimum white light power is limited to not less than 80% to ensure the energy of basic white light lighting. The RGB power and the white light power are complementary to each other, so that the actual output power data of each LED lighting device remains consistent, and then the embodiment of the present application can automatically adjust the spectral characteristics of the LED lighting device when switching between different illuminated objects, without the need for other wireless devices or control devices, simplifying the system structure and reducing costs.

[0050] In order to better understand the above technical solution, the above technical solution will be described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0051] Embodiment 1

[0052] In the first embodiment of the present application, the image collected by the camera sensor device in step S1 is 16:9 rectangular 60D angle data, and the spatial image data corresponding to the length and width are cropped according to the angle ratio in step S2. The partition processing method in step S3 is: partitioning the rectangular data area in the length and width directions in equal proportion; in step S1, the color of the illuminated object space is sampled by the camera sensor device to obtain the spatial image YCbCr data.

[0053] Embodiment 2

[0054] In the second embodiment of the present application, the spatial image YCbCr data obtained in step S1 is cropped so that the cropped image data is consistent with the angle of the LED light-emitting module; the cropped spatial image YCbCr data is converted into RGB data by the following formula, and the principle of the formula is the standard color space conversion relationship.

[0055] R=1.164*(Y-16)+1.596*(Cr-128);

[0056] G=1.164*(Y-16)-0.813*(Cr-128)-0.392*(Cb-128);

[0057] B=1.164*(Y-16)+2.017*(Cb-128).

[0058] Embodiment 3

[0059] In the third embodiment of the present application, the RGB color data is partitioned in step S3, and at least one color picking area is determined in the image, and the color picking area is used to characterize a part of the image area delineated on the image; according to the RGB color space value of each pixel point in the color picking area, the hue average value corresponding to the color picking area is determined; further, in the third embodiment of the present application, three color picking areas a, b, and c are formed when the partitioning process is performed, and the RGB data of the pixel points in each color picking area are weighted averaged to obtain the RGB color average value of each area, and based on the color average value, the color weight corresponding to the RGB color space value of each pixel point area is determined; according to the RGB color space value and the color weight, the target color space value of the color picking area is determined;

[0060] When the color value (0-255) of each color in the RGB color data of the three color picking areas a, b, and c is within the range of 10%, it is considered that the color weights of the three color picking areas a, b, and c are similar, and then the RGB color data of the three areas are weighted averaged to obtain the target color space value of the color picking area;

[0061] When the color values ​​(0-255) of two colors in the RGB color data of the three color picking areas a, b, and c are within the range of 10%, and one of them is more than 10%, the RGB color data of the two similar areas are weighted averaged, and the RGB data of the area with a deviation exceeding 10% is discarded to obtain the target color space value of the color picking area;

[0062] When the color values ​​(0-255) of the RGB color data of the three color picking areas a, b, and c all exceed the deviation range of 10%, it is considered that the color weights of the three color picking areas a, b, and c are not similar, and then the RGB color data of the three color picking areas a, b, and c are weighted averaged to obtain the target color space value of the color picking area.

[0063] The technical solutions in the above embodiments of the present application have at least the following technical effects or advantages:

[0064] Embodiment 3 of the present application uses the color weights of all pixels in the color picking area to calculate the target color space value of the color picking area, thereby ensuring that the captured image color is closer to the actual image color, thereby effectively improving the quality of image color capture.

[0065] Embodiment 4

[0066] In the fourth embodiment of the present application, the obtained target color space RGB value is converted into a power configuration, and the method for obtaining the power values ​​of the four colors RGBW is as follows:

[0067] Pr = (R * BASE_POWER_R) / 255;

[0068] Pg = (G*BASE_POWER_G) / 255;

[0069] Pb = (B*BASE_POWER_B) / 255;

[0070] Prgb=Pr+Pg+Pb;

[0071] When Prgb≤BASE_POWER_RGB condition 1, Ptotal=Prgb+Pw, Pw=K*BASE_POWER_W, K is the adjustment coefficient of white light power;

[0072] Get the actual power values ​​of the four LED light sources, RGBW;

[0073] When Prgb>BASE_POWER_RGB condition 2, Pr, Pg, and Pb are compressed in equal proportion until condition 1 is met, and then condition 1 is followed;

[0074] The BASE_POWER_RGB setting value is 20% of Ptotal; Ptotal is the total power of the LED light source module;

[0075] Among them, Prgb represents the actual total power of RGB three colors, Pr represents the power of red light, Pg represents the power of green light, Pb represents the power of blue light, and Pw represents the power of white light;

[0076] BASE_POWER_R, BASE_POWER_G, BASE_POWER_B are the powers of the three fixed red, green and blue light sources respectively, BASE_POWER_W is the power of the fixed white light source, and BASE_POWER_RGB is the sum of the powers of the three fixed red, green and blue light sources.

[0077] Among them, color weight refers to the contribution value of each pixel in the color picking area when calculating the color of the color picking area; to adjust the energy relationship between white light and RGB, it not only ensures the illumination value on the illuminated object of white light basic lighting, but also reflects and restores the color of the illuminated object, making the main color weight part of the illuminated object more prominent, and the layers of different color weight parts more distinct.

[0078] The method of converting the power values ​​of the four colors RGBW into duty cycle data values ​​for output in step S5 is: the duty cycle data range is 0-255;

[0079] R:255*Pr / BASE_POWER_R;

[0080] G:255*Pg / BASE_POWER_G;

[0081] B:255*Pb / BASE_POWER_B;

[0082] W:255*Pw / BASE_POWER_W.

[0083] The technical solutions in the above embodiments of the present application have at least the following technical effects or advantages:

[0084] In the fourth embodiment of the present application, when the actual total power of the RGB three colors is less than or equal to 20% of the preset total power, the RGB power value is directly added to the white light power value to obtain the total power value; when the actual total power of the RGB three colors is greater than 20% of the preset total power, the RGB power value is proportionally compressed until the above conditions are met; at the same time, the step of limiting the minimum power of white light to not less than 80% of the total power is also implemented to ensure the brightness of the basic lighting; that is, in the fourth embodiment of the present application, the uniformity and comfort of the basic lighting are guaranteed by limiting the minimum power of white light to not less than 80% of the total power, and the spectrum adaptation is achieved by adjusting the power of the four colors of RGBW.

[0085] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0086] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0087] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0088] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0089] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.

[0090] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A method for generating an LED lighting spectrum for an adaptive scene, characterized in that: The following steps are involved: Step S1, sampling the color of the space of the object being illuminated by a camera sensor device to obtain spatial image data; Step S2, cropping and matching the spatial image data according to the actual light-emitting angle of the LED light-emitting module, so that the cropped spatial image data is consistent with the angle of the LED light-emitting module, and then converting the spatial image data into RGB color data; Step S3, partitioning the obtained RGB color data, performing weighted averaging according to the RGB color space value of each pixel in the color picking area, and determining the target color space RGB value of the color picking area; Step S4, performing power configuration conversion on the obtained target color space RGB value to obtain power values ​​of four colors RGBW; Step S5: convert the power values ​​of the four colors RGBW into duty cycle data values ​​for output, so as to adjust the luminous intensity and spectral characteristics of the LED lighting device.

2. The method for generating a scene-adaptive LED lighting spectrum according to claim 1, characterized in that: The image collected by the camera sensor device in step S1 is 16:9 rectangular 60D angle data, and the spatial image data corresponding to the length and width are cropped according to the angle ratio in step S2.

3. The method for generating a scene-adaptive LED lighting spectrum according to claim 1, characterized in that: In the step S2, the method of converting the spatial image data into RGB color data is: R=1.164*(Y-16)+1.596*(Cr-128); G=1.164*(Y-16)-0.813*(Cr-128)-0.392*(Cb-128); B=1.164*(Y-16)+2.017*(Cb-128).

4. The method for generating a scene-adaptive LED lighting spectrum according to claim 1, characterized in that: The partition processing method in step S3 is: partitioning the rectangular data area in equal proportion in length and width directions.

5. The method for generating a scene-adaptive LED lighting spectrum according to claim 1, characterized in that: When performing the partitioning process in step S3, three color picking areas a, b, and c are formed, and the RGB data of the pixels in each color picking area are weighted averaged to obtain the RGB color average of each area, and based on the color average, the color weight corresponding to the RGB color space value of each pixel area is determined; Determine the target color space value of the color picking area according to the RGB color space value and the color weight; When the color value deviation of each color in the RGB color data of the three color picking areas a, b, and c is within 10%, it is considered that the color weights of the three color picking areas a, b, and c are similar, and then the RGB color data of the three areas are weighted averaged to obtain the target color space value of the color picking area; When the color value deviation of two colors in the RGB color data of the three color picking areas a, b, and c is within 10%, and one color value exceeds 10%, the RGB color data of the two adjacent areas are weighted averaged, and the RGB data of the area exceeding the 10% deviation is discarded to obtain the target color space value of the color picking area; When the color values ​​of the RGB color data of the three color picking areas a, b, and c all exceed the deviation range of 10%, it is considered that the color weights of the three color picking areas a, b, and c are not similar, and then the RGB color data of the three color picking areas a, b, and c are weighted averaged to obtain the target color space value of the color picking area.

6. The method for generating a scene-adaptive LED lighting spectrum according to claim 1, characterized in that: In step S4, the obtained target color space RGB value is converted into a power configuration, and the method for obtaining the power values ​​of the four colors RGBW is as follows: Pr = (R * BASE_POWER_R) / 255; Pg = (G*BASE_POWER_G) / 255; Pb = (B*BASE_POWER_B) / 255; Prgb=Pr+Pg+Pb; When Prgb≤BASE_POWER_RGB condition 1, Ptotal=Prgb+Pw, Pw=K*BASE_POWER_W, K is the adjustment coefficient of white light power; Get the actual power values ​​of the four LED light sources, RGBW; When Prgb>BASE_POWER_RGB condition 2, Pr, Pg, and Pb are compressed in equal proportion until condition 1 is met, and then condition 1 is followed; The BASE_POWER_RGB setting value is 20% of Ptotal; Ptotal is the total power of the LED light source module; Among them, Prgb represents the actual total power of RGB three colors, Pr represents the power of red light, Pg represents the power of green light, Pb represents the power of blue light, and Pw represents the power of white light; BASE_POWER_R, BASE_POWER_G, BASE_POWER_B are the powers of the three fixed red, green and blue light sources respectively, BASE_POWER_W is the power of the fixed white light source, and BASE_POWER_RGB is the sum of the powers of the three fixed red, green and blue light sources.

7. The method for generating a scene-adaptive LED lighting spectrum according to claim 1, characterized in that: The method for converting the power values ​​of the four colors RGBW into duty cycle data values ​​for output in step S5 is: the duty cycle data range is 0-255; R:255*Pr / BASE_POWER_R; G:255*Pg / BASE_POWER_G; B:255*Pb / BASE_POWER_B; W:255*Pw / BASE_POWER_W.

8. A computer storage medium storing computer instructions, wherein the computer instructions, when called, are used to execute the method for generating a scene-adaptive LED lighting spectrum as claimed in any one of claims 1 to 7.

9. An electronic device, wherein: The electronic device comprises: a processor; and a memory arranged to store computer executable instructions, wherein when the executable instructions are executed, the processor executes the method for generating a scene-adaptive LED lighting spectrum according to any one of claims 1 to 7.