Projection lamp pixel map generation and application method and device, equipment and medium
By generating models and drawing functions end-to-end, combined with the display characteristics and pixel layout of ambient lighting, we can directly generate pixel maps suitable for surface lights. This solves the problems of generation complexity and poor display effects in existing technologies, and achieves efficient, automated and high-quality image generation.
Patent Information
- Application Number
- CN202511131704.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-13
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2045-08-13
AI Technical Summary
The existing technology for generating planar light pixel images has a complex process, high time cost, and easily affected image quality. It lacks semantic understanding and classification processing of image content, resulting in poor display effects and poor user experience.
Through end-to-end generation of models and drawing functions based on user input text, type description information is identified and a pixel map of the spotlight suitable for the ambient lighting fixture is generated. Taking into account the display characteristics and pixel layout of the lighting fixture, it is directly mapped to the lamp bead layout interface for playback.
It achieves efficient, automated, and high-definition pixel image generation, improves user experience and system flexibility, meets the needs of diverse application scenarios, and avoids image deformation and color inconsistency problems.
Smart Images

Figure CN120635245A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of lighting effect control technology, and in particular to an application method, device, equipment and medium for generating a pixel map of a spotlight. Background Art
[0002] With the advancement of digital imaging technology, surface lights, as a new type of ambient lighting, are gaining widespread application in advertising, decoration, entertainment, and other fields. By projecting pixelated images, surface lights can create unique visual effects and provide users with a brand new experience. However, existing technologies still face many challenges in generating pixel images suitable for surface lights.
[0003] Currently, the common method for generating images for surface light displays is to use open-source models (such as StableDiffusion) to generate cartoon-style images. These images are then subjected to color enhancement, background processing, and resizing to suit the display requirements of surface lights. While this method can generate images suitable for projection lighting to a certain extent, it has significant limitations in practical applications.
[0004] First, existing methods require multiple processing steps on the generated image, including color adjustment, background optimization, and resizing. These processing steps not only increase the complexity and time cost of image generation, but can also lead to a decrease in image quality. For example, color enhancement and background processing may introduce noise or distortion, affecting the final display effect. Furthermore, this method requires manual intervention, making it difficult to achieve automation and efficiency, limiting its feasibility for large-scale applications.
[0005] Secondly, existing methods fail to fully consider the display characteristics and pixel layout of planar lights when generating images. The display area of a planar light typically has a fixed pixel layout, and existing image generation methods fail to optimize for this layout. This can cause the generated image to exhibit distortion, blurring, or color inconsistencies when displayed on the planar light, impacting the user's visual experience.
[0006] Furthermore, existing methods lack semantic understanding and classification of image content. In real-world applications, users may need to generate specific image types based on different scenarios and needs, such as animals, natural phenomena, and festivals. However, existing methods cannot automatically identify image types and generate corresponding images based on user-entered text descriptions. Instead, users must manually select and adjust the image types, which increases the complexity of the operation.
[0007] The above problems limit the effects of ambient lighting in practical applications and user experience. Therefore, further improvements are urgently needed to address the deficiencies in the existing technology. Summary of the Invention
[0008] The primary purpose of this application is to solve at least one of the above problems and provide an application method, device, equipment and medium for generating a spotlight pixel map.
[0009] In order to meet the various objectives of this application, this application adopts the following technical solutions: A method for generating a pixel map of a spotlight provided for one of the purposes of this application includes the following steps: Determine image parsing information of a spotlight pixel image to be generated based on the user input text, wherein the image parsing information includes type description information and content description information; Identify the cluster to which the type description information belongs, and when it belongs to the first cluster, call an end-to-end generation model to generate the spotlight pixel map according to the type description information and the content description information; When the type description information belongs to the second cluster, determining a corresponding drawing function according to the content description information, and using the drawing function to draw and generate the spotlight pixel map; According to the plane position mapping relationship, the generated spotlight pixel map is mapped to the lamp bead layout interface of the atmosphere lamp for playback.
[0010] A device for generating a pixel map of a spotlight is proposed to meet the application method for generating a pixel map of a spotlight, which is one of the purposes of this application. The device comprises: An input parsing module configured to determine image parsing information of a spotlight pixel image to be generated based on a user input text, wherein the image parsing information includes type description information and content description information; a direct generation module configured to identify the cluster to which the type description information belongs, and when the type description information belongs to the first cluster, call an end-to-end generation model to generate the spotlight pixel map according to the type description information and the content description information; a drawing generation module configured to determine a corresponding drawing function according to the content description information when the type description information belongs to the second cluster, and use the drawing function to draw and generate the spotlight pixel map; The mapping playback module is configured to map the generated spotlight pixel map to the lamp bead layout interface of the atmosphere lamp for playback according to the plane position mapping relationship.
[0011] On the other hand, a computer device provided to meet one of the purposes of the present application includes a processor and a memory, and the processor calls and runs a computer program in the memory to execute the steps of the projector pixel map generation application method.
[0012] On the other hand, a computer-readable storage medium is provided to meet another purpose of the present application, which stores a computer program implemented according to the application method for generating a spotlight pixel map in the form of computer-readable instructions. When the computer program is called and executed by a computer, the steps included in the corresponding method are executed.
[0013] This application effectively solves the problems of the existing technology such as complex image generation process, high time cost, easily affected image quality, and lack of semantic understanding and classification processing of image content by directly generating a pixel map of a spotlight based on text input by the user. First, by utilizing an end-to-end generation model, the user only needs to input a text description to directly generate a pixel map suitable for the display of an atmosphere lamp, without the need for multiple subsequent processing. This simplifies the generation process, reduces manual intervention, avoids the degradation of image quality caused by multiple processing, and achieves efficient, automated and high-quality image generation. Secondly, this application fully considers the display characteristics and pixel layout of the atmosphere lamp. By identifying the type description information in the text input by the user and calling the corresponding generation model or drawing function, a pixel map that is highly adapted to the display characteristics of the atmosphere lamp is generated, avoiding problems such as image deformation, blurring or color inconsistency, and significantly improving the visual experience. In addition, by analyzing the content description information of the text input by the user, the category to which the image belongs is automatically identified and the corresponding pixel map is generated, which reduces the complexity of operation, improves the flexibility of the system and the user experience, and meets the needs of diverse application scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] 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: Figure 1 This is a schematic structural diagram of an exemplary atmosphere lighting device of the present application; Figure 2 A flowchart of a typical embodiment of the method for generating a pixel map of a floodlight of the present application; Figure 3 This is a block diagram of the principle of the device for generating pixel images for a floodlight in this application; Figure 4 This is a schematic diagram of the structure of a computer device used in this application. DETAILED DESCRIPTION
[0015] The atmosphere lighting of this application, such as Figure 1 As shown, it includes a controller 80 and lamp units 82 and 84. The controller 80 and the lamp units 82 and 84 can be directly connected by wire or wirelessly, as long as a communication connection can be achieved between the two.
[0016] The number of lamp units 82 and 84 is unlimited, limited only by the support capabilities of the controller 80. Lamp units 82 and 84 are responsible for controlling the numerous lamp beads within them to illuminate in an orderly manner, displaying the corresponding lighting effects, according to lighting effect control information sent by the controller 80. Lamp units 82 and 84 can be a single, minimalist lamp component that responds to the controller 80 as a whole.
[0017] In some embodiments, an ambient lighting fixture consisting of multiple such lighting units 82 and 84 connected to the same controller 80 can also be used as a lighting unit within a larger framework, and then communicated with the upper-level controller 80 within the larger framework to form the ambient lighting fixture of the present application. In other words, based on the architecture of the ambient lighting fixture of the present application, which includes the controller 80 and the lighting units, the lighting units therein can also be nested to form the ambient lighting fixture of the present application, as long as the upper and lower-level controllers 80 forming the nested relationship can reach a pre-agreed agreement.
[0018] In some embodiments, the ambient lighting fixture includes not only a control chip serving as the controller 80 , but also components configured as needed, such as a control panel, a communication component, and a display screen.
[0019] 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 memory, and the memory and central processing unit are used to store and execute program instructions, respectively, to implement corresponding functions. The control panel usually provides one or more buttons for implementing on-off control of the controller 80, selecting various preset lighting effects, etc. The communication component is used to achieve wireless communication connection with each lighting unit 82, 84. 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 implementation of human-computer interaction functions. The control panel and the display screen can also be integrated into the same touch screen.
[0020] The controller of the atmosphere lighting fixture can receive user input text through its display screen, and call the end-to-end generation model deployed locally or on the server based on the user input text. The model generates a spotlight pixel map based on the type description information and content description information corresponding to the user input text, or draws a spotlight pixel map, so as to use the spotlight pixel map to control the various lighting units of the atmosphere lighting fixture to display the image content in the spotlight pixel map, thereby presenting the corresponding lighting effect.
[0021] The lamp unit 82 can be a planar lamp, which has a large number of lamp beads arranged regularly on a plane. The arrangement relationship of these lamp beads constitutes lamp bead layout information. The lamp bead layout information actually describes a lamp bead layout interface. This lamp bead layout interface can be positionally corresponded with a plane image, such as the spotlight pixel map of the present application, so as to map each pixel in the spotlight pixel map to each corresponding lamp bead of the lamp unit 82, determine the light-emitting control parameters corresponding to each lamp bead, and construct the light-emitting control parameters corresponding to each lamp bead into a lighting effect playback instruction corresponding to the spotlight pixel map. Through the lighting effect playback instruction, the color display of each lamp bead of the lamp unit 82 can be controlled to display the spotlight pixel map.
[0022] In some embodiments, the controller 80 of the ambient lighting device of the present application can be implemented in a standalone computer device, as long as the computer device is equipped with a control chip that functions as the controller 80. When the controller 80 is implemented in a computer device, various resources inherent to the computer device can be shared to reduce overall implementation costs. The computer device referred to herein can be any terminal device for user use, such as a smartphone, personal computer, laptop computer, tablet computer, etc.
[0023] According to the product architecture and working principle of the above-mentioned atmosphere lighting fixture, the application method of generating a pixel map of a spotlight of the present application can be implemented as a computer program, stored in the storage medium of the controller 80 of the atmosphere lighting fixture of the present application, and called and run by the controller 80 from the storage medium to control the various lighting units 82, 84 connected to it to play corresponding lighting effects.
[0024] See also Figure 2 In some embodiments, the method for generating a pixel map of a spotlight of the present application includes: Step S5100: Determine image parsing information of a spotlight pixel image to be generated based on the user input text, wherein the image parsing information includes type description information and content description information; This application allows the user to submit user input text through an input device, and generates the spotlight pixel map required for playing the lighting effect in one step based on the user input text. Therefore, the user input text is the basis for generating the spotlight pixel map.
[0025] Users can input description information of the pixel image of the required spotlight through various input devices, such as smart phones, personal computers or special control panels, and the controller of the present application converts it into user input text. For example, the user may enter "penguins in Antarctica" or "red circular pattern". These text descriptions provide key information for subsequent image generation. Users can also input audio data in the form of voice, which is then converted by the controller into corresponding user input text.
[0026] The pixel map of the spotlight in the present application is an image format designed specifically for atmosphere lamps, and its core feature is that the image content is presented in a pixelated form to adapt to the display characteristics of the lamp. Specifically, the resolution of the pixel map of the spotlight is usually matched with the layout of the lamp beads of the atmosphere lamp, including a 1:1 or 1:N adaptation relationship, such as the common 512×512 pixel format, to ensure that each pixel can be accurately mapped to the corresponding lamp bead of the lamp, thereby achieving clear and accurate image projection. This pixel map not only retains the main visual features of the original image, but also enhances the visual effect on a specific display device by optimizing the pixel layout and color processing. In addition, the generation process of the pixel map of the spotlight fully considers the semantic information of the text input by the user, so that the generated image can accurately reflect the user's description needs. Whether it is a specific object (such as animals, plants) or an abstract pattern (such as geometric shapes, holiday symbols), it can present high-quality visual effects on the atmosphere lamp in a pixelated form.
[0027] The user input text may have some ambiguity in semantic expression. By further parsing the user input text and determining the corresponding image parsing information, the user's specific intention in describing the spotlight pixel image can be clarified. In one embodiment, the image parsing information includes type description information and content description information.
[0028] The type description information is used to indicate the category to which the image belongs, such as animals, natural phenomena, festivals, etc. These categories are predefined, and the various predefined categories are pre-divided into at least two clusters, including a first cluster and a second cluster, wherein the first cluster mainly includes categories that can convert the objects described by the user input text into corresponding concrete graphics, and the second cluster mainly includes categories that can convert the objects described by the user input text into corresponding abstract graphics. The first cluster and the second cluster correspond to the subsequent end-to-end generation model and drawing function, respectively. For example, if the user input text is "Penguins in Antarctica", the type description information is "animals". Since the category "animals" belongs to the first cluster, it will trigger a call to the end-to-end generation model; if the user input text is "red circular pattern", the category description information is "shape", which belongs to the second cluster and will trigger a call to the drawing function.
[0029] The content description information more specifically describes the image's content, such as "penguin," "red circle," and so on. This information is used to further refine the generated image, ensuring it meets the user's detailed requirements. For example, if the user wishes to generate a red circular pattern, the content description information will ensure that the generated image has the correct color and shape.
[0030] In a specific implementation, when determining the image parsing information contained in user input text, in one embodiment, natural language processing techniques can be used to parse the user input text. For example, by using a pre-trained large language model, the user input text is supplemented with text instructions that prompt the model to determine image parsing information, and then input into the large language model. This allows the model to automatically identify key information in the user input text and understand and determine the type and content description information contained in the user input text.
[0031] In another embodiment, a preset keyword library may be used to extract category keywords and content keywords from the user input text as type description information and content description information, respectively, which may also serve to determine image analysis information.
[0032] Step S5200: Identify the cluster to which the type description information belongs. If the type description information belongs to the first cluster, call an end-to-end generation model to generate the spotlight pixel map according to the type description information and the content description information. This application pre-establishes a mapping relationship between each category and the cluster to which it belongs. These clusters include a first cluster and a second cluster. The first cluster primarily contains categories that can convert objects described by user-entered text into concrete graphics, such as animals and plants; the second cluster primarily contains categories that can convert objects described by user-entered text into abstract graphics, such as geometric shapes and color patterns. This classification method facilitates the selection of the most appropriate generation path based on the semantic content of the user-entered text.
[0033] Once the type description information in the image analysis information is determined, the cluster to which it belongs can be identified. For example, if the type description information is "animal," it is identified as belonging to the first cluster; if the type description information is "shape," it is identified as belonging to the second cluster. Depending on the cluster, different generation paths are used to generate the spotlight pixel map.
[0034] For the case of belonging to the first cluster, the end-to-end generation model is called in association. In this application, the end-to-end generation model is implemented as a deep learning model, which can directly generate a spotlight pixel map based on the type description information and content description information of the user input text. For example, if the user inputs the text "Penguins in Antarctica", the type description information is identified as "animals", which belongs to the first cluster. Then the end-to-end generation model is called, and the pre-trained image generation capability in the model is used to combine the type description information of "animals" and the content description information of "penguins" to generate the corresponding spotlight pixel map.
[0035] In specific implementation, the end-to-end generative model can adopt a pre-trained deep learning framework, such as the generative adversarial network (GAN) or the variational autoencoder (VAE). These models are trained with a large amount of image data and can learn the characteristics and generation rules of different categories of images.
[0036] Step S5300: When the type description information belongs to the second cluster, determining a corresponding drawing function according to the content description information, and using the drawing function to draw and generate the spotlight pixel map; If the type description belongs to the second cluster, the corresponding drawing function is determined based on the content description and used to generate the pixel image of the spotlight. This step is designed for abstract graphics (such as geometric shapes and color patterns) described by user input text. Unlike the concrete graphics generated by the first cluster, this step focuses on generating images through mathematical functions and graphics rendering algorithms.
[0037] When the type description information is identified as belonging to the second cluster, the appropriate drawing function is first determined based on the content description information. For example, if the user enters the text "red circular pattern", the "red" and "circle" in the content description information will be identified as key information, and the corresponding drawing function will be selected accordingly. In this case, the drawing function may draw the circle based on a mathematical formula (such as the equation of a circle) and combine it with color parameters (such as RGB values) to set the circle's color.
[0038] In specific implementations, drawing functions can be predefined graphics drawing algorithms, such as basic drawing functions in computer graphics, such as draw_circle and draw_rectangle. These functions draw corresponding shapes on a standard-sized canvas based on input parameters (such as the shape's size, position, and color). For example, the draw_circle function draws a circle on the canvas based on the center coordinates, radius, and color parameters; the draw_rectangle function draws a rectangle based on the vertex coordinates and color parameters.
[0039] During the drawing process, a standard-sized canvas is created. This canvas's dimensions typically match the layout of the ambient lighting fixture's beads, such as 512×512 pixels. Then, based on the parameters in the content description, the corresponding drawing function is called to draw the graphics on the canvas. For example, if the user enters the text "red circular pattern," the system calls the draw_circle function to draw a red circle in the center of the canvas. The radius and color parameters are determined based on the specific description entered by the user.
[0040] In some embodiments, further processing can be performed on the drawn graphics to enhance the visual quality of the generated image. For example, the edges of the graphic lines can be expanded, and the area of line expansion can be determined and filled with random colors to increase the visual layering and richness of the graphic. This processing method not only improves the aesthetics of the image but also better adapts it to the display characteristics of the ambient lighting fixture.
[0041] Step S5400: Map the generated spotlight pixel map to the lamp bead layout interface of the atmosphere lamp for playback according to the plane position mapping relationship.
[0042] In order to use the plane position mapping relationship to realize the playback and display of the spotlight pixel image, it is necessary to obtain the lamp bead layout information of the ambient lighting fixture. The lamp bead layout information can be determined by polling the individual lamp beads of the lighting unit of the ambient lighting fixture, or directly called from the memory. The lamp bead layout information describes in detail the position and arrangement of each lamp bead in the lamp, usually expressed in the form of two-dimensional coordinates. For example, a common 512×512 pixel surface lamp will have a lamp bead layout information containing 512×512 coordinate points, each corresponding to a lamp bead. The physical position and arrangement order of these lamp beads on the ambient lighting fixture determine the specific method of image mapping.
[0043] After obtaining the lamp bead layout information, a corresponding lamp bead layout interface is created based on the layout information. This interface is a virtual two-dimensional plane that simulates the display area of the luminaire unit. On this interface, the position of each lamp bead is defined as a pixel, forming a pixelated interface that corresponds to the physical layout of the luminaire. For example, if the luminaire is a square surface light, its lamp bead layout interface will also be a square pixel array.
[0044] The generated spotlight pixel map is then scaled and mapped to the lamp layout interface. This step involves a one-to-one correspondence between each pixel in the pixel map and a lamp bead in the lamp layout interface. Specifically, the mapping relationship between each pixel in the pixel map and the planar position of the lamp bead in the lamp layout interface must be determined. For example, if the resolution of the pixel map is exactly the same as the lamp bead layout (e.g., 512×512 pixels), each pixel in the pixel map can be directly mapped to the corresponding lamp bead. If the resolution is inconsistent, appropriate scaling may be required to ensure the image is displayed effectively on the lamp.
[0045] During the mapping process, the color value of each lamp bead in the lamp bead layout interface is determined based on the color value of each pixel in the spotlight pixel map, referring to the plane position mapping relationship. This step ensures that each lamp bead on the lamp accurately displays the color information in the image. For example, if a pixel in the pixel map is red, the corresponding lamp bead will be set to red.
[0046] Finally, based on the color values set for each bead, the corresponding lighting control parameters for all the bead components in the bead layout interface are generated. These parameters include information such as the color value and brightness of each bead and are used to control the bead's lighting state. These lighting control parameters are then converted into lighting effect playback instructions and sent to the corresponding lighting units in the ambient lighting fixtures, thereby controlling the lighting fixtures to play the projection pixel map.
[0047] In practice, this step can be implemented in a variety of ways. For example, specialized control software or hardware can be used to handle the generation of mapping and playback instructions. Furthermore, to enhance the display quality, image optimization algorithms, such as color correction and brightness adjustment, can be applied during the mapping process to ensure optimal image display on the luminaire.
[0048] Through the above embodiments, the present application directly generates a spotlight pixel image based on user input text, significantly improving generation efficiency, while optimizing the adaptability of the image to the display characteristics of the ambient lighting fixture, and greatly enhancing the user experience. Its technical advantages are manifested in multiple aspects, including but not limited to: First, this application effectively addresses the existing issues of complex image generation, high time costs, and compromised image quality. By introducing an end-to-end generation model, users only need to input a text description to directly generate a pixel image suitable for ambient lighting display, eliminating the need for multiple subsequent processing steps such as color adjustment, background optimization, and resizing. This improvement not only simplifies the generation process and reduces manual intervention, but also avoids the image quality degradation caused by multiple processing steps, thereby achieving efficient, automated, and high-quality image generation.
[0049] Secondly, this application fully considers the display characteristics and pixel layout of ambient lighting fixtures, solving the problem of poor display effects caused by the failure of generated images to be optimized for ambient lighting fixtures in the prior art. By identifying the type description information in the user input text and matching it with the preset clusters, the corresponding generation model or drawing function can be called according to different categories to generate a spotlight pixel map that is highly adapted to the display characteristics of the ambient lighting fixture. This not only ensures the display effect of the image on the ambient lighting fixture, but also avoids problems such as image deformation, blurring, or color inconsistency, significantly improving the user's visual experience.
[0050] In addition, this application also solves the problem of the lack of semantic understanding and classification of image content in the existing technology. By analyzing the content description information of the text entered by the user, it can automatically identify the category to which the image belongs and generate the corresponding pixel map accordingly. This improvement eliminates the need for users to manually select and adjust the image type, greatly reducing the complexity of operation and improving the flexibility of the system and user experience. Users can simply generate specific types of images such as animals, natural phenomena, festivals, etc. through text descriptions according to different scenarios and needs, thereby meeting the needs of diverse application scenarios.
[0051] Based on any embodiment of the method of the present application, image parsing information of a spotlight pixel image to be generated is determined based on the user input text, wherein the image parsing information includes type description information and content description information, including: Step S5110: Respond to the user submission instruction and obtain the corresponding user input text; After the user inputs text content for generating the spotlight pixel map through the graphical user interface of the input device, the text content can be submitted to trigger the user submission instruction. In response to the instruction, the controller can obtain the corresponding user input text.
[0052] In practical applications, the methods for obtaining user input text can be diverse. For example, users can enter text using a touchscreen keyboard or input audio data using voice recognition technology, which the system then converts into corresponding text information. This diverse input method improves the user-friendliness and applicability of the system, making it easy for different user groups to use the system.
[0053] In one embodiment, icons corresponding to each category can be provided through a graphical user interface for users to select. Users only need to enter text content corresponding to the content description information in the text box. After the user submits, the user-submitted text can be automatically generated based on the icon and text content selected by the user, further simplifying the difficulty of user expression.
[0054] Step S5120: Add the user input text to a preset parsing prompt template to obtain a parsing prompt text; User input text is often relatively vague natural language expressions. Directly using these descriptions may not accurately generate the required spotlight pixel map. By calling the preset parsing prompt template to embed the user input text, thereby generating parsing prompt text, the target parsing model can be used to further clarify the user's true intention.
[0055] The purpose of the parsing prompt template is to provide a structured framework for user input text. Specifically, the parsing prompt template can contain some predefined prompt words or formats that can guide the model to identify key information in the user input text. For example, the parsing prompt template can contain "Please understand the pattern that the user wants to draw based on the user input text, and determine the type description information and content description information of the pattern content. The user input text is as follows: [Content]", where "[Content]" is a placeholder that the user replaces with the embedded user input text to obtain the corresponding parsing prompt text.
[0056] In one embodiment, preset category information may be inserted into the parsing prompt template, and the model may be guided to determine the type description information of the user input text from the category information through text description in the parsing prompt template.
[0057] Step S5130: input the parsing prompt text into a preset target parsing model to drive the target parsing model to determine the type description information and content description information of the spotlight pixel image to be generated according to the user input text to form the image parsing information.
[0058] After determining the parsing hint text, it can be input into the target parsing model to obtain image parsing information. The target parsing model can be a pre-trained deep learning model used to understand and parse user input text. This model is trained on a large amount of text data and is able to identify and extract key information from the text, such as the type description and content description in the image parsing information. The type description indicates the category of the image, such as animals, natural phenomena, and festivals; the content description provides a more specific description of the image's content, such as "penguin" or "red circle."
[0059] In practice, target parsing models can employ a variety of deep learning architectures, such as Transformer-based models (e.g., BERT, GPT) or recurrent neural networks (RNNs) and their variants (e.g., LSTM, GRU). These models are capable of processing natural language text and extracting key information through contextual understanding. For example, if a user inputs "penguins in Antarctica," the target parsing model will identify "animal" as the type description and "penguin" as the content description.
[0060] To further improve parsing accuracy, the target parsing model can be trained with preset category information. These categories are predefined and cover a wide range of possible user input categories. For example, the model can be trained to recognize categories such as "animals," "natural phenomena," and "festivals," and select the most appropriate type description from these preset categories when parsing user input.
[0061] In one embodiment, the target parsing model can employ a multi-task learning approach to simultaneously learn to extract both genre and content description information. For example, the model can process user input text using a shared encoder and then generate genre and content description information using two different decoders. This multi-task learning approach can improve model efficiency and accuracy.
[0062] In another embodiment, the target parsing model can incorporate contextual information into its parsing. For example, if a user enters the text "a red circular pattern for Christmas," the model will not only identify "shape" as the type descriptor but also further refine the content description to "a red circular pattern" based on the contextual information "Christmas." This context-aware parsing approach can more accurately understand the user's intent and generate a spotlight pixel image that better meets their needs.
[0063] By inputting the parsing hint text into the target parsing model, the model can output structured image parsing information. For example, if the user inputs the text "penguins in Antarctica", the image parsing information output by the model may be: Type description: Animal Content description information: Penguin This structured output provides clear guidance for subsequent image generation steps, ensuring that the generated spotlight pixel map accurately reflects the user's intention and adapts to the display requirements of the ambient lighting fixture.
[0064] Through the above embodiments, the present application combines the diversified acquisition methods of user input text, the structured guidance of the parsing prompt template, and the deep learning capabilities of the target parsing model to achieve accurate understanding of user intentions and efficient extraction of image parsing information. This process not only improves user-friendliness and applicability, but also enhances the accuracy and flexibility of the model through preset category information and context-aware parsing. Compared with other embodiments of the present application, this embodiment further improves the efficiency and accuracy of the model through the combination of multi-task learning and contextual information, thereby providing more precise and structured guidance for subsequent image generation steps. This technical advantage ensures that the generated spotlight pixel map can more accurately reflect the user's intentions and better adapt to the display requirements of atmosphere lighting, significantly improving system performance and user experience.
[0065] Based on any embodiment of the method of the present application, before determining the image parsing information of the spotlight pixel map to be generated based on the user input text, the method includes: Step S4100: Acquire a training data set, wherein the training data set includes a plurality of sample images and corresponding image analysis information, wherein the sample images are generated based on corresponding source images and are pixel-enlarged images of the source images; This application pre-prepares a training dataset that can be directly called when training the end-to-end generative model. The training dataset is the foundation of model learning and contains multiple sample images and their corresponding image parsing information. These sample images are usually generated based on the corresponding source images and are pixel-scaled versions of the source images to ensure that the model can learn the pixelated image generation style formed by direct pixel-by-pixel scaling from low resolution to high resolution.
[0066] Sample images can be obtained in a variety of ways. For example, appropriate source images can be selected from existing image databases. These source images can include simple geometric shapes, natural landscapes, animals, plants, and so on, covering various types of descriptive information that users may need to generate. For each source image, a sample image is generated using pixel magnification technology.
[0067] Image parsing information is metadata associated with a sample image, describing its type and content. For example, if the source image is of a penguin, the corresponding image parsing information might include the type descriptor "animal" and the content descriptor "penguin." This information can be manually annotated or automatically generated using an image-to-text model.
[0068] When constructing a training dataset, diversity and representativeness must also be considered. To enable the model to generalize to a wide range of inputs, the sample images should cover a wide range of possible scenarios and categories. For example, in addition to common animals and natural phenomena, they could also include abstract graphics and holiday symbols. Furthermore, the sample images should have a variety of resolutions and sizes to accommodate ambient lighting fixtures of varying sizes.
[0069] Step S4200: Input the sample image and its corresponding image analysis information into a preset end-to-end generation model for training until the end-to-end generation model is trained to a convergence state.
[0070] The sample image and its corresponding image analysis information are input into the preset end-to-end generative model for training until the model is trained to a convergence state. Through training, the model can learn the mapping relationship from user input text to generated spotlight pixel images.
[0071] An end-to-end generative model is a deep learning model, typically based on a generative adversarial network (GAN), variational autoencoder (VAE), or Transformer architecture. In one embodiment, a pre-trained large language model can also be used for fine-tuning training. These models are capable of learning the complex relationship between input text and output images. For example, if the input text is "penguins in Antarctica," the model needs to learn how to generate a corresponding pixelated image of a penguin. During training, the model continuously adjusts its internal parameters to minimize the difference between the generated image and the target image.
[0072] In practice, the training process can employ a variety of strategies. A common approach is supervised learning, where the model input is image parsing information and the output is a generated pixel map of the light source. The model adjusts parameters by comparing the generated image with the real sample image. For example, the mean squared error (MSE) or structural similarity index (SSIM) can be used as a loss function to measure the similarity between the generated image and the target image.
[0073] During training, model performance can be evaluated using a variety of metrics. For example, a validation set can be used to monitor model convergence and ensure that the model is not overfitting. When the model's performance on the validation set no longer significantly improves, the model is considered to have converged. At this point, training can be stopped and the model parameters saved.
[0074] By executing the various steps of the above embodiments, the present application can effectively train the end-to-end generation model, so that it has the ability to directly generate high-quality spotlight pixel images from user input text. This process not only ensures that the model can learn the mapping relationship from low-resolution source images to high-resolution pixel magnification images, but also enhances the generalization ability of the model through a diverse training data set. Specifically, by using sample images containing a variety of scenes and categories and their image parsing information for training, the model can better understand and generate various types of images, thereby meeting the needs of users in different scenarios. In addition, the use of supervised learning strategies and appropriate loss functions, such as mean square error or structural similarity index, further optimizes the generation effect of the model, ensuring that the generated spotlight pixel image has a high degree of consistency and visual similarity with the target image. By monitoring the convergence of the model on the validation set, the overfitting problem is effectively avoided, and the stability and reliability of the model are improved. These technical advantages enable this embodiment to have a significant improvement in the accuracy and efficiency of generating spotlight pixel images compared to other embodiments, providing users with an efficient, flexible and high-quality spotlight pixel image generation solution.
[0075] Based on any embodiment of the method of the present application, before obtaining the training data set, the method includes: Step S3100: Create a canvas of standard size, select a target source image from a preset source image set, align the centers of the canvas and the target source image to establish a position mapping relationship; To facilitate the generation of sample images from the source image, a standard-sized canvas is first created. Its dimensions can be set to match the resolution of the final floodlight pixel map. For example, if the resolution of the floodlight pixel map is 512×512 pixels, the standard-sized canvas should also be 512×512 pixels. This consistent sizing ensures that the generated sample images can be directly used to train the end-to-end generative model and are adaptable to the display requirements of the ambient lighting fixture.
[0076] Next, select a target source image from a pre-set source image set. This source image set can contain a variety of image types, such as geometric shapes, natural landscapes, animals, and plants. These images cover the various types of descriptive information that users may need to generate. The target source image can be selected based on the requirements of the training dataset. For example, if you need to train the model to generate images of animals, you can select a source image containing animals.
[0077] Next, the standard-sized canvas is center-aligned with the target source image. To do this, the center points of the canvas and source image are calculated and aligned with the center point of the canvas. For example, if the source image is 20×26 pixels and the canvas is 512×512 pixels, the center point of the source image will be placed in the center of the canvas. This center alignment ensures that the source image is centered on the canvas after enlargement, avoiding image shifting or cropping during enlargement.
[0078] By establishing a position mapping relationship through center alignment, we can determine the corresponding position of each pixel in the source image on the canvas. For example, the pixel coordinate (0,0) in the source image may correspond to the position (256,256) on the canvas, depending on the size of the source image and the canvas. This position mapping relationship is crucial for the subsequent pixel enlargement process, as it ensures that each pixel is correctly placed on the enlarged canvas.
[0079] Step S3200: Determine, based on the source image size of the target source image and the standard size, a magnification ratio corresponding to enlarging the target source image from the source image size to the standard size; To determine the magnification factor, you first need to determine the original dimensions of the target source image and the dimensions of the standard-sized canvas. For example, if the target source image is 20×26 pixels and the standard-sized canvas is 512×512 pixels, you need to calculate the magnification factor required to scale the source image to the canvas size. This is done by dividing the canvas size by the source image size to determine the horizontal and vertical magnification factors. In the above example, the horizontal magnification factor is 512 ÷ 20 = 25.6, and the vertical magnification factor is 512 ÷ 26 = 19.7. To maintain the image's aspect ratio, a smaller magnification factor of 19.7 should be selected. This ensures that the source image will fit within the canvas after scaling and maintains its original aspect ratio.
[0080] In practice, there are several ways to determine the magnification. Besides the simple division calculation described above, the magnification can also be adjusted based on actual needs. For example, to obtain a clearer image, a higher magnification can be selected, but this also requires consideration of the issue of the image exceeding the canvas.
[0081] Step S3300: traverse each pixel of the target source image, determine the drawing area corresponding to each pixel in the canvas according to the position mapping relationship and the magnification, and fill the drawing area with the color value of the pixel in the target source image; After determining the magnification factor, we can enlarge each pixel of the target source image using this magnification factor by traversing each pixel in the target source image. As you can see, each pixel in the target source image can be mapped to a corresponding drawing area on the canvas. This drawing area is actually a single pixel of the target source image magnified according to the magnification factor and then mapped to the canvas.
[0082] For example, a pixel with coordinates (3, 5) in the source image will have starting coordinates (3×19.7+59, 5×19.7) on the enlarged canvas, where 59 is the number of horizontally spaced pixels to center the enlarged image. The ending coordinates (e.g., (4×19.7+59, 6×19.7)) are then calculated by summing up individual pixels. The starting and ending coordinates form the drawing area on the canvas where the corresponding pixel in the target source image is mapped. This ensures that every pixel in the source image is correctly mapped to its corresponding position on the canvas after enlargement, and that the entire image is centered on the canvas.
[0083] After determining the corresponding drawing area of each pixel of the target source image on the canvas, the color value of each pixel in the drawing area can be set to the color value of the corresponding pixel in the target source image to achieve color filling of the corresponding drawing area on the canvas.
[0084] Step S3400: Store the image in the canvas as a sample image corresponding to the target source image, associate the sample image with the pre-labeled image parsing information of the target source image, and add it to the training data set.
[0085] Storing the processed image in the canvas as a sample image corresponding to the target source image, associating it with the pre-labeled image parsing information, and then adding it to the training dataset is a key step in building a high-quality training dataset, ensuring that the model can learn an effective mapping relationship from user input text to generated images.
[0086] The sample image should be stored in a format consistent with the training model's requirements, typically a common image format such as PNG or JPEG. These formats preserve the image's pixel information and color details, facilitating subsequent model learning and processing. For example, if the target source image is upscaled and stored as a sample image in PNG format, the image will contain the upscaled pixelated image content while preserving the color and structural characteristics of the original source image.
[0087] Image parsing information is metadata closely associated with the sample image, providing the model with a detailed description of the image's content and category. This information can be manually annotated or automatically generated by an image-to-text model. For example, if the target source image is a penguin, its image parsing information might include the type descriptor "animal" and the content descriptor "penguin." This information provides the model with clear guidance, helping it understand the semantic content of the image.
[0088] After associating sample images with image parsing information, they are added to the training dataset. The training dataset is the foundation of model training, and its quality and diversity directly impact model performance. By adding diverse sample images and detailed image parsing information to the dataset, the model can learn different types of image features and generation patterns. For example, a dataset can include sample images of various types, such as animals, natural landscapes, and geometric shapes, along with corresponding detailed parsing information, enabling the model to generalize to a variety of input scenarios.
[0089] In practical applications, the construction of the training dataset can be optimized by considering multiple factors. First, the resolution and size of the sample image should be consistent with the final generated spotlight pixel size. Figure 1 The dataset should be consistent to ensure that the model can learn the correct pixel magnification style. Secondly, the image parsing information should accurately reflect the content and category of the image so that the model can correctly understand and generate the image. In addition, the construction of the dataset also needs to consider diversity and representativeness to improve the generalization ability and adaptability of the model.
[0090] Through the above examples, the present application has carried out a detailed and in-depth optimization process on the sample images before obtaining the training data set, thereby providing high-quality training materials for the end-to-end generation model. This process not only ensures that the sample images are consistent with the final generated spotlight pixels in terms of resolution and size, but also ensures that the sample images are consistent with the final generated spotlight pixels in terms of resolution and size. Figure 1 The quality and visual effect of the image after magnification are guaranteed by center alignment, precise calculation of magnification, and pixel-level drawing area coloring. This optimization of sample images changes the direct reliance on the Wensheng graph model, overcomes inertial thinking, and enables the model to learn more accurate pixel magnification styles and image generation rules during training. Compared with other embodiments of the present application, this method significantly improves the quality and stability of the model-generated images, enhances the generalization ability of the model, and enables it to better adapt to various input scenarios and display requirements.
[0091] Based on any embodiment of the method of the present application, using the drawing function to draw and generate the spotlight pixel map includes: Step S5310: Create a canvas of standard size, and execute the drawing function in the canvas to draw the graphics specified by the content description information; Creating a standard-sized canvas is essential for drawing graphics. This canvas's dimensions typically match the resolution of the resulting spotlight pixel image, for example, the common 512×512 pixels. This consistent size not only ensures that the generated image can be directly used for subsequent display needs but also provides a clear drawing space for drawing functions. The canvas can be a two-dimensional array, where each element represents a pixel. Its initial value can be set to transparent or the background color.
[0092] The drawing function has been previously determined based on the content description information corresponding to the user-entered text. Therefore, the drawing function can be directly called to draw the corresponding graphic on the canvas. When executing the drawing function, the position and size of the graphic can be determined based on the specific parameters pre-given in the content description information or by calling default specific parameters. For example, if the user input text is "Draw a circle with a radius of 100 pixels at the center position," the drawing function will draw a circle with a radius of 100 pixels at the center position of the canvas based on these parameters. These parameters can be directly entered by the user or obtained by parsing the user input text.
[0093] Step S5320: Expand along the lines of the graphic to determine a line expansion area, fill the line expansion area with a random color, and use the image content in the canvas as the spotlight pixel map.
[0094] To enhance the pixelation effect, the lines of the drawn graphic are expanded, and an extended area is determined, which is then filled with color. This enhances the visual effect of the graphic, making it more eye-catching and layered when displayed under a projector. Specifically, edge expansion involves extending the outline of the graphic outward by a certain width, forming an extended area surrounding the original graphic. The width of this area can be adjusted according to design requirements. For example, for simple geometric shapes, a narrower extended area can be set to maintain the graphic's simplicity; for complex patterns, the width of the extended area can be appropriately increased to enhance the visual effect.
[0095] After the line extension area is determined, it will be filled with a specific color to further highlight the outline of the shape. The fill color or pattern can be selected based on user needs or default settings. For example, a target color can be randomly generated as a specific color and filled into the line extension area.
[0096] This embodiment can accurately draw specified graphics based on the content description information of the text input by the user by creating a canvas of standard size and executing a drawing function on it. Furthermore, by expanding the edges of the graphic lines and filling them with specific colors, the visual effect of the graphics is effectively enhanced, making them more eye-catching and layered when displayed in a spotlight. Compared with the traditional method of directly converting graphics into pixelated images, this pixelation processing method for the line expansion area can better adapt to the display requirements of the spotlight pixel map, avoiding the problems of image detail loss and poor visual effects caused by direct conversion. Achieving the line pixelation effect by separately expanding the line expansion area not only improves the visual quality of the image, but also provides users with more flexible visual design options, so that the final generated spotlight pixel map is more outstanding in visual performance, significantly improving the overall effect and user experience of the spotlight display.
[0097] Based on any embodiment of the method of the present application, before the generated spotlight pixel map is mapped to the lamp bead layout interface of the atmosphere lamp according to the plane position mapping relationship and played, the method includes: Step S2100: Perform color clustering on each pixel in the generated spotlight pixel map to obtain multiple primary color categories, and determine the pixel center color corresponding to each primary color category; By performing color clustering on each pixel in the generated spotlight pixel map, multiple primary color categories can be obtained, and then the pixel center color corresponding to each primary color category can be determined.
[0098] The purpose of color clustering is to divide the pixels in an image into multiple categories based on color similarity. In this application, a color clustering algorithm is used to group the pixels in a spotlight pixel map into multiple primary color categories. For example, if an image contains multiple similar shades of green, the color clustering algorithm can group these green pixels into a single primary color category and determine the central color of that category. The central color is usually the color that occurs most frequently within that color category or is most representative of that category.
[0099] In practice, various color clustering algorithms can be used, such as K-Means clustering and DBSCAN clustering. These algorithms group pixels based on their color features (such as RGB values) and calculate the center color of each group. For example, the K-Means clustering algorithm uses iterative optimization to assign pixels to the nearest cluster center and continuously adjusts the location of the cluster center until convergence.
[0100] The goal of color clustering is to reduce the color diversity in an image and make the pixels within each dominant color more consistent. This not only improves the visual quality of the image but also reduces color noise and inconsistencies that may appear when displayed on ambient lighting fixtures. For example, color clustering can unify all pixels in an image that are close to "dark green" into a single central color, resulting in a smoother and more consistent image display.
[0101] Furthermore, color clustering can be optimized by incorporating semantic information from the image. For example, if a user inputs a text description such as "a green meadow," the color clustering algorithm can prioritize identifying and clustering green pixels, ensuring that the meadow's color in the generated image is more uniform and natural.
[0102] Step S2200: Reset the color value of each pixel included in each main color category in the spotlight pixel map to the color value of the center color of the category; In the previous section, we used a color clustering algorithm to classify the pixels in an image into multiple primary color categories and determined the central colors of each primary color category. These central colors represent the most typical or most frequently occurring colors within each color category.
[0103] In this step, for each pixel in the spotlight pixel map, the primary color category to which it belongs is first determined. Then, the color value of the pixel is reset to the color value of the center color of the primary color category to which it belongs. This process can be achieved by traversing each pixel in the image and updating its color value. For example, if the original color of a pixel is a green tone close to "dark green", after color clustering, it is classified into a primary color category whose center color is "dark green". In this step, the color value of the pixel will be updated to "dark green".
[0104] This resetting of color values not only improves the visual quality of the image but also reduces color noise and inconsistencies that may appear when displayed on ambient lighting fixtures. By unifying pixels of similar colors into a single central color, the image is displayed more smoothly and consistently, and the prominence of each dominant color within the entire spotlight pixel map is enhanced. Furthermore, this processing optimizes the image's display, making it more suitable for display on ambient lighting fixtures, especially those with limited LED layouts and display characteristics.
[0105] Step S2300: Determine the closest central color of an outlier pixel in the spotlight pixel map based on its color value, and reset the color value of the pixel to the color value of the closest central color.
[0106] Outlier pixels refer to pixels that differ significantly in color from surrounding pixels. These pixels may cause visual noise or inconsistency when displayed, affecting the overall visual effect.
[0107] To handle these outlier pixels, we first need to determine which primary color category's center color their color value is closest to. This can be achieved by calculating the color distance between the outlier pixel's color value and the center color of each primary color category. Color distance can usually be calculated using Euclidean distance or other color space distance metrics. For example, in RGB color space, the Euclidean distance between two colors can be obtained by calculating the difference between their RGB values.
[0108] Once the closest center color to the outlier pixel is determined, its color value is reset to the color value of the center color. This process can be achieved by iterating over each pixel in the image, checking whether it is an outlier pixel, and updating its color value according to the above method.
[0109] This resetting of the color values of outlier pixels not only helps reduce color noise in the image but also makes the image smoother and more consistent when displayed. Furthermore, by unifying the color values of outlier pixels to the center color of the dominant color category, the prominence of each dominant color category in the image is further enhanced, making the image more visually appealing when displayed on ambient lighting fixtures.
[0110] This embodiment effectively solves the problem of machine hallucination that may occur when the end-to-end generation model generates a pixel map of a spotlight through color clustering and outlier pixel processing, and significantly improves the visual quality and consistency of the image. Specifically, the color clustering algorithm divides the pixels in the image into multiple primary color categories based on color similarity, and determines the central color of each primary color category, thereby reducing color diversity and making the image smoother and more consistent when displayed. Furthermore, by resetting the color value of the outlier pixel to its closest central color, this embodiment can effectively reduce the color cast caused by machine hallucinations, ensuring that the visual effect of the image when displayed on the atmosphere lamp is more stable and natural. This processing method not only optimizes the display effect of the image, but also enhances the significance of each primary color category, making the spotlight pixel map more outstanding in visual performance and significantly improving the user experience.
[0111] Based on any embodiment of the method of the present application, mapping the generated spotlight pixel map to the lamp bead layout interface of the atmosphere lamp for playback according to the plane position mapping relationship includes: Step S5410: Acquire lamp bead layout information of the atmosphere lamp, and create a corresponding lamp bead layout interface in a two-dimensional plane according to the lamp bead layout information, wherein each lamp bead in the lamp bead layout information serves as a single pixel in the lamp bead layout interface; The lamp layout information for an ambient lighting fixture details the position and arrangement of each lamp within the fixture, typically expressed as two-dimensional coordinates. For example, a common 512×512 pixel planar light would have its lamp layout information comprised of 512×512 coordinate points, with each point corresponding to a lamp. The physical location and arrangement order of these lamps on the fixture determine the specific method of image mapping.
[0112] When creating a lamp layout interface based on the lamp layout information, you can first call the lamp layout information from the ambient lighting fixture's memory, parse the lamp layout information, and treat each lamp as a pixel in the interface. In this way, the lamp layout interface is actually a pixelated interface that corresponds to the physical layout of the lamp. For example, if the lamp is a square surface lamp, its lamp layout interface will also be a square pixel array. This correspondence ensures that each pixel in the spotlight pixel map is accurately mapped to the corresponding lamp in the lamp.
[0113] In practice, lamp layout information can be obtained in a variety of ways. One common method is to directly read it from the technical documentation provided by the lamp manufacturer, which typically contains detailed lamp layout parameters. Another method is to dynamically obtain lamp layout information through the lamp's built-in sensors or communication interface. This method can adapt to lamps of different models and configurations.
[0114] Step S5420: scaling the generated spotlight pixel map to correspond to the lamp bead layout interface, and determining a mapping relationship between each pixel in the spotlight pixel map and a plane position of the lamp bead in the lamp bead layout interface; To facilitate position mapping, you can first adjust the resolution of the spotlight pixel map to match the lamp bead layout interface. If the resolution of the spotlight pixel map and the lamp bead layout interface are inconsistent, for example, the resolution of the spotlight pixel map is 256×256 pixels, but the lamp bead layout interface is 512×512 pixels, then the spotlight pixel map needs to be scaled. Scaling can be achieved using a variety of algorithms, such as nearest neighbor interpolation, bilinear interpolation, or bicubic interpolation. These algorithms calculate the pixel values of the scaled image based on the pixel values of the original pixel map, ensuring that the image remains clear and consistent after enlarging or reducing it.
[0115] After the scaling is completed, it is necessary to determine the planar position mapping relationship between each pixel in the spotlight pixel map and the lamp beads in the lamp bead layout interface. This can be achieved by calculating the corresponding position of each pixel in the lamp bead layout interface. For example, if the resolution of the spotlight pixel map is 512×512 pixels and the lamp bead layout interface is also 512×512 pixels, then each pixel in the spotlight pixel map will be directly mapped to a lamp bead in the lamp bead layout interface. Specifically, the pixel with coordinates (0,0) in the spotlight pixel map will be mapped to the lamp bead with coordinates (0,0) in the lamp bead layout interface, the pixel with coordinates (1,1) in the spotlight pixel map will be mapped to the lamp bead with coordinates (1,1) in the lamp bead layout interface, and so on.
[0116] In the specific implementation, the plane position mapping relationship can be determined by a simple coordinate conversion formula. If the resolution of the spotlight pixel map is W×H and the resolution of the lamp bead layout interface is W′×H′, then the coordinates (x′, y′) of the pixel with coordinates (x, y) in the spotlight pixel map in the lamp bead layout interface can be calculated by the following formula: Here, ⌊⋅⌋ represents a rounding-down operation. This ensures that every pixel in the spotlight pixel map is accurately mapped to a lamp bead in the lamp bead layout interface, thus achieving accurate image display.
[0117] Additionally, to further optimize the mapping effect, consider the image's aspect ratio and the fixture's display characteristics. If the aspect ratio of the spotlight pixel image doesn't match the LED layout interface, appropriate cropping or padding may be required to ensure the image doesn't appear distorted when displayed on the fixture. For example, if the spotlight pixel image is a square image and the LED layout interface is a rectangle, you can add transparent or background color padding to both sides of the spotlight pixel image to match the aspect ratio of the LED layout interface.
[0118] Step S5430: comparing the plane position mapping relationship, determining the color value of each lamp bead in the lamp bead layout interface according to the color value of each pixel in the spotlight pixel map, and generating the corresponding light control parameters of all the lamp beads in the lamp bead layout interface; The plane position mapping relationship defines the correspondence between each pixel in the spotlight pixel map and the lamp beads in the lamp bead layout interface. Based on this, the color value of each lamp bead in the lamp bead layout interface can be determined by comparing the color value of each pixel in the spotlight pixel map with this mapping relationship. This step can be achieved by simply passing the color value. For example, if the color value of a pixel in the spotlight pixel map is red (RGB value (255,0,0)), then the color value of the corresponding lamp bead determined by this mapping relationship will also be set to red. This process can be achieved by traversing each pixel in the spotlight pixel map and updating the color value of the corresponding lamp bead in the lamp bead layout interface according to the mapping relationship. Setting the color value of the lamp bead actually determines the corresponding lighting control parameters of the lamp bead.
[0119] In a specific implementation, the generation of lighting control parameters is determined based on the color value of the LED. These parameters typically include information such as the brightness and color of the LED and are used to control the lighting state of the LED. For example, if the color value of the LED is red, the lighting control parameters will indicate that the LED emits red. These parameters can be generated using specific control instructions or protocols, such as using the DMX protocol or PWM signals to control the lighting state of LED lamps.
[0120] Step S5440: construct the light-emitting control parameters of each lamp bead in the lamp bead layout interface into a lighting effect playback instruction, and send it to the atmosphere lamp to control it to play the projection light pixel image.
[0121] In order to display the spotlight pixel image in the lamp unit of the atmosphere lamp, it is necessary to convert the light control parameters of each lamp bead in the lamp bead layout interface into a lighting effect playback instruction.
[0122] In practice, lighting effect playback commands can be constructed using a software algorithm. The algorithm generates corresponding control commands based on the lighting control parameters of each lamp in the lamp layout interface. These commands can be digital signals, which are sent to the control chip of the ambient lighting unit via a communication interface (such as a serial port or network interface). Upon receiving these commands, the control chip controls the lighting state of each lamp according to the command content, thereby displaying the pixel image of the projected light on the lamp.
[0123] To ensure the accuracy and reliability of lighting effect playback commands, various technical measures can be employed. For example, a verification algorithm can be used to verify the integrity of the command, ensuring no data loss or errors occur during transmission. Furthermore, encryption technology can be used to protect the command content, preventing unauthorized access or tampering.
[0124] When sending lighting effect playback instructions to the atmosphere lamp, it is necessary to ensure that the lamp's control chip can correctly parse and execute these instructions. This can be achieved by performing protocol adaptation and debugging between the controller of this application and the lamp unit's control chip.
[0125] Furthermore, to optimize the display effect, the image can be further processed before sending the lighting effect playback command to the ambient lighting fixture, specifically the control chip of its lighting unit. For example, the image's color values can be corrected to suit the lighting fixture's display characteristics. This can include adjusting the brightness, contrast, or saturation of the color to ensure the visual effect of the image when displayed on the lighting fixture.
[0126] Through the above embodiments, the present application can accurately map the generated spotlight pixel map to the lamp bead layout interface of the atmosphere lamp, and control the lamp to play the image through the lighting effect playback instruction. This process not only ensures the display effect of the spotlight pixel map on the lamp, but also improves the accuracy and visual quality of the display by optimizing the mapping relationship and lighting control parameters. Specifically, by obtaining the lamp bead layout information and creating the corresponding lamp bead layout interface, the present application can adapt to lamps of different models and configurations. By scaling and position mapping the spotlight pixel map, the accurate display of the image on the lamp is ensured, and the clarity and consistency of the image can be maintained even in the case of inconsistent resolution. In addition, by generating lighting control parameters and constructing lighting effect playback instructions, the present application can accurately control the lighting state of each lamp bead, thereby achieving high-quality pixelated image display. These technical advantages together improve the display effect of the spotlight pixel map on the atmosphere lamp, enhance the user experience, and provide strong technical support for the application of smart lighting and visual effects.
[0127] See also Figure 3, a floodlight pixel map generation application device provided to meet one of the purposes of the present application is a functional embodiment of the floodlight pixel map generation application method of the present application, the device includes an input parsing module 5100, a direct generation module 5200, a drawing generation module 5300, and a mapping playback module 5400, wherein the input parsing module 5100 is configured to determine the image parsing information of the floodlight pixel map to be generated based on the user input text, and the image parsing information includes type description information and content description information; the direct generation module 5200 is configured to identify the cluster to which the type description information belongs, and when it belongs to the first cluster, call the end-to-end generation model to generate the floodlight pixel map according to the type description information and the content description information; the drawing generation module 5300 is configured to determine the corresponding drawing function according to the content description information when the type description information belongs to the second cluster, so as to use the drawing function to draw and generate the floodlight pixel map; the mapping playback module 5400 is configured to map the generated floodlight pixel map to the lamp bead layout interface of the atmosphere lamp according to the plane position mapping relationship for playback.
[0128] Based on any embodiment of the device of the present application, the input parsing module 5100 includes: a response acquisition module, configured to respond to a user submission instruction and obtain the corresponding user input text; a prompt construction module, configured to add the user input text to a preset parsing prompt template to obtain a parsing prompt text; a parsing execution module, configured to input the parsing prompt text into a preset target parsing model to drive the target parsing model to determine the type description information and content description information of the spotlight pixel image to be generated according to the user input text to constitute the image parsing information.
[0129] On the basis of any embodiment of the device of the present application, prior to the input parsing module 5100, it includes: a sample calling module, configured to obtain a training data set, the training data set includes multiple sample images and corresponding image parsing information, the sample images are generated according to the corresponding source images, and are pixel-enlarged images of their source images; a training execution module, configured to input the sample images and their corresponding image parsing information into a preset end-to-end generation model for training until the end-to-end generation model is trained to a convergence state.
[0130] On the basis of any embodiment of the device of the present application, prior to the sample calling module, it includes: a position mapping module, which is configured to create a canvas of standard size, select a target source image from a preset source image set, and center-align the canvas with the target source image to establish a position mapping relationship; a magnification determination module, which is configured to determine the magnification corresponding to enlarging the target source image from the source image size to the standard size based on the source image size of the target source image and the standard size; an image redrawing module, which is configured to traverse each pixel of the target source image, determine the drawing area corresponding to each pixel in the canvas according to the position mapping relationship and the magnification, and fill the drawing area with the color value of the pixel in the target source image; a sample construction module, which is configured to store the image in the canvas as a sample image corresponding to the target source image, associate the sample image with the pre-labeled image parsing information of the target source image, and add it to the training data set.
[0131] Based on any embodiment of the device of the present application, the drawing generation module 5300 includes: a drawing execution module, which is configured to create a canvas of standard size and execute the drawing function in the canvas to draw the graphics specified by the content description information; a line expansion module, which is configured to expand the lines along the graphics to determine the line expansion area, fill the line expansion area with random colors, and use the image content in the canvas as the spotlight pixel map.
[0132] On the basis of any embodiment of the device of the present application, prior to the mapping playback module 5400, it includes: a color clustering module, which is configured to perform color clustering on each pixel in the generated spotlight pixel map, obtain multiple main color categories, and determine the pixel center color corresponding to each main color category; a same color enhancement module, which is configured to reset the color value of the pixel contained in each main color category in the spotlight pixel map to the color value of the center color of the category; an outlier optimization module, which is configured to determine the closest center color of the outlier pixel in the spotlight pixel map based on its color value, and reset the color value of the pixel to the color value of the center color closest to it.
[0133] Based on any embodiment of the device of the present application, the mapping playback module 5400 includes: an interface creation module, configured to obtain the lamp bead layout information of the atmosphere lamp, and create a corresponding lamp bead layout interface in a two-dimensional plane according to the lamp bead layout information, wherein each lamp bead in the lamp bead layout information serves as a single pixel in the lamp bead layout interface; a screen projection mapping module, configured to scale the generated spotlight pixel map to correspond to the lamp bead layout interface, and determine the plane position mapping relationship between each pixel in the spotlight pixel map and the lamp bead in the lamp bead layout interface; a parameter generation module, configured to compare the plane position mapping relationship, determine the color value of each lamp bead in the lamp bead layout interface according to the color value of each pixel in the spotlight pixel map, and generate the light control parameters corresponding to all the lamp beads in the lamp bead layout interface; a playback control module, configured to construct the light control parameters of each lamp bead in the lamp bead layout interface into a lighting effect playback instruction, and send it to the atmosphere lamp to control it to play the spotlight pixel map.
[0134] In order to solve the above technical problems, the embodiment of the present application also provides a computer device. Figure 4 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, and the database may store a control information sequence, and when the computer-readable instructions are executed by the processor, the processor may implement an application method for generating a pixel map of a projector. 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, and when the computer-readable instructions are executed by the processor, the processor may execute the application method for generating a pixel map of a projector 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 Figure 4 The 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 shown in the figure, or combine certain components, or have a different component arrangement.
[0135] In this embodiment, the processor is used to execute Figure 3 The memory stores the program code and various data required to execute the 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 floodlight pixel map generation application device of this application. The server can call the server's program code and data to execute the functions of all submodules.
[0136] 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 floodlight pixel map generation application method of any embodiment of the present application.
[0137] Those skilled in the art will appreciate that all or part of the processes in the above-described embodiments of the present application can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes in the above-described embodiments of the method. The aforementioned storage medium can be a computer-readable storage medium such as a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
[0138] Those skilled in the art will understand that the various operations, methods, steps, measures, and schemes in the processes discussed in this application may be interchanged, changed, combined, or deleted. Furthermore, other steps, measures, and schemes in the various operations, methods, and processes discussed in this application may also be interchanged, 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 disclosed in this application may also be interchanged, changed, rearranged, decomposed, combined, or deleted.
[0139] The above description is only part of the implementation methods 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 method for generating a pixel map of a floodlight, characterized in that: include: Determine image parsing information of a spotlight pixel image to be generated based on the user input text, wherein the image parsing information includes type description information and content description information; Identify the cluster to which the type description information belongs, and when it belongs to the first cluster, call an end-to-end generation model to generate the spotlight pixel map according to the type description information and the content description information; When the type description information belongs to the second cluster, determining a corresponding drawing function according to the content description information, and using the drawing function to draw and generate the spotlight pixel map; According to the plane position mapping relationship, the generated spotlight pixel map is mapped to the lamp bead layout interface of the atmosphere lamp for playback.
2. The method for generating a pixel map of a spotlight according to claim 1, characterized in that: Based on the user input text, image parsing information of the spotlight pixel image to be generated is determined, wherein the image parsing information includes type description information and content description information, including: Respond to user submission instructions and obtain the corresponding user input text; Adding the user input text to a preset parsing prompt template to obtain a parsing prompt text; The parsing prompt text is input into a preset target parsing model to drive the target parsing model to determine the type description information and content description information of the spotlight pixel image to be generated according to the user input text to form the image parsing information.
3. The method for generating a pixel map of a spotlight according to claim 1, wherein: Before determining the image parsing information of the spotlight pixel map to be generated based on the user input text, the following steps are included: Obtaining a training data set, wherein the training data set includes a plurality of sample images and corresponding image analysis information, wherein the sample images are generated based on corresponding source images and are pixel-enlarged images of the source images; The sample image and its corresponding image analysis information are input into a preset end-to-end generation model for training until the end-to-end generation model is trained to a convergence state.
4. The method for generating a pixel map of a spotlight according to claim 3, characterized in that: Before obtaining the training dataset, include: Create a standard-sized canvas, select a target source image from a preset source image set, align the canvas and the target source image, and establish a position mapping relationship; determining, according to the source image size of the target source image and the standard size, a magnification ratio corresponding to enlarging the target source image from the source image size to the standard size; Traversing each pixel of the target source image, determining a drawing area corresponding to each pixel in the canvas according to the position mapping relationship and the magnification, and filling the drawing area with the color value of the pixel in the target source image; The image in the canvas is stored as a sample image corresponding to the target source image, the sample image is associated with the pre-labeled image parsing information of the target source image, and is added to the training data set.
5. The method for generating a pixel map of a spotlight according to claim 1, characterized in that: The drawing function is used to draw and generate the pixel map of the floodlight, including: Creating a canvas of standard size, and executing the drawing function in the canvas to draw the graphics specified by the content description information; Expanding the edges along the lines of the graphic to determine a line expansion area, filling the line expansion area with a random color, and using the image content in the canvas as the spotlight pixel map.
6. The method for generating a pixel map of a spotlight according to claim 1, characterized in that: According to the plane position mapping relationship, the generated spotlight pixel map is mapped to the lamp bead layout interface of the atmosphere lamp before it is played, including: Perform color clustering on each pixel in the generated spotlight pixel map to obtain multiple main color categories, and determine the pixel center color corresponding to each main color category; Resetting the color value of each pixel included in each main color category in the spotlight pixel map to the color value of the center color of the category; Determine the closest central color according to the color value of the outlier pixel in the spotlight pixel map, and reset the color value of the pixel to the color value of the closest central color.
7. The method for generating a pixel map of a spotlight according to any one of claims 1 to 6, characterized in that: According to the plane position mapping relationship, the generated spotlight pixel map is mapped to the lamp bead layout interface of the atmosphere lamp for playback, including: Obtaining lamp bead layout information of the atmosphere lamp, and creating a corresponding lamp bead layout interface in a two-dimensional plane according to the lamp bead layout information, wherein each lamp bead in the lamp bead layout information serves as a single pixel in the lamp bead layout interface; Scaling the generated spotlight pixel map to correspond to the lamp bead layout interface, and determining the mapping relationship between each pixel in the spotlight pixel map and the plane position of the lamp bead in the lamp bead layout interface; According to the planar position mapping relationship, the color value of each lamp bead in the lamp bead layout interface is determined according to the color value of each pixel in the spotlight pixel map, and the corresponding light control parameters of all lamp beads in the lamp bead layout interface are generated; The light-emitting control parameters of each lamp bead in the lamp bead layout interface are constructed into a lighting effect playback instruction, which is sent to the atmosphere lamp to control it to play the projection light pixel image.
8. A device for generating a pixel map of a floodlight, characterized in that: include: An input parsing module configured to determine image parsing information of a spotlight pixel image to be generated based on a user input text, wherein the image parsing information includes type description information and content description information; a direct generation module configured to identify the cluster to which the type description information belongs, and when the type description information belongs to the first cluster, call an end-to-end generation model to generate the spotlight pixel map according to the type description information and the content description information; a drawing generation module configured to determine a corresponding drawing function according to the content description information when the type description information belongs to the second cluster, and use the drawing function to draw and generate the spotlight pixel map; The mapping playback module is configured to map the generated spotlight pixel map to the lamp bead layout interface of the atmosphere lamp for playback according to the plane position mapping relationship.
9. A computer device comprising a processor and a memory, characterized in that: The processor calls and runs the computer program in the memory to execute the steps of the projector pixel map generation application method as described in any one of claims 1 to 7.
10. 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 7 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
Lamp screen equipment, lamp effect intelligent control method, corresponding device and medium
CN117500117A
Vehicle atmosphere lamp control method, device and equipment and storage medium
CN117580227A
Light screen device, lighting-effect generating method and device thereof, and storage medium
US20250200834A1