Ambient lighting device, light-emitting zone layout and construction and generation methods therefor
By analyzing the light strip image, determining the shape path and lamp position of the luminous light strip, constructing the light strip model and generating the luminous partition layout, the problem of low color distribution projection efficiency of the luminous light strip in the prior art is solved, and the configuration efficiency and user experience of the ambient light equipment are improved.
Patent Information
- Application Number
- PCT/CN2024/136088
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-01-04
- Filing Date
- 2024-12-02
- Publication Date
- 2025-07-10
AI Technical Summary
In existing ambient light equipment, the color distribution projection efficiency of the luminous light belt is low, and the reliance on manual design leads to inefficiency.
By determining the modeling path and light position of the luminous light strip based on the light strip image analysis, the light strip model is constructed and displayed in the interface canvas. The user can edit the light position and generate the luminous partition layout in response to the layout construction instruction.
It realizes efficient configuration of luminous light belts, improving the configuration efficiency and user operation experience of ambient light equipment.
Smart Images

Figure CN2024136088_10072025_PF_FP_ABST
Abstract
Description
Atmosphere lighting equipment and luminous zone layout and structure generation method Technical Field
[0001] The present application relates to the field of lighting control, and in particular to an atmosphere lamp device and a light zoning layout construction method, device, computer device, computer-readable storage medium, and computer program product. Background Art
[0002] In an ambient lighting device, a light strip is used as the lamp body responsible for emitting light and creating an atmosphere. Due to its flexibility, the light strip can be bent and shaped into various desired shapes, such as flowers, clouds, or other patterns. When a corresponding lighting effect is required through the light strip, the lighting effect can provide a color distribution based on materials such as reference images, and this color distribution can be projected onto the light strip. The various light-emitting units in the light strip work together to play the corresponding lighting effect, displaying the corresponding color distribution and creating an atmosphere of light.
[0003] To support the projection of color distribution onto light strips, it is necessary to know the positional distribution of each light unit in the light strip on the pattern plane formed by the light strip. When the color distribution needs to be projected, the projection can be achieved by comparing this positional distribution. The method of determining this positional distribution is often achieved through manual design, which is significantly inefficient. Summary of the Invention
[0004] The purpose of this application is to provide an atmosphere lamp device and a light zoning layout construction method, device, computer device, computer-readable storage medium and computer program product.
[0005] According to one aspect of the present application, a method for constructing a light-emitting partition layout is provided, comprising:
[0006] Determine a shaping path of the light strip and a plurality of light positions in the shaping path based on the light strip image;
[0007] Constructing a light strip model representing the modeling path and each of the light positions, and displaying it on the interface canvas for user editing;
[0008] In response to the layout construction instruction, the sequential position information of each light position determined with reference to the interface canvas in the light strip model is constructed into a light-emitting partition layout of the light strip.
[0009] According to one aspect of the present application, a method for constructing a light-emitting partition layout is provided, comprising:
[0010] Constructing a shape path of the light strip in the light strip image and a light strip model of each light position in the shape path according to the light strip image, and displaying them on the interface canvas;
[0011] Respond to the light position calibration instruction and determine that the light position specified by the instruction is a valid light position;
[0012] In response to the layout generation instruction, the sequential position information of each valid light position determined in the light strip model with reference to the interface canvas is constructed as a light-emitting partition layout of the light strip.
[0013] According to another aspect of the present application, an atmosphere light device is provided, comprising a controller and at least one luminous light strip, wherein the controller is configured to receive a luminous partition layout generated by the luminous partition layout construction method, and control the luminous light strip to play a lighting effect according to the luminous partition layout.
[0014] According to another aspect of the present application, a computer device is provided, comprising a central processing unit and a memory, wherein the central processing unit is configured to call and run a computer program stored in the memory to execute the steps of the light-emitting partition layout construction method.
[0015] According to another aspect of the present application, a non-volatile readable storage medium is provided, which stores a computer program in the form of computer-readable instructions, and when the computer program is called and executed by a computer, the steps of the above method are executed.
[0016] According to another aspect of the present application, a computer program product includes a computer program. When the computer program is executed by a processor, the steps of the above method are implemented. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] FIG1 is a schematic diagram of the electrical structure of an exemplary ambient light device of the present application, wherein the light strip of the ambient light device is shaped like a kettle to indicate that it can be molded into any shape;
[0018] FIG2 is a schematic flow chart of a method for constructing a light-emitting zone layout in one embodiment of the present application;
[0019] Figures 3, 4, and 5 are exemplary graphical user interfaces, wherein Figure 3 shows a camera preview interface displaying an image of a light strip; Figure 4 shows a light strip model located within the interface canvas, which indicates the shaping path of the light strip shown in Figure 3 and the various light positions therein; Figure 5 shows a manual shaping path confirmed by user connection after entering the manual editing mode corresponding to manual connection based on the light strip model in Figure 4, with the light positions covered by the shaping path being confirmed as valid light positions;
[0020] FIG6 is a schematic diagram of a process for determining a shaping path and each light position according to a light strip image in an embodiment of the present application;
[0021] FIG7 is a schematic diagram of a process for constructing and displaying a light strip model in an embodiment of the present application;
[0022] FIG8 is a schematic diagram of a process for constructing a light-emitting zone layout in an embodiment of the present application;
[0023] FIG9 is a schematic flow chart of a method for constructing a light-emitting zone layout in another embodiment of the present application;
[0024] Figures 10, 11, 12, 13, and 14 are all exemplary graphical user interfaces, wherein Figure 11 shows a camera preview interface to display a light strip image; Figure 11 shows a light strip model located in the interface canvas, which indicates the shaping path of the light strip shown in Figure 3 and each lamp position therein; Figure 12 shows a manual shaping path confirmed by the user after entering the manual editing mode corresponding to the manual connection based on the light strip model in Figure 11, and the lamp positions covered by the manual shaping path are confirmed as valid lamp positions through the manual shaping path; Figure 13 shows the effect obtained after completing the connection of the entire manual shaping path based on Figure 12, and the user can select any end in the manual shaping path as the signal input end; Figure 14 shows a lighting effect customization interface, on which the light strip model is displayed for setting lighting effects for each lamp position;
[0025] FIG15 is a schematic diagram of a process for constructing a light strip model for display based on a light strip image in an embodiment of the present application;
[0026] FIG16 is a schematic diagram of a process for confirming a valid light position in response to a user connection operation according to an embodiment of the present application;
[0027] FIG17 is a schematic diagram of the structure of a computer device in an embodiment of the present application. DETAILED DESCRIPTION
[0028] Please refer to Figure 1. It can be seen from the structural schematic diagram of an atmosphere lamp device provided in an embodiment of the present application that the atmosphere lamp device includes a controller 1, a lamp body 2, and an image acquisition interface. The lamp body 2 is electrically connected to the controller 1 so as to accept the control of the computer program running in the controller 1 and work together to realize lighting effect playback.
[0029] The controller 1 generally includes a control chip, a communication component, and a bus connector. In some embodiments, the controller 1 may also be configured with a power adapter, a control panel, a display screen, etc. as needed.
[0030] The power adapter is mainly used to convert AC power into DC power to power the entire atmosphere light device. The control chip can be implemented using various embedded chips, such as Bluetooth SoC (System on Chip), WiFi SoC, MCU (Micro Controller Unit), DSP (Digital Signal Processing) and other types of chips. The control chip usually includes a central processing unit and a memory. The memory and the central processing unit are used to store and execute program instructions respectively to achieve corresponding functions. The above various types of control chips can have their own communication components, or they can be configured with additional communication components as needed. The communication component can be used to communicate with external devices. For example, it can communicate with terminal devices such as personal computers or various smart phones, so that after the user issues various configuration instructions through their terminal device, the control chip of the controller 1 can receive the configuration instructions through the communication component and complete the basic configuration to control the operation of the lamp body. In addition, the controller 1 can also obtain the interface image of the terminal device or the real-time preview image captured by the camera unit 3 through the communication component. The bus connector is primarily used to connect the lamp 2 to the bus and provide lighting effect playback instructions. Therefore, corresponding pins are provided for the power bus and signal bus. Therefore, when the lamp 2 needs to be connected to the controller 1, it can be connected to the bus connector through the corresponding connector on the lamp 2. The control panel typically provides one or more buttons for turning the controller 1 on and off, selecting various preset lighting effect control modes, and so on. The display can be used to display various control information, so that it can cooperate with the buttons on the control panel to support human-computer interaction. The control panel and the display can be integrated into the same touch screen.
[0031] The lamp body 2 in the atmosphere light device is implemented using a light strip and can include one or more light strips. Since the light strip is flexible, it can be shaped into a layout of any shape. Each light strip 21 includes a plurality of lamp beads 210 connected in series, each lamp bead 210 serving as a light-emitting unit, and the number of lamp beads 210 in each light strip 21 can be the same and arranged at equal intervals. The operating current is transmitted to each lamp bead 210 in the same light strip 21 by the same set of cables connected to the bus. In terms of electrical connection, the lamp beads 210 in the same light strip 21 can be connected in parallel.
[0032] The image acquisition interface can be either a hardware interface or a software interface implemented in controller 1. If it's a hardware interface, the image acquisition interface can be implemented as a camera unit 3, with controller 1 loading a corresponding driver to drive the camera unit 3. When the camera unit 3 is aimed at a target screen, such as the terminal device's display desktop, or at a physical space environment, it captures images at a certain frame rate, thereby capturing the interface image. If it's 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. The controller 1 connects to the terminal device via various cables, such as HDMI or Type-C cables, and can continuously capture the terminal device's interface image with the support of this graphics infrastructure technology. Of course, if a wireless screen projection protocol is pre-established between controller 1 and the terminal device, controller 1 can also acquire the terminal device's interface image via wireless communication. The graphics infrastructure technology of the operating system varies depending on the operating system type. For example, the Windows operating system provides technology called Microsoft Direct X Graphics Infrastructure (DXGI), which can implement this function.
[0033] It can be seen that 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 a camera unit 3, the user can aim the camera unit 3 at the computer's graphical user interface to shoot to collect the corresponding interface image as the target image for playing the lighting effect, so that the lamp body 2 can generate corresponding lighting effect description data based on the interface image; the user can also aim the camera unit 3 at a physical space environment, such as an outdoor environment, and record the real scene image as an environmental reference image, so that the lamp body 2 can generate lighting effect description data corresponding to the real scene.
[0034] When the atmosphere lighting device wants to play the lighting effect according to the lighting effect description data, its controller 1 needs to provide the sequential position information of each light-emitting unit in its lamp body 2 according to the corresponding light-emitting partition layout of its lamp body 2, so as to parse the corresponding lighting effect description data into the control data of each light-emitting unit, and encapsulate each control data into lighting effect control data according to the sequential position information of each light-emitting unit, and then send the lighting effect control data to the corresponding light strip. The control chip of each light-emitting unit in the light strip extracts its own corresponding control data, and controls each light-emitting element therein to emit corresponding color light according to the control data. Under the synergistic effect of the color light emitted by each light-emitting unit, the playback of the entire lighting effect is realized.
[0035] According to the product architecture and working principle of the above-mentioned atmosphere light equipment, the luminous partition layout construction method of the atmosphere light equipment of the present application can be implemented as a computer program product, running in the terminal device. By analyzing the light strip image obtained by shooting the light strip in the atmosphere light equipment, the luminous partition layout corresponding to the light strip is obtained, and provided to the controller of the corresponding atmosphere light equipment as the basic configuration information for playing the lighting effect.
[0036] Referring to FIG. 2 , in one embodiment of the present application, the method for constructing a light-emitting partition layout of the present application is run in a terminal device that is suitable for communicating with the atmosphere light device of the present application, and includes:
[0037] Step S5100: determining a shaping path of the light strip and a plurality of light positions in the shaping path based on the light strip image;
[0038] The present application can determine the shaping path formed after the user shapes the light strip based on the image analysis of the light strip image obtained by shooting the light strip used in the lamp body of the atmosphere light device, and can also determine the various light positions distributed on the shaping path during the image analysis process. The light position referred to here is based on the light unit obtained by image analysis of the light strip image for indicating the shaping path. This light unit can be set to correspond to the light unit in the light strip, or it can be set to correspond to a plurality of light units of a standard number or standard length range in the light strip. Therefore, at the computer program level, the light position can be represented as a section in the shaping path, and each section can correspond to one or several light units; it can also be represented as a node in the shaping path, and each node represents only one light unit in the shaping path. In actual implementation, it can be determined according to needs to make the zoning management of the light strip more flexible. For ease of understanding, each light position mentioned in the following embodiments of the present application may be regarded as a light unit in the corresponding light strip.
[0039] There are many ways to determine the shape of the light strip based on the light strip image. You can choose any of the following methods:
[0040] In one embodiment, image segmentation can be performed based on a single light strip image to obtain an image mask of the light strip. This image mask actually describes the area where the light strip's shape is located in the light strip image, namely the shape area. Since the shape area of the light strip is necessarily linear, the shape path of the light strip is also defined by this shape area. In this embodiment, the light strip image can be an image of the light strip before or after it is turned on. This end-to-end determination of the shape path is more accurate.
[0041] In another embodiment, a single light strip image can be binarized and then, based on the resulting binary image, edge detection can be performed using various known edge detection algorithms to determine the shape region and define the shape path of the light strip. Similarly, in this embodiment, the light strip image can be an image of the light strip before or after it is illuminated. Determining the shape path in this manner requires less computation, allows for faster recognition, and is more cost-effective.
[0042] In the two aforementioned embodiments for determining the path of a light strip, to improve the accuracy of path detection, a terminal device can also be used to send a lighting command to the ambient light device before capturing a single light strip image. This allows the ambient light device to control the light strip to illuminate first, and then activate the camera unit to capture the light strip image. Since the light strip is illuminated at this point, the resulting light strip image will appear brighter. Whether performing image segmentation or edge detection, the highlight feature can more accurately determine the shape of the light strip within the light strip image.
[0043] In another embodiment of determining the shaping path of a light strip based on a light strip image, after turning on the terminal device's camera unit for preview, two frames of light strip images, one before and one after the light strip is illuminated, are captured. The two light strip images are aligned and frame difference information is calculated. The pixels corresponding to the light strip's location in the frame difference information will have significant values. The set of pixels with significant values constitutes the shaping area of the light strip, thereby defining the shaping path. This method also has the advantages of low computational complexity, speed, and efficiency.
[0044] FIG3 and FIG11 are light strip images obtained by photographing a light strip of an atmosphere light device in an exemplary scene. The light strip is in a lit state, and thus the light strip in the light strip image is relatively bright and can be used for reference.
[0045] After determining the shape path of the light strip, you can further detect the various lamp positions distributed on the shape path. There are also many ways to determine the lamp positions on the shape path. You can choose any of the following methods:
[0046] In one embodiment, the following process can be implemented: the actual dimensions of the light strip image in physical space are calculated based on the imaging focal length of the light strip image; then, the length of the shaping path is calculated based on the shaping area in the light strip image as the actual dimensions of the light strip; finally, the shaping path is segmented according to preset partitioning parameters, with each segment constituting a corresponding light position. The partitioning parameter can be the distance between two adjacent light-emitting units in the light strip or the total number of light-emitting units in the light strip. By evenly dividing the actual dimensions based on the distance or total number, the segments and, thus, the light positions can be determined. The partitioning parameter can also be a standard number of light-emitting units that constitutes a light position, with each light position being divided and set as a group of light-emitting units of each standard number. According to this embodiment, with the pre-set partitioning parameters, the light positions in the light strip image can be automatically determined, regardless of whether the light strip is illuminated. The algorithm for determining the light positions is based on the physical focal length of the imaging, which is more accurate, requires no manual intervention, and is more efficient. The partitioning parameters can be pre-set by the user or set using the factory default settings provided by the application.
[0047] In another embodiment, the following process can be implemented: first, a specific lighting instruction is sent to the atmosphere light device to control each light unit of the light strip to work in a specific color distribution with high brightness, so that different colors are displayed between adjacent light units; in the light strip image, along the shape path of the light strip, multiple sections are divided in the shape path according to the different characteristics of the light radiated by the adjacent light units, and each section constitutes a corresponding light position. Determining each light position in this way does not need to rely on the partition occupancy parameters and is more flexible and applicable. That is, it is not affected by factors such as the length of the light strip and the spacing between the light units. Regardless of the length of the light strip or the spacing between the light units, each light position can be effectively identified. The specific lighting instruction used here can also be used in combination with the embodiment of determining the shape path using the image of the light strip after lighting. That is, the light strip is controlled to light up at the first time through the specific lighting instruction, and the image of the light strip after lighting is obtained, which can be used to determine the shape path and can also be used to determine each light position in this embodiment. It can be seen that this embodiment can have the efficiency advantage of being organically combined with the above embodiment of using the image after the light is turned on to determine the shaping path.
[0048] Step S5200: construct a light strip model representing the modeling path and each of the light positions, and display it on the interface canvas for user editing;
[0049] After determining the shape path and each light position of the light strip in the light strip image, the shape path and each light position can be migrated to the graphical user interface of the terminal device so that the user can edit the light positions with the help of the human-computer interaction capability of the terminal device.
[0050] To this end, as shown in Figures 4 and 11, an interface canvas can be first set in the graphical user interface, thereby defining a reference coordinate system. Then, the modeling path is constructed as a light strip model, which is positioned and displayed in the interface canvas and centered relative to the overall image to achieve a better visual effect. At the same time, when constructing the light strip model, the various light positions distributed along the modeling path are also marked at corresponding positions, that is, the visual identification of each light position in the modeling path represented by the light strip model is displayed. Thus, the modeling path and each light position of the luminous light strip in the light strip image are visualized through the light strip model in the interface canvas. Users can browse the entire image of the light strip model through the interface canvas and perform operations such as zooming, panning, and editing on it.
[0051] FIG4 is an example of a light strip model displayed in the interface canvas after the modeling path and each light position are determined based on the light strip image shown in FIG3. In the interface shown in FIG4, the modeling path of the light strip is displayed in gray, and each light position is shown as a visual marker with light-colored dots. Below the light strip model, a light strip image browsing key is provided for displaying or hiding the light strip image shown in FIG3, that is, the light strip image based on which the light strip model is determined, for the convenience of user reference. A button corresponding to "manual connection" is also provided below the light strip model for switching to the user manual editing mode, so that the user can confirm the valid light position from the multiple light positions of the light strip model, so as to be used for constructing the light emitting partition layout in step S5500. When the user clicks the "Next" button below without touching the "Manual Connection" button to enter the manual editing mode, each light position on the light strip model in the interface shown in FIG4 will be defaulted to a valid light position for constructing the light emitting partition layout in step S5500.
[0052] Referring to Figure 4, it can be seen that the user can perform manual editing operations based on the light strip model to confirm the various light positions in the luminous light strip and enter the interface shown in Figure 5. In this interface, for example, the user can connect multiple valid light positions by himself to confirm. The user's connection constitutes an actual manual modeling path. The light positions covered by the manual modeling path constitute valid light positions, and the light positions not covered by the manual modeling path are invalid light positions, thereby excluding invalid light positions from its connection. In this process, the user can supplement the same connection multiple times until the desired connection state is reached. Each time the user releases the connection operation, the corresponding light position calibration instruction can be triggered. In response to the instruction, the terminal device confirms that the connected light positions are valid light positions, and the light positions not covered by the connection are regarded as invalid light positions. Subsequently, when constructing the luminous partition layout, only the valid light positions are processed accordingly, and the invalid light positions are not processed.
[0053] Step S5500: In response to the layout construction instruction, the sequential position information of each light position determined with reference to the interface canvas in the light strip model is constructed into a light-emitting partition layout of the light strip.
[0054] When the user believes that the distribution relationship of each light position in the light strip model is accurate, the layout construction instruction can be triggered in the terminal device. The triggering method can be based on the buttons provided in the graphical user interface, for example, by touching the "Complete Recognition" control button in the interface shown in Figure 5 to trigger the instruction, or through other gesture operations, shaking, voice commands, and other specified control methods.
[0055] In response to the layout construction instruction, the terminal device uses the interface canvas as a reference coordinate system to determine the position information of each lamp position, uses the modeling path of the light strip model as a sorting basis to determine the sequence information of each lamp position, and jointly represents the sequence information and position information of each lamp position as sequence position information. The sequence position information of each lamp position is encapsulated according to a preset protocol format to form descriptive information of the distribution relationship of each lamp position in the luminous light strip, which becomes a luminous partition layout.
[0056] The light partition layout determined in this application can be stored in a cloud server or stored locally on a terminal device for future use. For example, when the lighting effect of an ambient light device needs to be edited, the light partition layout can be used to regenerate a light strip model for the light strip, allowing users to set colors for each light position, configure lighting effect motion modes, etc. based on the light strip model. The terminal device can also transmit the light partition layout to the controller of the ambient light device, which becomes the basic information for the controller to play the lighting effect. After storing the light partition layout, the controller, when receiving the lighting effect description data, parses it and converts it into multiple playback frames. For each playback frame, the controller generates corresponding control data based on the light units corresponding to the light positions in each sequential position specified in the light partition layout. The control data of all light units is encapsulated into lighting effect control data and transmitted to the light strip. Each light unit in the light strip extracts its own corresponding control data from the lighting effect control data and controls its corresponding light element to emit the corresponding color light. Based on this, each light unit in the entire light strip cooperates to play the same frame of lighting effect. Furthermore, by playing multiple playback frames, the same motion lighting effect can also be played.
[0057] According to the above embodiments, it can be understood that the present application is adapted to the characteristics of the light strip having flexibility and shapeability. Based on the light strip image, the shaping path of the light strip is directly determined, and multiple lamp positions in the shaping path are determined at the same time. A light strip model corresponding to the light strip is constructed according to the shaping path and each lamp position, and the light strip model is displayed on the interface canvas, so that the light strip is abstracted as a graphic object in the graphical user interface, and each lamp position is indicated therein, which is convenient for users to edit and modify the lamp positions. When the user triggers the layout construction instruction, in response to the instruction, the sequential position information of each lamp position in the light strip model is encapsulated into a light partition layout, wherein the sequential position information of each lamp position is accurately represented with the interface canvas as a reference plane, so that a light partition layout that accurately describes the position distribution of each lamp position can be obtained. The light partition layout can be provided to the controller of the atmosphere light device where the light strip is located. When the controller plays the lighting effect, the sequential position information of each lamp position of the light strip can be determined according to the light partition layout, and the lighting effect can be accurately projected according to the sequential position information. The present application constructs a luminous light strip with a luminous partition layout to achieve an easy-to-understand and easy-to-operate human-computer interaction function, which can improve the configuration efficiency of the luminous light strip and make such atmosphere light equipment easier to promote and popularize.
[0058] Based on any embodiment of the method of the present application, referring to FIG6 , determining a shaping path of the light strip and a plurality of light positions in the shaping path based on the light strip image includes:
[0059] Step S5110: Start the camera unit to capture an image of the light strip in a lit state;
[0060] In this application, the image captured after the light strip is turned on, i.e., the light strip image, can be used to quickly detect the shape path and each light position of the light strip in the light strip image. To this end, the camera unit of the terminal device can be activated when the light strip of the ambient light device is turned on to capture the light strip in the turned-on state and obtain the corresponding light strip image.
[0061] In one embodiment, when a user on a terminal device calls a camera unit to capture an image of the light strip, a lighting command is automatically sent to the ambient light device in the background. Upon receiving the lighting command, the controller of the ambient light device controls the light strip to illuminate and operate. The lighting command may include lighting characteristic information, such as instructing each adjacent light-emitting unit of the light strip to display different colors. The controller converts this lighting characteristic information into control data for each light-emitting unit, forming lighting effect control data and sending it to each light-emitting unit of the light strip. This ensures that the colors of light emitted by two adjacent light-emitting units are different, for example, causing the light strip to illuminate in the order of red, green, blue, red, green, blue, etc.
[0062] After the terminal device issues the lighting instruction, it starts the camera unit to collect image data, obtains preview images in the background, and then performs target recognition or instruction feature detection on each preview image. When one of the preview images contains a luminous light strip, the user can be reminded to shoot and obtain the light strip image. When performing target recognition, it can be implemented with the help of a target detection model; when performing instruction feature detection, it can be detected whether there is a luminous feature in the light strip image that corresponds to the luminous feature information set in the lighting instruction. When a luminous feature corresponding to the luminous feature information exists in the light strip image, the user can be reminded to shoot. In this embodiment, the background recognition mechanism can be used to assist the user in confirming whether the light strip image is suitable for determining the shaping path. If the image of the luminous light strip body in the light strip image is incomplete or the focus is blurred, resulting in the background being unable to determine the luminous light strip, the user will not be prompted to shoot. In this case, the user can be guided to obtain a valid light strip image.
[0063] Of course, in some other embodiments, the user can control the ambient light device to light up its light strip, and then use the terminal device to manually capture the light strip image. In other embodiments, the terminal device can provide a light-on command for the user to call, and the user can trigger it as needed through a trigger method such as a control key in the graphical user interface.
[0064] Step S5120: determining a shape region of the light strip based on the light strip image to define a shape path of the light strip, and extracting an image of the light strip body within the shape region;
[0065] For the light strip image obtained in the lit state, since the light strip is in the lit state, the light strip area in the light strip image is relatively bright and easier to identify. In this case, as disclosed in the various embodiments above, the light strip image can be detected using edge detection or image segmentation technology to determine the image content area of the light strip in the light strip image, that is, the styling area corresponding to its shape. The styling area can be represented as an image mask. In the image mask, in the corresponding light strip image, the pixels covered by the image of the light strip are represented as 1, and the pixels not covered by the image of the light strip are represented as 0. Thus, the area composed of a set of pixels with a value of 1 is the styling area. Since the light strip is linear as a whole, the styling area must also be linear, which actually defines the styling path of the entire light strip.
[0066] In addition, in order to facilitate the centralized identification of the lamp positions, all pixels in the modeling area can be further extracted from the light strip image based on the modeling area, such as the image mask, to form the light strip body image. This is equivalent to removing all background images other than the luminous light strip on the basis of the light strip image to obtain a pure light strip body image.
[0067] Step S5130: Identify prominent features of the lights in the image of the light strip body, and determine the position of each prominent feature of the lights as the corresponding light position.
[0068] When the light strip is emitting light, if the light from each of its light-emitting units is not softened, the position corresponding to each light-emitting unit in the image of the light strip body should be the highest light position, constituting a prominent feature of the lighting. Even if the light from each light-emitting unit in the light strip is softened by the light path structure of the light strip, the position corresponding to each light-emitting unit can still be determined by using the prominent feature of the lighting represented by the light-emitting characteristic information set in the lighting instruction. This shows that as long as the prominent feature of the lighting that needs to be identified is determined according to the actual situation and each prominent feature of the lighting is identified in the light strip, the position of each prominent feature of the lighting can be set as the corresponding light-emitting unit, and each light-emitting unit can be regarded as a corresponding light position.
[0069] Taking the alternating red, green and blue luminous characteristics as an example, the color values of red, green and blue are obviously different. Therefore, the standard values of red, green and blue are directly used as a reference to identify the positions of the maximum values of the red, green and blue segments on the shape path of the luminous light strip in the image of the light strip body as the significant features of the lighting. These positions are the locations of the light-emitting units, which constitute the corresponding light positions.
[0070] In other examples, even if the light strip is monochromatic, the highlight areas in each area in the shaping path can be detected. Since the highlight areas are usually the areas where the light-emitting units are located, the highlight areas can also be used as prominent features of the lighting and set as corresponding light positions.
[0071] According to the above embodiments, it can be seen that by using a single image of a light strip in a lit state, its shaping path and the various light positions distributed on the shaping path can be determined in one go. Compared with using multiple images to identify the lamp body, it has the technical advantages of small computational complexity and rapid and efficient detection. It does not require manual intervention, which reduces the difficulty for users to configure atmosphere lighting equipment.
[0072] Based on any embodiment of the method of the present application, determining a shape area of the light strip therein based on the light strip image to define a shape path of the light strip includes:
[0073] Step S5121: Input the light strip image into a preset target detection model to detect the area image of the luminous light strip;
[0074] In this embodiment, a deep learning model, such as the Yolo series, can be used to perform object detection on the light strip image. The light strip image is input into the object detection model, which predicts candidate boxes and confidence scores for the illuminated light strip. Candidate boxes whose confidence scores meet a preset threshold are considered valid selection boxes for the illuminated light strip. The image corresponding to these valid selection boxes is then captured from the light strip image as a region image to remove interference from other background image information.
[0075] Step S5122: Input the regional image into a preset image segmentation model to identify the shaping area of the light strip therein to define the shaping path of the light strip.
[0076] The regional image is further input into an image segmentation model such as U-net and SAM for image segmentation. The image mask of the luminous light strip is obtained through image segmentation. The image mask indicates the position of each pixel of the luminous light strip in the regional image. The image mask is expanded corresponding to the light strip image to form an image mask corresponding to the light strip image. In this image mask, the position of the pixel of the luminous light strip in the light strip image is also indicated by the value 1, which is equivalent to specifying the modeling area where the luminous light strip is located in the light strip image, thereby defining the modeling path of the luminous light strip relative to the light strip image.
[0077] This embodiment uses deep learning models such as target detection models and image segmentation models to detect the shaping path of light strip images, and utilizes the powerful image processing capabilities of deep learning models to achieve end-to-end accurate detection effects, reduce development complexity, save development costs, and at the same time ensure accurate determination of the shaping path of the light strip.
[0078] Based on any embodiment of the method of the present application, referring to FIG. 7 , a light strip model representing the shaping path and each of the light positions is constructed and displayed on the interface canvas for user editing, including:
[0079] Step S5210: converting the modeling path into a vector curve;
[0080] When the light strip needs to be represented in the interface canvas, since the shape path of the light strip has been determined in advance, it is represented by the shape area. Accordingly, the shape path can be converted into a vector curve according to the shape area.
[0081] Specifically, the shaping area of the light strip actually defines a strip path of substantially equal width and length. Based on this, along the longitudinal direction of the shaping area, the intermediate pixel points on both sides of the path in the width direction of the shaping area are obtained, and the lines connecting these intermediate pixel points can be used to define and describe the shaping path. This shaping path can further be smoothed to form a curve with a natural transition. In order to facilitate computer processing, the curve can also be converted into a vector curve and described by an approximate curve function. Similarly, any long side in the shaping area can be used to define the shaping path to obtain the corresponding vector curve. Those skilled in the art can refer to the above-disclosed method for flexible implementation, and will not elaborate on it.
[0082] Step S5220: corresponding to the position of each lamp position on the modeling path, adding a visual marker corresponding to each lamp position at the corresponding position of the vector curve;
[0083] This application detects individual light positions based on the image of the light strip or the image of the light strip itself, and of course, these positions are also distributed along its shape path. In this case, the vector baseline corresponding to the shape path can also be used as a basis, and the detected light positions are marked at the corresponding positions on the vector curve corresponding to each light position in the shape path. For easy identification, each light position can be represented as a dot, short line segment, or any other visual form, forming a visual identifier that can be displayed on the interface canvas along with the vector curve.
[0084] Step S5230: Draw the vector curve and the visual marker into the interface canvas to form a light strip model, and then render and display it.
[0085] After completing the construction of the graphic description data of the light strip model from the vector curves and the visual signs of each light position, the image rendering interface of the system's graphics open library can be called. Based on the graphic description data, the GPU is used for image drawing, and the vector curves and visual signs are drawn into the interface canvas for rendering and display.
[0086] When you need to scale, translate, or modify the vector curve or any light position, simply modify the corresponding graphic description data to synchronize the image effect of the light strip model in the interface canvas. Since the light strip model is represented by graphic description data in the background, which is vector data, it has low resource usage, efficient refresh rate, and is more convenient for scaling, translating, modifying, and other operations.
[0087] According to the above embodiments, when constructing a light strip model corresponding to a luminous light strip, the shaping path of the light strip in the light strip image is first constructed as a vector curve, and each light position on the shaping path is configured as a visual marker at the corresponding position on the vector curve to form a graphic description information of the light strip model, which is then drawn and rendered to be displayed on the interface canvas. This can further support various editing operations on the light strip model, including scaling, translation, addition, deletion, modification, etc., which is beneficial for users to ensure the accurate construction of luminous zones.
[0088] Based on any embodiment of the method of the present application, referring to FIG. 8 , the sequential position information of each light position determined in the light strip model with reference to the interface canvas is constructed as a light partition layout of the light strip, including:
[0089] Step S5510: determining the position information of each light position in the light strip model based on the coordinate information of each light position relative to the interface canvas;
[0090] After the user triggers the layout construction instruction, the terminal device can determine the position information of each light position on the light strip model in the interface canvas. The light positions processed in this embodiment are valid light positions in the interface canvas. In the case where the user has not modified the light positions on the light strip model displayed by the terminal device, all light positions on the light strip model are valid light positions; in the embodiment where the user modifies each light position, for example, the user abandons one or several light positions by connecting them, at this time, the light positions selected by the user through the connection can be regarded as valid light positions, and the light positions that are not connected can be regarded as invalid light positions, and the position information can be determined only for the valid light positions selected by the user through the connection.
[0091] When determining the position information of a lamp position, the position information of each lamp position can be determined based on the reference coordinate system established by the interface screen, and its corresponding coordinates can be given to represent the position information. Of course, it can also be replaced by other methods that have the same function.
[0092] Step S5520: determining the sequence information of each lamp position according to the sequence of each lamp position in the shaping path of the light strip model, wherein the sequence starts from the signal input end in the shaping path;
[0093] Similarly, for each lamp position, specifically, for each valid lamp position for which position information needs to be determined, its order information within the shaping path also needs to be determined. To this end, any end of the shaping path, that is, any end of the light strip, can be used as the sorting starting point, and the order information of each lamp position can be determined based on its distance from the sorting starting point. In some embodiments, if the signal input end of the light strip is determined in advance, this signal input end can be used as the sorting starting point of the shaping path, and the order information of each lamp position can be determined with reference to this sorting starting point.
[0094] The signal input end of the light strip can be pre-configured by the user through a graphical user interface. For example, in one embodiment, after step S5200, the user can select one of the two endpoints of the shape path on the light strip model on the interface canvas as the signal input end. In other embodiments, the signal input end of the shape path can also be determined through automatic recognition.
[0095] Step S5530: Merge the position information and sequence information of each lamp position into sequence position information, and encapsulate the sequence position information of each lamp position into the light-emitting partition layout of the light strip.
[0096] After determining the position and sequence information of each lamp position, the position and sequence information of each lamp position can be encapsulated according to the protocol format, mainly the format pre-agreed with the controller, so as to obtain the corresponding light-emitting partition layout.
[0097] In one embodiment, first, each lamp position, specifically the effective lighting effect, is used as a unit, and its position information and sequence information are expressed in a protocol format. The position information and sequence information are integrated into sequential position information, and then the sequential position information of each effective lamp position is directly merged into a light-emitting partition layout.
[0098] In another embodiment, based on the characteristic of the orderly connection of the light-emitting units in the light strip, the position information of each lamp position is orderly spliced in the order indicated by the sequence information of each lamp position, so that the sequence information of each lamp position is represented in its splicing order, thereby obtaining the light-emitting partition layout more efficiently. Correspondingly, on the controller side, the position information and sequence information of each light-emitting unit can also be quickly and efficiently parsed.
[0099] It is not difficult to understand based on the above embodiments that after the present application has determined each lamp position in the light strip model, the position information of each lamp position can be determined based on the reference coordinate system provided by the interface canvas, and the corresponding sequence information can be determined according to the order of each lamp position in the shaping path of the luminous light strip. By using the sequence information and position information of each lamp position, a luminous partition layout can be constructed to achieve accurate and effective representation of the shape of the luminous light strip in the composition plane, providing accurate basic data for playing lighting effects for atmosphere lighting equipment or defining lighting effects for terminal devices.
[0100] Based on any embodiment of the method of the present application, before responding to the layout construction instruction, the method includes:
[0101] Step S5400: Based on the light strip image, identify the signal input end in the shaping path, and determine the order of each of the light positions with the signal input end as the sorting starting end.
[0102] This embodiment can automatically identify the signal input end of the light strip based on the light strip image, so as to more effectively represent the sequence information of each light position in the modeling path, for example:
[0103] In one embodiment, a target detection model can be used to identify a specific shape or specific component, such as a power adapter, in the light strip image, and identify the end with the specific shape or the power adapter as a signal input end.
[0104] In another embodiment, in accordance with the embodiment of sending a lighting instruction to the atmosphere light device in advance as described above, under the action of the lighting instruction, the light strip is controlled to light up and present corresponding lighting characteristics. Based on this, the signal input end can be identified according to the lighting characteristics corresponding to the lighting characteristics information defined by the lighting instruction. Taking the example of controlling each light-emitting unit in the light strip to emit red, green, and blue lights in sequence as described above, where red light is the starting point, considering that the light strip is provided with an even number of lamp beads, the light-emitting unit at the end that emits red light is the location of the signal input end. Therefore, based on the lighting characteristics, the color values of the colored lights at both ends of the light strip body image in the light strip image are identified. When the color value at one end represents red, the end is the signal input end.
[0105] By performing image recognition on the light strip image, the signal input end of the light strip can be identified, and the sequence information of each lamp position in the shaping path can be determined based on this, so as to further represent the sequence position information of each lamp position in the light-emitting partition layout, which can reduce manual intervention and provide automation efficiency.
[0106] Based on any embodiment of the method of the present application, before responding to the layout construction instruction, the method includes:
[0107] Step S5300: respond to the lamp position calibration instruction and determine that the lamp position specified by the instruction is a valid lamp position suitable for determining sequential position information.
[0108] Although each light position can be determined by detecting the light strip image, sometimes, due to reflections caused by the bending of the light strip or the ambient lighting conditions, misidentification may occur when identifying the light positions of the illuminated light strip in the light strip image, resulting in the visual identification of unnecessary light positions in the light strip model. In this case, a manual editing mode can be opened to the user, allowing the user to manually edit and manually specify the valid light positions in each light position.
[0109] In one embodiment, as shown in FIG5 , the user can issue a light position calibration instruction by drawing a connection line in the interface canvas, and connect the valid light positions to the same line. The terminal device highlights the user's connection line to facilitate user identification. The light positions covered by the user's connection line constitute valid light positions for constructing the luminous partition layout. During the construction process of the luminous partition layout in step S5500, only the sequential position information of the valid light positions specified by the user needs to be constructed.
[0110] In another embodiment, the user can edit the visual identification of each light position in the light strip model individually to trigger the light position calibration instruction. The user can delete individual light positions or fine-tune the position of the light position in the modeling path. The user can also add individual light positions and then adjust their positions in the modeling path. Ultimately, the light positions displayed on the light strip model on the interface canvas are all identified as valid light positions for constructing the luminous partition layout.
[0111] After the user completes editing the light positions, the corresponding layout construction instructions can be triggered based on the graphical user interface to construct the light emitting partition layout.
[0112] The execution of this step, when used in combination with step S5400, can be performed before step S5400 or after it, and does not affect the embodiment of the creative spirit of this application.
[0113] It can be seen from the above embodiments that the light positions on the light strip model can be edited in a variety of ways. On the one hand, the user can determine the effective light positions for constructing the light-emitting partition layout based on the actual situation of the light strip. On the other hand, the light strip model can also play the role of guiding users to customize the light positions. Ultimately, the position distribution information corresponding to the distribution of each light-emitting unit of the light strip along a specific modeling path can be accurately obtained, which is expressed as a light-emitting partition layout for reference in realizing the customization and playback of lighting effects.
[0114] Referring to FIG. 9 , in another embodiment of the present application, the light emitting partition layout construction method of the present application is run in a terminal device suitable for communication connection with the atmosphere lighting device of the present application, including:
[0115] Step S6100: constructing a model of a light strip representing a shape path of the light strip in the light strip image and each light position in the shape path according to the light strip image, and displaying the model on the interface canvas;
[0116] Step S6200: respond to the lamp position calibration instruction and determine that the lamp position specified by the instruction is a valid lamp position;
[0117] Although each light position can be determined by detecting the light strip image, sometimes, due to reflections caused by the bending of the light strip or the ambient lighting conditions, misidentification may occur when identifying the light positions of the illuminated light strip in the light strip image, resulting in the visual identification of unnecessary light positions in the light strip model. In this case, a manual editing mode can be opened to the user, allowing the user to manually edit and manually specify the valid light positions in each light position.
[0118] FIG11 is an example of a light strip model displayed in the interface canvas after the modeling path and each light position are determined based on the light strip image shown in FIG10. In the interface shown in FIG11, the modeling path of the light strip is displayed in gray, and each light position is visually indicated by a light-colored dot. Below the light strip model, a light strip image browsing key "Original Picture Effect" is provided for displaying or hiding the light strip image shown in FIG10, that is, the light strip image based on which the light strip model is determined, for the convenience of user reference. A button corresponding to "Manual Connection" is also provided below the light strip model for switching to the user manual editing mode, for the user to confirm the valid light position from the multiple light positions of the light strip model, so as to be used for constructing the light emitting partition layout. When the user clicks the "Next" button below without touching the "Manual Connection" button to enter the manual editing mode, each light position on the light strip model in the interface shown in FIG11 will be defaulted to a valid light position for constructing the light emitting partition layout.
[0119] Referring to Figure 11, it can be seen that the user can perform manual editing operations based on the light strip model to confirm the various light positions in the luminous light strip and enter the interface shown in Figure 12. In this interface, for example, the user can connect multiple valid light positions by himself to indicate confirmation. The user's connection constitutes an actual manual modeling path. The light positions covered by the manual modeling path constitute valid light positions, and the light positions not covered by the manual modeling path are invalid light positions, thereby excluding invalid light positions from their connections. The user can continue their connections once or multiple times, for example, continue to connect from the state of Figure 12 to the connection state of Figure 13, and then submit a confirmation instruction through the "Complete Identification" control key at the bottom of the interface. The terminal device responds to the confirmation instruction, identifies the various light positions confirmed by the connection as valid light positions, and regards the light positions not covered by the connection as invalid light positions. Subsequently, when constructing the luminous partition layout, only the valid light positions are processed accordingly, and the invalid light positions are not processed.
[0120] It can be seen that, as shown in Figures 12 and 13, the user can issue a light position calibration instruction by drawing a connection line in the interface canvas, and connect the valid light positions to the same line. The terminal device highlights the user's connection line to facilitate user identification. The light positions covered by the user's connection line constitute the valid light positions for constructing the luminous partition layout. In the process of constructing the luminous partition layout, only the sequential position information of the valid light positions specified by the user needs to be constructed.
[0121] In another embodiment, the user can edit the visual identification of each light position in the light strip model individually to trigger a light position calibration instruction, and in response to the light position calibration instruction, delete the individual light position specified by the instruction, or fine-tune the position of the light position in the modeling path. In addition, individual light positions can be added and then their positions in the modeling path can be adjusted, and so on. Finally, the light positions displayed on the light strip model on the interface canvas are all identified as valid light positions for constructing the light emitting partition layout.
[0122] After the user completes editing the light positions, the corresponding layout generation instructions can be triggered based on the graphical user interface to construct the light emitting partition layout.
[0123] According to the above disclosure, opening up manual light positions for users, on the one hand, allows users to determine effective light positions for constructing light partition layouts based on the actual conditions of the light strips; on the other hand, the light strip model can also play a role in guiding users to customize light positions.
[0124] Step S6300: In response to the layout generation instruction, the sequential position information of each valid light position determined in the light strip model with reference to the interface canvas is constructed as a light-emitting partition layout of the light strip.
[0125] When the user believes that the distribution relationship of each light position in the light strip model is accurate, the layout generation instruction can be triggered in the terminal device. The triggering method can be based on the buttons provided in the graphical user interface, for example, by touching the "Complete Recognition" control button in the interface shown in Figure 13 to trigger the instruction, or through other gesture operations, shaking, voice commands, and other specified control methods.
[0126] In response to the layout generation instruction, the terminal device uses the interface canvas as a reference coordinate system to determine the position information of each lamp position, uses the modeling path of the light strip model as a sorting basis to determine the sequence information of each lamp position, and jointly represents the sequence information and position information of each lamp position as sequence position information. The sequence position information of each lamp position is encapsulated according to a preset protocol format to form descriptive information of the distribution relationship of each lamp position in the luminous light strip, which becomes a luminous partition layout.
[0127] The graphical user interface shown in Figure 14 is a light strip model that is composed and displayed in the lighting effect editing interface based on the luminous partition layout obtained on the basis of Figure 13. Based on the lighting effect editing interface of Figure 14, the user can select each valid light position and set the luminous parameters of each light position through the parameter setting controls provided at the bottom of the lighting effect editing interface, such as color controls, so as to generate descriptive information of the corresponding light-emitting unit. After the user defines the various luminous parameters of the entire lighting effect, the terminal device can encapsulate it as lighting effect description information and send it to the controller of the atmosphere lighting device, which will be parsed and played by the controller.
[0128] Based on any embodiment of the method of the present application, referring to FIG. 15 , constructing a modeling path of the light strip in the light strip image and a light strip model of each light position in the modeling path based on the light strip image, and displaying them on the interface canvas, includes:
[0129] Step S6110: Sending a lighting instruction to the ambient light device to control the light strip in the ambient light device to light up and present a preset lighting characteristic, wherein the lighting instruction includes lighting characteristic information corresponding to the lighting characteristic;
[0130] Step S6120: determining a shaping area of the light strip based on an image of the light strip captured when the light strip is on to define a shaping path of the light strip, and extracting an image of the light strip body within the shaping area;
[0131] After the user confirms in the interface shown in FIG10 that the light strip image fully displays the light strip body, the user can click the confirmation control button therein to take a photo, thereby obtaining the light strip image.
[0132] Step S6130: Identify the prominent features of the lights carried by the luminous features in the image of the light strip body, and determine the position of each prominent feature of the lights as the corresponding light position;
[0133] Step S6140: construct the modeling path and the various lamp positions into a light strip model and display it on the interface canvas.
[0134] After determining the design path and individual light positions, you can construct a light strip model according to the various embodiments of implementing the light strip model in this application, representing the design path and individual light positions of the light strip in the light strip image, and rendering it on the interface canvas. Typically, you can initialize the entire light strip model and position it in the middle area of the interface canvas to facilitate overall user observation.
[0135] According to the above embodiments, it can be seen that by sending a lighting instruction to the atmosphere light device, the lighting instruction carries luminous characteristic information, which is used to instruct the atmosphere light device to control the lighting of the luminous light strip to express the corresponding luminous characteristic. When the luminous light strip is in the lit state, the light strip image of the luminous light strip is obtained. By using a single light strip image of the luminous light strip in the lit state, with the help of the luminous characteristic, the shaping path of the luminous light strip can be identified more conveniently and efficiently, and then the various light positions distributed along the shaping path can be identified through the lighting significant characteristics contained in the luminous characteristic. According to the shaping path and the various light positions, a light strip model is constructed and displayed on the interface canvas. Only a single light strip image is used throughout the process to accurately and efficiently obtain the shaping path and various light positions required for constructing the light strip model with the help of the luminous characteristic, which is convenient to implement using traditional algorithms with less computational complexity, and the entire process can be automatically implemented without manual intervention, which can effectively reduce the difficulty of users configuring the atmosphere light device.
[0136] Based on any embodiment of the method of the present application, determining a shaping area of the light strip based on an image of the light strip captured when the light strip is on to define a shaping path of the light strip includes:
[0137] Step S5121: Input the light strip image into a preset target detection model to detect the area image of the luminous light strip;
[0138] In this embodiment, a deep learning model, such as the Yolo series, can be used to perform object detection on the light strip image. The light strip image is input into the object detection model, which predicts candidate boxes and confidence scores for the illuminated light strip. Candidate boxes whose confidence scores meet a preset threshold are considered valid selection boxes for the illuminated light strip. The image corresponding to these valid selection boxes is then captured from the light strip image as a region image to remove interference from other background image information.
[0139] Step S5122: Input the regional image into a preset image segmentation model to identify the shaping area of the light strip therein to define the shaping path of the light strip.
[0140] The regional image is further input into an image segmentation model such as U-net and SAM for image segmentation. The image mask of the luminous light strip is obtained through image segmentation. The image mask indicates the position of each pixel of the luminous light strip in the regional image. The image mask is expanded corresponding to the light strip image to form an image mask corresponding to the light strip image. In this image mask, the position of the pixel of the luminous light strip in the light strip image is also indicated by the value 1, which is equivalent to specifying the modeling area where the luminous light strip is located in the light strip image, thereby defining the modeling path of the luminous light strip relative to the light strip image.
[0141] On the basis of any embodiment of the method of the present application, the modeling path and the various lamp positions are constructed as a light strip model and displayed on the interface canvas, and the steps shown in FIG. 7 may be adopted.
[0142] Based on any embodiment of the method of the present application, referring to FIG. 16 , responding to a light position calibration instruction and determining that the light position specified by the instruction is a valid light position includes:
[0143] Step S6210: Entering a manual editing mode in response to a key pressed in the graphical user interface;
[0144] When the user needs to edit the light positions on the light strip model, the user can use the "Manual Connection" control key in the interface shown in Figure 11 to enter the interface shown in Figure 5 to reconnect the modeling path of the light strip model.
[0145] Step S6220: Detecting a connection operation on each light position in the light strip model, and triggering a light position calibration instruction in response to the connection operation event;
[0146] In the interface shown in Figure 12, the terminal device detects the user's connection operations on the various light positions on the light strip model in the background. The user can select any light position as the starting light position and slide to select the next light position, thereby drawing a connection line. As the user selects more light positions, the length of the connection line increases. The user's connection operation can be performed multiple times, and the light position corresponding to the starting point of each connection operation is configured to be the light position corresponding to the end point of the previous connection operation, so that the connection line is continuous.
[0147] In one embodiment, when the signal input end of the light strip is determined in advance, the terminal device can further perform data fitting based on the position information of each other light position covered by the user connection before the current light position to obtain an approximate curve function, and then determine the distance by which the position information of the current light position deviates from the approximate curve function. When the distance exceeds a preset threshold, the user connection direction is determined to be incorrect and the current light position is not selected as the selected light position for the connection. When the distance does not exceed the preset threshold, the current light position is selected as the selected light position for the connection. This enables verification of each current light position passed by the user connection during the user connection operation and corresponding confirmation of its selected or unselected status. When a current light position is determined to be a selected light position, the segment corresponding to the connection reaching the current light position in the interface canvas can be displayed as the target color. Otherwise, the target color is not displayed in the segment to indicate that the current light position cannot be selected. Therefore, the user connection operation process is navigated to ensure that the user correctly connects each lamp position, which can effectively prevent the user from selecting some lamp positions in a segment along the shaping path of the light strip and then going back to this segment to select other lamp positions, thereby avoiding errors in the manual shaping path defined by the user connection.
[0148] When the user selects each target light position and releases the sliding gesture, a connection operation event is triggered. Responding to this connection operation event triggers the light position calibration command. If the user performs the connection operation multiple times, the connection operation event can be triggered multiple times, thereby triggering the light position calibration command multiple times.
[0149] Step S6230: respond to the light position calibration instruction, construct a connection line for each light position that the connection operation passes through, and identify each light position that the connection line passes through as a valid light position.
[0150] The terminal device responds to each light position calibration instruction, determines the light positions selected by the current light position calibration instruction, and identifies these light positions as valid light positions. Since the user is allowed to define the manual shaping path of the light strip through multiple connection operations, all valid light positions identified by the user through multiple connection operations can be displayed as connected to the same line. As shown in Figure 12, only a partial line is formed. After the user continues to select, a more complete line is formed in the interface of Figure 13.
[0151] According to this embodiment, the user can use convenient sliding operation gestures to connect each confirmed light position in the light strip model of the interface canvas. By connecting the lines, these light positions are connected together, and the terminal device can recognize these light positions as valid lighting effects. Other light positions that are not connected will be regarded as invalid light positions and will no longer participate in the construction of the light emitting partition layout. Therefore, technical support is provided for users to confirm valid light positions, making it more convenient for users to confirm valid light positions, which helps to improve the user experience.
[0152] Based on any embodiment of the method of the present application, the sequential position information of each valid light position determined in the light strip model with reference to the interface canvas is constructed as the light emitting zone layout of the light strip, and the method steps shown in Figure 8 can be adopted.
[0153] Based on any of the embodiments of the present application, please refer to Figure 17. Another embodiment of the present application further provides a computer device that can function as a controller in an ambient light device. Figure 17 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 of the computer device stores an operating system, a database, and a computer program encapsulating computer-readable instructions. The database may store a control information sequence. When executed by the processor, the computer-readable instructions enable the processor to implement a method for constructing a light-emitting zone layout. The processor of the computer device is configured to provide computing and control capabilities, supporting the operation of the entire computer device. The memory of the computer device may store computer-readable instructions that, when executed by the processor, enable the processor to execute the method for constructing a light-emitting zone layout of the present application. The network interface of the computer device is configured to connect and communicate with a terminal. Those skilled in the art will appreciate that the structure shown in Figure 17 is merely a block diagram of a portion of the structure related to the present invention and does not constitute a limitation on the computer device to which the present invention is applied. Specific computer devices may include more or fewer components than shown in the figure, combine certain components, or have a different component arrangement.
[0154] The present application also provides a storage medium storing computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the light-emitting partition layout construction and construction method described in any embodiment of the present application.
[0155] The present application also provides a computer program product, including a computer program / instruction, which, when executed by one or more processors, implements the steps of the light-emitting partition layout construction method described in any embodiment of the present application.
[0156] To sum up, this application abstracts a light strip model through a light strip image to determine the effective light positions of the light strip, constructs the sequential position information of the effective light positions into a light partition layout, and constructs a light partition layout for the light strip to achieve an easy-to-understand and easy-to-operate human-computer interaction function, which can improve the configuration efficiency of the light strip and make this type of atmosphere lighting equipment easier to promote and popularize.
[0157] At the same time, this application abstracts a light strip model through the light strip image to determine the sequential position information of the light positions of the light strip, and constructs the light partition layout of the light strip to achieve an easy-to-understand and easy-to-operate human-computer interaction function, which can improve the configuration efficiency of the light strip and make this type of atmosphere lighting equipment easier to promote and popularize.
Claims
1. A method for constructing a light-emitting partition layout, characterized in that including: determining a shaping path of a light-emitting light strip and a plurality of lamp positions in the shaping path based on a light strip image; constructing a light strip model representing the shaping path and each of the lamp positions, and displaying it in an interface canvas for user editing; responding to a layout construction instruction, and constructing the sequential position information of each lamp position determined with reference to the interface canvas in the light strip model into a light-emitting partition layout of the light-emitting light strip.
2. The method for constructing a light-emitting partition layout according to claim 1, wherein Determining a shaping path of a light-emitting light strip and a plurality of lamp positions in the shaping path based on a light strip image, including: starting a camera unit to collect a light strip image of the light-emitting light strip in a lit state; determining a shaping area of the light-emitting light strip in the light strip image to define the shaping path of the light-emitting light strip, and extracting a light strip body image within the shaping area; identifying significant features of lit lamps in the light strip body image, and determining the position where each significant feature of a lit lamp is located as a corresponding lamp position.
3. The method for constructing a light-emitting partition layout according to claim 1, wherein Determining a shaping area of the light-emitting light strip in the light strip image to define the shaping path of the light-emitting light strip, including: inputting the light strip image into a preset target detection model to detect a regional image of the light-emitting light strip therein; inputting the regional image into a preset image segmentation model to identify a shaping area of the light-emitting light strip therein to define the shaping path of the light-emitting light strip.
4. The method for constructing a light-emitting partition layout according to claim 1, wherein Constructing a light strip model representing the shaping path and each lamp position, and displaying it in an interface canvas for user editing, including: converting the shaping path into a vector curve; adding a visible identifier corresponding to each lamp position at a corresponding position on the vector curve corresponding to the position of each lamp position on the shaping path; drawing the vector curve and the visible identifiers into the interface canvas to form a light strip model and then rendering and displaying.
5. The method for constructing a light-emitting partition layout according to claim 1, characterized in that, Constructing the sequential position information of each lamp position determined with reference to the interface canvas in the light strip model into a light-emitting partition layout of the light-emitting light strip, including: determining the position information of each lamp position according to the coordinate information of each lamp position in the light strip model relative to the interface canvas; determining the sequential information of each lamp position according to the sequence of each lamp position in the shaping path of the light strip model, where the sequence starts from the signal input end in the shaping path; combining the position information and the sequential information of each lamp position into sequential position information, and encapsulating the sequential position information of each lamp position into a light-emitting partition layout of the light-emitting light strip.
6. The method for constructing a light-emitting partition layout according to any one of claims 1 to 5, characterized in that, Before responding to a layout construction instruction, including: identifying a signal input end in the shaping path based on the light strip image, and determining the sequence of each of the lamp positions starting from the signal input end.
7. The method for constructing a light-emitting partition layout according to claim 6, wherein Before responding to a layout construction instruction, including: responding to a lamp position calibration instruction, and determining that the lamp position specified by the instruction is a valid lamp position suitable for determining sequential position information.
8. A method for constructing a light-emitting partition layout, characterized in that including: constructing a light strip model representing the shaping path of the light-emitting light strip in the light strip image and each lamp position in the shaping path, and displaying it in an interface canvas; responding to a lamp position calibration instruction, and determining that the lamp position specified by the instruction is a valid lamp position; responding to a layout generation instruction, and constructing the sequential position information of each valid lamp position determined with reference to the interface canvas in the light strip model into a light-emitting partition layout of the light-emitting light strip.
9. The method for constructing a light-emitting partition layout according to claim 8, wherein Construct a styling path of the light-emitting light strip in the light strip image and a light strip model for each light position in the styling path, and display them on the interface canvas, including: Send a lighting instruction to the ambient light device to control the light-emitting light strip in the ambient light device to light up and present a preset lighting feature, where the lighting instruction includes lighting feature information corresponding to the lighting feature; Determine the styling area of the light-emitting light strip based on the light strip image captured when the light-emitting light strip is in the lit state to define the styling path of the light-emitting light strip, and extract the light strip body image within the styling area; Identify the lighting significant features carried by the lighting feature in the light strip body image, and determine the position where each lighting significant feature is located as the corresponding light position; Construct the styling path and each light position into a light strip model and display it on the interface canvas.
10. The method for constructing a light-emitting partition layout according to claim 9, wherein, Determine the styling area of the light-emitting light strip based on the light strip image captured when the light-emitting light strip is in the lit state to define the styling path of the light-emitting light strip, including: Input the light strip image into a preset target detection model to detect the area image of the light-emitting light strip therein; Input the area image into a preset image segmentation model to identify the styling area of the light-emitting light strip to define the styling path of the light-emitting light strip.
11. The method for constructing a light-emitting partition layout according to claim 9, wherein Construct the styling path and each light position into a light strip model and display it on the interface canvas, including: Convert the styling path into a vector curve; Corresponding to the positions of each light position on the styling path, add a visible identifier corresponding to each light position at the corresponding position of the vector curve; Draw the vector curve and the visible identifier onto the interface canvas to become a light strip model and then render and display.
12. The method for constructing a light-emitting partition layout according to claim 8, wherein Respond to the light position calibration instruction and determine that the light position specified by the instruction is a valid light position, including: Respond to the operation of a button in the graphical user interface to enter the manual editing mode; Detect the connection operation on each light position in the light strip model, and respond to the connection operation event to trigger the light position calibration instruction; Respond to the light position calibration instruction, construct the connection of each light position passed by the connection operation, and identify each light position passed by the connection as a valid light position.
13. The method for constructing a light-emitting partition layout according to claim 8, wherein, Construct the sequential position information of each valid light position in the light strip model determined with reference to the interface canvas into the lighting partition layout of the light-emitting light strip, including: Determine the position information of each light position according to the coordinate information of each valid light position in the light strip model relative to the interface canvas; Determine the sequential information of each valid light position according to the sequence of each valid light position in the styling path of the light strip model, where the sequence starts from the signal input end in the styling path; Represent the position information and sequential information of each valid light position in a preset format as sequential position information, and encapsulate the sequential position information of each valid light position into the lighting partition layout of the light-emitting light strip.
14. The method for constructing a light-emitting partition layout according to any one of claims 8 to 13, characterized in that Before responding to the layout generation instruction, including: Based on the light strip image, identify the signal input end in the styling path, and determine the sequence of each valid light position starting from the signal input end.
15. An atmosphere lamp device, characterized in that, It includes a controller and at least one light-emitting strip. The controller is configured to receive the light-emitting partition layout generated by the method according to any one of claims 1 to 14, and control the light-emitting strip to play light effects according to the light-emitting partition layout.
16. A computer device, comprising a central processing unit and a memory, characterized in that, The central processing unit is configured to call and run the computer program stored in the memory to execute the steps of the method according to any one of claims 1 to 14.
17. A non-volatile readable storage medium, characterized in that It stores a computer program in the form of computer-readable instructions. When the computer program is called and run by a computer, it executes the steps of the method according to any one of claims 1 to 14.
18. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 14 are implemented.
Citation Information
Patent Citations
Position determination method and device, terminal equipment and storage medium
CN116489468A
Atmosphere lamp equipment, light-emitting partition layout construction method and device and computer equipment
CN117521179A
Atmosphere lamp equipment, light-emitting partition layout generation method and device and computer equipment
CN117528873A
Content-based light illumination
US11856674B1
editing apparatus, design editing method, and storage medium therefor
US20080137967A1
Cited By
Equipment control method and device, electronic equipment and storage medium
CN121711839A