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

By matching the virtual display color and adjusting the light intensity of the virtual light source, the problem of light intensity alignment between the virtual shooting background and the real shooting foreground is solved, and the authenticity and visual effect of the shooting are improved.

CN117354439BActive Publication Date: 2024-10-29DIVINE VISION (SHENZHEN) CULTURE TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202311432780.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-31
Publication Date
2024-10-29
Estimated Expiration
2043-10-31

AI Technical Summary

Technical Problem

During the LED-based virtual shooting process, the visual effects of the virtual shooting background and the real shooting foreground are poorly aligned, resulting in low authenticity of the shooting.

Method used

By obtaining the actual illumination color and illumination at the illumination sampling position, the matching virtual display color is determined, and the brightness is adjusted in the virtual shooting background to make the equivalent illumination consistent with the actual illumination, and the light intensity of the preset virtual light source is adjusted independently of the virtual display color. , to achieve light intensity alignment between the virtual shooting background and the real shooting foreground.

Benefits of technology

Improved the accuracy of visual alignment between the virtual shooting background and the real shooting foreground, enhancing the authenticity of the shooting.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117354439B_ABST
    Figure CN117354439B_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 light color and actual light illuminance of the light sampling position in the real shooting foreground; determining a virtual display color that matches the actual light color; setting the color of the light sampling position to the virtual display color in the virtual shooting background of the real shooting foreground; while maintaining the virtual display color of the light sampling position, adjusting the brightness of the light sampling position in the virtual shooting background, so that the equivalent light illuminance corresponding to the brightness of the light sampling position is consistent with the actual light illuminance. The embodiments of the present invention improve the accuracy of visual effect alignment and improve 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 virtual shooting background in the virtual engine and the visual effects presented by 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 visual 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 a first aspect of an embodiment of the present invention, a light intensity processing method is provided, including: obtaining an actual lighting color and an actual lighting illuminance of an illumination sampling position in a real shooting foreground; determining a virtual display color that matches the actual lighting color; setting the color of the illumination sampling position to the virtual display color in a virtual shooting background of the real shooting foreground; and adjusting the brightness of the illumination sampling position in the virtual shooting background while maintaining the virtual display color of the illumination sampling position, so that the equivalent lighting illuminance corresponding to the brightness of the illumination sampling position is consistent with the actual lighting illuminance.

[0006] In another implementation of the present invention, setting the color of the lighting sampling position as the virtual display color in the virtual shooting background of the real shooting foreground includes: setting a preset virtual light source around the lighting sampling position in the virtual shooting background of the real shooting foreground; and setting the preset virtual light source based on the virtual display color.

[0007] In another implementation of the present invention, the brightness of the illumination sampling position in the virtual shooting background is adjusted so that the equivalent illuminance corresponding to the brightness of the illumination sampling position is consistent with the actual illuminance, including: detecting the brightness of the illumination sampling position under a preset virtual light source; adjusting the light intensity of the preset virtual light source for the illumination sampling position, and when the equivalent illuminance corresponding to the brightness of the illumination sampling position is consistent with the actual illuminance, determining the adjusted light intensity of the preset virtual light source as the light intensity that aligns the virtual shooting background with the real shooting foreground.

[0008] In another implementation of the present invention, the method further includes: when the equivalent illuminance at the 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, determining a virtual display color that matches the actual illumination color includes: determining illumination color parameters of the actual illumination color in a light perception color domain; and converting the illumination color parameters into virtual color parameters in an RGB color domain.

[0010] In another implementation of the present invention, the method also includes: based on shooting parameters, shooting the white sample in the real shooting foreground to obtain the foreground color of the white sample after shooting; setting the virtual camera in the virtual shooting background based on the shooting parameters, shooting the virtual white sample to obtain the background color of the virtual white sample after shooting, and the color parameters of the virtual white sample are consistent with the color parameters of the white sample; by comparing the foreground color with the background color, verifying the light intensity alignment result between the real shooting foreground and the virtual shooting background.

