Light projection pixel map generation application method and apparatus, device, and medium

Through end-to-end generation models and drawing functions, a pixel map of a spotlight suitable for ambient lighting is generated based on user input text, solving the problems of complex generation process and poor display effect in existing technologies, achieving efficient, automated and high-quality image generation, and improving the user experience.

CN120635245BActive Publication Date: 2025-10-17SHENZHEN INTELLIROCKS TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511131704.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-13
Publication Date
2025-10-17
Estimated Expiration
2045-08-13

AI Technical Summary

Technical Problem

When generating pixel images for planar light displays, existing technologies have problems such as complex image generation processes, high time costs, easily affected image quality, and lack of semantic understanding and classification processing of image content, resulting in poor display effects and poor user experience.

Method used

Through end-to-end generative models and drawing functions based on user input text, type description information and content description information are identified, and a spotlight pixel map suitable for ambient lighting is generated. Taking into account the display characteristics and pixel layout of the lighting fixture, high-quality pixel maps are directly generated, avoiding multiple processing and manual intervention.

Benefits of technology

It achieves efficient and automated image generation, improves image quality and user experience, ensures a high degree of adaptability between the image and the display characteristics of the lamp, reduces operational complexity, and meets the needs of diverse application scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120635245B_ABST
    Figure CN120635245B_ABST
Patent Text Reader

Abstract

The application relates to a lamp projection pixel map generation application method and device, equipment and medium, the method comprises the following steps: determining image analysis information of a lamp projection pixel map to be generated based on user input text, the image analysis information comprises type description information and content description information; identifying the class cluster to which the type description information belongs, when belonging to a first class cluster, calling an end-to-end generation model to generate the lamp projection pixel map according to the type description information and the content description information; when belonging to a second class cluster, determining a corresponding drawing function according to the content description information, and drawing the lamp projection pixel map by using the drawing function; and mapping the generated lamp projection pixel map to a lamp bead layout interface of an atmosphere lamp according to a plane position mapping relationship and playing the lamp projection pixel map. The application directly generates the lamp projection pixel map based on the user input text, realizes efficient and high-quality generation of the lamp projection pixel map, optimizes display effect of the atmosphere lamp, reduces operation complexity, and significantly improves user experience.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of light effect control, in particular to a light projection pixel map generation application method and device, equipment and medium. BACKGROUND

[0002] With the development of digital image technology, as a new type of atmosphere lamp, planar lamps are gradually widely used in advertising, decoration, entertainment and other fields. Planar lamps can create unique visual effects by projecting pixelated images, providing users with a new experience. However, in the existing technology, generating pixel maps suitable for planar lamp display still faces many challenges.

[0003] Currently, the generation of images for planar lamp display usually adopts the following method: using an open source model (such as Stable Diffusion) to generate cartoon style images, and then performing color enhancement processing, background processing and size adjustment on the generated images to adapt to the display requirements of planar lamps. Although this method can generate images suitable for light projection to some extent, it has obvious limitations in actual application.

[0004] Firstly, the existing method needs to process the generated image multiple times, including color adjustment, background optimization and size scaling, etc. These processing steps not only increase the complexity and time cost of generating images, but also may cause the decline of image quality. For example, during color enhancement and background processing, noise or distortion may be introduced, affecting the final display effect. In addition, this method requires human intervention and is difficult to realize automation and efficiency, limiting its feasibility in large-scale applications.

[0005] Secondly, the existing method does not fully consider the display characteristics and pixel layout of planar lamps when generating images. The display area of planar lamps usually has a fixed pixel layout, while the existing image generation method fails to optimize for this layout. This may cause the generated image to be distorted, blurred or have inconsistent colors when displayed on the planar lamp, affecting the user's visual experience.

[0006] Furthermore, the existing method lacks semantic understanding and classification processing of image content. In actual application, users may need to generate specific types of images according to different scenes and requirements, such as animals, natural phenomena, festivals, etc. However, the existing method cannot automatically identify the image type according to the user input text description and generate the corresponding image, requiring the user to manually select and adjust, increasing the complexity of operation.

[0007] The above problems limit the effect and user experience of atmosphere lamps in actual application, therefore, further improvement is needed to solve the deficiencies in the existing technology. SUMMARY

[0008] The primary purpose of the present application is to solve at least one of the above problems to provide a light projection pixel map generation application method and device, equipment and medium.

[0009] To meet various purposes of the present application, the present application adopts the following technical solutions:

[0010] A light projection pixel map generation application method provided to adapt to one of the purposes of the present application comprises the following steps:

[0011] Based on the user input text, determine the image analysis information of the light projection pixel map to be generated, which includes type description information and content description information;

[0012] Identify the class cluster to which the type description information belongs. When it belongs to the first class cluster, call the end-to-end generation model to generate the light projection pixel map according to the type description information and the content description information;

[0013] When the type description information belongs to the second class cluster, determine the corresponding drawing function according to the content description information to draw and generate the light projection pixel map using the drawing function;

[0014] According to the plane position mapping relationship, the generated light projection pixel map is mapped and played in the lamp bead layout interface of the atmosphere lamp.

[0015] A light projection pixel map generation application device is proposed to adapt to one of the purposes of the present application, which comprises:

[0016] The input analysis module is set to determine the image analysis information of the light projection pixel map to be generated based on the user input text, which includes type description information and content description information;

[0017] The direct generation module is set to identify the class cluster to which the type description information belongs. When it belongs to the first class cluster, call the end-to-end generation model to generate the light projection pixel map according to the type description information and the content description information;

[0018] The drawing generation module is set to determine the corresponding drawing function according to the content description information when the type description information belongs to the second class cluster to draw and generate the light projection pixel map using the drawing function;

[0019] The mapping and playing module is set to map and play the generated light projection pixel map in the lamp bead layout interface of the atmosphere lamp according to the plane position mapping relationship.

[0020] In yet another aspect, a computer device is provided for adapting to one of the purposes of the present application, comprising a processor and a memory, the processor invoking a computer program in the memory to execute the steps of the method for generating a pixel map for a light projection as described.

[0021] In yet another aspect, a computer-readable storage medium is provided for adapting to another purpose of the present application, storing a computer program in the form of computer-readable instructions, which, when invoked by a computer to run, executes the steps included in the corresponding method according to the method for generating a pixel map for a light projection as described.

[0022] The present application effectively solves the problems of complex image generation process, high time cost, image quality easily affected, lack of semantic understanding and classification processing of image content, etc. in the prior art by directly generating a pixel map for a light projection based on user input text. First, an end-to-end generation model is used, and the user only needs to input a text description to directly generate a pixel map suitable for display by an ambient light fixture, without the need for multiple subsequent processing, simplifying the generation process, reducing manual intervention, avoiding image quality degradation caused by multiple processing, and achieving efficient, automated and high-quality image generation. Second, the display characteristics and pixel layout of the ambient light fixture are fully considered, the type description information in the user input text is recognized, and the corresponding generation model or drawing function is invoked to generate a pixel map that is highly adapted to the display characteristics of the ambient light fixture, avoiding problems such as image distortion, blurring or color inconsistency, and significantly improving the visual experience. In addition, by analyzing the content description information of the user input text, the category to which the image belongs is automatically recognized and the corresponding pixel map is generated, reducing the complexity of operation, improving the flexibility of the system and the user experience, and meeting the needs of diversified application scenarios. BRIEF DESCRIPTION OF DRAWINGS

