Intelligent driving high-precision scene generation method and system based on synthetic fog
By converting driving scene videos under normal weather into point cloud data, and using multi-scale convolutional networks and 3D-Gaussian Splatting algorithms to simulate the haze effect, high-precision haze weather scenes are generated, which solves the problem of intelligent driving systems in haze weather. Identify problems in difficult environments and improve the security and adaptability of the system.
Patent Information
- Application Number
- CN202410786235.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-18
- Publication Date
- 2024-09-17
AI Technical Summary
Existing intelligent driving technology is difficult to accurately identify and judge the surrounding environment under haze weather conditions, resulting in insufficient system performance and safety. Existing methods are computationally complex and lack real-time performance.
An intelligent driving high-precision scene generation method based on synthetic fog is used to collect real driving scene videos under normal weather and convert them into point cloud data. It combines multi-scale convolutional networks and 3D-Gaussian Splatting algorithms to simulate haze point cloud data. Generate high-precision driving scenes in haze weather.
It improves the authenticity of simulation scenes, enhances scene reconstruction accuracy, optimizes model training efficiency, reduces data collection costs and risks, provides a rich set of severe weather driving data, and improves the safety and security of intelligent driving systems in complex environments. Adaptability.
Smart Images

Figure CN118657879A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent driving technology, and in particular to a method and system for generating high-precision intelligent driving scenes based on synthetic fog. Background Art
[0002] In the field of intelligent driving technology, scene generation is one of the key technologies for simulating real driving environments. With the development of autonomous driving technology, vehicles need to be able to drive safely and efficiently in a variety of weather conditions. Haze weather, as a condition with low visibility and complex environment, puts higher requirements on intelligent driving systems. In such an environment, the performance of sensors such as lidar and cameras may be seriously affected, resulting in the system being unable to accurately identify and judge the surrounding environment.
[0003] In past studies, although some methods have tried to add fog effects to images through optical means, the rendering effect is not ideal. At the same time, there are also some methods that use deep learning to simulate scenes, but these methods are mostly limited to image processing and do not achieve true scene generation. Those methods that aim to simulate fog scenes in bad weather often have high computational complexity and lack real-time performance.
[0004] Therefore, it is necessary to propose a method that combines synthetic fog and 3D GS to generate high-precision driving scenes in foggy and hazy weather, so as to improve the performance and safety of intelligent driving systems in complex environments.
[0005] In the Chinese patent document with publication number CN217279317U, an intelligent driving domain controller, an intelligent driving control system and a vehicle are disclosed. The intelligent driving domain controller includes an intelligent driving computing platform and an accident-specific processor. The first data input end of the accident-specific processor is connected to the output end of the actual driving data sensor, the second data input end of the accident-specific processor is connected to the data output end of the intelligent driving computing platform, and the data input end of the intelligent driving computing platform is connected to the output end of the intelligent driving sensor for collecting the original intelligent driving data of the vehicle. However, the patent document mainly manages, analyzes and counts the data of traffic accidents of autonomous driving to provide a basis for defining the responsibility of traffic accidents, while the present application is to improve the safety of the intelligent driving system in complex environments, which is essentially different from the technical problems to be solved by the patent document. Summary of the invention
[0006] In view of the defects in the prior art, the object of the present invention is to provide a method and system for generating high-precision scenes for intelligent driving based on synthetic fog.
[0007] According to the present invention, a method for generating a high-precision scene for intelligent driving based on synthetic fog includes:
[0008] Step S1: Collect real driving scene videos under normal weather conditions and convert the video data into point cloud data;
[0009] Step S2: synthesizing simulated haze point cloud data based on point cloud data and multi-scale convolutional network;
[0010] Step S3: Generate an initial scene under haze weather based on the 3D-Gassusian Splatting algorithm and simulated haze point cloud data;
[0011] Step S4: Process and reconstruct the initial scene under the haze weather, and output the driving scene under the haze weather with a preset accuracy.
[0012] Preferably, step S1 includes using a camera to capture an expected driving scene in a circular shape, preprocessing the video data, and converting the video data into point cloud data based on an incremental SFM algorithm.
[0013] Preferably, the preprocessing includes dividing the grayscale, brightness or color of each pixel of adjacent frames into N levels, counting the number of pixels in each level and making a histogram comparison to perform boundary segmentation of the shot; defining an NxN level grayscale co-occurrence matrix; the co-occurrence matrix includes four eigenvectors of contrast, texture consistency, pixel contrast and entropy, and realizes key frame extraction for the video at 0°, 45°, 90°, and 135°.
[0014] Preferably, step S1 includes the following sub-steps:
[0015] Step S1.1: Read image data and use SIFT to extract feature points;
[0016] Step S1.2: Calculate the spatial distance through GPS information and search for image pairs that may have matching relationships; construct a KD tree to search for matching pairs based on the fast nearest neighbor matching method and traverse the possible matching feature points in the image pairs;
[0017] Step S1.3: Randomly select eight or more pairs of matching points for the image pairs, divide the paired feature points into x and x', use the normalized eight-point algorithm to solve the basic matrix F, and count the number of point pairs with the epipolar geometric relationship x'Fx = 0 within a certain threshold error range; repeat this process several times, and select the match with the largest number of point pairs that meet the preset conditions to refine the matching result;
[0018] Step S1.4: Select two matching images, set one of the images as the unit matrix pose, estimate the E matrix of the matching point pairs between the two images to obtain the pose of the other image; generate three-dimensional points based on triangulation; the triangulation includes that when the image pairs are initially matched, the median of all corresponding ray angles is between 3° and -60°;
[0019] Step S1.5: Add the images that have not been added, obtain the next matching image with the largest number of matching point pairs, perform PNP pose estimation, and triangulate to generate three-dimensional space points; repeat this step until all images are processed;
[0020] Step S1.6: perform BA optimization on all generated 3D points and all estimated poses;
[0021] Step S1.7: Perform BA optimization on all generated 3D points, camera poses and intrinsic parameters to obtain 3D point cloud and camera poses, and complete point cloud generation.
[0022] Preferably, step S2 includes generating simulated synthetic fog point cloud data based on an atmospheric scattering model and a multi-scale neural network; using an atmospheric scattering model to simulate the propagation mode of light in haze of different concentrations and characteristics; the atmospheric scattering model can predict the propagation path and attenuation of light in haze based on physical principles and taking into account the scattering and absorption effects of fog droplets on light waves; adjusting the point cloud data according to the simulation results, changing the color and density of each point therein and reflecting the visual effect in a foggy environment; the visual effect includes the background color becoming blurred, the color contrast being reduced, and the details of distant objects being lost; further using a multi-scale convolutional network to refine the simulation process; based on learning point cloud features at different scales and data set training, capturing the visual changes from clarity to fog, and generating fog point cloud data that meets preset conditions.
[0023] Preferably, step S3 includes the following sub-steps:
[0024] Step S3.1: Based on the pre-processed point cloud, each point is modeled as a 3D Gaussian ellipsoid; the position information and color information of the Gaussian ellipsoid are derived from the information of the point cloud data;
[0025] Step S3.2: Use 3D Gaussian functions for training, set hyperparameters, and use all differentiable Gaussian functions to render images through differentiable rendering techniques;
[0026] Step S3.3: comparing the difference between the rendered image and the real image, and calculating a loss function; the loss function includes a combination of pixel-level error and a structural similarity index; and adjusting the Gaussian ellipsoid set according to the result of the loss function;
[0027] Step S3.4: changing the density of 3D Gaussian points based on point cloud densification and pruning techniques and gradient adaptive methods to optimize the geometric details and texture quality of the scene;
[0028] Step S3.5: Repeat steps S3.2-S3.4 until the preset effect is achieved.
[0029] Preferably, step S4 includes optimizing the loss function, adding a supervisory signal by adding fog to images and point clouds; simulating the influence of haze on light propagation based on an atmospheric scattering model, generating a fogged image based on the original image, and using it as the first supervisory signal in 3D-GS training; defogging the fogged image to enhance its clarity, comparing the defogged image with the original image, and using it as the second supervisory signal in the training process; during the training process, the model learns to recover driving scene details from the fogged image based on the first supervisory signal and the second supervisory signal.
[0030] According to the present invention, a high-precision scene generation system for intelligent driving based on synthetic fog is provided, comprising:
[0031] Module M1: Collect real driving scene videos under normal weather conditions and convert video data into point cloud data;
[0032] Module M2: Synthesize and simulate haze point cloud data based on point cloud data and multi-scale convolutional network;
[0033] Module M3: Generate the initial scene under haze weather based on 3D-Gassusian Splatting algorithm and simulated haze point cloud data;
[0034] Module M4: Process and reconstruct the initial scene under haze weather, and output the driving scene under haze weather with preset accuracy.
[0035] Preferably, the module M1 includes using a camera to shoot an expected driving scene in a circular manner, preprocessing the video data, and converting the video data into point cloud data based on an incremental SFM algorithm.
[0036] Preferably, the preprocessing includes dividing the grayscale, brightness or color of each pixel of adjacent frames into N levels, counting the number of pixels in each level and making a histogram comparison to perform boundary segmentation of the shot; defining an NxN level grayscale co-occurrence matrix; the co-occurrence matrix includes four eigenvectors of contrast, texture consistency, pixel contrast and entropy, and realizes key frame extraction for the video at 0°, 45°, 90°, and 135°.
[0037] Preferably, the module M1 includes the following submodules:
[0038] Module M1.1: Read image data and use SIFT to extract feature points;
[0039] Module M1.2: Calculate spatial distances through GPS information and search for image pairs that may have matching relationships; construct a KD tree to search for matching pairs based on the fast nearest neighbor matching method and traverse possible matching feature points within the image pairs;
[0040] Module M1.3: Randomly select eight or more pairs of matching points for image pairs, divide the paired feature points into x and x', use the normalized eight-point algorithm to solve the basic matrix F, and count the number of point pairs with epipolar geometric relationship x'Fx = 0 within a certain threshold error range; repeat this process several times, and select the match with the largest number of point pairs that meet the preset conditions to refine the matching result;
[0041] Module M1.4: Select two matching images, set one of the images as the unit matrix pose, estimate the E matrix of the matching point pairs between the two images to obtain the pose of the other image; generate three-dimensional points based on triangulation; the triangulation includes that when the image pairs are initially matched, the median of all corresponding ray angles is between 3° and -60°;
[0042] Module M1.5: Add images that have not been added, obtain the next matching image with the largest number of matching point pairs, perform PNP pose estimation, and triangulate to generate three-dimensional space points; repeat this module until all images are processed;
[0043] Module M1.6: BA optimization of all generated 3D points and all estimated poses;
[0044] Module M1.7: Perform BA optimization on all generated 3D points, camera poses and intrinsic parameters to obtain 3D point clouds and camera poses, and complete point cloud generation.
[0045] Preferably, the module M2 includes generating simulated synthetic fog point cloud data based on an atmospheric scattering model and a multi-scale neural network; using an atmospheric scattering model to simulate the propagation mode of light in haze of different concentrations and characteristics; the atmospheric scattering model can predict the propagation path and attenuation of light in haze based on physical principles and taking into account the scattering and absorption effects of fog droplets on light waves; adjusting the point cloud data according to the simulation results, changing the color and density of each point therein and reflecting the visual effect in a foggy environment; the visual effects include blurred background colors, reduced color contrast, and loss of details of distant objects; further using a multi-scale convolutional network to refine the simulation process; based on learning point cloud features at different scales and data set training, capturing visual changes from clarity to fog, and generating fog point cloud data that meets preset conditions.
[0046] Preferably, the module M3 includes the following submodules:
[0047] Module M3.1: Based on the pre-processed point cloud, each point is modeled as a 3D Gaussian ellipsoid; the position information and color information of the Gaussian ellipsoid are derived from the information of the point cloud data;
[0048] Module M3.2: Use 3D Gaussian functions for training, set hyperparameters, and use all differentiable Gaussian functions to render images through differentiable rendering techniques;
[0049] Module M3.3: Compare the difference between the rendered image and the real image and calculate the loss function; the loss function includes a combination of pixel-level error and structural similarity index; according to the result of the loss function, adjust the Gaussian ellipsoid set;
[0050] Module M3.4: Change the density of 3D Gaussian points based on point cloud densification and pruning techniques and gradient adaptive methods to optimize the geometric details and texture quality of the scene;
[0051] Module M3.5: Repeat modules M3.2-M3.4 until the preset effect is achieved.
[0052] Preferably, the module M4 includes optimizing the loss function, adding a supervisory signal by adding fog to images and point clouds; simulating the influence of haze on light propagation based on an atmospheric scattering model, generating a fogged image based on the original image, and serving as the first supervisory signal in 3D-GS training; defogging the fogged image to enhance its clarity, comparing the defogged image with the original image, and serving as the second supervisory signal in the training process; during the training process, the model learns to recover the details of the driving scene from the fogged image based on the first supervisory signal and the second supervisory signal.
[0053] Compared with the prior art, the present invention has the following beneficial effects:
[0054] 1. The present invention can improve the authenticity of simulation scenes: the present invention can generate a driving scene in haze weather with highly realistic visual effects by accurately simulating the atmospheric scattering model; this simulation not only takes into account the scattering and absorption of light, but also simulates the impact of haze on color, contrast and details, thereby providing a more realistic simulation environment for the testing and training of autonomous driving systems.
[0055] 2. The present invention can enhance the accuracy of scene reconstruction: by using 3D-Gaussian Splatting technology and multi-scale convolutional networks, the present invention can reconstruct driving scenes in haze weather with high accuracy; it not only captures the geometric structure of the scene, but also reproduces the visual features of the scene in detail, including color changes and reduced visibility that may occur under haze conditions.
[0056] 3. The present invention can optimize the efficiency of model training: the method and system of the present invention are not limited to the simulation of haze weather, but can also be extended to the simulation of other complex meteorological conditions, such as fog, rain, snow, etc.; this scalability increases the scope of use of the system, allowing it to be applied to a wider range of environmental simulation and test scenarios, thereby improving the flexibility and practicality of the system.
[0057] 4. The present invention can reduce the cost and risk of data collection: Compared with the actual collection of driving scene data under haze weather, the present invention adopts a synthetic method to reduce the cost and risk of data collection; avoids the need for field shooting under severe weather conditions, and also reduces the impact on the environment.
[0058] 5. The present invention provides a rich dataset of driving in bad weather: By generating synthetic fog point cloud data, the present invention provides rich training data for driving scenes in bad weather. The richness of this dataset helps intelligent driving to better learn and adapt to various complex driving environments, improves the robustness of the system, ensures stability and safety when encountering similar bad weather in the real world, and also enhances the adaptability of the system, enabling it to better understand and respond to various complex situations.
[0059] 6. The present invention has innovations and advantages in many aspects such as technical implementation, application effects and social benefits, and provides strong support for the development of autonomous driving technology and environmental simulation research.
[0060] Other beneficial effects of the present invention will be explained in the specific implementation manner through the introduction of specific technical features and technical solutions. Through the introduction of these technical features and technical solutions, those skilled in the art should be able to understand the beneficial technical effects brought about by the technical features and technical solutions. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:
[0062] Figure 1 The present invention is a flow chart of the method.
[0063] Figure 2 This is a flow chart of the SIFT algorithm in the present invention.
[0064] Figure 3 This is a multi-scale neural network structure framework diagram for point cloud and fog in the present invention. DETAILED DESCRIPTION
[0065] The present invention is described in detail below in conjunction with specific embodiments. The following embodiments will help those skilled in the art to further understand the present invention, but are not intended to limit the present invention in any form. It should be noted that, for those of ordinary skill in the art, several changes and improvements can also be made without departing from the concept of the present invention. These all belong to the protection scope of the present invention.
[0066] The present invention provides a method for generating a driving scene in haze weather based on synthetic fog, so as to improve the safety of an intelligent driving system in a complex environment.
[0067] First, a high-definition camera is used to shoot a real driving scene video under normal weather conditions, and the video data is converted into point cloud data. Normal weather here refers to sunny weather without rain, snow, sandstorms, etc. Then, based on the generated point cloud data, simulated synthetic fog point cloud data is generated through the atmospheric fog algorithm; next, the 3D-Gassusian Splatting method is used to realize the scene generation under haze weather; finally, the loss function is optimized, and the supervision signal is added by using the image and point cloud plus fog method to realize high-precision driving scene reconstruction under haze weather.
[0068] Reference Figure 1 As shown, the method specifically comprises the following steps:
[0069] Step S1: Use a high-definition camera to shoot a real driving scene video under normal weather conditions, and convert the video data into point cloud data. Specifically, it includes: first, circularly shoot the expected driving scene; second, pre-process the video data; and finally, use the incremental SFM algorithm to convert the video data into point cloud data to ensure the accuracy and integrity of the point cloud data.
[0070] The video data preprocessing method includes: first, dividing the grayscale, brightness or color of each pixel of adjacent frames into N levels, counting the number of pixels in each level to make a histogram comparison, and performing the boundary segmentation of the shot. Then, defining an NxN grayscale co-occurrence matrix, including four eigenvectors of contrast, texture consistency, pixel contrast and entropy, and extracting key frames from the video at 0°, 45°, 90°, and 135°.
[0071] In converting video data into point cloud data using the incremental SFM algorithm, the specific steps of the incremental SFM algorithm include:
[0072] Step S101: read image data and use SIFT to extract feature points;
[0073] Step S102: Calculate the spatial distance through GPS information and search for image pairs that may have a matching relationship; construct a KD tree based on the fast nearest neighbor matching method (FLANN) to search for matching pairs and traverse the possible matching feature points in the image pairs.
[0074] Step S103: Randomly select 8 or more matching points from the image pairs, use the normalized eight-point algorithm to solve the basic matrix F, and count the number of point pairs with the epipolar geometric relationship x'Fx=0 within a certain threshold error range; repeat this process several times, and select the matching result with the largest number of point pairs that meet the conditions to refine the matching result.
[0075] Step S104: Select two matching images, set one image as the unit matrix pose, estimate the E matrix through the matching point pairs between the two images, and decompose the E matrix to obtain the pose of the other image. Generate three-dimensional points through triangulation. Among them, in the initial matching image pair, the median of all corresponding triangulated ray angles is between -60° and 3°.
[0076] Step S105: add a new image, obtain the next matching image with the largest number of matching point pairs, perform PNP pose estimation, and triangulate to generate three-dimensional space points; repeat step S106 until all images are processed.
[0077] Step S106: perform BA optimization on all generated 3D points and estimated poses.
[0078] Step S107: BA optimization is performed on all generated 3D points, camera poses and intrinsic parameters to obtain 3D point clouds and camera poses, thereby realizing point cloud generation.
[0079] Step S2: Based on the generated point cloud data, simulated synthetic fog point cloud data is generated through an atmospheric scattering model and a multi-scale neural network.
[0080] First, an atmospheric scattering model is used to accurately simulate how light propagates in haze of different concentrations and characteristics. The model is based on physical principles and takes into account the scattering and absorption of light waves by fog droplets, thereby predicting the propagation path and attenuation of light in haze.
[0081] Specifically, the atmospheric scattering model under haze weather is:
[0082] I(x)=R(x)t(x)+L(1-t(x));
[0083] t(x)=e (-βL(x)) ;
[0084] β ≥ 2.996 × 10 -3 m -1 ;
[0085] Where I(x) is the foggy point cloud observed at pixel x, R(x) is the clear scene radiation, and L is the atmospheric light, a light intensity containing three color channels: R, G, and B. The image is statistically analyzed, such as selecting the top 0.1% of the brightness values in the dark channel, and then calculating the RGB average of these brightness values as an estimate of the atmospheric light. The model assumes that the atmospheric light is globally constant, and the transmittance t(x) determines the amount of scene radiation reaching the camera. In the case of a uniform medium, the transmittance depends on the distance L(x) between the scene and the camera, and β is the attenuation coefficient. The larger the β value, the thicker the fog. The transmittance t(x) is estimated by a multi-scale convolutional network.
[0086] Next, a multi-scale convolutional network is used to implement scene classification. In order to further determine the pixel values in specific areas such as the sky, white clouds, and bright areas, the transmittance t(x) estimated by the multi-scale network is classified and counted:
[0087]
[0088] Among them, ω is taken as 0.75, which is the overall weight of the neighborhood block centered on pixel x, I(x) is the foggy point cloud observed at pixel x, and I dark is the point cloud with the minimum brightness in the three RGB channels, I c (x) is the point cloud with the maximum brightness in the RGB three channels, Ω(x) is the point cloud set used for the multi-scale neural network, and A is the atmospheric light value.
[0089] Step S3: Based on the generated point cloud data, each point in the point cloud data is modeled as a 3D Gaussian function using the 3D-Gassusian Splatting method. Through the "splashing" operation, it is projected onto the 2D image plane to form a series of 2D Gaussians. Through the designed sorting and synthesis strategies, scene generation under haze weather is achieved.
[0090] In this step, 3D-GS is used to generate point cloud, which specifically includes the following steps:
[0091] Step S301: Based on the pre-processed point cloud, each point is modeled as a 3D Gaussian ellipsoid, and the position and color information of the Gaussian ellipsoid is derived from the information of the point cloud data.
[0092] Step S302: Use 3D Gaussian functions for training, set hyperparameters, and use all differentiable Gaussian functions to render images through differentiable rendering technology, so that the rendered image conforms to the texture features of the actual scene as much as possible.
[0093] Step S303: Compare the difference between the rendered image and the real image and calculate the loss function, including the combination of pixel-level error and structural similarity index (SSIM). According to the result of the loss function, the Adam optimizer is used to update the parameters of the Gaussian ellipsoid, including the center position, direction, size (variance) and color of the Gaussian ellipsoid.
[0094] Specifically, the Adam optimizer maintains two estimates for each parameter: the first-order moment (momentum) and the second-order moment (variance) of the gradient, and uses these estimates to adjust the learning rate of each parameter. First, for each parameter of the Gaussian ellipsoid, the gradient of the loss function with respect to the parameter is calculated. Then, the momentum and variance estimates of each parameter are updated using the current gradient. The parameters of the Gaussian ellipsoid are updated using an adaptive learning rate. The update rule is as follows:
[0095]
[0096] Among them, θt is the parameter of the tth iteration, αt is the learning rate of the tth iteration, and are the estimated values of momentum and variance, respectively, and ∈ is a small constant used to ensure numerical stability. Repeat the above steps until the loss function converges or the preset number of iterations is reached.
[0097] Step S304: Use point cloud densification and pruning techniques to change the density of 3D Gaussian points through a gradient adaptive method. Optimize the geometric details and texture quality of the scene while reducing unnecessary calculations. Repeat steps S302-S304 for a fixed number of rounds until the desired effect is achieved.
[0098] Step S4: Optimize the loss function and add supervisory signals by adding fog to images and point clouds. First, based on the atmospheric scattering model, simulate the impact of haze on light propagation, and generate fogged images based on the original images. These images serve as the first supervisory signal in 3D-GS training. Next, defog the fogged image to enhance its clarity, and compare the difference between the defog image and the original image as the second supervisory signal in the training process. During the training process, the model uses these two supervisory signals to restore clear driving scene details from the fogged image, thereby achieving more realistic intelligent driving scene generation in haze weather.
[0099] The present invention can improve the realism of simulation scenes, enhance the accuracy of scene reconstruction, optimize model training efficiency, and reduce the cost and risk of data acquisition. It can also provide a rich set of driving data under severe weather conditions, provide more test scenarios for intelligent driving, and improve the safety of intelligent driving systems in complex environments, thus providing strong support for the development of autonomous driving technology and environmental simulation research.
[0100] The above is a basic embodiment of the present invention. The technical solution of the present invention is further described below through a preferred embodiment.
[0101] Example 1
[0102] A method for generating high-precision scenes for intelligent driving based on synthetic fog, comprising:
[0103] Step S1: Use a high-definition camera to shoot a real driving scene video under normal weather conditions, and convert the video data into point cloud data. Specifically, first, plan the flight path of the drone in a cloudy scene, and perform 360° circular shooting around the scene at a uniform speed. Avoid strong shadows and reflections caused by direct sunlight; second, pre-process the video data through frame processing and shot boundary segmentation; finally, use the incremental SFM algorithm to convert the video data into point cloud data. Ensure the accuracy and integrity of the point cloud data.
[0104] The video data preprocessing method includes: first, dividing the grayscale, brightness or color of each pixel of adjacent frames into N levels, counting the number of pixels in each level to make a histogram comparison, and performing the boundary segmentation of the shot. Then, defining an N×N grayscale co-occurrence matrix, including four eigenvectors of contrast, texture consistency, pixel contrast and entropy, and extracting key frames from the video at 0°, 45°, 90°, and 135°.
[0105] In converting video data into point cloud data using the incremental SFM algorithm, the specific steps of the incremental SFM algorithm include:
[0106] Step S101: read image data and use SIFT to extract feature points;
[0107] Reference Figure 2 The SIFT algorithm is shown in Figure 1. First, the scale space of the image is constructed at different scales by Gaussian difference, including Gaussian blurring the image at different scales, and then calculating the difference between the Gaussian blurred images of adjacent scales to generate the scale space. Then, in the scale space, the SIFT algorithm looks for key points that are local extreme points. That is, the most prominent points in the neighborhood of the point in terms of scale and space. To find the extreme points, the SIFT algorithm detects local maxima and minima at each scale layer and ensures that they are also extreme points in the scale space. After detecting the key points, the SIFT algorithm uses Taylor expansion to accurately locate the position and scale of these key points. This involves solving a quadratic equation to find the exact location of the extreme points.
[0108] Next, in order to make the key points invariant to image rotation, the SIFT algorithm selects the direction with the highest peak as the main direction of the key point by calculating the directional histogram of the gradient in the neighborhood of the key point. Then, a descriptor is generated for each key point, which is a quantitative representation of the local image features of the area around the key point. The descriptor is usually a vector that contains gradient information in different directions and scales in the neighborhood of the key point. This descriptor has a unique representation of the local shape of the image and is invariant to the scale, rotation, and brightness changes of the image. Finally, these descriptors are used to match feature points between different images. By comparing the distances between descriptors, matching feature point pairs can be found. The nearest neighbor and next nearest neighbor distance ratios are usually used to filter out bad matches.
[0109] Step S102: Calculate the spatial distance through GPS information and search for image pairs that may have a matching relationship; construct a KD tree based on the fast nearest neighbor matching method (FLANN) to search for matching pairs and traverse the possible matching feature points in the image pairs.
[0110] Step S103: Randomly select 8 or more matching points from the image pairs, use the normalized eight-point algorithm to solve the basic matrix F, count the number of point pairs with the epipolar geometric relationship x'Fx=0 within a certain threshold error range, repeat the process several times, and select the matching result with the largest number of point pairs that meet the conditions to refine the matching result.
[0111] Step S104: Select two matching images, set one image as the unit matrix pose, estimate the E matrix through the matching point pairs between the two images, and decompose the E matrix to obtain the pose of the other image. Generate three-dimensional points through triangulation. Among them, in the initial matching image pair, the median of all corresponding triangulated ray angles is between -60° and 3°.
[0112] Step S105: Add a new image, obtain the next matching image with the largest number of matching point pairs, perform PNP pose estimation, triangulate to generate three-dimensional space points, and repeat step S106 until all images are processed.
[0113] Step S106: perform BA optimization on all generated 3D points and estimated poses.
[0114] Step S107: BA optimization is performed on all generated 3D points, camera poses and intrinsic parameters to obtain 3D point clouds and camera poses, thereby realizing point cloud generation.
[0115] Step S2: Based on the generated point cloud data, simulated synthetic fog point cloud data is generated through an atmospheric fog algorithm.
[0116] First, an atmospheric scattering model is used to accurately simulate how light propagates in haze of different concentrations and characteristics. The model is based on physical principles and takes into account the scattering and absorption of light waves by fog droplets, thereby predicting the propagation path and attenuation of light in haze.
[0117] Specifically, the atmospheric scattering model under haze weather is:
[0118] I(x)=R(x)t(x)+L(1-t(x));
[0119] t(x)=e (-βL(x)) ;
[0120] β ≥ 2.996 × 10 -3 m -1 ;
[0121] Where I(x) is the foggy point cloud observed at pixel x, R(x) is the clear scene radiation, and L is the atmospheric light, a light intensity containing three color channels: R, G, and B. The image is statistically analyzed, such as selecting the top 0.1% of brightness values in the dark channel, and then calculating the RGB average of these brightness values as an estimate of the atmospheric light. The model assumes that the atmospheric light is globally constant, and the transmittance t(x) determines the amount of scene radiation reaching the camera. In the case of a uniform medium, the transmittance depends on the distance L(x) between the scene and the camera, and β is the attenuation coefficient. The larger the β value, the thicker the fog. The transmittance t(x) is estimated by a multi-scale convolutional network.
[0122] Reference Figure 3 As shown in the figure, it is a multi-scale network, which includes both coarse extraction and fine extraction, including input point cloud, multi-scale feature extraction module, convolution module, pooling module, and upsampling module. The input layer accepts the original point cloud data as input, and each point contains location information and color information. To implement the convolution operation on the point cloud, a K-nearest neighbor graph is used to construct a KNN graph in the point cloud data, and then the convolution operation is defined on the graph. The KNN graph first determines the K value, that is, the number of nearest neighbors, and then finds the K nearest neighbors for each point in the feature space based on the distance metric (such as Euclidean distance) to construct a KNN graph. During the convolution process, the convolution kernel is defined on the edge of the graph, and the node features are updated according to the relationship between adjacent point pairs. The convolution module uses the EgdeConv algorithm and uses the framework of the graph convolution network (GCN) to capture the local geometric features of the point cloud by dynamically constructing and optimizing the K nearest neighbor graph of each point in the point cloud. In each convolution iteration, EdgeConv uses a multi-layer perceptron (MLP) to learn edge features between point pairs, and then aggregates the information of neighboring points based on these edge features to update the feature representation of each point. The upsampling module ensures that the transmittance does not change.
[0123] After predicting the coarse scene transmittance considering the entire image, it is refined using a fine network, where the architecture of the fine layer stack is similar to the coarse scale network, e.g. Figure 3 The coarse output transmittance is used as an additional feature map. By design, the size of the coarse-scale prediction is the same as the output size of the first upsampling layer. The two are concatenated together and the predicted coarse transmittance is combined with the learned feature map in the fine-scale network to re-correct the transmittance. To further determine the pixel values in specific areas such as the sky, white clouds, and bright areas, the transmittance t(x) estimated by the multi-scale network is classified and statistically analyzed:
[0124]
[0125] Among them, ω is taken as 0.75, which is the overall weight of the neighborhood block centered on pixel x, I(x) is the foggy point cloud observed at pixel x, and I dark is the point cloud with the minimum brightness in the three RGB channels, I c (x) is the point cloud with the maximum brightness in the RGB three channels, Ω(x) is the point cloud set used for the multi-scale neural network, and A is the atmospheric light value.
[0126] Step S3: Based on the generated point cloud data, each point in the point cloud data is modeled as a 3D Gaussian function using the 3D-Gassusian Splatting method. Through the "splashing" operation, it is projected onto the 2D image plane to form a series of 2D Gaussians. Through the designed sorting and synthesis strategies, scene generation under haze weather is achieved.
[0127] In this step, 3D-GS is used to generate point cloud, which specifically includes the following steps:
[0128] Step S301: Based on the pre-processed point cloud, each point is modeled as a 3D Gaussian ellipsoid, and the position and color information of the Gaussian ellipsoid is derived from the information of the point cloud data.
[0129] Specifically, the attributes of the 3D Gaussian ellipsoid include position, opacity, 3D covariance matrix, and color. Color is represented by spherical harmonics to present a view-dependent appearance. All attributes are learnable and optimized through backpropagation. The formula for the 3D covariance matrix is as follows:
[0130] ∑=RSS T R T :
[0131] Among them, ∑ represents the three-dimensional covariance matrix, S represents the scaling transformation, and R represents the rotation transformation.
[0132] Step S302: Use 3D Gaussian functions for training, set hyperparameters, and use all differentiable Gaussian functions to render images through differentiable rendering technology, so that the rendered image conforms to the texture characteristics of the actual scene as much as possible. Specifically, in differentiable rendering technology, the parameters (covariance, position, opacity, spherical harmonics) of the 3D Gaussian are optimized to adapt to the given image sequence and viewing angle. This step can be implemented using gradient descent or other optimization algorithms, with the goal of minimizing the reconstruction error. In addition, adaptive density control (ADC) can be used to adjust the number and distribution of 3D Gaussians to achieve the best rendering effect. When projecting into two-dimensional space, the “snowball method” is used, that is, the given view transformation W and the three-dimensional covariance matrix ∑ are calculated, and the two-dimensional covariance matrix ∑′ of the projection is calculated:
[0133] ∑′=JW∑W T J T ;
[0134] Where J is the Jacobian matrix of the affine approximation of the projective transformation. The center position and color of the projected 2D Gaussian can be directly obtained from the parameters of the 3D Gaussian. The opacity of the projected 2D Gaussian needs to be adjusted according to the opacity and covariance matrix of the 3D Gaussian. Specifically, the opacity of the projected 2D Gaussian can be calculated using the following formula:
[0135]
[0136] Next, the projected 2D Gaussians are sorted according to their depth values so that occlusion relationships can be correctly handled in the subsequent rendering process. In order to improve the efficiency of sorting, a spatial partitioning technique is used to divide the image plane into multiple blocks, and then the 2D Gaussians in each block are sorted.
[0137] Step S303: Compare the difference between the rendered image and the real image and calculate the loss function, which includes a combination of pixel-level error and structural similarity index (SSIM). According to the result of the loss function, the Gaussian ellipsoid set is adjusted to more accurately match the characteristics of the target scene.
[0138] Step S304: Use point cloud densification and pruning techniques to change the density of 3D Gaussian points through a gradient adaptive method. Optimize the geometric details and texture quality of the scene while reducing unnecessary calculations. Repeat steps S302-S304 for a fixed number of rounds until the desired effect is achieved.
[0139] Specifically, for areas with scattered points or lack of geometric features, after a certain number of iterations, a point densification method is used to create Gaussian replicas that move toward the position gradient or replace a large Gaussian with two smaller Gaussians, reducing their scales by a specific factor. For Gaussians that are almost transparent (α is lower than a specified threshold) and Gaussians that are too large in world space or view space, a pruning method is used to remove redundant or less influential Gaussians to ensure accuracy and effectiveness.
[0140] Step S4: Optimize the loss function and add supervision signals by adding fog to images and point clouds. First, simulate the effect of haze on light propagation based on the atmospheric scattering model, and generate fogged images based on the original images. These images serve as the first supervision signal in 3D-GS training. Then, defog the fogged images to enhance their clarity, and obtain defog images. The difference between the images and the original images is compared as the second supervision signal in the training process.
[0141] During the training process, the model uses these two supervisory signals to calculate the haze simulation loss using perceptual hashing to measure the difference between the rendered image and the hazy image. The dehazing effect loss is calculated using pixel-level error to measure the difference between the dehazed image and the original image. Combining the above two losses and adding the regularization term gives the total loss function:
[0142] L total =λ1·L fog +λ2·L defog +λ3L regularization ;
[0143] Among them, L fog is the haze simulation loss, L defog is the dehazing effect loss, L regularization is the regularization term, λ1, λ2, and λ3 are weight parameters.
[0144] The parameters of the 3D Gaussian ellipsoid are updated according to the gradient of the total loss function to restore clear driving scene details from the fogged image and generate more realistic intelligent driving scenes in foggy weather.
[0145] This embodiment converts the driving scene video in clear weather into point cloud data, applies a deep learning algorithm to synthesize the fog effect, and then uses 3D-Gaussian Splatting technology to generate a haze weather scene. The accuracy of scene reconstruction is improved by optimizing the loss function and adding supervision signals, thereby providing a rich testing environment for the intelligent driving system and enhancing its safety and adaptability under complex weather conditions.
[0146] Therefore, the present invention has practical application and economic benefits, and is suitable for urban traffic management and intelligent transportation systems.
[0147] The present invention also provides a high-precision scene generation system for intelligent driving based on synthetic fog. The high-precision scene generation system for intelligent driving based on synthetic fog can be realized by executing the process steps of the high-precision scene generation method for intelligent driving based on synthetic fog, that is, those skilled in the art can understand the high-precision scene generation method for intelligent driving based on synthetic fog as a preferred implementation of the high-precision scene generation system for intelligent driving based on synthetic fog.
[0148] Specifically, a high-precision scene generation system for intelligent driving based on synthetic fog includes:
[0149] Module M1: Collect real driving scene videos under normal weather conditions and convert video data into point cloud data;
[0150] Module M2: Synthesize and simulate haze point cloud data based on point cloud data and multi-scale convolutional network;
[0151] Module M3: Generate the initial scene under haze weather based on 3D-Gassusian Splatting algorithm and simulated haze point cloud data;
[0152] Module M4: Process and reconstruct the initial scene under haze weather, and output the driving scene under haze weather with preset accuracy.
[0153] The module M1 includes using a camera to circularly shoot the expected driving scene, preprocessing the video data, and converting the video data into point cloud data based on the incremental SFM algorithm.
[0154] The preprocessing includes dividing the grayscale, brightness or color of each pixel of adjacent frames into N levels, counting the number of pixels in each level and making a histogram comparison to perform boundary segmentation of the shot; defining an NxN level grayscale co-occurrence matrix; the co-occurrence matrix includes four eigenvectors of contrast, texture consistency, pixel contrast and entropy, and realizing key frame extraction for the video at 0°, 45°, 90° and 135°.
[0155] The module M1 includes the following submodules:
[0156] Module M1.1: Read image data and use SIFT to extract feature points;
[0157] Module M1.2: Calculate spatial distances through GPS information and search for image pairs that may have matching relationships; construct a KD tree to search for matching pairs based on the fast nearest neighbor matching method and traverse possible matching feature points within the image pairs;
[0158] Module M1.3: Randomly select eight or more pairs of matching points for image pairs, divide the paired feature points into x and x', use the normalized eight-point algorithm to solve the basic matrix F, and count the number of point pairs with epipolar geometric relationship x'Fx = 0 within a certain threshold error range; repeat this process several times, and select the match with the largest number of point pairs that meet the preset conditions to refine the matching result;
[0159] Module M1.4: Select two matching images, set one of the images as the unit matrix pose, estimate the E matrix of the matching point pairs between the two images to obtain the pose of the other image; generate three-dimensional points based on triangulation; the triangulation includes that when the image pairs are initially matched, the median of all corresponding ray angles is between 3° and -60°;
[0160] Module M1.5: Add images that have not been added, obtain the next matching image with the largest number of matching point pairs, perform PNP pose estimation, and triangulate to generate three-dimensional space points; repeat this module until all images are processed;
[0161] Module M1.6: BA optimization of all generated 3D points and all estimated poses;
[0162] Module M1.7: Perform BA optimization on all generated 3D points, camera poses and intrinsic parameters to obtain 3D point clouds and camera poses, and complete point cloud generation.
[0163] The module M2 includes generating simulated synthetic fog point cloud data based on an atmospheric scattering model and a multi-scale neural network; using an atmospheric scattering model to simulate the propagation mode of light in haze of different concentrations and characteristics; the atmospheric scattering model can consider the scattering and absorption effects of fog droplets on light waves based on physical principles, and predict the propagation path and attenuation of light in haze; adjusting the point cloud data according to the simulation results, changing the color and density of each point therein and reflecting the visual effect in a foggy environment; the visual effects include blurred background colors, reduced color contrast, and loss of details of distant objects; further using a multi-scale convolutional network to refine the simulation process; based on learning point cloud features at different scales and data set training, capturing visual changes from clarity to fog, and generating fog point cloud data that meets preset conditions.
[0164] The module M3 includes the following submodules:
[0165] Module M3.1: Based on the pre-processed point cloud, each point is modeled as a 3D Gaussian ellipsoid; the position information and color information of the Gaussian ellipsoid are derived from the information of the point cloud data;
[0166] Module M3.2: Use 3D Gaussian functions for training, set hyperparameters, and use all differentiable Gaussian functions to render images through differentiable rendering techniques;
[0167] Module M3.3: Compare the difference between the rendered image and the real image and calculate the loss function; the loss function includes a combination of pixel-level error and structural similarity index; according to the result of the loss function, adjust the Gaussian ellipsoid set;
[0168] Module M3.4: Change the density of 3D Gaussian points based on point cloud densification and pruning techniques and gradient adaptive methods to optimize the geometric details and texture quality of the scene;
[0169] Module M3.5: Repeat modules M3.2-M3.4 until the preset effect is achieved.
[0170] The module M4 includes optimizing the loss function, adding a supervisory signal by adding fog to images and point clouds; simulating the influence of haze on light propagation based on an atmospheric scattering model, generating a fogged image based on the original image, and serving as the first supervisory signal in 3D-GS training; defogging the fogged image to enhance its clarity, comparing the defogged image with the original image, and serving as the second supervisory signal in the training process; during the training process, the model learns to recover the details of the driving scene from the fogged image based on the first supervisory signal and the second supervisory signal.
[0171] Those skilled in the art know that, in addition to realizing the system and its various devices, modules, and units provided by the present invention in a purely computer-readable program code, it is entirely possible to realize the same functions in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, the system and its various devices, modules, and units provided by the present invention can be considered as a hardware component, and the devices, modules, and units included therein for realizing various functions can also be regarded as structures within the hardware component; the devices, modules, and units for realizing various functions can also be regarded as both software modules for realizing the method and structures within the hardware component.
[0172] In the description of the present application, it should be understood that the terms "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the referred device or element must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present application.
[0173] The above describes the specific embodiments of the present invention. It should be understood that the present invention is not limited to the above specific embodiments, and those skilled in the art can make various changes or modifications within the scope of the claims, which does not affect the essence of the present invention. In the absence of conflict, the embodiments of the present application and the features in the embodiments can be combined with each other arbitrarily.
Claims
1. A method for generating high-precision scenes for intelligent driving based on synthetic fog, characterized in that: include: Step S1: Collect real driving scene videos under normal weather conditions and convert the video data into point cloud data; Step S2: synthesizing simulated haze point cloud data based on point cloud data and multi-scale convolutional network; Step S3: Generate an initial scene under haze weather based on the 3D-Gassusian Splatting algorithm and simulated haze point cloud data; Step S4: Process and reconstruct the initial scene under the haze weather, and output the driving scene under the haze weather with a preset accuracy.
2. The method for generating high-precision scenes for intelligent driving based on synthetic fog according to claim 1 is characterized in that: The step S1 includes using a camera to circularly shoot the expected driving scene, preprocessing the video data, and converting the video data into point cloud data based on the incremental SFM algorithm.
3. The method for generating high-precision scenes for intelligent driving based on synthetic fog according to claim 2 is characterized in that: The preprocessing includes dividing the grayscale, brightness or color of each pixel of adjacent frames into N levels, counting the number of pixels in each level and making a histogram comparison to perform boundary segmentation of the shot; defining an NxN level grayscale co-occurrence matrix; the co-occurrence matrix includes four eigenvectors of contrast, texture consistency, pixel contrast and entropy, and realizing key frame extraction for the video at 0°, 45°, 90° and 135°.
4. The method for generating high-precision scenes for intelligent driving based on synthetic fog according to claim 2 is characterized in that: The step S1 comprises the following sub-steps: Step S1.1: Read image data and use SIFT to extract feature points; Step S1.2: Calculate the spatial distance through GPS information and search for image pairs that may have matching relationships; construct a KD tree to search for matching pairs based on the fast nearest neighbor matching method and traverse the possible matching feature points in the image pairs; Step S1.3: Randomly select eight or more pairs of matching points for the image pairs, divide the paired feature points into x and x', use the normalized eight-point algorithm to solve the basic matrix F, and count the number of point pairs with the epipolar geometric relationship x'Fx = 0 within a certain threshold error range; repeat this process several times, and select the match with the largest number of point pairs that meet the preset conditions to refine the matching result; Step S1.4: Select two matching images, set one of the images as the unit matrix pose, estimate the E matrix of the matching point pairs between the two images to obtain the pose of the other image; generate three-dimensional points based on triangulation; the triangulation includes that when the image pairs are initially matched, the median of all corresponding ray angles is between 3° and -60°; Step S1.5: Add the images that have not been added, obtain the next matching image with the largest number of matching point pairs, perform PNP pose estimation, and triangulate to generate three-dimensional space points; repeat this step until all images are processed; Step S1.6: perform BA optimization on all generated 3D points and all estimated poses; Step S1.7: Perform BA optimization on all generated 3D points, camera poses and intrinsic parameters to obtain 3D point cloud and camera poses, and complete point cloud generation.
5. The method for generating high-precision scenes for intelligent driving based on synthetic fog according to claim 1, characterized in that: The step S2 includes generating simulated synthetic fog point cloud data based on an atmospheric scattering model and a multi-scale neural network; using the atmospheric scattering model to simulate the propagation mode of light in haze of different concentrations and characteristics; the atmospheric scattering model can predict the propagation path and attenuation of light in haze based on physical principles and taking into account the scattering and absorption effects of fog droplets on light waves; adjusting the point cloud data according to the simulation results, changing the color and density of each point therein and reflecting the visual effect in the foggy environment; the visual effect includes the background color becoming blurred, the color contrast being reduced, and the details of distant objects being lost; and further using a multi-scale convolutional network to refine the simulation process; Based on learning point cloud features at different scales and data set training, the visual changes from clear to foggy are captured, and foggy point cloud data that meets the preset conditions is generated.
6. The method for generating high-precision scenes for intelligent driving based on synthetic fog according to claim 1, characterized in that: The step S3 comprises the following sub-steps: Step S3.1: Based on the pre-processed point cloud, each point is modeled as a 3D Gaussian ellipsoid; the position information and color information of the Gaussian ellipsoid are derived from the information of the point cloud data; Step S3.2: Use 3D Gaussian functions for training, set hyperparameters, and use all differentiable Gaussian functions to render images through differentiable rendering techniques; Step S3.3: comparing the difference between the rendered image and the real image, and calculating a loss function; the loss function includes a combination of pixel-level error and a structural similarity index; and adjusting the Gaussian ellipsoid set according to the result of the loss function; Step S3.4: changing the density of 3D Gaussian points based on point cloud densification and pruning techniques and gradient adaptive methods to optimize the geometric details and texture quality of the scene; Step S3.5: Repeat steps S3.2-S3.4 until the preset effect is achieved.
7. The method for generating high-precision scenes for intelligent driving based on synthetic fog according to claim 1, characterized in that: The step S4 includes optimizing the loss function, adding supervision signals by adding fog to the image and point cloud; simulating the influence of haze on light propagation based on the atmospheric scattering model, generating a fogged image based on the original image, and serving as the first supervision signal in 3D-GS training; The fogged image is defogged to enhance its clarity, and the defogged image is compared with the original image and used as the second supervisory signal in the training process; during the training process, the model learns to recover the details of the driving scene from the fogged image based on the first supervisory signal and the second supervisory signal.
8. A high-precision scene generation system for intelligent driving based on synthetic fog, characterized in that: include: Module M1: Collect real driving scene videos under normal weather conditions and convert video data into point cloud data; Module M2: Synthesize and simulate haze point cloud data based on point cloud data and multi-scale convolutional network; Module M3: Generate the initial scene under haze weather based on 3D-Gassusian Splatting algorithm and simulated haze point cloud data; Module M4: Process and reconstruct the initial scene under haze weather, and output the driving scene under haze weather with preset accuracy.
9. The high-precision scene generation system for intelligent driving based on synthetic fog according to claim 8, characterized in that: The module M1 includes using a camera to circularly shoot the expected driving scene, preprocessing the video data, and converting the video data into point cloud data based on the incremental SFM algorithm.
10. The high-precision scene generation system for intelligent driving based on synthetic fog according to claim 9, characterized in that: The preprocessing includes dividing the grayscale, brightness or color of each pixel of adjacent frames into N levels, counting the number of pixels in each level and making a histogram comparison to perform boundary segmentation of the shot; defining an NxN level grayscale co-occurrence matrix; the co-occurrence matrix includes four eigenvectors of contrast, texture consistency, pixel contrast and entropy, and realizing key frame extraction for the video at 0°, 45°, 90° and 135°.
Citation Information
Cited By
Digital-real fusion test digital scene rapid generation method
CN119514386A
Simulation fogging method and system for road traffic scene image
CN120031745A