[0011] In another implementation of the present invention, the method further includes: photographing the white sample in the actual photographing foreground by adjusting the initial photographing parameters;

[0012] When the foreground color of the white sample after being photographed is standard white, the initial photographing parameters are determined as the photographing parameters.

[0013] According to a second aspect of an embodiment of the present invention, a light intensity processing device is provided, comprising: an acquisition module, for acquiring the actual lighting color and the actual lighting illuminance of a lighting sampling position in a real shooting foreground; a determination module, for determining a virtual display color that matches the actual lighting color; a setting module, for setting the color of the lighting sampling position to the virtual display color in a virtual shooting background of the real shooting foreground; and an adjustment module, for adjusting the brightness of the lighting sampling position in the virtual shooting background while maintaining the virtual display color of the lighting sampling position, so that the equivalent lighting illuminance corresponding to the brightness of the lighting sampling position is consistent with the actual lighting illuminance.

[0014] 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.

[0015] 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.

[0016] In the scheme of the embodiment of the present invention, the virtual display color of the lighting sampling position in the virtual shooting background is matched with the actual lighting color, so that the color alignment of the real shooting foreground and the virtual shooting background is achieved. In addition, with the help of the brightness of the lighting sampling position in the virtual shooting background, the equivalent illuminance of the lighting sampling position is obtained, and then the light intensity of the preset virtual light source can be adjusted independently of the virtual display color, so that the light intensity of the virtual shooting background and the real shooting foreground are aligned, thereby improving the accuracy of the visual effect alignment and improving the authenticity of the shooting. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] 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.

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

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

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

[0021] 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.

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

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

[0024] 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.

[0025] 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.

[0026] 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 .

[0027] 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.

[0028] 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.

[0029] 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.

[0030] 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.

[0031] 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.

[0032] 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.

[0033] 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.

[0034] 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:

[0035] S210: Acquire actual illumination color and actual illumination intensity of the illumination sampling position in the actual shooting foreground.

[0036] It should be understood that the illumination sampling positions are located around the photographed object in the actual shooting foreground, and the actual illumination and illumination color of at least one illumination sampling position can be detected by an illumination detection device.

[0037] Alternatively, the actual shooting foreground may be pre-shot, and the illumination represented by the brightness of the illumination sampling position in the shot image is used as the actual illumination, and the illumination color represented by the display color of the illumination sampling position is used as the actual illumination color.

[0038] S220: Determine a virtual display color that matches the actual illumination color.

[0039] It should be understood that the parameters of the illumination color domain where the actual illumination color is located can be converted into parameters of the display color domain of the virtual display color to achieve the above color matching. For example, the illumination color domain can be CIE 1931, and the display color domain can be the RGB color domain.

[0040] S230: In the virtual shooting background of the real shooting foreground, the color of the illumination sampling position is set as the virtual display color.

[0041] 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 virtual display color of the light sampling position can be set. Alternatively, the light sampling position aligned with the real shooting foreground can be determined in the image processing application, a virtual object such as a plane with certain material parameters can be added at the light sampling position, and then the virtual display color on the virtual object can be set. In addition, the preset virtual light source can be directly set to be able to emit light of virtual reality color.

[0042] S240: While maintaining the virtual display color of the illumination sampling position, adjust the brightness of the illumination sampling position in the virtual shooting background so that the equivalent illumination corresponding to the brightness of the illumination sampling position is consistent with the actual illumination.

[0043] It should be understood that the brightness of the preset virtual light source can be adjusted without changing the virtual display color, so that the value of the equivalent illuminance at the light sampling position is consistent with the value of the actual illuminance.

