Lighting control method, device, computer equipment and storage medium
By constructing a virtual stage scene on a mobile terminal, the problems of low efficiency and poor user experience in traditional lighting control methods are solved, and intuitive lighting control and efficient determination of lighting correspondence relationships are achieved.
Patent Information
- Application Number
- CN202211499593.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-28
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2042-11-28
AI Technical Summary
Traditional lighting control methods have the problem of low control efficiency on mobile terminals. They cannot quickly determine the correspondence between the lighting logos in the mobile phone and the real-world lighting fixtures in batches, and the user experience is poor.
By constructing a virtual stage scene in the mobile terminal that is the same as the real stage, including virtual lamps corresponding to the positions of the lamps in the real stage, users can intuitively locate and control the lamps on the stage, improving control efficiency and portability.
It realizes the intuitive determination of the correspondence between virtual lamps and physical lamps on the mobile terminal, improves the efficiency and user experience of lamp control, and simplifies the lamp control process.
Smart Images

Figure CN116132566B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of lamp control, and in particular to a lamp control method, device, computer equipment and storage medium. Background Art
[0002] With the development of lighting control technology, especially for stage lighting, the control of lighting is becoming more and more convenient and efficient. At present, flexible and efficient control of stage lighting has been achieved through mobile terminals. For example, stage lighting in studios, theaters and other places can be controlled and managed through mobile phones.
[0003] In a traditional method, the lamp identifiers of the lamps on the stage are displayed in a list or array on the mobile terminal, and then the physical lamps on the stage are controlled through the lamp identifiers displayed in the mobile terminal.
[0004] However, in the process of controlling the physical lamps on the stage through the lamp identifiers displayed in the mobile terminal, there is a problem of low control efficiency. Summary of the invention
[0005] Based on this, it is necessary to provide a lamp control method, device, computer equipment, computer readable storage medium and computer program product that can improve the lamp control efficiency in response to the above technical problems.
[0006] In a first aspect, the present application provides a lamp control method. The method comprises:
[0007] According to the preset lighting control scene, scene data corresponding to the preset lighting control scene is obtained from the server;
[0008] Perform scene rendering according to the scene data to generate a virtual stage scene corresponding to the scene data; the virtual stage scene includes a plurality of virtual lamps;
[0009] In response to a triggering operation on a virtual lamp in a virtual stage scene, a lamp control instruction is sent to a target physical lamp corresponding to the virtual lamp; the lamp control instruction is used to control the target physical lamp.
[0010] In one embodiment, the lighting control scene includes a preset stage scene and a preset performance scene; according to the preset lighting control scene, scene data corresponding to the preset lighting control scene is obtained from the server, including:
[0011] According to the preset stage scene and the preset performance scene, a scene data acquisition request is sent to the server;
[0012] The scene data corresponding to the preset stage scene and the preset performance scene sent by the receiving server is stored in the server. The scene data corresponding to different stage scenes and different performance scenes are stored in the server.
[0013] In one embodiment, the scene data includes a stage panoramic image and lamp position data corresponding to a preset lamp control scene, and scene rendering is performed according to the scene data to generate a virtual stage scene corresponding to the scene data, including:
[0014] Creating an initial virtual stage scene according to the stage panoramic image corresponding to the preset lighting control scene;
[0015] According to the lamp position data, coordinate points corresponding to multiple virtual lamps are determined in the initial virtual stage scene;
[0016] An interactive button corresponding to each virtual lamp is rendered at each coordinate point to generate a virtual stage scene corresponding to the scene data.
[0017] In one embodiment, if the stage panoramic image is a two-dimensional image, and the lamp position data includes two-dimensional spatial coordinates of multiple physical lamps on the stage panoramic image; then according to the lamp position data, coordinate points corresponding to multiple virtual lamps are determined in the initial virtual stage scene, including:
[0018] For the two-dimensional spatial coordinates of each physical lamp on the stage panoramic image, the two-dimensional spatial coordinates are converted into three-dimensional spherical coordinates of a virtual lamp corresponding to the physical lamp; the three-dimensional spherical coordinates are used to represent the coordinates of the virtual lamp in the initial virtual stage scene;
[0019] According to the three-dimensional spherical coordinates of each virtual lamp, the coordinate point corresponding to each virtual lamp is determined in the initial virtual stage scene.
[0020] In one embodiment, the method further comprises:
[0021] For each lamp control scene, obtain the preset lighting state corresponding to each physical lamp in the lamp control scene, and control each physical lamp to emit light in sequence according to the preset lighting state corresponding to each physical lamp; the preset lighting state includes at least one of a preset lighting color and a preset lighting brightness;
[0022] Obtaining a panoramic image of the stage corresponding to the lighting control scene, and identifying the actual lighting state of each physical lamp from the panoramic image of the stage;
[0023] Compare the actual lighting state of each physical lamp with the preset lighting state corresponding to each physical lamp to determine the lamp position data of each physical lamp on the stage panoramic image;
[0024] According to the identification of the lighting control scene, the lighting position data of the physical lighting corresponding to the lighting control scene, and the stage panoramic image corresponding to the lighting control scene, scene data corresponding to the lighting control scene is generated, and the scene data corresponding to the lighting control scene is sent to the server.
[0025] In one embodiment, controlling each physical lamp to emit light in sequence according to a preset light-emitting state corresponding to each physical lamp includes:
[0026] Determine a target physical lamp from the physical lamps according to a preset lighting rule; the preset lighting rule includes a preset lighting order of the physical lamps in the lamp control scene;
[0027] The target physical lamps are controlled to emit light in sequence according to a preset light-emitting sequence corresponding to the physical lamps.
[0028] In one embodiment, comparing the actual lighting state of each physical lamp with the preset lighting state corresponding to each physical lamp to determine the lamp position data of each physical lamp on the stage panoramic image includes:
[0029] Determine the luminous image blocks from the stage panoramic image, and extract the actual luminous state of each luminous image block;
[0030] Compare the actual luminous state of each luminous image block with the preset luminous state corresponding to each physical lamp, and determine the target image block corresponding to each physical lamp;
[0031] For each physical lamp, the position data of the target image block corresponding to the physical lamp is used as the lamp position data of the physical lamp.
[0032] In a second aspect, the present application also provides a lighting control device. The device includes:
[0033] A first acquisition module, used to acquire scene data corresponding to a preset lamp control scene from a server according to the preset lamp control scene;
[0034] A first generating module is used to perform scene rendering according to the scene data to generate a virtual stage scene corresponding to the scene data; the virtual stage scene includes a plurality of virtual lamps;
[0035] The first control module is used to send a lamp control instruction to a target physical lamp corresponding to the virtual lamp in the virtual stage scene in response to a triggering operation on the virtual lamp; the lamp control instruction is used to control the target physical lamp.
[0036] In a third aspect, the present application further provides a computer device, which includes a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the lamp control method in the first aspect when executing the computer program.
[0037] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the lamp control method in the first aspect are implemented.
[0038] In a fifth aspect, the present application further provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the lamp control method in the first aspect are implemented.
[0039] In the above-mentioned lighting control method, device, computer equipment, storage medium and computer program product, the terminal obtains scene data corresponding to the preset lighting control scene from the server according to the preset lighting control scene, performs scene rendering according to the scene data, and generates a virtual stage scene corresponding to the scene data; the virtual stage scene includes multiple virtual lighting fixtures; then, in response to the triggering operation of the virtual lighting fixture in the virtual stage scene, the terminal sends a lighting control instruction to the target physical lighting fixture corresponding to the virtual lighting fixture to control the target physical lighting fixture; that is, in the embodiment of the present application, when the lighting fixtures on the stage are remotely controlled by the terminal, the terminal displays the lighting control instruction in the display interface of the terminal. A virtual stage scene that is consistent with the actual stage scene can be displayed, and virtual lamps corresponding to the positions of the lamps in the actual stage scene are arranged in the virtual stage scene, so that the user can more intuitively understand the spatial position relationship of each lamp, and intuitively determine the correspondence between the virtual lamps displayed on the terminal and the actual stage. The user no longer needs to perform complex operations to determine the correspondence between the lamps in the terminal and the physical lamps, which improves the intuitiveness of the correspondence between the virtual lamps and the physical lamps, thereby improving the efficiency of lamp control. In addition, it can also improve the portability of the terminal remote control lamp operation and improve the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 is an application environment diagram of a lamp control method in an embodiment;
[0041] Figure 2 is a flow chart of a lamp control method in one embodiment;
[0042] Figure 3 is a flow chart of a lamp control method in another embodiment;
[0043] Figure 4 is a flow chart of a lamp control method in another embodiment;
[0044] Figure 5 is a schematic diagram of the structure of an application for controlling a lamp installed in a terminal in one embodiment;
[0045] Figure 6 A schematic diagram of a specific flow chart of a lamp control method in an embodiment;
[0046] Figure 7 A schematic diagram of a specific flow chart of a lamp control method in another embodiment;
[0047] Figure 8 A schematic diagram of a specific flow chart of a lamp control method in another embodiment;
[0048] Fig. 9 is a structural block diagram of a lighting control device in one embodiment;
[0049] Fig.10 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0050] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0051] At present, the lighting fixtures in studios, theaters and other places can be controlled and managed through mobile phones; however, there is a problem with this control method, that is, the correspondence between the lighting fixtures in the real world and the lighting fixture identifiers in the mobile phone is not intuitively reflected; if you want to know the correspondence between the lighting fixture identifiers in the mobile phone and the lighting fixtures in the real world, the user needs to manually identify the lighting fixtures in the real world one by one through the lighting fixture identifiers in the mobile phone; that is, control each lighting fixture identifier in the mobile phone one by one, and observe which lighting fixture in the real world corresponding to the currently controlled lighting fixture identifier has produced the corresponding control action, so as to determine the correspondence between the currently controlled lighting fixture identifier and the lighting fixture in the real world.
[0052] In general, the traditional method of determining the correspondence between the lamp logo in the mobile phone and the lamp in the real world has the following problems: ① It is impossible to quickly and batch determine which lamp in the real world the lamp logo currently displayed in the mobile phone is; ② The position relationship description of the lamp logo displayed in the mobile phone on the stage is not intuitive enough; ③ The user experience is poor.
[0053] Therefore, in response to the above technical problems, the present application proposes a lamp control method and constructs a virtual stage scene (such as a 3D VR scene) that is the same as the real stage in a mobile terminal. The virtual stage scene includes multiple interactive lamps corresponding to the positions of each lamp in the real stage, so that users can intuitively and quickly locate the lamps on the stage, thereby improving the control efficiency of the lamps.
[0054] The following is an introduction to the technical solutions involved in the embodiments of the present application in combination with the scenarios in which the embodiments of the present application are applied.
[0055] The lamp control method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 can communicate with each lamp 104 in the stage through the network, and the terminal 102 can also communicate with the server 106 through the network. The server 106 can store lamp control data corresponding to different performance scenes under different stage scenes, such as: the stage scene can include stage scenes corresponding to different studios and different theaters, and the performance scene under the stage scene can include different performance scenes performed on the same stage scene. The lamp control data may include stage scene identification, performance scene identification, lamp identification, scene data, lamp control parameters, etc., wherein the scene data may include a stage panoramic image, lamp position data, etc.; the embodiment of the present application does not specifically limit the data content of the lamp control data and the data content of the scene data.
[0056] Terminal 102 can obtain lighting control data corresponding to the current stage scene of the performance and the actual performance scene from the server, and display the current stage scene and the virtual stage scene corresponding to the performance scene on the display screen of terminal 102 based on the lighting control data. The virtual stage scene may include various interactive lightings corresponding to the current performance scene. The user controls each interactive lighting to achieve control over each physical lighting in the actual stage scene.
[0057] The terminal 102 may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, IoT devices, and portable wearable devices. The IoT devices may be smart speakers, smart TVs, smart air conditioners, etc. The portable wearable devices may be smart watches, smart bracelets, head-mounted devices, etc. The server 106 may be implemented as an independent server or a server cluster consisting of multiple servers.
[0058] In one embodiment, Figure 2 As shown, a lamp control method is provided, which is applied to Figure 1 The terminal in is used as an example to illustrate, including the following steps:
[0059] Step 201: According to the preset lighting control scene, scene data corresponding to the preset lighting control scene is obtained from a server.
[0060] Among them, the preset lighting control scene may include a preset stage scene and a preset performance scene under the preset stage scene, and the scene data is the scene data corresponding to the preset performance scene under the preset stage scene; optionally, the scene data may include virtual stage scene data consistent with the actual stage scene corresponding to the preset performance scene, and may also include a stage panoramic image and lighting position data corresponding to the preset lighting control scene, and the stage panoramic image may be a two-dimensional image or a three-dimensional image, and the lighting position data may include the position data corresponding to all lighting in the preset stage scene, or may only include the relative position data of each lighting corresponding to the preset performance scene in the preset stage scene.
[0061] That is to say, when the performance scene only needs to use some of the lamps in the stage scene, it is possible to obtain only the position data of the part of the lamps corresponding to the performance scene, and display these part of the lamps in the terminal; of course, it is also possible to obtain the position data of all the lamps in the stage scene, and display all the lamps in the terminal. At this time, for some of the lamps corresponding to the performance scene, these part of the lamps can be highlighted or controlled as interactive lamps; for example: for some of the lamps corresponding to the performance scene, they can be controlled to have interactive functions, and for other lamps other than the part of the lamps corresponding to the performance scene, their interactive functions are prohibited or turned off to avoid users' misoperation of other lamps that do not correspond to the current performance scene.
[0062] Optionally, for other lamps not corresponding to the current performance scene, the user permissions can be set to control the activation or opening of the interactive functions of the other lamps when necessary, so that the user can control other lamps to meet any requirements of the performance scene when necessary. For example, if the lamp corresponding to the performance scene fails, or the performance requires other lighting control, the interactive functions of other lamps not in the performance scene can be activated, so that all lighting requirements of the performance can be completed by controlling other lamps.
[0063] Optionally, before the performance begins, the user can select the lighting control scene that needs to be operated currently through the terminal. In the display interface of the terminal, at least one stage scene identifier displayed in the form of a list or a control, and at least one performance scene identifier under each stage scene can be included. The user determines the preset lighting control scene by triggering the preset stage scene and the preset performance scene under the preset stage scene. The terminal determines the preset lighting control scene currently selected by the user based on the user's trigger instruction, and then, based on the preset lighting control scene, a scene data acquisition request corresponding to the preset lighting control scene can be generated, and the scene data acquisition request is sent to the server; so that the terminal can receive the scene data returned by the server.
[0064] Exemplarily, in the case where the preset lighting control scene includes a preset stage scene and a preset performance scene, the terminal may send a scene data acquisition request to the server according to the preset stage scene and the preset performance scene; wherein the scene data acquisition request may include an identifier of the preset stage scene and an identifier of the preset performance scene, and the identifier of the preset stage scene may be a stage scene name, a stage scene ID, etc., and the identifier of the preset performance scene may also be a performance scene name, a performance scene UUID, etc. In the embodiment of the present application, there is no specific limitation on the identifier type of the preset stage scene and the identifier type of the preset performance scene.
[0065] Then, the terminal can receive the scene data corresponding to the preset stage scene and the preset performance scene, which is sent by the server in response to the scene data acquisition request; wherein the scene data corresponding to different stage scenes and different performance scenes are stored in the server; optionally, the server can obtain the scene data corresponding to the identifier of the preset stage scene and the identifier of the preset performance scene from the database according to the identifier of the preset stage scene and the identifier of the preset performance scene carried in the scene data acquisition request, and send the scene data to the terminal corresponding to the scene data acquisition request.
[0066] Step 202: Perform scene rendering according to the scene data to generate a virtual stage scene corresponding to the scene data.
[0067] The virtual stage scene includes a plurality of virtual lamps, and each virtual lamp may be a lamp with interactive functions.
[0068] Optionally, after the terminal obtains scene data corresponding to the preset lighting control scene from the server, the terminal can perform scene rendering on the scene data to generate a virtual stage scene corresponding to the scene data, that is, generate a virtual stage scene corresponding to the preset lighting control scene; for example: when the scene data is virtual stage scene data, the terminal can perform scene rendering on the virtual stage scene data to generate a virtual stage scene corresponding to the scene data.
[0069] Among them, the virtual stage scene can be consistent with the actual stage scene corresponding to the preset lighting control scene. In addition, the number of virtual lamps in the virtual stage scene can be the same as the number of lamps in the actual stage scene, or it can be different; in other words, the virtual lamps in the virtual stage scene can include all the lamps in the actual stage scene, or it can only include lamps corresponding to the preset performance scene; if the virtual stage scene includes all the lamps in the actual stage scene, for the lamps corresponding to the preset performance scene, accordingly, the virtual lamp can be a lamp with interactive function, while other virtual lamps are lamps without interactive function.
[0070] Step 203 : in response to the triggering operation on the virtual lamp in the virtual stage scene, a lamp control instruction is sent to the target physical lamp corresponding to the virtual lamp.
[0071] The lamp control instruction is used to control the target physical lamp, which is the lamp in the actual stage scene corresponding to the preset lamp control scene.
[0072] Since the virtual stage scene includes at least one virtual lamp corresponding to the preset lamp control scene, and the virtual lamp is interactive, the user can directly remotely control the physical lamp in the actual stage scene by triggering the virtual lamp, including but not limited to remote control of the illumination, color, rotation, movement, brightness, etc. of the physical lamp.
[0073] Optionally, the user can trigger a virtual lamp in the display interface of the terminal and set various lamp attribute parameters of the virtual lamp. When the user triggers and controls the virtual lamp, the terminal responds to the user's triggering operation on the virtual lamp and sends a lamp control instruction to the target physical lamp corresponding to the virtual lamp, wherein the lamp control instruction may include at least one lamp attribute parameter.
[0074] In the above-mentioned lamp control method, the terminal obtains scene data corresponding to the preset lamp control scene from the server according to the preset lamp control scene, performs scene rendering according to the scene data, and generates a virtual stage scene corresponding to the scene data; the virtual stage scene includes a plurality of virtual lamps; then, in response to the triggering operation of the virtual lamps in the virtual stage scene, the terminal sends a lamp control instruction to the target physical lamp corresponding to the virtual lamp to control the target physical lamp; that is, in the embodiment of the present application, when the lamps on the stage are remotely controlled through the terminal, the display interface of the terminal can display the actual stage scene. The virtual stage scene is consistent with the scene, and virtual lamps corresponding to the positions of lamps in the actual stage scene are arranged in the virtual stage scene, so that the user can more intuitively understand the spatial position relationship of each lamp, and intuitively determine the correspondence between the virtual lamps displayed on the terminal and the actual stage The relationship between the physical lamps; the user no longer needs to perform the complex operation of determining the correspondence between the lamps in the terminal and the physical lamps, which improves the intuitiveness of the correspondence between the virtual lamps and the physical lamps, thereby improving the efficiency of lamp control. In addition, it can also improve the portability of the terminal remote control of the lamps and improve the user experience.
[0075] In one embodiment, the scene data obtained by the terminal from the server may include a stage panoramic image and lamp position data corresponding to a preset lamp control scene. In this case, Figure 3 As shown, in the above step 202, "performing scene rendering according to scene data to generate a virtual stage scene corresponding to the scene data" may include:
[0076] Step 301: Create an initial virtual stage scene according to a stage panoramic image corresponding to a preset lighting fixture control scene.
[0077] Optionally, the stage panoramic image may be a two-dimensional image, or a three-dimensional image, etc. The stage panoramic image may include one or more panoramic images corresponding to the preset lighting control scene captured by a panoramic camera at any one or more VR roaming points.
[0078] By using image processing technology, the stage panoramic image is analyzed and processed to create an initial virtual stage scene corresponding to the preset lighting control scene, wherein the initial virtual stage scene may be a virtual stage scene that does not include interactive virtual lighting fixtures.
[0079] Step 302: determining coordinate points corresponding to a plurality of virtual lamps in the initial virtual stage scene according to the lamp position data.
[0080] The lamp position data may include the position coordinates of at least one lamp in the preset lamp control scene, and the lamp position coordinates may be the position coordinates of the lamp in the stage panoramic image determined based on the stage panoramic image. If the stage panoramic image is a two-dimensional image, the lamp position data may be the two-dimensional coordinates in the two-dimensional image; if the stage panoramic image is a three-dimensional image, the lamp position data may be the three-dimensional coordinates in the three-dimensional image.
[0081] Optionally, the position of each lamp in the virtual stage scene can be determined according to the position coordinates of each lamp in the lamp position data, and for each lamp, based on the position coordinates of the lamp in the virtual stage scene, an interaction point corresponding to the lamp is created in the virtual stage scene, that is, a coordinate point corresponding to the virtual lamp in the virtual stage scene.
[0082] Exemplarily, when the stage panoramic image is a two-dimensional image, and the lamp position data includes the two-dimensional spatial coordinates of multiple physical lamps on the stage panoramic image, then, according to the lamp position data, determining the coordinate points corresponding to multiple virtual lamps in the initial virtual stage scene may include: for the two-dimensional spatial coordinates of each physical lamp on the stage panoramic image, converting the two-dimensional spatial coordinates into the three-dimensional spherical coordinates of the virtual lamp corresponding to the physical lamp; then, according to the three-dimensional spherical coordinates of each virtual lamp, determining the coordinate points corresponding to each virtual lamp in the initial virtual stage scene; wherein the three-dimensional spherical coordinates are used to represent the coordinates of the virtual lamp in the initial virtual stage scene. In other words, when the initial virtual stage scene is a 3D VR scene, it is necessary to first convert the two-dimensional spatial coordinates of the physical lamp in the two-dimensional stage panoramic image into the three-dimensional spherical coordinates corresponding to the virtual lamp in the 3D VR scene, and then, according to the three-dimensional spherical coordinates corresponding to the virtual lamp, determine the coordinate points corresponding to the virtual lamp in the initial virtual stage scene.
[0083] Step 303: Rendering interactive buttons corresponding to the virtual lamps at the coordinate points to generate a virtual stage scene corresponding to the scene data.
[0084] Among them, the interactive button can be a control with interactive function, the icon corresponding to the control can be a button icon, the shape of the button icon can be round, square, etc., or a lamp image can be used as the button icon of the interactive button to form a virtual lamp with interactive function; the virtual lamp with interactive function can realize remote control of the physical lamp in the actual stage scene.
[0085] Optionally, after marking the coordinate points corresponding to each virtual lamp in the initial virtual stage scene according to the position coordinates of each physical lamp, an interactive button corresponding to each virtual lamp can be constructed at each coordinate point, and a virtual stage scene corresponding to the scene data can be rendered and generated. Optionally, the functions of the interactive buttons corresponding to each virtual lamp can include lamp control functions such as the light, color, rotation, and movement of the virtual lamp, and the embodiment of the present application does not specifically limit the interactive function.
[0086] In this embodiment, when the scene data includes a panoramic image of the stage corresponding to a preset lighting control scene and lighting position data, the terminal can create an initial virtual stage scene based on the panoramic image of the stage corresponding to the preset lighting control scene, and determine the coordinate points corresponding to multiple virtual lighting fixtures in the initial virtual stage scene based on the lighting position data; then, render interactive buttons corresponding to each virtual lighting fixture at each coordinate point to generate a virtual stage scene corresponding to the scene data. That is to say, in this embodiment, for different lighting control scenes, the server stores the stage panoramic images and lighting position data corresponding to the different lighting control scenes; then, when the user controls the lighting in different lighting control scenes through the terminal, he only needs to obtain the scene data corresponding to the preset lighting control scene from the server, and build an initial virtual stage scene according to the stage panoramic image in the scene data, and then build virtual lighting with interactive functions in the initial virtual stage scene according to the lighting position data, so as to generate a virtual stage scene corresponding to the preset lighting control scene, and finally render and display the virtual stage scene on the display interface of the terminal; thereby, a virtual stage scene with the same layout as the actual stage scene corresponding to the preset lighting control scene and with interactivity can be displayed in the terminal, and the correspondence between each virtual lighting and the physical lighting can be intuitively displayed through the virtual stage scene, so that the user can quickly locate the lighting he wants to control, which can improve the convenience and efficiency of lighting control and improve the efficiency of lighting control.
[0087] Figure 4 FIG. 1 is a flow chart of a lamp control method in another embodiment. This embodiment relates to an optional implementation process of a terminal generating scene data of different lamp control scenes. Based on the above embodiment, Figure 4 As shown, the above-mentioned lamp control method also includes:
[0088] Step 401 : for each lamp control scene, a preset lighting state corresponding to each physical lamp in the lamp control scene is obtained, and each physical lamp is controlled to emit light in sequence according to the preset lighting state corresponding to each physical lamp.
[0089] The preset lighting state includes at least one of a preset lighting color and a preset lighting brightness. Exemplarily, the preset lighting state may include a preset lighting color, may include a preset lighting brightness, or may include a preset lighting color and a preset lighting brightness; when the preset lighting state includes a preset lighting brightness, the preset lighting state of each lamp may correspond to different lighting brightnesses under the same lighting color, or may correspond to different lighting brightnesses under different lighting colors.
[0090] It should be noted that the preset lighting state of each physical lamp is not specifically limited in the embodiments of the present application, as long as the preset lighting state of each physical lamp can be easily distinguished. Of course, if multiple physical lamps are not lamps in the same batch of batch control, then the preset lighting states of physical lamps in different batches of control can also be the same; for example, different physical lamps can be batch-controlled to emit light multiple times according to the preset quantity, such as: controlling 3 lamps to emit light at a time, and the lighting colors of the 3 lamps controlled each time are all red, green, and blue.
[0091] Optionally, when the number of physical lamps corresponding to a lamp control scene is small, if all physical lamps corresponding to the lamp control scene can be distinguished according to different preset light states, then the preset light states of all physical lamps corresponding to the lamp control scene can be set, and each physical lamp can be controlled to emit light at the same time. For example, when the preset light state includes a preset light color, a characteristic color record table can be generated for all physical lamps corresponding to the lamp control scene, as shown in Table 1.
[0092] Table 1
[0093] Lighting feature code Feature Color state <![CDATA[ID0]]> <![CDATA[C0]]> 0 <![CDATA[ID1]]> <![CDATA[C1]]> 0 <![CDATA[ID2]]> <![CDATA[C2]]> 0 ... ... ... <![CDATA[ID n ]]> <![CDATA[C n ]]> 0
[0094] Among them, the lamp feature code can be used to characterize the unique identification of the lamp, such as the lamp feature code can be the unique ID of the lamp, n represents the number of physical lamps corresponding to the lamp control scene; the characteristic color is the preset luminous color of the physical lamp, the characteristic color should be unique and characteristic, wherein the uniqueness means that the characteristic color is unique in the characteristic color record table, and the characteristic means that each characteristic color should have a certain degree of distinction, such as the degree of distinction can be distinguished by image processing technology; the state refers to finding the corresponding lamp in the stage panoramic image corresponding to the lamp control scene, such as: the state here can include 0 and 1, 0 means that the lamp has not yet found the corresponding lamp in the stage panoramic image, 1 means that the lamp has found the corresponding lamp in the stage panoramic image, and in the initial characteristic color record table, the state of each lamp is the initial state, that is, the state is 0.
[0095] Optionally, when there are a large number of physical lamps corresponding to the lamp control scenario, different physical lamps can be controlled to emit light in batches; set the preset light-emitting states of each physical lamp to ensure that the preset light-emitting states of multiple physical lamps controlled in the same batch are distinguishable; furthermore, according to the preset light-emitting states of multiple physical lamps in each batch, each physical lamp can be controlled to emit light in batches. Exemplarily, based on Table 1 above, assuming the number of physical lamps controlled in batch is m, and m < n, then the characteristic color record table of the physical lamps corresponding to this lamp control scenario can be shown in Table 2.
[0096] Table 2
[0097] Lighting feature code Feature Color state <![CDATA[ID0]]> <![CDATA[C0]]> 0 <![CDATA[ID1]]> <![CDATA[C1]]> 0 ... ... ... <![CDATA[ID m-1 ]]> <![CDATA[C m-1 ]]> 0 <![CDATA[ID m ]]> <![CDATA[C0]]> 0 <![CDATA[ID m+1 ]]> <![CDATA[C1]]> 0 ... ... ... <![CDATA[ID 2m-1 ]]> <![CDATA[C m-1 ]]> 0 ... ... ...
[0098] Among them, the preset light-emitting states of the 0 - m-1 physical lamps in the first batch are the same as those of the m - 2m-1 physical lamps in the second batch. That is to say, the preset light-emitting states of multiple physical lamps in each batch can be the same; for at least one physical lamp in the last batch, if the number of lamps is less than m, the light-emitting color can be set for at least one physical lamp in the last batch according to the color order of the lamps in each batch, that is, the color order of C0 - C m-1 in the color order, and of course, it is also possible to randomly select light-emitting colors with large differences from the colors of C0 - C m-1 in the color, and the embodiments of the present application do not make specific limitations on this.
[0099] Furthermore, after obtaining the preset light-emitting states corresponding to each physical lamp in the lamp control scenario, each physical lamp can be controlled to emit light in sequence according to the preset light-emitting state corresponding to each physical lamp. Optionally, when the number of physical lamps corresponding to the preset lamp control scenario is large, that is, when controlling each physical lamp in batches, each batch of physical lamps can be controlled to emit light in the order of batches; that is, first control the m lamps in the first batch to emit light. After the m lamps have all emitted light, control these m lamps in the first batch to go out, and then control the m lamps in the second batch to emit light; and so on, until the lamps in the last batch are controlled to emit light.
[0100] Optionally, when controlling the lighting of physical lamps in batches, the target physical lamps can be determined from the physical lamps corresponding to the lamp control scene according to a preset lighting rule, and then the target physical lamps are controlled to light up in sequence according to a preset lighting order corresponding to the physical lamps; wherein the preset lighting rule includes a preset lighting order of the physical lamps in the lamp control scene. That is, when controlling the lighting of physical lamps in batches, the target physical lamps that need to be controlled to light up in the current batch are determined according to the preset lighting rule, so as to control the lighting of multiple target physical lamps to be controlled in the current batch.
[0101] Exemplarily, the preset lighting order of each physical lamp in the lamp control scene can be determined according to the lamp feature code of each physical lamp, such as: taking the order of the lamp feature codes as the lighting order of each physical lamp; determining the target physical lamp controlled each time according to the preset number of physical lamps controlled in batches each time, such as: m; for example: in the case of controlling 3 lamps each time, the target physical lamps controlled for the first time are ID0, ID1, and ID2, and the target physical lamps controlled for the second time are ID3, ID4, and ID5, and so on, until the last physical lamp in the lamp feature code order.
[0102] Step 402: Acquire a panoramic image of the stage corresponding to the lighting control scene, and identify the actual lighting state of each physical lighting fixture from the panoramic image of the stage.
[0103] The lighting control scene may include a stage scene and a performance scene.
[0104] Optionally, after controlling each physical lamp to emit light according to the preset lighting state corresponding to each physical lamp in the lamp control scene, a panoramic image of the stage corresponding to the lamp control scene after the lamp emits light can be obtained; optionally, a photo application in the terminal can be used to capture the current panoramic image of the stage; other shooting devices can also be used to capture the current panoramic image of the stage, and the acquired panoramic image of the stage can be sent to the terminal. Exemplarily, when obtaining a panoramic image of the stage through the terminal, the terminal can be fixed on the panoramic shooting bracket with the help of a panoramic shooting bracket, and a VR roaming point can be selected, and the panoramic shooting bracket can be placed at the VR roaming point to control the terminal to shoot to obtain a panoramic image of the stage.
[0105] In addition, it should be noted that when the physical lamps on the stage corresponding to the current lamp control scene are controlled to light up in batches multiple times, after each control of the multiple physical lamps on the stage to light up, the corresponding stage panoramic image after the current lamp lights up is obtained, and multiple stage panoramic images corresponding to the lamp control scene are obtained. Among them, each stage panoramic image corresponding to the lamp control scene is a stage panoramic image obtained at the same VR roaming point, so that only the physical lamps that light up are different between each stage panoramic image.
[0106] Furthermore, image analysis is performed on the acquired stage panoramic image to identify the actual lighting state of each physical lamp from the stage panoramic image; the actual lighting state corresponds to the preset lighting state. Exemplarily, when the preset lighting state is a preset lighting color, the actual lighting state includes the actual lighting color; when the preset lighting state is a preset lighting brightness, the actual lighting state includes the actual lighting brightness; when the preset lighting state includes a preset lighting color and a preset lighting brightness, the actual lighting state includes the actual lighting color and the actual lighting state.
[0107] Optionally, OPENCV image processing technology can be used to perform image analysis on the stage panoramic image. For example, the stage panoramic image can be analyzed by the OPENCV image processing module in the terminal to obtain at least one luminous area in the stage panoramic image and the actual luminous state corresponding to each luminous area. Of course, the position coordinates corresponding to each luminous area can be determined.
[0108] Step 403 : Compare the actual lighting state of each physical lamp with the preset lighting state corresponding to each physical lamp, and determine the lamp position data of each physical lamp on the stage panoramic image.
[0109] The lamp position data includes the position coordinates of the physical lamp in the stage panoramic image.
[0110] Optionally, the actual lighting state of each physical lamp and the preset lighting state of each physical lamp can be compared to determine the position coordinates of the lighting area corresponding to the actual lighting state consistent with the preset lighting state of the physical lamp, and use them as the position coordinates of the physical lamp on the stage panoramic image; similarly, the position coordinates of other physical lamps on the stage panoramic image can be obtained, and then, after determining the position coordinates of all physical lamps corresponding to the lamp control scene, the lamp position data corresponding to the lamp control scene is generated according to the position coordinates of each physical lamp on the stage panoramic image.
[0111] Exemplarily, when the terminal performs image analysis on the panoramic image of the stage, it can determine the luminous image blocks from the panoramic image of the stage and extract the actual luminous state of each luminous image block, and the actual luminous state of the luminous image block can be regarded as the actual luminous state of the physical lamps on the stage; of course, there may be interference image blocks in the identified luminous image blocks, that is, the luminous image blocks are not the luminous image blocks corresponding to the physical lamps; then, the actual luminous state of each luminous image block is compared with the preset luminous state corresponding to each physical lamp, and the target image block corresponding to each physical lamp is determined; at this time, if there is no luminous image block consistent with the preset luminous state, the luminous image block is the interference image block; finally, for each physical lamp, the position data of the target image block corresponding to the physical lamp is used as the lamp position data of the physical lamp.
[0112] Exemplarily, in the case where the preset luminous state includes a preset luminous color, based on the above Table 1, an interaction point data table corresponding to the characteristic color record table in Table 1 can be set accordingly, as shown in Table 3.
[0113] Table 3
[0114] coordinate Block Color Lighting feature code <![CDATA[P0]]> <![CDATA[c0]]> <![CDATA[P1]]> <![CDATA[c1]]> <![CDATA[ID1]]> <![CDATA[P2]]> <![CDATA[c2]]> ... ... ... <![CDATA[P n ]]> <![CDATA[c n ]]>
[0115] Among them, the coordinates P0 to P n represents the position coordinates of each luminous image block identified from the stage panoramic image in the stage panoramic image, and the block colors c0 to c n Indicates coordinates from P0 to P n By comparing Table 1 and Table 2, it can be determined that the block color c1 of the luminous image block with coordinate P1 in Table 2 is consistent with the preset luminous color C1 of the lamp ID1 in Table 1. Then, it can be determined that the luminous image block with coordinate P1 corresponds to the physical lamp ID1, and the coordinate P1 of the luminous image block is used as the position coordinate of the physical lamp ID1. Similarly, the position coordinates of other physical lamps can be obtained.
[0116] In addition, it should be noted that when comparing the actual luminous state of each luminous image block with the preset luminous state corresponding to each physical lamp, the similarity between the actual luminous state of each luminous image block and the preset luminous state corresponding to each physical lamp can be determined, and when the similarity is higher than the preset similarity threshold, it can be determined that the luminous image block corresponds to the physical lamp. Exemplarily, when the preset luminous state and the actual luminous state are luminous colors, the similarity between the actual luminous color of each luminous image block and the preset luminous color of each physical lamp can be determined, and the luminous image block corresponding to the actual luminous color similar to the preset luminous color of the physical lamp is determined as the luminous image block corresponding to the physical lamp, and then the position coordinates of the luminous image block in the stage panoramic image are determined as the position coordinates of the physical lamp in the stage panoramic image.
[0117] Step 404, generating scene data corresponding to the lighting control scene according to the identification of the lighting control scene, the lighting position data of the physical lighting corresponding to the lighting control scene, and the stage panoramic image corresponding to the lighting control scene, and sending the scene data corresponding to the lighting control scene to the server.
[0118] Wherein, when the lighting control scene includes a stage scene and a performance scene, the identifier of the lighting control scene may include an identifier of the stage scene and an identifier of the performance scene; optionally, the identifier of the stage scene may be a stage ID, and the identifier of the performance scene may be a scene UUID.
[0119] Optionally, based on the identification of the lighting control scene, the lighting position data of the physical lighting corresponding to the lighting control scene, and the panoramic image of the stage corresponding to the lighting control scene, a correspondence between the lighting control scene, the lighting position data, and the panoramic image of the stage can be generated, that is, scene data corresponding to the lighting control scene is generated; finally, the terminal sends the scene data corresponding to the lighting control scene to the server.
[0120] Optionally, when the terminal obtains the scene data corresponding to different lamp control scenes, the terminal may package the scene data corresponding to different lamp control scenes together and send the packaged scene data to the server.
[0121] Exemplarily, the scene data corresponding to different lighting control scenes may be as shown in Table 4.
[0122] Table 4
[0123] Stage ID Scenario UUID Image Data Location data Stage 1 Scene_1_UUID Img_1 Data_1 ... ... ... ...
[0124] Among them, the stage ID is used to represent the identification of the stage scene, the scene UUID is used to represent the identification of the performance scene, the picture data is the stage panoramic image corresponding to the lighting control scene, and the position data is the position coordinates of each physical lamp corresponding to the lighting control scene in the stage panoramic image.
[0125] In this embodiment, for each lamp control scene, the preset lighting state corresponding to each physical lamp in the lamp control scene is obtained, and each physical lamp is controlled to emit light in sequence according to the preset lighting state corresponding to each physical lamp; a stage panoramic image corresponding to the lamp control scene is obtained, and the actual lighting state of each physical lamp is identified from the stage panoramic image; the actual lighting state of each physical lamp is compared with the preset lighting state corresponding to each physical lamp, and the lamp position data of each physical lamp on the stage panoramic image is determined; then, according to the identifier of the lamp control scene, the lamp position data of the physical lamp corresponding to the lamp control scene, and the stage panoramic image corresponding to the lamp control scene, The method of the present invention is to obtain a scene image, generate scene data corresponding to the lighting control scene, and send the scene data corresponding to the lighting control scene to the server; wherein the preset lighting state includes at least one of a preset lighting color and a preset lighting brightness; that is, in the present embodiment, when obtaining the scene data corresponding to different lighting control scenes, the physical lamps in the stage are batch controlled to light up through the terminal, and a panoramic image of the stage is obtained. By image analysis, the position data of each physical lamp in the panoramic image of the stage is determined, and then the scene data corresponding to the lighting control scene is obtained; the method of the present embodiment can improve the accuracy and convenience of scene data collection, as well as improve the efficiency of scene data collection.
[0126] In one embodiment, a specific implementation process of a lamp control method is provided. The lamp control method is applied to a terminal, in which an application for controlling the lamp may be installed. Figure 5 As shown, the application may include a panoramic image acquisition module, a recognition and analysis module, a communication module and a rendering module.
[0127] First, a panoramic image acquisition module is used to obtain a panoramic image of the stage with the assistance of a panoramic shooting bracket.
[0128] Second, an identification and analysis module is used to perform image analysis on the stage panoramic image and determine the lamp position data of each physical lamp; illustratively, an edge algorithm can be used to analyze the stage panoramic image, segment the bright light blocks in the stage panoramic image, and extract the position data and color value data of each bright light block in the stage panoramic image; by comparing the color value data of each bright light block with the preset luminous color value of the physical lamp, the target color block corresponding to each physical lamp is determined from each bright light block, and the position data of each physical lamp in the stage panoramic image is determined according to the position data of the target color block.
[0129] Third, the communication module can be used to communicate with the lamps and also to communicate with the server. For the lamps, the lamps can receive the control instructions sent by the terminal and perform corresponding control operations according to the control instructions, such as: emitting light, rotating, moving, etc.; for each lamp, it has a unique lamp feature code as the unique identification of the lamp. For the server, it can upload and download data, and the server's database can store data such as picture data, position data, lamp data and stage data; among them, the picture data can include a panoramic image of the stage under different lamp control scenarios; the position data can include the lamp position data under different lamp control scenarios, such as the above-mentioned interaction point data table under different lamp control scenarios; the lamp data can include the lamp operating status, lamp control data, etc.; the stage data can include the stage logo, all lamp logos corresponding to the stage logo, such as the lamp feature code of the entire stage, etc.
[0130] Among them, a stage identifier (also known as a stage scene identifier) can correspond to multiple scene identifiers (also known as performance scene identifiers), each scene identifier can correspond to at least one lighting fixture identifier, and each scene identifier can also correspond to scene data, and the scene data includes the stage identifier, the scene identifier, the stage identifier and the stage panoramic image corresponding to the scene identifier, and the lighting fixture position data. When the terminal carries the data type parameter to access the server, the server returns the data corresponding to the data type parameter to the terminal accordingly.
[0131] Exemplarily, when the data type parameter carried by the terminal includes a stage identifier and a scene identifier, the server obtains scene data corresponding to the stage identifier and the scene identifier from a database according to the stage identifier and the scene identifier, and sends the scene data to the terminal.
[0132] Exemplarily, when the data type parameter carried by the terminal includes a lamp characteristic code, the server obtains lamp data corresponding to the lamp characteristic code from the database according to the lamp characteristic code; optionally, the lamp data may include lamp operating status data, and may also include lamp control data, such as lamp luminous color, luminous duration, movement parameters, rotation parameters and other lamp control data; of course, the lamp data may also include lamp position data, or other data related to the lamp, etc.; the embodiment of the present application does not specifically limit the content of the lamp data.
[0133] Exemplarily, when the data type parameter carried by the terminal includes a stage identification, the server obtains stage data corresponding to the stage identification from the database according to the stage identification; optionally, the stage data may include all lighting data on the stage corresponding to the stage identification, scene data of different scenes corresponding to the stage identification, and stage attribute information corresponding to the stage identification, etc.; wherein the stage attribute information may include information such as stage introduction, stage address, and stage description; the embodiment of the present application does not specifically limit the content of the stage data.
[0134] Fourth, a rendering module, which is used to render the interface according to the data obtained from the server to output the corresponding display interface. Exemplarily, when the terminal obtains the scene data corresponding to the lighting control scene from the server, the rendering module can create a 3D virtual (VR) scene according to the stage panoramic image in the scene data, and then, according to the lighting position data in the scene data, the two-dimensional coordinates of each physical lighting in the lighting position data are converted into three-dimensional spherical coordinates, and the interaction points corresponding to the three-dimensional spherical coordinates of each physical lighting are created in the 3D virtual (VR) scene to form a virtual lighting with interactive functions, and finally generate a 3D virtual (VR) scene with interactive functions; finally, the 3D virtual (VR) scene is output and displayed. For this reason, the user can intuitively see the positional relationship between the physical lighting on the stage in the 3D virtual (VR) scene, and realize remote control of the corresponding physical lighting on the stage by operating the virtual lighting with interactive functions in the 3D virtual (VR) scene.
[0135] The following is a detailed introduction to the terminal obtaining the scene data corresponding to a stage scene. Figure 6 As shown, the following steps are included:
[0136] 1. The terminal sends a stage data acquisition request carrying a stage identifier (stage ID) to the server, and receives the number N of physical lamps corresponding to the stage identifier and the lamp identifier (lamp feature code) of each physical lamp returned by the server.
[0137] 2. According to the lamp feature code of each physical lamp in the stage data, create a stage lamp feature color table for the N lamps on the stage, which can refer to Table 1 above, and control the lighting of each physical lamp according to the stage lamp feature color table.
[0138] The characteristic color may be the preset luminous color of the lamp corresponding to the lamp characteristic code; the characteristic color shall meet the following requirements:
[0139] ① Uniqueness: The characteristic color is unique in the characteristic color record table;
[0140] ② Characteristic: Each characteristic color has a certain degree of distinction, which facilitates image analysis using image processing technology.
[0141] 3. Select a VR roaming point and set up a panoramic photo stand.
[0142] 4. The control terminal collects the panoramic image of the stage.
[0143] 5. Analyze the panoramic image of the stage to determine the lamp position data corresponding to each physical lamp.
[0144] 6. Determine whether full coverage is achieved. If not, jump to step 3, reselect the VR roaming point, and obtain a panoramic image of the stage covering all physical lamps on the stage.
[0145] Among them, the conditions for achieving full coverage include:
[0146] ① The characteristic color table status is all 1, which is an objective necessary condition;
[0147] ② Complete the shooting of different scenes of the entire stage and be able to describe the entire stage. This is a subjective optional condition.
[0148] That is to say, it can be determined whether the corresponding lamp position data have been determined for all physical lamps on the stage; it can also be determined whether the corresponding scene data have been determined for all performance scenes corresponding to the stage.
[0149] 7. When full coverage is achieved, the process ends. At this point, the terminal can send the scene data of all performance scenes corresponding to the stage to the server, as shown in Table 4.
[0150] For step 5 above, refer to Figure 7 As shown, the specific implementation process is as follows:
[0151] 1. Create an empty picture interaction point data table, whose table structure is shown in Table 3 above.
[0152] 2. Analyze the panoramic image of the stage and use OPENCV image processing technology to analyze the image. After segmenting the image, obtain a segmentation block corresponding to each color light. Perform coordinate and color analysis and extraction on each segmentation block to obtain the light color data and light position coordinates; take each light as an interaction point, fill its position data and color data into the interaction point data table, and the obtained Table 3 includes data in the coordinate column and block color column.
[0153] 3. Analyze the color values of each interaction point and the characteristic color table in Table 1, compare them in pairs, and find the matching characteristic colors. For example: compare the color c1 of the interaction point P1 with C1, C2, C3, etc. in the characteristic color table. After analysis and comparison, it is found that c1 is within the allowable deviation range of the characteristic color of C1. The lamp characteristic code Id1 corresponding to C1 is recorded in the lamp characteristic code of P1 in the interaction point data table, and so on; where c9, c 10 No matching characteristic color was found, so it can be determined that c9 and c 10 The corresponding bright light interaction point is not a physical light fixture on the stage. After all interaction points are processed and compared, invalid interaction points (i.e. c9, c 10 Invalid interaction points are generated because the image processing algorithm may have certain errors. Since the present application method makes a full coverage judgment, discarding it here will not affect the result), and obtain an interaction point data table. Finally, an interaction point data table of the lamp feature code corresponding to the two-dimensional coordinates of the bright light point in the current stage panoramic image is obtained, that is, the lamp position data, which includes the two-dimensional position coordinates of each physical lamp on the stage in the stage panoramic image.
[0154] It should be noted that the above examples are for all physical lamps on the stage. Of course, the lamp position data can also be determined for different performance scenes corresponding to the stage, because the physical lamps involved in different performance scenes may be different, or only some of the physical lamps on the stage may be used, rather than all of them.
[0155] 4. Update the lamp status in the characteristic color table according to the data of the current interaction point; if there is a corresponding physical lamp at the interaction point, change the lamp status corresponding to the lamp characteristic code of the physical lamp in the characteristic color table to 1.
[0156] 5. For different performance scenes corresponding to the stage, generate scene identifiers corresponding to each performance scene, such as scene UUID, upload the current stage panoramic image and the lighting position data corresponding to the stage panoramic image to the server in the format of Table 4 above, store the data, and end.
[0157] When the terminal needs to view all the performance scenes under a certain stage, it carries the stage ID and data type (scene data) to request all the scene data of the stage (i.e., the image data and position data corresponding to all the scenes) from the server. The returned data structure is shown in Table 4, and the rendering module in the terminal starts to render the panorama. Taking one of the performance scenes Scene_1_UUID as an example, when the terminal renders the current scene Scene_1_UUID, it finds the lamp position data table Data_1 corresponding to Scene_1_UUID from the scene data. The coordinates of the interaction point in Data_1 are read out, recorded as P1(x1,y1). After the conversion from two-dimensional coordinates to three-dimensional coordinates of the sphere, its three-dimensional coordinates in 3d VR are P1`(x1`,y1`,z1`). When rendering the 3d VR scene corresponding to the performance scene, an interaction point is established at point P1`(x1`,y1`,z1`), and a certain mark is rendered to distinguish that this is an interaction point, such as a virtual lamp mark. The lamp feature code corresponding to this coordinate is Id1. When the user clicks on the virtual lamp interaction point, the terminal carries the Id1 parameter to request lamp data from the server. After receiving the lamp data of Id1, the terminal displays it. The same is true for other interaction points. The user can change the VR perspective or even switch the performance scene to observe lamps from different perspectives. Clicking on the virtual lamp with a mark in the VR scene will know the detailed data of the lamp being viewed, achieving a combination of virtual and reality.
[0158] When the user wants to know where the lamp with ID3 is, he can search for it. The terminal searches all interactive data tables, and when it finds a stage panoramic image that includes ID3, it renders the 3D VR scene of the stage panoramic image and renders the 3D coordinate position corresponding to ID3 in the 3D VR scene.
[0159] The method in this embodiment can help users quickly determine which lamps are installed at different positions on site based on the stage 3D VR scene, and what you see is what you get.
[0160] In an optional embodiment, if the number of colors that a lamp can display is limited and it is not possible to make all lamps have distinguishable colors at once, the above method can be repeated in batches and executed repeatedly to confirm the lamp position information of each lamp in the performance scene. For example, there are 99 lamps on the stage, and one of them can display the least colors, only red, green and blue. According to the method of this application, reference Figure 8 As shown, the implementation steps may include:
[0161] (1) Select a VR roaming scene point.
[0162] (2) Assign characteristic colors to the three lamps that have not been turned on in this process (i.e., let the three lamps light up red, green, and blue respectively). Only three rows of data in the characteristic color table have characteristic color values, and the other characteristic colors are cleared to ensure that the other lamps do not emit light.
[0163] (3) Create an empty sub-interaction point data table, obtain the stage panoramic image at this time, analyze the stage panoramic image data, fill in the sub-interaction point data table, delete the stage panoramic image, and store the sub-interaction point data table.
[0164] (4) If the total number of lamps that light up the characteristic color in the current performance scene is less than 99, jump to step (2).
[0165] (5) After all 99 lamps have been brightened, the last stage panoramic image is retained, and the 33 sub-interaction point data tables are merged to obtain the total interaction point data table. Finally, the image data and position data are uploaded according to the format of Table 4 above, and the characteristic color table status is updated.
[0166] (6) If the full coverage condition is not met, jump to step (1).
[0167] (7) When the coverage condition is met, the process ends.
[0168] Since the shooting point remains unchanged and the panorama shooting process is standardized, the stage panorama shot for the same performance scene has the same position of lamps except for the bright lights. The merged interactive point data table can describe the relationship between lamps and positions for the last stage panorama. After the current roaming point analysis is completed, if the conditions for full coverage are not met, change the VR roaming point and repeat the above steps until the conditions for full coverage are met.
[0169] In the lamp control method proposed in this embodiment, the terminal sends different preset luminous colors to different lamps, and then obtains the stage panorama with the assistance of the panoramic shooting bracket, uses image recognition processing technology (such as OpenCV and other libraries) to extract data from the stage panorama, analyzes the corresponding relationship between the bright light color position and the preset color, and thus obtains the corresponding relationship between the bright light color position of the stage panorama and the lamps. A 3D virtual scene is constructed based on the stage panorama and the corresponding relationship to achieve the combination of virtual and reality.
[0170] The method proposed in this application enables users to quickly confirm the lamps corresponding to different positions on the stage through 3D virtual scenes and interact with them, which greatly improves the user experience. In addition, this method is low-cost, does not require hardware changes to existing lamps, and does not require the purchase of special equipment. With the help of popular smartphones, it is possible to obtain a panoramic view of the stage; the execution efficiency is high, and the positional relationship between the lamp identification in the mobile phone and the physical lamps on the stage can be confirmed in batches; the data is collected once and used multiple times. Furthermore, it also has a good user experience, a perfect combination of virtual and reality, and an immersive experience, which can improve the efficiency of lamp control.
[0171] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0172] Based on the same inventive concept, the embodiment of the present application also provides a lamp control device for implementing the lamp control method involved above. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above method, so the specific limitations in one or more lamp control device embodiments provided below can refer to the limitations on the lamp control method above, and will not be repeated here.
[0173] In one embodiment, Fig. 9 As shown, a lighting control device is provided, including: a first acquisition module 901, a first generation module 902 and a first control module 903, wherein:
[0174] The first acquisition module 901 is used to acquire scene data corresponding to the preset lamp control scene from the server according to the preset lamp control scene;
[0175] The first generating module 902 is used to perform scene rendering according to the scene data to generate a virtual stage scene corresponding to the scene data; the virtual stage scene includes a plurality of virtual lamps;
[0176] The first control module 903 is used to send a lamp control instruction to a target physical lamp corresponding to the virtual lamp in the virtual stage scene in response to a triggering operation on the virtual lamp; the lamp control instruction is used to control the target physical lamp.
[0177] In one embodiment, the lighting control scene includes a preset stage scene and a preset performance scene; according to the preset lighting control scene, the above-mentioned first acquisition module 901 includes a sending unit and a receiving unit; wherein the sending unit is used to send a scene data acquisition request to the server according to the preset stage scene and the preset performance scene; the receiving unit is used to receive the scene data corresponding to the preset stage scene and the preset performance scene sent by the server; the server stores scene data corresponding to different stage scenes and different performance scenes.
[0178] In one embodiment, the scene data includes a panoramic image of the stage corresponding to a preset lighting control scene and lighting position data, and the above-mentioned first generation module 902 includes a creation unit, a first determination unit and a generation unit; wherein the creation unit is used to create an initial virtual stage scene according to the panoramic image of the stage corresponding to the preset lighting control scene; the first determination unit is used to determine the coordinate points corresponding to multiple virtual lamps in the initial virtual stage scene according to the lighting position data; the generation unit is used to render an interactive button corresponding to each virtual lamp at each coordinate point to generate a virtual stage scene corresponding to the scene data.
[0179] In one of the embodiments, if the stage panoramic image is a two-dimensional image, and the lamp position data includes the two-dimensional spatial coordinates of multiple physical lamps on the stage panoramic image; then the above-mentioned first determination unit is used to convert the two-dimensional spatial coordinates of each physical lamp on the stage panoramic image into three-dimensional spherical coordinates of a virtual lamp corresponding to the physical lamp; the three-dimensional spherical coordinates are used to represent the coordinates of the virtual lamp in the initial virtual stage scene; according to the three-dimensional spherical coordinates of each virtual lamp, the coordinate point corresponding to each virtual lamp is determined in the initial virtual stage scene.
[0180] In one embodiment, the device further includes a second control module, a second acquisition module, a determination module and a second generation module; wherein the second control module is used to acquire, for each lighting control scene, a preset lighting state corresponding to each physical lamp in the lighting control scene, and control each physical lamp to emit light in sequence according to the preset lighting state corresponding to each physical lamp; the preset lighting state includes at least one of a preset lighting color and a preset lighting brightness; the second acquisition module is used to acquire a stage panoramic image corresponding to the lighting control scene, and identify the actual lighting state of each physical lamp from the stage panoramic image; the determination module is used to compare the actual lighting state of each physical lamp with the preset lighting state corresponding to each physical lamp, and determine the lighting position data of each physical lamp on the stage panoramic image; the second generation module is used to generate scene data corresponding to the lighting control scene according to the identification of the lighting control scene, the lighting position data of the physical lamp corresponding to the lighting control scene, and the stage panoramic image corresponding to the lighting control scene, and send the scene data corresponding to the lighting control scene to the server.
[0181] In one of the embodiments, the second control module is used to determine the target physical lamp from various physical lamps according to a preset lighting rule; the preset lighting rule includes a preset lighting sequence of each physical lamp in the lighting control scene; and the target physical lamp is controlled to emit light in sequence according to the preset lighting sequence corresponding to the physical lamp.
[0182] In one embodiment, the above-mentioned determination module includes an extraction unit, a comparison unit and a second determination unit; wherein the extraction unit is used to determine the luminous image blocks from the stage panoramic image and extract the actual luminous state of each luminous image block; the comparison unit is used to compare the actual luminous state of each luminous image block with the preset luminous state corresponding to each physical lamp, and determine the target image block corresponding to each physical lamp; the second determination unit is used to use the position data of the target image block corresponding to the physical lamp as the lamp position data of the physical lamp for each physical lamp.
[0183] Each module in the above-mentioned lamp control device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the corresponding operations of each module.
[0184] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Fig.10As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a lamp control method is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a key, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse, etc.
[0185] Those skilled in the art will understand that Fig.10 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0186] In one embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and the processor implements the steps of the lamp control method in the above embodiments when executing the computer program.
[0187] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the lamp control method in the above embodiments are implemented.
[0188] In one embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps of the lamp control method in the above embodiments are implemented.
[0189] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0190] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0191] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be construed as limiting the scope of the present application. It should be noted that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A lamp control method, characterized in that: The method comprises: According to the preset lamp control scene, acquiring scene data corresponding to the preset lamp control scene from the server; Perform scene rendering according to the scene data to generate a virtual stage scene corresponding to the scene data; the virtual stage scene includes a plurality of virtual lamps; In response to a triggering operation on a virtual lamp in the virtual stage scene, a lamp control instruction is sent to a target physical lamp corresponding to the virtual lamp; the lamp control instruction is used to control the target physical lamp; The method further comprises: For each lamp control scene, a preset lighting state corresponding to each physical lamp in the lamp control scene is obtained, and each physical lamp is controlled to emit light in sequence according to the preset lighting state corresponding to each physical lamp; the preset lighting state includes at least one of a preset lighting color and a preset lighting brightness; Acquire a stage panoramic image corresponding to the lamp control scene, and identify the actual lighting state of each of the physical lamps from the stage panoramic image; Compare the actual lighting state of each of the physical lamps with the preset lighting state corresponding to each of the physical lamps to determine the lamp position data of each of the physical lamps on the stage panoramic image; According to the identifier of the lighting control scene, the lighting position data of the physical lighting corresponding to the lighting control scene, and the stage panoramic image corresponding to the lighting control scene, scene data corresponding to the lighting control scene is generated, and the scene data corresponding to the lighting control scene is sent to the server.
2. The method according to claim 1, characterized in that The lighting control scene includes a preset stage scene and a preset performance scene; the step of obtaining scene data corresponding to the preset lighting control scene from a server according to the preset lighting control scene includes: According to the preset stage scene and the preset performance scene, a scene data acquisition request is sent to the server; The scene data corresponding to the preset stage scene and the preset performance scene are received from the server; the scene data corresponding to different stage scenes and different performance scenes are stored in the server.
3. The method according to claim 1 or 2, characterized in that: The scene data includes a stage panoramic image and lamp position data corresponding to the preset lamp control scene, and the scene rendering is performed according to the scene data to generate a virtual stage scene corresponding to the scene data, including: Creating an initial virtual stage scene according to the stage panoramic image corresponding to the preset lighting control scene; Determining coordinate points corresponding to the plurality of virtual lamps in the initial virtual stage scene according to the lamp position data; An interactive button corresponding to each of the virtual lamps is rendered at each of the coordinate points to generate a virtual stage scene corresponding to the scene data.
4. The method according to claim 3, characterized in that If the stage panoramic image is a two-dimensional image, and the lamp position data includes the two-dimensional spatial coordinates of a plurality of physical lamps on the stage panoramic image; then determining the coordinate points corresponding to the plurality of virtual lamps in the initial virtual stage scene according to the lamp position data includes: For each physical lamp's two-dimensional spatial coordinate on the stage panoramic image, convert the two-dimensional spatial coordinate into a three-dimensional spherical coordinate of a virtual lamp corresponding to the physical lamp; the three-dimensional spherical coordinate is used to represent the coordinate of the virtual lamp in the initial virtual stage scene; According to the three-dimensional spherical coordinates of each virtual lamp, a coordinate point corresponding to each virtual lamp is determined in the initial virtual stage scene.
5. The method according to claim 1, characterized in that The controlling each of the physical lamps to emit light in sequence according to a preset light-emitting state corresponding to each of the physical lamps comprises: Determine a target physical lamp from each of the physical lamps according to a preset lighting rule; the preset lighting rule includes a preset lighting order of each physical lamp in the lamp control scene; The target physical lamps are controlled to emit light in sequence according to a preset light-emitting sequence corresponding to the physical lamps.
6. The method according to claim 1, characterized in that The comparing the actual lighting state of each of the physical lamps with the preset lighting state corresponding to each of the physical lamps to determine the lamp position data of each of the physical lamps on the stage panoramic image includes: Determine the luminous image blocks from the stage panoramic image, and extract the actual luminous state of each luminous image block; Comparing the actual luminous state of each luminous image block with the preset luminous state corresponding to each physical lamp, and determining the target image block corresponding to each physical lamp; For each of the physical lamps, the position data of the target image block corresponding to the physical lamp is used as the lamp position data of the physical lamp.
7. A lighting control device, characterized in that: The device comprises: A first acquisition module, configured to acquire scene data corresponding to a preset lamp control scene from a server according to the preset lamp control scene; A first generating module, configured to perform scene rendering according to the scene data, and generate a virtual stage scene corresponding to the scene data; the virtual stage scene includes a plurality of virtual lamps; A first control module, configured to send a lamp control instruction to a target physical lamp corresponding to the virtual lamp in the virtual stage scene in response to a triggering operation on the virtual lamp; the lamp control instruction is used to control the target physical lamp; A second control module is used to obtain, for each lamp control scene, a preset lighting state corresponding to each physical lamp in the lamp control scene, and control each physical lamp to emit light in sequence according to the preset lighting state corresponding to each physical lamp; the preset lighting state includes at least one of a preset lighting color and a preset lighting brightness; A second acquisition module is used to acquire a stage panoramic image corresponding to the lamp control scene, and identify the actual lighting state of each of the physical lamps from the stage panoramic image; A determination module, used to compare the actual lighting state of each of the physical lamps with the preset lighting state corresponding to each of the physical lamps, and determine the lamp position data of each of the physical lamps on the stage panoramic image; The second generating module is used to generate scene data corresponding to the lighting control scene according to the identifier of the lighting control scene, the lighting position data of the physical lighting corresponding to the lighting control scene, and the stage panoramic image corresponding to the lighting control scene, and send the scene data corresponding to the lighting control scene to the server.
8. The device according to claim 7, characterized in that The lighting control scene includes a preset stage scene and a preset performance scene; the first acquisition module includes a sending unit and a receiving unit, wherein: The sending unit is used to send a scene data acquisition request to the server according to the preset stage scene and the preset performance scene; The receiving unit is used to receive the scene data corresponding to the preset stage scene and the preset performance scene sent by the server; the scene data corresponding to different stage scenes and different performance scenes are stored in the server.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, 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 6 are implemented.