[0023] The above and / or additional aspects and advantages of the present application will become apparent and more readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings, in which:

[0024] Figure 1 Structure diagram of an exemplary ambient light fixture of the present application;

[0025] Figure 2 Flow diagram of a typical embodiment of the method for generating a pixel map for a light projection of the present application;

[0026] Figure 3 Principle block diagram of the pixel map generation device for a light projection of the present application;

[0027] Figure 4 Structure diagram of a computer device used in the present application. DETAILED DESCRIPTION

[0028] The ambient light fixture of the present application, such asFigure 1 As shown, the ambient lighting device includes a controller 80 and lighting units 82, 84. The controller 80 and the lighting units 82, 84 can be connected directly by wire or wirelessly, as long as they can communicate with each other.

[0029] The number of the lighting units 82, 84 is not limited and depends on the supporting capability of the controller 80. The lighting units 82, 84 are responsible for controlling the orderly light emission of a large number of light beads arranged therein according to the light effect control information sent by the controller 80 to display the corresponding light effect. The lighting units 82, 84 can be a simplest structure of a lighting component, which can respond to the controller 80 as a whole.

[0030] In some embodiments, the ambient lighting device composed of multiple lighting units 82, 84 connected to the same controller 80 can also be regarded as a lighting unit in a larger framework, and can be connected to a superior controller 80 in the larger framework to form the ambient lighting device of the present application. That is, the ambient lighting device of the present application, based on the architecture including the controller 80 and the lighting units, the lighting units can also be nested to form the ambient lighting device of the present application, as long as the superior and inferior controllers 80 in the nested relationship can be pre-agreed.

[0031] In some embodiments, the ambient lighting device can include a control chip serving as the controller 80, and can also include a control panel, a communication component, a display screen, and other components configured as needed.

[0032] The control chip can be implemented by 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 processor and a memory, and the memory and the central processor are respectively used for storing and executing program instructions to realize corresponding functions. The control panel usually provides one or more keys for implementing on-off control of the controller 80, selecting various preset light effects, and the like. The communication component is used to realize wireless communication connection with each lighting unit 82, 84. The display screen can be used to display various control information to cooperate with the keys in the control panel to support the realization of human-computer interaction function. The control panel and the display screen can also be integrated into the same touch display screen.

[0033] The controller of the atmosphere lamp can receive user input text through the display screen thereof, call an end-to-end generation model deployed locally or on a server according to the user input text, generate a light projection pixel map or draw the light projection pixel map according to type description information and content description information corresponding to the user input text by the model, so as to control each lamp unit of the atmosphere lamp to display image content in the light projection pixel map by using the light projection pixel map, thereby presenting a corresponding lamp effect.

[0034] The lamp unit 82 can be a surface lamp, a large number of lamp beads are regularly arranged on the surface of the surface lamp, and the arrangement relationship of the lamp beads constitutes lamp bead layout information, which actually describes a lamp bead layout interface. The lamp bead layout interface can be positionally corresponding to a planar image such as the light projection pixel map of the present application, so as to map each pixel in the light projection pixel map to each corresponding lamp bead of the lamp unit 82, determine the light emission control parameter corresponding to each lamp bead, construct the light emission control parameter corresponding to each lamp bead into a lamp effect playing instruction corresponding to the light projection pixel map, and control each lamp bead of the lamp unit 82 to display the light projection pixel map by color display through the lamp effect playing instruction.

[0035] In some embodiments, the controller 80 of the atmosphere lamp of the present application can be implemented in a separate 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 save overall implementation cost. The computer device referred to herein can be any terminal device used by a user, such as a smartphone, a personal computer, a notebook computer, a tablet computer, etc.

[0036] According to the product architecture and working principle of the atmosphere lamp above, the light projection pixel map generation application method of the present application can be implemented as a computer program stored in the storage medium of the controller 80 of the atmosphere lamp of the present application, and called and run by the controller 80 from the storage medium to control each lamp unit 82, 84 in communication connection therewith to play a corresponding lamp effect.

[0037] Please refer to Figure 2 In some embodiments, the light projection pixel map generation application method of the present application comprises:

[0038] In step S5100, image analysis information of the light projection pixel map to be generated is determined based on the user input text, and the image analysis information comprises type description information and content description information.

[0039] The present application allows a user to submit a user input text through an input device, and generates a light projection pixel map required for playing a lamp effect in one step according to the user input text. Therefore, the user input text is the basis for generating the light projection pixel map.

[0040] The user can input description information describing the pixel map of the light projection image through various input devices such as a smartphone, a personal computer, or a dedicated control panel, which is converted into user input text by the controller of the present application. For example, the user can input "penguins in the Antarctic" or "red circular pattern". These text descriptions provide key information for subsequent image generation. The user can also input audio data in the form of speech, which is converted into corresponding user input text by the controller.

[0041] The pixel map of the present application is an image format specially designed for ambient lighting fixtures, and its core feature is to present image content in a pixelated form to adapt to the display characteristics of the lighting fixture. Specifically, the resolution of the pixel map is usually matched with the layout of the lamp beads of the ambient lighting fixture, including a 1-to-1 or 1-to-N adaptive relationship, such as the common 512x512 pixel format, ensuring that each pixel can be accurately mapped to the corresponding lamp bead of the lighting fixture, 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 the specific display device through optimization of pixel layout and color processing. In addition, the generation process of the pixel map fully considers the semantic information of the user input text, so that the generated image can accurately reflect the user's description requirements, whether it is a specific object (such as animals, plants) or an abstract pattern (such as geometric shapes, holiday symbols), can be presented on the ambient lighting fixture in a high-quality visual effect through pixelation.

[0042] There may be some ambiguity in the semantic expression of the user input text. By further analyzing the user input text, the corresponding image analysis information is determined, which can clearly indicate the specific intention of the user to describe the pixel map. In one embodiment, the image analysis information includes type description information and content description information.

[0043] The type description information is used to indicate the category to which the image belongs, such as animals, natural phenomena, holidays, etc. These categories are predefined, and the various predefined categories are pre-divided into at least two class clusters, including a first class cluster and a second class cluster, wherein the first class cluster mainly contains categories that can convert the object described by the user input text into a corresponding concrete figure, and the second class cluster mainly contains categories that can convert the object described by the user input text into a corresponding abstract figure. The first class cluster and the second class cluster correspond to the subsequent end-to-end generation model and the drawing function, respectively. For example, if the user input text is "penguins in the Antarctic", the type description information is "animal", and since the category "animal" belongs to the first class cluster, the call to the end-to-end generation model will be triggered; if the user input text is "red circular pattern", the category description information is "shape", and this category belongs to the second class cluster, which will trigger the call to the drawing function.

[0044] The content description information more specifically describes the content of the image, such as "penguin", "red circle", etc. These information is used to further refine the generated image to ensure that it meets the detailed requirements of the user. For example, if the user wants to generate a red circle pattern, the content description information will ensure that the generated image has the correct color and shape.

[0045] In a specific implementation, when determining the image analysis information contained in the user input text, in an embodiment, natural language processing technology can be used to analyze the user input text. For example, by adding a prompt model to determine the text instruction of the image analysis information after inputting the user input text into a large language model pre-trained by the prompt model, the model can automatically identify the key information in the user input text and understand and determine the type description information and content description information contained in the user input text.