[0044] It should also be understood that in the case of multiple lighting sampling positions, a fitting algorithm can be used to fit the adjusted light intensities of the multiple lighting sampling positions to obtain the fitted light intensity of the preset virtual light source as the 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 virtual display color of the lighting sampling position in the virtual shooting background is matched with the actual lighting color, so that the color alignment of the real shooting foreground and the virtual shooting background is achieved. In addition, with the help of the brightness of the lighting sampling position in the virtual shooting background, the equivalent illuminance of the lighting sampling position is obtained, and then the light intensity of the preset virtual light source can be adjusted independently of the virtual display color, so that the light intensity of the virtual shooting background and the real shooting foreground are aligned, thereby improving the accuracy of the visual effect 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 the illumination sampling position according to the position of the photographed object in the actual shooting foreground. For example, the illumination sampling position may be the position of the illumination sampling point or the position of the illumination sampling area under the target light source in the actual shooting foreground. The illumination sampling position may be implemented as the position of one illumination sampling point or illumination sampling area, or may be implemented as the position of multiple illumination sampling points or multiple illumination sampling areas. In the case of multiple illumination sampling positions, the multiple illumination sampling positions are within the fitting range of the projection position in the illumination plane of the target light source, wherein the fitting range may be the circumscribed circle or circumscribed polygon of the projection position of the multiple illumination sampling positions in the illumination plane, etc. Figure 3B As shown, the coordinates of the multiple illumination sampling positions A, B, C, D, and E based on the XYZ coordinate system are (0, 0, 0), (0, 0.5, 0), (0, 1, 0), (0, -0.5, 0), and (0, -1, 0), respectively. In the case of one illumination sampling position, the illumination sampling position is located in the illumination plane of the target light source, and the projection position of at least a part of the photographed object in the illumination plane is located at a position around or adjacent to the illumination sampling position. Preferably, the illumination sampling position is located at position D (0, -0.5, 0), that is, the position where the preset virtual light source vertically illuminates the illumination plane.

[0048] S320: Measure the actual illumination and actual illumination color of each illumination sampling position. For example, the illumination of the illumination sampling position (0,0,0) under the target light source is 100 lux. Correspondingly, the actual illumination color of the illumination sampling position is [0.5,0.3,0]. Exemplarily, [x,y,z] can be a parameter of the CIE 1931 illumination color domain (an exemplary illumination color standard, or other illumination color standards). In the case of multiple illumination sampling positions, the illumination of the illumination sampling position (0,0,0) is 100 lux, the illumination of the illumination sampling position (0,-0.5,0) is 80 lux, the illumination of the illumination sampling position (0,-1,0) is 50 lux, the illumination of the illumination sampling position (0,0.5,0) is 80 lux, and the illumination of the illumination sampling position (0,-1,0) is 50 lux. Alternatively, the actual illumination color of any of the above illumination sampling positions can be used as the standard. The other lighting sampling positions are used to adjust the lighting intensity.

[0049] S330: Determine a virtual display color that matches the actual illumination color. For example, the color matching may be achieved by converting the parameters of the illumination color domain where the actual illumination color is located into the parameters of the display color domain of the virtual display color. For example, the illumination color domain may be CIE 1931, and the display color domain may be an RGB color domain.

[0050] S340: In the virtual engine of the virtual shooting background, a virtual object is added to the position corresponding to the illumination sampling position, and a preset virtual light source is set based on the illumination sampling position. For example, in the virtual engine, the position where the preset virtual light source illuminates the illumination plane is located at the virtual object. In addition, the display parameters of the virtual object can be set to a standard grayscale material, for example, the basic color value is set to 1, 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 a 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.

[0051] S350: Determine a matching virtual display color according to the actual illumination color, and set a preset virtual light source based on the virtual display color. For example, the conversion between the illumination color domain and the matching display color domain can be based on the following formula:

[0052]

[0053] Correspondingly, for the illumination color domain parameters [0.5, 0.3, 0], the matching RGB color domain parameters [255, 21, 43] are obtained, that is, the R channel value is 255, the G channel value is 21, and the B channel value is 43.

[0054] S360: In the virtual engine, the brightness corresponding to the equivalent illumination of the photographed object is calculated according to the preset mapping relationship. For example, 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:

[0055] π*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.

[0056] For example, Figure 3C As shown, the virtual object can be placed at the lighting sampling position (0, -0.5, 0) (lighting sampling position D). Without loss of generality, the virtual object can be placed at any lighting sampling position (for example, lighting sampling position A, B, C, D, or E).

