A method for simulating three-dimensional traffic flow of a road fused with a real scene
Patent Information
- Application Number
- CN202610894686.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-22
- Publication Date
- 2026-10-09
- Estimated Expiration
- 2046-06-22
AI Technical Summary
[0004]为了解决上述技术问题,提供一种融合实景的道路交通流三维仿真方法,以解决现有的问题
本申请通过从点云数据中识别出道路区域,在实景融合模型中标记出道路对应的三角面片,其有益效果在于精确识别出道路的几何区域,确保关键特征在后续处理中得到保留;计算各顶点的第一评估值,其有益效果在于量化了顶点是位于平坦内部还是位于轮廓、棱角等关键几何特征上,初步评估该顶点应该保留的可能性,从几何层面识别并优先保留建筑物的拐角、路缘石边缘等显著特征,避免模型简化后出现结构失真;对邻域范围内所有边进行筛选,其有益效果在于考虑了每条边邻接的两个三角面片的颜色差异情况,以识别出颜色边界处的边;计算每条边的第二评估值,其有益效果在于考虑了每条边的区域连通性,以反映该条边为一条连续、完整的颜色边界的一部分的可能,即反映该条边为车道线边缘、交通标志边缘的可能,进一步评估该条边应该保留的可能,从视觉层面识别并优先保留关键交通标识的特征,确保模型的真实性和视觉效果;得到每条边的保留系数,其有益效果在于从几何和视觉两个维度综合评估每条边应该被保留的程度,确保车道线、交通标志轮廓等关键位置不被过度简化;计算每条边的重要度,其有益效果在于考虑了距离驾驶视角较近的三角面片上边的折叠对驾驶体验的影响,从而优先保留驾驶视角关注区域的细节,对远离道路的区域进行优先折叠,提高驾驶的真实体验感;利用边折叠简化算法,对实景融合模型进行简化,并在简化后的实景融合模型中引入动态交通流,其有益效果在于基于每条边的重要性,对实景融合模型进行简化,能够在删除大量三角面片的同时,有效保留车道线、导向箭头等驾驶关键要素,从而实现渲染速率的大幅提升,在一个既轻量化又高保真的模型中进行动态交通流仿真,确保了模拟驾驶中对极高渲染帧率和极强视觉真实感的双重需求。
Smart Images

