A method, device, electronic device and medium for aligning virtual and real lights
By obtaining and comparing the lighting illumination information of the actual scene and the virtual scene, and using the control algorithm to adjust the lighting parameters, the problem of low efficiency and poor effect of virtual and real lighting alignment in the existing technology is solved, and more efficient and accurate lighting alignment is achieved to ensure to ensure the authenticity of the shooting effect.
Patent Information
- Application Number
- CN202311422794.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-27
- Publication Date
- 2024-10-25
- Estimated Expiration
- 2043-10-27
AI Technical Summary
In the existing technology, the efficiency of virtual and real light alignment is low and the effect is not good. It mainly relies on manual adjustment of light intensity and cannot guarantee the consistency of light conditions.
By obtaining the light illumination information in the actual scene and the virtual scene, using the preset control algorithm to calculate the difference value, and adjusting the lighting parameters of the actual scene to make the actual light illumination consistent with the virtual light illumination, achieving virtual and real light alignment.
It improves the efficiency and effect of virtual and real lighting alignment, ensures the consistency of lighting conditions at corresponding locations, and achieves more realistic shooting effects.
Smart Images

Figure CN117496095B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of computer technology, and in particular to a method, device, electronic device and computer storage medium for aligning virtual and real lights. Background Art
[0002] Screen-based (such as LED screen) virtual shooting is achieved by projecting the rendered image of the virtual asset scene rendered by the virtual engine onto the LED screen for display. The actors then perform using the LED screen as the background. The image acquisition device simultaneously shoots the actors and the LED screen. Afterwards, the captured camera image is synthesized with the rendered image, thereby placing the real actors in the virtual scene and achieving the effect of shooting exterior scenes or science fiction backgrounds in a studio.
[0003] Aligning virtual and real lighting refers to aligning the lighting at the actual foreground shooting position of the shooting scene with the lighting in the virtual asset scene. Specifically, it makes the illumination of the light at the actual foreground shooting position consistent with the illumination of the virtual lighting at the corresponding position in the virtual asset scene. In virtual shooting projects based on LED screens, aligning virtual and real lighting is an important prerequisite for obtaining realistic and vivid shooting effects.
[0004] In the related art, the intensity of the actual light is mainly adjusted manually, and whether the alignment of the virtual and real lights is achieved is visually intuitively. This method is inefficient and the alignment effect is poor. Summary of the invention
[0005] In view of this, an embodiment of the present application provides a virtual and real light alignment solution to at least partially solve the above-mentioned problem.
[0006] According to a first aspect of an embodiment of the present application, a method for aligning virtual and real lights is provided, comprising:
[0007] Acquire actual light illumination information at a target position in an actual scene and virtual light illumination information at a virtual position; the virtual position is a position in the virtual scene corresponding to the target position in the actual scene;
[0008] The difference value between the actual lighting illumination information and the virtual lighting illumination information is used as the input of a preset control algorithm, a lighting parameter control signal is output through the preset control algorithm, and the lighting parameters of the actual scene are controlled based on the lighting parameter control signal, so that the difference value between the actual lighting illumination information and the virtual lighting illumination information is less than a preset difference threshold.
[0009] According to a second aspect of an embodiment of the present application, a virtual and real light alignment device is provided, comprising:
[0010] An illumination information acquisition module, used to acquire actual light illumination information at a target position in an actual scene and virtual light illumination information at a virtual position; the virtual position is a position in the virtual scene corresponding to the target position in the actual scene;
[0011] A control module is used to use the difference value between the actual lighting illumination information and the virtual lighting illumination information as an input of a preset control algorithm, output a lighting parameter control signal through the preset control algorithm, and control the lighting parameters of the actual scene based on the lighting parameter control signal so that the difference value between the actual lighting illumination information and the virtual lighting illumination information is less than a preset difference threshold.
[0012] According to the third aspect of an embodiment of the present application, there is provided an electronic device, comprising: a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other through the communication bus; the memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform an operation corresponding to the method described in the first aspect.
[0013] According to a fourth aspect of an embodiment of the present application, a computer storage medium is provided, on which a computer program is stored. When the program is executed by a processor, the method described in the first aspect is implemented.
[0014] According to the virtual light alignment scheme provided in the embodiment of the present application, starting from the perspective of the light illumination received at the illuminated position, the actual light illumination at the target position in the actual scene and the virtual light illumination at the virtual position in the virtual scene are obtained, and then based on the difference between the actual light illumination and the virtual light illumination, the light parameters of the actual scene are controlled by the control algorithm, and the light illumination at the target position in the actual scene is made consistent with the light illumination in the virtual scene through continuous adjustment, thus completing the virtual and real light alignment. Compared with the light alignment method in the related art that mainly relies on manual implementation, the embodiment of the present application can better ensure the consistency of the light conditions at the virtual and real corresponding positions, with better alignment effect and higher efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the embodiments of the present application. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0016] Figure 1 A flowchart of a method for aligning virtual and real lights according to Embodiment 1 of the present application;
[0017] Figure 2 is a flowchart of another method for aligning virtual and real lights according to the second embodiment of the present application;
[0018] Figure 3 is a structural block diagram of a virtual-real light alignment device according to Embodiment 3 of the present application;
[0019] Figure 4 This is a schematic diagram of the structure of an electronic device according to the fourth embodiment of the present application. DETAILED DESCRIPTION
[0020] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the embodiments of the present application should fall within the scope of protection of the embodiments of the present application.
[0021] In order to save shooting costs, virtual shooting technology can be used for video or picture shooting. Before shooting, a virtual scene can be rendered in advance through a rendering server equipped with a virtual rendering engine. During the subsequent shooting process, part of the virtual image in the rendered virtual scene can be projected onto the display screen as the background of the video or picture.
[0022] Specifically, the principle of virtual shooting is:
[0023] Before shooting, physical objects such as a physical screen and a physical camera are set in the actual shooting scene; correspondingly, virtual objects such as a virtual screen and a virtual camera are also set in the virtual scene rendered by the rendering server. The virtual camera is used to perform virtual shooting in the virtual scene, that is, to capture the virtual picture within the preset shooting angle range, and map the virtual picture to the virtual screen. In addition, in the actual scene, the above virtual picture is also rendered on the physical screen. To ensure the shooting effect, the virtual screen usually has the same parameters as the physical screen, such as screen size, screen setting direction, etc. In the above process, since the virtual picture has been mapped to the virtual screen in the virtual scene, and the virtual screen and the physical screen have the same parameters, it can be guaranteed that the virtual picture finally rendered to the physical screen is adapted to the physical screen.
[0024] During the shooting process, the actors can perform in front of the physical screen, and the physical camera will shoot the actors and the physical screen at the same time. Afterwards, the captured camera image will be merged with the virtual scene, so as to place the real actors in the virtual scene and achieve the effect of shooting exterior scenes or science fiction backgrounds in the studio.
[0025] In virtual shooting technology, before the formal shooting, it is necessary to align the virtual and real lights, and control the difference between the actual light illumination in the actual foreground shooting area of the shooting scene and the virtual light illumination within a certain range. In this way, the shooting effect obtained by virtual shooting technology can be real and vivid.
[0026] Currently, one way to achieve virtual and real light alignment is to rely on manually adjusting the intensity of the actual light and visually feel whether the virtual and real light alignment is achieved. This method is inefficient and the alignment effect is poor.
[0027] Another method for aligning virtual and real lights is provided in the related art, which is mainly to keep the placement of the actual lamps in the actual scene consistent with the position of the virtual lamps in the virtual scene, and to set the same lighting parameters for both the actual lamps and the virtual lamps. However, due to the influence of various uncertain factors in reality, it is impossible to guarantee that the actual lamps and the virtual lamps are completely consistent. Therefore, even if the lighting parameters of the two are set to the same value, it is impossible to guarantee that the actual lamps and the virtual lamps emit the same conditions of light to achieve alignment of virtual and real lights.
[0028] The virtual-real lighting alignment solution provided in the embodiment of the present application starts from the perspective of the lighting illumination received at the illuminated position, obtains the actual lighting illumination at the target position in the actual scene and the virtual lighting illumination at the virtual position in the virtual scene, and then controls the lighting parameters of the actual scene through a control algorithm based on the difference between the actual lighting illumination and the virtual lighting illumination, and continuously adjusts the lighting illumination at the target position in the actual scene to be consistent with the lighting illumination in the virtual scene, thereby completing the virtual-real lighting alignment. Therefore, the embodiment of the present application can better ensure the consistency of lighting conditions at the virtual-real corresponding positions, achieve better alignment effects, and be more efficient.
[0029] The specific implementation of the embodiment of the present application is further explained below in conjunction with the accompanying drawings of the embodiment of the present application.
[0030] Embodiment 1
[0031] Reference Figure 1 , Figure 1 The following is a flowchart of a virtual light alignment method according to the first embodiment of the present application. Specifically, the virtual light alignment method provided in this embodiment includes the following steps:
[0032] Step 102: Acquire actual light illumination information at a target position in an actual scene and virtual light illumination information at a virtual position.
[0033] The virtual position is a position in the virtual scene that corresponds to the target position in the actual scene.
[0034] In virtual shooting, in order to ensure that the background has a realistic and vivid visual effect, the rendered virtual scene is spatially aligned with the actual scene, that is, the rendered virtual scene contains virtual objects corresponding to the physical objects in the actual scene, and the relative positions between the virtual objects are consistent with the relative positions between the corresponding physical objects.
[0035] For example, if you want to shoot a video clip with a classroom as the background, you can use the rendering server to render a virtual classroom scene in advance, which may include virtual objects such as virtual desks, virtual display screens, virtual cameras, virtual lamps, virtual podiums, virtual blackboards, etc. The relative positions of the virtual objects such as virtual desks, virtual display screens, virtual cameras, etc. may be consistent with the relative positions of real desks, real display screens, and real cameras in the actual scene.
[0036] In this step, the actual light illumination information at the target position in the actual scene and the virtual light illumination information at the virtual position corresponding to the target position in the actual scene are obtained. The actual light illumination information represents the luminous flux received per unit area at the target position in the actual scene, that is, how much light is received per unit area at the target position; the virtual light illumination information represents the luminous flux received per unit area at the virtual position in the virtual scene, that is, how much light is received per unit area at the virtual position.
[0037] In the embodiment of the present application, there is no limitation on the method of selecting the target position, and the target position can be customized according to the actual shooting requirements. In addition, the target position can be a fixed position during the shooting process, or a position that changes with the shooting requirements. For example, the center position of the camera shooting range can be determined as the target position. In this case, the target position is fixed during the shooting process; the position of the actor can also be determined as the target position, and when the actor moves, the target position also changes accordingly.
[0038] In the embodiment of the present application, when obtaining the actual light illumination information at the target position in the actual scene, an illuminance meter can be used. Specifically, an illuminance meter can be placed at the target position to obtain the actual light illumination information at the position. When obtaining the virtual light illumination information at the virtual position in the virtual scene, it can be obtained based on the virtual rendering engine.
[0039] Step 104, using the difference value between the actual lighting illumination information and the virtual lighting illumination information as the input of the preset control algorithm, outputting a lighting parameter control signal through the preset control algorithm, and controlling the lighting parameters of the actual scene based on the lighting parameter control signal, so that the difference value between the actual lighting illumination information and the virtual lighting illumination information is less than a preset difference threshold.
[0040] Specifically, this step can calculate the difference between the actual lighting illumination information and the virtual lighting illumination information, and use the difference as the input of the preset control algorithm, use the lighting parameter control signal as the output of the preset control algorithm, and use the preset control algorithm to obtain the lighting parameter control signal. Then, based on the obtained lighting parameter control signal, the lighting parameters of the actual scene are controlled so that the difference between the actual lighting illumination information and the virtual lighting illumination information is less than the preset difference threshold.
[0041] The lighting parameters may include: lighting brightness, and further, may include: lighting chromaticity, saturation, contrast, etc.
[0042] The specific control process can be: calculate the difference between the actual light illumination information and the virtual light illumination information, use the preset control algorithm to calculate based on the above difference value, and obtain the light parameter control signal; send the obtained light parameter control signal to the dimming module in the lamp, and the dimming module adjusts the light parameters of the lamp according to the received light parameter control signal. As the light parameters change, the actual light illumination information at the target position also changes, and then, the difference between the actual light illumination information and the virtual light illumination information also changes accordingly; repeat the above process continuously, and by continuously adjusting the light parameter control signal, the actual light illumination at the target position of the lamp can be continuously close to the virtual light illumination at the virtual position; at the same time, the actual light illumination is continuously monitored to realize feedback control, and the light parameter control signal is further corrected, so as to realize more precise control, and finally the difference between the actual light illumination information and the virtual light illumination information is less than the preset difference threshold.
[0043] In the embodiment of the present application, there is no limitation on the specific control algorithm to be used, and it can be customized according to actual needs, for example: proportional control algorithm, integral control algorithm, differential control algorithm, or a combination of the above control algorithms, etc. In addition, in the embodiment of the present application, there is no limitation on the specific transmission method used when sending the lighting parameter control signal to the dimming module in the lamp, and it can be customized according to actual conditions, for example: a general data transmission protocol can be used for transmission, or a transmission protocol dedicated to control signal transmission (such as: DMX, digital multiplex) protocol can be used, etc.
[0044] The virtual light alignment method provided in the embodiment of the present application starts from the perspective of the light illumination received at the position illuminated by the light, obtains the actual light illumination at the target position in the actual scene and the virtual light illumination at the virtual position in the virtual scene, and then controls the light parameters of the actual scene through a control algorithm based on the difference between the actual light illumination and the virtual light illumination, and continuously adjusts the light illumination at the target position in the actual scene to be consistent with the light illumination in the virtual scene, thereby completing the alignment of virtual and real lights. Compared with the light alignment method in the related art, the embodiment of the present application can better ensure the consistency of the light conditions at the corresponding virtual and real positions, achieve better alignment effect, and be more efficient.
[0045] Optionally, in some of the embodiments, a virtual target object with known lighting property information is set at the virtual position. Correspondingly, the process of obtaining virtual light illumination information at the virtual position in step 102 may include:
[0046] In the virtual scene, determining a virtual position corresponding to a target position in the actual scene;
[0047] Based on the virtual position, obtaining virtual brightness information of the virtual target object;
[0048] Based on the virtual brightness information, the lighting attribute information, and the preset relationship between the virtual brightness information, the lighting attribute information and the virtual light illumination information, the virtual light illumination information at the virtual position is calculated.
[0049] Specifically, the lighting attribute information of the virtual target object refers to the attribute information of the virtual target object under lighting conditions. The virtual brightness information refers to the brightness information of the virtual target object under the illumination of virtual lights.
[0050] For a target object with known lighting properties, the brightness information irradiated to the target object and the illumination information irradiated to the target object satisfy a certain relationship. Therefore, in the embodiment of the present application, a virtual target object with known lighting properties can be set at a virtual position, and then the virtual light illumination information at the virtual position can be obtained by a preset relationship reasoning calculation method. The above method of obtaining virtual light illumination information has a simple calculation process and high calculation efficiency.
[0051] In the embodiment of the present application, there is no limitation on the shape, size, material, etc. of the virtual target object, and any virtual target object with known lighting property information can be used.
[0052] Optionally, in some of the embodiments, the illumination attribute information includes the reflection characteristics of the surface of the virtual target object to light, and the reflection characteristics include reflectivity and surface structure; correspondingly, based on the virtual brightness information, the illumination attribute information, and the preset relationship between the virtual brightness information, the illumination attribute information and the virtual light illumination information, the virtual light illumination information at the virtual position is calculated, including:
[0053] Based on the virtual brightness information and the light attribute information, the virtual light illumination information at the virtual position is calculated using a preset relationship;
[0054] The default relationship is:
[0055] π*L=E*R
[0056] Among them, L is the virtual brightness information of the virtual target object at the virtual position; E is the virtual light illumination information at the virtual position; R is the reflectivity information of the virtual target object; and π is the pi.
[0057] Specifically, the above process is based on the relationship between the lighting attribute information, virtual brightness information and virtual light illumination information. The virtual light illumination information at the virtual position can be obtained through inference calculation. The calculation process is simple and efficient.
[0058] Optionally, in some of the embodiments, determining, in the virtual scene, a virtual position corresponding to a target position in the actual scene includes:
[0059] Obtaining the relative position relationship between the target position in the actual scene and the display screen in the actual scene;
[0060] Based on the relative position relationship and the position information of the virtual screen in the virtual scene, a virtual position corresponding to the target position in the actual scene is determined in the virtual scene.
[0061] Specifically, as pointed out in the above description of step 102, the rendered virtual scene is spatially aligned with the actual scene. Therefore, in an embodiment of the present application, the virtual position in the virtual scene can be calculated based on the relative position relationship between the target position and the display screen in the actual scene, as well as the position of the virtual screen in the virtual scene, so that the relative position relationship between the virtual position and the virtual screen is the same as the relative position relationship between the target position and the display screen in the actual scene.
[0062] Optionally, in some of the embodiments, the preset control algorithm is a proportional integral differential control algorithm; the difference between the actual lighting illumination information and the virtual lighting illumination information is used as the input of the preset control algorithm, and the lighting parameter control signal is output through the preset control algorithm, including:
[0063] Calculating the difference between the actual light illumination information and the virtual light illumination information, and calculating the integral of the difference and the differential of the difference;
[0064] Obtain the proportional weight, integral weight and differential weight in the proportional integral derivative control algorithm;
[0065] Based on the proportional weight, integral weight and differential weight, the difference value, the integral of the difference value and the differential of the difference value are weightedly fused to obtain the lighting parameter control signal output by the proportional integral differential control algorithm.
[0066] Specifically, in the embodiments of the present application, there is no limitation on the value-taking principles of proportional weight, integral weight and differential weight, and they can be customized according to actual conditions.
[0067] In the above process, the lighting parameter control information is output through the proportional-integral-differential control algorithm. Among them, the proportional control can adjust the output of the control algorithm according to the size of the current difference value. When the difference value is large, the output signal is also large, thereby accelerating the response speed of the actual lighting illumination information. Therefore, the difference value between the actual lighting illumination information and the virtual lighting illumination information can quickly approach the preset difference threshold; the integral control can adjust the output signal according to the amount of difference value accumulated over time, thereby eliminating the steady-state error and ensuring that the difference value is finally stabilized near the preset difference threshold; the differential control can adjust the output signal according to the rate of change of the difference value, thereby reducing overshoot and improving stability. In summary, the use of the proportional-integral-differential control algorithm to calculate the lighting parameter control signal can achieve stable and accurate control of the difference value between the actual lighting illumination information and the virtual lighting illumination information, thereby improving the accuracy and stability of virtual lighting alignment.
[0068] Embodiment 2
[0069] Reference Figure 2 , Figure 2 The figure is a flowchart of another virtual light alignment method according to the second embodiment of the present application.
[0070] Specifically, the virtual light alignment method provided in this embodiment includes the following steps:
[0071] Step 202: Acquire actual light illumination information at a target position in an actual scene and virtual light illumination information at a virtual position.
[0072] The virtual position is a position in the virtual scene that corresponds to the target position in the actual scene.
[0073] In step 204, the difference between the actual lighting illumination information and the virtual lighting illumination information is used as an input of a preset control algorithm, a lighting parameter control signal is output through the preset control algorithm, and the lighting parameters of the actual scene are controlled based on the lighting parameter control signal so that the difference between the actual lighting illumination information and the virtual lighting illumination information is less than a preset difference threshold.
[0074] Step 202 and step 204 in the embodiment of the present application are Figure 1 Step 102 and step 104 in the illustrated embodiment 1 are the same, and the specific contents refer to the above-mentioned steps 102 and 104, which will not be repeated here.
[0075] Step 206, detect whether the preset virtual and real light alignment trigger condition is currently met. If it is met, return to step 202; if not, end the process.
[0076] In the embodiment of the present application, the specific content of the virtual light alignment trigger condition is not limited and can be customized according to actual conditions. For example, when the virtual image projected onto the display screen is switched, it is determined that the virtual light alignment trigger condition is met; for example, when the change in the virtual light illumination at the virtual position in the virtual scene is detected to be greater than a preset change threshold, it is determined that the virtual light alignment trigger condition is met, and so on.
[0077] The virtual light alignment method provided in the embodiment of the present application starts from the perspective of the light illumination received at the position illuminated by the light, obtains the actual light illumination at the target position in the actual scene and the virtual light illumination at the virtual position in the virtual scene, and then controls the light parameters of the actual scene through a control algorithm based on the difference between the actual light illumination and the virtual light illumination, and continuously adjusts the light illumination at the target position in the actual scene to be consistent with the light illumination in the virtual scene, thereby completing the alignment of virtual and real lights. Compared with the light alignment method in the related art, the embodiment of the present application can better ensure the consistency of the light conditions at the corresponding virtual and real positions, achieve better alignment effect, and be more efficient.
[0078] In addition, after the virtual light alignment is realized, the embodiment of the present application also detects whether the virtual and real light alignment trigger conditions are currently met. When it is detected that the above conditions are currently met, the virtual and real light alignment method provided by the embodiment of the present application is executed again. In this way, when the virtual light illumination at the virtual position changes, the actual light illumination information at the target position in the actual scene can be automatically and timely adjusted, thereby re-realizing the alignment of the virtual light, thereby improving the shooting effect of the virtual shooting.
[0079] Embodiment 3
[0080] Figure 3This is a structural block diagram of a virtual-real light alignment device according to Embodiment 3 of the present application. The device comprises:
[0081] The illumination information acquisition module 302 is used to acquire the illumination information of the actual light at the target position in the actual scene and the illumination information of the virtual light at the virtual position; the virtual position is the position in the virtual scene corresponding to the target position in the actual scene;
[0082] The control module 304 is used to use the difference value between the actual lighting illumination information and the virtual lighting illumination information as the input of the preset control algorithm, output the lighting parameter control signal through the preset control algorithm, and control the lighting parameters of the actual scene based on the lighting parameter control signal so that the difference value between the actual lighting illumination information and the virtual lighting illumination information is less than the preset difference threshold.
[0083] Optionally, in some of the embodiments, a virtual target object with known illumination property information is set at the virtual position; the illumination information acquisition module 302, when executing the step of acquiring the virtual light illumination information at the virtual position, is specifically used to:
[0084] In the virtual scene, determining a virtual position corresponding to a target position in the actual scene;
[0085] Based on the virtual position, obtaining virtual brightness information of the virtual target object;
[0086] Based on the virtual brightness information, the lighting attribute information, and the preset relationship between the virtual brightness information, the lighting attribute information and the virtual light illumination information, the virtual light illumination information at the virtual position is calculated.
[0087] Optionally, in some of the embodiments, the illumination information acquisition module 302, when executing the step of determining a virtual position corresponding to a target position in an actual scene in a virtual scene, is specifically configured to:
[0088] Obtaining the relative position relationship between the target position in the actual scene and the display screen in the actual scene;
[0089] Based on the relative position relationship and the position information of the virtual screen in the virtual scene, a virtual position corresponding to the target position in the actual scene is determined in the virtual scene.
[0090] Optionally, in some of the embodiments, the preset control algorithm is a proportional integral differential control algorithm; the control module 304, when executing the step of taking the difference between the actual lighting illumination information and the virtual lighting illumination information as the input of the preset control algorithm and outputting the lighting parameter control signal through the preset control algorithm, is specifically used to:
[0091] Calculating the difference between the actual light illumination information and the virtual light illumination information, and calculating the integral of the difference and the differential of the difference;
[0092] Obtain the proportional weight, integral weight and differential weight in the proportional integral derivative control algorithm;
[0093] Based on the proportional weight, integral weight and differential weight, the difference value, the integral of the difference value and the differential of the difference value are weightedly fused to obtain the lighting parameter control signal output by the proportional integral differential control algorithm.
[0094] Optionally, in some of the embodiments, the virtual-real light alignment device further comprises:
[0095] The detection module is used to control the lighting parameters of the actual scene based on the lighting parameter control signal so that the difference between the actual lighting illumination information and the virtual lighting illumination information is less than the preset difference threshold, and then detect whether the preset virtual-real lighting alignment trigger condition is currently met; if so, the illumination information acquisition module 302 is triggered.
[0096] Optionally, in some of the embodiments, the illumination attribute information includes reflection characteristics of the surface of the virtual target object to light, and the reflection characteristics include: reflectivity and surface structure; the illumination information acquisition module 302, when executing the step of calculating the virtual light illumination information at the virtual position based on the virtual brightness information, the illumination attribute information, and the preset relationship satisfied between the virtual brightness information, the illumination attribute information and the virtual light illumination information, is specifically used to:
[0097] Based on the virtual brightness information and the light attribute information, the virtual light illumination information at the virtual position is calculated using a preset relationship;
[0098] The default relationship is:
[0099] π*L=E*R
[0100] Among them, L is the virtual brightness information of the virtual target object at the virtual position; E is the virtual light illumination information at the virtual position; R is the reflectivity information of the virtual target object; and π is the pi.
[0101] The virtual-real light alignment device of this embodiment is used to implement the corresponding virtual-real light alignment method in the aforementioned virtual-real light alignment method embodiment, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here. In addition, the functional implementation of each module in the virtual-real light alignment device of this embodiment can refer to the description of the corresponding parts in the aforementioned method embodiment, which will not be described in detail here.
[0102] Embodiment 4
[0103] Reference Figure 4, shows a schematic diagram of the structure of an electronic device according to the fourth embodiment of the present application. The specific embodiment of the present application does not limit the specific implementation of the electronic device.
[0104] like Figure 4 As shown, the control terminal may include: a processor (processor) 402, a communication interface (Communications Interface) 404, a memory (memory) 406, and a communication bus 408.
[0105] in:
[0106] The processor 402 , the communication interface 404 , and the memory 406 communicate with each other via a communication bus 408 .
[0107] The communication interface 404 is used to communicate with other electronic devices or servers.
[0108] The processor 402 is used to execute the program 410, and specifically can execute the relevant steps in the above-mentioned embodiment of the virtual and real light alignment method.
[0109] Specifically, the program 410 may include program codes, which include computer operation instructions.
[0110] The processor 402 may be a CPU, or an application specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present application. The one or more processors included in the smart device may be processors of the same type, such as one or more CPUs; or processors of different types, such as one or more CPUs and one or more ASICs.
[0111] The memory 406 is used to store the program 410. The memory 406 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0112] The program 410 may include multiple computer instructions. Specifically, the program 410 may enable the processor 402 to execute operations corresponding to the methods described in the aforementioned multiple method embodiments through the multiple computer instructions.
[0113] The specific implementation of each step in program 410 can refer to the corresponding description of the corresponding steps and units in the above method embodiment, and has corresponding beneficial effects, which will not be repeated here. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process of the above-described devices and modules can refer to the corresponding process description in the above method embodiment, which will not be repeated here.
[0114] The present application also provides a computer storage medium on which a computer program is stored, and when the program is executed by a processor, the method described in any of the above-mentioned multiple method embodiments is implemented. The computer storage medium includes but is not limited to: a compact disc read-only memory (CD-ROM), a random access memory (RAM), a floppy disk, a hard disk or a magneto-optical disk, etc.
[0115] An embodiment of the present application also provides a computer program product, including computer instructions, which instruct a computing device to execute operations corresponding to any one of the above-mentioned multiple method embodiments.
[0116] In addition, it should be noted that the user-related information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to sample data used to train the model, data used for analysis, stored data, displayed data, etc.) involved in the embodiments of the present application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data need to comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0117] It should be pointed out that, according to the needs of implementation, the various components / steps described in the embodiments of the present application can be split into more components / steps, or two or more components / steps or partial operations of components / steps can be combined into new components / steps to achieve the purpose of the embodiments of the present application.
[0118] The above-mentioned method according to the embodiment of the present application can be implemented in hardware, firmware, or implemented as software or computer code that can be stored in a recording medium (such as a CD-ROM, RAM, floppy disk, hard disk or magneto-optical disk), or implemented as a computer code originally stored in a remote recording medium or a non-temporary machine-readable medium downloaded through a network and stored in a local recording medium, so that the method described herein can be stored in such software processing on a recording medium using a general-purpose computer, a dedicated processor or programmable or dedicated hardware (such as an application-specific integrated circuit (ASIC) or a field programmable gate array (FPGA)). It can be understood that a computer, a processor, a microprocessor controller or programmable hardware includes a storage component (e.g., a random access memory (RAM), a read-only memory (ROM), a flash memory, etc.) that can store or receive software or computer code, and when the software or computer code is accessed and executed by a computer, a processor or hardware, the method described herein is implemented. In addition, when a general-purpose computer accesses the code for implementing the method shown here, the execution of the code converts the general-purpose computer into a dedicated computer for executing the method shown here.
[0119] Those of ordinary skill in the art will appreciate that the units and method steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the embodiments of the present application.
[0120] The above implementation methods are only used to illustrate the embodiments of the present application, and are not limitations on the embodiments of the present application. Ordinary technicians in the relevant technical field can make various changes and modifications without departing from the spirit and scope of the embodiments of the present application. Therefore, all equivalent technical solutions also belong to the scope of the embodiments of the present application. The scope of patent protection of the embodiments of the present application should be limited by the claims.
Claims
1. A virtual and real light alignment method, comprising: Obtaining actual light illumination information at a target position in an actual scene and virtual light illumination information at a virtual position; The virtual position is a position in the virtual scene corresponding to the target position in the actual scene; Taking the difference between the actual lighting illumination information and the virtual lighting illumination information as the input of a preset control algorithm, outputting a lighting parameter control signal through the preset control algorithm, and controlling the lighting parameters of the actual scene based on the lighting parameter control signal, so that the difference between the actual lighting illumination information and the virtual lighting illumination information is less than a preset difference threshold; Wherein, a virtual target object with known illumination property information is set at the virtual position; the process of obtaining virtual light illumination information at the virtual position includes: determining a virtual position corresponding to the target position in the actual scene in the virtual scene; obtaining virtual brightness information of the virtual target object based on the virtual position; and calculating the virtual light illumination information at the virtual position based on the virtual brightness information, the illumination property information, and a preset relationship satisfied among the virtual brightness information, the illumination property information and the virtual light illumination information; The illumination attribute information includes the reflection characteristics of the surface of the virtual target object to light, and the reflection characteristics include: reflectivity and surface structure.
2. The method according to claim 1, wherein: Determining, in the virtual scene, a virtual position corresponding to the target position in the actual scene includes: Obtaining the relative position relationship between the target position in the actual scene and the display screen in the actual scene; Based on the relative position relationship and the position information of the virtual screen in the virtual scene, a virtual position corresponding to the target position in the actual scene is determined in the virtual scene.
3. The method according to any one of claims 1 to 2, wherein: The preset control algorithm is a proportional-integral-differential control algorithm; the difference between the actual lighting illumination information and the virtual lighting illumination information is used as the input of the preset control algorithm, and the lighting parameter control signal is output through the preset control algorithm, including: Calculating a difference value between the actual light illumination information and the virtual light illumination information, and calculating an integral of the difference value and a differential of the difference value; Obtain the proportional weight, integral weight and differential weight in the proportional integral derivative control algorithm; Based on the proportional weight, integral weight and differential weight, the difference value, the integral of the difference value and the differential of the difference value are weightedly fused to obtain a lighting parameter control signal output by the proportional integral differential control algorithm.
4. The method according to any one of claims 1 to 2, wherein: After controlling the lighting parameters of the actual scene based on the lighting parameter control signal so that the difference between the actual lighting illumination information and the virtual lighting illumination information is less than a preset difference threshold, the method further includes: Detect whether the preset virtual and real light alignment trigger conditions are met; If satisfied, return to the step of obtaining the actual light illumination information at the target position in the actual scene and the virtual light illumination information at the virtual position.
5. The method according to claim 1, wherein: The calculating the virtual light illumination information at the virtual position based on the virtual brightness information, the illumination attribute information, and the preset relationship satisfied among the virtual brightness information, the illumination attribute information and the virtual light illumination information includes: Based on the virtual brightness information and the light attribute information, a preset relationship is used to calculate the virtual light illumination information at the virtual position; The preset relationship is: π*L=E*R Among them, L is the virtual brightness information of the virtual target object at the virtual position; E is the virtual light illumination information at the virtual position; R is the reflectivity information of the virtual target object; and π is the pi.
6. A virtual and real light alignment device, comprising: An illumination information acquisition module is used to acquire the actual light illumination information at the target position in the actual scene and the virtual light illumination information at the virtual position; The virtual position is a position in the virtual scene corresponding to the target position in the actual scene; a control module, configured to use the difference between the actual lighting illumination information and the virtual lighting illumination information as an input of a preset control algorithm, output a lighting parameter control signal through the preset control algorithm, and control the lighting parameters of the actual scene based on the lighting parameter control signal so that the difference between the actual lighting illumination information and the virtual lighting illumination information is less than a preset difference threshold; Wherein, a virtual target object with known lighting attribute information is set at the virtual position; The illumination information acquisition module is specifically used to determine, in the virtual scene, a virtual position corresponding to the target position in the actual scene; based on the virtual position, obtain virtual brightness information of the virtual target object; based on the virtual brightness information, the illumination attribute information, and a preset relationship satisfied between the virtual brightness information, the illumination attribute information and the virtual light illumination information, calculate the virtual light illumination information at the virtual position; The illumination attribute information includes the reflection characteristics of the surface of the virtual target object to light, and the reflection characteristics include: reflectivity and surface structure.
7. An electronic device comprising: A processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform an operation corresponding to the method according to any one of claims 1-5.
8. A computer storage medium having a computer program stored thereon, wherein when the program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.
9. A computer program product, comprising computer instructions, wherein the computer instructions instruct a computing device to execute the method according to any one of claims 1 to 5.