[0057] 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 lighting sampling positions under a preset virtual light source, the multiple coordinate values ​​of the multiple lighting 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 coordinate values ​​under the preset virtual light source is read in the virtual shooting background.

[0058] S370: While maintaining the virtual display color, adjust the intensity of the preset virtual light source so that the equivalent illuminance at the illumination sampling position is consistent with the actual illuminance. For example, 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. While ensuring that the RGB parameters are [255,21,43], the brightness value of the virtual object at the illumination sampling position (0,0,0) is 6.05, and the adjusted light intensity I0 of the preset virtual light source is recorded. Then, I0 is determined as the light intensity at which the virtual shooting background is aligned with the real shooting foreground. Without loss of generality, the surface brightness values ​​of other illumination sampling positions B, C, D and E can also be measured in this way, and the adjusted light intensities I1, I2, I3 and I4 of the preset virtual light source are recorded accordingly. In other examples, the adjusted light intensities of the preset virtual light sources can also be fitted, and the fitting results are recorded. For example, the average value of the adjusted light intensities I0, I1, I2, I3 and I4 is processed to obtain a fitting result = (I0 + I1 + I2 + I3 + I4) / 5.

[0059] S380: While maintaining the preset virtual light source with aligned light intensity, adjust the light cone angle of the preset virtual light source so that the equivalent illuminance of multiple illumination sampling positions is consistent with the actual illuminance. 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 slightly adjusted compared with the aligned light intensity, so that the light cone angle of the virtual light can be adjusted by comparing the illuminance of the illumination sampling position (0, -0.5, 0) in the actual shooting foreground and the linear change curve of the illuminance of the illumination sampling position (0, -1, 0) (an example of actual illuminance). The light 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 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.

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

[0061] Furthermore, during the verification process, the initial shooting parameters can be adjusted to shoot a white sample in the actual shooting foreground, and then, when the foreground color of the white sample after shooting is standard white, the initial shooting parameters are determined as the shooting parameters. That is, when the foreground color of the white sample after shooting is standard white, the illumination factor is more accurately characterized, further improving the reliability of the verification process.

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

[0063] for Figure 3AIn the 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 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 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 can 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 an image processing application such as a virtual engine, 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 illumination sampling position in the real shooting foreground and the specific position of the illumination sampling position in the virtual shooting background is determined.

[0064] More specifically, as a specific example of reading the brightness of multiple coordinate values ​​under a preset virtual light source in a virtual shooting background, 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.

[0065] for Figure 3A In an embodiment, in order to adjust the brightness of the illumination sampling position in the virtual shooting background so that the equivalent illuminance corresponding to the brightness of the illumination sampling position is consistent with the actual illuminance, the virtual shooting background and the actual shooting foreground may be spatially aligned, the brightness of the illumination sampling position under a preset virtual light source is detected, and then the light intensity of the preset virtual light source is adjusted for the illumination sampling position. When the equivalent illuminance corresponding to the brightness of the illumination sampling position is consistent with the actual illuminance, the adjusted light intensity of the preset virtual light source is determined as the light intensity of the virtual shooting background aligned with the actual shooting foreground. For example, the equivalent illuminance corresponding to the brightness of the illumination sampling position may be calculated based on a preset mapping relationship.

[0066] That is, when the equivalent illuminance at the 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. Since the preset mapping relationship can reliably indicate the correspondence between the equivalent illuminance and the brightness of the object, by comparing whether the equivalent illuminance at 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.

[0067] Furthermore, for Figure 3A In an embodiment, without loss of generality, the light intensity processing method may further include: in the case of multiple illumination sampling positions, determining an illumination plane where multiple illumination sampling positions are located in a virtual shooting background, and then determining 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 illumination sampling positions. It should be understood that the projection position of the preset virtual light source in the illumination plane is between the 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. It should also be understood that the position closest to the projection position among the multiple illumination sampling positions can be determined as the illumination sampling position for setting the virtual display color, and then the actual illumination color of the illumination sampling position is obtained.