[0046] In another embodiment, a preset keyword library can also be used to extract category keywords and content keywords from the user input text as type description information and content description information, which can also determine the image analysis information.

[0047] Step S5200, identifying the class cluster to which the type description information belongs, when belonging to the first class cluster, calling an end-to-end generation model to generate the light projection pixel map according to the type description information and the content description information;

[0048] The present application pre-establishes the mapping relationship between each category and the class cluster to which it belongs. These class clusters include a first class cluster and a second class cluster, wherein the first class cluster mainly includes categories that can convert objects described by user input text into concrete graphics, such as animals, plants, etc.; the second class cluster mainly includes categories that can convert objects described by user input text into abstract graphics, such as geometric shapes, color patterns, etc. This classification method facilitates the selection of the most suitable generation path according to the semantic content of the user input text.

[0049] After determining the type description information in the image analysis information, the class cluster to which the type description information belongs can be identified. For example, if the type description information is "animal", it is identified as belonging to the first class cluster; if the type description information is "shape", it is identified as belonging to the second class cluster. According to the difference of the class cluster, different generation paths are called to generate the light projection pixel map.

[0050] 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.

[0051] 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.

[0052] 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;

[0053] 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.

[0054] 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.

[0055] 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.

[0056] During the rendering process, a standard-sized canvas can be created, which usually matches the layout of the lamp beads of the atmosphere lamp, such as 512x512 pixels. Then, according to the parameters in the content description information, the corresponding drawing function is called to draw the graphics on the canvas. For example, if the user input text is "red circle pattern", the system will call the draw_circle function to draw a red circle at the center of the canvas, and the radius and color parameters are determined according to the specific description input by the user.

[0057] In some embodiments, in order to enhance the visual effect of the generated image, further processing can be performed on the drawn graphics. For example, the line can be expanded along the graphics, the line expansion area can be determined, and the random color can be filled in the area to increase the visual level and richness of the graphics. This processing method not only improves the aesthetics of the image, but also better adapts to the display characteristics of the atmosphere lamp.

[0058] Step S5400, according to the plane position mapping relationship, the generated light projection pixel map is mapped to the lamp bead layout interface of the atmosphere lamp for playing.

[0059] In order to realize the playing and displaying of the light projection pixel map by using the plane position mapping relationship, the lamp bead layout information of the atmosphere lamp needs to be obtained. The lamp bead layout information can be determined by polling each lamp bead of the lamp unit of the atmosphere lamp, or directly called from the memory. The lamp bead layout information describes the position and arrangement of each lamp bead in the lamp in detail, usually in the form of two-dimensional coordinates. For example, a common 512x512 pixel surface lamp, its lamp bead layout information will contain 512x512 coordinate points, each point corresponds to a lamp bead. The physical position and arrangement order of these lamp beads on the atmosphere lamp determines the specific way of image mapping.

[0060] After obtaining the lamp bead layout information, the corresponding lamp bead layout interface is created according to the lamp bead layout information. This interface is a virtual two-dimensional plane, which is used to simulate the display area of the lamp unit. On this interface, the position of each lamp bead is defined as a pixel point, forming a pixelized interface corresponding to the physical layout of the lamp. For example, if the lamp is a square surface lamp, its lamp bead layout interface will also be a square pixel array.

[0061] Then, the generated light-throwing pixel map is scaled and mapped to the lamp bead layout interface. This step involves one-to-one correspondence between each pixel of the pixel map and the lamp beads in the lamp bead layout interface. Specifically, the mapping relationship between each pixel in the pixel map and the planar position of the lamp beads in the lamp bead layout interface needs to be determined. For example, if the resolution of the pixel map is completely consistent with the lamp bead layout (such as 512x512 pixels), each pixel in the pixel map can be directly mapped to the corresponding lamp bead. If the resolutions are inconsistent, appropriate scaling processing may be needed to ensure the display effect of the image on the lamp.

[0062] During the mapping process, 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 light-throwing pixel map by comparing the planar position mapping relationship. This step ensures that each lamp bead on the lamp can accurately display the color information in the image. For example, if a certain pixel in the pixel map is red, the corresponding lamp bead will be set to red.

[0063] Finally, according to the color value set for each lamp bead, the corresponding light-emitting control parameters of all lamp beads in the lamp bead layout interface are generated. These parameters include the color value, brightness, and other information of each lamp bead, which are used to control the light-emitting state of the lamp beads. These light-emitting control parameters are constructed as light effect playing instructions and sent to the corresponding lamp unit of the atmosphere lamp to control the lamp to play the light-throwing pixel map.

[0064] In practical applications, this step can be implemented in various ways. For example, special control software or hardware devices can be used to process the mapping and generation of playing instructions. In addition, in order to improve the display effect, image optimization algorithms such as color correction, brightness adjustment, etc. can be applied during the mapping process to ensure that the display effect of the image on the lamp reaches the best.

[0065] Through the above embodiments, the present application directly generates a light-throwing pixel map based on user input text, significantly improving the generation efficiency, while optimizing the adaptability of the image and the display characteristics of the atmosphere lamp, greatly improving the user experience. Its technical advantages are manifested in many aspects, including but not limited to:

[0066] Firstly, the present application can effectively solve the problems of complex image generation process, high time cost and image quality being easily affected in the prior art. By introducing an end-to-end generation model, the user only needs to input the text description to directly generate a pixel map suitable for display on the atmosphere lamp, without the need for multiple subsequent processing such as color adjustment, background optimization and size scaling, etc. This improvement not only simplifies the generation process and reduces manual intervention, but also avoids the problem of image quality degradation caused by multiple processing, thereby realizing efficient, automated and high-quality image generation.

[0067] Secondly, the present application fully considers the display characteristics and pixel layout of atmosphere lamps, solving the problem of poor display effect caused by the failure of existing technologies to optimize images for atmosphere lamps. By identifying the type description information in the user input text and matching it with the preset class cluster, the corresponding generation model or drawing function can be called according to different categories, thereby generating a light projection pixel map that is highly adapted to the display characteristics of atmosphere lamps. This not only ensures the display effect of images on atmosphere lamps, but also avoids problems such as image distortion, blurring, or color inconsistency, significantly improving the user's visual experience.

[0068] In addition, the present application also solves the problem of lack of semantic understanding and classification processing of image content in existing technologies. By analyzing the content description information of the user input text, the category to which the image belongs can be automatically identified, and the corresponding pixel map can be generated accordingly. This improvement eliminates the need for users to manually select and adjust image types, greatly reducing the complexity of operation and improving the flexibility and user experience of the system. Users can generate images of specific types, such as animals, natural phenomena, holidays, etc., simply by text description according to different scenarios and needs, thereby meeting the needs of diverse application scenarios.

[0069] On the basis of any embodiment of the method of the present application, based on the user input text, the image analysis information of the light projection pixel map to be generated is determined, the image analysis information including type description information and content description information, including:

[0070] Step S5110, in response to the user submission instruction, the corresponding user input text is obtained;

[0071] When the user inputs the text content for generating the light projection pixel map through the graphical user interface of the input device, the user can submit the text content to trigger the user submission instruction. In response to the instruction, the controller can obtain the corresponding user input text.

