Light intensity processing method, device, electronic device and computer storage medium

By adjusting the light intensity of the virtual light source in the virtual shooting background to make it consistent with the light illumination distribution of the realistic shooting foreground, the problem of difficulty in aligning the light intensity of the virtual shooting background and the realistic shooting foreground is solved, and the authenticity of the shooting is improved.

CN117354438BActive Publication Date: 2025-04-22DIVINE VISION (SHENZHEN) CULTURE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311432750.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-31
Publication Date
2025-04-22
Estimated Expiration
2043-10-31

AI Technical Summary

Technical Problem

During the LED-based virtual shooting process, the light intensity alignment effect of the virtual shooting background and the realistic shooting foreground is poor, resulting in poor shooting authenticity.

Method used

By obtaining the actual illuminance distribution of multiple light sampling positions in the real shooting foreground, and adjusting the light intensity of the preset virtual light source in the virtual shooting background, the equivalent illuminance distribution corresponding to the brightness of multiple light sampling positions under the virtual light source is consistent with the actual illuminance distribution.

Benefits of technology

Improves the accuracy of the light intensity alignment between the virtual shooting background and the realistic shooting foreground, and enhances the authenticity of the shooting.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117354438B_ABST
    Figure CN117354438B_ABST
Patent Text Reader

Abstract

The embodiments of the present invention provide a method, device, electronic device and computer storage medium for light intensity processing. The light intensity processing method includes: obtaining the actual illumination distribution of multiple illumination sampling positions in a real shooting foreground; determining the brightness of the multiple illumination sampling positions under a preset virtual light source in a virtual shooting background of the real shooting foreground; adjusting the light intensity of the preset virtual light source for the multiple illumination sampling positions respectively, so that the equivalent illumination distribution corresponding to the brightness of the multiple illumination sampling positions is consistent with the actual illumination distribution of the multiple illumination sampling positions; and determining the fitting result of each adjusted light intensity of the preset virtual light source as the light intensity of the virtual shooting background aligned with the real shooting foreground. The embodiments of the present invention improve the accuracy of light intensity alignment and the authenticity of shooting.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of computer technology, and in particular to a light intensity processing method, device, electronic device and computer storage medium. Background Art

[0002] Virtual shooting technology is a fusion of traditional filmmaking techniques and modern technology, which helps creators to combine the digital world with the physical world in real time and improve the shooting effect. In the LED-based virtual shooting process, first, a beautiful scene that is very similar to reality is created in an application such as a virtual engine, and then the technicians play it on the LED screen to replace the real-world scene. In this technology, shooting personnel such as the shooting team do not need to go to the location, but can complete the shooting requirements for different shooting foregrounds by switching the virtual shooting background at any time. In order to ensure that the virtual shooting background and the real shooting foreground in the final shooting picture can be well integrated and improve the authenticity of the shooting picture, it is necessary to ensure that the visual effects presented by the virtual shooting background in the virtual engine and the real shooting foreground are highly consistent.

[0003] In the traditional solution of aligning virtual and real light intensity effects, the virtual shooting background and the real shooting foreground are restricted by different display mechanisms. When shooting, the light intensity alignment effect between the virtual shooting background and the real shooting foreground is poor, resulting in poor shooting authenticity. Summary of the invention

[0004] In view of this, embodiments of the present invention provide a light intensity processing method, device, electronic device and computer storage medium to at least partially solve the above problems.

[0005] According to the first aspect of an embodiment of the present invention, a light intensity processing method is provided. The light intensity processing method comprises: obtaining the actual illuminance distribution of multiple illumination sampling positions in a real shooting foreground; determining the brightness of the multiple illumination sampling positions under a preset virtual light source in a virtual shooting background of the real shooting foreground; adjusting the light intensity of the preset virtual light source for the multiple illumination sampling positions respectively, so that the equivalent illuminance distribution corresponding to the brightness of the multiple illumination sampling positions under the preset virtual light source is consistent with the actual illuminance distribution of the multiple illumination sampling positions; determining the fitting result of each adjusted light intensity of the preset virtual light source as the light intensity of the virtual shooting background aligned with the real shooting foreground.

[0006] In another implementation of the present invention, determining the brightness of the multiple lighting sampling positions under a preset virtual light source in the virtual shooting background of the real shooting foreground includes: determining the positions of the multiple lighting sampling positions in the virtual shooting background according to the spatial correspondence between the real shooting foreground and the virtual shooting background; and reading the brightness of the multiple positions in the virtual shooting background under the preset virtual light source.

[0007] In another implementation of the present invention, the light intensity of the preset virtual light source is adjusted for the multiple illumination sampling positions respectively so that the equivalent illuminance distribution corresponding to the brightness of the multiple illumination sampling positions is consistent with the actual illuminance distribution of the multiple illumination sampling positions, including: determining an equivalent illuminance having a preset mapping relationship with the brightness of each illumination sampling position, the preset mapping relationship indicating the correspondence between the equivalent illuminance and the brightness of the object; when the equivalent illuminance at each illumination sampling position is consistent with the actual illuminance, recording the adjusted light intensity of the preset virtual light source.