[0068] Furthermore, for Figure 3A In the embodiment, without loss of generality, the light intensity processing method may further include: in the case of multiple illumination sampling positions, the position of the preset virtual light source in the virtual shooting background may be adjusted 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. Thus, each adjusted light intensity of the preset virtual light source is closer, so that the fitting result is closer to the illumination brought by the single light source in the actual shooting foreground, thereby further improving the fitting effect of the fitting process.

[0069] Figure 4 Light 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:

[0070] The acquisition module 410 acquires the actual illumination color and actual illumination intensity of the illumination sampling position in the actual shooting foreground.

[0071] The determination module 420 determines a virtual display color that matches the actual illumination color.

[0072] The setting module 430 sets the color of the illumination sampling position as the virtual display color in the virtual shooting background of the real shooting foreground.

[0073] The adjustment module 430 adjusts the brightness of the illumination sampling position in the virtual shooting background while maintaining the virtual display color of the illumination sampling position, so that the equivalent illumination corresponding to the brightness of the illumination sampling position is consistent with the actual illumination.

[0074] It should be understood that the illumination sampling position is around the photographed object in the real shooting foreground, and the actual illumination and illumination color of at least one illumination sampling position can be detected by the illumination detection device. Alternatively, the real shooting foreground can also be pre-shot, and the illumination represented by the brightness of the illumination sampling position in the captured image is used as the actual illumination, and the illumination color represented by the display color of the illumination sampling position is used as the actual illumination color.

[0075] It should also be understood that the parameters of the illumination color domain where the actual illumination color is located can be converted into parameters of the display color domain of the virtual display color to achieve the above-mentioned color matching. For example, the illumination color domain can be CIE 1931, and the display color domain can be the RGB color domain. In addition, 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 virtual display color of the illumination sampling position can be set. Alternatively, the illumination sampling position aligned with the real shooting foreground can also be determined in the image processing application, and a virtual object such as a plane with certain material parameters can be added at the illumination sampling position, and then the virtual display color on the virtual object can be set. In addition, the preset virtual light source can be directly set to be able to emit light of virtual reality color.

[0076] It should also be understood that the brightness of the preset virtual light source can be adjusted without changing the virtual display color, so that the value of the equivalent illuminance at the illumination sampling position is consistent with the value of the actual illuminance. In addition, when there are multiple illumination sampling positions, a fitting algorithm can be used to fit the adjusted light intensities of the multiple illumination sampling positions to obtain the fitted light intensity of the preset virtual light source as the fitting result. The fitting algorithm can be linear regression, difference algorithm, mean fitting, etc.

[0077] In the scheme of the embodiment of the present invention, the virtual display color of the lighting sampling position in the virtual shooting background is matched with the actual lighting color, so that the color alignment of the real shooting foreground and the virtual shooting background is achieved. In addition, with the help of the brightness of the lighting sampling position in the virtual shooting background, the equivalent illuminance of the lighting sampling position is obtained, and then the light intensity of the preset virtual light source can be adjusted independently of the virtual display color, so that the light intensity of the virtual shooting background and the real shooting foreground are aligned, thereby improving the accuracy of the visual effect alignment and improving the authenticity of the shooting.

[0078] In some other examples, the setting module is specifically used to: set a preset virtual light source around the illumination sampling position in the virtual shooting background of the real shooting foreground; and set the preset virtual light source based on the virtual display color.

[0079] In other examples, the adjustment module is specifically used to: detect the brightness of the illumination sampling position under a preset virtual light source; adjust the light intensity of the preset virtual light source for the illumination sampling position, and when the equivalent illuminance corresponding to the brightness of the illumination sampling position is consistent with the actual illuminance, determine the adjusted light intensity of the preset virtual light source as the light intensity that aligns the virtual shooting background with the real shooting foreground.

[0080] In some other examples, the adjustment module is further used to: when the equivalent illuminance at the 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.

[0081] In some other examples, the adjustment module is further used to: determine the adjusted light intensity of the preset virtual light source as the light intensity at which the virtual shooting background is aligned with the real shooting foreground.

