Lighting effect display method and its device, equipment and medium
By analyzing the lighting effect to generate text and resetting the color value in the lighting effect image, optimizing the color distribution and visual effects, the problem of poor display effects of traditional lighting screen devices is solved, and high-quality lighting effect display is achieved.
Patent Information
- Application Number
- CN202411218411.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-02
- Publication Date
- 2025-01-14
- Estimated Expiration
- 2044-09-02
AI Technical Summary
Traditional lamp screen equipment has poor effect in lighting effects, resulting in poor visual experience that users intuitively feel, affecting equipment promotion and technology upgrades.
By analyzing the lighting effect generation text, generate corresponding lighting effect images, determine the target position of the color value of each pixel on the hue loop, reset the color value; determine multiple main color values and differential color values, optimize color distribution and vision Effect; reconstruct the lighting effect image into the target resolution and control the lamp screen device to play the corresponding lighting effect.
It achieves more in line with expectations of color changes, optimizes color distribution, improves nature and vividness, and provides a high-quality visual experience of lighting effects.
Smart Images

Figure CN118741823B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of lighting control, and in particular to a lighting effect display method and its corresponding device, computer equipment, and computer-readable storage medium. Background Art
[0002] With the improvement of people's economic level, light screen equipment is becoming more and more popular. As a kind of intelligent lamp, light screen equipment can play the role of decorating indoor space and displaying information. The characteristic of light screen equipment is that it uses lamp beads with larger visual granularity as basic pixels. It is manifested in various forms of products through different implementation methods of its light screen, such as curtain lights, pixel screens, splicing lights, etc. One of the functions of light screen equipment is to display the corresponding lighting effects according to the given lighting effect image.
[0003] In traditional technology, corresponding lighting effect images are usually directly generated according to user needs, so as to display corresponding lighting effects on light screen devices according to the lighting effect images. However, lighting effect images generated by existing Wenshengtu algorithms are usually high-resolution images. When displayed on light screen devices with limited pixels, a large amount of necessary visual content is lost, resulting in poor display effects of corresponding lighting effects and poor visual experience intuitively felt by users.
[0004] It can be seen that the traditional light screen equipment has not achieved good results in lighting effect display, which affects the promotion of light screen equipment. It is necessary to upgrade the technology of light screen equipment. Summary of the invention
[0005] The primary purpose of the present application is to solve at least one of the above problems and provide a lighting effect display method and its corresponding device, computer equipment, and computer program product.
[0006] In order to meet the various objectives of this application, this application adopts the following technical solutions:
[0007] A lighting effect display method provided to meet one of the purposes of the present application includes the following steps:
[0008] Generate a corresponding lighting effect image according to the lighting effect generation text, determine the target position corresponding to the original position of the color value of each pixel in the lighting effect image on the hue wheel, and reset the color value of each pixel according to the target color value of the target position corresponding to the pixel;
[0009] Determine multiple primary color values whose total number of pixels in the lighting effect image meets a preset condition, and reset the color value of each pixel according to the primary color value closest to the color value of the pixel;
[0010] Determine a difference color value that satisfies a preset condition from the average hue value of the lighting effect image, and reset the color value of a pixel point of a predetermined color value in the main content of the lighting effect image according to the difference color value;
[0011] The lighting effect image is reconstructed into a target lighting effect image corresponding to the target resolution, and the light screen device is controlled to play the corresponding lighting effect according to the target lighting effect image, so as to display the target lighting effect image through the light screen device.
[0012] On the other hand, a lighting effect display device provided to meet one of the purposes of the present application includes a first color reset module, a second color reset module, a third color reset module and a lighting effect playback module, wherein the first color reset module is used to generate a corresponding lighting effect image according to a lighting effect generation text, determine a target position corresponding to the original position of the color value of each pixel in the lighting effect image on the hue wheel, and reset the color value of the pixel according to the target color value of each pixel corresponding to the target position; the second color reset module is used to determine a plurality of primary color values whose total number of pixels in the lighting effect image meets a preset condition, and reset the color value of each pixel according to the primary color value closest to the color value of the pixel; the third color reset module is used to determine a difference color value that meets a preset condition with an average hue value of the lighting effect image, and reset the color value of the pixel belonging to the predetermined color value in the main content of the lighting effect image according to the difference color value; the lighting effect playback module is used to reconstruct the lighting effect image into a target lighting effect image corresponding to the target resolution, and control the light screen device to play the corresponding lighting effect according to the target lighting effect image, so as to display the target lighting effect image through the light screen device.
[0013] On the other hand, a computer device provided to meet one of the purposes of the present application includes a central processing unit and a memory, wherein the central processing unit is used to call and run a computer program stored in the memory to execute the steps of the lighting effect display method described in the present application.
[0014] On the other hand, a computer program product provided to meet another purpose of the present application includes a computer program / instruction, which, when executed by a processor, implements the steps of the method described in any embodiment of the present application.
[0015] The technical solution of this application has many advantages, including but not limited to the following aspects:
[0016] First, the present application generates a corresponding lighting effect image by parsing the lighting effect generation text, determines the target position corresponding to the original position of the color value of each pixel on the hue wheel, and resets the color value of each pixel according to the target color value corresponding to the target position. It can be seen that the color values of all pixels in the generated lighting effect image can be appropriately transformed as needed, thereby obtaining a color change that is more in line with expectations.
[0017] Secondly, determine multiple primary color values whose total number of pixels in the lighting effect image meets preset conditions, and reset the color value of each pixel according to the primary color value closest to the color value of the pixel. It can be seen that the color distribution of the lighting effect image at this time is optimized, and the richness of the color distribution is reasonably reduced, thereby improving the naturalness of the overall visual effect.
[0018] Furthermore, a difference color value that satisfies preset conditions from the average hue value of the lighting effect image is determined, and the color value of the pixel point belonging to the predetermined color value in the main content of the lighting effect image is reset according to the difference color value. It can be seen that the color belonging to the preset color in the lighting effect image can be replaced with a color that is particularly different from it in visual effect, thereby making the lighting effect image that may originally appear monotonous or dim become more vivid and interesting.
[0019] Finally, the lighting effect image is reconstructed into a target lighting effect image corresponding to the target resolution, and the light screen device is controlled to play the corresponding lighting effect according to the target lighting effect image, so that the target lighting effect image can be displayed through the light screen device, providing users with a high-quality lighting effect visual experience that matches the light screen device. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:
[0021] Figure 1 It is a schematic diagram of the principle of the electrical structure of the light screen device in the embodiment of the present application;
[0022] Figure 2 The structural form of the exemplary light screen device of this application;
[0023] Figure 3 A flowchart of a typical embodiment of the lighting effect display method of the present application;
[0024] Figure 4 A schematic diagram of a process for performing color conversion on a lighting effect image in an embodiment of the present application;
[0025] Figure 5 This is a schematic diagram of the inner area of a hue ring obtained by dividing the hue ring as an example of the present application;
[0026] Figure 6 A schematic diagram of a process for color normalization of a lighting effect image in an embodiment of the present application;
[0027] Figure 7 It is a schematic diagram of a process of performing predetermined color differentiation on a lighting effect image in an embodiment of the present application;
[0028] Figure 8 A schematic diagram of a process of generating a corresponding lighting effect image according to a lighting effect generation text in an embodiment of the present application;
[0029] Fig. 9 A schematic diagram of a process for resetting the color value of a pixel whose transparency meets a preset condition in a lighting effect image in an embodiment of the present application;
[0030] Fig.10 A schematic diagram of a process of reconstructing a lighting effect image into a target lighting effect image corresponding to a target resolution in an embodiment of the present application;
[0031] Fig.11 This is a principle block diagram of the lighting effect display device of the present application;
[0032] Fig.12 A schematic diagram of the structure of a computer device used in this application. DETAILED DESCRIPTION
[0033] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be interpreted as limiting the present application.
[0034] It will be understood by those skilled in the art that, unless expressly stated, the singular forms "one", "said", and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present application refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may be intermediate elements. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein includes all or any unit and all combinations of one or more associated listed items.
[0035] It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as generally understood by those skilled in the art to which this application belongs. It should also be understood that terms such as those defined in common dictionaries should be understood to have meanings consistent with the meanings in the context of the prior art, and will not be interpreted with idealized or overly formal meanings unless specifically defined as here.
[0036] See also Figure 1As can be seen from the structural schematic diagram of a lamp screen device provided in an embodiment of the present application, the lamp screen device includes a controller 1 and a lamp screen 2. The lamp screen 2 is electrically connected to the controller 1 so as to accept the control of the computer program running in the controller 1 and work together to realize the lighting effect playback.
[0037] The controller 1 generally includes a control chip, a communication component, and a bus connector. In some embodiments, the controller 1 may also be configured with a power adapter, a control panel, a display screen, etc. as required.
[0038] The power adapter is mainly used to convert AC power into DC power to power the entire light screen device. The control chip can be implemented using various embedded chips, such as Bluetooth SoC (System on Chip), WiFi SoC, MCU (Micro Controller Unit), DSP (Digital Signal Processing) and other types of chips. The control chip usually includes a central processing unit and a memory, and the memory and the central processing unit are used to store and execute program instructions respectively to achieve corresponding functions. The above various types of control chips can have their own communication components, or they can be configured with additional communication components as needed. The communication component can be used to communicate with external devices, for example, it can communicate with terminal devices such as personal computers or various smart phones, so that after the user issues various configuration instructions through his terminal device, the control chip of the controller 1 can receive the configuration instructions through the communication component to complete the basic configuration so as to control the light screen. In addition, the controller 1 can also obtain the lighting effect application package encapsulating multiple lighting effect layers through the communication component. The bus connector is mainly used to connect the light screen 2 connected to the bus to the power supply and provide the light effect playing instruction, so the corresponding pins of the power bus and the signal bus are provided. Therefore, when the light screen 2 needs to be connected to the controller 1, it can be connected to the bus connector through the corresponding connector of the light screen. The control panel usually provides one or more buttons for implementing switch control of the controller 1, selecting various preset light effect control modes, etc. The display screen can be used to display various control information so as to cooperate with the buttons in the control panel to support the realization of human-computer interaction functions. In some embodiments, the control panel and the display screen can be integrated into the same touch display screen.
[0039] The specific appearance of the light screen can be designed according to actual conditions. The more common product forms include but are not limited to curtain lights, pixel screens, splicing lights, etc.
[0040] For example, Figure 2The light screen in the embodiment is arranged in the form of a curtain light. The light screen 2 includes a plurality of light strips 21 connected to a bus. Each light strip 21 includes a plurality of lamp beads 210 connected in series. Each lamp bead 210 serves as a light emitting unit. In addition, the number of lamp beads 210 in each light strip 21 is usually the same and arranged at equal intervals. When the light screen 2 used as a curtain light is used, it is usually arranged as follows: Figure 2 The layout shown unfolds each of the light strips 21, so that all the lamp beads in all the light strips 21 are arranged in an array to form a lamp bead matrix structure. Since all the lamp beads can provide a frame effect when they emit light in coordination, the surface where the entire lamp bead matrix structure is located constitutes a display frame 4. When the lighting effects are played, a certain pattern effect can be formed within the display frame 4.
[0041] Each light strip 21 can be composed of a plurality of lamp beads 210 connected in series, each lamp bead 210 is a light-emitting unit, and each lamp bead 210 in the same light strip 21 transmits working current through the same set of cables connected to the bus. The lamp beads 210 in the same light strip 21 can be connected in parallel in terms of electrical connection. In one embodiment, each light strip 21 in the same lamp bead matrix structure can be arranged at equal intervals along the bus direction, and the lamp beads 210 in each light strip 21 are also arranged correspondingly in number and position, so that the entire display frame 4 plays a role similar to a screen when viewing its luminous effect from a distance, and can form a pattern effect in the human eye.
[0042] Each lamp bead 210 of each light strip 21 of the light screen 2 is also provided with a corresponding control chip, which can be selected according to the above disclosure, or other more economical control chips can be selected, and its main function is to extract the luminous color value corresponding to the lamp bead 210 from the lighting effect playback instruction, and control the light-emitting element in the lamp bead 210 to emit the corresponding color light. The light-emitting element can be an LED lamp.
[0043] The implementation principle of the pixel screen is basically the same as that of the curtain light, but the pixel screen provides a frame to fix each light-emitting unit, and arranges each light-emitting unit in a row and column matrix in the same rectangular frame, so as to obtain a product form effect closer to the daily display screen. The pixel screen is similar to the curtain light, and each light-emitting unit can be organized according to a structure with multiple light strips arranged side by side, and can be controlled in the same way as the curtain, so I will not go into details.
[0044] The light screen device of the present application, when powered on, the control chip of the controller can call and execute a computer program from the memory, and through the default initialization process of the computer program, the light screen is powered on and initialized, thereby completing the driver configuration of the light screen and other hardware devices.
[0045] In one embodiment, when the controller starts the light screen, it can first send a self-test instruction to the light screen to drive each light strip or each lamp bead in the light block of the light screen to return its position information in the light strip or light block. Each lamp bead is provided with a corresponding control chip for data communication with the control chip in the controller, so that the characteristic information of the lamp bead itself and the characteristic information of other lamp beads can be serially connected in sequence according to the serial communication protocol to achieve the characterization of its own position information. The serial communication protocol executed between the controller and the lamp bead can be any one of IIC (Inter-Integrated Circuit, integrated circuit bus), SPI (serial peripheral interface, serial peripheral interface), and UART (Universal Asynchronous Receiver-Transmitter, universal asynchronous receiver-transmitter). After the controller obtains the result data returned by the self-test of each lamp bead from the bus, it parses the result data and determines the position of each lamp bead in the display frame 4 presented by the entire lamp screen according to the order of the characteristic information of each lamp bead in the result data. Thus, each lamp bead can be regarded as a light-emitting unit, which can be understood as a basic pixel. The position information of each lamp bead can be constructed as light source position distribution information. When constructing the lighting effect control data, the controller can set the corresponding light-emitting color value for each basic pixel according to the position information of each lamp bead, that is, each light-emitting unit, in the light source position distribution information according to actual needs.
[0046] In some embodiments, the controller 2 of the present application can be implemented in an independent computer device, as long as the computer device is equipped with the corresponding hardware of the controller 2, and the corresponding business logic of the controller 2, including the business logic executed by the method of the present application, is implemented as a computer program installed in the computer device for operation. When the controller 2 is implemented in a computer device, various resources inherent to the computer device can be shared to save the overall implementation cost. The computer device referred to herein can be any terminal device for use by a user, such as a smart phone, a personal computer, a laptop computer, a tablet computer, etc.
[0047] According to the product architecture and working principle of the above-mentioned light screen device, the lighting effect generation method of the present application can be implemented as a computer program product, stored in the memory of the controller of the light screen device, and called from the memory by the central processing unit and run, thereby controlling the light screen to play the corresponding lighting effects.
[0048] Any model of the present application can be deployed in a cloud server, a terminal device, or the controller of the light screen device of the present application, as long as the computing power of the deployed end is capable of meeting the operation requirements of the lighting effect generation model.
[0049] Please refer to Figure 3 , in a typical embodiment of a light effect display method of the present application, it includes the following steps:
[0050] Step S1100: Generate a corresponding light effect image according to the light effect generation text, determine the target position corresponding to the original position of the color value of each pixel point in the light effect image on the hue circle, and reset the color value of each pixel point according to the target color value corresponding to the target position of each pixel point;
[0051] The light effect generation text is to generate a description text for displaying the required light effect on the light screen device. The user provides the corresponding light effect generation text according to their own requirements for the light effect. The provided method can be that the user directly inputs the light effect generation text expressed in natural language through the input method, or the user inputs it in the form of voice and converts the voice into the corresponding light effect generation text.
[0052] In one embodiment, a preset first prompt template based on Few-shot learning is called. The first prompt template includes a task description, examples, and the light effect description content to be embedded. Those skilled in the art can flexibly set the first prompt template with reference to the following disclosure. A示范性 example of the first prompt template: The task description in the first prompt template: "Judge whether what the user wants is an 'abstract style' or a 'figurative style' by specifying the structure and providing some examples."
[0053] 1. Judge according to keywords.
[0054] 2. Directly give the final result without any explanation.
[0055] Examples: "<example>{'input': 'A light effect that is relaxed and pleasant', 'output': 'abstract style'}, {'input': 'Complex and beautiful', 'output': 'abstract style'}, {'input': 'Surprising light colors', 'output': 'abstract style'}, {'input': 'Comfortable ambient light', 'output': 'abstract style'}, {'input': 'Approaching train light effect', 'output': 'figurative style'}, {'input': 'Light effect of a floating turtle pattern', 'output': 'figurative style'}, {'input': 'A light effect with a strong sense of rhythm', 'output': 'figurative style'}< / example>"
[0056] The light effect description content to be embedded: "<input>$The input content that needs to be judged$< / input>"
[0057] Embed the light effect description content into the first prompt template to obtain the corresponding prompt text, and input the prompt text into the large language model to obtain the light effect content style of the light effect generation text determined by the large language model.
[0058] In addition, call a preset second prompt template based on Few-shot learning. The second prompt template includes a task description, examples, and the light effect description content to be embedded. Those skilled in the art can refer to the following disclosure and flexibly set the second prompt template. An exemplary second prompt template: The task description in the second prompt template: "Based on the specified structure and some provided examples, determine whether what the user wants is a'static motion type' or a 'dynamic motion type'.
[0059] 1. Judge according to keywords.
[0060] 2. Directly give the final result without any explanation.
[0061] Examples: "<example>{"input": "Relaxing and pleasant light effect", "output": "Static motion type"}, {"input": "Complex and beautiful", "output": "Static motion type"}, {"input": "Surprising light colors", "output": "Static motion type"}, {"input": "Comfortable ambient light", "output": "Static motion type"}, {"input": "Approaching train light effect", "output": "Dynamic motion type"}, {"input": "Floating turtle pattern light effect", "output": "Dynamic motion type"}, {"input": "Light effect with strong rhythm", "output": "Dynamic motion type"}< / example>"
[0062] The light effect description content to be embedded: "<input>$The input content to be judged$< / input>". Embed the light effect generation text into the second prompt template to obtain the corresponding prompt text, and input the prompt text into the large language model to obtain the light effect motion type of the light effect generation text determined by the large language model.
[0063] If the light effect motion type is the static motion type, in one embodiment, an open-source text-to-image generation model can be used to generate a corresponding image as the light effect image according to the keyword set. The image format of the light effect image can be PNG or JPG. The model can be any one of the DELL·E series models, ERNIE-ViLG series models, Midjourney, Stable Diffusion, eDiff-I, ModelScope, AltDiffusion, layerDiffusion, etc. Those skilled in the art can select one as needed for implementation.
[0064] If the lighting effect motion type is a dynamic motion type, in one embodiment, an open source text-based model for generating multiple image frames can be used to generate an image file consisting of corresponding multiple image frames according to the keyword set as a lighting effect image. The image format of the lighting effect image can be any one of the video formats such as GIF or MP4, and the model can be any one of AnimateDiff, Gen-2, Stable Video Diffusion, Emu Video based on Stable Diffusion, etc., and technical personnel in this field can choose one to implement as needed.
[0065] In a further embodiment, if the generated lighting effect image includes a background, an open source pre-trained image semantic segmentation model is used to determine the content belonging to the background in the lighting effect image, and the color value of each pixel therein is set to the color value corresponding to black (R: 0, G: 0, B: 0), so that the corresponding light-emitting unit does not need to emit light when the background is displayed on the light screen device. The image semantic segmentation model can be Mask R-CNN, U-Net, DeepLabv3, etc.
[0066] Determine the target position corresponding to the original position of the color value of each pixel in the lighting effect image on the hue circle. Taking the color value of a single pixel as an example, the target position can be the color value of the pixel in the corresponding hue circle, and the corresponding S value is the S value of the original position * (1 + a%), a∈(0,1], and / or the corresponding H value is the H value of the original position * (1 + b%) b∈(0,1], such corresponding positions, the a and b can be set as needed according to the disclosure herein.
[0067] Step S1200, determining a plurality of primary color values whose total number of pixels in the lighting effect image meets a preset condition, and resetting the color value of each pixel according to the primary color value closest to the color value of the pixel;
[0068] For each different color value in the lighting effect image, determine the number of pixels displaying the same color value as the total number of pixels of the color value, sort all different color values in descending order of the total number of pixels, and select the top N color values as single main color values, where N can be set as needed.
[0069] For each pixel, the Euclidean distance between the color value of the pixel and each primary color value is calculated as the distance value. For example, the color value of the pixel is R: 246, B: 3, G: 255, and a primary color value is R: 255, B: 255, G: 255, and the corresponding Euclidean distance is 252.08. Then, the primary color value with the lowest distance value is selected, and the color value of the pixel is replaced with the primary color value.
[0070] Step S1300, determining a difference color value that satisfies a preset condition from the average hue value of the lighting effect image, and resetting the color value of a pixel point of a predetermined color value in the main content of the lighting effect image according to the difference color value;
[0071] Obtain the main content in the lighting effect image. Specifically, the main content of the lighting effect image is usually the foreground content in the lighting effect image. Therefore, after constructing the lighting effect image, an open source pre-trained foreground recognition model can be used to determine the foreground content in the lighting effect image. When the background in the lighting effect image is a transparent background, it can be directly confirmed that the content with non-zero transparency in the lighting effect image is the main content. The foreground recognition model can be Mask R-CNN, U-Net, DeepLabv3, etc. Traverse the color value of each pixel in the main content of the current lighting effect image to confirm whether the display effect of the color value is close to black. Specifically, the Euclidean distance between the color value and the color value corresponding to black can be calculated. When the Euclidean distance is less than or equal to the preset threshold, it is confirmed that the color value is close to the color value corresponding to black, that is, it belongs to the predetermined color value. Then, the average hue value is obtained according to the hue value corresponding to the color value of each pixel in the lighting effect image, and the contrast color effect defined in color art is determined to be formed with the average hue value, and the color values of the pixels belonging to the predetermined color value are replaced with the difference color value. Those skilled in the art can set the difference color value as needed according to the disclosure herein.
[0072] Step S1400: reconstruct the lighting effect image into a target lighting effect image corresponding to the target resolution, and control the light screen device to play the corresponding lighting effect according to the target lighting effect image, so as to display the target lighting effect image through the light screen device.
[0073] When the resolution of the lighting effect image does not match the resolution of the light screen device, the lighting effect image can be converted into an image corresponding to the resolution of the lighting effect device, and those skilled in the art can flexibly implement it. Then, matching lighting effect control data is generated according to the converted lighting effect image, and the light screen device is controlled to play the corresponding lighting effect according to the lighting effect control data. The specific implementation here is further disclosed by the subsequent step embodiments, and this step is not discussed for the time being.
[0074] It can be seen from the above embodiments that the present application has many advantages, including but not limited to:
[0075] First, the present application generates a corresponding lighting effect image by parsing the lighting effect generation text, determines the target position corresponding to the original position of the color value of each pixel on the hue wheel, and resets the color value of each pixel according to the target color value corresponding to the target position. It can be seen that the color values of all pixels in the generated lighting effect image can be appropriately transformed as needed, thereby obtaining a color change that is more in line with expectations.
[0076] Secondly, determine multiple primary color values whose total number of pixels in the lighting effect image meets preset conditions, and reset the color value of each pixel according to the primary color value closest to the color value of the pixel. It can be seen that the color distribution of the lighting effect image at this time is optimized, and the richness of the color distribution is reasonably reduced, thereby improving the naturalness of the overall visual effect.
[0077] Furthermore, a difference color value that satisfies preset conditions from the average hue value of the lighting effect image is determined, and the color value of the pixel point belonging to the predetermined color value in the main content of the lighting effect image is reset according to the difference color value. It can be seen that the color belonging to the preset color in the lighting effect image can be replaced with a color that is particularly different from it in visual effect, thereby making the lighting effect image that may originally appear monotonous or dim become more vivid and interesting.
[0078] Finally, the lighting effect image is reconstructed into a target lighting effect image corresponding to the target resolution, and the light screen device is controlled to play the corresponding lighting effect according to the target lighting effect image, so that the target lighting effect image can be displayed through the light screen device, providing users with a high-quality lighting effect visual experience that matches the light screen device.
[0079] See also Figure 4 In a further embodiment, the step S1100 of determining the target position corresponding to the original position of the color value of each pixel in the lighting effect image on the color wheel, and resetting the color value of the pixel according to the target color value of each pixel corresponding to the target position, includes the following steps:
[0080] Step S1110: for each pixel in the lighting effect image, determine the inner ring area to which the original position of the color value of the pixel on the hue ring belongs;
[0081] The color value of the pixel in the lighting effect image may be an RGB value or an HSV value. If the color value of the pixel is an RGB value, the RGB value of the pixel is converted into a corresponding HSV value.
[0082] For each pixel in the lighting effect image, in the HSV three-dimensional coordinate system, the color value of the pixel expressed in HSV can be located on the corresponding hue circle to the two-dimensional coordinates of the HSV value (the H value in the HSV value, the S value in the HSV value) as the original position of the pixel on the hue circle. The hue circle is a circular two-dimensional plane perpendicular to the V axis in the HSV three-dimensional coordinate system and corresponding to the V value in the HSV value. The V value in the circular two-dimensional plane is constant. The value range of the V value and the S value is [0,1], and the value range of the H value is [0,360].
[0083] For the hue rings corresponding to any V value in the HSV three-dimensional coordinate system, the same size can be used to divide the hue ring in the same area division method. Taking a single hue ring as an example, in one embodiment, the hue ring is divided into N sectors of equal size (the central angle of each sector is N / 360), and M concentric circles of different sizes are divided (the center of each concentric circle is the center of the hue ring; the diameter of the i-th concentric circle is i / M of the diameter of the hue ring, i is an integer and i∈(0,M]), thereby obtaining N*M inner ring areas in the hue ring, each inner ring area is a closed space composed of the least edges, and the N and M can be set as needed. In the recommended embodiment, based on the light source position The distribution information is used to determine the density of the lamp beads in the light screen device, and N and M are set accordingly. It is not difficult to understand that the higher the density of the lamp beads, the larger the corresponding N*M can be set. For example, the density of the lamp beads when the light screen device is a curtain light is smaller than that when the light screen device is a pixel light. Accordingly, the N*M corresponding to the light screen device as a pixel light is set to be greater than the N*M corresponding to the light screen device as a curtain light. Those skilled in the art can set the specific values of N and M as needed according to the disclosure herein, so that the subsequent image as a whole contains target color values of multiple color types, and the colors are richer in visual effect. For example, N is 6, M is 3, and the area within the ring obtained by dividing the hue ring is as follows: Figure 5 As shown, there are 6 same-sized inner ring areas 100, 6 same-sized inner ring areas 101, and 6 same-sized inner ring areas 102, totaling 3*6, i.e., 18 inner ring areas. It is not difficult to understand that the two-dimensional coordinate range corresponding to each inner ring area in the chromatic aura ring can be determined, and those skilled in the art can flexibly implement it. For example, Figure 5 The two-dimensional coordinate range of the inner ring area 100 is H∈[0,45), S∈[0,1 / 3), the two-dimensional coordinate range of the inner ring area 101 is H∈[315,360], S∈[1 / 3,2 / 3), and the two-dimensional coordinate range of the inner ring area 102 is H∈[270,315), S∈[2 / 3,1]. Thus, the two-dimensional coordinate range of a single inner ring area in the corresponding hue ring to which the pixel belongs can be determined, thereby confirming that the original position of the pixel belongs to the inner ring area.
[0084] In other embodiments, the area division method may be to divide the hue ring into any one of a plurality of sectors, a plurality of concentric circles, a plurality of rectangles, etc., or any combination of the plurality of sectors.
[0085] Step S1120: Determine a target color value of a target position in the inner ring area that is away from the original position and satisfies a preset condition, and use it to replace the color value of the pixel.
[0086] Furthermore, in one embodiment, if the inner region of the original position of the color value of the pixel on the hue ring belongs to the inner region of the fan-shaped ring in the corresponding hue ring, for example Figure 5 The area 100 shown in the figure is taken as the distance from the original position as the distance from the original position to the center of the hue ring, and it is regarded as that the distance from the original position meets the preset condition, the center of the circle is taken as the target position, the color value represented by HSV corresponding to the center of the circle is converted into a color value represented by RGB as the target color value, and the color value of the pixel point is replaced by the target color value; if the inner ring area to which the color value of the pixel point belongs at the original position on the hue ring is a non-sector inner ring area in the corresponding hue ring, for example Figure 5 For area 101 or area 102 shown in the figure, the distance from the original position is the distance from the original position to the midpoint of the longest arc edge in the annular area, which is regarded as satisfying the preset condition. The midpoint is taken as the target position, and the color value represented by HSV corresponding to the midpoint is converted into a color value represented by RGB as the target color value, and the color value of the pixel is replaced by the target color value.
[0087] In other embodiments, the target position in the inner ring area that satisfies the preset condition from the original position can be that in the inner ring area, the distance from the original position is a preset length, and the corresponding S value is greater than the S value of the original position, and it is regarded as meeting the condition from the original position, and any single position that meets the condition is used as the target position; or it can be that in the inner ring area, the position farthest from the original position and the corresponding S value is greater than the S value of the original position is regarded as meeting the preset condition from the original position, and the position corresponding to the condition is used as the target position. Thus, the color purity of the pixel point is appropriately improved, thereby enhancing the corresponding color to make it look more vivid.
[0088] In this embodiment, based on the color value of each pixel in the lighting effect image, the target color value of the target position in the inner ring area to which the original position belongs that meets the preset conditions is determined, and is used to replace the color value of the corresponding pixel. It can be seen that the color values of all pixels in the lighting effect image can be appropriately changed as needed, thereby obtaining a color change that is more in line with expectations.
[0089] See also Figure 6 In a further embodiment, the step S1200 of determining the plurality of primary color values in which the total amount of pixels in the lighting effect image satisfies a preset condition, and resetting the color value of each pixel according to the primary color value closest to the color value of the pixel, comprises the following steps:
[0090] Step S1210, determining the total number of pixels of each color value in the lighting effect image, and selecting the color value whose total number of pixels meets a preset condition as the main color value;
[0091] For each different color value in the lighting effect image, the number of pixels displaying the same color value is determined as the total number of pixels of the color value, and all different color values are sorted in descending order according to the total number of pixels, and the top N color values are selected as single main color values, respectively, and N can be set as needed. In the recommended embodiment, the density of lamp beads in the light screen device is determined based on the light source position distribution information, and N is set accordingly according to the density of lamp beads. It is not difficult to understand that the higher the density of lamp beads, the larger the corresponding N is set. For example, the density of lamp beads of the light screen device as a curtain light is smaller than that of the light screen device as a pixel light. Based on this, the N corresponding to the light screen device as a pixel light is set to be greater than the N corresponding to the light screen device as a curtain light. Those skilled in the art can set the N as needed according to the disclosure herein, so that the subsequent image as a whole contains main color values of multiple color types, and the color is richer in visual effect.
[0092] Step S1220: For each pixel, calculate the distance value between the color value of the pixel and each main color value, and select the main color value with the lowest distance value to replace the color value of the pixel.
[0093] For each pixel, the Euclidean distance between the color value of the pixel and each primary color value is calculated as the distance value. For example, the color value of the pixel is R: 246, B: 3, G: 255, and a primary color value is R: 255, B: 255, G: 255, and the corresponding Euclidean distance is 252.08. Then, the primary color value with the lowest distance value is selected, and the color value of the pixel is replaced with the primary color value.
[0094] In this embodiment, by determining the main color value of the total number of pixels in the lighting effect image that meets the preset conditions, the main color with the closest distance corresponding to the color value of each pixel in the lighting effect image is determined to replace the color value of the corresponding pixel. It can be seen that the color in the lighting effect image is properly normalized, thereby reducing the complexity of the color and improving the clarity of the display effect, avoiding the unclear intersection of the corresponding colors caused by a large number of colors belonging to noise points in the image, and making the lighting effect image look more natural.
[0095] See also Figure 7 In a further embodiment, the step S1300 of determining a difference color value that satisfies a preset condition with the average hue value of the lighting effect image, and resetting the color value of a pixel point belonging to a predetermined color value in the main content of the lighting effect image according to the difference color value, comprises the following steps:
[0096] Step S1310, determining the color value of a pixel point belonging to a predetermined color value in the main content of the lighting effect image;
[0097] Usually, the main content of a lighting effect image is the foreground content in the lighting effect image. Therefore, after the lighting effect image is constructed in advance, in one embodiment, an open source pre-trained foreground recognition model is used to determine the foreground content in the lighting effect image. When the background in the lighting effect image is a transparent background, the content with non-zero transparency in the lighting effect image can be directly confirmed to be the main content. The foreground recognition model can be Mask R-CNN, U-Net, DeepLabv3, etc.
[0098] In another embodiment, when the lighting effect image contains multiple entity objects and the main content is one or some of these entity objects, an open source pre-trained target detection model can be used to detect all entity objects in the lighting effect image, and then determine the main content of these entity objects. The target detection model can be SSD, YOLO series, R-CNN family, RetinaNet, CornerNet, etc.
[0099] Traverse the color value of each pixel in the main content of the current lighting effect image to confirm whether the display effect of the color value is close to black. Specifically, the Euclidean distance between the color value and the color value corresponding to black can be calculated. When the Euclidean distance is less than or equal to a preset threshold, it is confirmed that the color value is close to the color value corresponding to black, that is, it belongs to the predetermined color value.
[0100] Step S1320, calculating an average hue value according to the hue value corresponding to the color value of each pixel in the lighting effect image;
[0101] Taking the color value of a single pixel expressed in RGB as an example, the hue value corresponding to the color value is calculated. The exemplary formula is as follows:
[0102] Normalize the values of the three channels R, G, and B in the color value of the pixel (for example, divide each value by 255)
[0103]
[0104] Where: H is the hue value corresponding to the color value of the pixel.
[0105] The average hue value is obtained by adding up the hue values corresponding to all pixels in the lighting effect image and dividing the sum by the number of pixels.
[0106] Step S1330, determining a difference color value in a difference color range that satisfies a preset condition with the average hue value, and using the difference color value to replace the color value of the pixel point belonging to the predetermined color value;
[0107] The color effect corresponding to the difference color range and the color effect corresponding to the average hue value constitute the contrast color effect defined in color art, so the hue value range that differs from the average hue value by 120 to 180 can be determined as the difference color range to ensure that the contrast color effect can be formed. Those skilled in the art can flexibly set the difference color range as needed. Then, a color value represented by HSV is randomly set from the difference color range as the difference color value, and the color value represented by HSV is converted into a color value represented by RGB as needed, and the color values of the pixels belonging to the predetermined color value are replaced with the difference color value.
[0108] In this embodiment, a difference color value that satisfies a preset condition is determined based on the average hue value corresponding to the lighting effect image, and is used to replace the color value of the pixel point of the predetermined color value in the lighting effect image. It can be seen that the color of the lighting effect image belonging to the preset color can be replaced with a color that is particularly different from the preset color in visual effect, so that the lighting effect image that may originally appear monotonous or dim becomes more vivid and interesting.
[0109] See also Figure 8 In a further embodiment, generating a corresponding lighting effect image according to the lighting effect generating text in step S1100 includes the following steps:
[0110] Step S1101, determining a lighting effect motion type according to a lighting effect generation text, and extracting a keyword set in the lighting effect generation text;
[0111] In one embodiment, a style recognition model may be pre-implemented, and the style recognition model is pre-trained to a convergence state, and acquires the ability to determine the style of the lighting effect content of the lighting effect generated text. In addition, a motion recognition model may be pre-implemented, and the motion recognition model is pre-trained to a convergence state, and acquires the ability to determine the type of lighting effect motion of the lighting effect generated text. The style recognition model is used to take the lighting effect generated text as input, and the text semantic representation layer in the style recognition model extracts the deep semantic information of the lighting effect generated text, and accordingly derives a style feature vector that vectorizes the deep semantic information, and the style feature vector represents the semantic feature information related to the style in the lighting effect generated text, and then the classification layer in the style recognition model maps the style feature vector to a binary style category, and accordingly derives the classification probability of the abstract style and the classification probability of the concrete style in the binary style category, and confirms the style category with the highest classification probability as the lighting effect content style of the lighting effect generated text. A motion recognition model is adopted with the lighting effect generation text as input. The text semantic representation layer in the motion recognition model extracts the deep semantic information of the lighting effect generation text, and accordingly obtains a motion feature vector that vectorizes the deep semantic information. The motion feature vector represents the semantic feature information related to the motion state in the lighting effect generation text. Then, the classification layer in the motion recognition model maps the motion feature vector to a binary motion category, and accordingly obtains the classification probability of the static motion type and the classification probability of the dynamic motion type in the binary motion category, and confirms the style category with the highest classification probability as the lighting effect content style of the lighting effect generation text.
[0112] The text representation layer in the style recognition model can be a deep learning model suitable for text semantic representation in the NLP field, such as RoBERTa, Transfomer Encoder, MPNet, BiLSTM, GPT, etc. The classification layer in the style recognition model can be a fully connected layer, MLP, etc., and those skilled in the art can choose to implement it as needed. The text representation layer in the motion recognition model can be a deep learning model suitable for text semantic representation in the NLP field, such as RoBERTa, Transfomer Encoder, MPNet, BiLSTM, GPT, etc. The classification layer in the motion recognition model can be a fully connected layer, MLP, etc., and those skilled in the art can choose to implement it as needed. The specific training process of the style recognition model and the motion recognition model can be flexibly implemented by those skilled in the art according to the reasoning process disclosed herein.
[0113] The keyword set in the lighting effect generation text includes all the keywords in the lighting effect generation text that describe the visual characteristics of the corresponding lighting effect. For extracting the keyword set in the lighting effect generation text, specifically, firstly format the lighting effect generation text, including converting uppercase to lowercase, removing punctuation marks, stop words, etc., or any one or more of the above. Then, the formatted lighting effect generation text is segmented to obtain a corresponding segmentation sequence. The segmentation algorithm can be Jieba segmentation, n-gram segmentation, WordPiece segmentation, or CRF segmentation. In one embodiment, each segmentation in the segmentation sequence is matched with a keyword in a preset dictionary. When there is a keyword matching the segmentation in the dictionary, it is confirmed that the segmentation belongs to a keyword; otherwise, it is confirmed that the segmentation does not belong to a keyword. Thus, all word elements in the segmentation sequence that belong to the keyword constitute a keyword set. The dictionary contains multiple keywords related to the description of the lighting effect. In addition, a text set can be formed by pre-collecting multiple lighting effect generated texts, and the importance of each word in the text set can be determined by the TF-IDF algorithm. The words with importance exceeding the preset threshold are used as keywords, so as to gather all the keywords to construct the dictionary. The preset threshold can be set as needed. The matching can be an exact match based on ES (Elasticsearch), and / or a semantic match based on deep learning. In another embodiment, a vocabulary classification model such as a support vector machine (SVM) or a random forest can be pre-trained. After the model is trained to convergence, the probability of each word in the input text belonging to a keyword is determined. Therefore, the vocabulary classification model is used to take the word segmentation sequence as input, determine the probability of each word in the word segmentation sequence belonging to a keyword, confirm the words with probability exceeding the preset threshold as keywords, and gather all the keywords to form a keyword set. The preset threshold can be set as needed. The specific training process of the vocabulary classification model can be flexibly implemented by those skilled in the art according to the reasoning process disclosed herein.
[0114] Step S1102: Generate a lighting effect image according to the keyword set and the lighting effect motion type.
[0115] In one embodiment, if the lighting effect motion type is a static motion type, an open source deep learning model suitable for text semantic representation in the NLP field is used to determine the text semantic representation of the keyword set, and a Gaussian noise matrix image is constructed through a random function as a random noise image, and the random noise image and the text semantic representation are combined to form the initial input data. A preset image generation model is used to take the initial input data as input, and the random noise image in the initial input data is iteratively optimized to obtain the corresponding target implicit features, and the target implicit features are decoded to reconstruct the lighting effect image. The image format of the lighting effect image can be PNG or JPG. The image generation model is pre-trained to a convergence state and acquires the ability to generate corresponding images based on the input text. The model can be StableDiffusion.
[0116] In one embodiment, if the lighting effect motion type is a dynamic motion type, an open source text-based model for generating multiple image frames can be used to generate an image file consisting of corresponding multiple image frames according to the keyword set as a lighting effect image. The image format of the lighting effect image can be any video format such as GIF or MP4, and the model can be AnimateDiff, Gen-2, Stable Video Diffusion, or Emu Video based on Stable Diffusion.
[0117] In this embodiment, by parsing the lighting effect generation text, the lighting effect content style and lighting effect motion type of the lighting effect generation text are clarified, and the keyword set in the lighting effect generation text is extracted. It can be seen that the user's specific personalized requirements for the lighting effect content style and motion type are refined, and a high degree of consistency with the user's expectations is achieved. On this basis, the corresponding lighting effect image is generated according to the keyword set and the lighting effect motion type, which can generate a lighting effect image that meets the actual needs of the user based on the clear user needs.
[0118] See also Fig. 9 In a further embodiment, after generating a corresponding lighting effect image according to the lighting effect generating text in step S1100, the following steps are included:
[0119] Step S2100, determining whether the transparency of each pixel in the lighting effect image meets a preset condition;
[0120] Obtain the transparency of each pixel in the lighting effect image, and the transparency is usually represented by the value of the Alpha channel. If the transparency of a pixel is 0, it means that the display effect of the pixel is completely transparent from a visual point of view, thereby confirming that the pixel meets the preset conditions; if the transparency of a pixel is greater than 0, it means that the display effect of the pixel is not completely transparent from a visual point of view and has a certain color expression, thereby determining that the pixel does not meet the preset conditions.
[0121] Step S2110: When the transparency of the pixel meets a preset condition, the color value of the pixel is reset to a preset color value.
[0122] When the transparency of a pixel meets the preset conditions, the color value of the pixel is set to the preset color value. The preset color value is recommended to be the color value corresponding to black (R: 0, G: 0, B: 0), and can also be set as needed by technical personnel in this field. For example, in a bright environment, it may be necessary to select a darker color value to enhance the visibility of the image; while in a darker environment, it may be necessary to select a lighter color value to avoid excessive visual fatigue.
[0123] In this embodiment, by determining the pixel points in the lighting effect image whose transparency meets the preset conditions and resetting the color values of these pixel points to the preset color values, it can be ensured that the lighting effects corresponding to the lighting effect image can be accurately played subsequently, and the contrast of the lighting effect image can be controlled to a certain extent.
[0124] In a further embodiment, controlling the light screen device to play the corresponding light effect according to the target light effect image in step S1400 includes the following steps:
[0125] Step S1410, generating lighting effect control data matching the light screen device according to the target lighting effect image;
[0126] When the image format of the target lighting effect image is any one of the video formats such as GIF or MP4, the target lighting effect image can be divided into individual image frames, and each image frame can be converted into corresponding lighting effect control data one by one, and then transmitted to the light screen device, so as to control the light screen device to play the corresponding lighting effect; when the image format of the target lighting effect image is PNG or JPG, the target lighting effect image can be directly converted into corresponding lighting effect control data, and then transmitted to the light screen device, so as to control the light screen device to play the corresponding lighting effect.
[0127] Since the resolution of the target lighting effect image is completely consistent with the display frame / resolution of the light screen device, in this case, the resolution of the target lighting effect image corresponds to the light-emitting units in the display frame one by one, and the control data of the corresponding light-emitting units can be directly generated according to the color of each pixel in the target lighting effect image, thereby realizing the generation of lighting effect control data in a one-to-one partition mapping relationship between the target lighting effect image and the display frame. In addition, if the resolution of the target lighting effect image is inconsistent with the display frame / resolution of the light screen device, when it is determined that the target lighting effect image is placed in the middle of the display frame of the light screen device, the light screen device generates the control data of the corresponding light-emitting units in the middle that overlap with the target lighting effect image according to the color of each pixel in the target lighting effect image, thereby realizing the generation of lighting effect control data in a one-to-one partition mapping relationship between the target lighting effect image and the middle part of the display frame.
[0128] Step S1420: Control the light screen device to play corresponding light effects according to the light effect control data.
[0129] When the image format of the target lighting effect image is any one of the video formats such as GIF or MP4, and multiple lighting effect control data are generated accordingly, the controller can trigger the transmission of a lighting effect control data to the light screen device at intervals according to the preset playback time slot or the frame rate of the target lighting effect image, thereby transmitting each lighting effect control data corresponding to each image frame in the target lighting effect image to the light screen device in turn; when the image format of the target lighting effect image is PNG or JPG, the lighting effect control data corresponding to the target lighting effect image can be directly transmitted to the light screen device.
[0130] Whenever the light screen device receives the lighting effect control data, it transmits it to each light-emitting unit according to the data communication protocol followed between it and each light-emitting unit, such as the serial communication protocol. After each light-emitting unit receives the lighting effect control data, it extracts or intercepts the corresponding control data, controls its own light-emitting element to emit corresponding light according to its own control data, and forwards the lighting effect control data to other light-emitting units that have not received it. Each light-emitting unit receives, analyzes, responds to and forwards the lighting effect control data according to its inherent business logic, and the entire light screen device can present the visual effect of the target lighting effect image corresponding to the lighting effect control data.
[0131] It is not difficult to understand that when the target lighting effect image contains multiple image frames, the lighting effects corresponding to each image frame are presented in turn in the display frame of the light screen device, forming the same overall lighting effect with constantly changing images. Since these image frames are derived from the same keyword set, that is, the same theme, they can usually present a themed overall lighting effect on the light screen device. It is not difficult to understand that such an overall lighting effect has a consistent and dynamic style, and has a more immersive effect on the scene.
[0132] In this embodiment, the process of playing the lighting effects corresponding to the target lighting effect image on the light screen device is disclosed, which ensures the accuracy and reliability of the lighting effect playback, presents the lighting effects required by the user, and guarantees the user experience.
[0133] See also Fig.10 In a further embodiment, the step S1400 of reconstructing the lighting effect image into a target lighting effect image corresponding to the target resolution includes the following steps:
[0134] Step S1401, dividing the lighting effect image into a plurality of regions corresponding to the target resolution;
[0135] The lighting effect image is divided into a plurality of regions, and the size of each region corresponds to a single pixel of the target resolution. Specifically, the size of each region can be determined by dividing the width and height of the lighting effect image by the width and height of the target resolution, respectively. The target resolution can be determined according to the resolution of the light screen device, and it is only necessary to ensure that the target resolution matches the resolution of the lighting effect device, for example, the target resolution is set to be the same as the resolution of the light screen device, or the target resolution is set to be 1 / N of the resolution of the light screen device, and N can be set as needed.
[0136] Step S1402: for each region, select the color value with the highest total number of pixels in the region as the core color value of the region;
[0137] For each area, down-sample the area. Specifically, perform maximum pooling on the color values of all pixels in the area to obtain the area with the highest total number of pixels, that is, the area has the largest number of pixels showing the same color value. The corresponding color value is used as the core color value of the area.
[0138] Step S1403: reconstruct a target lighting effect image corresponding to the target resolution according to the core color value of each area.
[0139] Traverse each area, and use the core color value of the area as the color value of the pixel in the target lighting effect image corresponding to the target resolution. Thus, the color values of all pixels in the target lighting effect image can be obtained, thereby obtaining the target lighting effect image.
[0140] In this embodiment, a process of constructing a target lighting effect image corresponding to a target resolution based on a lighting effect image is disclosed, and the lighting effect image can be appropriately adjusted so that the corresponding target lighting effect image can be correctly and completely displayed on a light screen device.
[0141] See also Fig.11, a lighting effect display device provided to meet one of the purposes of the present application is a functional embodiment of the lighting effect display method of the present application. On the other hand, the device is a lighting effect display device provided to meet one of the purposes of the present application, including a first color reset module 1100, a second color reset module 1200, a third color reset module 1300 and a lighting effect playback module 1400, wherein the first color reset module 1100 is used to generate a corresponding lighting effect image according to the lighting effect generation text, determine the target position corresponding to the original position of the color value of each pixel point in the lighting effect image on the hue wheel, and reset the color value of each pixel point according to the target color value of the target position corresponding to the pixel point; The second color resetting module 1200 is used to determine multiple main color values whose total number of pixels in the lighting effect image meets preset conditions, and reset the color value of each pixel according to the main color value closest to the color value of the pixel; the third color resetting module 1300 is used to determine the difference color value that meets the preset conditions with the average hue value of the lighting effect image, and reset the color value of the pixel points belonging to the predetermined color value in the main content of the lighting effect image according to the difference color value; the lighting effect playing module 1400 is used to reconstruct the lighting effect image into a target lighting effect image corresponding to the target resolution, and control the light screen device to play the corresponding lighting effect according to the target lighting effect image, so as to display the target lighting effect image through the light screen device.
[0142] In a further embodiment, the first color resetting module 1100 includes: an area determination submodule, which is used to determine, for each pixel in the lighting effect image, the inner ring area to which the color value of the pixel belongs at the original position on the hue wheel; and a first color replacement submodule, which is used to determine the target color value of the target position in the inner ring area that is away from the original position and meets preset conditions, and is used to replace the color value of the pixel.
[0143] In a further embodiment, the second color reset module 1200 includes: a main color determination submodule, used to determine the total number of pixels of each color value in the lighting effect image, and filter out the color value whose total number of pixels meets the preset conditions as the main color value; a second color replacement submodule, used to calculate the distance value between the color value of each pixel point and each main color value for each pixel point, and filter out the main color value with the lowest distance value to replace the color value of the pixel point.
[0144] In a further embodiment, the third color resetting module 1300 includes: a color determination submodule, used to determine the color value of a pixel belonging to a predetermined color value in the main content of the lighting effect image; an average hue submodule, used to obtain an average hue value according to the hue value corresponding to the color value of each pixel in the lighting effect image; a third color replacement submodule, used to determine a difference color value in a difference color range that meets a preset condition with the average hue value, used to replace the color value of the pixel belonging to the predetermined color value;
[0145] In a further embodiment, the first color reset module 1100 includes: a key extraction submodule, used to determine the lighting effect movement type based on the lighting effect generation text, and extract a keyword set in the lighting effect generation text; an image generation submodule, used to generate a lighting effect image based on the keyword set and the lighting effect movement type.
[0146] In a further embodiment, the first color resetting module 1100 includes: a transparency judgment submodule, used to judge whether the transparency of each pixel in the lighting effect image meets a preset condition; and a transparent coloring submodule, used to reset the color value of the pixel with a preset color value when the transparency of the pixel meets the preset condition.
[0147] In a further embodiment, the lighting effect playback module 1400 includes: a region division submodule, used to divide the lighting effect image into multiple regions corresponding to the target resolution; a core color determination submodule, used to select, for each region, the color value with the highest total number of pixels in the region as the core color value of the region; an image reconstruction submodule, used to reconstruct the target lighting effect image corresponding to the target resolution according to the core color value of each region.
[0148] In order to solve the above technical problems, the present application also provides a computer device. Fig.12 As shown, a schematic diagram of the internal structure of a computer device. The computer device includes a processor, a computer-readable storage medium, a memory, and a network interface connected via a system bus. Among them, the computer-readable storage medium of the computer device stores an operating system, a database, and computer-readable instructions. The database may store a control information sequence. When the computer-readable instructions are executed by the processor, the processor can implement a lighting effect display method. The processor of the computer device is used to provide computing and control capabilities to support the operation of the entire computer device. The memory of the computer device may store computer-readable instructions. When the computer-readable instructions are executed by the processor, the processor can execute the lighting effect display method of the present application. The network interface of the computer device is used to connect and communicate with a terminal. Those skilled in the art will understand that Fig.12The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0149] In this embodiment, the processor is used to execute Fig.11 The memory stores the program code and various data required to execute the above modules or submodules. The network interface is used to transmit data between user terminals or servers. The memory in this embodiment stores the program code and data required to execute all modules / submodules in the lighting effect display device of this application, and the server can call the program code and data of the server to execute the functions of all submodules.
[0150] The present application also provides a storage medium storing computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the lighting effect display method of any embodiment of the present application.
[0151] A person skilled in the art can understand that all or part of the processes in the above-mentioned embodiments of the present application can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the aforementioned storage medium can be a computer-readable storage medium such as a disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
[0152] In summary, the present application achieves high-quality lighting effects displayed on matching light screen devices.
[0153] It will be understood by those skilled in the art that the various operations, methods, steps, measures, and schemes in the processes discussed in this application may be alternated, changed, combined, or deleted. Furthermore, other steps, measures, and schemes in the various operations, methods, and processes discussed in this application may also be alternated, changed, rearranged, decomposed, combined, or deleted. Furthermore, the steps, measures, and schemes in the various operations, methods, and processes in the prior art that are open source and in this application may also be alternated, changed, rearranged, decomposed, combined, or deleted.
[0154] The above description is only a partial implementation method of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A lighting effect display method, characterized in that: The steps include: Generate a corresponding lighting effect image according to the lighting effect generation text, determine the target position corresponding to the original position of the color value of each pixel in the lighting effect image on the hue wheel, and reset the color value of each pixel according to the target color value corresponding to the target position of each pixel; Determine multiple primary color values whose total number of pixels in the lighting effect image meets a preset condition, and reset the color value of each pixel according to the primary color value closest to the color value of the pixel; Determine a difference color value that satisfies a preset condition from the average hue value of the lighting effect image, and reset the color value of a pixel point of a predetermined color value in the main content of the lighting effect image according to the difference color value; Reconstructing the lighting effect image into a target lighting effect image corresponding to the target resolution, and controlling the light screen device to play the corresponding lighting effect according to the target lighting effect image, so as to display the target lighting effect image through the light screen device; The step of determining the target position corresponding to the original position of the color value of each pixel in the lighting effect image on the hue wheel, and resetting the color value of each pixel according to the target color value of the target position corresponding to each pixel, includes: For each pixel in the lighting effect image, determine the inner ring area to which the original position of the color value of the pixel on the hue ring belongs; A target color value of a target position in the inner ring area that is at a distance from the original position that meets a preset condition is determined to replace the color value of the pixel.
2. The lighting effect display method according to claim 1, characterized in that: Determining a plurality of primary color values whose total amount of pixels in the lighting effect image meets a preset condition, and resetting the color value of each pixel according to the primary color value closest to the color value of the pixel, comprises the following steps: Determine the total number of pixels of each color value in the lighting effect image, and select the color value whose total number of pixels meets the preset conditions as the main color value; For each pixel, the distance between the color value of the pixel and each primary color value is calculated, and the primary color value with the lowest distance value is selected to replace the color value of the pixel.
3. The lighting effect display method according to claim 1, characterized in that: Determining a difference color value that satisfies a preset condition from the average hue value of the lighting effect image, and resetting the color value of a pixel point of a predetermined color value in the main content of the lighting effect image according to the difference color value, comprises the following steps: Determine the color value of a pixel point of a predetermined color value in the main content of the lighting effect image; Calculate the average hue value according to the hue value corresponding to the color value of each pixel in the lighting effect image; A difference color value in a difference color range that satisfies a preset condition with the average hue value is determined to replace the color value of the pixel point belonging to the predetermined color value.
4. The lighting effect display method according to claim 1, characterized in that: Generating a corresponding lighting effect image according to the lighting effect generation text includes the following steps: Determine the lighting effect motion type according to the lighting effect generation text, and extract a keyword set in the lighting effect generation text; A lighting effect image is generated according to the keyword set and the lighting effect motion type.
5. The lighting effect display method according to claim 1, characterized in that: After generating the corresponding lighting effect image according to the lighting effect generation text, the following steps are included: Determine whether the transparency of each pixel in the lighting effect image meets a preset condition; When the transparency of a pixel meets a preset condition, the color value of the pixel is reset to a preset color value.
6. The lighting effect display method according to claim 1, characterized in that: Reconstructing the lighting effect image into a target lighting effect image corresponding to the target resolution includes the following steps: Dividing the lighting effect image into a plurality of regions corresponding to a target resolution; For each region, select the color value with the highest total number of pixels in the region as the core color value of the region; A target lighting effect image corresponding to the target resolution is reconstructed according to the core color value of each area.
7. A lighting effect display device, characterized in that: include: A first color resetting module is used to generate a corresponding lighting effect image according to the lighting effect generation text, determine the target position corresponding to the original position of the color value of each pixel in the lighting effect image on the color wheel, and reset the color value of each pixel according to the target color value of the target position corresponding to the pixel; A second color resetting module is used to determine a plurality of primary color values whose total number of pixels in the lighting effect image meets a preset condition, and reset the color value of each pixel point according to the primary color value closest to the color value of the pixel point; A third color resetting module is used to determine a difference color value that satisfies a preset condition from the average hue value of the lighting effect image, and reset the color value of a pixel point of a predetermined color value in the main content of the lighting effect image according to the difference color value; A lighting effect playback module, used to reconstruct the lighting effect image into a target lighting effect image corresponding to a target resolution, and control the light screen device to play a corresponding lighting effect according to the target lighting effect image, so as to display the target lighting effect image through the light screen device; The step of determining the target position corresponding to the original position of the color value of each pixel in the lighting effect image on the hue wheel, and resetting the color value of each pixel according to the target color value of the target position corresponding to each pixel, includes: For each pixel in the lighting effect image, determine the inner ring area to which the original position of the color value of the pixel on the hue ring belongs; A target color value of a target position in the inner ring area that is at a distance from the original position that meets a preset condition is determined to replace the color value of the pixel.
8. A computer device comprising a central processing unit and a memory, characterized in that: The central processing unit is used to call and run the computer program stored in the memory to execute the steps of the method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: It stores a computer program implemented according to the method described in any one of claims 1 to 6 in the form of computer-readable instructions, and when the computer program is called and executed by a computer, the steps included in the corresponding method are executed.
Citation Information
Patent Citations
Color obtaining method and device, electronic equipment and readable storage medium
CN111612857A
Lamp screen equipment, lamp effect generation method, corresponding device and medium
CN117440574A