Distributed illumination shooting effect prediction method and system based on big data
By extracting the brightness contribution component of a single light source from historical data, identifying overlapping areas of multiple light sources and calculating brightness deviation values, establishing a coupling strength function between light sources, identifying secondary light sources and iteratively calculating their reflected light intensity, the problem of ignoring the coupling effect of multiple light sources in traditional lighting prediction is solved, and more efficient lighting effect prediction is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-02-05
- Publication Date
- 2026-04-10
AI Technical Summary
Traditional methods for predicting lighting effects ignore the coupling effect between multiple light sources, leading to discrepancies between the predicted results and the actual effects, especially in complex scenes. Furthermore, these methods are computationally inefficient and fail to meet real-time or near-real-time requirements.
By extracting the brightness contribution component of a single light source from multiple sets of historical shooting data, identifying overlapping areas of multiple light sources, calculating brightness deviation values, establishing a coupling strength function between light sources, and identifying surface points with high reflectivity as secondary light sources, the transmission of their reflected light intensity between spatial blocks is iteratively calculated, and finally generating a predicted shooting effect image.
It significantly improves prediction accuracy, accurately simulates shooting effects under complex lighting conditions, reduces the need for repeated adjustments and multiple shots, and saves time and resource costs.
Smart Images

Figure CN121842518A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to computer graphics processing technology, and more particularly to a method and system for predicting the effects of distributed lighting shooting based on big data. Background Technology
[0002] Traditional lighting prediction relies heavily on the experience of photographers and lighting technicians, who continuously adjust the position, angle, and intensity of light sources to achieve the desired effect. With the development of computer graphics and artificial intelligence, algorithm-based lighting simulation and prediction techniques are increasingly being applied to pre-production lighting preparation. Current lighting prediction techniques mainly include physically based ray tracing rendering, image-based illumination estimation, and deep learning-based scene reconstruction.
[0003] Traditional illumination prediction methods often neglect the coupling effect between multiple light sources. This means that the actual brightness produced when multiple light sources act simultaneously differs from the simple sum of the brightness of each light source acting individually, leading to discrepancies between predicted and actual shooting results. This is particularly noticeable in scenes with a large number of light sources and complex layouts. Existing technologies are insufficient when dealing with high-reflectivity surfaces in scenes, failing to fully consider the impact of these surfaces as secondary light sources on the overall lighting environment. This results in an inability to accurately simulate multiple reflections and scattering of light, affecting the realism and accuracy of the prediction results. Furthermore, most methods employ centralized computing architectures, which are computationally inefficient when processing large-scale historical shooting data and complex lighting environments, making it difficult to meet the needs of real-time or near-real-time prediction and limiting their application value in actual shooting scenarios. Summary of the Invention
[0004] This invention provides a method and system for predicting distributed lighting shooting effects based on big data, which can solve the problems in the prior art.
[0005] A first aspect of this invention provides a method for predicting the effect of distributed lighting shooting based on big data, comprising: Historical lighting configuration information and shooting effect images are extracted from multiple sets of historical shooting datasets. Illumination decomposition is performed on the shooting effect images to obtain the brightness contribution components of a single light source. Based on the brightness contribution components of a single light source, the overlapping areas of multiple light sources are identified. Extract the single-source brightness value corresponding to the overlapping area of multiple light sources from the single-source brightness contribution component, calculate the brightness deviation value between the actual brightness of the overlapping area of multiple light sources and the superposition value of the single-source brightness value, and establish the coupling strength function between light sources based on the brightness deviation value and the spatial position of light sources in the historical lighting configuration information. Obtain the target lighting configuration information of the scene to be predicted, input the coupling strength function between light sources, and correct the theoretical brightness value of the light sources to obtain the coupled corrected brightness field; The scene to be predicted is divided into spatial blocks, the brightness distribution in the spatial blocks is extracted, and surface points with reflectivity exceeding a preset reflectivity threshold are identified as secondary light sources. The intensity of reflected light from the secondary light source is calculated and transmitted between spatial blocks. When the difference between two adjacent reflected light intensities is less than a preset convergence threshold, the block brightness field is obtained. Calculate the ratio of the total radiant energy of the block brightness field to the light source input energy in the target illumination configuration information, and scale the block brightness field according to the ratio to generate a predicted shooting effect image.
[0006] Historical lighting configuration information and shooting effect images are extracted from multiple sets of historical shooting datasets. Illumination decomposition is performed on the shooting effect images to obtain the brightness contribution components of single light sources. Based on the brightness contribution components of single light sources, overlapping regions of multiple light sources are identified, including: Extract the three-dimensional coordinates of light sources from multiple sets of historical shooting datasets, calculate the connection weights between the three-dimensional coordinates of the light sources, and construct the light source connection matrix; Eigenvalue decomposition is performed on the light source connection matrix to obtain light source connection feature values. Based on the light source connection feature values, multiple historical shooting datasets are grouped to obtain historical lighting configuration information. The captured image is converted into a three-dimensional illumination intensity matrix. The propagation distance from each light source to each pixel in the image is calculated based on the three-dimensional coordinates of the light source. The illumination attenuation coefficient is calculated based on the propagation distance. The illumination attenuation coefficient is iteratively optimized with the three-dimensional illumination intensity matrix to separate the brightness contribution component of a single light source. Calculate the brightness gradient value of the brightness contribution component of a single light source at a spatial location, identify the direction vector with the largest brightness gradient value, continuously track the pixel along the direction vector, and determine the boundary point when the brightness gradient value of the tracked pixel is less than a preset gradient threshold. The area surrounded by the boundary point is determined as the multi-light source overlapping area.
[0007] Extract the single-source luminance value corresponding to the overlapping area of multiple light sources from the single-source luminance contribution component, calculate the luminance deviation value between the actual luminance of the overlapping area of multiple light sources and the superimposed value of the single-source luminance values, and establish the inter-source coupling strength function based on the luminance deviation value and the spatial location of the light sources in the historical lighting configuration information, including: A three-dimensional spatial coordinate system is established for the overlapping area of multiple light sources. A uniformly distributed array of sampling points is constructed within the three-dimensional spatial coordinate system, and the surface normal vector of each sampling point in the sampling point array is calculated. The brightness contribution component of a single light source is projected onto the sampling point array to obtain a brightness distribution point cloud. The brightness distribution point cloud is then fitted with a surface based on the surface normal vector. The brightness value of a single light source corresponding to the overlapping area of multiple light sources is extracted from the surface fitting result. The brightness value of a single light source is constructed as a light source brightness vector in a three-dimensional spatial coordinate system. The difference between the actual brightness of the overlapping area of the multiple light sources and the projection of the light source brightness vector onto the sampling point array is calculated. A brightness residual distribution matrix is constructed, and the brightness deviation value is extracted from the brightness residual distribution matrix. Extract the spatial location of the light source from the historical lighting configuration information to construct a light source location matrix. Combine the brightness deviation value with the light source location matrix to generate the light source potential field. Calculate the gradient distribution of the light source potential field on the sampling point array. Establish the coupling strength function between light sources based on the gradient distribution.
[0008] Obtain the target lighting configuration information of the scene to be predicted, input the coupling strength function between light sources, and correct the theoretical brightness values of the light sources to obtain the coupled corrected brightness field, including: Obtain target lighting configuration information from the scene to be predicted, and extract the target light source position coordinates and target light source lighting parameters from the target lighting configuration information; The spatial distance between light sources is calculated based on the position coordinates of the target light source, and the theoretical brightness value of the light source is calculated based on the spatial distance between the light sources and the illumination parameters of the target light source. Based on the spatial distance between the light sources, adjacent light source combinations are identified. The coupling strength function between the light sources is applied to the adjacent light source combinations to calculate the coupling strength between the light sources. The coupling strength between the light sources is combined with the theoretical brightness value of the light sources to generate a compensated brightness distribution. A brightness correction constraint is constructed based on the adjacent light source combination. The compensated brightness distribution and the brightness correction constraint are combined to form a brightness correction calculation formula. The compensated brightness distribution is updated through iterative calculation. When the iterative update amount of the compensated brightness distribution is less than the update convergence threshold, the compensated brightness distribution is determined as the coupled correction brightness field.
[0009] The scene to be predicted is divided into spatial blocks, the brightness distribution in the spatial blocks is extracted, and surface points with reflectivity exceeding a preset reflectivity threshold are identified as secondary light sources, including: The scene to be predicted is divided into uniform spatial blocks at equal intervals along the spatial coordinate axis, and three-dimensional grid sampling points are set in the uniform spatial blocks. Extract the light source emission intensity from the scene to be predicted, calculate the light propagation distance from the light source emission intensity to each sampling point, and calculate the light attenuation value based on the light propagation distance; The brightness value of the sampling point is calculated by combining the emission intensity of the light source with the light attenuation value, forming the brightness distribution in the spatial blocks. Calculate the tangent plane of the surface at each sampling point within the uniform spatial block, extract the surface normal vector from the tangent plane, calculate the direction of the line connecting the light source to the sampling point as the incident direction of the light, and perform vector operation between the incident direction of the light and the surface normal vector to obtain the surface reflectivity; The locations of surface points whose surface reflectivity exceeds a preset reflectivity threshold are designated as reflective light source points. The direction of the reflected light at the reflected light source point is calculated, and the intensity of the reflected light is obtained by calculating the brightness value at the reflected light source point and the surface reflectivity. The secondary light source containing the reflected light source point and the intensity of the reflected light is output.
[0010] The intensity of reflected light from the secondary light source is calculated and transferred between spatial blocks. When the difference between two adjacent reflected light intensities is less than a preset convergence threshold, the block brightness field is obtained, including: The three-dimensional coordinates and reflected light intensity of the reflected light source point are extracted from the secondary light source. The propagation distance to the sampling point in the adjacent spatial block is calculated to obtain the reflected light intensity of the secondary light source. The reflected light intensity of the secondary light source is transferred to the adjacent spatial block and superimposed on the brightness value of the sampling point to update the brightness distribution. Surface points with reflectivity exceeding a preset reflectivity threshold within the updated brightness distribution are identified as new secondary light sources. A secondary light source hierarchy index table is established to record the generation hierarchy and spatial block affiliation of the new secondary light sources. The reflected light intensity of each secondary light source is calculated sequentially according to the hierarchy and transferred to the spatial block. Construct a light intensity transfer matrix to store the transfer distribution of reflected light intensity of each level of secondary light source. Based on the light intensity transfer matrix, calculate the light intensity balance deviation of each spatial block by summing the rows and columns. Then, allocate the light intensity balance deviation to the brightness value of the sampling point in the corresponding spatial block for energy compensation. The difference in reflected light intensity between the current level and the previous level secondary light source is calculated to obtain the reflected light intensity difference value. It is then determined whether the reflected light intensity difference value is less than a preset convergence threshold. When it is less than the preset convergence threshold, the generation of new secondary light sources is stopped. The brightness values of the sampling points in each spatial block after energy compensation are summarized to form a block brightness field.
[0011] Calculating the ratio of the total radiant energy of the block brightness field to the light source input energy in the target illumination configuration information, and scaling the block brightness field according to the ratio to generate a predicted shooting effect image includes: The radiant energy of each spatial block is obtained by integrating the luminance values of the sampling points in each spatial block in the block luminance field. The total radiant energy is obtained by summing the radiant energy of each spatial block. The light source power parameters are extracted from the target lighting configuration information to calculate the light source input energy. The ratio of total radiant energy to light source input energy is calculated as the global energy calibration ratio. The light source position coordinates are extracted from the target illumination configuration information. The spatial distance from the light source position coordinates to the center point of each spatial block is calculated. The expected received light intensity of each spatial block is calculated based on the light source input energy and the spatial distance. The ratio of the radiated energy of each spatial block to the expected received light intensity is calculated to obtain the energy deviation coefficient of each spatial block. The global energy calibration ratio is multiplied by the energy deviation coefficient of each spatial block to obtain the scaling coefficient of each spatial block. The scaling coefficient of each spatial block is applied to the brightness value of the sampling point in the corresponding spatial block to obtain the scaled block brightness field. The scaled block brightness field is mapped to the image pixel coordinates to generate a predicted shooting effect image.
[0012] A second aspect of this invention provides a distributed lighting shooting effect prediction system based on big data, comprising: The illumination decomposition module is used to extract historical lighting configuration information and shooting effect images from multiple sets of historical shooting datasets, perform illumination decomposition on the shooting effect images, obtain the brightness contribution component of a single light source, and identify the overlapping area of multiple light sources based on the brightness contribution component of a single light source. The coupling function establishment module is used to extract the single light source brightness value corresponding to the overlapping area of multiple light sources from the single light source brightness contribution component, calculate the brightness deviation value between the actual brightness of the overlapping area of multiple light sources and the superposition value of the single light source brightness value, and establish the coupling strength function between light sources based on the brightness deviation value and the spatial position of the light sources in the historical lighting configuration information. The brightness correction module is used to obtain the target lighting configuration information of the scene to be predicted, input the coupling strength function between light sources, and correct the theoretical brightness value of the light sources to obtain the coupled corrected brightness field. The secondary light source recognition module is used to divide the scene to be predicted into spatial blocks, extract the brightness distribution in the spatial blocks, and identify surface points with reflectivity exceeding a preset reflectivity threshold as secondary light sources. The brightness field calculation module is used to calculate the intensity of reflected light from the secondary light source and transfer it between spatial blocks. When the difference between two adjacent reflected light intensities is less than a preset convergence threshold, the block brightness field is obtained. The effect generation module is used to calculate the ratio of the total radiant energy of the block brightness field to the light source input energy in the target illumination configuration information, and to scale the block brightness field according to the ratio to generate a predicted shooting effect image.
[0013] A third aspect of the present invention provides an electronic device, comprising: processor; Memory used to store processor-executable instructions; The processor is configured to invoke instructions stored in the memory to execute the aforementioned method.
[0014] A fourth aspect of the present invention provides a computer-readable storage medium having stored thereon computer program instructions that, when executed by a processor, implement the aforementioned method.
[0015] In this embodiment, by extracting the brightness contribution component of a single light source from historical data, identifying overlapping areas of multiple light sources, and calculating brightness deviation values, a coupling strength function between light sources is established. This effectively solves the problem of neglecting the mutual influence between multiple light sources in traditional lighting prediction, significantly improving prediction accuracy. High-reflectivity surface points are identified as secondary light sources, and the transmission of their reflected light intensity between spatial blocks is iteratively calculated, making the prediction results closer to the lighting conditions in the actual shooting environment. This ensures the physical rationality of the prediction results and avoids energy imbalance problems in lighting prediction results. Compared with traditional prediction methods, this method can more accurately simulate shooting effects under complex lighting environments, providing a more reliable pre-shooting evaluation tool for professional photography and film production. By accurately predicting lighting effects, production teams can optimize lighting design before actual shooting, reducing the need for repeated adjustments and multiple shots, significantly saving time and resource costs. Attached Figure Description
[0016] Figure 1 This is a flowchart illustrating the distributed lighting shooting effect prediction method based on big data according to an embodiment of the present invention. Figure 2 This is a schematic flowchart of the brightness field image generation method based on block radiation energy calibration according to an embodiment of the present invention. Detailed Implementation
[0017] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0018] The technical solution of the present invention will be described in detail below with reference to specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.
[0019] Figure 1 This is a flowchart illustrating the distributed lighting shooting effect prediction method based on big data according to an embodiment of the present invention. Figure 1 As shown, the method includes: Historical lighting configuration information and shooting effect images are extracted from multiple sets of historical shooting datasets. Illumination decomposition is performed on the shooting effect images to obtain the brightness contribution components of a single light source. Based on the brightness contribution components of a single light source, the overlapping areas of multiple light sources are identified. Extract the single-source brightness value corresponding to the overlapping area of multiple light sources from the single-source brightness contribution component, calculate the brightness deviation value between the actual brightness of the overlapping area of multiple light sources and the superposition value of the single-source brightness value, and establish the coupling strength function between light sources based on the brightness deviation value and the spatial position of light sources in the historical lighting configuration information. Obtain the target lighting configuration information of the scene to be predicted, input the coupling strength function between light sources, and correct the theoretical brightness value of the light sources to obtain the coupled corrected brightness field; The scene to be predicted is divided into spatial blocks, the brightness distribution in the spatial blocks is extracted, and surface points with reflectivity exceeding a preset reflectivity threshold are identified as secondary light sources. The intensity of reflected light from the secondary light source is calculated and transmitted between spatial blocks. When the difference between two adjacent reflected light intensities is less than a preset convergence threshold, the block brightness field is obtained. Calculate the ratio of the total radiant energy of the block brightness field to the light source input energy in the target illumination configuration information, and scale the block brightness field according to the ratio to generate a predicted shooting effect image.
[0020] In one optional implementation, historical lighting configuration information and shooting effect images are extracted from multiple sets of historical shooting datasets. Illumination decomposition is performed on the shooting effect images to obtain single-source light source brightness contribution components. Identification of overlapping regions of multiple light sources based on these single-source light source brightness contribution components includes: Extract the three-dimensional coordinates of light sources from multiple sets of historical shooting datasets, calculate the connection weights between the three-dimensional coordinates of the light sources, and construct the light source connection matrix; Eigenvalue decomposition is performed on the light source connection matrix to obtain light source connection feature values. Based on the light source connection feature values, multiple historical shooting datasets are grouped to obtain historical lighting configuration information. The captured image is converted into a three-dimensional illumination intensity matrix. The propagation distance from each light source to each pixel in the image is calculated based on the three-dimensional coordinates of the light source. The illumination attenuation coefficient is calculated based on the propagation distance. The illumination attenuation coefficient is iteratively optimized with the three-dimensional illumination intensity matrix to separate the brightness contribution component of a single light source. Calculate the brightness gradient value of the brightness contribution component of a single light source at a spatial location, identify the direction vector with the largest brightness gradient value, continuously track the pixel along the direction vector, and determine the boundary point when the brightness gradient value of the tracked pixel is less than a preset gradient threshold. The area surrounded by the boundary point is determined as the multi-light source overlapping area.
[0021] First, the three-dimensional coordinates of the light sources are extracted from multiple sets of historical shooting datasets. These datasets typically contain information about the light source locations and corresponding images. The three-dimensional coordinates of the light source can be represented in the form of (x, y, z), where x and y represent the planar position and z represents the height. For example, for multiple lights in a photography studio, the spatial coordinate position information of each light is extracted.
[0022] Calculate the connection weights between the three-dimensional coordinates of the light sources and construct a light source connection matrix. The connection weights can be calculated based on the Euclidean distance between the light sources: when the distance between two light sources is less than a preset threshold, the weight is inversely proportional to the relative distance; when the distance is greater than the threshold, the weight is zero. Assuming there are n light sources, construct an n×n light source connection matrix M, where the matrix element M[i][j] represents the connection weight between light source i and light source j.
[0023] The light source connection matrix is decomposed to obtain the light source connection eigenvalues. Singular Value Decomposition (SVD) is used to decompose matrix M into the product of three matrices U, Σ, and V, where the values on the diagonal are the eigenvalues. The eigenvalues are sorted by size, and the eigenvectors corresponding to the k largest eigenvalues are selected to form a reduced-dimensional space.
[0024] Based on the feature decomposition results, multiple historical shooting datasets were grouped. Each group of light source configurations was represented in a reduced-dimensional space, and K-means clustering was used to group them according to the similarity of the light source configurations. The similarity was calculated based on the cosine similarity between the reduced-dimensional feature vectors. After clustering, several classes of historical lighting configuration information were obtained, each containing similar light source arrangement schemes.
[0025] The captured image is converted into a three-dimensional illumination intensity matrix. Each channel of the RGB image is processed separately, constructing a three-dimensional matrix of height 3 to represent the illumination intensity distribution of different color channels. For example, a 1920×1080 RGB image is converted into a 1920×1080×3 illumination intensity matrix.
[0026] Calculate the propagation distance from each light source to each pixel in the image based on the three-dimensional coordinates of the light sources. Assuming the image plane coordinates are (u, v), calculate the Euclidean distance from the light source position (x, y, z) in space to the point (u, v, 0) on the image plane. For each pixel, calculate its propagation distance to all light sources, forming a distance matrix D.
[0027] The illumination attenuation coefficient is calculated based on the propagation distance. Illumination intensity typically follows an inverse square attenuation law, and the attenuation coefficient can be expressed as 1 / (d²+ε), where d is the propagation distance and ε is a small positive number to avoid division by zero errors. For each pixel, the attenuation coefficients of all light sources are calculated, forming an attenuation coefficient matrix A.
[0028] The illumination attenuation coefficient and the three-dimensional illumination intensity matrix are iteratively optimized to separate the brightness contribution components of each single light source. Alternating least squares (ALS) is used, with an initial single-light source contribution matrix B, for iterative optimization. In each iteration, B is fixed while A is optimized, and then A is fixed while B is optimized, until convergence or the maximum number of iterations is reached. Finally, the brightness contribution value of each light source to each pixel of the image is obtained, forming the single-light source brightness contribution components.
[0029] Calculate the luminance gradient values of the luminance contribution components of a single light source at its spatial location. For each luminance contribution component of a light source, use the Sobel operator to calculate the gradients in the horizontal and vertical directions, and synthesize them into gradient intensity and direction. For example, the luminance contribution component B of light source i... i Its gradient strength is G i The gradient direction is θ i .
[0030] Identify the direction vector with the largest brightness gradient value. At each pixel location, select the direction with the largest gradient intensity as the tracking direction. This direction usually points to the region where the illumination changes most drastically, i.e., the boundary region of the light source.
[0031] Pixels are continuously tracked along the direction vector. Starting from a point with a high gradient intensity, pixel-level tracking is performed along the gradient direction. Each step moves one pixel, and the coordinates of the pixels traversed are recorded during the tracking process.
[0032] A pixel is identified as a boundary point when the tracked pixel brightness gradient value is less than a preset gradient threshold. The preset gradient threshold can be set to 20% of the average gradient intensity. When the gradient intensity of multiple consecutive points (e.g., 5 points) is lower than the threshold, the current point is determined to be a boundary point, and its coordinates are recorded.
[0033] The region enclosed by the boundary points is defined as the overlapping region of multiple light sources. All tracked boundary points are collected, and the region enclosed by these boundary points is determined using a convex hull algorithm or a boundary filling algorithm. This region is the area where multiple light sources overlap, typically characterized by high light intensity and smooth light transitions.
[0034] Through the above steps, the entire process of extracting lighting configuration information from historical shooting data, performing illumination decomposition on the captured images, and identifying overlapping areas of multiple light sources is completed. This method can be applied to fields such as photographic lighting optimization and film scene lighting design, effectively improving the precise control of lighting effects.
[0035] In one optional implementation, the brightness values of the single light source corresponding to the overlapping area of multiple light sources are extracted from the brightness contribution components of the single light source, the brightness deviation value between the actual brightness of the overlapping area of multiple light sources and the superimposed value of the brightness values of the single light sources is calculated, and the coupling strength function between light sources is established based on the brightness deviation value and the spatial position of the light sources in the historical lighting configuration information, including: A three-dimensional spatial coordinate system is established for the overlapping area of multiple light sources. A uniformly distributed array of sampling points is constructed within the three-dimensional spatial coordinate system, and the surface normal vector of each sampling point in the sampling point array is calculated. The brightness contribution component of a single light source is projected onto the sampling point array to obtain a brightness distribution point cloud. The brightness distribution point cloud is then fitted with a surface based on the surface normal vector. The brightness value of a single light source corresponding to the overlapping area of multiple light sources is extracted from the surface fitting result. The brightness value of a single light source is constructed as a light source brightness vector in a three-dimensional spatial coordinate system. The difference between the actual brightness of the overlapping area of the multiple light sources and the projection of the light source brightness vector onto the sampling point array is calculated. A brightness residual distribution matrix is constructed, and the brightness deviation value is extracted from the brightness residual distribution matrix. Extract the spatial location of the light source from the historical lighting configuration information to construct a light source location matrix. Combine the brightness deviation value with the light source location matrix to generate the light source potential field. Calculate the gradient distribution of the light source potential field on the sampling point array. Establish the coupling strength function between light sources based on the gradient distribution.
[0036] When establishing a three-dimensional spatial coordinate system for a multi-source overlapping region, a rectangular coordinate system is established with the geometric center of the overlapping region as the origin. The horizontal axis is the X-axis, the vertical axis is the Y-axis, and the axis perpendicular to the plane is the Z-axis. A uniformly distributed array of sampling points is constructed within this coordinate system. The sampling point density is determined based on the size of the overlapping region, typically selecting at least 16 sampling points per square centimeter. For example, for an overlapping region of 30 cm × 40 cm, a 120 × 160 sampling point array can be constructed, resulting in 19200 sampling points. The surface normal vector is calculated for each sampling point. The surface normal vector is determined by the spatial relationship between the sampling point and its neighboring points. Using a local surface fitting method, a 3 × 3 point set around the sampling point is selected, a quadratic surface is fitted, and the partial derivative of the surface at that point is solved to calculate the normal vector.
[0037] When projecting the brightness contribution component of a single light source onto the sampling point array, each light source is processed individually. Assume the light source is numbered i and its position is P. i The sampling point is located at S. j Then the contribution L of the light source to the brightness of the sampling point i,jThe brightness contribution is related to the emission direction, intensity, propagation distance, and surface normal vector of the light source. For diffuse reflective surfaces, the brightness contribution is directly proportional to the cosine of the incident angle and inversely proportional to the square of the distance. After projection, a brightness distribution point cloud is obtained, with each point containing three-dimensional coordinates and a brightness value. A surface fit is performed on the brightness distribution point cloud based on the surface normal vector, and a radial basis function network is used to interpolate the discrete point cloud to construct a continuous brightness distribution function. For a dataset of 20,000 sampling points, a Gaussian kernel function with good local characteristics is selected as the radial basis function, and the kernel width parameter is set to 1.5 times the average point spacing. The interpolation coefficients are obtained by solving a system of linear equations. The brightness values of a single light source corresponding to the overlapping region of multiple light sources are extracted from the surface fitting results. Gridded extraction points are set within the overlapping region, and the brightness contribution value of each light source at each extraction point is recorded.
[0038] When constructing a light source brightness vector in a three-dimensional coordinate system based on the brightness value of a single light source, for a scene with n light sources, an n-dimensional brightness vector is constructed at each sampling point. Each component of the vector represents the brightness contribution of the corresponding light source at that point. The difference between the actual brightness of the overlapping area of multiple light sources and the projection of the light source brightness vector onto the sampling point array is calculated. The actual brightness is obtained through image pixel values, and the projection value is the superposition of the brightness components of each light source. Under the assumption of linear superposition, the projection value is equal to the sum of the components; for nonlinear cases, the interaction between light sources needs to be considered. The difference between the actual value and the projection value is calculated, and a brightness residual distribution matrix is constructed. This matrix has the same dimension as the sampling point array, and each element represents the brightness residual at the corresponding position. Brightness deviation values are extracted from the brightness residual distribution matrix, and statistical analysis is performed on the residuals to calculate characteristic quantities such as mean, variance, and maximum deviation. These characteristic quantities constitute the set of brightness deviation values.
[0039] When constructing a light source position matrix by extracting the spatial locations of light sources from historical lighting configuration information, the three-dimensional coordinates of each light source are recorded, forming an n×3 position matrix. Light source position data is obtained from the metadata of the imaging device or a dedicated recording system, with an accuracy typically in the millimeter range. The brightness deviation values are combined with the light source position matrix to generate a potential field describing the spatial distribution of the interactions between light sources. The combination operation uses a weighted spatial interpolation method to calculate the interaction strength of each pair of light sources, constructing a potential field function. For m sampling points and n light sources, the potential field function is an m×n×n third-order tensor, representing the interaction strength between any two light sources at each sampling point. The gradient distribution of the light source potential field on the sampling point array is calculated using the central difference method, differentiating the potential field function in three spatial directions to obtain the gradient vector field. Based on the gradient distribution, a coupling strength function between light sources is established, describing the nonlinear superposition relationship of brightness under different light source combinations. The coupling strength function is represented by a parameterized model, with model parameters determined by minimizing the mean square error between predicted and actual brightness.
[0040] In this embodiment, the nonlinear interactions between multiple light sources in complex lighting environments can be accurately captured, effectively solving the problem of insufficient accuracy of traditional linear superposition models in predicting the lighting effects of multiple light sources. By introducing a three-dimensional spatial coordinate system and surface normal vector calculation, the reflection and scattering characteristics of light on different surfaces are accurately simulated, solving the technical challenge of large differences in the light response of different material surfaces. The method based on sampling point array and brightness residual analysis can adaptively handle various complex lighting scenarios, improving the model's generalization ability.
[0041] In one optional implementation, the target lighting configuration information of the scene to be predicted is obtained, the coupling strength function between light sources is input, and the theoretical brightness value of the light sources is corrected to obtain the coupled corrected brightness field, including: Obtain target lighting configuration information from the scene to be predicted, and extract the target light source position coordinates and target light source lighting parameters from the target lighting configuration information; The spatial distance between light sources is calculated based on the position coordinates of the target light source, and the theoretical brightness value of the light source is calculated based on the spatial distance between the light sources and the illumination parameters of the target light source. Based on the spatial distance between the light sources, adjacent light source combinations are identified. The coupling strength function between the light sources is applied to the adjacent light source combinations to calculate the coupling strength between the light sources. The coupling strength between the light sources is combined with the theoretical brightness value of the light sources to generate a compensated brightness distribution. A brightness correction constraint is constructed based on the adjacent light source combination. The compensated brightness distribution and the brightness correction constraint are combined to form a brightness correction calculation formula. The compensated brightness distribution is updated through iterative calculation. When the iterative update amount of the compensated brightness distribution is less than the update convergence threshold, the compensated brightness distribution is determined as the coupled correction brightness field.
[0042] When obtaining target lighting configuration information from the scene to be predicted, the light source layout scheme is entered using scene modeling tools or lighting design software. The target lighting configuration information includes data such as the number, type, position coordinates, and lighting parameters of the light sources. The position coordinates are represented in a three-dimensional Cartesian coordinate system, accurate to the centimeter level; the lighting parameters include characteristics such as light source power, color temperature, beam angle, and spectral distribution. Taking a typical studio scene as an example, it can contain three sets of light sources: a main light source, auxiliary light sources, and background light sources, each with different power and angle configurations. The target light source position coordinates are extracted from the target lighting configuration information, recording the accurate position of each light source in three-dimensional space; simultaneously, the target light source lighting parameters are extracted, including the basic lighting characteristics of each light source. For soft light sources, their effective luminous area needs to be recorded; for directional light sources such as spotlights, their pointing angle needs to be recorded.
[0043] The spatial distance between light sources is calculated based on the coordinates of the target light source. The Euclidean distance formula is used to calculate the straight-line distance between any two light sources. For n light sources, an n×n distance matrix is constructed, where each element represents the distance between the corresponding two light sources. The distance matrix between light sources is symmetric, with zero elements on the main diagonal. The theoretical luminance value of the light source is calculated based on the spatial distance between the light sources and the illumination parameters of the target light source. The calculation of the theoretical luminance value considers the light source intensity and spatial attenuation factors. For a point light source model, the theoretical luminance value is directly proportional to the light source power and inversely proportional to the square of the distance. For actual light sources, corrections are made based on their light intensity distribution curves, as the light intensity varies at different angles. Taking a 500-watt spotlight as an example, the theoretical luminance at 10 meters on the central axis is approximately 500 lux, while it may drop to 250 lux at a 45-degree angle away from the center. The calculation process needs to consider the directivity and attenuation characteristics of the light source and construct a spatial luminance distribution field.
[0044] Adjacent light source combinations are identified based on the spatial distance between them. A distance threshold parameter is set; when the distance between two light sources is less than the threshold, they are considered adjacent light sources, forming a light source pair. The distance threshold is set according to the scene size and light source characteristics, typically 20%-30% of the maximum scene size. For large studios, the threshold can be set to 5 meters; for small indoor scenes, it can be set to 1.5 meters. A coupling strength function between light sources is applied to calculate the coupling strength between adjacent light source combinations. The coupling strength function uses a multi-parameter nonlinear model, considering factors such as light source type, distance, angle, and power, and outputs a coupling coefficient. The coupling coefficient is typically between 0.8 and 1.2; less than 1 indicates a suppressive effect, and greater than 1 indicates an enhancing effect. For two softboxes 0.8 meters apart, the coupling coefficient might be 0.85, indicating that the actual combined lighting effect is 15% lower than the sum of individual lighting effects. The coupling strength between light sources is combined with the theoretical brightness value of the light sources to generate a compensated brightness distribution. The combination operation uses a weighted correction method, accumulating the contribution of each light source at each spatial point and applying the coupling coefficient for correction. In practice, a three-dimensional spatial mesh can be constructed, and the compensated brightness value can be calculated at each mesh point. The mesh density is set according to the complexity of the scene, with higher density set for critical areas.
[0045] A brightness correction constraint is constructed based on the combination of adjacent light sources. The constraint conditions include energy conservation, physical rationality, and light source characteristics. The energy conservation constraint requires that the corrected total brightness does not exceed the total output energy of the light source; the physical rationality constraint requires that the brightness value be non-negative and conform to the laws of optical propagation; the light source characteristic constraint sets boundary conditions according to the specific light source type. The compensated brightness distribution and brightness correction constraints are combined to form a brightness correction calculation formula. This formula is a constrained optimization problem, with the objective function being to minimize the error between the predicted brightness and the actual brightness, and the constraint conditions being the aforementioned brightness correction constraints. The compensated brightness distribution is updated through iterative calculations, using gradient descent or conjugate gradient methods for optimization. In each iteration, the compensation coefficient is adjusted according to the error gradient, and the brightness distribution is updated. The iteration step size is dynamically adjusted according to the error magnitude, with an initial step size set to 0.1, gradually decreasing with each iteration. When the iterative update amount of the compensated brightness distribution is less than the update convergence threshold, the calculation is considered converged, and the current compensated brightness distribution is determined as the coupled corrected brightness field. The update convergence threshold is set to 0.5% of the average value of the initial brightness field, and convergence is typically achieved after 5-10 iterations.
[0046] For a three-point lighting scene consisting of a main light source, an auxiliary light source, and a contour light source, the main light source has a power of 800 watts, the auxiliary light source 300 watts, and the contour light source 200 watts. Based on the distances between the light sources, the distance between the main light source and the auxiliary light source is calculated to be 1.2 meters, the distance between the main light source and the contour light source is 2.5 meters, and the distance between the auxiliary light source and the contour light source is 2.8 meters. The main light source and the auxiliary light source are identified as adjacent light source combinations, and the coupling coefficient is calculated to be 0.88 using the coupling strength function. Brightness compensation calculations are performed, and the theoretical brightness in the overlapping area needs to be reduced by 12%, generating a compensated brightness distribution. Brightness correction constraints are constructed, including a total energy not exceeding 1300 watts of equivalent output and non-negative brightness values at each point. Through iterative calculations, after 7 iterations, the update amount is reduced to below 0.3%, obtaining the final coupled corrected brightness field.
[0047] The light source coupling correction technology implemented in this invention achieves accurate modeling of the mutual influence of multiple light sources in complex lighting environments, solving the prediction bias problem caused by neglecting the coupling effect between light sources in traditional lighting prediction methods. By introducing adjacent light source combination identification and coupling strength calculation, the nonlinear interaction characteristics between light sources are effectively captured, significantly improving the prediction accuracy of lighting effects. The brightness correction method based on constraint optimization ensures that the prediction results conform to physical laws and the principle of energy conservation, avoiding unreasonable brightness distribution.
[0048] In one optional implementation, the scene to be predicted is divided into spatial blocks, the brightness distribution in the spatial blocks is extracted, and surface points with reflectivity exceeding a preset reflectivity threshold are identified as secondary light sources, including: The scene to be predicted is divided into uniform spatial blocks at equal intervals along the spatial coordinate axis, and three-dimensional grid sampling points are set in the uniform spatial blocks. Extract the light source emission intensity from the scene to be predicted, calculate the light propagation distance from the light source emission intensity to each sampling point, and calculate the light attenuation value based on the light propagation distance; The brightness value of the sampling point is calculated by combining the emission intensity of the light source with the light attenuation value, forming the brightness distribution in the spatial blocks. Calculate the tangent plane of the surface at each sampling point within the uniform spatial block, extract the surface normal vector from the tangent plane, calculate the direction of the line connecting the light source to the sampling point as the incident direction of the light, and perform vector operation between the incident direction of the light and the surface normal vector to obtain the surface reflectivity; The locations of surface points whose surface reflectivity exceeds a preset reflectivity threshold are designated as reflective light source points. The direction of the reflected light at the reflected light source point is calculated, and the intensity of the reflected light is obtained by calculating the brightness value at the reflected light source point and the surface reflectivity. The secondary light source containing the reflected light source point and the intensity of the reflected light is output.
[0049] When dividing the scene to be predicted into uniform spatial blocks at equal intervals along the spatial coordinate axes, the granularity of the division is determined based on the scene size and expected accuracy. For a standard photography studio environment, the space can be divided into 10cm×10cm×10cm cube blocks; for product shooting scenes with many fine structures, smaller block sizes can be used, such as 5cm×5cm×5cm. Taking a 6m×8m×3m photography scene as an example, a total of 60×80×30 spatial blocks are divided, totaling 144,000 blocks. Three-dimensional mesh sampling points are set within the uniform spatial blocks, with sampling points distributed at the center of each block or according to more refined rules. For boundaries or critical areas, the sampling point density can be increased to improve calculation accuracy. In actual implementation, for a 6m×8m×3m scene, if one sampling point is set for each block, a total of 144,000 sampling points are generated; if eight sampling points are set for each block, a total of 1,152,000 sampling points are generated.
[0050] When extracting the light source emission intensity from the scene to be predicted, its spatial emission characteristics are determined based on the light source type and parameters. For point light sources, the light intensity is uniformly distributed spherically; for spotlights, the light intensity distribution is conical, with the highest intensity at the center and decreasing towards the edges; for area light sources, the luminous area and emission angle characteristics must be considered. Taking a 500W spotlight as an example, the light intensity along the central axis is 5000 cd, and the light intensity drops to 1250 cd at a 60-degree angle away from the center. The light propagation distance from the light source emission intensity to each sampling point is calculated using straight-line distance calculations, taking into account obstacles blocking the light propagation. For complex scenes, ray tracing technology can be used to calculate the actual propagation path. The light attenuation value is calculated based on the light propagation distance, applying a light attenuation model. The basic attenuation follows the inverse square law, i.e., the intensity is inversely proportional to the square of the distance, while also considering absorption attenuation by the air medium. In actual calculations, for a sampling point at a distance of 5m, the theoretical attenuation coefficient is 1 / 25; considering air absorption, the actual attenuation coefficient may be 0.039.
[0051] When calculating the brightness value of a sampling point by combining the emitted light intensity and light attenuation, the contributions of all visible light sources are summed for each sampling point. For directly illuminated areas, the brightness value is the light source intensity multiplied by the attenuation coefficient; for shadowed areas, the brightness value mainly comes from ambient light and secondary reflected light. For example, a 500W spotlight contributes approximately 195 lx to the direct brightness of a sampling point 5m away. Calculations are performed on all sampling points in the scene to form the brightness distribution in spatial blocks. The brightness distribution data structure is a three-dimensional matrix, with dimensions matching the number of spatial blocks, and matrix elements representing the brightness value at the corresponding location.
[0052] When calculating the tangent plane of the surface at each sampling point within a uniform spatial block, a local geometric fitting method is employed. For spatial blocks containing the object's surface, the 3D model or depth information of the object is extracted, and several neighboring points are selected around the sampling point to fit the local surface equation. Surface fitting can use the least squares method to fit quadratic or cubic spline surfaces. Taking a ceramic vase in product photography as an example, the surface model can be obtained through 3D scanning or a preset geometric model. Local surface fitting is performed on the curved parts, achieving an accuracy of millimeters. The surface normal vector is extracted from the tangent plane, and the direction of the normal vector is calculated using the partial derivative of the surface equation. The normal vector is perpendicular to the tangent plane and points outward from the object. The direction of the line connecting the light source to the sampling point is calculated as the incident direction of the light, which is the unit vector pointing from the light source to the sampling point. The surface reflectivity is obtained by performing vector operations on the incident direction of the light and the surface normal vector. The reflectivity is calculated based on the object's material properties and the incident angle of the light. For diffuse reflective surfaces, the reflectivity is proportional to the cosine of the incident angle; for specular reflective surfaces, the relationship between reflectivity and the incident angle is complex and requires reference to the material's reflectivity curve. Taking a smooth metal surface as an example, the reflectivity can reach 0.9 when light is incident perpendicularly, while the reflectivity may increase to 0.95 when the incident angle is 60 degrees.
[0053] Surface points with reflectivity exceeding a preset reflectivity threshold are designated as reflected light source points. This preset reflectivity threshold is set based on scene characteristics and computational accuracy requirements. For highly reflective materials, the threshold can be set to 0.7; for general scenes, it can be set to 0.5. In practical applications, surfaces such as mirrors, metals, and high-gloss plastics are typically marked as reflected light source points. If a mirror exists in the scene with a reflectivity of 0.85, the sampling points on its surface will be marked as reflected light source points. The set of marked reflected light source points constitutes a secondary light source set, which will be used as new light sources in subsequent light propagation calculations.
[0054] When calculating the direction of reflected light at a reflective light source point, for diffuse reflective surfaces, the reflected light diverges uniformly towards the hemisphere; for specular reflective surfaces, the reflection angle equals the incident angle, and the incident ray, reflected ray, and normal are coplanar. The intensity of the reflected light is calculated by combining the brightness value at the reflective light source point with the surface reflectivity; the intensity of the reflected light is the incident light intensity multiplied by the surface reflectivity. For a reflection point with a brightness value of 500 lx and a reflectivity of 0.8, its reflected light intensity is 400 lx. The output includes secondary light sources containing the reflective light source point and the intensity of the reflected light. The secondary light source data includes spatial coordinates, reflection direction, and reflected light intensity. The secondary light source information is stored in matrix form, with the number of rows equal to the number of reflective light source points, and the columns containing position, direction, and intensity information. In a typical shooting scene, thousands of secondary light source points may be identified, and these points participate in the subsequent calculation of reflected light propagation as new light sources.
[0055] Based on the spatial segmentation and secondary light source identification method proposed in this invention, accurate simulation of multiple reflections and propagation of light in complex lighting environments is achieved, overcoming the computational bias caused by neglecting the contribution of reflected light in traditional lighting prediction methods. By introducing three-dimensional mesh sampling and surface geometric characteristic analysis, the light reflection characteristics of different materials are accurately captured, especially the significant impact of highly reflective materials on the overall lighting effect. The technique of dynamically identifying secondary light sources using reflectivity thresholds effectively balances computational accuracy and efficiency, enabling accurate prediction of indirect lighting effects in complex scenes.
[0056] In one optional implementation, the intensity of reflected light from the secondary light source is calculated and transmitted between spatial blocks. When the difference in intensity between two adjacent reflected light events is less than a preset convergence threshold, the block brightness field is obtained, including: The three-dimensional coordinates and reflected light intensity of the reflected light source point are extracted from the secondary light source. The propagation distance to the sampling point in the adjacent spatial block is calculated to obtain the reflected light intensity of the secondary light source. The reflected light intensity of the secondary light source is transferred to the adjacent spatial block and superimposed on the brightness value of the sampling point to update the brightness distribution. Surface points with reflectivity exceeding a preset reflectivity threshold within the updated brightness distribution are identified as new secondary light sources. A secondary light source hierarchy index table is established to record the generation hierarchy and spatial block affiliation of the new secondary light sources. The reflected light intensity of each secondary light source is calculated sequentially according to the hierarchy and transferred to the spatial block. Construct a light intensity transfer matrix to store the transfer distribution of reflected light intensity of each level of secondary light source. Based on the light intensity transfer matrix, calculate the light intensity balance deviation of each spatial block by summing the rows and columns. Then, allocate the light intensity balance deviation to the brightness value of the sampling point in the corresponding spatial block for energy compensation. The difference in reflected light intensity between the current level and the previous level secondary light source is calculated to obtain the reflected light intensity difference value. It is then determined whether the reflected light intensity difference value is less than a preset convergence threshold. When it is less than the preset convergence threshold, the generation of new secondary light sources is stopped. The brightness values of the sampling points in each spatial block after energy compensation are summarized to form a block brightness field.
[0057] When extracting the 3D coordinates and reflected light intensity of a secondary light source, a data structure for the reflected light source is established, containing three main attributes: spatial location, reflection direction, and reflection intensity. For a secondary light source identified in a typical photographic scene, its coordinates are represented in a 3D coordinate system with meters as the unit, such as (2.45, 3.68, 1.22); the reflection direction is represented as a unit vector, such as (0.707, -0.707, 0); and the reflection intensity is in lx, such as 120 lx. The propagation distance to sampling points within adjacent spatial blocks is calculated using the Euclidean distance formula. For each secondary light source, the distance to all sampling points within adjacent blocks is calculated. Adjacent blocks are defined as all blocks that share a common face or vertex with the current block; typically, each block has 26 adjacent blocks. The reflected light intensity of the secondary light source is obtained, calculated based on the reflected light direction, propagation distance, and reflection intensity. For diffuse secondary light sources, the reflected light intensity follows a cosine distribution within the hemisphere. For specular secondary light sources, the reflected light is concentrated near the reflection direction, and its intensity distribution can be described using a Gaussian distribution model. Taking a specular reflection point with a reflectivity of 0.8 as an example, its original brightness is 300 lx, and its reflected intensity is 240 lx. When propagating to a sampling point at a distance of 2 m, considering distance attenuation, the brightness at the sampling point is approximately 60 lx. The reflected light intensity of the secondary light source is transferred to adjacent spatial blocks and superimposed on the brightness value of the sampling point to update the brightness distribution. For each sampling point, the contribution values of all visible secondary light sources are accumulated to form the updated brightness distribution matrix.
[0058] When identifying surface points within the updated brightness distribution whose reflectivity exceeds a preset reflectivity threshold as new secondary light sources, the same method as for identifying the initial secondary light source is used. For studio scenes, the preset reflectivity threshold can be set to 0.5; for product shooting scenes with many high-gloss surfaces, the threshold can be adjusted to 0.6 or higher. A secondary light source hierarchy index table is established to record the generation hierarchy and spatial block affiliation of newly added secondary light sources. The index table structure includes a unique identifier, hierarchy number, affiliation block index, and reflectivity parameters. The hierarchy number starts from 0, with the initial secondary light source being layer 0, the secondary light source generated by the reflected light from layer 0 being layer 1, and so on. The index table is stored using a hash structure, supporting fast lookup and updates. The reflected light intensity of each secondary light source is calculated sequentially according to the hierarchy and transmitted to the spatial block. Following the order from lower to higher levels, the reflected light transmission of the layer 0 secondary light source is calculated first, then layer 1, and so on. This sequential calculation method conforms to the physical process of light propagation, ensuring the physical rationality of the calculation results.
[0059] When constructing a light intensity transfer matrix to store the transfer distribution of reflected light intensity from secondary light sources at each level, the matrix rows represent light source blocks, and the columns represent receiving blocks. Matrix element values represent the light intensity transferred from a row block to a column block. For a scenario with N blocks, the light intensity transfer matrix is an N×N sparse matrix, typically with non-zero transfer values only between adjacent blocks. In a 6m×8m×3m scenario, if divided into 60×80×30 blocks, the light intensity transfer matrix size is 144000×144000, but the proportion of non-zero elements is usually less than 0.01%. Based on the light intensity transfer matrix, the light intensity balance deviation for each spatial block is calculated by summing the rows and columns. The row sum represents the total light intensity transferred outward from the block, and the column sum represents the total light intensity received by the block. The difference between these two, plus the sum of the light intensity emitted by the block's own light source, constitutes the light intensity balance deviation. For a conservative system, the overall balance should be achieved, but deviations may exist in some local blocks. The light intensity balance deviation is allocated to the brightness values of the sampling points within the corresponding spatial blocks for energy compensation. A proportional allocation method is used, which allocates the deviation amount according to the original brightness ratio of the sampling points to ensure energy conservation.
[0060] The difference in reflected light intensity between the current layer and the previous layer's secondary light source is calculated using a relative difference calculation method. For the k-th and (k-1)-th layer light sources, the ratio of the sum of the reflected light intensities of the two layers is calculated, or the average brightness difference between the two layers within the same spatial region is calculated. It is then determined whether the difference in reflected light intensity is less than a preset convergence threshold. This threshold is set according to the required calculation accuracy, typically between 0.01 and 0.05. For example, in a studio lighting simulation, a preset convergence threshold of 0.02 can be set, meaning convergence is considered achieved when the difference in reflected light intensity between two adjacent layer light sources is less than 2%. When the difference is less than the preset threshold, the generation of new secondary light sources is stopped, and the reflected light transmission calculation process ends. Typically, convergence is achieved after 3 to 5 layers of reflection. The brightness values of the sampled points within each spatial block, after energy compensation, are summarized to form a block brightness field. The final calculation results are organized into a 3D brightness field data structure corresponding to the spatial blocks, serving as input for subsequent rendering and effect prediction.
[0061] In this embodiment, by establishing a secondary light source hierarchy index and a light intensity transfer matrix, the complex propagation path and energy distribution of light in space are effectively captured, especially accurately describing the multiple energy transfer processes in highly reflective material environments. A convergence threshold judgment mechanism is introduced, ensuring computational accuracy while avoiding the waste of computational resources caused by infinite reflection. Combined with energy balance compensation technology, this ensures that the prediction results conform to the laws of physical conservation.
[0062] like Figure 2 The diagram shows a flowchart illustrating the brightness field image generation method based on block radiative energy calibration in this embodiment.
[0063] In one optional implementation, calculating the ratio of the total radiant energy of the block brightness field to the light source input energy in the target illumination configuration information, and scaling the block brightness field proportionally according to the ratio to generate a predicted shooting effect image includes: The radiant energy of each spatial block is obtained by integrating the luminance values of the sampling points in each spatial block in the block luminance field. The total radiant energy is obtained by summing the radiant energy of each spatial block. The light source power parameters are extracted from the target lighting configuration information to calculate the light source input energy. The ratio of total radiant energy to light source input energy is calculated as the global energy calibration ratio. The light source position coordinates are extracted from the target illumination configuration information. The spatial distance from the light source position coordinates to the center point of each spatial block is calculated. The expected received light intensity of each spatial block is calculated based on the light source input energy and the spatial distance. The ratio of the radiated energy of each spatial block to the expected received light intensity is calculated to obtain the energy deviation coefficient of each spatial block. The global energy calibration ratio is multiplied by the energy deviation coefficient of each spatial block to obtain the scaling coefficient of each spatial block. The scaling coefficient of each spatial block is applied to the brightness value of the sampling point in the corresponding spatial block to obtain the scaled block brightness field. The scaled block brightness field is mapped to the image pixel coordinates to generate a predicted shooting effect image.
[0064] Numerical integration is used to obtain the radiant energy of each spatial block by integrating the luminance values of sampling points within each spatial block in the segmented luminance field. For each spatial block, appropriate weighting coefficients are set according to its size and the distribution of internal sampling points. The integration calculation takes into account the non-uniformity of luminance distribution within the block, and the weighted average of the luminance values of the sampling points is multiplied by the block surface area to obtain the radiant energy of that block. Taking a 10cm×10cm×10cm spatial block as an example, with 8 sampling points set inside, the luminance values of each point are 120lx, 150lx, 165lx, 138lx, 142lx, 155lx, 148lx, and 133lx, respectively. The calculated average luminance is 143.9lx, and the block surface area is 600cm². 2 The radiated energy is 8634 lm. The total radiated energy is obtained by summing the radiated energy of each spatial block. For a photographic scene containing 144,000 blocks, the total radiated energy calculated by summing could be 1,245,000 lm. The light source power parameters are extracted from the target lighting configuration information to calculate the light source input energy, considering the light source type and efficiency. Taking studio lighting as an example, a 500W halogen lamp has a luminous efficacy of approximately 20 lm / W and an output luminous flux of 10,000 lm; a 300W LED lamp has a luminous efficacy of approximately 100 lm / W and an output luminous flux of 30,000 lm; and a 200W fluorescent lamp has a luminous efficacy of approximately 60 lm / W and an output luminous flux of 12,000 lm. The total input energy of the three light sources is 52,000 lm.
[0065] The ratio of total radiant energy to the input energy of the light source is calculated as the global energy calibration ratio. Taking the above data as an example, the global energy calibration ratio is approximately 1245000 / 52000 ≈ 23.94. This ratio reflects the energy accumulation effect after multiple reflections of light in the scene, and is usually greater than 1. Its value is closely related to the scene's reflection characteristics. The light source position coordinates are extracted from the target lighting configuration information, and the accurate positions of each light source in three-dimensional space are recorded. Taking a three-point lighting setup as an example, the main light source position coordinates are (2.0m, 3.0m, 2.5m), the auxiliary light source position coordinates are (4.0m, 2.0m, 2.2m), and the background light source position coordinates are (1.5m, 6.0m, 1.8m). The spatial distance from the light source position coordinates to the center point of each spatial block is calculated using the Euclidean distance calculation method. For each spatial block in the scene, the distance between its center point and each light source is calculated. Taking a spatial block located at (3.25m, 4.75m, 1.15m) as an example, the distance to the main light source is 2.58m, the distance to the auxiliary light source is 3.09m, and the distance to the background light source is 3.87m. Based on the light source input energy and spatial distance, the expected received light intensity of each spatial block is calculated, applying the light propagation attenuation law and considering the contributions of direct and indirect lighting. For point light sources, the expected received light intensity is directly proportional to the light source energy and inversely proportional to the square of the distance; for area light sources, their luminous area and directivity must be considered. Taking the above block as an example, the expected received light intensity from the main light source is 10000lm / (4π×2.58m). 2 )≈119.8lm / m 2 The expected received light intensity from the auxiliary light source is 30000 lm / (4π×3.09). 2 )≈249.9lm / m 2 The expected received light intensity from the background light source is 12000 lm / (4π×3.87). 2 )≈63.9lm / m 2 The total expected received light intensity is 433.6 lm / m 2 .
[0066] The energy deviation coefficient for each spatial block is calculated by comparing its radiated energy with the expected received light intensity. This coefficient reflects the degree of deviation between the actual calculated result and the theoretical expectation. Taking the aforementioned spatial block as an example, assume the block's radiated energy is 8634 lm and its surface area is 0.06 m². 2 The radiant energy per unit area is 143,900 lm / m². 2The energy deviation coefficient is approximately 143900 / 433.6 ≈ 331.9. The scaling factor for each spatial block is obtained by multiplying the global energy calibration ratio by the energy deviation coefficient of each spatial block. This scaling factor is used to adjust the block brightness value so that the final result conforms to the principle of physical energy conservation. Based on the above data, the scaling factor for this block is approximately 23.94 × 331.9 ≈ 7945.7. This value indicates that the block brightness value needs to be appropriately reduced. The scaling factor of each spatial block is applied to the brightness value of the sampling points within the corresponding spatial block to obtain the scaled block brightness field, using an inverse scaling method. For blocks with a scaling factor greater than 1, the brightness value is divided by the scaling factor; for blocks with a scaling factor less than 1, the brightness value is multiplied by the reciprocal of the scaling factor. Taking the above block as an example, the original sampling point brightness value is 143.9 lx, and the scaled brightness value is approximately 143.9 / 7945.7 ≈ 0.018 lx. The brightness values of the sampling points in all spatial blocks of the scene are scaled accordingly to form a scaled block brightness field.
[0067] The process of mapping scaled, segmented brightness fields to image pixel coordinates to generate a predicted image involves a projection transformation from 3D spatial data to a 2D image plane. Based on preset camera parameters, including position, orientation, focal length, and sensor size, a projection transformation matrix is determined. For each image pixel, its corresponding spatial ray is determined through reverse tracing, and the intersection of the ray and the segmented brightness field is calculated. The brightness value at that point is then obtained as the pixel brightness. Considering camera exposure parameters, the brightness value is converted into a pixel value suitable for display. Taking a 4K resolution (3840×2160) image as an example, calculations are performed for each pixel to form a complete predicted image. During image generation, photographic parameters such as depth of field, dynamic range, and color space must be considered to ensure that the predicted effect closely approximates the actual shooting result.
[0068] In the specific implementation, for a 6m×8m×3m studio scene, there are three light sources: the main light source is a 500W halogen lamp located at (2.0m, 3.0m, 2.5m), with an output luminous flux of 10000lm; the auxiliary light source is a 300W LED lamp located at (4.0m, 2.0m, 2.2m), with an output luminous flux of 30000lm; and the background light source is a 200W fluorescent lamp located at (1.5m, 6.0m, 1.8m), with an output luminous flux of 12000lm. The scene is divided into 60×80×30 blocks. After multiple reflection light calculations, the total radiant energy is 1,245,000lm, and the global energy calibration ratio is 23.94. For a typical block located in the center of the scene, the radiant energy is 8634lm, and the expected received light intensity is 433.6lm / m². 2The energy deviation coefficient is 331.9, and the final scaling factor is 7945.7. After scaling, the brightness value of this block is adjusted from 143.9 lx to 0.018 lx. Similarly, all blocks are scaled accordingly to generate a block brightness field that conforms to the principle of energy conservation. By setting the virtual camera to (3.0m, 1.0m, 1.7m), facing (3.0m, 7.0m, 1.7m), with a focal length of 50mm, a sensor size of 36mm × 24mm, exposure parameters of ISO 400, shutter speed of 1 / 60 second, and aperture of f / 4.0, a 4K resolution predicted shooting effect image is generated.
[0069] Based on the energy calibration and image generation method proposed in this invention, precise physical calibration of lighting effect prediction results is achieved, solving the prediction deviation problem caused by energy non-conservation in traditional lighting simulation methods. By establishing a two-level calibration mechanism of global energy calibration ratio and block energy deviation coefficient, both overall energy balance and local lighting characteristic differences are considered, improving the physical accuracy of the prediction results. Combining the expected received light intensity reference value calculated from the light source input energy and spatial distance provides a theoretical basis for energy calibration, making the calibration process more reasonable and controllable. Employing a precise mapping technology from block brightness fields to image pixels, combined with a professional camera parameter model, the generated predicted image is not only accurate in brightness distribution but also realistic in photographic effect.
[0070] A second aspect of this invention provides a distributed lighting shooting effect prediction system based on big data, the system comprising: The illumination decomposition module is used to extract historical lighting configuration information and shooting effect images from multiple sets of historical shooting datasets, perform illumination decomposition on the shooting effect images, obtain the brightness contribution component of a single light source, and identify the overlapping area of multiple light sources based on the brightness contribution component of a single light source. The coupling function establishment module is used to extract the single light source brightness value corresponding to the overlapping area of multiple light sources from the single light source brightness contribution component, calculate the brightness deviation value between the actual brightness of the overlapping area of multiple light sources and the superposition value of the single light source brightness value, and establish the coupling strength function between light sources based on the brightness deviation value and the spatial position of the light sources in the historical lighting configuration information. The brightness correction module is used to obtain the target lighting configuration information of the scene to be predicted, input the coupling strength function between light sources, and correct the theoretical brightness value of the light sources to obtain the coupled corrected brightness field. The secondary light source recognition module is used to divide the scene to be predicted into spatial blocks, extract the brightness distribution in the spatial blocks, and identify surface points with reflectivity exceeding a preset reflectivity threshold as secondary light sources. The brightness field calculation module is used to calculate the intensity of reflected light from the secondary light source and transfer it between spatial blocks. When the difference between two adjacent reflected light intensities is less than a preset convergence threshold, the block brightness field is obtained. The effect generation module is used to calculate the ratio of the total radiant energy of the block brightness field to the light source input energy in the target illumination configuration information, and to scale the block brightness field according to the ratio to generate a predicted shooting effect image.
[0071] A third aspect of the present invention provides an electronic device, comprising: processor; Memory used to store processor-executable instructions; The processor is configured to invoke instructions stored in the memory to execute the aforementioned method.
[0072] A fourth aspect of the present invention provides a computer-readable storage medium having stored thereon computer program instructions that, when executed by a processor, implement the aforementioned method.
[0073] This invention can be a method, apparatus, system, and / or computer program product. The computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for performing various aspects of the invention.
[0074] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for predicting the effect of distributed lighting shooting based on big data, characterized in that, include: Historical lighting configuration information and shooting effect images are extracted from multiple sets of historical shooting datasets. Illumination decomposition is performed on the shooting effect images to obtain the brightness contribution components of a single light source. Based on the brightness contribution components of a single light source, the overlapping areas of multiple light sources are identified. Extract the single-source brightness value corresponding to the overlapping area of multiple light sources from the single-source brightness contribution component, calculate the brightness deviation value between the actual brightness of the overlapping area of multiple light sources and the superposition value of the single-source brightness value, and establish the coupling strength function between light sources based on the brightness deviation value and the spatial position of light sources in the historical lighting configuration information. Obtain the target lighting configuration information of the scene to be predicted, input the coupling strength function between light sources, and correct the theoretical brightness value of the light sources to obtain the coupled corrected brightness field; The scene to be predicted is divided into spatial blocks, the brightness distribution in the spatial blocks is extracted, and surface points with reflectivity exceeding a preset reflectivity threshold are identified as secondary light sources. The intensity of reflected light from the secondary light source is calculated and transmitted between spatial blocks. When the difference between two adjacent reflected light intensities is less than a preset convergence threshold, the block brightness field is obtained. Calculate the ratio of the total radiant energy of the block brightness field to the light source input energy in the target illumination configuration information, and scale the block brightness field according to the ratio to generate a predicted shooting effect image.
2. The method according to claim 1, characterized in that, Historical lighting configuration information and shooting effect images are extracted from multiple sets of historical shooting datasets. Illumination decomposition is performed on the shooting effect images to obtain the brightness contribution components of single light sources. Based on the brightness contribution components of single light sources, overlapping regions of multiple light sources are identified, including: Extract the three-dimensional coordinates of light sources from multiple sets of historical shooting datasets, calculate the connection weights between the three-dimensional coordinates of the light sources, and construct the light source connection matrix; Eigenvalue decomposition is performed on the light source connection matrix to obtain light source connection feature values. Based on the light source connection feature values, multiple historical shooting datasets are grouped to obtain historical lighting configuration information. The captured image is converted into a three-dimensional illumination intensity matrix. The propagation distance from each light source to each pixel in the image is calculated based on the three-dimensional coordinates of the light source. The illumination attenuation coefficient is calculated based on the propagation distance. The illumination attenuation coefficient is iteratively optimized with the three-dimensional illumination intensity matrix to separate the brightness contribution component of a single light source. Calculate the brightness gradient value of the brightness contribution component of a single light source at a spatial location, identify the direction vector with the largest brightness gradient value, continuously track the pixel along the direction vector, and determine the boundary point when the brightness gradient value of the tracked pixel is less than a preset gradient threshold. The area surrounded by the boundary point is determined as the multi-light source overlapping area.
3. The method according to claim 1, characterized in that, Extract the single-source luminance value corresponding to the overlapping area of multiple light sources from the single-source luminance contribution component, calculate the luminance deviation value between the actual luminance of the overlapping area of multiple light sources and the superimposed value of the single-source luminance values, and establish the inter-source coupling strength function based on the luminance deviation value and the spatial location of the light sources in the historical lighting configuration information, including: A three-dimensional spatial coordinate system is established for the overlapping area of multiple light sources. A uniformly distributed array of sampling points is constructed within the three-dimensional spatial coordinate system, and the surface normal vector of each sampling point in the sampling point array is calculated. The brightness contribution component of a single light source is projected onto the sampling point array to obtain a brightness distribution point cloud. The brightness distribution point cloud is then fitted with a surface based on the surface normal vector. The brightness value of a single light source corresponding to the overlapping area of multiple light sources is extracted from the surface fitting result. The brightness value of a single light source is constructed as a light source brightness vector in a three-dimensional spatial coordinate system. The difference between the actual brightness of the overlapping area of the multiple light sources and the projection of the light source brightness vector onto the sampling point array is calculated. A brightness residual distribution matrix is constructed, and the brightness deviation value is extracted from the brightness residual distribution matrix. Extract the spatial location of the light source from the historical lighting configuration information to construct a light source location matrix. Combine the brightness deviation value with the light source location matrix to generate the light source potential field. Calculate the gradient distribution of the light source potential field on the sampling point array. Establish the coupling strength function between light sources based on the gradient distribution.
4. The method according to claim 1, characterized in that, Obtain the target lighting configuration information of the scene to be predicted, input the coupling strength function between light sources, and correct the theoretical brightness values of the light sources to obtain the coupled corrected brightness field, including: Obtain target lighting configuration information from the scene to be predicted, and extract the target light source position coordinates and target light source lighting parameters from the target lighting configuration information; The spatial distance between light sources is calculated based on the position coordinates of the target light source, and the theoretical brightness value of the light source is calculated based on the spatial distance between the light sources and the illumination parameters of the target light source. Based on the spatial distance between the light sources, adjacent light source combinations are identified. The coupling strength function between the light sources is applied to the adjacent light source combinations to calculate the coupling strength between the light sources. The coupling strength between the light sources is combined with the theoretical brightness value of the light sources to generate a compensated brightness distribution. A brightness correction constraint is constructed based on the adjacent light source combination. The compensated brightness distribution and the brightness correction constraint are combined to form a brightness correction calculation formula. The compensated brightness distribution is updated through iterative calculation. When the iterative update amount of the compensated brightness distribution is less than the update convergence threshold, the compensated brightness distribution is determined as the coupled correction brightness field.
5. The method according to claim 1, characterized in that, The scene to be predicted is divided into spatial blocks, the brightness distribution in the spatial blocks is extracted, and surface points with reflectivity exceeding a preset reflectivity threshold are identified as secondary light sources, including: The scene to be predicted is divided into uniform spatial blocks at equal intervals along the spatial coordinate axis, and three-dimensional grid sampling points are set in the uniform spatial blocks. Extract the light source emission intensity from the scene to be predicted, calculate the light propagation distance from the light source emission intensity to each sampling point, and calculate the light attenuation value based on the light propagation distance; The brightness value of the sampling point is calculated by combining the emission intensity of the light source with the light attenuation value, forming the brightness distribution in the spatial blocks. Calculate the tangent plane of the surface at each sampling point within the uniform spatial block, extract the surface normal vector from the tangent plane, calculate the direction of the line connecting the light source to the sampling point as the incident direction of the light, and perform vector operation between the incident direction of the light and the surface normal vector to obtain the surface reflectivity; The locations of surface points whose surface reflectivity exceeds a preset reflectivity threshold are designated as reflective light source points. The direction of the reflected light at the reflected light source point is calculated, and the intensity of the reflected light is obtained by calculating the brightness value at the reflected light source point and the surface reflectivity. The secondary light source containing the reflected light source point and the intensity of the reflected light is output.
6. The method according to claim 1, characterized in that, The intensity of reflected light from the secondary light source is calculated and transferred between spatial blocks. When the difference between two adjacent reflected light intensities is less than a preset convergence threshold, the block brightness field is obtained, including: The three-dimensional coordinates and reflected light intensity of the reflected light source point are extracted from the secondary light source. The propagation distance to the sampling point in the adjacent spatial block is calculated to obtain the reflected light intensity of the secondary light source. The reflected light intensity of the secondary light source is transferred to the adjacent spatial block and superimposed on the brightness value of the sampling point to update the brightness distribution. Surface points with reflectivity exceeding a preset reflectivity threshold within the updated brightness distribution are identified as new secondary light sources. A secondary light source hierarchy index table is established to record the generation hierarchy and spatial block affiliation of the new secondary light sources. The reflected light intensity of each secondary light source is calculated sequentially according to the hierarchy and transferred to the spatial block. Construct a light intensity transfer matrix to store the transfer distribution of reflected light intensity of each level of secondary light source. Based on the light intensity transfer matrix, calculate the light intensity balance deviation of each spatial block by summing the rows and columns. Then, allocate the light intensity balance deviation to the brightness value of the sampling point in the corresponding spatial block for energy compensation. The difference in reflected light intensity between the current level and the previous level secondary light source is calculated to obtain the reflected light intensity difference value. It is then determined whether the reflected light intensity difference value is less than a preset convergence threshold. When it is less than the preset convergence threshold, the generation of new secondary light sources is stopped. The brightness values of the sampling points in each spatial block after energy compensation are summarized to form a block brightness field.
7. The method according to claim 1, characterized in that, Calculating the ratio of the total radiant energy of the block brightness field to the light source input energy in the target illumination configuration information, and scaling the block brightness field according to the ratio to generate a predicted shooting effect image includes: The radiant energy of each spatial block is obtained by integrating the luminance values of the sampling points in each spatial block in the block luminance field. The total radiant energy is obtained by summing the radiant energy of each spatial block. The light source power parameters are extracted from the target lighting configuration information to calculate the light source input energy. The ratio of total radiant energy to light source input energy is calculated as the global energy calibration ratio. The light source position coordinates are extracted from the target illumination configuration information. The spatial distance from the light source position coordinates to the center point of each spatial block is calculated. The expected received light intensity of each spatial block is calculated based on the light source input energy and the spatial distance. The ratio of the radiated energy of each spatial block to the expected received light intensity is calculated to obtain the energy deviation coefficient of each spatial block. The global energy calibration ratio is multiplied by the energy deviation coefficient of each spatial block to obtain the scaling coefficient of each spatial block. The scaling coefficient of each spatial block is applied to the brightness value of the sampling point in the corresponding spatial block to obtain the scaled block brightness field. The scaled block brightness field is mapped to the image pixel coordinates to generate a predicted shooting effect image.
8. A distributed lighting shooting effect prediction system based on big data, used to implement the method of any one of claims 1-7, characterized in that, include: The illumination decomposition module is used to extract historical lighting configuration information and shooting effect images from multiple sets of historical shooting datasets, perform illumination decomposition on the shooting effect images, obtain the brightness contribution component of a single light source, and identify the overlapping area of multiple light sources based on the brightness contribution component of a single light source. The coupling function establishment module is used to extract the single light source brightness value corresponding to the overlapping area of multiple light sources from the single light source brightness contribution component, calculate the brightness deviation value between the actual brightness of the overlapping area of multiple light sources and the superposition value of the single light source brightness value, and establish the coupling strength function between light sources based on the brightness deviation value and the spatial position of the light sources in the historical lighting configuration information. The brightness correction module is used to obtain the target lighting configuration information of the scene to be predicted, input the coupling strength function between light sources, and correct the theoretical brightness value of the light sources to obtain the coupled corrected brightness field. The secondary light source recognition module is used to divide the scene to be predicted into spatial blocks, extract the brightness distribution in the spatial blocks, and identify surface points with reflectivity exceeding a preset reflectivity threshold as secondary light sources. The brightness field calculation module is used to calculate the intensity of reflected light from the secondary light source and transfer it between spatial blocks. When the difference between two adjacent reflected light intensities is less than a preset convergence threshold, the block brightness field is obtained. The effect generation module is used to calculate the ratio of the total radiant energy of the block brightness field to the light source input energy in the target illumination configuration information, and to scale the block brightness field according to the ratio to generate a predicted shooting effect image.
9. An electronic device, characterized in that, include: processor; Memory used to store processor-executable instructions; The processor is configured to invoke instructions stored in the memory to execute the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having computer program instructions stored thereon, characterized in that, When the computer program instructions are executed by the processor, they implement the method described in any one of claims 1 to 7.