[0072] In actual application, the acquisition method of user input text can be diversified. For example, the user can input text through a touch screen keyboard, or input audio data through voice recognition technology, and the system can then convert these audio data into corresponding text information. This diversified input method improves the user friendliness and applicability of the system, making it convenient for different user groups to use the system.

[0073] In one embodiment, the graphical user interface can provide icons corresponding to each category for the user to select. The user only needs to input text content corresponding to the content description information in the text box. When the user submits, the user submission text can be automatically generated according to the user-selected icon and text content, further simplifying the user's expression difficulty.

[0074] Step S5120, adding the user input text to a preset analysis prompt template to obtain an analysis prompt text.

[0075] The user input text is often a relatively vague natural language expression. Directly using these descriptions may not be able to accurately generate the required light projection pixel map. By calling a preset analysis prompt template to embed the user input text, an analysis prompt text can be generated, which can further clarify the user's real intention with the help of a target analysis model.

[0076] The role of the analysis prompt template is to provide a structured framework for the user input text. Specifically, the analysis prompt template can contain some predefined prompt words or formats that can guide the model to identify the key information in the user input text. For example, the analysis prompt template can contain "Please understand the pattern the user wants to draw according to the user input text, 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, and the user replaces it with the user input text, thereby obtaining the corresponding analysis prompt text.

[0077] In one embodiment, the analysis prompt template can also insert preset category information, and guide the model to determine the type description information of the user input text from these category information through text description in the analysis prompt template.

[0078] Step S5130, inputting the analysis prompt text into a preset target analysis model to drive the target analysis model to determine the type description information and content description information of the light projection pixel map to be generated according to the user input text, to constitute the image analysis information.

[0079] After determining the analysis prompt text, it can be input into the target analysis model to obtain the image analysis information. The target analysis model can be a pre-trained deep learning model for understanding and analyzing user input text. Through a large amount of text data training, the model can identify and extract key information in the text, such as type description information and content description information in the image analysis information. The type description information is used to indicate the category of the image, such as animals, natural phenomena, festivals, etc.; the content description information more specifically describes the content of the image, such as "penguin", "red circle", etc.

[0080] In a specific implementation, the target resolution model can employ various deep learning architectures, such as Transformer-based models (e.g., BERT, GPT, etc.) or recurrent neural networks (RNN) 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 the user input text is "penguins in Antarctica," the target resolution model will identify "animal" as the type description information and "penguins" as the content description information.

[0081] To further improve the accuracy of resolution, the target resolution model can be trained in combination with pre-set category information. These category information are predefined and cover various categories that users may input. For example, the model can be trained to recognize "animal," "natural phenomenon," "holiday," and other categories, and when resolving user input text, select the most appropriate type description information from these pre-set categories.

[0082] In one embodiment, the target resolution model can employ a multi-task learning method to simultaneously learn the extraction of type description information and content description information. For example, the model can process user input text through a shared encoder, and then generate type description information and content description information through two different decoders, respectively. This multi-task learning method can improve the efficiency and accuracy of the model.

[0083] In another embodiment, the target resolution model can combine contextual information for resolution. For example, if the user input text is "red circular pattern of Christmas," the model will not only identify "shape" as the type description information, but also combine the context information of "Christmas" to further refine the content description information to "red circular pattern." This context-aware resolution method can more accurately understand the user's intention and generate a light pixel map that better meets the user's needs.

[0084] By inputting the resolution prompt text into the target resolution model, the model can output structured image resolution information. For example, for the user input text "penguins in Antarctica," the model output image resolution information may be:

[0085] Type description information: animal

[0086] Content description information: penguins

[0087] This structured output provides clear guidance for the subsequent image generation step, ensuring that the generated light pixel map accurately reflects the user's intention and meets the display needs of the atmosphere lamp.

[0088] Through the above embodiment, the present application combines the diversified acquisition of user input text, the structured guidance of parsing the prompt template, and the deep learning capability of the target parsing model, realizes the accurate understanding of user intent and the 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 multi-task learning and the combination of context information, thereby providing more accurate and structured guidance for subsequent image generation steps. This technical advantage ensures that the generated light projection pixel map can more accurately reflect the user's intent and better adapt to the display needs of the atmosphere lamp, significantly improving system performance and user experience.

[0089] On the basis of any embodiment of the method of the present application, before determining the image parsing information of the light projection pixel map to be generated based on the user input text, the following steps are included:

[0090] Step S4100, obtain a training data set, the training data set contains a plurality of sample images and corresponding image parsing information, the sample images are generated according to corresponding source images, and are pixel magnification images of the source images;

[0091] The present application prepares a training data set in advance, which can be directly called when the end-to-end generation model needs to be trained. The training data set is the basis for model learning, which contains a plurality of sample images and corresponding image parsing information. These sample images are usually generated according to corresponding source images, and are pixel magnification images of the source images, to ensure that the model can learn the pixelization image generation style from low resolution to high resolution directly magnified by pixels.

[0092] The acquisition of sample images can be realized in various ways. For example, suitable source images can be selected from existing image databases, which can be simple geometric shapes, natural landscapes, animals, plants, etc., covering various types of description information that users may need to generate. For each source image, a sample image is generated by pixel magnification technology.

[0093] Image parsing information is metadata associated with a sample image, which describes the type and content of the image. For example, if the source image is a penguin, the corresponding image parsing information may include type description information "animal" and content description information "penguin". These information can be manually annotated, or automatically generated using a text generation model.

[0094] The construction of the training dataset also needs to consider diversity and representativeness. In order for the model to be able to generalize to various different inputs, the sample images should cover a variety of possible scenarios and categories. For example, in addition to common animals and natural phenomena, abstract graphics, holiday symbols, etc. can also be included. In addition, the resolution and size of the sample images should also be diversified to adapt to different sizes of atmosphere lamps.

[0095] Step S4200, input the sample images and their corresponding image analysis information into the preset end-to-end generation model to implement training until the end-to-end generation model is trained to a convergent state.

[0096] Input the sample images and their corresponding image analysis information into the preset end-to-end generation model to implement training until the model is trained to a convergent state. Through training, the model can learn the mapping relationship from user input text to generated lighting pixel graph.

[0097] The end-to-end generation model is a deep learning model, usually based on a generative adversarial network (GAN), a variational autoencoder (VAE), or a Transformer architecture. In one embodiment, a pre-trained large language model can also be used for fine-tuning training. These models can learn the complex relationship between input text and output image. For example, if the input text is "penguins in Antarctica", the model needs to learn how to generate a pixelated penguin image corresponding to it. During training, the model will continuously adjust its internal parameters to minimize the difference between the generated image and the target image.

[0098] In specific implementation, the training process can adopt various strategies. One common method is to use supervised learning, where the input to the model is image analysis information and the output is the generated lighting pixel graph. The model adjusts its parameters by comparing the differences between the generated image and the real sample image. For example, mean square 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.

[0099] During the training process, the performance of the model can be evaluated by various indicators. For example, a validation set can be used to monitor the convergence of the model to ensure that the model does not overfit. When the performance of the model on the validation set no longer improves significantly, it can be considered that the model has converged. At this time, training can be stopped and the parameters of the model can be saved.

[0100] 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.