[0082] In some other examples, the determination module is specifically used to: determine the illumination color parameters of the actual illumination color in the light perception color domain; and convert the illumination color parameters into virtual color parameters in the RGB color domain.

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

[0084] In some other examples, the verification module is further used to: photograph the white sample in the actual shooting foreground by adjusting the initial shooting parameters; when the foreground color of the white sample after shooting is standard white, determine the initial shooting parameters as the shooting parameters.

[0085] 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.

[0086] like Figure 5 As 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 .

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

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

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

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

[0091] 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.

[0092] 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.

[0093] 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.

[0094] 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.

[0095] 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.

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

[0097] 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.

[0098] 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.

[0099] 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.

[0100] 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.

[0101] 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 lighting color and actual lighting intensity of the lighting sampling position in the actual shooting foreground; Determining illumination color parameters of the actual illumination color in a light perception color domain; Converting the illumination color parameters into parameters of virtual display colors in the RGB color domain; In the virtual shooting background of the real shooting foreground, setting the color of the illumination sampling position as the virtual display color; While maintaining the virtual display color of the illumination sampling position, the brightness of the illumination sampling position is adjusted in the virtual shooting background so that the equivalent illuminance corresponding to the brightness of the illumination sampling position is consistent with the actual illuminance.

2. The method according to claim 1, wherein: The step of setting the color of the illumination sampling position as the virtual display color in the virtual shooting background of the real shooting foreground includes: In the virtual shooting background of the real shooting foreground, a preset virtual light source is set around the lighting sampling position; The preset virtual light source is set based on the virtual display color.

3. The method according to claim 2, wherein: The adjusting the brightness of the illumination sampling position in the virtual shooting background so that the equivalent illumination corresponding to the brightness of the illumination sampling position is consistent with the actual illumination includes: Detecting the brightness of the illumination sampling position under a preset virtual light source; The light intensity of the preset virtual light source is adjusted according to the illumination sampling position. When the equivalent illuminance corresponding to the brightness at the illumination sampling position is consistent with the actual illuminance, the adjusted light intensity of the preset virtual light source is determined as the light intensity that aligns the virtual shooting background with the real shooting foreground.

4. The method according to claim 3, wherein: The method further comprises: When the equivalent illuminance at the 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.

5. The method according to claim 1, wherein: The method further comprises: Based on the shooting parameters, a white sample in the actual shooting foreground is shot to obtain a foreground color of the white sample after shooting; Setting a virtual camera in the virtual shooting background based on the shooting parameters, shooting a virtual white sample, and obtaining a background color of the virtual white sample after shooting, wherein the color parameters of the virtual white sample are consistent with the color parameters of the white sample; By comparing the foreground color with the background color, the light intensity alignment result between the real shooting foreground and the virtual shooting background is verified.

6. The method according to claim 5, wherein: The method further comprises: By adjusting the initial shooting parameters, shooting the white sample in the actual shooting foreground; When the foreground color of the white sample after being photographed is standard white, the adjusted initial photographing parameters are determined as the photographing parameters.

7. A light intensity processing device, comprising: An acquisition module is used to acquire the actual illumination color and actual illumination intensity of the illumination sampling position in the actual shooting foreground; A determination module, which determines illumination color parameters of the actual illumination color in a light perception color domain, and converts the illumination color parameters into parameters of a virtual display color in an RGB color domain; A setting module, which sets the color of the illumination sampling position as the virtual display color in the virtual shooting background of the real shooting foreground; An adjustment module adjusts the brightness of the illumination sampling position in the virtual shooting background while maintaining the virtual display color of the illumination sampling position, so that the equivalent illuminance corresponding to the brightness of the illumination sampling position is consistent with the actual illuminance.

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

9. 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 6.

Citation Information

Patent Citations

  • Image processing method and device

    CN107705277A

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

    CN108509887A

  • Global light simulation method and system capable of being applied to virtual film shooting

    CN114143475A

  • Color and shadow fusion algorithm applied to network virtual scene

    CN115665393A

  • Light control method and storage medium

    CN116506993A