[0008] In another implementation of the present invention, the method further includes: when the equivalent illuminance at each illumination sampling position is inconsistent with the actual illuminance, adjusting the light intensity of the preset virtual light source until the equivalent illuminance at the illumination sampling position is consistent with the actual illuminance.

[0009] In another implementation of the present invention, the method further includes: setting the multiple illumination sampling positions so that the multiple illumination sampling positions are located around the photographed object in the actual shooting foreground.

[0010] In another implementation of the present invention, the method also includes: determining an illumination plane in which the multiple illumination sampling positions in the virtual shooting background are located; setting the position of the preset virtual light source in the virtual shooting background so that the projection position of the preset virtual light source in the illumination plane is between the multiple illumination sampling positions.

[0011] In another implementation of the present invention, the method further includes: adjusting the position of the preset virtual light source in the virtual shooting background so that the difference between each adjusted light intensity of the preset virtual light source and the fitting result is smaller than a preset value.

[0012] In another implementation of the present invention, the method also includes: based on shooting parameters, shooting the grayscale samples in the actual shooting foreground to obtain the foreground grayscale of the grayscale samples after shooting; setting the virtual shooting background based on the shooting parameters, shooting the virtual grayscale samples to obtain the background grayscale of the virtual grayscale samples after shooting, and the grayscale of the virtual grayscale samples is consistent with the grayscale of the grayscale samples; by comparing the foreground grayscale with the background grayscale, verifying the light intensity alignment result between the actual shooting foreground and the virtual shooting background.

[0013] In another implementation of the present invention, the method further includes: photographing the grayscale samples in the actual shooting foreground by adjusting the initial shooting parameters; when the foreground grayscale of the grayscale samples after shooting is a neutral grayscale, determining the initial shooting parameters as the shooting parameters.

[0014] In another implementation of the present invention, the method further includes: while ensuring that the preset virtual light source has aligned light intensity, adjusting the light source cone angle of the preset virtual light source so that the equivalent illuminance of the multiple illumination sampling positions is consistent with the actual illuminance distribution.

[0015] According to a second aspect of an embodiment of the present invention, a light intensity processing device is provided. The light intensity processing device includes: an acquisition module, which acquires the actual illuminance distribution of multiple illumination sampling positions in a real shooting foreground; a determination module, which determines the brightness of the multiple illumination sampling positions under a preset virtual light source in a virtual shooting background of the real shooting foreground; an adjustment module, which adjusts the light intensity of the preset virtual light source for the multiple illumination sampling positions respectively, so that the equivalent illuminance distribution corresponding to the brightness of the multiple illumination sampling positions under the preset virtual light source is consistent with the actual illuminance distribution of the multiple illumination sampling positions; a fitting module, which determines the fitting result of each adjusted light intensity of the preset virtual light source as the light intensity of the virtual shooting background aligned with the real shooting foreground.

[0016] According to a third aspect of an embodiment of the present invention, 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 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 described in the first aspect.

[0017] According to a fourth aspect of an embodiment of the present invention, there is provided a computer storage medium on which a computer program is stored. When the program is executed by a processor, the method described in the first aspect is implemented.

[0018] In an embodiment of the present invention, by means of the brightness of multiple illumination sampling positions under a preset virtual light source, the equivalent illumination distribution of the multiple illumination sampling positions is obtained, and then the light intensity of the preset virtual light source can be adjusted by comparing the equivalent illumination distribution of the multiple illumination sampling positions with the actual illumination distribution, so that the light intensity of the preset virtual light source is aligned with the light intensity of the actual shooting foreground. In addition, the fitting results of the adjusted light intensities of the preset virtual light source are determined as the light intensity of the virtual shooting background aligned with the actual shooting background, avoiding the situation where a single illumination sampling position brings errors, improving the accuracy of light intensity alignment, and improving the authenticity of shooting. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the embodiments of the present invention 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 invention. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.

[0020] Figure 1 is a schematic diagram of a shooting system according to an example.

[0021] Figure 2 is a flow chart of the steps of a light intensity processing method according to some embodiments of the present invention.

[0022] Figure 3A Based on Figure 2 A flowchart of further exemplary steps of the light intensity processing method of an embodiment.

[0023] Figure 3B and Figure 3C Based on Figure 2 A schematic diagram of a light intensity alignment process of a real photographing foreground and a virtual photographing background in an embodiment.

[0024] Figure 4 is a structural block diagram of a light intensity processing device according to some other embodiments of the present invention.

[0025] Figure 5 Schematic diagram of the structure of electronic devices according to other embodiments of the present invention. DETAILED DESCRIPTION