[0101] Based on any embodiment of the method of the present application, before obtaining the training data set, the method includes:

[0102] 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;

[0103] 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.

[0104] 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.

[0105] Then, the standard size canvas is centered aligned with the target source image. For this purpose, the center points of the canvas and the source image are calculated and aligned. For example, if the size of the source image is 20x26 pixels and the size of the canvas is 512x512 pixels, the center point of the source image will be placed at the center position of the canvas. This way of center alignment ensures that the source image can be displayed centered on the canvas after enlargement, avoiding the problem of image offset or cropping during enlargement.

[0106] By establishing the position mapping relationship through center alignment, the corresponding position of each pixel in the source image on the canvas can be determined. For example, the pixel coordinate (0,0) in the source image may be (256,256) on the canvas, and the specific position depends on the size of the source image and the canvas. This position mapping relationship is crucial for subsequent pixel enlargement processing, as it ensures that each pixel can be correctly placed on the enlarged canvas.

[0107] Step S3200, according to the source image size of the target source image and the standard size, determine the magnification corresponding to the enlargement of the target source image from the source image size to the standard size;

[0108] In order to determine the magnification, the original size of the target source image and the size of the standard size canvas need to be determined first. For example, if the size of the target source image is 20x26 pixels and the size of the standard size canvas is 512x512 pixels, the magnification required to enlarge the source image to the canvas size needs to be calculated. The specific calculation method is to divide the size of the canvas by the size of the source image to get the magnification in the horizontal and vertical directions. In the above example, the horizontal magnification is 512÷20=25.6 and the vertical magnification is 512÷26≈19.7. In order to maintain the original width-height ratio of the image, the smaller magnification, i.e. 19.7 times, should be selected. In this way, the source image will not exceed the canvas range after enlargement, and the original width-height ratio can be maintained.

[0109] In practical applications, the determination of magnification can be done in various ways. In addition to the above simple division calculation, the magnification can also be adjusted according to actual needs, for example, in order to obtain a clearer image, a higher magnification can be selected, but at the same time the problem of image exceeding the canvas range needs to be considered.

[0110] Step S3300, traverse each pixel of the target source image, according to the position mapping relationship and the magnification, determine the corresponding drawing area of each pixel on the canvas, and fill the color value of the pixel in the target source image in the drawing area;

[0111] After the magnification factor is determined, each pixel in the source image can be magnified using the magnification factor by traversing each pixel in the target source image. It is not difficult to understand that each pixel in the target source image can correspond to a corresponding drawing area on the canvas. This drawing area is actually the single pixel point of the target source image after magnification, which is mapped to the canvas.

[0112] For example, the pixel with coordinates (3, 5) in the source image has starting coordinates (3x19.7+59, 5x19.7) on the magnified canvas, where 59 is the number of blank pixels in the horizontal direction to center the magnified image. Then, the end coordinates are further calculated by accumulating single pixel points (e.g., (4x19.7+59, 6x19.7)). Accordingly, the drawing area of the corresponding pixel in the target source image is mapped to the canvas from the starting coordinates to the end coordinates. In this way, each pixel in the source image can be correctly mapped to the corresponding position on the canvas after magnification, and the entire image is displayed centered on the canvas.

[0113] After determining the corresponding drawing area of each pixel in the target source image on the canvas, the color values of each pixel in the drawing area can be set to the color values of the corresponding pixel in the target source image, realizing the filling processing of the corresponding drawing area on the canvas.

[0114] Step S3400, store the image in the canvas as the sample image corresponding to the target source image, associate the sample image with the pre-labeled image analysis information of the target source image, and add it to the training data set.

[0115] Storing the processed image in the canvas as the sample image corresponding to the target source image and associating it with the pre-labeled image analysis information, and then adding it to the training data set, is a key step in building a high-quality training data set, ensuring that the model can learn the effective mapping relationship from user input text to generated image.

[0116] The storage format of the sample image should be consistent with the requirements of the training model, usually in common image formats such as PNG or JPEG. These formats can preserve the pixel information and color details of the image, facilitating subsequent learning and processing by the model. For example, if the target source image is magnified and stored as a PNG format sample image, the image will contain the magnified pixelated image content, while preserving the color and structural characteristics of the original source image.

[0117] Image parsing information is metadata closely related to sample images, which provides specific descriptions about image content and categories for the model. These information can be manually annotated or automatically generated by a text-from-image model. For example, if the target source image is a penguin, its image parsing information may include type description information "animal" and content description information "penguin". These information provide clear guidance for the model, helping it to understand the semantic content of the image.

[0118] After associating the sample image with the image parsing information, it is added to the training data set. The training data set is the basis for model training, and its quality and diversity directly affect the performance of the model. By adding diverse sample images and their detailed image parsing information to the data set, the model can learn different types of image features and generation rules. For example, the data set can contain sample images of various types such as animals, natural landscapes, geometric shapes, etc., as well as corresponding detailed parsing information, so that the model can generalize to various input scenarios.

[0119] In practical applications, the construction of the training data set can be optimized considering multiple factors. First, the resolution and size of the sample image should be consistent with the final generated lamp pixel Figure 1 , to ensure that the model can learn the correct pixel enlargement style. Second, 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 data set also needs to consider diversity and representativeness to improve the generalization ability and adaptability of the model.

[0120] Through the above embodiments, the present application optimizes the sample image in detail 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 resolution and size of the sample image are consistent with the final generated lamp pixel Figure 1 , but also ensures the quality and visual effect of the image after enlargement processing through center alignment, accurate calculation of the enlargement factor, and pixel-level drawing area filling operations. This optimization of the sample image changes the direct dependence on the text-from-image model, overcomes the inertia of thinking, and enables the model to learn more accurate pixel enlargement styles and image generation rules during the training process. Compared with other embodiments of the present application, this method significantly improves the quality and stability of the generated image, enhances the generalization ability of the model, and enables it to better adapt to various input scenarios and display requirements.

[0121] On the basis of any embodiment of the method of the present application, the drawing function is used to draw the lamp pixel image, comprising:

[0122] Step S5310, a standard size canvas is created, in which the drawing function is executed to draw the graphics specified by the content description information;

[0123] The creation of a standard size canvas is the basis for drawing graphics, and the size of the canvas is usually consistent with the resolution of the final generated lamp pixel map, such as the common 512x512 pixels. This consistent size setting not only ensures that the generated image can be directly used for subsequent display requirements, but also provides a clear drawing space for the drawing function. The canvas can be a two-dimensional array, where each element represents a pixel point, and its initial value can be set to transparent or background color.

[0124] The drawing function has been determined in advance according to the content description information corresponding to the user input text, so the drawing function can be directly called to draw the corresponding graphics on the canvas. When executing the drawing function, the position and size of the graphics can be determined according to the specific parameters given in the content description information or by calling the default specific parameters. For example, if the user input text is "draw a circle with a radius of 100 pixels in the center position", the drawing function will draw a circle with a radius of 100 pixels in the center position of the canvas according to these parameters. These parameters can be directly input by the user or obtained by analyzing the user input text.

[0125] Step S5320, determine the line expansion area along the lines of the graphics, fill the line expansion area with random colors, and take the image content in the canvas as the lamp pixel map.

