Method and apparatus for generating physical layout of lamp chain, and device and product
By analyzing the temporal color rendering sequence and spatial location information of the light chain, and using deep learning models and frame difference methods to construct the physical layout of the light chain, the problem of insufficient accuracy and flexibility in the identification and layout control of lamp beads in traditional technologies is solved, and fast and accurate identification of lamp beads and personalized lighting control are realized.
Patent Information
- Application Number
- PCT/CN2025/082249
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-07-12
- Filing Date
- 2025-03-13
- Publication Date
- 2026-01-15
AI Technical Summary
Traditional smart lighting technologies lack precision and flexibility in lamp identification and layout control, making it difficult to meet the needs of complex and dynamic lighting effects.
By using the temporal color rendering sequence and spatial location information of multiple on-site images of the light chain, the serial position identifier and spatial location of the LED beads are identified. The images are analyzed using a deep learning model and frame difference method to construct the physical layout of the light chain, thereby achieving rapid and accurate identification and layout generation of the LED beads.
It enables rapid and accurate construction of light chain layouts, improves the accuracy of LED bead recognition and system flexibility, supports personalized and dynamic lighting effects, simplifies user operation, and enhances user experience.
Smart Images

Figure CN2025082249_15012026_PF_FP_ABST
Abstract
Description
Methods, apparatus, equipment and products for generating physical layout of light chains Technical Field
[0001] This application relates to the field of lighting control, and in particular to a method and apparatus for generating the physical layout of a light chain, as well as equipment and products. Background Technology
[0002] Traditional technologies include methods for intelligently analyzing and generating the physical layout of light chains, but these techniques are often relatively simple and crude. They often lack sufficient precision and intelligence to meet users' needs for complex and dynamic lighting effects.
[0003] It is evident that although traditional technologies have made some progress in the field of smart lighting, there are still significant shortcomings and room for improvement in achieving efficient, accurate, and flexible identification and layout control of LED beads. Summary of the Invention
[0004] According to one aspect of this application, a method for generating the physical layout of a light chain is provided, comprising:
[0005] Based on multiple on-site images of the light chain, the temporal color rendering sequence of each LED in the light chain image is identified, as well as its spatial position information in the layout space constructed based on the on-site images.
[0006] Create a physical layout for the light chain, which describes the serial position identifier of each lamp in the light chain and its corresponding spatial position information in the layout space;
[0007] For LED beads whose color changes according to the time-domain color rendering sequence, a unique serial position identifier is determined based on the time-domain color rendering sequence of the LED bead, and the spatial position information of the LED bead is associated with it in the physical layout of the LED chain, so that the LED bead becomes an identified LED bead.
[0008] Based on the serial and spatial positional relationships between the lamp beads to be identified and the identified lamp beads in the physical layout of the light chain, the serial position identifier and spatial position information corresponding to the lamp bead to be identified are determined in the physical layout of the light chain, so that the lamp bead to be identified becomes the identified lamp bead.
[0009] According to another aspect of this application, a light chain physical layout generation device is provided, comprising:
[0010] The image analysis module is configured to identify the temporal color rendering sequence of each LED in the light chain image based on multiple on-site images of the light chain, as well as its spatial position information in the layout space constructed based on the on-site images.
[0011] The layout creation module is set to create a physical layout for the light chain, which describes the serial position identifier of each lamp in the light chain and its corresponding spatial position information in the layout space.
[0012] The confidence recognition module is configured to identify LED beads whose colors change according to the time-domain color rendering sequence. Based on the time-domain color rendering sequence of the LED bead, it determines its unique serial position identifier and associates the spatial position information of the LED bead in the physical layout of the LED chain, so that the LED bead becomes an identified LED bead.
[0013] The inference and identification module is configured to determine the serial position identifier and spatial position information corresponding to the lamp bead to be identified in the physical layout of the light chain based on the serial position relationship and spatial position relationship between the lamp bead to be identified and the lamp bead already identified, so that the lamp bead to be identified becomes the lamp bead already identified.
[0014] According to another aspect of this application, a computer device is provided, including a central processing unit and a memory, wherein the central processing unit is configured to invoke and run a computer program stored in the memory to perform the steps of the light chain physical layout generation method.
[0015] According to another aspect of this application, a computer program product is provided, including a computer program or computer instructions, which, when invoked by a central processing unit, execute the steps of the light chain physical layout generation method.
[0016] Compared with traditional technologies, this application has many beneficial effects, including but not limited to:
[0017] First, this application achieves rapid and accurate construction of light chain layouts through advanced image recognition technology. Compared with existing technologies, this application is no longer limited by the requirement for users to arrange the light chains in a specific shape, nor does it require complex wiring and editing processes. Utilizing the time-domain color rendering sequence with color changes extracted from the on-site image of the LED beads as recognition features, it can quickly capture key information from the user-arranged light chains, confidently determine the correlation between the serial position identifiers and spatial position information of some LED beads, and then intelligently infer the serial position identifiers and spatial position information of other LED beads to be identified based on these identified relationships. This rapid recognition capability significantly reduces the tedious configuration and debugging time in traditional methods, providing users with an efficient and intuitive means of generating lighting layouts.
[0018] Secondly, the intelligent inference mechanism of this application significantly improves the accuracy of LED identification. Even when there are a large number of LEDs, their arrangement is complex, or they are partially obscured, this application can accurately deduce the positions of other LEDs to be identified by analyzing the serial and spatial positional relationships between the LEDs to be identified and those already identified. This method of inferring unknown information based on known information not only optimizes the data processing flow but also enhances the system's adaptability and robustness to complex environments, effectively addressing the shortcomings of traditional technologies in identifying large-scale or complex layouts.
[0019] Furthermore, this application possesses high flexibility and scalability. It is not dependent on specific hardware configurations and can adapt to light chains of different lengths and shapes, providing a wide range of application possibilities for various lighting scenarios. Simultaneously, the intelligent processing capabilities of this application provide strong technical support for achieving personalized and dynamic lighting effects, greatly enriching the expressiveness and creativity of intelligent lighting systems and meeting users' needs for complex and dynamic lighting effects.
[0020] Finally, this application significantly enhances the user experience through a simplified identification and layout construction process. Users do not need to perform complex operations or learn professional programming skills; they can easily personalize and control the light chain lighting by simply taking a single shot using the terminal. This user-friendly design concept makes smart lighting technology more accessible to everyday life and easier for consumers to accept and use, thus promoting the popularization and development of smart lighting technology. Attached Figure Description
[0021] Figure 1 is a schematic diagram of the electrical structure of an exemplary ambient lighting device of this application;
[0022] Figure 2 is a flowchart illustrating the method for generating the physical layout of the light chain in an embodiment of this application.
[0023] Figure 3 is a schematic diagram of the structure of the light chain physical layout generation device in the embodiment of this application;
[0024] Figure 4 is a schematic diagram of the structure of the computer device in the embodiment of this application. Detailed Implementation
[0025] Please refer to Figure 1, which is a structural schematic diagram of an ambient lighting device provided in one embodiment of this application. As can be seen, the ambient lighting device includes a controller 1, a light chain 2, and an image acquisition interface. The light chain 2 is electrically connected to the controller 1 so as to receive control from the computer program running in the controller 1 and work together to realize the lighting effect playback.
[0026] Controller 1 typically includes a control chip, communication components, and a bus connector. In some embodiments, controller 1 may also be configured with a power adapter, control panel, display screen, etc., as needed.
[0027] The power adapter is primarily used to convert AC power to DC power to power the entire ambient lighting system. The control chip can be implemented using various embedded chips, such as Bluetooth SoC (System on Chip), WiFi SoC, MCU (Micro Controller Unit), DSP (Digital Signal Processing), and other types of chips. The control chip typically includes a central processing unit (CPU) and memory; the memory and CPU are used to store and execute program instructions, respectively, to achieve the corresponding functions. All of these types of control chips can have built-in communication components, or additional communication components can be configured as needed.
[0028] The communication component can be used to communicate with external devices, such as personal computers or mobile terminals like smartphones. This allows the controller 1's control chip to receive configuration commands after the user issues them via the mobile terminal, completing basic configuration to control the light chain. Furthermore, the controller 1 can also acquire interface images from terminal devices or real-time preview images captured by the camera unit 3 via the communication component.
[0029] The bus connector is mainly used to provide power to the light chain 2 connected to the bus and to provide lighting effect playback commands. Therefore, it provides corresponding pins for the power bus and signal bus. Thus, when the light chain 2 needs to be connected to the controller 1, it can be connected to the bus connector through the corresponding connector of the light chain 2. The control panel usually provides one or more buttons for controlling the controller 1 on and off, selecting various preset lighting effect control modes, etc.
[0030] The display screen can be used to show various control information to cooperate with the buttons on the control panel and support the implementation of human-computer interaction functions. In some embodiments, the control panel and the display screen can be integrated into the same touch display screen.
[0031] The light chain 2 in the ambient lighting device can be a light strip or a string of lights, possessing flexibility and capable of being molded into any shape for placement. Each light chain 2 includes multiple LED beads 20 connected in series, with each LED bead 20 serving as a light-emitting unit. The number of LED beads 20 within each light chain 2 can be the same, and they are arranged at equal intervals. The LED beads 20 within the same light chain 2 transmit operating current through the same set of cables connected to the bus. The LED beads 20 within the same light chain 2 can be connected in parallel for electrical connection.
[0032] The image acquisition interface can be either a hardware interface or a software interface implemented in controller 1. When it is a hardware interface, the image acquisition interface can be implemented as camera unit 3, with controller 1 loading the corresponding driver to drive camera unit 3 to work. In one application, camera unit 3 can be used to capture images of the light chain to obtain on-site images needed to determine the physical layout of the light chain. Camera unit 3 can also be used to capture interface images needed to generate lighting effect control data.
[0033] When camera unit 3 is pointed at a target screen, such as the desktop of a terminal device, or at a physical environment, images can be captured at a certain frame rate to obtain the interface image. When it is a software interface, the image acquisition interface can be an image acquisition program implemented on the controller 1 side using the graphics infrastructure technology provided by the terminal device's operating system. Controller 1 connects to the terminal device via various cables, such as HDMI or Type-C cables, and can continuously obtain the interface image of the terminal device with the support of this graphics infrastructure technology. Of course, if a wireless projection protocol is pre-established between controller 1 and the terminal device, controller 1 can also obtain the interface image of the terminal device wirelessly. The graphics infrastructure technology of the operating system varies depending on the type of operating system. For example, the Windows operating system provides the corresponding technology, namely Microsoft DirectX Graphics Infrastructure (DXGI), which can achieve this function.
[0034] Therefore, when the image acquisition interface is responsible for collecting environmental reference images, the specific environment of the collected images can be flexibly set by the user. For example, when the image acquisition interface is camera unit 3, the user can point camera unit 3 at the computer's graphical user interface to capture the corresponding interface image as the target image for playing the lighting effects, so that the light chain 2 can generate corresponding lighting effect description data based on the interface image; the user can also point camera unit 3 at the physical space environment, such as the outdoor environment, to capture real-scene images as environmental reference images, so that the light chain 2 can generate lighting effect description data corresponding to the real scene.
[0035] When the ambient lighting device needs to play lighting effects according to the lighting effect description data, its controller 1 needs to use the physical layout of the light chain to provide the serial position identifier and spatial position information of each light-emitting unit in its light chain 2. According to the spatial position represented by the spatial position information of each light-emitting unit, the corresponding lighting effect description data is parsed into control data of each light-emitting unit. And according to the serial position sequence, the control data of each light-emitting unit is encapsulated into lighting effect control data. Then, the lighting effect control data is sent to the corresponding light chain. The control chip of each light-emitting unit in the light chain extracts its own corresponding control data and controls each light-emitting element to emit corresponding colored light according to the control data. Under the coordinated action of the colored light emitted by each light-emitting unit, the entire lighting effect is played.
[0036] It is easy to understand that the computer device of this application has a built-in camera unit and a graphical user interface. The camera unit 3 can be used to capture on-site images and generate a physical layout of the light chain based on them. The physical layout of the light chain describes the mapping relationship between the serial positions of the LEDs corresponding to each serial position identifier in the light chain and the spatial position information of the light chain in the corresponding layout space in physical space. Accordingly, the computer device can also generate a corresponding light chain model based on the spatial position information of each LED in the physical layout of the light chain and display it in the graphical user interface, allowing the user to edit the control data of each LED in the light chain model to construct corresponding lighting effects. Based on the information provided by the physical layout of the light chain, the computer device can convert the LEDs in the light chain model into lighting effect control data that can be parsed by the control chip of each LED in the light chain according to the correspondence between their spatial position information and serial position identifiers, and use this data to control the light chain to play corresponding lighting effects.
[0037] Please refer to Figure 2. In some embodiments, the method for generating the physical layout of the light chain of this application is illustrated using a mobile terminal as an example for easier understanding. The method includes:
[0038] Step S5100: Based on multiple on-site images of the light chain, identify the temporal color rendering sequence of each LED in the light chain image and its spatial position information in the layout space constructed based on the on-site images;
[0039] Field images refer to images containing light chains captured directly from actual scenes; these images form the basis for constructing the physical layout of the light chains. These images are typically captured by the camera unit of a terminal device at specific time intervals to ensure that the color changes of the LEDs at different points in time can be recorded. Since this application focuses on identifying LEDs through time-domain color rendering sequences, the acquisition of these images primarily focuses on changes in the time dimension.
[0040] The correlation between multiple field images lies in their collective recording of the display status of the light chain over a continuous time series. These images, arranged chronologically, form a time-series dataset, allowing for the tracking of the color change process of each LED. This continuous image capture method is crucial for analyzing the dynamic color rendering characteristics of the LEDs and obtaining the corresponding time-domain color rendering sequence, as it provides a complete record of the LED color changes, thus aiding in the identification and differentiation of individual LEDs.
[0041] Acquiring these on-site images is relatively simple and direct. The terminal device only needs to capture images of the light chain at predetermined time intervals. This process can be automated using scripts or preset camera preview modes, ensuring image consistency and continuity. Therefore, multiple on-site images can be composed of multiple image frames from the preview video within the same time period.
[0042] The time-domain color rendering sequence is used to identify LED beads and determine their position in the LED chain. It refers to the sequence of color changes displayed by the LED beads at different points in time. These sequences unfold along a timeline, forming a unique color change history for each LED bead. There are two types of time-domain color rendering sequences: one is a sequence where the color changes over time, and this change is unique and can be used to identify the LED bead; the other is a sequence where the color remains unchanged at different points in time. Although it is not unique in itself, its position can be indirectly inferred from its relative position to the LED beads that are changing color.
[0043] For example, the odd-numbered LEDs in a light chain can provide a time-domain color rendering sequence with color changes, while the even-numbered LEDs can provide a time-domain color rendering sequence without color changes. Thus, once the serial position identifier of the odd-numbered LEDs is determined, the serial position identifier of the adjacent even-numbered LEDs can be determined by using the parity relationship.
[0044] In practical applications, by sending specific color rendering commands to the light chain, the LEDs can be controlled to emit light according to a predetermined time-domain color rendering sequence. These commands are constructed based on the known total number of LEDs and serial position encoding rules, ensuring that each LED displays color according to its corresponding time-domain color rendering sequence. The sending of color rendering commands and the responses of the LEDs together achieve the dynamic color rendering effect of the light chain.
[0045] In some embodiments, the light chain can be arranged into groups of several, with each light bead having a time-domain color rendering sequence. For example, four can be grouped together, where the first light bead in a group emits light using a unique time-domain color rendering sequence, while the second, third, and fourth light beads can emit light using a time-domain color rendering sequence with no color change. However, the colors emitted by these three light beads are different, so that when inferring the serial position of these light beads, this color distribution pattern can be combined for efficient identification.
[0046] In on-site images, LED beads, regardless of color changes, appear as prominent bright spots, providing a basis for image analysis technology. Image analysis technology identifies the temporal color rendering sequence of the LED beads by capturing these bright spots and analyzing their color change patterns across consecutive image frames.
[0047] The identification of time-domain color sequences can be achieved through image analysis techniques. Two main implementation methods are provided: one is based on a deep learning model, and the other utilizes the frame difference information between consecutive image frames.
[0048] The first embodiment uses a deep learning model to process and analyze on-site images. This model, after training, can identify the luminous highlights of LEDs in an image and analyze their color changes over time. The deep learning model can handle complex image features, identify unique temporal color change patterns, and thus accurately obtain the corresponding temporal color rendering sequence. By learning from a large amount of image data, the model has mastered the rules of LED color changes and can automatically distinguish the color rendering sequences of different LEDs, maintaining a high recognition accuracy even under less than ideal image conditions.
[0049] The second embodiment relies on analyzing frame difference information between consecutive image frames. This method first requires preprocessing the consecutively captured image frames to reduce the impact of noise and illumination variations. Then, by calculating the differences between consecutive frames, areas where color changes occur can be highlighted, i.e., the positions of the LEDs. For LEDs whose color remains unchanged, their positional identifiers can be inferred by analyzing their relative positions to LEDs whose color changes. The frame difference method has advantages in processing speed and is suitable for real-time monitoring and analysis of LED color changes.
[0050] The layout space is used to represent the relative positions and shapes of the light chain and its LEDs in physical space. This space is created based on on-site images and corresponds to the physical space where the LEDs are located, in order to represent the LED position information extracted from the on-site images. It provides a reference frame for each LED, allowing its position to be determined and represented in an ordered space.
[0051] If the scene image is captured from a single angle, a two-dimensional layout space can be directly created based on the two-dimensional characteristics of the scene image. The positions of the LEDs in the image can then be mapped to a corresponding two-dimensional coordinate system within the layout space, where the position of each LED is represented by (x, y) coordinate pairs. The two-dimensional layout space is well-suited for light chains with planar or simple curved layouts, allowing for rapid implementation with relatively low computational complexity.
[0052] When on-site images are captured from multiple angles to reflect the three-dimensional shape of the light chain, 3D modeling techniques can be used to create a 3D layout space. 3D modeling integrates information from multiple perspectives to construct a three-dimensional spatial model, where the position of each light element is represented by a (x, y, z) coordinate system. This 3D layout space can more accurately reflect the layout of the light chain in actual physical space, and is especially suitable for light chains with complex shapes or multi-dimensional layouts.
[0053] After creating the layout space, it can be used to represent the positional information of the LEDs identified from the field images. The LED positional information can be obtained from the field images using image processing techniques such as edge detection, thresholding, or pattern recognition. Once the LED positions are determined in the field images, this positional information can be mapped into the layout space. In two-dimensional layout space, this mapping is a direct coordinate transformation; however, in three-dimensional layout space, depth and viewpoint information must also be considered to ensure the accuracy of the LED spatial positional information.
[0054] Ultimately, the layout space provides each LED in the light chain with a clear spatial location corresponding to its physical location. This spatial location information forms the basis for constructing the physical layout of the light chain. Through the layout space, the spatial relationships between the LEDs can be further analyzed, providing crucial data support for constructing the physical layout of the light chain.
[0055] It should be noted that in some embodiments, clustering algorithms can be applied to analyze the spatial location information obtained within the layout space to identify outliers and exclude them from the layout space. This can avoid misidentifying false light-emitting points caused by reflection, scattering, interference, etc., as the light-emitting points of the LED beads.
[0056] Step S5200: Create a physical layout for the light chain, which describes the serial position identifier of each lamp in the light chain and its corresponding spatial position information in the layout space.
[0057] Creating the physical layout of the light chain is a systematic process of extracting information from site images. This process can be compared to filling out a form, where two columns store the serial position identifier and spatial position information of the LEDs, respectively. The serial position identifier is determined according to the light chain's encoding rules and the order of the LEDs; it represents the position of the LED in the serial direction of the light chain. The spatial position information indicates the specific coordinates of the LEDs in the layout space, and this information will be determined in subsequent steps.
[0058] In this step, the first step is to define the data structure for the physical layout of the light chain. This can be achieved by creating a data structure or table containing two main fields: serial position identifier and spatial position information. The serial position identifier is assigned according to the total number of LEDs based on the light chain's preset encoding rules. For example, if the light chain has 100 LEDs, each LED will be assigned a serial position identifier from 1 to 100 based on its position on the light chain. The serial position identifier can be written into the physical layout of the light chain, thereby serving as an index for the LEDs.
[0059] The spatial position information corresponding to the serial position identifier of each LED is not yet determined, as it requires further processing and analysis. In the two-dimensional layout space, the spatial position information will include the (x, y) coordinates of each LED; while in the three-dimensional layout space, it will also include the z coordinate.
[0060] The physical layout of the light chain created in this step will be gradually refined in subsequent steps to include the relative spatial positions of each LED. The serial position identifier and spatial position information of each LED can be integrated into the physical layout of the light chain, forming a complete mapping. This mapping includes not only the serial order of the LEDs on the light chain but also their precise physical positions. This physical layout is the foundation for achieving precise control and dynamic display effects of the light chain's lighting, providing essential data support for intelligent lighting systems.
[0061] Step S5300: For LED beads whose color changes according to the time-domain color rendering sequence, determine their unique serial position identifier based on the time-domain color rendering sequence of the LED bead, and associate the spatial position information of the LED bead with the corresponding identifier in the physical layout of the LED chain, so that the LED bead becomes an identified LED bead.
[0062] During the creation of the physical layout of the light chain, the serial position identifier of each LED has been predefined and populated into the layout. These serial position identifiers correspond to the time-domain color rendering sequence of the LEDs. This correspondence is determined when the color rendering playback command is sent and can be stored in a table for querying.
[0063] When a terminal identifies a color change in the time-domain color rendering sequence of an LED, it indicates that the sequence is unique and can be used as a basis for identifying the LED. Since the correspondence between the time-domain color rendering sequence and the serial position identifier is known, the terminal can directly find the serial position identifier of the LED by querying a predefined table.
[0064] Next, the terminal will associate and fill in the spatial location information of the LED in the layout space at the corresponding serial position identifier in the physical layout. This spatial location information is obtained based on the on-site image through image processing technology, and it reflects the exact position of the LED in the physical space.
[0065] Specifically, if the time-domain color sequence of an LED is "red-green-blue", and this sequence corresponds to the 50th serial position identifier in a predefined table, the terminal will fill in the spatial position information of the LED at the 50th position of the physical layout, such as its (x, y) coordinates in the two-dimensional layout space, or its (x, y, z) coordinates in the three-dimensional layout space.
[0066] After the above process, the recording of some LED beads is complete in the physical layout of the light chain. Since the time-domain color rendering sequence of the LED beads processed in this step is unique, the spatial location information of the corresponding identified LED beads is also reliable and can be regarded as or marked as identified LED beads. Correspondingly, other LED beads become LED beads to be identified. This means that the terminal not only knows the color change characteristics of the LED bead, but also knows its exact location in the light chain and physical space.
[0067] Step S5400: Based on the serial position relationship and spatial position relationship between the lamp bead to be identified and the lamp bead already identified in the physical layout of the lamp chain, determine the serial position identifier and its spatial position information corresponding to the lamp bead to be identified in the physical layout of the lamp chain, so that the lamp bead to be identified becomes the lamp bead already identified.
[0068] In constructing the physical layout of a light chain, spatial and sequential positional relationships are fundamental for identifying the individual LEDs. Spatial positional relationships refer to the relative positions of the LEDs, based on their coordinates in three-dimensional or two-dimensional space. For example, if two LEDs are located at (x1, y1, z1) and (x2, y2, z2), their spatial relationship can be determined by their distance and direction. Sequential positional relationships are based on the order of the LEDs on the light chain. Each LED is assigned a unique sequential position identifier based on its position, reflecting the linear arrangement of the LEDs along the light chain.
[0069] For the LED beads to be identified in the physical layout of the light chain, by utilizing the already determined serial position identifiers and spatial position information of some identified LED beads, the serial position relationship and spatial position relationship between the LED be identified and these identified LED beads can be determined. By comparing the arrangement pattern of the LED be identified and these identified LED beads in the light chain, relevant geometric calculations can be performed, thereby determining the serial position identifier corresponding to the LED be identified and estimating the corresponding spatial position information of the LED be identified.
[0070] Specifically, when identifying a lamp bead to be identified, the process involves traversing the serial position markers in the physical layout of the lamp chain to find lamp beads whose serial position markers are not associated with spatial position information. These lamp beads are thus identified as lamp beads to be identified. Before and after this lamp bead in the serial direction of the lamp chain, there must be adjacent already identified lamp beads. These adjacent already identified lamp beads also have their corresponding serial position markers, thus determining their serial position relationship with the lamp bead to be identified. Based on their serial position relationship, combined with the geometric characteristic of the lamp bead spacing in the lamp chain, the spatial position relationship between the lamp bead to be identified and these already identified lamp beads can also be determined. Based on this spatial position relationship and the spatial position information of the already identified lamp beads, the spatial position information of the time-domain color rendering sequence displaying a constant color can be searched in the layout space and used as the spatial position information of the lamp bead to be identified. Alternatively, the location of the lamp bead to be identified can be inferred from the corresponding geometric characteristics of the lamp bead arrangement in the layout space, thus determining its spatial position information. After these inferences are completed, the serial position markers and spatial position information of the lamp beads to be identified are filled into the physical layout, transforming these lamp beads into identified lamp beads.
[0071] In the process of inferring the LED to be identified, the LED can be determined by traversing the physical layout of the LED chain and finding serial position markers that do not have associated spatial position information. Each serial position marker in the physical layout of the LED chain thus serves as an index. Based on this, the spatial position information of the LED to be identified can be inferred in various specific embodiments, such as:
[0072] In one embodiment, spatial location information has been obtained based on the time-domain color rendering sequence of the LED to be identified, which displays a specific color. When encoding the color rendering playback command, the relationship between the color change sequence of the LED to be identified and its adjacent identified LEDs is known. In this case, taking the adjacent identified LEDs of the LED to be identified as a starting point, inference is made according to the geometric characteristics of the LED chain, such as the spacing between LEDs. If the spatial location information corresponding to this specific color can be found within the associated range of the adjacent identified LEDs, then it can be presumed that this spatial location information is the spatial location information of the LED to be identified. This spatial location information is associated and marked as the serial position identifier of the LED to be identified, thereby realizing the conversion of the LED to be identified into an identified LED.
[0073] In another embodiment, since some of the LED beads to be identified are not visible in the on-site image, or are not identified by image analysis technology, it may be impossible to estimate the spatial position information of the LED beads to be identified in the manner of the previous embodiment. In this case, this embodiment leverages the advantage of not relying on whether the LED beads are visible in the on-site image, nor on whether the LED beads emit light, or whether they emit a specific color, etc. Instead, it directly determines each spatial position by dividing the space between two adjacent identified LED beads that are missing the spatial position information of the LED beads in the light chain according to the number of LED beads, based on the geometric characteristics of the LED bead arrangement in the light chain, such as the spacing between LED beads. Alternatively, when LED beads are missing at the beginning or end of the light chain, based on the number of identified LED beads connected to the missing LED beads, combined with the spacing between LED beads, the segment of the missing LED beads at the beginning or end is extended by the corresponding length, and then divided to determine each spatial position. The corresponding spatial position information is associated with the corresponding serial position identifier in the physical layout of the light chain, thereby also realizing the estimation of the spatial position information and serial position identifier of these LED beads to be identified.
[0074] Furthermore, in some embodiments, during the generation of the physical layout of the light chain, a clustering algorithm can be invoked as needed to perform cluster analysis on the identified LED beads in the physical layout of the light chain, identify outlier identified LED beads, delete their spatial position information in the physical layout of the light chain, so that the identified LED bead becomes a bead to be identified again, and then the physical layout of the light chain is traversed again to perform the above inference process, so as to re-determine the spatial position information of the bead to be identified through inference, so that it becomes an identified LED bead again.
[0075] The clustering algorithm referred to in this application may include, but is not limited to, any known algorithm such as K-means, DBSCAN, hierarchical clustering, or spectral clustering.
[0076] It is easy to understand from the above embodiments that, compared with traditional technologies, this application has many beneficial effects, including but not limited to:
[0077] First, this application achieves rapid and accurate construction of light chain layouts through advanced image recognition technology. Compared with existing technologies, this application is no longer limited by the requirement for users to arrange the light chains in a specific shape, nor does it require complex wiring and editing processes. Utilizing the time-domain color rendering sequence with color changes extracted from the on-site image of the LED beads as recognition features, it can quickly capture key information from the user-arranged light chains, confidently determine the correlation between the serial position identifiers and spatial position information of some LED beads, and then intelligently infer the serial position identifiers and spatial position information of other LED beads to be identified based on these identified relationships. This rapid recognition capability significantly reduces the tedious configuration and debugging time in traditional methods, providing users with an efficient and intuitive means of generating lighting layouts.
[0078] Secondly, the intelligent inference mechanism of this application significantly improves the accuracy of LED identification. Even when there are a large number of LEDs, their arrangement is complex, or they are partially obscured, this application can accurately deduce the positions of other LEDs to be identified by analyzing the serial and spatial positional relationships between the LEDs to be identified and those already identified. This method of inferring unknown information based on known information not only optimizes the data processing flow but also enhances the system's adaptability and robustness to complex environments, effectively addressing the shortcomings of traditional technologies in identifying large-scale or complex layouts.
[0079] Furthermore, this application possesses high flexibility and scalability. It is not dependent on specific hardware configurations and can adapt to light chains of different lengths and shapes, providing a wide range of application possibilities for various lighting scenarios. Simultaneously, the intelligent processing capabilities of this application provide strong technical support for achieving personalized and dynamic lighting effects, greatly enriching the expressiveness and creativity of intelligent lighting systems and meeting users' needs for complex and dynamic lighting effects.
[0080] Finally, this application significantly enhances the user experience through a simplified identification and layout construction process. Users do not need to perform complex operations or learn professional programming skills; they can easily personalize and control the light chain lighting by simply taking a single shot using the terminal. This user-friendly design concept makes smart lighting technology more accessible to everyday life and easier for consumers to accept and use, thus promoting the popularization and development of smart lighting technology.
[0081] Based on any embodiment of the method in this application, and prior to identifying the temporal color rendering sequence of each LED within a light chain image from multiple on-site images of the light chain, and before obtaining spatial location information in a layout space constructed based on the on-site images, the method includes:
[0082] Step S4100: Based on the serial position identifier of each LED bead and the corresponding time-domain color rendering sequence in the serial structure information of the light chain, construct multiple color rendering playback instructions corresponding to multiple time sequences in the time-domain color rendering sequence.
[0083] The serial structure information is pre-defined data containing the position and characteristics of each LED in the light chain. It determines the serial position identifier of each LED based on the total number of LEDs and the encoding rules. This information can be predicted in advance, and knowing the number of LEDs and the encoding rules, the exact position of each LED in the light chain can be pre-calculated and determined. For example, if the light chain consists of 100 LEDs, each LED can be assigned a unique identifier from 1 to 100, and these identifiers follow a pre-defined encoding rule.
[0084] The time-domain color rendering sequence of each LED is a set of predefined color change instructions that determine the color displayed by the LED at different points in time. These sequences provide a unique color change pattern for each LED, allowing the system to distinguish and identify each LED. For example, the first LED might have a time-domain color rendering sequence that starts with red, then changes to green, and finally to blue, while the second LED might have a completely different sequence, such as starting with yellow, changing to purple, and finally to white.
[0085] In this application, the colors of each time sequence in the time-domain color rendering sequence of some LED beads are constant, while the colors of each time sequence in the time-domain color rendering sequence of other LED beads have a changing relationship. For the latter, the time-domain color rendering sequence can be made into a light emission code information to identify the identity of these LED beads by distinguishing different LED beads. Subsequently, the corresponding LED bead can be determined based on this light emission code information.
[0086] Mapping the serial position identifiers of LEDs to their time-domain color rendering sequences facilitates rapid identification of each LED. This mapping allows the system to quickly query and send the correct color rendering instructions to a specific LED. For example, the system can create a database or lookup table that associates the serial position identifier of each LED with its corresponding time-domain color rendering sequence, enabling rapid retrieval and use of this information when needed.
[0087] When constructing color display instructions, a set of instructions can be generated based on a pre-established mapping relationship. Each color display instruction corresponds one-to-one with each timing sequence in the time-domain color display sequence of the LED beads. Thus, at each timing sequence in the time-domain color display sequence, the display colors corresponding to all LED beads are included in a corresponding color display instruction, which actually describes a frame of the light emission image of the LED chain.
[0088] Step S4200: Send the multiple color display and playback commands to the light chain according to the multiple time sequences, so as to control each lamp bead in the light chain to display the corresponding color light according to its corresponding time domain color display sequence;
[0089] Each color rendering instruction is sent sequentially to the light chain to control each LED to display color according to a predetermined time-domain color rendering sequence. Once the light chain receives an instruction, its internal control chip parses it and controls the corresponding LED to change color accordingly. From the perspective of the entire light chain, a frame of luminous image is presented for each time sequence. The display color of some LEDs changes between different time sequences due to the definition of their time-domain color rendering sequence, while the display color of some LEDs remains the same across different time sequences.
[0090] In one embodiment, to ensure the terminal has sufficient time to identify each LED, the color rendering command can be sent to the light chain in multiple cycles. This means that the LEDs on the light chain will cycle through their color changes, providing a dynamic and continuous color rendering effect, while also simplifying the image acquisition and LED identification process.
[0091] In another embodiment, to improve recognition efficiency, the temporal color rendering sequences of different LED beads are equal in number. This means that all LED beads will display the same number of color changes within a single emission period, thereby ensuring the regularity and consistency of the LED bead color rendering sequences and facilitating rapid and accurate recognition by the terminal.
[0092] This method not only enables precise control over the color changes of the light chain but also ensures that each LED emits light according to a predetermined time-domain color rendering sequence, providing dynamic and intuitive on-site image information for creating the physical layout of the light chain. This image information forms the basis for identifying LEDs and constructing the layout space in subsequent steps, ensuring the accuracy and reliability of the entire light chain physical layout generation method.
[0093] Step s4300: Obtain a preview video of the light chain through the camera unit, and extract multiple image frames from the preview video corresponding to the multiple time sequences as on-site images of the light chain.
[0094] As part of the terminal device, the camera unit has video capture capabilities. It records the illumination state of the light chain in real time at a certain frame rate, generating preview videos. These videos not only reflect the color rendering changes of the LEDs but also record the illumination images of the light chain at a specific time sequence. For example, if the camera unit captures video at a rate of 30 frames per second, and the time slots for each time sequence in the time domain color rendering sequence are also 1 second, then after each color rendering playback command is issued, the camera unit will capture 30 frames within 1 second, where each frame corresponds to a momentary illumination state of the light chain.
[0095] While acquiring the preview video, the terminal can extract key image frames from the preview video as on-site images based on the timing of each color display and playback command. These image frames, as on-site images, record the specific illumination state of the light chain at different points in time. For example, if there are four color display and playback commands corresponding to four timing sequences, four image frames are extracted from the preview video for each of the four timing sequences. Considering the potential delay in sending commands to the light chain, the terminal can adapt to the corresponding delay value and slightly postpone the analysis and determination of the on-site images.
[0096] In one embodiment, the process of determining the scene image can be implemented using image processing software. This software can identify and separate individual image frames in the video. For each image frame in a given time sequence, the one with the most complete and clearest luminous highlights can be selected as the scene image. These image frames can then be used for further analysis and processing, such as identifying LED beads and determining their spatial positions.
[0097] In some embodiments, in order to ensure the accuracy and integrity of image frames, specific algorithms can be used to enhance image quality, such as image sharpening and noise reduction techniques, to improve the clarity and recognizability of image frames, and on this basis, determine the scene image.
[0098] Through the above embodiments, this application demonstrates significant technical advantages. First, by precisely constructing color rendering playback instructions corresponding to different time sequences and sending them to the light chain, it ensures that the LEDs can undergo stable and continuous color changes according to the preset time-domain color rendering sequence. This provides a dynamic and continuous color rendering effect for image acquisition, greatly facilitating the LED identification process. Second, by ensuring the consistency of the time-domain color rendering sequence of different LEDs in terms of the number of time sequences, the regularity of the color rendering sequence is strengthened, thereby improving the efficiency and accuracy of the terminal in identifying LEDs. In addition, by using the preview video captured by the camera unit to extract keyframes as on-site images, combined with the optimal selection mechanism of the image processing software, the integrity and clarity of the images are further ensured, providing high-quality visual data for subsequent LED identification and spatial location determination. Finally, through image quality enhancement algorithms, such as image sharpening and noise reduction techniques, the recognizability of the images is further improved, ensuring that each LED can be accurately identified and located even under complex or undesirable lighting conditions. The combination of these technologies not only optimizes the data processing flow but also enhances the system's adaptability and robustness to complex environments, effectively improving the performance and reliability of the entire light chain physical layout generation method.
[0099] Based on any embodiment of the method in this application, based on multiple on-site images of the light chain, the temporal color rendering sequence of each LED in the light chain image and its spatial position information in a layout space constructed based on the on-site images are identified, including:
[0100] Step S5110: Construct a layout space corresponding to the physical space where the light chain is located based on the multiple on-site images;
[0101] The layout space is a virtual space that corresponds to the physical space where the light chain is located. As mentioned above, it can be two-dimensional or three-dimensional, depending on the information provided by the on-site images and the complexity of the light chain layout.
[0102] The construction of the layout space begins with the analysis of multiple field images. These images, captured by the camera units of the terminal equipment, reflect the state of the light chain at different points in time. In the simplest case, if all field images only provide a two-dimensional view, then a two-dimensional space is more suitable for constructing the layout space. In the two-dimensional layout space, the position of each LED can be determined by (x, y) coordinate pairs, which reflects the position of the LED on the plane.
[0103] If the on-site image includes depth information, or if existing deep learning models can be used to obtain depth information from the preview video and even automatically model a 3D space, then the layout space can also be constructed as a 3D space. In the 3D layout space, the position of each LED is determined by the (x, y, z) coordinate system, which reflects not only the position of the LED on the plane, but also its depth information in the depth direction.
[0104] The process of constructing the layout space can employ various techniques. For example, computer vision algorithms can be used to analyze the shape of the light chain and the distribution of the LEDs in an image, thereby determining their relative positions within the layout space. If the on-site image provides depth information, a three-dimensional layout space can be directly constructed using a deep learning model, identifying the spatial position information of each LED in the three-dimensional layout space. Furthermore, three-dimensional modeling techniques can be used to create geometric models based on images of the light chain carrier, and these models can also be mapped into the layout space.
[0105] The layout space corresponds to the physical space and is used to map the spatial location information and temporal color rendering sequence of the LED beads. This space not only provides a clear location identifier for each LED bead but also provides the necessary structural information, enabling the system to accurately track and control the color changes of each LED bead to achieve complex lighting effects.
[0106] Step S5120: Map each LED bead identified from the light chain image to the layout space to determine its corresponding spatial position information;
[0107] As mentioned earlier, the type of layout space depends on the dimensionality of information provided by the site images. If the site images only provide a two-dimensional view, the layout space is constructed as a two-dimensional space. In the two-dimensional layout space, the spatial position information of each LED is determined by (x, y) coordinate pairs in a Cartesian coordinate system.
[0108] If the on-site image includes depth information or depth information can be extracted from the video using a deep learning model, the layout space is constructed as a three-dimensional space. In the three-dimensional layout space, the spatial position information of each LED is determined by the (x, y, z) coordinates in the three-dimensional coordinate system, which reflects the actual position of the LED in the three-dimensional space, including its depth in the depth direction.
[0109] Therefore, this step actually converts and maps the spatial position information of each LED in the physical space to the layout space, so that various calculations can be performed based on the layout space to achieve various purposes and gain a computational efficiency advantage.
[0110] Step S5130: Based on the light chain images in the multiple field images, determine the corresponding display colors of each LED bead at each position along the time domain, and construct the display colors of each LED bead into a corresponding time domain color sequence in sequence.
[0111] After the layout space is successfully constructed and the spatial location information of the LED beads is mapped, the display color of the LED beads can be analyzed and recorded in the time domain, so as to capture and serialize the color displayed by each LED bead at different time points, forming a unique time domain color display sequence for each LED bead.
[0112] The identification of the time-domain color rendering sequence is based on color information extracted from the on-site images. By analyzing the emission state of each LED in the layout space at different time points in the corresponding on-site images, their color changes can be determined, and the corresponding display colors can be obtained. For example, if an LED initially displays as red in the first on-site image of the preview video, and then changes to green and blue in the second and third on-site images respectively, then the time-domain color rendering sequence of this LED can be represented as "red-green-blue". By sequentially splicing the display colors of each LED at different time points, the corresponding time-domain color rendering sequence is obtained.
[0113] Once the temporal color rendering sequence of each LED is determined, these sequences can be correlated with the spatial location information of the LEDs in the layout space for later use, providing complete data support for intelligent control and dynamic effect editing of the light chain. This data, combining spatial and temporal dimensions, can not only be used to adjust the display effect of the LEDs in real time, but also to create complex dynamic lighting scenes to meet users' needs for personalized lighting effects.
[0114] The key advantage of the above embodiments lies in their efficient processing capability of on-site images. By carefully selecting a small number of on-site images, the temporal color rendering sequence of each LED can be quickly identified with low computational load. This identification process not only reduces the demand for computing resources but also improves processing speed, enabling the system to respond quickly and accurately represent the color changes of the LEDs in the layout space. This fast and accurate mapping not only makes real-time control possible but also lays the foundation for the realization of dynamic lighting effects, greatly enhancing the practicality and flexibility of intelligent lighting systems. Using this method, even in scenarios with a large number of LEDs or complex layouts, rapid and accurate positioning of some LEDs can be achieved.
[0115] Based on any embodiment of the method in this application, a layout space corresponding to the physical space where the light chain is located is constructed based on the multiple on-site images, including:
[0116] Step S5111: Based on the depth and planar information provided by the multiple on-site images, construct a three-dimensional layout space to correspond to the physical space where the light chain is located;
[0117] The construction of a three-dimensional layout space is a technique that transforms actual physical space into a precise digital model. By using depth information captured by camera units and combining it with planar information, a three-dimensional representation of the space containing the light chain can be created. This representation includes not only the length, width, and height of the space, but also the spatial distribution and shape of the light chain.
[0118] When constructing a three-dimensional layout space, various technical means can be employed. For example, stereo vision technology can be used to calculate depth information by analyzing images captured by camera units from different angles, while planar information is directly provided by each scene image.
[0119] Once the depth and planar information are obtained, 3D modeling software or algorithms in computer graphics can be used to construct the layout space. These software or algorithms can generate 3D point clouds based on the input depth data, and then construct a mesh model that accurately represents the physical space where the light chain is located, thus obtaining the corresponding 3D layout space.
[0120] The construction of a three-dimensional layout space enables accurate mapping and positioning of LED beads within this space. This spatial model allows the terminal to simulate the physical arrangement of the light chain and even the light chain carrier in a virtual environment, providing a foundation for achieving precise LED bead control and dynamic lighting effects.
[0121] Step S5112: Create a geometric model of the light chain carrier based on the image of the light chain carrier in the multiple field images, and map the geometric model to the layout space.
[0122] After successfully constructing the three-dimensional layout space, the next step is to create the geometric model of the light chain carrier and map the model into the layout space.
[0123] First, images of the light chain carrier are extracted from multiple on-site images. These images provide information such as the shape, size, and relative position of the light chain carrier in physical space. Then, using these images and computer graphics techniques, a geometric model of the light chain carrier is constructed. The light chain carrier can be a variety of physical objects, such as Christmas trees, walls, computer screens, etc., on which the light chain decoration is placed.
[0124] In the process of constructing geometric models, techniques such as parametric modeling, surface modeling, or solid modeling can be used. Parametric modeling allows the shape of the model to be controlled by defining a set of parameters; surface modeling focuses on creating smooth surfaces; while solid modeling focuses on generating three-dimensional objects with defined volumes.
[0125] Once the geometric model is created, it can be mapped into the constructed 3D layout space. The mapping process includes determining the model's position and orientation in the layout space, ensuring that the model's position matches the position of the light chain carrier in the actual physical space. Furthermore, the model's position parameters, such as translation and rotation, can be adjusted as needed to match the spatial information extracted from the site images.
[0126] After mapping the geometric model to the layout space, the spatial position information and temporal color rendering sequence of each LED can be associated with this geometric model. This allows for different advantages at different stages. Specifically, during the LED identification stage, users can compare the differences in LED positions between this 3D layout space and physical space to decide whether necessary adjustments and re-identification are needed. In the stage where users customize lighting effects after LED identification is complete, the terminal can present a virtual environment displaying the geometric model and the light chain model. This allows for precise simulation of the physical arrangement of each LED in the light chain within the virtual environment, enabling users to precisely control the LEDs in the light chain and create lighting effects played by the light chain. For example, when defining a new lighting effect, if a user needs to adjust the color or brightness of a specific LED, they only need to rotate the corresponding geometric model to expose the corresponding LED in the graphical user interface, select the LED, and make the appropriate settings. Furthermore, the mapping of the geometric model also makes it possible to achieve complex lighting effects. For example, when designing lighting effects, the color changes of the LED beads can be arranged according to the geometry of the light chain carrier and the spatial distribution of the LED beads to create a rich variety of lighting effects.
[0127] The above embodiments significantly enhance the convenience for users when displaying and manipulating light chain displays. Utilizing a three-dimensional layout space, the physical form and spatial distribution of the light chain are presented digitally and intuitively, allowing users to clearly observe its three-dimensional shape and layout in a virtual environment. This three-dimensional representation not only enhances the visual effect but also improves the user experience, as users can directly rotate, scale, and position the geometric model of the light chain carrier in the virtual space, achieving precise adjustment and control of the light chain's shape. During the identification of individual light beads, users can more intuitively compare them with the physical space to analyze anomalies and determine whether re-identification is necessary. Furthermore, the precise mapping capability of the three-dimensional layout space allows each light bead in the light chain to be personalized according to its exact position in the physical space, creating a rich variety of lighting effects. This intuitive and highly interactive operation method greatly simplifies the light chain lighting design process, enabling users to quickly realize their creative ideas, improving design efficiency and user satisfaction.
[0128] Based on any embodiment of the method in this application, according to the serial positional relationship and spatial positional relationship between the lamp bead to be identified and the identified lamp beads in the physical layout of the light chain, the serial position identifier and its spatial positional information corresponding to the lamp bead to be identified are determined in the physical layout of the light chain, including:
[0129] Step S6100: Traverse the physical layout of the light chain to the current lamp bead to be identified in the serial direction, and determine at least two adjacent identified lamp beads that are adjacent to the current lamp bead to be identified in the serial direction.
[0130] A key step in constructing the physical layout of the light chain is identifying and determining the serial position identifiers and spatial position information of the LEDs to be identified. Given that the physical layout of the light chain already contains the serial position identifiers of each LED, this process begins with an ordered traversal of the physical layout, aiming to find at least two already identified LEDs that are adjacent to each LED in the serial direction.
[0131] Specifically, the LEDs in the physical layout of the light chain can be checked sequentially along the serial direction. During the check, once an LED to be identified is encountered, its direct neighbors can be automatically searched and identified—that is, those LEDs that have already been identified and whose spatial location information has been determined. These identified LEDs provide crucial spatial location information, forming a proximity relationship with the LED to be identified along the serial direction. For example, if there is an LED to be identified in the physical layout of the light chain, and the LEDs to its left and right have already been identified, then these two identified LEDs constitute the direct neighbors of the LED to be identified. Similarly, if there are no identified LEDs to the right of an LED to be identified, then the two or three closest identified LEDs to its left can also be considered its corresponding neighbors, serving as the basis for identifying the LED to be identified.
[0132] Step S6200: Determine the spatial addressing range of the current lamp bead to be identified based on the spatial position information of the at least two adjacent identified lamp beads and the average spacing between the lamp beads in the lamp chain in the layout space;
[0133] If at least two adjacent identified LED beads are identified, the spatial addressing range of the LED bead to be identified in the layout space needs to be determined first.
[0134] First, by utilizing the spatial location information of the identified LEDs stored in the physical layout of the light chain, the average spacing between the LEDs in the layout space can be calculated. This calculation can be accomplished by measuring and calculating the distances between multiple pairs of identified LEDs. Specifically, multiple pairs of adjacent identified LEDs are randomly selected from the layout space, or all pairs of adjacent identified LEDs are used, and the distances between them are measured. The spacing between each pair of identified LEDs is calculated based on the number of LEDs between them, and then the average of all these spacings is taken as the average spacing between LEDs. The average spacing between LEDs is a quantitative representation of the regularity of the LED arrangement in the light chain layout, reflecting the geometric arrangement characteristics between adjacent LEDs, and plays an important role in predicting the position of the LED to be identified.
[0135] Next, based on the spatial location information of the identified LEDs and the average spacing between them, the spatial addressing range of the LED to be identified can be determined. This range is determined based on the serial and spatial relationships of the LEDs.
[0136] In one embodiment, if there are already identified LEDs on both sides of the LED to be identified, the possible location of the LED to be identified can be estimated by combining the positions of these two identified LEDs in the layout space with the average spacing between the LEDs. For example, if the positions of two adjacent identified LEDs are known, and the distance between them is equal to twice the average spacing between the LEDs, it can be inferred that there is an LED to be identified between these two LEDs, and its spatial location is approximately at the midpoint of the line connecting these two LEDs. Considering that the LED chain is usually not arranged in a straight line, and errors need to be appropriately accounted for, a corresponding spatial addressing range can be set with this midpoint as the center. It is easy to understand that the distance from any point in this spatial addressing range to this midpoint does not need to exceed half the average spacing between the LEDs.
[0137] In some embodiments, if the LED to be identified has only one identified LED on one side, or is located at the edge of the LED chain, the spatial addressing range is determined based on the known LEDs on that side and the average spacing between the LEDs. For example, if the LED to be identified has only three identified LEDs on the left side, the spatial addressing range of the LED to be identified can be determined by extending to the right in the serial direction based on the positions of these known LEDs in the layout space and the average spacing between the LEDs, following the orientation of these three identified LEDs in the layout space.
[0138] Furthermore, for multiple LEDs to be identified arranged consecutively in a light chain, the area containing them can be segmented based on their positional relationship in the serial direction and the average spacing between the LEDs determined solely by the identified LEDs on either side of them. The possible spatial addressing range can then be determined at the dividing point between each pair of segments. This not only improves search efficiency but also ensures the continuity and integrity of the layout.
[0139] Therefore, based on the spatial location information of the identified LED beads and the average spacing between the LED beads, and according to the spatial and serial positional relationships between the LED bead to be identified and its adjacent identified LED beads implied by the inherent geometric characteristics of the LED bead arrangement in the LED chain, the spatial addressing range corresponding to each LED bead to be identified can be determined.
[0140] Step S6300: Determine the spatial location information of the time-domain color rendering sequence and the time-domain color rendering sequence of the adjacent identified LED beads within the spatial addressing range, which satisfy a preset arrangement relationship;
[0141] The LED beads to be identified in this step have a constant display color in their time-domain color rendering sequence, meaning the color does not change sequentially. During the process of pre-setting the time-domain color rendering sequence before constructing the color rendering playback command, the display color of each LED bead already constitutes a preset arrangement relationship. This step analyzes, within the spatial addressing range, whether each possible LED bead to be identified corresponds to the serial position identifier to be identified in the physical layout of the LED chain, based on this preset arrangement relationship. That is, there may be multiple spatial position information corresponding to constant colors within the spatial addressing range, and each spatial position information may correspond to one LED bead to be identified. However, only spatial position information whose display color satisfies the preset arrangement relationship with the time-domain color rendering sequence of adjacent identified LED beads is the spatial position information corresponding to this serial position identifier. Comparing the display color of the LED bead to be identified with the display colors of its adjacent identified LED beads sequentially is prone to errors. Therefore, the constant display color of the LED bead to be identified can be compared with the entire time-domain color rendering sequence of its adjacent identified LED beads to determine whether they satisfy the preset arrangement relationship.
[0142] It is important to emphasize that the time-domain color rendering sequence of the LED beads to be identified is constant, meaning that the colors displayed by these LED beads will not change at different points in time. At the same time, the time-domain color rendering sequence of the identified LED beads is known, and the color rendering mode of each LED bead has been set according to a preset arrangement when constructing the color rendering playback command.
[0143] In practice, the system will analyze the temporal color sequence of each possible spatial location within the defined spatial addressing range. Specifically, it can compare the constant display color with the color changes of adjacent identified LEDs throughout the entire time domain. For example, if an LED to be identified always displays blue, while its adjacent identified LEDs display red, green, and yellow in a preset sequence at different times, the terminal will check whether this blue color conforms to the specific order or pattern requirements of these colors in the preset arrangement.
[0144] Step S6400: Set the spatial location information as the spatial location information associated with the serial position identifier of the currently identified lamp bead in the physical layout of the lamp chain, so that the currently identified lamp bead becomes an identified lamp bead.
[0145] Through the above steps, the spatial position information of the LED bead to be identified represented by the serial position identifier that is currently being traversed can be deduced. This spatial position information is associated with the serial position identifier and written into the physical layout of the LED chain, which is actually to identify the LED bead to be identified as an identified LED bead.
[0146] The above embodiments further demonstrate the technical advantages reflected in the construction of the physical layout of the light chain, including:
[0147] First, the identification of the LED beads is achieved by traversing the physical layout of the LED chain. The efficiency of this method lies in its ability to systematically and orderly process each LED bead, ensuring the comprehensiveness and continuity of the identification process. Through this traversal mechanism, the LED bead to be identified can be quickly located, and known information about already identified LED beads can be effectively utilized, thus significantly improving identification efficiency.
[0148] Secondly, the mathematical analysis and calculation combining spatial and sequential positional relationships not only reduces reliance on complex image processing techniques but also lowers computational complexity. This method achieves rapid identification of LED positions by directly comparing and calculating the relative positions between identified and unidentified LEDs. This geometrically based analysis method simplifies the identification process, improves identification speed, and ensures the accuracy of the identification results.
[0149] Furthermore, within the spatial addressing range, this method prioritizes time-domain color rendering sequences that can identify constant colors. Since the display colors of these LEDs to be identified are constant over time, they provide a reliable reference point for comparison with the time-domain color rendering sequences of adjacent identified LEDs. By checking whether these LEDs with constant colors meet a preset arrangement relationship, this method can efficiently and accurately determine their spatial position in the layout. The advantage of this method is that it utilizes the constancy of LED colors, reducing the complexity caused by color changes, thereby improving the accuracy and efficiency of identification.
[0150] Finally, by associating the identified spatial location information with the corresponding serial position identifier, this method not only achieves rapid and accurate identification of the LED beads to be identified, but also provides a solid foundation for improving the physical layout of the LED chain. The implementation of this method not only improves the accuracy of LED bead identification, but also optimizes the data processing flow and enhances the system's adaptability and robustness to complex environments.
[0151] Based on any embodiment of the method in this application, the spatial addressing range of the current LED to be identified is determined according to the spatial position information of the at least two adjacent identified LEDs and the average spacing between the identified LEDs, including: Step S6211, determining the spacing between two adjacent LEDs according to the spatial distance between each pair of adjacent identified LEDs in the layout space and the number of LEDs arranged in a preset pattern within the spatial distance, and determining the average spacing between LEDs according to the distance between each pair of LEDs; Step S6212, determining the midpoint of the line distance between the two adjacent identified LEDs in the layout space according to the spatial position information of the two adjacent identified LEDs; Step S6213, drawing a circle with the midpoint of the line distance as the center and the average spacing between LEDs as the diameter, to determine the unique spatial addressing range corresponding to the current LED to be identified between the two adjacent identified LEDs.
[0152] This embodiment establishes an efficient and accurate method for determining the spatial addressing range of the LED to be identified by precisely measuring the spatial distance between identified LEDs and calculating the average spacing. Through step S6211, the system can calculate the standard spacing between adjacent LEDs based on known LED arrangement patterns, thus providing a quantitative reference for the regular arrangement of LEDs within the layout space. Step S6212 further refines the search area by determining the midpoint between two adjacent identified LEDs, narrowing the search focus to the area most likely to contain the LED to be identified. Finally, in step S6213, a circular area is drawn using the midpoint as the center and the average spacing between LEDs as the diameter, clearly defining a specific search range and greatly improving the efficiency and accuracy of identifying the LED to be identified. Overall, the advantage of this method lies in its systematic utilization of the serial and spatial positional relationships represented by the LED arrangement patterns. Through mathematical and geometric principles, it optimizes the search and positioning process of the LED to be identified, reduces computational resource consumption, accelerates the identification speed, and improves the accuracy and reliability of the entire LED chain physical layout generation process.
[0153] Based on any embodiment of the method in this application, the spatial addressing range of the current lamp bead to be identified is determined according to the spatial position information of the at least two adjacent identified lamp beads and the average spacing between the identified lamp beads, including: Step S6231, determining the spacing between two adjacent lamp beads according to the spatial distance between each two adjacent identified lamp beads in the layout space and the number of lamp beads arranged in a preset pattern within the spatial distance, and determining the average spacing between lamp beads according to the distance between each two lamp beads; Step S6232, determining the extension point by drawing a line with the slope and the average spacing between lamp beads according to the slope of the line connecting each three adjacent identified lamp beads in the layout space; Step S6233, determining the spatial addressing range corresponding to the current lamp bead to be identified in the side direction of the edge identified lamp bead by drawing a circle with the extension point as the center and the average spacing between lamp beads as the diameter.
[0154] This embodiment demonstrates technical advantages in determining the spatial addressing range of the LED beads to be identified. First, by measuring the actual spatial distance between adjacent identified LED beads and combining this with a preset number of LED beads, the average spacing between the beads is accurately calculated, providing a precise reference for subsequent positioning. Next, using the slope of the line connecting three adjacent identified LED beads, combined with the average spacing, the extension point is determined. This innovative method not only considers the linear arrangement characteristics of the LED beads but also cleverly utilizes spatial geometric relationships to assist in positioning. Finally, a circular area is drawn with the extension point as the center and the average spacing as the diameter, effectively defining the possible locations of the LED beads to be identified. This method significantly improves the accuracy of positioning and search efficiency. Overall, this embodiment optimizes the search and positioning process of the LED beads to be identified by combining the arrangement patterns and spatial geometric characteristics of the LED beads, reducing the consumption of computational resources, accelerating the identification speed, and improving the accuracy and reliability of the entire LED chain physical layout generation.
[0155] Based on any embodiment of the method in this application, according to the serial positional relationship and spatial positional relationship between the lamp bead to be identified and the identified lamp bead in the physical layout of the light chain, the serial position identifier and its spatial positional information corresponding to the lamp bead to be identified are determined in the physical layout of the light chain, so that the lamp bead to be identified becomes the identified lamp bead, including:
[0156] Step S7100: Construct feature vectors of all identified LED beads as samples. The feature vectors include serial position identifiers and spatial position information of the identified LED beads in the physical layout of the LED chain.
[0157] During the construction of the physical layout of the light chain, due to the limitations of image analysis technology, light-emitting points that do not actually belong to LEDs may appear, forming corresponding spatial position information in the layout space. Furthermore, this spatial position information may be misidentified as data corresponding to a serial position identifier, resulting in incorrectly identified LEDs in the physical layout of the light chain. In this case, clustering algorithms can be used to identify these misidentified LEDs.
[0158] To leverage the clustering algorithm, a corresponding feature vector can be constructed for all identified LEDs in the physical layout of the light chain. This feature vector meticulously records the serial position identifier and spatial location information of each identified LED in the physical layout of the light chain, providing a unique mathematical representation for each identified LED.
[0159] The feature vector is constructed by encoding the serial position identifier and spatial position information of the identified LED beads. For example, if the light chain consists of a series of sequentially arranged LED beads, the serial position identifier of each LED bead can be simply represented by its position number in the light chain. At the same time, the spatial position information of each LED bead can be determined by its coordinates in three-dimensional space, such as using an (x, y, z) coordinate system.
[0160] Step S7200: Cluster all the samples using a clustering algorithm to identify outliers, and delete the spatial location information of the identified LED beads corresponding to the outliers from the physical layout of the light chain.
[0161] After obtaining each feature vector, each feature vector can be used as a sample for cluster analysis. Clustering algorithms can then be applied to analyze these feature vectors to identify and process LED beads that may be misidentified due to image analysis errors or other reasons.
[0162] Clustering algorithms are unsupervised learning methods that group samples in a dataset based on feature similarity without requiring pre-labeled tags. In this embodiment, the clustering algorithm is used to analyze the feature vector sample set of identified LED beads, with the aim of discovering and identifying outliers that are significantly different from the majority of samples.
[0163] In practice, clustering algorithms calculate the similarity or distance between each feature vector and divide them into several clusters based on these similarities. Each cluster represents a group of identified LEDs that are close to each other in the feature space. Outliers are those samples whose distance from any cluster exceeds a preset threshold; they may represent misidentified LEDs.
[0164] Once these outlier samples are identified, their corresponding spatial location information can be removed from the physical layout of the light chain, thus eliminating potential erroneous data. Furthermore, the corresponding spatial location information within the layout space can be deleted to clear the relevant points. This process purifies the physical layout and spatial data of the light chain, ensuring the accuracy and reliability of the layout. Subsequently, the LEDs with their spatial location information removed from the physical layout will revert to a state ready for identification, allowing for a re-identification and repositioning process.
[0165] This embodiment demonstrates significant technical advantages in constructing the physical layout of the light chain through the application of clustering algorithms. First, as an unsupervised learning method, clustering algorithms can effectively process large amounts of data, automatically identifying and distinguishing normal LEDs from misidentified light sources, thereby improving the data accuracy of the light chain physical layout. Second, clustering analysis can quickly identify outliers—samples that are significantly different from other samples in the feature space, likely due to image analysis errors or environmental interference. By deleting the spatial location information corresponding to these outliers, the system not only eliminates potential erroneous data but also enhances robustness to anomalies. Furthermore, the application of clustering algorithms improves data processing efficiency because it allows the system to automatically identify and correct errors without manual intervention. Finally, this method ensures continuous updating and optimization of the light chain physical layout by re-identifying and repositioning the LEDs whose spatial location information has been removed. Therefore, the application of clustering algorithms can automatically detect and correct potential identification errors, ensuring the high quality and reliability of the light chain physical layout and providing users with a precise and reliable lighting control system.
[0166] Based on any embodiment of the method in this application, a clustering algorithm is used to cluster all the samples to identify outliers. After deleting the spatial location information of the identified LED beads corresponding to the outliers from the physical layout of the light chain, the method includes:
[0167] Step S8100: Traverse the physical layout of the light chain in the serial direction order, determine that at least one lamp bead to be identified with consecutive serial position identifiers constitutes a set of missing lamp beads, and determine the number of segments corresponding to the number of missing lamp beads in the set of missing lamp beads.
[0168] After removing the spatial location information of outliers using clustering algorithms, the set of missing LEDs in the physical layout of the light chain can be further processed. This set of missing LEDs mainly includes those whose spatial location information cannot be effectively determined through other methods. These missing LEDs may be those that image analysis algorithms cannot accurately identify, or they may be occluded LEDs that cannot be displayed in multiple on-site images.
[0169] Specifically, based on the physical layout of the light chain, the system traverses the layout sequentially in the serial direction to identify at least one LED with consecutive serial position markers. These consecutive LEDs constitute a set of missing LEDs. For example, if a series of consecutive LEDs without assigned spatial position information are found in the light chain's physical layout, these LEDs form a set of missing LEDs. The number of missing LEDs in this set is counted, and this number directly relates to the number of segments to be processed in subsequent steps.
[0170] After identifying the set of missing LED beads, the number of segments in this set is further determined, based on the number of missing LED beads. For example, if the set of missing LED beads contains N unidentified LED beads, the corresponding number of segments is N+1. If N is 4, then the corresponding number of segments is 5. This means that the missing segments between two adjacent identified LED beads on both sides of this set need to be divided into 5 segments on average. The dividing points between segments are then considered as the locations of the corresponding LED beads to be identified, in order to determine the corresponding spatial location information.
[0171] Step S8200: Based on the spatial position information of the identified LEDs on both sides of the missing LED in its serial direction, determine the missing LED segment in the layout space;
[0172] Since there are corresponding identified LEDs on both sides of the missing LED set, the missing LED segment is determined using the spatial position information of these two identified LEDs. These two identified LEDs serve as reference points, and the line connecting them in the layout space represents the missing LED segment. It's easy to understand that the missing LED segment can be determined by the spatial position information of these two identified LEDs, which can be approximated by the straight-line distance between the two identified LEDs in the layout space.
[0173] Step S8300: Divide the missing segments of the LED beads into equal segments according to the number of segments, and determine the spatial location information corresponding to each segmentation point;
[0174] After identifying the missing segments, the missing segments are equally divided according to the previously determined number of segments. Equal division means dividing the missing LED segment into several equal parts, with the dividing point between each two parts representing the potential location of a missing LED. For example, if the missing LED set contains four unidentified LEDs, the system will divide the missing LED segment into five equal parts, with each dividing point between two equal parts corresponding to the location of a missing LED. This location's spatial position information in the layout space constitutes the spatial position information of the missing LED.
[0175] Step S8400: Associate the spatial location information of each segmentation point with the serial position identifier of each missing LED in the physical layout of the light chain.
[0176] Once the spatial location information of each missing LED is determined, its spatial location information can be associated with the serial position identifier of the corresponding sequence of the missing LED and written into the physical layout of the LED chain. In effect, the missing LED is identified as an identified LED.
[0177] This embodiment, after applying a clustering algorithm, further combines it with a strategy for handling missing LED sets, achieving efficient and accurate construction of the physical layout of the light chain. The clustering algorithm effectively eliminates outliers and purifies the data, while the systematic processing of missing LED sets allows for the inference of the spatial location information of missing LEDs from known identified LED information, even in the absence of direct visual information. This method not only improves the accuracy and robustness of LED identification but also optimizes the data processing flow, accelerates the layout construction speed, and thus completes the construction of the physical layout of the light chain, maintaining the continuity and integrity of the layout even when some LEDs are invisible or cannot be analyzed. This demonstrates the technical advantages of this application in generating the physical layout of the light chain, providing a fast, accurate, and user-friendly solution.
[0178] Referring to Figure 3, another embodiment of this application also provides a light chain physical layout generation device, which includes an image analysis module 5100, a layout creation module 5200, a confidence recognition module 5300, and an inference recognition module 5400. The image analysis module 5100 is configured to identify the temporal color rendering sequence of each LED in a light chain image and its spatial position information in a layout space constructed based on multiple on-site images of the light chain. The layout creation module 5200 is configured to create a physical layout of the light chain, used to describe the serial position identifier of each LED in the light chain and its position in the layout space. The confidence recognition module 5300 is configured to determine the unique serial position identifier of a lamp bead whose color changes according to the time-domain color rendering sequence, and associate the spatial position information of the lamp bead with the corresponding spatial position information in the lamp chain physical layout, so that the lamp bead becomes an identified lamp bead; the inference recognition module 5400 is configured to determine the serial position identifier and spatial position information corresponding to the lamp bead to be identified in the lamp chain physical layout according to the serial position relationship and spatial position relationship between the lamp bead to be identified and the identified lamp bead in the lamp chain physical layout, so that the lamp bead to be identified becomes an identified lamp bead.
[0179] Based on any embodiment of the device in this application, the light chain physical layout generation device of this application further includes: an instruction construction module, configured to construct multiple color display playback instructions corresponding to multiple time sequences in the time-domain color display sequence according to the serial position identifier of each lamp bead in the serial structure information of the light chain and the corresponding time-domain color display sequence; a color display playback module, configured to send the multiple color display playback instructions to the light chain according to the multiple time sequences, so as to control each lamp bead in the light chain to display the corresponding color of light according to its corresponding time-domain color display sequence; and an image preview module, configured to acquire a preview video of the light chain through a camera unit, and extract multiple image frames from the preview video corresponding to the multiple time sequences as the on-site image of the light chain.
[0180] Based on any embodiment of the device in this application, the image analysis module 5100 includes: a space construction module, configured to construct a layout space corresponding to the physical space where the light chain is located based on the multiple on-site images; a position determination module, configured to map each LED bead identified from the light chain image to the layout space to determine its corresponding spatial position information; and a time domain analysis module, configured to determine the display colors corresponding to each LED bead at each position along the time domain based on the light chain image in the multiple on-site images, and construct a corresponding time domain color sequence for the display colors of each LED bead in sequence.
[0181] Based on any embodiment of the device in this application, the space construction module includes: a space mapping module, configured to construct a three-dimensional layout space based on the depth and planar information provided by the multiple on-site images, for corresponding to the physical space where the light chain is located; and a model projection module, configured to create a geometric model of the light chain carrier based on the image of the light chain carrier in the multiple on-site images, and map the geometric model to the layout space.
[0182] Based on any embodiment of the device in this application, the inference and identification module 5400 includes: a current determination module, configured to traverse the physical layout of the light chain to the current lamp bead to be identified in a serial direction, and determine at least two adjacent identified lamp beads that are adjacent to the current lamp bead to be identified in the serial direction; a range determination module, configured to determine the spatial addressing range of the current lamp bead to be identified based on the spatial position information of the at least two adjacent identified lamp beads and the average lamp bead spacing between lamp beads in the light chain in the layout space; a color rendering addressing module, configured to determine the spatial position information within the spatial addressing range where the time-domain color rendering sequence and the time-domain color rendering sequence of the adjacent identified lamp beads satisfy a preset arrangement relationship; and a current identification module, configured to set the spatial position information as the spatial position information associated with the serial position identifier of the current lamp bead to be identified in the physical layout of the light chain, so that the current lamp bead to be identified becomes an identified lamp bead.
[0183] Based on any embodiment of the device in this application, the inference and identification module 5400 includes: a spacing determination module, configured to determine the spacing between two adjacent LED beads based on the spatial distance between each pair of adjacent identified LED beads in the layout space and the number of LED beads arranged in a preset pattern within the spatial distance, and to determine the average spacing between LED beads based on the distance between each pair of LED beads; a midpoint determination module, configured to determine the midpoint of the line distance between the two adjacent identified LED beads in the layout space based on the spatial position information of the two adjacent identified LED beads; and a circle drawing determination module, configured to draw a circle with the midpoint of the line distance as the center and the average spacing between LED beads as the diameter, to determine the unique spatial addressing range corresponding to the currently identified LED bead between the two adjacent identified LED beads.
[0184] Based on any embodiment of the device in this application, the inference and identification module 5400 includes: a spacing determination module, configured to determine the spacing between two adjacent LED beads based on the spatial distance between each two adjacent identified LED beads in the layout space and the number of LED beads arranged in a preset pattern within the spatial distance, and to determine the average spacing between LED beads based on the distance between each pair of LED beads; a fixed-point processing module, configured to determine an extension point based on the slope corresponding to the line connecting each three adjacent identified LED beads in the layout space, using the edge identified LED bead among the three identified LED beads as the base point, and drawing a line according to the slope and the average spacing between LED beads; and a line drawing determination module, configured to draw a circle with the extension point as the center and the average spacing between LED beads as the diameter, and determine the spatial addressing range corresponding to the currently identified LED bead in the side direction of the edge identified LED bead.
[0185] Based on any embodiment of the device in this application, the inference and identification module 5400 includes: a sample construction module, configured to construct feature vectors of all identified LED beads as samples, wherein the feature vectors include serial position identifiers and spatial position information of the identified LED beads in the physical layout of the light chain; and a clustering and screening module, configured to cluster all the samples using a clustering algorithm, identify outlier samples, and delete the spatial position information of the identified LED beads corresponding to the outlier samples from the physical layout of the light chain.
[0186] Based on any embodiment of the device in this application, the inference and identification module 5400 includes: a missing search module, configured to traverse the physical layout of the light chain in a serial direction, determine that at least one LED bead with consecutive serial position identifiers constitutes a missing LED bead set, and determine the number of segments corresponding to the number of missing LED beads in the missing LED bead set; a segment determination module, configured to determine the missing LED bead segment in the layout space based on the spatial position information of the identified LED beads on both sides of the missing LED bead in its serial direction; a segmentation and positioning module, configured to equally divide the missing LED bead segment according to the number of segments, and determine the spatial position information corresponding to each segmentation point; and a missing completion module, configured to associate the spatial position information of each segmentation point with the serial position identifier of each missing LED bead in the physical layout of the light chain.
[0187] Based on any embodiment of this application, referring to Figure 4, another embodiment of this application also provides a computer device that can be used as a controller in an ambient lighting device. Figure 4 shows a schematic diagram of the internal structure of the computer device. The computer device includes a processor, a computer-readable storage medium, a memory, and a network interface connected via a system bus. The computer-readable storage medium stores an operating system, a database, and a computer program encapsulating computer-readable instructions. The database may store a sequence of control information. When the computer-readable instructions are executed by the processor, the processor can implement a method for generating a light chain physical layout. The processor of the computer device provides computing and control capabilities to support the operation of the entire computer device. The memory of the computer device may store computer-readable instructions. When the computer-readable instructions are executed by the processor, the processor can execute the light chain physical layout generation method of this application. The network interface of the computer device is used for communication with a terminal. Those skilled in the art will understand that the structure shown in Figure 4 is merely a block diagram of a portion of the structure related to the solution of this application and does not constitute a limitation on the computer device to which the solution of this application is applied. A specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.
[0188] In this embodiment, the processor executes the specific functions of each module and its sub-modules in Figure 3, and the memory stores the program code and various types of data required to execute the above modules or sub-modules. The network interface is used for data transmission between the user terminal and the server. In this embodiment, the memory stores the program code and data required to execute all modules / sub-modules in the light chain physical layout generation device of this application, and the server can call the server's program code and data to execute the functions of all sub-modules.
[0189] This application also provides a storage medium storing computer-readable instructions, which, when executed by one or more processors, cause the one or more processors to perform the steps of the light chain physical layout generation method described in any embodiment of this application.
[0190] This application also provides a computer program product, including a computer program / instructions that, when executed by one or more processors, implement the steps of the light chain physical layout generation method described in any embodiment of this application.
Claims
1. A method for generating the physical layout of a light chain, characterized in that, include: Based on multiple on-site images of the light chain, the temporal color rendering sequence of each LED in the light chain image is identified, as well as its spatial position information in the layout space constructed based on the on-site images. Create a physical layout for the light chain, which describes the serial position identifier of each lamp in the light chain and its corresponding spatial position information in the layout space; For LED beads whose color changes according to the time-domain color rendering sequence, a unique serial position identifier is determined based on the time-domain color rendering sequence of the LED bead, and the spatial position information of the LED bead is associated with it in the physical layout of the LED chain, so that the LED bead becomes an identified LED bead. Based on the serial and spatial positional relationships between the lamp beads to be identified and the identified lamp beads in the physical layout of the light chain, the serial position identifier and spatial position information corresponding to the lamp bead to be identified are determined in the physical layout of the light chain, so that the lamp bead to be identified becomes the identified lamp bead.
2. The method for generating the physical layout of the light chain according to claim 1, characterized in that, Based on multiple on-site images of the light chain, the temporal color rendering sequence of each LED within the light chain image is identified, and before the spatial position information in the layout space constructed based on the on-site images, the process includes: Based on the serial position identifier of each LED bead and the corresponding time-domain color rendering sequence in the serial structure information of the light chain, construct multiple color rendering playback instructions corresponding to multiple time sequences in the time-domain color rendering sequence. According to the multiple time sequences, the multiple color display instructions are sent to the light chain to control each lamp in the light chain to display the corresponding color light according to its corresponding time domain color display sequence; The camera unit acquires a preview video of the light chain, and extracts multiple image frames from the preview video corresponding to the multiple time sequences, which are used as on-site images of the light chain.
3. The method for generating the physical layout of the light chain according to claim 1, characterized in that, Based on multiple on-site images of the light chain, the temporal color rendering sequence of each LED in the light chain image is identified, as well as its spatial position information in a layout space constructed based on the on-site images, including: Construct a layout space corresponding to the physical space where the light chain is located based on the multiple on-site images; Each LED bead identified from the light chain image is mapped to the layout space to determine its corresponding spatial position information; Based on the light chain images in the multiple field images, the corresponding display colors of each LED at each position are determined along the time domain, and the display colors of each LED are constructed into a corresponding time domain color sequence in sequence.
4. The method for generating the physical layout of the light chain according to claim 3, characterized in that, Based on the multiple on-site images, a layout space corresponding to the physical space where the light chain is located is constructed, including: Based on the depth and planar information provided by the multiple on-site images, a three-dimensional layout space is constructed to correspond to the physical space where the light chain is located; A geometric model of the light chain carrier is created based on the images of the light chain carrier in the multiple field images, and the geometric model is mapped to the layout space.
5. The method for generating the physical layout of a light chain according to any one of claims 1 to 4, characterized in that, Based on the serial and spatial positional relationships between the LED beads to be identified and the identified LED beads in the physical layout of the light chain, the serial position identifier and spatial position information corresponding to the LED bead to be identified are determined in the physical layout of the light chain, including: Traverse the physical layout of the light chain in the serial direction to the current lamp bead to be identified, and determine at least two adjacent identified lamp beads that are adjacent to the current lamp bead in the serial direction. Based on the spatial location information of at least two adjacent identified LED beads and the average spacing between LED beads in the LED chain in the layout space, the spatial addressing range of the current LED bead to be identified is determined. Within the spatial addressing range, determine the spatial location information of the time-domain color rendering sequence and the time-domain color rendering sequence of the adjacent identified LED beads that satisfy a preset arrangement relationship; The spatial location information is set as the spatial location information associated with the serial position identifier of the currently identified lamp bead in the physical layout of the light chain, so that the currently identified lamp bead becomes an identified lamp bead.
6. The method for generating the physical layout of a light chain according to claim 5, characterized in that, Based on the spatial location information of at least two adjacent identified LEDs and the average spacing between the identified LEDs, the spatial addressing range of the LED to be identified is determined, including: Based on the spatial distance between each pair of adjacent identified LED beads in the layout space and the number of LED beads arranged in a preset pattern within that spatial distance, the spacing between two adjacent LED beads is determined, and the average spacing between LED beads is determined based on the distance between each pair of LED beads. Based on the spatial position information of two adjacent identified LED beads, determine the midpoint of the line distance between the two adjacent identified LED beads in the layout space; Using the midpoint of the distance between the lines as the center and the average spacing between the LED beads as the diameter, a circle is drawn to determine the unique spatial addressing range corresponding to the currently unidentified LED bead between the two adjacent identified LED beads.
7. The method for generating the physical layout of a light chain according to claim 5, characterized in that, Based on the spatial location information of at least two adjacent identified LEDs and the average spacing between the identified LEDs, the spatial addressing range of the LED to be identified is determined, including: Based on the spatial distance between each pair of adjacent identified LED beads in the layout space and the number of LED beads arranged in a preset pattern within that spatial distance, the spacing between two adjacent LED beads is determined, and the average spacing between LED beads is determined based on the distance between each pair of LED beads. Based on the slope of the line connecting every three adjacent identified LED beads in the layout space, and taking the edge identified LED bead among the three identified LED beads as the base point, the extension point is determined by drawing a line according to the slope and the average spacing between the LED beads. Using the extension point as the center and the average spacing between the LED beads as the diameter, draw a circle to determine the spatial addressing range corresponding to the currently identified LED bead in the side direction of the edge-identified LED bead.
8. The method for generating the physical layout of a light chain according to any one of claims 1 to 4, characterized in that, Based on the serial and spatial positional relationships between the LED beads to be identified and the identified LED beads in the physical layout of the light chain, the serial position identifier and spatial position information corresponding to the LED bead to be identified are determined in the physical layout of the light chain, so that the LED bead to be identified becomes an identified LED bead, including: Construct feature vectors for all identified LED beads as samples. The feature vectors include the serial position identifiers and spatial position information of the identified LED beads in the physical layout of the LED chain. Clustering algorithms are used to cluster all the samples to identify outliers, and the spatial location information of the identified LED beads corresponding to the outliers is removed from the physical layout of the light chain.
9. The method for generating the physical layout of a light chain according to claim 8, characterized in that, Clustering algorithms are used to cluster all the samples to identify outliers. After removing the spatial location information of the identified LED beads corresponding to the outliers from the physical layout of the light chain, the process includes: Traverse the physical layout of the light chain in the serial direction, determine that at least one unidentified light bead with consecutive serial position markers constitutes a set of missing light beads, and determine the number of segments corresponding to the number of missing light beads in the set. Based on the spatial position information of the identified LEDs on both sides of the missing LED in its serial direction, the missing LED segment is determined in the layout space; The missing segments of the LED beads are equally divided according to the number of segments, and the spatial location information corresponding to each segmentation point is determined. The spatial location information of each segmentation point is associated with the serial position identifier of each missing LED in the physical layout of the light chain.
10. A device for generating the physical layout of a light chain, characterized in that, include: The image analysis module is configured to identify the temporal color rendering sequence of each LED in the light chain image based on multiple on-site images of the light chain, as well as its spatial position information in the layout space constructed based on the on-site images. The layout creation module is set to create a physical layout for the light chain, which describes the serial position identifier of each lamp in the light chain and its corresponding spatial position information in the layout space. The confidence recognition module is configured to identify LED beads whose colors change according to the time-domain color rendering sequence. Based on the time-domain color rendering sequence of the LED bead, it determines its unique serial position identifier and associates the spatial position information of the LED bead in the physical layout of the LED chain, so that the LED bead becomes an identified LED bead. The inference and identification module is configured to determine the serial position identifier and spatial position information corresponding to the lamp bead to be identified in the physical layout of the light chain based on the serial position relationship and spatial position relationship between the lamp bead to be identified and the lamp bead already identified, so that the lamp bead to be identified becomes the lamp bead already identified.
11. A computer device comprising a central processing unit and a memory, characterized in that, The central processing unit is used to invoke and run a computer program stored in the memory to perform the steps of the method as described in any one of claims 1 to 9.
12. A computer program product, comprising a computer program or computer instructions, characterized in that, When the computer program or computer instructions are invoked and executed by the central processing unit, the steps of the method as described in any one of claims 1 to 9 are performed.
Citation Information
Patent Citations
Method for determining three-dimensional position of plurality of lighting devices
CN116057572A
Atmosphere lamp equipment, light-emitting partition layout generation method and device and computer equipment
CN117528873A
Method and device for generating physical layout of lamp chain, equipment and product
CN118470284A
Efficient, High-Resolution System and Method to Detect Traffic Lights
US20170206427A1