Figure CN122435185B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of lightweight real-scene model technology, specifically to a three-dimensional simulation method for road traffic flow that integrates real-scene data. Background Technology
[0002] With the development of smart cities, autonomous driving simulation, and digital twin technologies, highly realistic 3D road scenes have become an indispensable core component of six-degrees-of-freedom driving simulation platforms. To improve the spatial accuracy and scene realism of the virtual driving environment during vehicle simulation, it is necessary to construct a highly realistic real-scene model and simulate traffic flow on this model to simulate a real driving environment. Existing technologies often employ a combination of LiDAR and oblique photogrammetry to construct high-precision real-scene models. LiDAR provides accurate geometric point clouds, while oblique photogrammetry provides realistic texture images. The resulting real-scene model, obtained by fusing the two technologies, combines geometric accuracy with visual realism.
[0003] However, the amount of data contained in such integrated reality models is extremely large. Directly using them for real-time rendering would cause a sharp drop in rendering speed, severely restricting the smoothness and realism of the simulated driving experience. When traditional QEM (Quadric Error Metrics) simplification algorithms are used to lightweight models, they usually aim to minimize the overall geometric error. This indiscriminately removes details that are crucial to the visual realism of driving, resulting in the simplification of key traffic signs such as lane lines, traffic signs, and road outlines. This can lead to breaks, offsets, or blurring, which in turn affects the realism of the reality model and reduces the experience of the simulated driving. Summary of the Invention
[0004] To address the aforementioned technical issues, a three-dimensional simulation method for road traffic flow that integrates real-world scenarios is provided to resolve existing problems.
[0005] The solution to the technical problem presented in this application is to provide a three-dimensional simulation method for road traffic flow that integrates real-world scenarios, including the following steps: For the area where the target road is located, a three-dimensional geometric model is constructed using point cloud data generated by LiDAR technology, and a three-dimensional scene model is constructed using image data acquired by oblique photogrammetry technology. The two models are then fused to obtain a real-scene fusion model. The road area is identified from the point cloud data, and the triangular facets corresponding to the road are marked in the real-scene fusion model. Analyze the length of the edges connected to each vertex of the triangular facet in the real scene fusion model, as well as the distance from each vertex to its local region, evaluate the geometric saliency of the local region where the vertex is located, and calculate the first evaluation value of each vertex. For each edge in the real-scene fusion model, all edges in the neighborhood are filtered based on the difference in color information of the two triangular faces adjacent to different edges in the neighborhood. Based on the connectivity of each edge and all the filtered edges in the neighborhood, the continuity of the color boundary of the edge is evaluated, the second evaluation value of each edge is calculated, and the retention coefficient of each edge is obtained by combining the first evaluation value of the vertices connected to each edge. Based on the information of the triangular facets corresponding to each edge on the road, and combined with the retention coefficient of each edge and its distance from the road area, the importance of each edge is calculated. The edge folding simplification algorithm is used to simplify the reality fusion model, and dynamic traffic flow is introduced into the simplified reality fusion model.
[0006] Preferably, identifying the road region from the point cloud data includes: extracting all ground point clouds from the point cloud data; performing planar fitting on all ground point clouds; projecting each fitted plane onto the XOY plane; calculating the area of the minimum bounding rectangle of the region where each fitted plane is projected, and recording it as the projected area; obtaining the segmentation threshold of the projected area for all fitted planes; and recording the fitted planes whose projected area is greater than the segmentation threshold as road fitted surfaces.
[0007] Preferably, marking the triangular facets corresponding to the road in the reality fusion model includes: mapping the road fitting surface in the three-dimensional geometric model to the reality fusion model, and marking the triangular facets located in the road fitting surface as the triangular facets corresponding to the road.
[0008] Preferably, the calculation of the first evaluation value for each vertex includes: For each triangular facet in the reality fusion model, the average length of all edges connected to any vertex is taken as the local length of that vertex. All triangular faces containing any of the given vertices are denoted as common faces; plane fitting is performed on all vertices on all common faces corresponding to any given vertex, and the distance from any given vertex to the fitted plane is calculated as the relative distance; Calculate the ratio of the relative distance to the local length, and denot it as the relative ratio; If the number of common faces corresponding to any vertex is not 1, the first evaluation value of any vertex is the relative comparison; otherwise, the first evaluation value of any vertex is the result of positive mapping of the relative comparison.
[0009] Preferably, the filtering of all edges within the neighborhood includes: For the reality fusion model, the average color data of all 3D points located on all edges in each triangular facet under the same color channel is used as the color vector of each triangular facet; the difference between the color vectors of two triangular facets connected to each edge in the reality fusion model is calculated as the color difference. Obtain the center point of any edge and the segmentation threshold of the color difference of all edges in its neighborhood. Select the edges whose color difference in the neighborhood is greater than or equal to the segmentation threshold and record them as the edges to be tested.
[0010] Preferably, the color difference is the distance between the color vectors of the two triangular faces connected to each edge in the real-scene fusion model.
[0011] Preferably, the calculation of the second evaluation value for each edge includes: For any given edge and all vertices connected to it, construct an undirected graph. Starting from the given edge, perform graph traversal to obtain a maximal connected subgraph containing the given edge. The second evaluation value is positively correlated with the number of all edges in a maximally connected subgraph and negatively correlated with the number of all edges in an undirected graph.
[0012] Preferably, obtaining the retention coefficient for each edge includes: Calculate the average of the first evaluation values of the two vertices connected by each edge in the reality fusion model; The retention coefficient is the product of the result of positive mapping of the second evaluation value and the average value.
[0013] Preferably, the calculation of the importance of each edge includes: Obtain the distance from the center point of each edge to all road fitting surfaces, select the minimum distance and normalize it to obtain the shortest distance for each edge. For each edge in the reality fusion model, if the edge is located on the triangular facet corresponding to the road, the importance of the edge is the retention coefficient; otherwise, the importance of the edge is the ratio of the retention coefficient to the shortest distance.
[0014] Preferably, the simplification of the real-scene fusion model includes: using the importance as the folding cost of each edge, and performing edge folding using a quadratic error measure algorithm.
[0015] This application has at least the following beneficial effects: This application identifies road regions from point cloud data and marks the corresponding triangular facets of the roads in the reality fusion model. Its advantages include accurately identifying the geometric regions of roads and ensuring that key features are preserved in subsequent processing. Calculating the first evaluation value for each vertex quantifies whether the vertex is located inside a flat area or on key geometric features such as contours or edges, providing an initial assessment of the vertex's likelihood of retention. It also identifies and prioritizes the retention of salient features such as building corners and curb edges from a geometric perspective, avoiding structural distortion after model simplification. Filtering all edges within the neighborhood considers the color difference between adjacent triangular facets of each edge to identify edges at color boundaries. Calculating the second evaluation value for each edge considers the regional connectivity of each edge, reflecting the possibility that the edge is part of a continuous, complete color boundary, i.e., the possibility that the edge is a lane line edge or traffic sign edge, further assessing the likelihood of retention and visually identifying and prioritizing the retention of key intersections. The model's realism and visual appeal are ensured by identifying the characteristics of traffic signs. A retention coefficient for each edge is calculated, which comprehensively evaluates the degree to which each edge should be retained from both geometric and visual dimensions, ensuring that key elements such as lane lines and traffic sign outlines are not oversimplified. The importance of each edge is calculated, taking into account the impact of folding edges on triangles closer to the driver's viewpoint on the driving experience. This prioritizes retaining details in areas of interest to the driver and folds edges away from the road, improving the realism of the driving experience. An edge folding simplification algorithm is used to simplify the reality fusion model, and dynamic traffic flow is introduced into the simplified model. This simplification, based on the importance of each edge, effectively retains key driving elements such as lane lines and directional arrows while removing a large number of triangles, resulting in a significant improvement in rendering speed. Dynamic traffic flow simulation is performed in a lightweight yet high-fidelity model, ensuring the dual requirements of extremely high rendering frame rates and strong visual realism in simulated driving. Attached Figure Description
[0016] The following section provides a more detailed description of a three-dimensional simulation method for road traffic flow that integrates real-world scenes, in conjunction with the accompanying drawings.
[0017] Figure 1 A flowchart illustrating the steps of a three-dimensional simulation method for road traffic flow that integrates real-world scenes, as provided in this application embodiment; Figure 2 A flowchart illustrating the steps of a method for obtaining the second evaluation value of each edge as provided in an embodiment of this application. Detailed Implementation
[0018] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description, in conjunction with the accompanying drawings and implementation examples, provides a more comprehensive explanation of the three-dimensional simulation method for road traffic flow that integrates real-world scenarios. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0019] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains.
[0020] Please see Figure 1 The diagram illustrates a flowchart of a three-dimensional simulation method for road traffic flow that integrates real-world scenes, according to an embodiment of this application. The method includes the following steps: Step 1: For the area where the target road is located, a 3D geometric model is constructed using point cloud data generated by LiDAR technology, and a 3D scene model is constructed using image data acquired by oblique photogrammetry technology. The two models are then fused to obtain a real-scene fusion model. The road area is identified from the point cloud data, and the triangular facets corresponding to the road are marked in the real-scene fusion model.
[0021] With the continuous development of urban transportation and the increasing maturity of intelligent transportation technologies, the demand for traffic scenario simulation and visualization is becoming increasingly urgent. In vehicle simulation, a realistic visual experience is crucial for improving the simulation's authenticity and effectiveness. Therefore, by constructing a high-precision virtual driving environment, vehicles can make decisions and interact based on real spatial logic within the simulated virtual environment, significantly enhancing the credibility of vehicle simulation test results.
[0022] Based on the above analysis, a drone equipped with LiDAR is used to scan the area containing the target road in the city, generate point cloud data, and then triangulate it to construct a three-dimensional geometric model. In this embodiment, a voxel-based triangulation algorithm is used for triangulation. The voxel-based triangulation algorithm divides the point cloud data into multiple triangular meshes, i.e., triangular patches. The model formed by all the triangular patches is a three-dimensional geometric model. The voxel-based triangulation algorithm is a well-known technology and will not be described in detail here.
[0023] All ground point clouds were extracted using a cloth-simulation filtering algorithm; It should be noted that the fabric simulation filtering algorithm is a well-known technology and will not be described in detail here.
[0024] Since the ground point cloud may contain point clouds of non-road areas such as building roofs and steps, the RANSAC (Random Sample Consensus) algorithm is used to perform plane fitting on all ground point clouds. Each fitted plane is projected onto the XOY plane, and the area of the minimum bounding rectangle of the region after the projection of each fitted plane is calculated and denoted as the projected area. Obtain the segmentation threshold of the projected area corresponding to all fitted planes, and denote the fitted planes whose projected area is greater than the segmentation threshold as road fitted planes; denote the triangular facets in the three-dimensional geometric model located on the road fitted planes as the triangular facets corresponding to the roads; In this embodiment, the RANSAC algorithm is a well-known technique and will not be described in detail here. Secondly, the Otsu's method is used to obtain the segmentation threshold. Otsu's method is a well-known technique and will not be described in detail here.
[0025] Based on oblique photogrammetry, an unmanned aerial vehicle (UAV) equipped with a five-lens oblique camera is used to collect image data of a local area in the city containing the target road. Aerial triangulation is performed on the image data to obtain the exterior orientation elements of the image. The exterior orientation elements include the camera's attitude angle and the position coordinates of the camera center. A triangulation model is constructed using ContextCapture software, and a three-dimensional scene model is constructed by texture mapping the texture and color information of the image data. It should be noted that the techniques for generating scene models through oblique photography and texture mapping are well-known technologies and will not be elaborated upon here; secondly, the three-dimensional scene model contains both texture information and color information.
[0026] The three-dimensional geometric model and the three-dimensional scene model are fused to obtain a real-scene fusion model; It should be noted that model fusion is a well-known technology and will not be elaborated here; secondly, the reality fusion model is a mesh model composed of many triangular facets, each of which is defined by three vertices and each edge connects two vertices.
[0027] Based on the triangular facets corresponding to roads in the 3D geometric model, obtain the triangular facets corresponding to roads in the reality fusion model; For the real-scene fusion model, the average color data of all 3D points located on all edges in each triangular facet is used as the color vector of each triangular facet. It should be noted that color data refers to a vector composed of values from the three color channels RGB. The average value of the values of all three-dimensional points under each color channel is calculated. Therefore, the color vector of each triangular facet also represents a vector composed of values from the three color channels RGB.
[0028] Thus, the reality fusion model is obtained.
[0029] Step 2: Analyze the length of the edges connected to each vertex of the triangular facet in the real scene fusion model, as well as the distance from each vertex to its local region, evaluate the geometric saliency of the local region where the vertex is located, and calculate the first evaluation value of each vertex.
[0030] Realistic 3D modeling is the creation of a digital space that realistically, three-dimensionally, and temporally reflects and expresses human production, living, and ecological spaces within a certain area. In creating 3D models that closely resemble real-world scenes using oblique photogrammetry and LiDAR scanning technologies, the complexity and large data volume of these models present significant challenges for data storage, processing, and rendering. Therefore, it is necessary to simplify the models, reduce their complexity, and eliminate redundant geometric information while maintaining their main shape and features, making the models more lightweight to reduce data volume and improve rendering efficiency.
[0031] 3D model simplification techniques mainly include geometric deletion and vertex resampling. Among them, geometric deletion is widely used because of its clear approach, relatively low requirements for computer hardware, and the ability to maintain good visual effects after simplification. Geometric deletion can be divided into vertex deletion, edge folding, and triangular facet collapse methods depending on the elements to be deleted. Among these, the edge folding algorithm is widely used because it is fast, efficient, and can maintain the topological structure of the original model.
[0032] The edge folding algorithm simplifies the process by iteratively folding edges. Specifically, during the iterative folding process, the edge with the smallest folding error is selected each time, all vertices and faces adjacent to that edge are deleted, and then the holes created after the edge is folded are retriangulated. In this way, the number of triangles in the model is reduced, thereby improving the rendering efficiency of the model.
[0033] Before performing edge-folding and lightweighting on the real-scene fusion model, it is necessary to assess whether the folded edges are located in key areas that significantly affect the realism of the simulated driving. For example, lane lines, intersections, traffic signs, and the outlines of buildings on both sides of the road are elements that need to be focused on during driving. If the geometry of these areas is simplified, it will seriously affect the realism of the simulated driving.
[0034] Secondly, because the triangular facets are usually more densely subdivided in the contour edge areas and geometrically detailed areas of the model, such as lane corners and building door and window frames, the corresponding side lengths are often shorter. Therefore, the first evaluation value is calculated by analyzing the side lengths of all edges connected to each vertex and the coplanarity of the planes containing each vertex and its connected triangular facets. Specifically: For each triangular facet in the reality fusion model, the average length of all edges connected to any vertex is taken as the local length of that vertex. It should be noted that the side length can be calculated by measuring the distance between the two vertices connected by each side.
[0035] All triangular faces containing any of the given vertices are denoted as common faces; plane fitting is performed on all vertices on all common faces corresponding to any given vertex, and the distance from any given vertex to the fitted plane is calculated and denoted as the relative distance; In this embodiment, the RANSAC algorithm is used for plane fitting. The RANSAC algorithm is a well-known technique and will not be described in detail here. The distance is calculated by measuring the Euclidean distance from any vertex to the fitted plane. The calculation of the Euclidean distance is a well-known technique and will not be described in detail here.
[0036] Calculate the ratio of the relative distance to the local length, and denot it as the relative ratio; If the number of common faces corresponding to any vertex is not 1, the first evaluation value of any vertex is the relative comparison; otherwise, the first evaluation value of any vertex is the result of positive mapping of the relative comparison. The specific process of positive mapping is as follows: Positive mapping is performed using an exponential function. Let the relative ratio be denoted as... ,but The result is taken as the result of the positive mapping, where, An exponential function with the natural constant as its base is used. When the number of common faces corresponding to any vertex is 1, it indicates that the vertex must be located at the boundary point of the object's contour. Removing this vertex would inevitably distort the object's contour. Therefore, an exponential function is used to increase the weight and improve the retention priority. As another embodiment, a positive mapping can be performed using a logarithmic function, i.e.... The result is taken as the result of the positive mapping, where, It is a logarithmic function with base 10.
[0037] In this embodiment, the first The formula for calculating the first evaluation value of each vertex is: in, For the first The first evaluation value of each vertex, For the first The relative distance between vertices, For the first Local length of each vertex, For the first The number of common faces corresponding to each vertex. It is an exponential function with the natural constant as the base.
[0038] It should be noted that if the first If the number of common faces corresponding to a vertex is 1, then when performing plane fitting on the vertices of the common faces, the optimal plane is the plane containing the triangular face itself, and its i-th vertex is the t-th face. The relative distance from each vertex to the fitted plane will be equal to 0. Therefore, by expanding the plane using an exponential function, the retention priority of that vertex is increased.
[0039] It should be noted that the smaller the local length, the more likely the vertex is located in a detailed feature region or boundary region of the model, and the more it needs to be preserved. Conversely, the larger the local length, the more likely the vertex is located in a flat, featureless interior region, and these regions can be preferentially eliminated to simplify the model. The larger the relative distance, the greater the probability that the vertex is located at a significant geometric feature position such as the corner of a building or the edge of a traffic facility. Vertices at these positions need to be preserved to avoid distortion of the model outline and loss of details. Therefore, the larger the first evaluation value, the more likely the local region where the vertex is located is in a significant geometric structure or a critical position such as the model boundary. Eliminating it may easily lead to visual discontinuity of the model structure, and it should be preserved to avoid model distortion.
[0040] At this point, the first evaluation value of each vertex on each triangular facet in the reality fusion model is obtained.
[0041] Step 3: For each edge in the real-scene fusion model, filter all edges in the neighborhood by the difference in color information of the two triangular faces adjacent to different edges in the neighborhood. Based on the connectivity of each edge and all the filtered edges in the neighborhood, evaluate the continuity of the color boundary where the edge is located, calculate the second evaluation value of each edge, and combine it with the first evaluation value of the vertices connected to each edge to obtain the retention coefficient of each edge.
[0042] The flowchart of the method for obtaining the second evaluation value of each edge provided in the embodiments of this application is as follows: Figure 2 As shown.
[0043] Furthermore, the first evaluation value can initially assess whether the vertex is located in the geometrically salient region of the model. However, some important features may appear in the center of a flat road. For example, lane lines and guide arrows on a flat road may not be geometrically salient, but they are crucial to the realism of the simulated driving. They may be accidentally deleted or simplified during the edge folding simplification process, thus affecting the realism of the simulated driving.
[0044] Because key markings such as lane lines and directional arrows often differ significantly in color from their surroundings—for example, lane lines are typically white or yellow, while road surfaces are usually gray or black—this color difference can be used to identify these key markings, ensuring they are not accidentally removed or simplified during the model's lightweighting process.
[0045] Based on the above analysis, if the two triangular faces connected to each edge in the reality fusion model have the same color height, then folding that edge will have a smaller impact on visual perception; conversely, if that edge happens to be a color boundary, then folding that edge will lead to texture blurring and visual distortion. Therefore, by analyzing the color feature differences of the triangular faces connected to each edge in the reality fusion model, a second evaluation value is calculated to assess whether each edge on the triangular face is suitable for folding, specifically: Calculate the difference in color vectors between two triangular faces connected to each edge in the reality fusion model, and denote it as color difference; In this embodiment, the Euclidean distance between the color vectors of the two triangular faces connected to each edge is calculated and denoted as the color difference. As other implementation methods, implementers may use other methods of the prior art, such as Manhattan distance, etc. This embodiment does not impose any special restrictions on this.
[0046] It should be noted that the greater the color difference, the greater the likelihood that the edge is a color boundary line, such as the edge of a lane line. In such cases, folding it would severely damage the visual realism, and it should not be folded easily.
[0047] Secondly, if a certain edge is a color boundary, it will have a local continuity feature, that is, along the extension direction of the edge, the color difference of the triangular facets on both sides will continue to exist, rather than an accidental abrupt change.
[0048] Get the center point of any edge, get the segmentation threshold of the color difference of all edges in its neighborhood, and select the edges whose color difference in the neighborhood is greater than or equal to the segmentation threshold as the edge to be tested. In this embodiment, the center point of any edge can be calculated by the positions of the two vertices connected to the edge; secondly, the neighborhood is a circle with a radius of 5 times the length of any edge. As other implementation methods, the implementer can set it according to the actual situation; a neighboring edge is an edge whose two connected vertices are both within the neighborhood; the segmentation threshold is obtained by the Otsu's method, which is a well-known technique and will not be described in detail here.
[0049] For any given edge and all vertices connected to it, construct an undirected graph. Starting from the given edge, perform graph traversal to obtain a maximal connected subgraph containing the given edge. It should be noted that the construction of undirected graphs and the acquisition of maximal connected subgraphs are well-known techniques, and will not be elaborated upon here.
[0050] The second evaluation value is positively correlated with the number of all edges in a maximally connected subgraph and negatively correlated with the number of all edges in an undirected graph; It should be noted that a positive correlation means that the dependent variable increases as the independent variable increases and decreases as the independent variable decreases, while a negative correlation means that the dependent variable decreases as the independent variable increases and increases as the independent variable decreases.
[0051] In this embodiment, the ratio between the number of all edges in the maximally connected subgraph and the number of all edges in the undirected graph is calculated as the second evaluation value of any edge. Therefore, the second evaluation value is positively correlated with the number of all edges in the maximally connected subgraph and negatively correlated with the number of all edges in the undirected graph. In other embodiments, the difference between the number of all edges in the maximally connected subgraph and the number of all edges in the undirected graph can be calculated. To avoid the difference being less than 0, the result of an exponential function with the natural constant as the base and the difference as the exponent can be used as the second evaluation value of any edge. In this case, the second evaluation value is positively correlated with the number of all edges in the maximally connected subgraph and negatively correlated with the number of all edges in the undirected graph.
[0052] It should be noted that the larger the second evaluation value, the stronger the connectivity of the region where any edge is located. It may be part of a continuous and complete color boundary, such as the edge of a lane line or the edge of a guide arrow. Removing it may cause a visual break. Therefore, these edges should be retained first during the model lightweighting process to ensure the model's realism and visual effect.
[0053] Furthermore, based on the first and second evaluation values, the retention coefficient is determined as follows: Calculate the average of the first evaluation values of the two vertices connected by each edge in the reality fusion model; The second evaluation value is positively mapped, and its product with the average value is used as the retention coefficient for each edge; In this embodiment, the specific process of positive mapping is as follows: positive mapping is performed using an exponential function, assuming the second evaluation value is denoted as... ,but The result is taken as the result of the positive mapping, where, It is an exponential function with the natural constant as the base.
[0054] It should be noted that, in order to avoid the average value being 0, a preset value greater than 0 is added to the average value when calculating the retention coefficient. In this embodiment, the preset value greater than 0 is 1.
[0055] It should be noted that the larger the average value, the more likely the edge is to be located in a key position such as a significant geometric structure or model boundary. The larger the second evaluation value, the greater the positive mapping result, indicating that the region where the edge is located has strong connectivity and may be part of a color boundary. Through the positive mapping process, the influence of the second evaluation value is non-linearly amplified. For example, in flat regions, the importance of geometric features is low, i.e., the average value is low, while the importance of color features is non-linearly amplified through an exponential function. The larger the retention coefficient, the more likely the edge is to be located in a key feature region with prominent geometric structure or significant color boundary, and the greater its impact on the realism of the reality fusion model. It is more important in the process of model lightweighting and should not be collapsed or deleted.
[0056] Thus, the retention coefficient of each edge in the reality fusion model is obtained.
[0057] Step 4: Based on the information of the triangular facets corresponding to each edge on the road, combined with the retention coefficient of each edge and its distance from the road area, calculate the importance of each edge. Use the edge folding simplification algorithm to simplify the real scene fusion model, and introduce dynamic traffic flow into the simplified real scene fusion model.
[0058] Furthermore, in simulated driving, the driving perspective is limited. The details of the road surface and buildings on both sides of the road have a significant impact on the realistic driving experience, while the detail of buildings far from the road and their tops does not strongly affect the driving experience. Therefore, by analyzing the distance between triangular facets and the road, and combining this with a retention coefficient, importance is calculated to assess which edges are suitable for folding. This allows for the preservation of details more important to the driving experience during model lightweighting. Specifically: Obtain the distance from the center point of each edge to all road fitting surfaces, select the minimum distance and normalize it to obtain the shortest distance for each edge. In this embodiment, the distance is measured by calculating the Euclidean distance from the center point of each edge to each road fitting surface. Secondly, the minimum distance of all edges in the real scene fusion model is normalized by the maximum-minimum normalization method. The maximum-minimum normalization method is a well-known technique and will not be described in detail here. As other implementation methods, implementers can use other methods of the prior art, such as Z-score normalization, etc. This embodiment does not impose any special restrictions on this.
[0059] For any edge in the real-scene fusion model, if the edge is located on the triangular facet corresponding to the road, the importance of the edge is the retention coefficient; otherwise, the importance of the edge is the ratio of the retention coefficient to the shortest distance. It should be noted that the smaller the shortest distance, the closer the edge is to the road, the more likely it is to affect the realism of driving, and the more it should be retained; conversely, the farther the edge is from the road, the more likely it is located on the roof of a distant building or in the background, and the less impact it has on the driving experience. It can be prioritized for collapse to improve the rendering efficiency of the scene. The shortest distance is used to assess whether the edge is likely to be noticed during simulated driving. The greater the importance, the more likely the edge is to be a key area in the model, and the greater its impact on the realism of driving experience, the more it should be retained.
[0060] Whether an edge needs to be collapsed is determined by its collapse cost. Therefore, based on importance, the reality fusion model is lightweighted, specifically as follows: The importance is used as the folding cost of each edge, and the Quadric Error Metrics (QEM) algorithm is used to fold the edges to simplify the reality fusion model, thereby improving the rendering speed of the model and enhancing the realism of the simulated driving experience. It should be noted that the folding simplification level of the quadratic error measure algorithm is set to 40%, which means reducing the number of triangular facets by 40%. The quadratic error measure algorithm is a well-known technique and will not be described in detail here.
[0061] Secondly, dynamic traffic flow that conforms to real-world traffic rules is added to the static, lightweight real-world fusion model. Specifically: By configuring a virtual traffic environment using Vissim software, including the number of lanes, speed limits, traffic light timing and location, and vehicle types (the ratio of cars, trucks, and buses), dynamic traffic flow is generated. This simulates the trajectory data of a large number of virtual vehicles driving on the road. The virtual roads in Vissim software are mapped to the roads in the reality fusion model, and the driving trajectories of virtual vehicles are rendered in real time in the reality fusion model to ensure the realism and visual effect of the simulated driving.
[0062] It should be noted that Vissim software is a well-known technology and will not be described in detail here.
[0063] It should be understood that, although Figure 1 The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order in which these steps are executed, and they can be performed in other orders. Figure 1At least some of the steps in the process may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.
[0064] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0065] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application. Therefore, any simple modifications, equivalent changes, and alterations made to the above embodiments based on the technical essence of this application, without departing from the content of the technical solution of this application, shall fall within the protection scope of the technical solution of this application.
Claims
1. A three-dimensional simulation method for road traffic flow that integrates real-world scenarios, characterized in that, The method includes the following steps: For the area where the target road is located, a three-dimensional geometric model is constructed using point cloud data generated by LiDAR technology, and a three-dimensional scene model is constructed using image data acquired by oblique photogrammetry technology. The two models are then fused to obtain a real-scene fusion model. The road area is identified from the point cloud data, and the triangular facets corresponding to the road are marked in the real-scene fusion model. Analyze the length of the edges connected to each vertex of the triangular facet in the real scene fusion model, as well as the distance from each vertex to its local region, evaluate the geometric saliency of the local region where the vertex is located, and calculate the first evaluation value of each vertex. For each edge in the real-scene fusion model, all edges in the neighborhood are filtered based on the difference in color information of the two triangular faces adjacent to different edges in the neighborhood. Based on the connectivity of each edge and all the filtered edges in the neighborhood, the continuity of the color boundary of the edge is evaluated, the second evaluation value of each edge is calculated, and the retention coefficient of each edge is obtained by combining the first evaluation value of the vertices connected to each edge. Based on the information of the triangular facets corresponding to each edge on the road, combined with the retention coefficient of each edge and its distance from the road area, the importance of each edge is calculated. The edge folding simplification algorithm is used to simplify the real scene fusion model, and dynamic traffic flow is introduced into the simplified real scene fusion model. The calculation of the first evaluation value for each vertex includes: For each triangular facet in the reality fusion model, the average length of all edges connected to any vertex is taken as the local length of that vertex. All triangular faces containing any of the given vertices are denoted as common faces; plane fitting is performed on all vertices on all common faces corresponding to any given vertex, and the distance from any given vertex to the fitted plane is calculated as the relative distance; Calculate the ratio of the relative distance to the local length, and denot it as the relative ratio; If the number of common faces corresponding to any vertex is not 1, the first evaluation value of any vertex is the relative comparison; otherwise, the first evaluation value of any vertex is the result of positive mapping of the relative comparison. The calculation of the second evaluation value for each edge includes: For any given edge and all vertices connected to it, construct an undirected graph. Starting from the given edge, perform graph traversal to obtain a maximal connected subgraph containing the given edge. The second evaluation value is positively correlated with the number of all edges in a maximally connected subgraph and negatively correlated with the number of all edges in an undirected graph; The retention coefficient for each edge is obtained by: Calculate the average of the first evaluation values of the two vertices connected by each edge in the reality fusion model; The retention coefficient is the product of the result of positive mapping of the second evaluation value and the average value.
2. The method for 3D simulation of road traffic flow integrating real-world scenes as described in claim 1, characterized in that, The step of identifying road regions from point cloud data includes: extracting all ground point clouds from the point cloud data, performing planar fitting on all ground point clouds, projecting each fitted plane onto the XOY plane, calculating the area of the minimum bounding rectangle of the region where each fitted plane is projected, and recording it as the projected area; obtaining the segmentation threshold corresponding to the projected area of all fitted planes, and recording the fitted planes whose projected area is greater than the segmentation threshold as road fitted surfaces.
3. The method for 3D simulation of road traffic flow integrating real-world scenes as described in claim 2, characterized in that, The step of marking the triangular facets corresponding to roads in the reality fusion model includes: mapping the road fitting surface in the three-dimensional geometric model to the reality fusion model, and marking the triangular facets located in the road fitting surface as the triangular facets corresponding to the roads.
4. The method for 3D simulation of road traffic flow integrating real-world scenes as described in claim 1, characterized in that, The filtering of all edges within the neighborhood includes: For the reality fusion model, the average color data of all 3D points located on all edges in each triangular facet under the same color channel is used as the color vector of each triangular facet; the difference between the color vectors of two triangular facets connected to each edge in the reality fusion model is calculated as the color difference. Obtain the center point of any edge and the segmentation threshold of the color difference of all edges in its neighborhood. Select the edges whose color difference in the neighborhood is greater than or equal to the segmentation threshold and record them as the edges to be tested.
5. The method for 3D simulation of road traffic flow integrating real-world scenes as described in claim 4, characterized in that, The color difference is the distance between the color vectors of the two triangular faces connected to each edge in the real-scene fusion model.
6. The method for 3D simulation of road traffic flow integrating real-world scenes as described in claim 1, characterized in that, The simplification of the real-scene fusion model includes: using the importance as the folding cost of each edge, and performing edge folding using a quadratic error measure algorithm.
Citation Information
Patent Citations
Unmanned aerial vehicle oblique photogrammetry data intelligent processing method and system
CN120599502A
Real scene three-dimensional modeling method based on oblique photography and laser point cloud multi-source aerial triangulation fusion
CN121982258A