[0126] In order to achieve better pixelation effect, the lines of the drawn graphics are expanded and the line expansion area is determined, and then the line expansion area is filled with color. In this way, the visual effect of the graphics can be enhanced, making it more eye-catching and having a sense of hierarchy when displayed on the lamp. Specifically, the expansion processing refers to expanding a certain width along the contour line of the graphics to form an expansion area around the original graphics. The width of this area can be adjusted according to design requirements, for example, for simple geometric shapes, a narrower expansion area can be set to maintain the simplicity of the graphics; while for complex patterns, the width of the expansion area can be appropriately increased to enhance the visual effect.

[0127] After determining the line expansion area, the area will be filled with a specific color to further highlight the contour of the graphics. The color or pattern of the fill can be selected according to user requirements or default settings, for example, a target color can be randomly generated as a specific color, and the specific color is filled into the line expansion area.

[0128] The embodiment can accurately draw the specified graphics according to the content description information of the user input text by creating a standard size canvas and executing the drawing function thereon. Further, by performing edge expansion processing on the graphic lines and filling them with a specific color, the visual effect of the graphics is effectively enhanced, making them more eye-catching and having a sense of hierarchy when displayed on a light. This pixelization processing method for the line expansion area can better adapt to the display requirements of the light pixel map compared to the traditional method of directly converting the graphics into a pixelized image, avoiding the problems of image detail loss and poor visual effect caused by direct conversion. By separately expanding the line expansion area to achieve the line pixelization effect, not only the visual quality of the image is improved, but also more flexible visual design options are provided for the user, making the finally generated light pixel map more outstanding in visual performance and significantly improving the overall effect and user experience of light display.

[0129] On the basis of any embodiment of the method of the present application, before mapping the generated light pixel map into the light bead layout interface of the atmosphere lamp for playing, comprising:

[0130] Step S2100, color clustering is performed on each pixel in the generated light pixel map to obtain a plurality of main color categories, and a pixel center color corresponding to each main color category is determined.

[0131] By performing color clustering on each pixel in the generated light pixel map, a plurality of main color categories can be obtained, and then the pixel center color corresponding to each main color category can be determined.

[0132] The purpose of color clustering is to divide the pixels in an image into multiple categories according to color similarity. In the present application, the pixels in the light pixel map can be divided into multiple main color categories by a color clustering algorithm. For example, if the image contains multiple similar green tones, the color clustering algorithm can classify these green pixels into one main color category and determine the center color of the category. The center color is usually the color with the highest frequency or the color that best represents the category.

[0133] In specific implementation, a variety of color clustering algorithms can be used, such as K-Means clustering, DBSCAN clustering, etc. These algorithms can group pixels according to their color features (such as RGB values) and calculate the center color of each group. For example, the K-Means clustering algorithm assigns pixels to the nearest cluster center through iterative optimization and continuously adjusts the position of the cluster center until convergence.

[0134] The purpose of color clustering is to reduce the color diversity in the image, making the pixel colors of each dominant color category more consistent. This not only helps to improve the visual effect of the image, but also reduces the color noise and inconsistency that may occur when displayed on ambient lighting fixtures. For example, through color clustering, all pixels in the image that are close to "dark green" can be unified into a central color, making the image more smooth and consistent when displayed.

[0135] In addition, color clustering can also be optimized in combination with the semantic information of the image. For example, if the user inputs the text description as "a green grassland", the color clustering algorithm can preferentially identify and cluster green pixels, ensuring that the color of the grassland in the generated image is more uniform and natural.

[0136] Step S2200, resetting the color value of each pixel included in each dominant color category in the light-throwing pixel map to the color value of the central color of the category;

[0137] The foregoing has divided the pixels in the image into multiple dominant color categories through the color clustering algorithm, and determined the central color of each dominant color category. These central colors represent the most typical or highest frequency of occurrence colors in each color category.

[0138] In this step, for each pixel in the light-throwing pixel map, first determine the dominant color category to which it belongs. Then, the color value of the pixel is reset to the color value of the central color of the dominant 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 certain green tone close to "dark green", after color clustering, it is classified into a dominant color category, and the central color of the category is "dark green". In this step, the color value of the pixel will be updated to "dark green".

[0139] This resetting of color values not only helps to improve the visual effect of the image, but also reduces the color noise and inconsistency that may occur when displayed on ambient lighting fixtures. By unifying pixels of similar colors into a central color, the image will be smoother and more consistent when displayed, and the distinctiveness of each dominant color category in the entire light-throwing pixel map is also enhanced. In addition, this processing method can also optimize the display effect of the image, making it more suitable for playing on ambient lighting fixtures, especially in the case of limited layout and display characteristics of the lighting fixtures.

[0140] Step S2300, determining the closest central color of the outlying pixel in the light-throwing pixel map according to the color value of the outlying pixel, and resetting the color value of the pixel to the color value of the closest central color.

[0141] Outlier pixels refer to those pixels that differ greatly in color from their surrounding pixels. These pixels may produce visual noise or inconsistency when displayed, affecting the overall visual effect.

[0142] To handle these outlier pixels, first, we need to determine which center color of the main color category they are closest to in terms of color value. This can be achieved by calculating the color distance between the color value of the outlier pixel and the center color of each main color category. Color distance can usually be calculated by Euclidean distance or other color space distance measurement methods. For example, in the RGB color space, the Euclidean distance between two colors can be obtained by calculating the difference between their RGB values.

[0143] Once the closest center color of the outlier pixel is determined, its color value is reset to the color value of the center color. This process can be achieved by traversing each pixel in the image, checking whether it is an outlier pixel, and updating its color value according to the above method.

[0144] This resetting of the color value of the outlier pixel not only helps to reduce color noise in the image, but also makes the image more smooth and consistent when displayed. In addition, by unifying the color value of the outlier pixel to the center color of the main color category, the prominence of each main color category in the image can be further enhanced, making the image more visually appealing when played on an atmosphere lamp.

[0145] This embodiment effectively solves the machine hallucination problem that may occur when the end-to-end generation model generates the lighting pixel map, significantly improving the visual quality and consistency of the image. Specifically, the color clustering algorithm divides the pixels in the image into multiple main color categories according to color similarity and determines the center color of each main color category, thereby reducing color diversity and making the image more smooth and consistent when displayed. Further, by resetting the color value of the outlier pixel to its closest center color, this embodiment can effectively reduce the color deviation caused by machine hallucination, ensuring that the visual effect of the image 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 prominence of each main color category, making the lighting pixel map more outstanding in visual performance and significantly improving user experience.

[0146] On the basis of any embodiment of the method of the present application, the generated lighting pixel map is mapped to the lamp bead layout interface of the atmosphere lamp according to the planar position mapping relationship for playing, comprising:

[0147] Step S5410, 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 is regarded as a single pixel in the lamp bead layout interface;

[0148] The lamp bead layout information of the atmosphere lamp details the position and arrangement of each lamp bead in the lamp, usually in the form of two-dimensional coordinates. For example, a common 512x512 pixel surface lamp will have lamp bead layout information containing 512x512 coordinate points, each corresponding to a lamp bead. The physical position and arrangement order of these lamp beads on the lamp determine the specific way of image mapping.

