Illumination calibration method and device, and electronic device
By adjusting the ambient light correction parameters of the virtual rendering engine, the lighting of virtual foreground elements is made consistent with that of real foreground elements, solving the problem of matching lighting atmosphere in virtual shooting, improving shooting efficiency and reducing costs, and supporting the cross-project reuse of virtual assets.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING YOUKU TECH CO LTD
- Filing Date
- 2026-04-01
- Publication Date
- 2026-07-14
AI Technical Summary
In existing virtual shooting technologies, the construction of physical scenes is inefficient, costly, and difficult to reuse across projects. The lighting and atmosphere of virtual foreground elements are difficult to match with those of real foreground elements, resulting in high shooting costs and low efficiency.
By acquiring real-world images of real reference elements and rendered images of virtual reference elements, extracting real and virtual color values, and adjusting the ambient light correction parameters of the virtual rendering engine until the color difference is less than a preset difference threshold, the color consistency between virtual foreground elements and real foreground elements is achieved. Ambient light texture parameters are used to ensure the realism of the initial lighting.
It achieves a high degree of consistency between virtual and real foreground elements in terms of lighting atmosphere, improves shooting efficiency, reduces shooting costs, and supports the cross-project reuse of virtual assets.
Smart Images

Figure CN122391460A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a light calibration method, apparatus, electronic device, and computer storage medium. Background Technology
[0002] Virtual filming, as a film and television production technology, mainly involves the following process: projecting real-time rendered scene images onto display screens such as LEDs (Light Emitting Diodes), then having actors perform using the display screens as a background, thus placing real actors in a virtual scene. Filming equipment (such as cameras) simultaneously film the actors and the display screens to obtain a picture that blends the virtual and real, thereby achieving the effect of filming exterior scenes or science fiction backgrounds in a studio.
[0003] At present, although virtual shooting technology can significantly reduce the cost of background set design, in order to improve the realism of the image and achieve an immersive sense of "transition between virtual and real", it is still usually necessary to build real foreground elements (such as steps, railings, vegetation, etc.) in front of the screen.
[0004] Building physical sets is inefficient, costly, and difficult to reuse across projects, resulting in significant resource waste. Summary of the Invention
[0005] In view of this, embodiments of this application provide a light calibration scheme to at least partially solve the above-mentioned problems.
[0006] According to a first aspect of the embodiments of this application, an illumination calibration method is provided, comprising: The process involves: acquiring a real-world image containing real reference elements; acquiring a rendered image containing virtual reference elements; the rendered image being obtained by a virtual rendering engine based on ambient light texture parameters and initially set ambient light correction parameters; extracting the real color values of the real reference elements from the real-world image, and extracting the virtual color values of the virtual reference elements from the rendered image; adjusting the ambient light correction parameters of the virtual rendering engine according to the color difference between the real color values and the virtual color values, and returning to the step of acquiring the rendered image containing virtual reference elements, until the color difference is less than a preset difference threshold; wherein the rendered image is used to overlay on a video frame image to achieve augmented reality scene setting, and the video frame image is obtained by a physical camera capturing a virtual scene presented through a real scene and a screen during virtual shooting.
[0007] According to a second aspect of the embodiments of this application, a light calibration device is provided, comprising: A first acquisition module is used to acquire a real-world image containing real reference elements; a second acquisition module is used to acquire a rendered image containing virtual reference elements; the rendered image is rendered by a virtual rendering engine based on ambient light texture parameters and initially set ambient light correction parameters; a color value extraction module is used to extract the real color values of the real reference elements based on the real-world image, and extract the virtual color values of the virtual reference elements based on the rendered image; a parameter adjustment module is used to adjust the ambient light correction parameters of the virtual rendering engine according to the color difference between the real color values and the virtual color values, and return to the step of acquiring the rendered image containing virtual reference elements, until the color difference is less than a preset difference threshold; wherein, the rendered image is used to overlay on a video frame image to achieve augmented reality scene setting, the video frame image is obtained by a physical camera capturing a virtual scene presented through a real scene and a screen during virtual shooting.
[0008] According to a third aspect of the present application, an electronic device is provided, 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, wherein the executable instruction causes the processor to perform an operation corresponding to the method described in the first aspect.
[0009] According to a fourth aspect of the embodiments of this application, a computer storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the method described in the first aspect.
[0010] According to the lighting calibration scheme provided in the embodiments of this application, a real-world image containing real reference elements and a rendered image containing virtual reference elements are obtained; the real color values of the real reference elements are extracted based on the real-world image, and the virtual color values of the virtual reference elements are extracted based on the rendered image; the ambient light correction parameters of the virtual rendering engine are adjusted according to the color difference between the real color values and the virtual color values, and the process of obtaining the rendered image containing virtual reference elements is returned until the color difference is less than a preset difference threshold.
[0011] In the embodiments described above, a virtual-to-real reference element is introduced: a real reference element and a virtual reference element rendered by the virtual rendering engine that corresponds to the real reference element. Then, based on the color difference between the virtual and real reference elements, the ambient light correction parameters of the virtual rendering engine are dynamically adjusted. The virtual rendering engine then re-renders the virtual reference element using the adjusted ambient light correction parameters, and performs subsequent color difference calculations and ambient light correction parameter adjustments until the color difference is sufficiently small. This process uses the color difference between the virtual and real reference elements as visual feedback, achieving closed-loop calibration of the ambient light correction parameters, and ultimately achieving the optimization goal of "color consistency between virtual and real reference elements."
[0012] Furthermore, in this embodiment, when generating the rendered image through the virtual rendering engine, ambient light texture parameters are set for the engine based on the ambient light distribution information at the location of the real reference element. Ambient light texture parameters typically characterize the lighting distribution baseline, defining the spatial direction, color temperature, and intensity distribution of indirect lighting in the scene, used to ensure more realistic initial lighting is provided to the virtual reference element. The ambient light distribution information precisely records the light source direction, color temperature, and intensity distribution at the location of the real reference element. Therefore, it avoids problems such as tone deviation and light and shadow misalignment caused by manually setting parameters, ensuring that the lighting characteristics of the virtual scene are consistent with the physical environment of the actual shooting. This effectively guarantees that the virtual reference element can obtain physically reliable initial lighting, further improving optimization efficiency.
[0013] In summary, the lighting calibration scheme provided by the embodiments of this application can efficiently match virtual elements rendered by the virtual rendering engine with real elements at the visual level of lighting atmosphere, resulting in high consistency.
[0014] In this way, in actual virtual shooting scenarios, when foreground elements need to be set in front of the screen, the virtual rendering engine can render the virtual foreground elements based on the adjusted ambient light correction parameters mentioned above, and then overlay the rendered image onto the video frame image. This allows the rendered virtual foreground elements to replace the original, physically constructed foreground elements. This method can improve shooting efficiency and reduce shooting costs while ensuring the realism of the captured footage and achieving an immersive "transition between virtual and real" experience.
[0015] In addition, the virtual shooting method based on virtual foreground elements effectively promotes the evolution of virtual production towards "software-defined set design". When the foreground element needs to be changed, the rendering operation of the new foreground element can be re-executed in the virtual rendering engine software, realizing the cross-project reuse of virtual assets, further improving shooting efficiency and reducing shooting costs. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings.
[0017] Figure 1 This is a flowchart illustrating the steps of a lighting calibration method according to an embodiment of this application. Figure 2 This is a schematic diagram of an illumination calibration process according to an embodiment of this application; Figure 3 This is a structural block diagram of a light calibration device according to an embodiment of this application; Figure 4 This is a schematic diagram of the structure of an electronic device according to an embodiment of this application. Detailed Implementation
[0018] To enable those skilled in the art to better understand the technical solutions in the embodiments of this application, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art should fall within the protection scope of the embodiments of this application.
[0019] Background Overview of this Application Virtual shooting technology, as a revolutionary film and television production solution, is based on the real-time fusion of virtual and real scenes through multi-device collaboration. The main process of virtual shooting includes: projecting real-time rendered scene images onto LED or other display screens; then, actors use the display screens as a background to perform, thus placing real actors in a virtual scene; and simultaneously, shooting equipment (such as cameras) filming both the actors and the display screens to obtain a fused virtual-real image, achieving the effect of shooting exterior scenes or science fiction backgrounds in a studio.
[0020] From an overall architectural perspective, a virtual filming system mainly consists of a rendering module, a display module, and a filming module. The rendering module can include rendering devices equipped with a virtual rendering engine (such as Unreal Engine 5) to generate virtual scene images. The display module includes display devices (such as LED screens, or an array of screens including a main facade screen, a dome screen, and a load-bearing floor screen) to display the virtual scene images generated by the rendering devices in real time, providing actors with an interactive performance background and realistic lighting environment. The filming module can include filming devices such as cameras, which can simultaneously film both the actors and the display device while the actors are performing in front of the display device, thus obtaining virtual filming results.
[0021] While virtual shooting technology can significantly reduce the cost of background set design, to enhance the realism of the image and achieve an immersive "transition between virtual and real" experience, it is still usually necessary to construct real foreground elements (such as steps, railings, and vegetation) in front of the screen. Constructing physical sets is inefficient, costly, difficult to reuse across projects, and results in significant resource waste.
[0022] To address the aforementioned issues, this application embodiment further renders and generates virtual scene elements corresponding to the real foreground elements through a rendering module. During actual virtual filming, on one hand, the filming device simultaneously captures the real scene (such as actors in front of the screen) and the virtual scene displayed on the screen, obtaining video frame images (also known as real-scene images). On the other hand, a virtual rendering engine renders a rendered image containing virtual foreground elements. Subsequently, the rendered image can be superimposed onto the aforementioned video frame images, thereby obtaining a virtual filming result that simultaneously includes a virtual background, actors, and virtual foreground. The above process allows the virtual foreground elements rendered by the virtual rendering engine to replace the real foreground elements that originally needed to be constructed in front of the screen.
[0023] Furthermore, in order to solve the problem of the difficulty in matching the lighting atmosphere between virtual foreground elements and real foreground elements, this application provides a lighting calibration scheme. This scheme can effectively calibrate the lighting parameters of the virtual rendering engine, thereby making the rendered virtual reference elements and real reference elements have high color consistency, thus improving the quality of virtual shooting images and shooting efficiency.
[0024] The specific implementation of the embodiments of this application will be further described below with reference to the accompanying drawings.
[0025] Reference Figure 1 , Figure 1 This is a flowchart illustrating the steps of a lighting calibration method according to an embodiment of this application. Specifically, the lighting calibration method provided in this embodiment includes the following steps: Step 102: Obtain a real-world image containing actual reference elements.
[0026] Step 104: Obtain a rendered image containing virtual reference elements; the rendered image is rendered by the virtual rendering engine based on ambient light texture parameters and initially set ambient light correction parameters; the ambient light texture parameters are obtained based on the ambient light distribution information of the location of the real reference elements.
[0027] To illustrate, during the virtual-to-real lighting calibration process, a reference element can be introduced, and the virtual rendering engine parameters can be adjusted by comparing the virtual-to-real color difference value of the reference element.
[0028] The real reference element in this embodiment can be a real entity object existing in the physical environment. There are no limitations on the shape, size, color, and material properties of the real reference element; these can be customized according to actual conditions. The virtual reference element in this embodiment can be a virtual object corresponding to the aforementioned real reference element, and this virtual object can have the same shape, size, color, and material properties as the real reference element.
[0029] For example, since the 18% reflectance of neutral gray is at the center of the dynamic range of the human eye, and the RGB (red, green, blue) three channels are balanced and without color bias, it can accurately reflect the color temperature and intensity characteristics of ambient light. On the other hand, the matte material can also ensure uniform diffuse reflection of light, avoiding information loss caused by specular highlights. Therefore, physical objects and virtual objects (such as small balls) with a reflectance of 18%, matte neutral gray, and matte material can be used as real reference elements and virtual reference elements in the embodiments of this application, respectively.
[0030] During illumination calibration, a real reference element can be placed in the foreground position in front of the virtual shooting location display device (foreground area). For example, since the physical center point of the foreground area is usually a representative sampling point for illumination information, capable of comprehensively reflecting the reflected light from the real screen, the main ambient light, and ambient diffuse reflection, thus conforming to ambient lighting conditions, the aforementioned foreground position can be located near the aforementioned physical center point. For instance, for a curved display screen, the foreground position can be located near the center of the curved display screen.
[0031] In virtual rendering engines, the lighting environment is typically determined by a combination of ambient light texture parameters and ambient light correction parameters. Ambient light texture parameters generally represent the lighting distribution baseline, defining the spatial direction, color temperature, and intensity distribution of indirect lighting in the scene to ensure more realistic initial lighting for virtual reference elements. Ambient light correction parameters are dynamic adjustments to this baseline, used to compensate for changes in ambient light in real time. The virtual rendering engine uses the ambient light texture parameters as a static reference and overlays real-time adjustments to the ambient light correction parameters to output the final ambient lighting to the virtual reference elements. By dynamically adjusting the ambient light correction parameters, color consistency between virtual and real reference elements can be gradually achieved.
[0032] In this embodiment, the virtual reference elements included in the rendered image can be rendered by a virtual rendering engine based on preset ambient light texture parameters and initially set ambient light correction parameters. Furthermore, the ambient light texture parameters are obtained based on the ambient light distribution information at the location of the real reference elements.
[0033] Step 106: Extract the real color values of the real reference elements based on the real scene image, and extract the virtual color values of the virtual reference elements based on the rendered image.
[0034] Schematic illustration: After acquiring the real-world image, the true color value of the real reference element can be extracted from it (for ease of distinction, in this embodiment, the color value of the real reference element is referred to as the true color value, and the color value of the virtual reference element is referred to as the virtual color value). The true color value represents the color characteristics of the real reference element. In this embodiment, the specific method for determining the true color value is not limited. For example, the pixel values of each pixel in the area where the real reference element is located in the real-world image (pixel values of at least one of the three color channels) can be obtained, and the pixel values can be fused to obtain the true color value. The fusion method may include calculating the average of the true color values of each pixel; alternatively, a portion of pixels can be selected from the area where the real reference element is located, and the pixel values of that portion of pixels can be fused to obtain the true color value, and so on.
[0035] Correspondingly, after obtaining the rendered image, the virtual color values of the virtual reference elements can also be extracted. The virtual color values represent the color characteristics of the virtual reference elements. In this embodiment, the specific method for determining the virtual color values is not limited, and the specific method for determining the real color values described above can be referred to, which will not be repeated here.
[0036] Step 108: Based on the color difference between the real color value and the virtual color value, adjust the ambient light correction parameters of the virtual rendering engine and return to the step of obtaining the rendered image containing the virtual reference element, until the color difference is less than the preset difference threshold.
[0037] The rendered image is used to overlay the video frame image to achieve augmented reality scene setting. The video frame image is obtained by a physical camera capturing a virtual scene presented through a real scene and a screen during virtual shooting.
[0038] To illustrate, a real-world scene may include the space in front of the screen, actors, props, set design, etc.
[0039] Schematic, as described above, the ambient light correction parameter is a dynamic adjustment parameter for the lighting distribution baseline, used to compensate for changes in ambient light in real time. Therefore, based on the color difference between the real and virtual color values, the ambient light correction parameter of the virtual rendering engine can be adjusted in a reverse closed loop to gradually reduce the color difference until it is controlled within a preset difference threshold. The color difference between the real and virtual color values can be obtained by fusing (e.g., weighted summation) the color differences of each color channel.
[0040] When the adjusted ambient light correction parameters bring the color difference within a preset difference threshold range, the virtual rendering engine can render virtual foreground elements based on these parameters, resulting in a rendered image containing virtual foreground elements. Alternatively, a camera can simultaneously capture both a real scene (such as actors in front of a screen) and a virtual scene displayed on the screen, generating video frame images. These rendered images, containing virtual foreground elements, are then overlaid onto the video frame images, resulting in a virtual shooting result that simultaneously includes a virtual background, actors, and a virtual foreground. The above process allows virtual foreground elements rendered by the virtual rendering engine to replace physically constructed real foreground elements.
[0041] In the embodiments described above, a virtual-to-real reference element is introduced: a real reference element and a virtual reference element rendered by the virtual rendering engine that corresponds to the real reference element. Then, based on the color difference between the virtual and real reference elements, the ambient light correction parameters of the virtual rendering engine are dynamically adjusted. The virtual rendering engine then re-renders the virtual reference element using the adjusted ambient light correction parameters, and performs subsequent color difference calculations and ambient light correction parameter adjustments until the color difference is sufficiently small. This process uses the color difference between the virtual and real reference elements as visual feedback, achieving closed-loop calibration of the ambient light correction parameters, and ultimately achieving the optimization goal of "color consistency between virtual and real reference elements."
[0042] Furthermore, in this embodiment, when generating the rendered image through the virtual rendering engine, ambient light texture parameters are set for the engine based on the ambient light distribution information at the location of the real reference element. Ambient light texture parameters typically characterize the lighting distribution baseline, defining the spatial direction, color temperature, and intensity distribution of indirect lighting in the scene, used to ensure more realistic initial lighting is provided to the virtual reference element. The ambient light distribution information precisely records the light source direction, color temperature, and intensity distribution at the location of the real reference element. Therefore, it avoids problems such as tone deviation and light and shadow misalignment caused by manually setting parameters, ensuring that the lighting characteristics of the virtual scene are consistent with the physical environment of the actual shooting. This effectively guarantees that the virtual reference element can obtain physically reliable initial lighting, further improving optimization efficiency.
[0043] In summary, the lighting calibration scheme provided by the embodiments of this application can efficiently match virtual elements rendered by the virtual rendering engine with real elements at the visual level of lighting atmosphere, resulting in high consistency.
[0044] In this way, in actual virtual shooting scenarios, when foreground elements need to be set in front of the screen, the virtual rendering engine can render virtual foreground elements in front of the screen based on the adjusted ambient light correction parameters mentioned above, and then overlay the rendered image onto the video frame image, thus using the rendered virtual foreground elements to replace the original real foreground elements that would have needed to be physically constructed. This method can improve shooting efficiency and reduce shooting costs while ensuring the realism of the captured footage and achieving an immersive "transition between virtual and real" experience.
[0045] In addition, the virtual shooting method based on virtual foreground elements effectively promotes the evolution of virtual production towards "software-defined set design". When the foreground element needs to be changed, the rendering operation of the new foreground element can be re-executed in the virtual rendering engine software, realizing the cross-project reuse of virtual assets, further improving shooting efficiency and reducing shooting costs.
[0046] The illumination calibration method provided in this embodiment can be executed by any suitable electronic device, including but not limited to: servers, PCs, cloud computing platforms, etc.
[0047] Optionally, in some embodiments, the process of obtaining ambient light texture parameters may include: Obtain the ambient lighting distribution information at the location of the real reference element; input the ambient lighting distribution information into the virtual rendering engine so that the virtual rendering engine can calculate the ambient light texture parameters based on the ambient lighting distribution information.
[0048] Schematic, as described above, in a virtual rendering engine, the lighting environment is typically determined collaboratively by ambient light texture parameters and ambient light correction parameters. Ambient light texture parameters generally characterize the lighting distribution baseline, defining the spatial direction, color temperature, and intensity distribution of indirect lighting in the scene, used to ensure more realistic initial lighting is provided to virtual reference elements.
[0049] In the above embodiments of this application, ambient light texture parameters are mainly established by physically acquiring ambient light distribution information at the location of the real reference element. Since the ambient light distribution information accurately records the light source direction, color temperature, and intensity distribution at the location of the real reference element, it can avoid problems such as tone deviation and light and shadow misalignment caused by manually setting parameters. This ensures that the lighting characteristics of the virtual scene are consistent with the physical environment where the real reference element is located, which effectively guarantees that the virtual reference element can obtain physically reliable initial lighting.
[0050] In addition, the above process does not require manual and repeated adjustments to the ambient light texture parameters. Instead, the ambient light distribution information is input into the virtual rendering engine to generate relatively accurate ambient light texture parameters, thus improving processing efficiency.
[0051] Optionally, in some embodiments, the aforementioned ambient lighting distribution information is presented in the form of a high dynamic range image of the location of the actual reference element.
[0052] Indicatively, a high dynamic range (HDRI) image of the location of the real reference element can be obtained, and then the high dynamic range image can be input into the virtual rendering engine. Based on the high dynamic range image, the virtual rendering engine can drive the calculation of indirect light bounce, ambient reflection, and soft shadows to obtain ambient light texture parameters. When the virtual reference element is rendered with the obtained ambient light texture parameters, it can be effectively guaranteed that the virtual rendering element can obtain physically reliable initial lighting.
[0053] The aforementioned "physical capture + virtual drive" dual-mode lighting initialization scheme can use the 360° real-shot HDRI of the shooting scene as the input source of the light source component that simulates global ambient light in the virtual rendering engine. This allows virtual foreground elements to obtain initial lighting that is consistent with the spectral distribution of the physical environment, solving the problems of strong subjectivity and low efficiency in traditional manual lighting adjustment.
[0054] Optionally, in some embodiments, adjusting the ambient light correction parameters of the virtual rendering engine based on the color difference between the real color value and the virtual color value may include: A preset parameter adjustment strategy is adopted to determine the parameter adjustment amount based on the color difference between the real color value and the virtual color value; based on the parameter adjustment amount, the ambient light correction parameters of the virtual rendering engine are adjusted.
[0055] Schematic illustration: In the above embodiments of this application, the color difference is mapped to a quantified parameter adjustment amount through a pre-set parameter adjustment strategy, which can effectively avoid parameter jumps or oscillations caused by adjusting (or assigning) the ambient light correction parameter all at once. The above process, by introducing a progressive correction mechanism, can achieve dynamic adaptation between the parameter adjustment range and the degree of color deviation: a rapid response when the color deviation is large, and fine-tuning when the color deviation is small, thereby ensuring the smoothness of the parameter adjustment process.
[0056] In this embodiment, the specific content of the parameter adjustment strategy is not limited and can be customized according to the actual situation. For example, a mapping relationship between color difference and parameter adjustment amount can be preset in advance. After obtaining the color difference, the parameter adjustment amount can be determined by looking up the above mapping relationship. Alternatively, based on empirical rules, the color difference can be fuzzified into "large / medium / small" levels in advance, and a corresponding parameter adjustment amount can be set for each level. After obtaining the color difference, its level can be determined first, and then the parameter adjustment amount corresponding to its level can be determined, and so on.
[0057] Optionally, in some embodiments, the ambient light correction parameters may include: ambient light intensity correction parameters and ambient light chromaticity correction parameters.
[0058] Correspondingly, a preset parameter adjustment strategy is adopted, and the parameter adjustment amount is determined based on the color difference between the real color value and the virtual color value, which may include: A proportional-integral-derivative (PID) control algorithm is used to determine the parameter adjustment amount corresponding to the ambient light intensity correction parameter based on the color difference between the real color value and the virtual color value; a proportional control algorithm is used to determine the parameter adjustment amount corresponding to the ambient light chromaticity correction parameter based on the color difference between the real color value and the virtual color value.
[0059] Schematic, the ambient light intensity correction parameter represents the dynamic adjustment of the ambient light energy level, used to compensate for the deviation in illuminance and brightness perception between the virtual scene and the physical environment, thereby ensuring the consistency of virtual and real lighting in terms of brightness levels. From a physical perspective, ambient light illuminance is affected by multiple coupled factors, easily leading to long-term drifting steady-state errors; in addition, the human eye is quite sensitive to changes in brightness. That is to say, ambient light intensity has cumulative and continuous deviation characteristics. Therefore, for the ambient light intensity correction parameter, the adjustment strategy should focus on long-term accurate convergence. A proportional-integral-derivative (PID) control algorithm is used to determine the corresponding parameter adjustment amount. The integral term in the algorithm can continuously accumulate the correction amount, thereby eliminating the aforementioned steady-state error. Furthermore, the derivative term in the algorithm can effectively suppress overshoot during brightness abrupt changes, ensuring visual comfort for the human eye.
[0060] Ambient light chromaticity correction parameters represent the dynamic adjustment of the hue characteristics of ambient light. They are used to adjust the color temperature and hue of virtual light sources to match the spectral distribution of the physical environment, eliminating warm and cool color casts and achieving a unified visual atmosphere. From a physical perspective, ambient light chromaticity is transient; therefore, the adjustment strategy for ambient light chromaticity correction parameters should focus on instantaneous stable matching. Using a proportional control algorithm to determine the corresponding parameter adjustment amount can quickly map the corresponding parameter adjustment amount based on the current color difference. The algorithm is simple and responds instantly, better meeting the adjustment needs of ambient light chromaticity.
[0061] After determining the adjustment amounts corresponding to the ambient light intensity correction parameters and the ambient light chromaticity correction parameters, the process of adjusting the lighting parameters of the virtual rendering engine can include: adjusting the intensity adjustment parameters of the virtual rendering engine according to the adjustment amounts corresponding to the intensity adjustment parameters; and adjusting the chromaticity adjustment parameters of the virtual rendering engine according to the adjustment amounts corresponding to the chromaticity adjustment parameters.
[0062] Optionally, in some embodiments, adjusting the ambient light correction parameters of the virtual rendering engine according to the parameter adjustment amount may include: According to the preset lighting control protocol, the parameter adjustment amount is encapsulated to obtain encapsulated data; the encapsulated data is sent to the virtual rendering engine using the network transmission protocol corresponding to the preset lighting control protocol, so that the virtual rendering engine can parse the encapsulated data, obtain the parameter adjustment amount, and adjust the ambient light correction parameters according to the parameter adjustment amount.
[0063] Schematic illustration: The lighting control protocol can refer to the communication specifications set for parameter adjustment amounts, such as data formats (including encapsulation structures) and transmission methods set for parameter adjustment amounts. In this embodiment, the specific content of the preset lighting control protocol is not limited; for example, it can be an existing protocol provided by related technologies, or it can be a custom-defined protocol. The network transmission protocol corresponding to the preset lighting control protocol can be a protocol specified by the preset lighting control protocol, or a protocol compatible with the preset lighting control protocol. The aforementioned network transmission protocol can be an existing protocol provided by related technologies, or it can be a custom-defined protocol.
[0064] In the above process, after obtaining the parameter adjustment amount, the electronic device executing the illumination calibration scheme provided in this application encapsulates the parameter adjustment amount according to the preset lighting control protocol, and then sends the encapsulated data to the virtual rendering engine using the corresponding network transmission protocol, so that the virtual rendering engine adjusts the ambient light correction parameters accordingly after parsing the parameter adjustment amount.
[0065] The embodiments described above, through encapsulation operations based on a preset lighting control protocol and transmission operations based on a network transmission protocol, enable external electronic devices executing these embodiments to automatically and remotely control the ambient lighting parameters of the virtual rendering engine, thereby establishing an automated control channel from "physical world perceived color difference" to "virtual world response parameter adjustment." Compared to manual parameter adjustment within the virtual rendering engine, this automated remote parameter control method effectively improves parameter adjustment efficiency.
[0066] Furthermore, the aforementioned preset lighting control protocol can be a Digital Multiplex (DMX) protocol; correspondingly, the network transmission protocol can be a connectionless transmission protocol, such as UDP (User Datagram Protocol) protocol, or a UDP-based connectionless application layer protocol (such as Art-Net / sACN protocol, etc.).
[0067] In the above implementation, on the one hand, the DMX protocol defines a compact data frame structure with a fixed data format and extremely simple parsing; on the other hand, the connectionless transmission protocol eliminates the latency of establishing a connection, handshaking confirmation, and retransmission waiting between the external electronic device and the rendering device where the virtual rendering engine resides. Therefore, based on the above implementation, the transmission latency of parameter adjustments between the external electronic device and the rendering device can be reduced to the millisecond level, that is, enabling the external electronic device executing this embodiment to remotely control the ambient lighting parameters of the virtual rendering engine at the millisecond level. This further improves the efficiency of parameter adjustment. Optionally, in some embodiments, the process of extracting the real color values of real reference elements based on real-scene images and extracting the virtual color values of virtual reference elements based on rendered images may include: The rendered image is overlaid onto the real-world image to obtain the merged image; The system acquires real location information and virtual location information separately. Real location information refers to the location information of the real reference element in the fused image. Virtual location information refers to the location information of the virtual reference element in the fused image. Based on the real location information, the system extracts the real color value of the real reference element in the fused image. Based on the virtual location information, the system extracts the virtual color value of the virtual reference element in the fused image.
[0068] Indicatively, in the above embodiments of this application, after acquiring the real-scene image and the rendered image, the two are superimposed to obtain a fused image that simultaneously contains real reference elements and virtual reference elements. Then, the real position information of the real reference elements and the virtual position information of the virtual reference elements can be extracted from the fused image.
[0069] In the above embodiments, by using image fusion, both real and virtual reference elements are displayed in the same fused image. This allows for element localization based on the single fused image, thereby obtaining the real position information of the real reference elements and the virtual position information of the virtual reference elements. Compared to performing position detection operations based on different images separately, the operation process of the above embodiments of this application is simpler and more efficient.
[0070] To illustrate, when rendering a virtual reference element, the distance between the virtual position information and the real position information can be made close enough so that the virtual reference element and the real reference element are under similar lighting conditions in space.
[0071] Optionally, in some embodiments, the process of obtaining real location information and virtual location information respectively may include: Display interactive prompts; these prompts guide the execution of preset interactive operations to input real and virtual location information; receive preset interactive operations and obtain real and virtual location information based on these operations.
[0072] Indicatively, the preset interactive operation can be a selection operation for the user in the merged image (or pixels). For example, the user can select a virtual reference element region and a real reference element region in the merged image respectively. In this way, the virtual reference element region selected by the user can be determined as virtual position information, and the real reference element region selected by the user can be determined as real position information.
[0073] The shapes, sizes, and colors of the real and virtual reference elements are quite similar. Considering this, in this embodiment, for a fused image that includes both real and virtual reference elements, an interactive method is used to determine the corresponding real and virtual position information. This process effectively improves the efficiency and accuracy of position information determination.
[0074] See Figure 2 , Figure 2 This is a schematic diagram of an illumination calibration process according to an embodiment of this application. For ease of understanding, the following is combined with... Figure 2 The illumination calibration scheme provided in the embodiments of this application will be explained and described as follows: This application's embodiments construct a complete technology system from "digitalization of physical ambient light" to "virtual lighting initialization" and then to "visual feedback closed-loop optimization," thereby achieving precise lighting matching for foreground element rendering. This solution may include the following steps: The first step is the digitization of ambient light, also known as the precise ambient light capture stage. For example, an image acquisition device (such as a 360° panoramic camera) can be placed at the center of the area where foreground elements are planned. Then, for different shooting angles, an ±3EV bracketing exposure sequence can be used for image acquisition, i.e., a multi-exposure sequence can be captured. For example, the number of shots is set to 7, and the exposure step size (EV interval) is set to 1. The image acquisition device will then automatically expand by three stops each in the darker and brighter directions, based on the standard brightness (0EV) of the current lighting environment, thus obtaining 7 images with different brightness levels at the current shooting angle. This multi-exposure image acquisition method ensures that the light information of bright areas (such as overexposed spots on an LED screen) and dark details (such as shadows in a scene) are completely captured, thus avoiding the dynamic range loss caused by a single exposure. After obtaining images from various shooting angles, image alignment, ghosting removal, and tone mapping (such as correcting lens distortion and unifying white balance) can be performed on each image. The processed images are then synthesized to obtain the HDRI of the area where the foreground element is to be deployed. This HDRI is the "optical truth value" of the ambient light in the area where the foreground element is to be deployed.
[0075] The second step is virtual lighting initialization. For example, an HDRI can be imported into the virtual rendering engine so that the engine can calculate ambient light texture parameters based on the HDRI. Taking the UE5 virtual rendering engine as an example, the HDRI can be imported into UE5 and specified as the SkyLight "source cube map" light source component simulating global ambient light. Indirect light bounce, environmental reflection, and soft shadow calculations are then performed based on the HDRI to obtain ambient light texture parameters. These calculated ambient light texture parameters ensure that virtual reference elements receive physically reliable initial lighting. Furthermore, custom control components can be added to the virtual rendering engine to allow it to receive encapsulated data from external electronic devices, mapping the parameter adjustments to transmission channels defined by a preset lighting control protocol. For example, the virtual light source parameters of the virtual rendering engine (such as the SkyLight's Intensity and Light Color) can be mapped to specific channels of the DMX protocol (e.g., channel 1 controls Intensity, and channels 2-4 control RGB respectively). In this way, external electronic devices can adjust the ambient light correction parameters of the virtual rendering engine in milliseconds via a network transmission protocol corresponding to the preset lighting control protocol, thereby establishing a real control channel from "physical world perceived color difference" to "virtual world response adjustment parameters". Since ambient light is affected by many factors such as changes in natural lighting conditions and physical lighting, and may change in real time, this method allows the ambient lighting atmosphere of the rendered image to follow the real-world image in real time, achieving a better blending effect.
[0076] The third step is visual feedback closed-loop optimization. For example, a physical object (such as a real gray sphere with 18% reflectance, matte neutral gray, and a matte finish) can be placed at the foreground position of the foreground element, and a real-world image containing the aforementioned physical sphere can be captured. Alternatively, a rendered image can be obtained using a virtual rendering engine. This virtual image contains a virtual object corresponding to the aforementioned physical object (such as a virtual gray sphere of the same size as the physical object, with 18% reflectance, matte neutral gray, and a matte finish). The real-world image is then superimposed onto the rendered image, thereby simultaneously capturing a fused image (a dual-gray sphere image) containing both the real and virtual reference elements. Afterwards, based on preset interactive operations, the real position information of the real reference element and the virtual position information of the virtual reference element are extracted from the fused image, thereby obtaining the real color value of the real reference element and the virtual color value of the virtual reference element, and the color difference between the two. If the color difference is greater than or equal to the preset difference threshold, then lighting calibration is performed: using a preset parameter adjustment strategy, the ambient light correction parameters are adjusted according to the color difference, and the process returns to the step of capturing the dual gray sphere image; conversely, if the color difference is less than the preset difference threshold, then lighting calibration is completed, and the virtual foreground elements rendered based on the current ambient light correction parameters can be naturally integrated into the virtual shooting scene.
[0077] In the visual feedback closed-loop optimization process, for example, the color difference can be quantized in the following form: obtain the three-channel color values (Ri, R ...) of the virtual reference element. v G v B v ), and the three-channel color values (R) of the real reference element. G B Then, the color difference of the three channels is obtained: the color difference of the red R channel is ΔR = |R v -R The color difference ΔG in the green G channel is equal to |G v -G The color difference ΔB in the blue B channel is equal to |B|B. v -B The color differences between the various channels are then fused to obtain the final color difference value Δ_total. Furthermore, since the human eye is more sensitive to the G channel, a weighted color difference formula can be introduced: Δ_total = 0.3*ΔR + 0.59*ΔG + 0.11*ΔB. Correspondingly, from the perspective that the difference is difficult for the human eye to perceive, the preset difference threshold can be set to 4.5.
[0078] In addition, the ambient light correction parameters to be adjusted include: ambient light intensity correction parameter Intensity and ambient light color correction parameter LightColor. For the ambient light intensity correction parameter Intensity, a proportional-integral-derivative (PID) algorithm can be used to adjust the corresponding parameter adjustment amount.
[0079] For example, the parameter adjustment Δ_Intensity corresponding to Intensity can be calculated using the following formula: Δ_Intensity=K p · (current Δ_total) + K i •Σ(historical Δ_total)+Kd·(current Δ_total-previous Δ_total) Here, schematically, the coefficient K of fast response p A value of 0.15 can be used; the coefficient K for eliminating steady-state error. i The coefficient Kd for suppressing oscillations can be set to 0.02; the coefficient Kd for suppressing oscillations can be set to 0.05; the current Δ_total represents the color difference value obtained in this calculation, Σ(historical Δ_total) represents the sum of all color differences obtained in previous calculations; the previous Δ_total represents the color difference value obtained in the previous calculation. Furthermore, Kd can be dynamically adjusted based on the convergence speed of the color difference values. p For example, when the color difference decreases repeatedly, Kd can be set to Kd × 0.9. The above refers to K... p The dynamic attenuation adjustment ensures precise tracking during fine operations and smooth, vibration-free operation during rapid movements, resulting in smoother overall control and greater adaptability.
[0080] For example, the parameter adjustment amount Δ_RGB corresponding to LightColor can be calculated using the following formula: Δ_RGB=(K_c·ΔR,K_c·ΔG,K_c·ΔB) For example, the color shift correction coefficient K_c can be set to 1.0. The coefficient supports dynamic decay based on the convergence speed (e.g., K decreases after three consecutive error reductions). p ×0.9).
[0081] For example, based on the above parameter adjustment amount, the corresponding parameters of the light source component (such as SkyLight) of the global ambient light in the virtual rendering engine can be adjusted to achieve the adjustment of the virtual ambient light.
[0082] Figure 3 This is a structural block diagram of a light calibration device according to an embodiment of the present application. The device includes: The first acquisition module 302 is used to acquire a real-scene image containing real reference elements; The second acquisition module 304 is used to acquire a rendered image containing virtual reference elements; the rendered image is obtained by the virtual rendering engine based on ambient light texture parameters and initially set ambient light correction parameters; Color value extraction module 306 is used to extract the real color values of real reference elements based on real scene images and to extract the virtual color values of virtual reference elements based on rendered images. The parameter adjustment module 308 is used to adjust the ambient light correction parameters of the virtual rendering engine according to the color difference between the real color value and the virtual color value, and return to the step of obtaining a rendered image containing virtual reference elements, until the color difference is less than a preset difference threshold; wherein, the rendered image is used to overlay on the video frame image to achieve augmented reality scene setting, and the video frame image is obtained by a physical camera capturing the virtual scene presented through the real scene and the screen during virtual shooting.
[0083] Optionally, in some embodiments, the illumination calibration device further includes: The third acquisition module is used to acquire ambient lighting distribution information at the location of the real reference element; the ambient lighting distribution information is input into the virtual rendering engine so that the virtual rendering engine can calculate the ambient light texture parameters based on the ambient lighting distribution information.
[0084] Optionally, in some embodiments, the ambient lighting distribution information is presented in the form of a high dynamic range image of the location of the actual reference element.
[0085] Optionally, in some embodiments, the parameter adjustment module 308, when adjusting the ambient light correction parameters of the virtual rendering engine based on the color difference between the real color value and the virtual color value, is specifically used for: A preset parameter adjustment strategy is adopted to determine the parameter adjustment amount based on the color difference between the real color value and the virtual color value; Adjust the ambient light correction parameters of the virtual rendering engine according to the parameter adjustment amount.
[0086] Optionally, in some embodiments, the ambient light correction parameters include: ambient light intensity correction parameters and ambient light chromaticity correction parameters; the parameter adjustment module 308, when determining the parameter adjustment amount based on the color difference between the real color value and the virtual color value using a preset parameter adjustment strategy, is specifically used for: The proportional-integral-derivative (PID) control algorithm is used to determine the parameter adjustment amount corresponding to the ambient light intensity correction parameter based on the color difference between the real color value and the virtual color value. A proportional control algorithm is used to determine the parameter adjustment amount corresponding to the ambient light chromaticity correction parameter based on the color difference between the real color value and the virtual color value.
[0087] Optionally, in some embodiments, the parameter adjustment module 308, when adjusting the ambient light correction parameters of the virtual rendering engine according to the parameter adjustment amount, is specifically used for: According to the preset lighting control protocol, the parameter adjustment amount is encapsulated to obtain encapsulated data; The encapsulated data is sent to the virtual rendering engine using a network transmission protocol corresponding to the preset lighting control protocol. The virtual rendering engine then parses the encapsulated data, obtains the parameter adjustment amount, and adjusts the ambient light correction parameters according to the parameter adjustment amount.
[0088] Optionally, in some embodiments, the color value extraction module 306 is specifically used for: The rendered image is superimposed on the real-world image to obtain a fused image; The real location information and virtual location information are obtained separately; the real location information is the location information of the real reference element in the fused image; the virtual location information is the location information of the virtual reference element in the fused image. Based on the real location information, extract the real color values of the real reference elements from the fused image; Based on the virtual location information, extract the virtual color values of the virtual reference elements from the fused image.
[0089] Optionally, in some embodiments, the color value extraction module 306, when acquiring real location information and virtual location information respectively, is specifically used for: Display interactive prompts; these prompts guide users to perform preset interactive operations to input real and virtual location information. It receives preset interactive operations and obtains real location information and virtual location information based on the preset interactive operations.
[0090] The illumination calibration device of this embodiment is used to implement the corresponding methods in the aforementioned illumination calibration method embodiments and has the beneficial effects of the corresponding method embodiments, which will not be repeated here. Furthermore, the functional implementation of each module in the illumination calibration device of this embodiment can be referred to the description of the corresponding part in the aforementioned method embodiments, which will also not be repeated here.
[0091] Reference Figure 4 This document illustrates a schematic diagram of an electronic device according to an embodiment of this application. The specific embodiments of this application do not limit the specific implementation of the electronic device.
[0092] like Figure 4As shown, the electronic device may include: a processor 402, a communications interface 404, a memory 406, and a communications bus 408.
[0093] in: The processor 402, communication interface 404, and memory 406 communicate with each other via communication bus 408.
[0094] Communication interface 404 is used to communicate with other electronic devices or servers.
[0095] The processor 402 is used to execute program 410, specifically the relevant steps in the above method embodiments.
[0096] Specifically, program 410 may include program code that includes computer operation instructions.
[0097] Processor 402 may be a CPU, an Application Specific Integrated Circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of this application. The smart device includes one or more processors, which 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.
[0098] Memory 406 is used to store program 410. Memory 406 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage device.
[0099] Program 410 may include multiple computer instructions, and specifically program 410 may use multiple computer instructions to cause processor 402 to perform the operations corresponding to the methods described in the foregoing multiple method embodiments.
[0100] The specific implementation of each step in procedure 410 can be found in the corresponding descriptions of the steps and units in the above method embodiments, and has corresponding beneficial effects, which will not be repeated here. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the devices and modules described above can be referred to the corresponding process descriptions in the foregoing method embodiments, and will not be repeated here.
[0101] This application also provides a computer storage medium storing a computer program thereon, which, when executed by a processor, implements the method described in any of the foregoing method embodiments. The computer storage medium includes, but is not limited to, compact disc read-only memory (CD-ROM), random access memory (RAM), floppy disk, hard disk, or magneto-optical disk.
[0102] This application also provides a computer program product, including computer instructions that instruct a computing device to perform an operation corresponding to any of the methods in the above-described multiple method embodiments.
[0103] Furthermore, 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 for training the model, data used for analysis, stored data, displayed data, etc.) involved in the embodiments of this application are all information and data authorized by the user or fully authorized by all parties. Moreover, the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.
[0104] It should be noted that, depending on the implementation needs, the various components / steps described in the embodiments of this application can be broken down into more components / steps, or two or more components / steps or parts of the operation of components / steps can be combined into new components / steps to achieve the purpose of the embodiments of this application.
[0105] The methods described in the embodiments of this application can be implemented in hardware, firmware, or 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 as computer code downloaded over a network that is originally stored in a remote recording medium or a non-transitory machine-readable medium and will be stored in a local recording medium. Thus, the methods described herein can be stored 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 is understood that the computer, processor, microprocessor controller, or programmable hardware includes storage components (e.g., Random Access Memory (RAM), Read-Only Memory (ROM), Flash Memory, etc.) capable of storing or receiving software or computer code, which, when accessed and executed by the computer, processor, or hardware, implements the methods described herein. Furthermore, when a general-purpose computer accesses code used to implement the methods shown herein, the execution of the code transforms the general-purpose computer into a dedicated computer for executing the methods shown herein.
[0106] Those skilled in the art will recognize that the units and method steps of the various examples 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 implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the embodiments of this application.
[0107] The above embodiments are only used to illustrate the embodiments of this application, and are not intended to limit the embodiments of this application. Those skilled in the art can make various changes and modifications without departing from the spirit and scope of the embodiments of this application. Therefore, all equivalent technical solutions also fall within the scope of the embodiments of this application, and the patent protection scope of the embodiments of this application should be defined by the claims.
Claims
1. A method for calibrating illumination, comprising: Obtain real-world images containing actual reference elements; Obtain the rendered image containing the virtual reference elements; The rendered image is obtained by a virtual rendering engine based on ambient light texture parameters and initially set ambient light correction parameters; The ambient light texture parameters are obtained based on the ambient light distribution information at the location of the real reference element; The real color values of the real reference elements are extracted based on the real scene image, and the virtual color values of the virtual reference elements are extracted based on the rendered image. Based on the color difference between the real color value and the virtual color value, adjust the ambient light correction parameters and return to the step of obtaining the rendered image containing the virtual reference element, until the color difference is less than a preset difference threshold; The rendered image is used to overlay on the video frame image to achieve augmented reality scene setting. The video frame image is obtained by a physical camera capturing a virtual scene presented through a real scene and a screen during virtual shooting.
2. The method according to claim 1, wherein, The process of obtaining the ambient light texture parameters includes: Obtain the ambient light distribution information at the location of the actual reference element; The ambient lighting distribution information is input into the virtual rendering engine so that the virtual rendering engine can calculate the ambient light texture parameters based on the ambient lighting distribution information.
3. The method according to claim 2, wherein, The ambient light distribution information is presented in the form of a high dynamic range image of the location of the real reference element.
4. The method according to any one of claims 1-3, wherein, The step of adjusting the ambient light correction parameters of the virtual rendering engine based on the color difference between the real color value and the virtual color value includes: A preset parameter adjustment strategy is adopted to determine the parameter adjustment amount based on the color difference between the real color value and the virtual color value; Adjust the ambient light correction parameters of the virtual rendering engine according to the parameter adjustment amount.
5. The method according to claim 4, wherein, The ambient light correction parameters include: ambient light intensity correction parameters and ambient light chromaticity correction parameters; The method employs a preset parameter adjustment strategy, determining the parameter adjustment amount based on the color difference between the real color value and the virtual color value, including: A proportional-integral-derivative (PID) control algorithm is used to determine the parameter adjustment amount corresponding to the ambient light intensity correction parameter based on the color difference between the real color value and the virtual color value. A proportional control algorithm is used to determine the parameter adjustment amount corresponding to the ambient light chromaticity correction parameter based on the color difference between the real color value and the virtual color value.
6. The method according to claim 4, wherein, The step of adjusting the ambient light correction parameters of the virtual rendering engine according to the parameter adjustment amount includes: According to the preset lighting control protocol, the parameter adjustment amount is encapsulated to obtain encapsulated data; The encapsulated data is sent to the virtual rendering engine using a network transmission protocol corresponding to the preset lighting control protocol, so that the virtual rendering engine can parse the encapsulated data, obtain the parameter adjustment amount, and adjust the ambient light correction parameters according to the parameter adjustment amount.
7. The method according to any one of claims 1-3, wherein, The step of extracting the real color values of the real reference elements based on the real-scene image and extracting the virtual color values of the virtual reference elements based on the rendered image includes: The rendered image is superimposed on the real-world image to obtain a fused image; The real location information and virtual location information are obtained separately; the real location information is the location information of the real reference element in the fused image; the virtual location information is the location information of the virtual reference element in the fused image. Based on the real location information, extract the real color value of the real reference element from the fused image; Based on the virtual location information, the virtual color value of the virtual reference element is extracted from the fused image.
8. The method according to claim 7, wherein, The acquisition of real location information and virtual location information respectively includes: Display interactive prompts; these prompts guide the execution of preset interactive operations to input the real location information and the virtual location information. Receive the preset interactive operation, and obtain the real location information and the virtual location information based on the preset interactive operation.
9. A light calibration device, comprising: The first acquisition module is used to acquire real-world images containing real reference elements; The second acquisition module is used to acquire a rendered image containing virtual reference elements; The rendered image is obtained by the virtual rendering engine based on ambient light texture parameters and initially set ambient light correction parameters; The color value extraction module is used to extract the real color value of the real reference element based on the real scene image, and to extract the virtual color value of the virtual reference element based on the rendered image. The parameter adjustment module is used to adjust the ambient light correction parameters according to the color difference between the real color value and the virtual color value and return to the step of obtaining the rendered image containing the virtual reference element until the color difference is less than a preset difference threshold. The rendered image is used to overlay on the video frame image to achieve augmented reality scene setting. The video frame image is obtained by a physical camera capturing a virtual scene presented through a real scene and a screen during virtual shooting.
10. An electronic device, comprising: The processor, memory, communication interface, and communication bus are provided, wherein the processor, memory, and communication interface communicate with each other via the communication bus. The memory is used to store at least one executable instruction that causes the processor to perform the operation corresponding to the method as described in any one of claims 1-8.
11. A computer storage medium having a computer program stored thereon, which, when executed by a processor, implements the method as described in any one of claims 1-8.
12. A computer program product comprising computer instructions that instruct a computing device to perform the method as described in any one of claims 1-8.