[0026] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in the field based on the embodiments in the embodiments of the present invention should fall within the scope of protection of the embodiments of the present invention.

[0027] The specific implementation of the embodiment of the present invention is further described below in conjunction with the accompanying drawings of the embodiment of the present invention.

[0028] Figure 1 An example photographing system is shown. Exemplarily, the photographing system may include a display device 101 , a server 102 , a terminal device 103 and a photographing device 104 .

[0029] The server 102 may be in communication connection with the terminal device 103 , and the server 102 stores background resources of a virtual shooting background, such as image resources and / or video resources.

[0030] Thus, the terminal device 103 may send a download request to the server 102 , where the download request is used to request downloading of background resources.

[0031] The terminal device 103 may optimize the image quality of the virtual shooting background in the background resources, for example, by adjusting the display effect of the virtual shooting background, such as color display, illumination display, and the like.

[0032] The display device 101 may be a display screen or a projection device, and the display device 101 is connected to the terminal device 103 for communication, and receives the virtual shooting background transmitted by the terminal device 103. When the display device 101 is a display screen, the display screen may be arranged behind the actual shooting foreground; when the display device 101 is a projector, the projector projects the virtual shooting background onto a projection screen, and the projection screen may be arranged behind the actual shooting foreground.

[0033] The photographing device 104 is used to photograph the virtual photographing background and the real photographing foreground when the display device 101 displays the virtual photographing background.

[0034] Furthermore, the terminal device 103 may be installed with an application such as a virtual engine. The virtual shooting background is processed. The virtual engine is an image processing application that can render an image in two dimensions or three dimensions. For example, the terminal device 103 may obtain (for example, from the shooting device 104) relevant information of the real shooting foreground (for example, position information of the real shooting foreground, light sampling position and actual light intensity). The terminal device 103 may also obtain position information of the display device. The terminal device 103 may align the virtual shooting background with the real shooting foreground in space by adjusting the relative position between the virtual shooting background and the display device.

[0035] It should be understood that the terminal device 103 can be a smart phone, a tablet computer, a laptop computer, and other electronic devices. The terminal device 103 can access the network, and communicate and exchange data with the server 102 and / or the display device 101 and the shooting device 104 through the network. The above-mentioned network includes a local area network (English: Local Area Network, LAN), a wide area network (English: Wide Area Network, WAN), and a mobile communication network; such as the World Wide Web (English: World Wide Web, WWW), Long Term Evolution (English: Long Term Evolution, LTE) network, 2G network (English: 2nd Generation Mobile Network), 3G network (English: 3rd Generation Mobile Network), 5G network (English: 5th Generation Mobile Network), etc. Of course, this is only an exemplary description, and it does not mean that the present invention is limited to this.

[0036] Figure 2 A light intensity processing method according to some embodiments of the present invention is shown. Figure 2 The light intensity processing methods include:

[0037] S210: Obtain actual illumination distribution of multiple illumination sampling positions in a real shooting foreground.

[0038] It should be understood that the actual illuminance of each illumination sampling position can be detected by an illuminance detection device, or the actual shooting foreground can be pre-shot and the illuminance represented by the brightness of the illumination sampling position in the shot image can be used as the actual illuminance. The actual illuminance distribution can be represented by the actual illuminance of each of the multiple illumination sampling positions, or by the illuminance variation trend of the multiple illumination sampling positions with the position.

[0039] S220: Determine the brightness of multiple illumination sampling positions under a preset virtual light source in the virtual shooting background of the actual shooting foreground.

[0040] It should be understood that a preset virtual light source can be directly added to the image processing application (e.g., virtual engine) of the virtual shooting background, and the brightness of multiple lighting sampling positions can be read or measured. Alternatively, in the image processing application, a lighting sampling position aligned with the real shooting foreground can be determined, a virtual object with certain material parameters can be added at the lighting sampling position (for better measurement effect, the virtual object can be a planar virtual object), and then the brightness on the virtual object can be read or measured.

[0041] S230: Adjusting the light intensity of the preset virtual light source for the multiple illumination sampling positions respectively so that the equivalent illumination distribution corresponding to the brightness of the multiple illumination sampling positions under the preset virtual light source is consistent with the actual illumination distribution of the multiple illumination sampling positions.

[0042] It should be understood that the equivalent illuminance distribution of the multiple illumination sampling positions can be determined according to the brightness of the multiple illumination sampling positions in the virtual shooting background, and the equivalent illuminance distribution of the multiple illumination sampling positions in the virtual shooting background is made consistent with the actual illuminance distribution of the multiple illumination sampling positions in the real shooting foreground. More specifically, the equivalent illuminance corresponding to the brightness of the multiple illumination sampling positions can be determined, so that the values ​​of the equivalent illuminance of the multiple illumination sampling positions are consistent with the values ​​of the actual illuminance.