[0149] When creating the lamp bead layout interface according to the lamp bead layout information, the lamp bead layout information can be called from the memory of the atmosphere lamp first, and each lamp bead in the lamp bead layout information can be parsed as a pixel point in the interface. In this way, the lamp bead layout interface is actually a pixelated interface corresponding to the physical layout of the lamp. For example, if the lamp is a square surface lamp, its lamp bead layout interface will also be a square pixel array. This correspondence ensures that each pixel in the projection pixel map can be accurately mapped to the corresponding lamp bead of the lamp.

[0150] In specific implementation, the lamp bead layout information can be obtained in various ways. One common method is to directly read from the technical documents provided by the manufacturer of the lamp, which usually contain detailed layout parameters of the lamp. Another method is to dynamically obtain the lamp bead layout information through the sensors or communication interfaces provided by the lamp, which can adapt to different models and configurations of the lamp.

[0151] Step S5420, scaling the generated projection pixel map corresponding to the lamp bead layout interface to determine the plane position mapping relationship between each pixel in the projection pixel map and the lamp bead in the lamp bead layout interface;

[0152] To facilitate position mapping, the resolution of the projection pixel map can be adjusted to be consistent with the lamp bead layout interface first. If the resolution of the projection pixel map is inconsistent with the lamp bead layout interface, for example, the resolution of the projection pixel map is 256x256 pixels, while the lamp bead layout interface is 512x512 pixels, scaling processing of the projection pixel map is needed. Scaling can be achieved through various algorithms, such as nearest neighbor interpolation, bilinear interpolation, or bicubic interpolation, etc. These algorithms can calculate the pixel values of the scaled image according to the pixel values of the original pixel map, so as to ensure that the image remains clear and consistent after enlargement or reduction.

[0153] After the scaling is completed, it is necessary to determine the planar position mapping relationship between each pixel in the light-throwing pixel map and the lamp beads in the lamp bead layout interface. Specifically, it can be realized by calculating the corresponding position of each pixel in the lamp bead layout interface. For example, if the resolution of the light-throwing pixel map is 512x512 pixels, and the lamp bead layout interface is also 512x512 pixels, then each pixel in the light-throwing 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 light-throwing 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 light-throwing pixel map will be mapped to the lamp bead with coordinates (1, 1) in the lamp bead layout interface, and so on.

[0154] In a specific implementation, the planar position mapping relationship can be determined by a simple coordinate conversion formula. If the resolution of the light-throwing pixel map is WxH, and the resolution of the lamp bead layout interface is W'xH', then the coordinates (x', y') of the pixel with coordinates (x, y) in the light-throwing pixel map in the lamp bead layout interface can be calculated by the following formula:

[0155]

[0156]

[0157] Where, ⌊·⌋ represents the down rounding operation. In this way, it can be ensured that each pixel in the light-throwing pixel map can be accurately mapped to a lamp bead in the lamp bead layout interface, so as to realize the accurate display of the image.

[0158] In addition, in order to further optimize the mapping effect, the aspect ratio of the image and the display characteristics of the lamp can be considered. If the aspect ratio of the light-throwing pixel map is inconsistent with the lamp bead layout interface, appropriate cropping or padding may be needed to ensure that the image does not deform when displayed on the lamp. For example, if the light-throwing pixel map is a square image, and the lamp bead layout interface is a rectangle, then transparent or background color padding can be added on both sides of the light-throwing pixel map to match the aspect ratio of the lamp bead layout interface.

[0159] Step S5430, according to the planar 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 light-throwing pixel map, generating the light-emitting control parameters corresponding to all lamp beads in the lamp bead layout interface;

[0160] The planar position mapping relationship defines the correspondence between each pixel in the light projection pixel map and the lamp beads in the lamp bead layout interface. Accordingly, according to the color value of each pixel in the light projection pixel map, the color value of each lamp bead in the lamp bead layout interface can be determined by referring to the mapping relationship. This step can be realized by simple color value transmission. For example, if the color value of a pixel in the light projection pixel map is red (RGB value is (255, 0, 0)), the color value of the corresponding lamp bead determined according to the mapping relationship will also be set to red. This process can be realized by traversing each pixel in the light projection 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 light-emitting control parameter corresponding to the lamp bead.

[0161] In specific implementation, the generation of the light-emitting control parameter is determined according to the color value of the lamp bead. These parameters usually include the brightness, color and other information of the lamp bead, which are used to control the light-emitting state of the lamp bead. For example, if the color value of the lamp bead is red, the light-emitting control parameter will instruct the lamp bead to emit light in red. These parameters can be generated through specific control instructions or protocols, such as DMX protocol or PWM signal to control the light-emitting state of the LED lamp bead.

[0162] Step S5440, the light-emitting control parameter of each lamp bead in the lamp bead layout interface is constructed as a light effect playing instruction, which is sent to the atmosphere lamp to control it to play the light projection pixel map.

[0163] In order to realize the display of the light projection pixel map to the lamp unit of the atmosphere lamp, it is necessary to convert the light-emitting control parameter of each lamp bead in the lamp bead layout interface into a light effect playing instruction.

[0164] In specific implementation, the construction of the light effect playing instruction can be completed through a software algorithm. The algorithm generates corresponding control instructions according to the light-emitting control parameter of each lamp bead in the lamp bead layout interface. These instructions can be digital signals, which are sent to the control chip of the lamp unit of the atmosphere lamp through a communication interface (such as serial port, network interface, etc.). After receiving these instructions, the control chip will control the light-emitting state of each lamp bead according to the instruction content, so as to display the light projection pixel map on the lamp.

[0165] In order to ensure the accuracy and reliability of the light effect playing instruction, various technical means can be used. For example, a verification algorithm can be used to verify the integrity of the instruction to ensure that there is no data loss or error in the transmission process. In addition, encryption technology can also be used to protect the instruction content to prevent unauthorized access or tampering.

[0166] When sending light effect playing instructions to the atmosphere lamp, it is necessary to ensure that the control chip of the lamp can correctly analyze and execute these instructions. This can be achieved through protocol adaptation and debugging between the controller of the present application and the control chip of the lamp unit.

[0167] In addition, in order to optimize the display effect, the image can be further processed before sending the light effect playing instructions to the atmosphere lamp, specifically to the control chip of the lamp unit. For example, the color values of the image can be corrected to adapt to the display characteristics of the lamp. This can include adjusting the brightness, contrast or saturation of the color to ensure the visual effect of the image when displayed on the lamp.

[0168] Through the above embodiments, the present application can accurately map the generated light projection pixel map to the layout interface of the lamp beads of the atmosphere lamp, and control the lamp to play the image through the light effect playing instructions. This process not only ensures the display effect of the light projection pixel map on the lamp, but also improves the accuracy and visual quality of the display by optimizing the mapping relationship and light emission control parameters. Specifically, by obtaining the layout information of the lamp beads and creating a corresponding layout interface, the present application can adapt to different models and configurations of lamps. By scaling and mapping the light projection pixel map, the present application ensures accurate display of the image on the lamp, even in the case of inconsistent resolution, while maintaining the clarity and consistency of the image. In addition, by generating light emission control parameters and constructing light effect playing instructions, the present application can accurately control the light emission state of each lamp bead, thereby realizing high-quality pixelized image display. These technical advantages collectively improve the display effect of the light projection pixel map on the atmosphere lamp, enhance the user experience, and provide strong technical support for the application of intelligent lighting and visual effects.

[0169] Please refer to Figure 3An application device for generating a light-throwing pixel map is provided for one of the purposes of the present application, and is a functional embodiment of the application method for generating a light-throwing pixel map. The device includes an input analysis module 5100, a direct generation module 5200, a drawing generation module 5300, and a mapping and playing module 5400. The input analysis module 5100 is configured to determine image analysis information of a light-throwing pixel map to be generated based on user input text, wherein the image analysis information includes type description information and content description information. The direct generation module 5200 is configured to identify a cluster to which the type description information belongs, and when the type description information belongs to a first cluster, an end-to-end generation model is called to generate the light-throwing pixel map according to the type description information and the content description information. The drawing generation module 5300 is configured to determine a corresponding drawing function according to the content description information when the type description information belongs to a second cluster, and to generate the light-throwing pixel map using the drawing function. The mapping and playing module 5400 is configured to map the generated light-throwing pixel map to a light bead layout interface of an atmosphere lamp according to a plane position mapping relationship.

[0170] Based on any embodiment of the device of the present application, the input analysis module 5100 includes a response acquisition module configured to acquire corresponding user input text in response to a user submission instruction, a prompt construction module configured to add the user input text to a preset analysis prompt template to obtain an analysis prompt text, and an analysis execution module configured to input the analysis prompt text into a preset target analysis model to drive the target analysis model to determine type description information and content description information of a light-throwing pixel map to be generated based on the user input text, thereby forming the image analysis information.

[0171] Based on any embodiment of the device of the present application, the input analysis module 5100 includes a sample calling module configured to acquire a training data set, wherein the training data set includes a plurality of sample images and corresponding image analysis information, and the sample images are pixel magnified images of corresponding source images; and a training execution module configured to input the sample images and the corresponding image analysis information into a preset end-to-end generation model to implement training until the end-to-end generation model is trained to a convergent state.

[0172] On the basis of any embodiment of the device of the application, prior to the sample calling module, comprising: a position mapping module, configured to create a canvas of a standard size, select a target source image from a preset source image set, and establish a position mapping relationship by centering the canvas and the target source image; a magnification determining module, configured to determine a magnification corresponding to the magnification of the target source image from the source image size to the standard size according to the source image size of the target source image and the standard size; an image redrawing module, configured to traverse each pixel of the target source image, determine a corresponding drawing area of 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; and a sample construction module, configured to store the image in the canvas as a sample image corresponding to the target source image, associate the sample image as image analysis information pre-labeled by the target source image, and add the sample image to the training data set.

[0173] On the basis of any embodiment of the device of the application, the drawing generation module 5300 comprises: a drawing execution module, configured to create a canvas of a standard size, and execute the drawing function in the canvas to draw the graphics specified by the content description information; and a line expansion module, configured to determine a line expansion area by expanding the line of the graphics, fill the line expansion area with random colors, and take the image content in the canvas as the lamp pixel image.

[0174] On the basis of any embodiment of the device of the application, prior to the mapping playing module 5400, comprising: a color clustering module, configured to perform color clustering on each pixel in the generated lamp pixel image to obtain a plurality of main color categories, and determine a pixel center color corresponding to each main color category; a same color enhancement module, configured to reset the color value of the pixel contained in each main color category in the lamp pixel image to the center color value of the category; and an outlier optimization module, configured to determine the closest center color according to the color value of the outlier pixel in the lamp pixel image, and reset the color value of the pixel to the color value of the closest center color.

[0175] On the basis of any embodiment of the device of the present application, the mapping playing module 5400 comprises: an interface creating module, configured to 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 is taken as a single pixel in the lamp bead layout interface; a screen projection mapping module, configured to scale the generated lamp projection pixel graph into the lamp bead layout interface, and determine a plane position mapping relationship between each pixel in the lamp projection pixel graph and the lamp bead in the lamp bead layout interface; a parameter generating module, configured to determine a color value of each lamp bead in the lamp bead layout interface according to a color value of each pixel in the lamp projection pixel graph by checking the plane position mapping relationship, and generate a light emission control parameter corresponding to all lamp beads in the lamp bead layout interface; and a playing control module, configured to construct the light emission control parameter of each lamp bead in the lamp bead layout interface into a lamp effect playing instruction, and send the lamp effect playing instruction to the atmosphere lamp to control the atmosphere lamp to play the lamp projection pixel graph.

[0176] To solve the above technical problems, the embodiment of the present application further provides a computer device. As shown in the figure, Figure 4 The computer device includes a processor, a computer readable storage medium, a memory and a network interface connected by a system bus. The computer readable storage medium of the computer device stores an operating system, a database and computer readable instructions. The database can store control information sequences. When the computer readable instructions are executed by the processor, the processor can implement a lamp projection pixel graph generation application method. The processor of the computer device is used to provide computing and control capabilities to support the operation of the entire computer device. The memory of the computer device can store computer readable instructions. When the computer readable instructions are executed by the processor, the processor can execute the lamp projection pixel graph generation application method of the present application. The network interface of the computer device is used to connect and communicate with the terminal. Those skilled in the art can understand, Figure 4 that the structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different component arrangement.

[0177] In the present embodiment, the processor is used to execute the specific functions of each module and its sub-modules in Figure 3 The memory stores the program codes and various data required for executing the above-mentioned modules or sub-modules. The network interface is used for data transmission between the user terminal or the server. The memory in the present embodiment stores the program codes and data required for executing all modules / sub-modules in the lamp projection pixel graph generation application device of the present application. The server can call the program codes and data of the server to execute the functions of all sub-modules.

[0178] 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.

[0179] 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).

[0180] 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.

[0181] 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; Identifying the cluster to which the type description information belongs, and if it belongs to the first cluster, invoking an end-to-end generation model to generate the spotlight pixel map based on the type description information and the content description information, wherein the first cluster includes categories suitable for converting objects described by user input text into concrete graphics; 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, the second cluster including a category suitable for converting an object described by the user input text into an abstract graphic; 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; According to the plane position mapping relationship, the 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, characterized in that: 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 any one of claims 1 to 5, characterized in that: According to the plane position mapping relationship, the pixel map of the spotlight 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 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.

7. 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 a first cluster, call an end-to-end generation model to generate the spotlight pixel map based on the type description information and the content description information, wherein the first cluster includes categories suitable for converting objects described by user input text into corresponding concrete graphics; a drawing generation module configured to determine a corresponding drawing function based on the content description information when the type description information belongs to a second cluster, and use the drawing function to draw and generate the spotlight pixel map, wherein the second cluster includes a category suitable for converting an object described by a user input text into an abstract graphic; A color clustering module is configured to 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; a same color enhancement module configured to reset the color value of the pixels included in each main color category of the spotlight pixel map to the color value of the center color of the category; An outlier optimization module is configured to 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; The mapping playback module is configured to map the spotlight pixel image to the lamp bead layout interface of the atmosphere lamp for playback according to the plane position mapping relationship.

8. The device for generating a pixel map of a spotlight according to claim 7, characterized in that: The input parsing module includes: A response acquisition module is configured to respond to a user-submitted 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; The parsing execution module is 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 based on the user input text to constitute the image parsing information.

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 6.

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 6 in the form of computer-readable instructions, and when the computer program is called and executed by a computer, the steps included in the corresponding method are executed.

Citation Information

Patent Citations

  • 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