[0043] S240: Determine the fitting result of each adjusted light intensity of the preset virtual light source as the light intensity that aligns the virtual shooting background with the actual shooting foreground.

[0044] It should be understood that each adjusted light intensity can be fitted based on a fitting algorithm to obtain a fitted light intensity of a preset virtual light source as a fitting result. The fitting algorithm can be linear regression, difference algorithm, mean fitting, etc.

[0045] In the scheme of the embodiment of the present invention, the equivalent illuminance distribution of the multiple illumination sampling positions is obtained by means of the brightness of the multiple illumination sampling positions under the preset virtual light source, and then the light intensity of the preset virtual light source can be adjusted by comparing the equivalent illuminance distribution of the multiple illumination sampling positions with the actual illuminance distribution, so that the light intensity of the preset virtual light source is aligned with the light intensity of the actual shooting foreground. In addition, the fitting results of the adjusted light intensities of the preset virtual light source are determined as the light intensity of the virtual shooting background aligned with the actual shooting background, avoiding the situation where the error caused by the single illumination sampling position is improved, improving the accuracy of the light intensity alignment, and improving the authenticity of the shooting.

[0046] In some examples, Figure 3A Shows Figure 2 Some exemplary light intensity processing methods of the embodiments include the following steps:

[0047] S310: Determine multiple illumination sampling positions according to the position of the photographed object in the actual shooting foreground. For example, the multiple illumination sampling positions may be multiple illumination sampling points or multiple illumination sampling areas. In a specific example, the multiple illumination sampling positions may be arranged to be located in the illumination plane of the target light source in the actual shooting foreground, or may be arranged to be close to the illumination plane. The projection position of at least a part of the photographed object in the illumination plane is located within the fitting range of the projection positions of the multiple illumination sampling positions in the illumination plane, wherein the fitting range may be the circumscribed circle or circumscribed polygon of the projection positions of the multiple illumination sampling positions in the illumination plane, etc. Figure 3B As shown, in the actual shooting foreground 10 (for example, in Figure 1 In the display device 101 in FIG. 1 , the coordinates of the multiple illumination sampling positions A, B, C, D, and E based on the XYZ coordinate system are respectively (0, 0, 0), (0, 0.5, 0), (0, 1, 0), (0, -0.5, 0), and (0, -1, 0).

[0048] S320: Use the illuminance measuring device to measure the actual illuminance of each of the multiple illumination sampling positions in sequence. For example, the illuminance of the illumination sampling position (0,0,0) is 100 lux, the illuminance of the illumination sampling position (0,-0.5,0) is 80 lux, the illuminance of the illumination sampling position (0,-1,0) is 50 lux, the illuminance of the illumination sampling position (0,0.5,0) is 80 lux, and the illuminance of the illumination sampling position (0,-1,0) is 50 lux.

[0049] S330: In the virtual engine of the virtual shooting background, add a virtual object to the position corresponding to the illumination sampling position. Figure 3B The virtual shooting background 30 shown, in the virtual engine, the virtual object can be set to have a standard grayscale material, for example, the basic color value is set to 0.18, and the roughness is set to 1. It should be understood that the basic color can achieve color changes by adjusting the hue, saturation and brightness. The basic color value generally refers to the numerical value of the color represented by a number in the digital color space, where the digital color space can be an RGB color space or a CMYK color space. Roughness refers to the degree of smoothness of the surface of an object, and can also be used to describe the coarseness and fineness of the surface of an object. In computer graphics, the roughness value generally refers to a parameter used to describe the smoothness of the surface of an object, and its value range is generally 0 to 1, where 0 represents a very smooth surface and 1 represents a very rough surface. For another example, Figure 3C As shown, the virtual object can be placed at the illumination sampling position (0, -0.5, 0) (illumination sampling position D), and without loss of generality, the virtual object can be placed at any illumination sampling position (for example, illumination sampling position A, B, C, D, or E). Without loss of generality, when the virtual shooting background and the real shooting foreground are spatially aligned, as an example of determining the brightness of multiple illumination sampling positions under a preset virtual light source, multiple coordinate values ​​of the multiple illumination sampling positions in the virtual shooting background can be determined according to the spatial correspondence between the real shooting foreground and the virtual shooting background, and then the brightness of multiple positions indicated by the multiple coordinate values ​​in the virtual shooting background under the preset virtual light source is read.

[0050] S340: In the virtual engine, a preset virtual light source is added to vertically illuminate the virtual object. For example, the position where the preset virtual light source illuminates the illumination plane is located at the virtual object.

[0051] S350: In the virtual engine, the brightness corresponding to the equivalent illumination of the photographed object is calculated according to the preset mapping relationship. The preset mapping relationship may indicate the corresponding relationship between the equivalent illumination and the brightness of the object. For example, the following formula is an example of the preset mapping relationship:

[0052] π*L=R*E, where R is the surface reflection coefficient of the object; π is the circumference of the circle; E is the surface illumination of the object; and L is the brightness value of the surface of the object. For example, when the illumination at the illumination sampling position (0,0,0) is 100 lux, the reflection coefficient of the surface of the virtual object (for example, a material with standard grayscale) is R=0.19, and the brightness value of the surface of the virtual object is calculated to be L=6.05.

[0053] S360: By using the brightness detection tool in the virtual engine to measure the surface brightness value of the virtual object, adjust the intensity of the preset virtual light source so that the equivalent illuminance of the light sampling position is consistent with the actual illuminance. For example, the brightness value of the virtual object at the light sampling position (0,0,0) is set to 6.05, and the adjusted light intensity I0 of the preset virtual light source is recorded. It should be understood that the brightness detection tool can calculate the brightness value of the surface of the virtual object based on the pixel parameters of the virtual object. In this way, the surface brightness values ​​of other light sampling positions B, C, D and E are measured, and the adjusted light intensities I1, I2, I3 and I4 of the preset virtual light sources are recorded accordingly.

[0054] S370: Fitting each adjusted light intensity of the preset virtual light source, and determining the fitting result as the light intensity of the virtual shooting background and the real shooting foreground. For example, average processing is performed on the adjusted light intensities I0, I1, I2, I3 and I4, and the fitting result = (I0+I1+I2+I3+I4) / 5.

[0055] S380: While ensuring that the preset virtual light source has aligned light intensity, adjust the light source cone angle of the preset virtual light source so that the equivalent illuminance of multiple illumination sampling positions is consistent with the actual illuminance distribution. It should be understood that in the virtual engine, the illuminance of the virtual object at at least part of the illumination sampling positions can be measured. For example, the illuminance at the illumination sampling position (0, -0.5, 0) can be measured, and the illuminance at the illumination sampling position (0, -1, 0) can be measured, and the linear change curve between each illuminance and the illumination sampling position can be calculated. It should be understood that the adjusted light intensity of the preset virtual light source can be appropriately different from the aligned light intensity, so the light source cone angle of the virtual light can be adjusted by comparing the illuminance at the illumination sampling position (0, -0.5, 0) in the actual shooting foreground and the linear change curve of the illuminance at the illumination sampling position (0, -1, 0) (an example of actual illuminance distribution). The light source cone angle of the virtual light source refers to a parameter that controls the projection range and diffusion effect of the light source. In Unreal Engine, lights usually spread light into the scene in a cone or conical manner. Therefore, the light source cone angle determines the angle of the light beam emitted by the light source. A smaller angle will produce a more focused light beam, making the area where the light is projected more concentrated and producing a stronger light intensity. A larger angle will produce a more diffuse light beam, making the area where the light is projected more extensive and producing a weaker light intensity.

[0056] Furthermore, for Figure 3A In the embodiment, as an example of the verification process of the alignment result of the real shooting foreground and the virtual shooting background, the grayscale samples in the real shooting foreground can be shot based on the shooting parameters to obtain the foreground grayscale of the grayscale samples after shooting, and then, the virtual shooting background is set based on the shooting parameters, and the virtual grayscale samples are shot to obtain the background grayscale of the virtual grayscale samples after shooting (it should be understood that the grayscale of the virtual grayscale sample is consistent with the grayscale of the grayscale sample), and then, by comparing the foreground grayscale with the background grayscale, the light intensity alignment result between the real shooting foreground and the virtual shooting background is verified. Since the grayscale sample can remove the influence of non-light illumination factors and reliably characterize the illumination, when the grayscale of the virtual grayscale sample is consistent with the grayscale of the grayscale sample, the foreground grayscale and the background grayscale can be reliably and efficiently compared, thereby improving the efficiency of verification.

[0057] Furthermore, during the verification process, the grayscale samples in the actual foreground can be photographed by adjusting the initial shooting parameters, and then, when the foreground grayscale of the grayscale samples after shooting is neutral grayscale, the initial shooting parameters are determined as the shooting parameters. In other words, when the foreground grayscale of the grayscale samples after shooting is neutral grayscale, the illumination factor is more accurately characterized, further improving the reliability of the verification process.

[0058] It should be understood that in the above steps, steps S310 and S320 correspond to Figure 2 Step S210. Steps S330-S350 correspond to Figure 2 Step S220. Step S360 corresponds to Figure 2 Steps S370-S380 correspond to Figure 2 Step S240.

[0059] for Figure 3A In an embodiment, without loss of generality, as an example of determining the brightness of multiple illumination sampling positions under a preset virtual light source, multiple coordinate values ​​of the multiple illumination sampling positions in the virtual shooting background can be determined according to the spatial correspondence between the real shooting foreground and the virtual shooting background, and then, the brightness of the multiple positions respectively indicated by the multiple coordinate values ​​under the preset virtual light source can be read in the virtual shooting background. Through the above processing, the spatial correspondence between the real shooting foreground and the virtual shooting background is conducive to the effect of light intensity alignment. More specifically, the above spatial correspondence may refer to the correspondence between the coordinate system of the real shooting foreground and the coordinate system of the virtual shooting background. The coordinate system of the real shooting foreground is a three-dimensional coordinate system set based on the real shooting foreground, and the coordinate system of the virtual shooting background is a virtual three-dimensional coordinate system used when editing in image processing applications such as virtual engines, so as to achieve a more realistic three-dimensional visual effect. Therefore, the coordinate system of the real shooting foreground can be aligned with the coordinate system of the virtual shooting background (for example, the three dimensions of the two coordinate systems are aligned respectively), and then, based on the aligned real shooting foreground and virtual shooting background, the correspondence between the specific position of the lighting sampling position in the real shooting foreground and the specific position of the lighting sampling position in the virtual shooting background is determined.

[0060] More specifically, as a specific example of reading the brightness of multiple positions respectively indicated by multiple coordinate values ​​in a virtual shooting background under a preset virtual light source, for each coordinate value, a virtual object (e.g., a planar virtual object) can be set at the coordinate value in the virtual engine, and then, with the help of a brightness detection tool in the virtual engine, the surface brightness value of the virtual object can be detected.

[0061] for Figure 3AIn an embodiment, without loss of generality, in order to adjust the light intensity of a preset virtual light source for a plurality of illumination sampling positions respectively so that the equivalent illuminances corresponding to the brightness of the plurality of illumination sampling positions are respectively consistent with the actual illuminances of the plurality of illumination sampling positions, an equivalent illuminance having a preset mapping relationship with the brightness of each illumination sampling position (for example, the preset mapping relationship indicates the correspondence between the equivalent illuminance and the brightness of an object) can be first determined, and then, when the equivalent illuminance of each illumination sampling position is consistent with the actual illuminance, the adjusted light intensity of the preset virtual light source is recorded. Since the preset mapping relationship can reliably indicate the correspondence between the equivalent illuminance and the brightness of an object, by comparing whether the equivalent illuminance of each illumination sampling position is consistent with the actual illuminance, the adjusted light intensity of the preset virtual light source can be obtained reliably and efficiently.

[0062] That is, when the equivalent illuminance at each illumination sampling position is inconsistent with the actual illuminance, the light intensity of the preset virtual light source may be adjusted until the equivalent illuminance at the illumination sampling position is consistent with the actual illuminance.

[0063] Furthermore, for Figure 3A In the embodiment of the present invention, without loss of generality, the light intensity processing method may further include: setting a plurality of light sampling positions so that the plurality of light sampling positions are located around the photographed object in the actual photographing foreground. Thus, it is more conducive for the light intensity of the light sampling position to represent the light intensity of the photographed object.

[0064] Furthermore, for Figure 3A In an embodiment of the present invention, without loss of generality, the light intensity processing method may further include: determining an illumination plane where multiple illumination sampling positions in a virtual shooting background are located, and then setting the position of a preset virtual light source in the virtual shooting background so that the projection position of the preset virtual light source in the illumination plane is between the multiple illumination sampling positions. It should be understood that the projection position of the preset virtual light source in the illumination plane is between the multiple illumination sampling positions, so that the illumination sampling positions are more nearly vertically illuminated, further improving the accuracy of the representation of the preset mapping relationship.

[0065] Furthermore, for Figure 3A In an embodiment of the present invention, without loss of generality, the light intensity processing method may further include: adjusting the position of the preset virtual light source in the virtual shooting background so that the difference between each adjusted light intensity of the preset virtual light source and the fitting result is less than a preset value. As a result, each adjusted light intensity of the preset virtual light source is closer to each other (for example, the statistical variance or statistical standard deviation between each adjusted light intensity is smaller), so that the fitting result is closer to the illuminance distribution brought by the single light source in the actual shooting foreground, thereby further improving the fitting effect of the fitting process.

[0066] Figure 4Light intensity processing devices according to other embodiments of the present invention are shown. Figure 4 The light intensity processing device can be used to perform Figure 2 Light intensity processing methods include:

[0067] The acquisition module 410 acquires the actual illumination distribution of multiple illumination sampling positions in the actual shooting foreground.

[0068] The determination module 420 determines the brightness of the plurality of illumination sampling positions under a preset virtual light source in the virtual shooting background of the real shooting foreground.

[0069] The adjustment module 430 adjusts the light intensity of the preset virtual light source for the multiple illumination sampling positions respectively, so that the equivalent illuminance distribution corresponding to the brightness of the multiple illumination sampling positions under the preset virtual light source is consistent with the actual illuminance distribution of the multiple illumination sampling positions.

[0070] The fitting module 440 determines the fitting result of each adjusted light intensity of the preset virtual light source as the light intensity that aligns the virtual shooting background with the real shooting foreground.

[0071] In an embodiment of the present invention, by means of the brightness of multiple illumination sampling positions under a preset virtual light source, the equivalent illumination distribution of the multiple illumination sampling positions is obtained, and then the light intensity of the preset virtual light source can be adjusted by comparing the equivalent illumination distribution of the multiple illumination sampling positions with the actual illumination distribution, so that the light intensity of the preset virtual light source is aligned with the light intensity of the actual shooting foreground. In addition, the fitting results of the adjusted light intensities of the preset virtual light source are determined as the light intensity of the virtual shooting background aligned with the actual shooting background, avoiding the situation where a single illumination sampling position brings errors, improving the accuracy of light intensity alignment, and improving the authenticity of shooting.

[0072] In other examples, the determination module is specifically used to: determine the positions of the multiple lighting sampling positions in the virtual shooting background according to the spatial correspondence between the real shooting foreground and the virtual shooting background; and read the brightness of multiple positions in the virtual shooting background under the preset virtual light source.

[0073] In other examples, the adjustment module is specifically used to: determine an equivalent illuminance having a preset mapping relationship with the brightness of each illumination sampling position, wherein the preset mapping relationship indicates the correspondence between the equivalent illuminance and the brightness of the object; when the equivalent illuminance at each illumination sampling position is consistent with the actual illuminance, record the adjusted light intensity of the preset virtual light source.

[0074] In other examples, the adjustment module is further used to: when the equivalent illuminance at each illumination sampling position is inconsistent with the actual illuminance, adjust the light intensity of the preset virtual light source until the equivalent illuminance at the illumination sampling position is consistent with the actual illuminance.

[0075] In some other examples, the acquisition module is further used to: set the multiple illumination sampling positions so that the multiple illumination sampling positions are located around the photographed object in the actual shooting foreground.

[0076] In other examples, the adjustment module is also used to: determine the illumination plane in which the multiple illumination sampling positions in the virtual shooting background are located; and set the position of the preset virtual light source in the virtual shooting background so that the projection position of the preset virtual light source in the illumination plane is between the multiple illumination sampling positions.

[0077] In some other examples, the fitting module is further used to: adjust the position of the preset virtual light source in the virtual shooting background so that the difference between each adjusted light intensity of the preset virtual light source and the fitting result is smaller than a preset value.

[0078] In other examples, the light intensity processing device also includes a verification module, which is used to: based on shooting parameters, shoot the grayscale samples in the actual shooting foreground to obtain the foreground grayscale of the grayscale samples after shooting; set the virtual shooting background based on the shooting parameters, shoot the virtual grayscale samples, and obtain the background grayscale of the virtual grayscale samples after shooting, and the grayscale of the virtual grayscale samples is consistent with the grayscale of the grayscale samples; and verify the light intensity alignment result between the actual shooting foreground and the virtual shooting background by comparing the foreground grayscale with the background grayscale.

[0079] In other examples, the verification module is also used to: shoot the grayscale samples in the actual shooting foreground by adjusting the initial shooting parameters; when the foreground grayscale of the grayscale samples after shooting is a neutral grayscale, determine the initial shooting parameters as the shooting parameters.

[0080] In other examples, the adjustment module is further used to: adjust the light source cone angle of the preset virtual light source while ensuring that the preset virtual light source has aligned light intensity, so that the equivalent illuminance of the multiple lighting sampling positions is consistent with the actual illuminance distribution.

[0081] Reference Figure 5 , shows a schematic structural diagram of an electronic device according to another embodiment of the present invention. The specific embodiment of the present invention does not limit the specific implementation of the electronic device.

[0082] like Figure 5As shown, the electronic device may include: a processor (processor) 502 for executing a program 510 , a communication interface (Communications Interface) 504 , a memory (memory) 506 , and a communication bus 508 .

[0083] The processor, the communication interface, and the memory communicate with each other via a communication bus.

[0084] Communication interface, used to communicate with other electronic devices or servers.

[0085] The processor is used to execute the program, and specifically can execute the relevant steps in the above method embodiment.

[0086] Specifically, the program may include program codes including computer operation instructions.

[0087] The processor 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 invention. 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.

[0088] The memory is used to store programs. The memory may include a high-speed RAM memory, and may also include a non-volatile memory, such as at least one disk memory.

[0089] The program may include multiple computer instructions. Specifically, the program may enable the processor to execute operations corresponding to the light intensity processing method described in any of the aforementioned method embodiments through the multiple computer instructions.

[0090] The specific implementation of each step in the program 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.

[0091] The embodiment of the present invention further 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.

[0092] An embodiment of the present invention further provides a computer program product, including computer instructions, which instruct a computing device to execute operations corresponding to any one of the light intensity processing in the above-mentioned multiple method embodiments.

[0093] 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 invention 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 relevant regulations and standards, and corresponding operation entrances are provided for users to choose to authorize or refuse.

[0094] It should be pointed out that, according to the needs of implementation, the various components / steps described in the embodiments of the present invention 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 invention.

[0095] The above-mentioned method according to the embodiment of the present invention 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 to be 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.

[0096] 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 invention.

[0097] The above implementation methods are only used to illustrate the embodiments of the present invention, and are not limitations of the embodiments of the present invention. Ordinary technicians in the relevant technical field may make various changes and modifications without departing from the spirit and scope of the embodiments of the present invention. Therefore, all equivalent technical solutions also belong to the scope of the embodiments of the present invention. The patent protection scope of the embodiments of the present invention should be defined by the claims.

Claims

1. A light intensity processing method, comprising: Obtain the actual illumination distribution of multiple illumination sampling positions in the real shooting foreground; Determining positions of the plurality of illumination sampling positions in the virtual shooting background according to a spatial correspondence between the real shooting foreground and the virtual shooting background; Reading the brightness of a plurality of the positions under a preset virtual light source in the virtual shooting background; Determine an equivalent illuminance having a preset mapping relationship with the brightness of each of the positions, wherein the preset mapping relationship indicates a corresponding relationship between the equivalent illuminance and the brightness of the object; When the equivalent illuminance at each position is consistent with the actual illuminance, recording the adjusted light intensity of the preset virtual light source; The fitting result of each adjusted light intensity of the preset virtual light source is determined as the light intensity of the virtual shooting background and the real shooting foreground being aligned.

2. The method according to claim 1, wherein: The method further comprises: When the equivalent illuminance at each illumination sampling position is inconsistent with the actual illuminance, the light intensity of the preset virtual light source is adjusted until the equivalent illuminance at the illumination sampling position is consistent with the actual illuminance.

3. The method according to claim 1, wherein: The method further comprises: The multiple illumination sampling positions are set so that the multiple illumination sampling positions are located around the photographed object in the actual photographing foreground.

4. The method according to claim 1, wherein: The method further comprises: Determine an illumination plane where the plurality of illumination sampling positions in the virtual shooting background are located; The position of the preset virtual light source in the virtual shooting background is set so that the projection position of the preset virtual light source in the illumination plane is between the multiple illumination sampling positions.

5. The method according to claim 1, wherein: The method further comprises: The position of the preset virtual light source in the virtual shooting background is adjusted so that the difference between each adjusted light intensity of the preset virtual light source and the fitting result is smaller than a preset value.

6. The method according to claim 1, wherein: The method further comprises: Based on the shooting parameters, the grayscale samples in the actual shooting foreground are shot to obtain the foreground grayscale of the grayscale samples after shooting; The virtual shooting background is set based on the shooting parameters, and the virtual grayscale sample is shot to obtain the background grayscale of the virtual grayscale sample after shooting, and the grayscale of the virtual grayscale sample is consistent with the grayscale of the grayscale sample; By comparing the foreground grayscale with the background grayscale, the light intensity alignment result between the actual shooting foreground and the virtual shooting background is verified.

7. The method according to claim 6, wherein: The method further comprises: By adjusting the initial shooting parameters, shooting the grayscale sample in the actual shooting foreground; When the foreground grayscale of the grayscale sample after shooting is a neutral grayscale, the initial shooting parameter is determined as the shooting parameter.

8. The method according to claim 1, wherein: The method further comprises: Under the condition of ensuring that the preset virtual light source has aligned light intensity, the light source cone angle of the preset virtual light source is adjusted so that the equivalent illuminance of the multiple illumination sampling positions is consistent with the actual illuminance distribution.

9. A light intensity processing device, comprising: An acquisition module is used to acquire the actual illumination distribution of multiple illumination sampling positions in the actual shooting foreground; A determination module, which determines the positions of the plurality of illumination sampling positions in the virtual shooting background according to the spatial correspondence between the real shooting foreground and the virtual shooting background, and reads the brightness of the plurality of positions under a preset virtual light source in the virtual shooting background; an adjustment module, determining an equivalent illuminance having a preset mapping relationship with the brightness of each illumination sampling position, wherein the preset mapping relationship indicates a corresponding relationship between the equivalent illuminance and the brightness of the object, and recording the adjusted light intensity of the preset virtual light source when the equivalent illuminance at each illumination sampling position is consistent with the actual illuminance; A fitting module determines the fitting result of each adjusted light intensity of the preset virtual light source as the light intensity that aligns the virtual shooting background with the real shooting foreground.

10. 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-8.

11. A computer storage medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Method and device for obtaining ambient illumination information, and electronic equipment

    CN108509887A

  • Virtual model processing method and device, electronic device and storage medium

    CN108986199A