Drainage pipe network live-action three-dimensional simulation method, device and equipment and storage medium
Through multi-dimensional modeling technology of pipes, water bodies and inner walls, the problem that traditional technology cannot intuitively display the three-dimensional structure of drainage pipes is solved, efficient three-dimensional visualization and refined data quantification are achieved, and the accuracy and real-time performance of drainage pipe network modeling are improved. sex.
Patent Information
- Application Number
- CN202410773195.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-14
- Publication Date
- 2024-10-01
AI Technical Summary
Traditional two-dimensional or three-dimensional visualization technology cannot intuitively display the three-dimensional structure and spatial relationship of drainage pipes, resulting in low efficiency in urban facilities, maintenance and emergency response. The existing three-dimensional modeling method of drainage pipe network cannot quantify pipe defects and does not Consider modeling observations from multiple perspectives.
Through pipeline modeling, water body modeling and inner wall modeling, combined with texture mapping, mesh deformation and structured light 3D reconstruction technology, a real-life 3D model of the drainage pipe network is established to achieve refined modeling and multi-viewing of pipes, water bodies and inner walls. Observation to improve the real-time performance and accuracy of 3D visualization.
It realizes automatic updating of the model according to the actual situation, improves the interactivity between real data and virtual models, enhances the visualization effect of the 3D model, makes the subtle defects of the pipeline more intuitively visible, and performs refined 3D data quantification.
Smart Images

Figure CN118736157A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of three-dimensional modeling technology, and in particular to a method, device, equipment and storage medium for real-scene three-dimensional simulation of a drainage network. Background Art
[0002] With the acceleration of urbanization, underground drainage pipe systems are becoming more and more complex, and effective management and maintenance are essential. The design of the drainage system directly affects the appearance of the city and the quality of life of residents. Traditional 2D or 3D visualization technology cannot intuitively display the 3D structure and spatial relationship of drainage pipes, resulting in low efficiency in urban facilities, maintenance and emergency response.
[0003] At present, the methods that can realize the 3D modeling of drainage pipe networks mainly include: using pipe attribute information to establish a structure model, and establishing a pipe model based on the nodes and node connection information on the structure model; or using a laser scanning device to obtain point cloud data, splicing the point cloud based on the data, obtaining a texture map, rendering, and obtaining a 3D model. These methods can realize the modeling of drainage pipe networks, but they cannot quantify pipe defects and do not consider the modeling observation conditions under multiple perspectives.
[0004] How to improve the accuracy of drainage network modeling, observe the drainage network model from multiple perspectives, and improve the real-time performance of three-dimensional visualization is an urgent problem to be solved by the present invention. Summary of the invention
[0005] The present application provides a method, device, equipment and storage medium for real-life three-dimensional simulation of a drainage network, which is used to improve the accuracy of drainage network modeling, observe the drainage network model from multiple perspectives, and improve the real-time performance of three-dimensional visualization.
[0006] In a first aspect, the present application provides a method for 3D simulation of a real-life drainage network, the method comprising:
[0007] According to the 3D modeling parameter information of the nodes and pipelines of the drainage network, a 3D model of the pipelines of the drainage network is obtained through pipeline modeling and surface mapping;
[0008] According to the monitoring parameter information of the water body object and the vector file after the water body object is cut and meshed, the three-dimensional water model of the drainage network is obtained through texture mapping and mesh deformation;
[0009] According to the deformed fringe pattern projected onto the inner wall of the drainage pipe network, a three-dimensional model of the inner wall of the drainage pipe network is obtained through structured light three-dimensional reconstruction;
[0010] According to the pipeline 3D model, the water body 3D model and the inner wall 3D model, a real-life 3D model of the drainage network is obtained; wherein, in the real-life 3D model, the water body 3D model is located inside the pipeline 3D model, and the inner wall 3D model is located between the pipeline 3D model and the water body 3D model.
[0011] In a possible design, the drainage network includes multiple nodes, and the 3D modeling parameter information includes: the spatial position and type of each node; two interconnected nodes are connected by pipelines, and the 3D modeling parameter information also includes: the length, diameter and material of each pipeline;
[0012] According to the 3D modeling parameter information of the nodes and pipelines of the drainage network, the 3D model of the pipeline of the drainage network is obtained through pipeline modeling and surface mapping, including:
[0013] According to the spatial position and type of each node, as well as the length and diameter of each pipeline, the first pipeline model of the drainage network is obtained;
[0014] The first pipe model is smoothed to obtain a second pipe model of the drainage pipe network;
[0015] According to the material of each pipe, the second pipe model is surface mapped to obtain a three-dimensional pipe model of the drainage network.
[0016] In one possible design, according to the spatial position and type of each node, and the length and diameter of each pipeline, a first pipeline model of the drainage network is obtained, including:
[0017] According to the spatial position and type of each node, the model reference point corresponding to each node is constructed one by one through the topological structure construction algorithm;
[0018] According to the length and diameter of each pipeline, a pipeline model component corresponding to each pipeline is constructed; wherein each pipeline model component is cylindrical;
[0019] According to the connection relationship between multiple pipelines, each pipeline model component is translated and rotated respectively to obtain the first pipeline model of the drainage network; wherein the top surface center and the bottom surface center of each pipeline model component coincide with a model reference point.
[0020] In a possible design, the first reference point of the model is a model reference point constructed according to the first node, and the first node is any one of the plurality of nodes; the first node is arranged with a target multi-pass elbow, and the type of the first node is used to indicate the number and direction of the elbow openings of the target multi-pass elbow;
[0021] The second node is a node interconnected with the first node. When constructing the second reference point of the model corresponding to the second node, the model reference points corresponding to each node are constructed one by one through the topological structure construction algorithm according to the spatial position and type of each node, including:
[0022] Taking the first reference point of the model as the starting point, constructing at least one model auxiliary ray according to the direction of the elbow opening of the target multi-pass elbow; wherein the number of the at least one model auxiliary ray is the same as the number of the elbow openings of the target multi-pass elbow;
[0023] According to the spatial positions of the first node and the second node, a relative node position of the second node relative to the first node is obtained;
[0024] A second reference point of the model is constructed according to the relative positions of the nodes and at least one model auxiliary ray.
[0025] In a possible design, the first pipe model is smoothed to obtain a second pipe model of the drainage network, including:
[0026] According to the connection relationship between the multiple pipelines, multiple connection parts of the first pipeline model are obtained; wherein each connection part refers to a part where multiple pipeline model components are connected to each other;
[0027] A pipe bend model component corresponding to the multi-pass pipe bend is constructed at each connection part; wherein the number of pipe bend openings of each pipe bend model component is the same as the number of multiple pipe model components connected to each other at the corresponding connection part; and the diameter of the pipe bend opening of each pipe bend model component is the same as the diameter of the corresponding pipe model component;
[0028] According to the first pipe model and the elbow model components located at each connecting part, a second pipe model of the drainage pipe network is obtained.
[0029] In a possible design, according to the material of each pipe, the second pipe model is surface mapped to obtain a three-dimensional pipe model of the drainage network, including:
[0030] Perform two-dimensional texture unfolding on the second pipeline model;
[0031] According to the material of each pipe, the texture image corresponding to each material is mapped on the second pipe model after the two-dimensional texture is expanded to obtain the three-dimensional pipe model of the drainage pipe network.
[0032] In a possible design, the drainage pipe network is arranged with a plurality of water level sensors and a plurality of water quality sensors; the monitoring parameter information includes: water level information and water quality information of the water body object;
[0033] According to the monitoring parameter information of the water body object, as well as the vector file after the water body object is cut and meshed, the three-dimensional water model of the drainage network is obtained through texture mapping and mesh deformation, including:
[0034] According to the geographical location, the vector file of the water body object is cut into sections, and the vector file after the section cutting is processed into a triangular mesh;
[0035] According to the water level information and water quality information of the water object, as well as the vector file after the cross-section cutting and triangulation of the water object, a three-dimensional water model of the drainage pipe network is obtained through texture mapping and mesh deformation; wherein, texture mapping and mesh deformation are used to jointly display the effect information of the water object; the effect information includes: reflection, refraction and filtering effects of the water object;
[0036] Among them, water level information and water quality information are both dynamic; the three-dimensional model of the water body is a dynamic three-dimensional model; the water quality information is displayed according to the color depth of the three-dimensional model of the water body.
[0037] In one possible design, the drainage network is arranged with projectors and cameras;
[0038] According to the deformed fringe pattern projected onto the inner wall of the drainage network, a three-dimensional model of the inner wall of the drainage network is obtained through structured light three-dimensional reconstruction, including:
[0039] Controlling the projector to project the fringe pattern onto the inner wall of the pipe of the drainage network, and simultaneously controlling the camera to photograph the fringe pattern that is deformed due to being projected onto the inner wall of the pipe of the drainage network;
[0040] According to the deformed fringe pattern, the three-dimensional model of the inner wall of the drainage network is obtained through structured light three-dimensional reconstruction.
[0041] In a possible design, based on the deformed fringe pattern, a three-dimensional model of the inner wall of the drainage network is obtained through structured light three-dimensional reconstruction, including:
[0042] According to the deformed fringe pattern, the absolute phase of each pixel point of the deformed fringe pattern is calculated;
[0043] According to the absolute phase of each pixel point, the matching relationship between the projector and the camera is obtained, and the three-dimensional point cloud inside the pipeline is reconstructed through the triangulation reconstruction method to obtain the three-dimensional point cloud.
[0044] The three-dimensional point cloud is spliced by iterative nearest point point cloud registration algorithm to obtain the three-dimensional model of the inner wall of the drainage pipe network.
[0045] In a possible design, after obtaining a real-life 3D model of the drainage network based on the 3D pipeline model, the 3D water body model and the 3D inner wall model, the method further includes:
[0046] When receiving the model display instruction, the environment control operation is performed on the real scene 3D model according to the model display instruction, including:
[0047] According to the near view plane and far view plane of the roaming, the real scene 3D model is removed from the view area;
[0048] Perform occlusion culling on the real-scene 3D model after view culling;
[0049] Through the lighting acceleration algorithm, the real-life 3D model after view culling and occlusion culling is rendered, and the rendering results are displayed;
[0050] Among them, the environmental control operations include: roaming, zooming, translation and potential angle transformation, transparency adjustment, transparency adjustment is used to adjust the transparency of at least one of the pipeline three-dimensional model, water body three-dimensional model and inner wall three-dimensional model; the real-scene three-dimensional model is equipped with collision monitoring.
[0051] In a second aspect, the present application provides a real-scene three-dimensional simulation device for a drainage network, comprising:
[0052] The pipeline modeling module is used to obtain the three-dimensional model of the pipeline of the drainage network through pipeline modeling and surface mapping according to the three-dimensional modeling parameter information of the nodes and pipelines of the drainage network;
[0053] The water body modeling module is used to obtain the three-dimensional water body model of the drainage network through texture mapping and mesh deformation based on the monitoring parameter information of the water body object and the vector file after the water body object is cut and meshed;
[0054] The inner wall modeling module is used to obtain a three-dimensional model of the inner wall of the drainage network through structured light three-dimensional reconstruction based on the deformed fringe pattern projected on the inner wall of the pipe of the drainage network;
[0055] The result module is used to obtain a real-life 3D model of the drainage network based on the pipeline 3D model, the water body 3D model and the inner wall 3D model; wherein, in the real-life 3D model, the water body 3D model is located inside the pipeline 3D model, and the inner wall 3D model is located between the pipeline 3D model and the water body 3D model.
[0056] In a third aspect, the present application provides an electronic device, comprising: a processor, and a memory communicatively connected to the processor;
[0057] Memory stores computer-executable instructions;
[0058] The processor executes the computer execution instructions stored in the memory to implement a real-scene three-dimensional simulation method for a drainage network according to the first aspect of the invention.
[0059] In a fourth aspect, the present application provides a computer-readable storage medium, in which computer execution instructions are stored. When the computer execution instructions are executed by a processor, a method for three-dimensional simulation of a real-life drainage network is used to implement the invention content of the first aspect.
[0060] In a fifth aspect, the present application provides a computer program product, including: a computer program, which, when executed by a processor, is used to implement a method for three-dimensional simulation of a real-life drainage network according to the invention content of the first aspect.
[0061] The present application provides a method, device, equipment and storage medium for real-life 3D simulation of a drainage network. According to the 3D modeling parameter information of the nodes and pipelines of the drainage network, a 3D model of the pipeline of the drainage network is obtained through pipeline modeling and surface mapping; according to the monitoring parameter information of the water object and the vector file after the water object is cut and meshed, a 3D model of the water body of the drainage network is obtained through texture mapping and mesh deformation; according to the deformed fringe pattern projected onto the inner wall of the pipeline of the drainage network, a 3D model of the inner wall of the drainage network is obtained through structured light 3D reconstruction; according to the 3D pipeline model, the 3D water body model and the 3D inner wall model, a real-life 3D model of the drainage network is obtained; wherein, in the real-life 3D model, the 3D water body model is located inside the 3D pipeline model, and the 3D inner wall model is located between the 3D pipeline model and the 3D water body model. The following technical effects are achieved: a model is established through parameter information, in which the parameter information is a variable parameter, so as to achieve the purpose of automatically updating the model according to the actual situation and improve the interactivity between the real data and the virtual model; the vector file of the water object is cut and meshed, and the three-dimensional water model of the drainage network is obtained through texture mapping and mesh deformation. The water body is modeled by a method different from pipeline modeling, and the information of the internal water body model can be observed in real time, which improves the visualization effect of the three-dimensional model and makes it easier to observe subtle defects in the pipeline; the inner wall of the pipeline is modeled so that the pipeline defects can be observed from an internal perspective, which is more intuitive and visible, and achieves refined three-dimensional data quantification. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0063] Figure 1 A framework diagram of an application scenario of the real-scene three-dimensional simulation method of a drainage network provided in an embodiment of the present application;
[0064] Figure 2Schematic diagram of the process of the real-life three-dimensional simulation method of the drainage network provided in the embodiment of the present application Figure 1 ;
[0065] Figure 3 Schematic diagram of the process of the real-life three-dimensional simulation method of the drainage network provided in the embodiment of the present application Figure 2 ;
[0066] Figure 4 is the target multi-pass elbow opening direction diagram provided in the embodiment of the present application;
[0067] Figure 5 Schematic diagram of the process of the real-life three-dimensional simulation method of the drainage network provided in the embodiment of the present application Figure 3 ;
[0068] Figure 6 Schematic diagram of the process of the real-life three-dimensional simulation method of the drainage network provided in the embodiment of the present application Figure 4 ;
[0069] Figure 7 This is a schematic diagram of view culling;
[0070] Figure 8 This is a schematic diagram of occlusion culling;
[0071] Fig. 9 A schematic diagram of the structure of a real-life three-dimensional simulation device for a drainage network provided in an embodiment of the present application;
[0072] Fig.10 A schematic diagram of the structure of the electronic device hardware provided in an embodiment of the present application.
[0073] Reference numerals:
[0074] 100-computer server; 110-drainage pipe; 120-projector; 130-industrial camera;
[0075] 200-drainage network real-life three-dimensional simulation device; 210-pipeline modeling module; 220-water body modeling module; 230-inner wall modeling module; 240-result module;
[0076] 300 - electronic device; 310 - processor; 320 - memory; 330 - communication component; 340 - bus. DETAILED DESCRIPTION
[0077] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0078] In the embodiments of the present application, words such as "first" and "second" are used to distinguish the same or similar items with basically the same functions and effects. Those skilled in the art will understand that words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not necessarily limit the difference. It should be noted that in the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplary" or "for example" in the present application should not be interpreted as being more preferred or more advantageous than other embodiments or design schemes. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way. In the embodiments of the present application, "at least one" refers to one or more, and "more" refers to two or more.
[0079] It should be noted that the "at..." in the embodiments of the present application can be the instant when a certain situation occurs, or it can be a period of time after a certain situation occurs, and the embodiments of the present application do not specifically limit this. In addition, the real-scene 3D simulation method of the drainage network provided in the embodiments of the present application is only an example, and the real-scene 3D simulation method of the drainage network can also include more or less content.
[0080] In order to clearly describe the technical solutions of the embodiments of the present application, some terms and technologies involved in the embodiments of the present application are briefly introduced below:
[0081] Drainage network: The drainage network is a complex pipe system, usually made of plastic, metal or concrete, responsible for collecting and transporting domestic sewage, industrial wastewater and rainwater. This system consists of a series of interconnected pipes, ditches, pumping stations, inspection wells, sewage treatment facilities, etc., designed to ensure the effective operation of urban drainage and prevent flooding and water pollution problems.
[0082] View culling: is a graphics rendering optimization technique widely used in 3D computer graphics and video games. Its purpose is to improve rendering efficiency and reduce unnecessary computing and rendering workload. In a 3D scene, since the camera (or viewpoint) can only see part of the scene, and most objects may be outside the camera's field of view, view culling is the process of identifying and excluding these objects or primitives that are not in the field of view.
[0083] Texture mapping: Texture mapping is a core technology in computer graphics, which is used to enhance the details and realism of the surface of 3D models. By mapping a two-dimensional image (texture) to the surface of a 3D model, the model not only has a geometric shape, but also has rich surface features such as color, pattern, bumps, reflective properties, etc.
[0084] Mesh deformation: is a computer graphics technique used to change the position of vertices on the surface or inside of a 3D model to achieve the change of the object's shape. It is widely used in animation, game development, virtual reality, movie special effects, and various interactive applications to create dynamic or responsive content. Mesh deformation allows developers or artists to manipulate the shape of the model in real time or non-real time to achieve various visual effects or physical simulations without changing the underlying mesh topology.
[0085] Iterative closest point point cloud registration algorithm: It is a point cloud registration technology widely used in computer vision, robot navigation, medical imaging and 3D reconstruction. Its purpose is to estimate the optimal rigid body transformation (including rotation and translation) between two 3D point clouds so that one point cloud can be aligned to another point cloud, thereby achieving accurate matching of point cloud data.
[0086] Triangulation reconstruction method: It is a commonly used 3D reconstruction technique, mainly used to recover information of points or surfaces in 3D space from 2D images. This method is based on geometric principles, especially the concept of triangulation to determine the position of spatial points.
[0087] Structured light 3D reconstruction: is a 3D scanning and measurement technology based on optical principles. It uses a projection device (such as a projector) to emit a specific pattern of structured light (such as stripes, dots, grid patterns, etc.) to the surface of the object being measured, and uses one or more cameras to capture the deformation or distribution of these light patterns on the surface of the object, and then calculates the 3D geometric information of the object's surface.
[0088] Rigid body transformation: refers to a specific type of transformation performed on a geometric object in three-dimensional space, which keeps the shape, size and internal relative position of the object unchanged.
[0089] With the acceleration of urbanization, underground drainage pipe systems are becoming more and more complex, and effective management and maintenance are essential. Traditional two-dimensional or three-dimensional visualization technology cannot intuitively display the three-dimensional structure and spatial relationship of drainage pipes, resulting in low efficiency in urban facilities, maintenance and emergency response. Today's three-dimensional modeling and simulation of drainage pipe networks are implemented in the following ways:
[0090] For example, a three-dimensional pipeline modeling method includes:
[0091] First, obtain the pipeline attribute information of the pipeline model to be established input by the user;
[0092] Secondly, the pipeline nodes determined by the user on the structure model for establishing the pipeline model and the connection information of each pipeline node set by the user are obtained, wherein the pipeline nodes include: pipeline starting point, pipeline end point and pipeline path key point;
[0093] Finally, a pipeline model to be established is generated according to pipeline attribute information, pipeline nodes and connection information.
[0094] There are other modeling methods in the prior art, including:
[0095] First, use a 3D laser scanning device to obtain point cloud data of the construction site, use a SLR camera to obtain texture data, and process the point cloud data to obtain the result data;
[0096] Secondly, based on the results data, pipeline modeling is performed, and then the pipeline modeling is spliced with the texture data to obtain a texture map.
[0097] Finally, the texture map is rendered to obtain the texture map.
[0098] With the acceleration of urbanization, underground drainage pipe systems are becoming more and more complex. Such methods can achieve the modeling of drainage pipe networks, but they do not consider a variety of possible observation situations. The existing drainage pipe network modeling methods have the following technical problems:
[0099] First, only the connection relationship between pipeline network data and pipeline network data is used for modeling, which results in a single perspective and complex operation, which is not conducive to observation from multiple perspectives.
[0100] Secondly, modeling through 3D point cloud is still fixed to the 3D display of the outside of the pipeline, without considering the conditions inside the pipeline and the internal water body. It is impossible to further display detailed textures or even quantify pipeline defects. There is no visual modeling of the water quality and quantity of the internal water body, and it is impossible to judge the internal water body conditions.
[0101] How to improve the accuracy of drainage network modeling, observe the drainage network model from multiple perspectives, and improve the real-time performance of three-dimensional visualization is an urgent problem to be solved by the present invention.
[0102] Based on this, the embodiments of the present application provide a drainage network real-scene three-dimensional simulation method, device, equipment and storage medium, which can be used in the field of three-dimensional modeling technology, aiming to solve the above technical problems of the prior art.
[0103] Figure 1This is an application scenario framework diagram of the drainage network real-scene 3D simulation method provided in the embodiment of the present application. The application scenario framework diagram can be used in the various application scenarios described below, and can also be used in other application scenarios not specified.
[0104] like Figure 1 As shown, Figure 1 The computer server 100, the drainage pipe 110, the projector 120, and the industrial camera 130 are included. The projector 120 and the industrial camera 130 shown in the figure can be set on the drainage pipe 110 to be measured, or the measurement can be implemented by an external device. For the convenience of distinction, the projector 120, the industrial camera 130 and the drainage pipe 110 are shown separately. The projector 120 and the industrial camera 130 shown in the figure are both projecting and photographing the inner wall of the drainage pipe 110.
[0105] When the projector 120 starts to project the fringe pattern, the projector 120 synchronously sends a high-level pulse which is received by the industrial camera 130, so that the industrial camera 130 can synchronously take pictures. When the projector 120 projects the designed fringe pattern onto the inner wall of the drainage pipe 110, the fringe pattern is deformed after being modulated by the height of the inner wall surface of the drainage pipe 110. The industrial camera 130 synchronously receives the modulated fringe pattern; then, the corresponding phase principal values are respectively solved according to the modulated low-frequency and high-frequency phase diagrams, and finally the final absolute phase is calculated;
[0106] After obtaining the absolute phase, the computer server 100 calculates the matching relationship between the projector 120 and the industrial camera 130 for any pixel point of the industrial camera 130, reconstructs the three-dimensional point cloud using the triangulation reconstruction method, and then splices the three-dimensional point cloud to obtain the three-dimensional model of the inner wall of the drainage network. In addition, the computer server 100 establishes the three-dimensional model of the pipes of the drainage network and the three-dimensional model of the water body of the drainage network.
[0107] Figure 2 Schematic diagram of the process of the real-life three-dimensional simulation method of the drainage network provided in the embodiment of the present application Figure 1 .like Figure 2 As shown, the method includes:
[0108] S101. According to the three-dimensional modeling parameter information of the nodes and pipelines of the drainage network, a three-dimensional model of the pipelines of the drainage network is obtained through pipeline modeling and surface mapping.
[0109] Specifically, according to the parameter information of the nodes and pipelines of the drainage network, pipeline modeling is carried out, and then surface mapping is performed to simulate the color and texture of the pipeline surface to obtain a three-dimensional model of the pipeline of the drainage network.
[0110] S102, obtaining a three-dimensional water model of the drainage network through texture mapping and mesh deformation according to the monitoring parameter information of the water object and the vector file after the water object is cut and meshed.
[0111] Specifically, the vector file depicting the shape of the water object is cut according to the geographical location, meshed, and exported to a suitable format; a water effect shader is established by simulating the principle of water flow through texture mapping and mesh deformation methods, and the properties of the water material are set to reflect the water condition, thereby obtaining a three-dimensional water model of the drainage network.
[0112] S103 , obtaining a three-dimensional model of the inner wall of the drainage network by three-dimensional reconstruction of the structured light according to the deformed fringe pattern projected onto the inner wall of the pipe of the drainage network.
[0113] Specifically, the object is projected with light from a projector and deformed, resulting in a deformed fringe pattern. The 3D model of the inner wall of the drainage network is then obtained through structured light 3D reconstruction.
[0114] S104: Obtain a real-scene three-dimensional model of the drainage network according to the three-dimensional pipeline model, the three-dimensional water body model and the three-dimensional inner wall model.
[0115] Among them, in the real-scene three-dimensional model, the water body three-dimensional model is located inside the pipeline three-dimensional model, and the inner wall three-dimensional model is located between the pipeline three-dimensional model and the water body three-dimensional model.
[0116] Specifically, in the real-scene three-dimensional model, the pipeline three-dimensional model is outside, the water body three-dimensional model is inside the pipeline, and the inner wall three-dimensional model is between the three-dimensional model and the water body three-dimensional model.
[0117] The present application provides a method for 3D simulation of a drainage network in real life. The method obtains a 3D model of the drainage network through pipeline modeling and surface mapping according to the 3D modeling parameter information of the nodes and pipelines of the drainage network; obtains a 3D model of the water body of the drainage network through texture mapping and mesh deformation according to the monitoring parameter information of the water object and the vector file after the water object is cut and meshed; obtains a 3D model of the inner wall of the drainage network through structured light 3D reconstruction according to a fringe pattern deformed by being projected onto the inner wall of the pipe of the drainage network; obtains a real-life 3D model of the drainage network according to the 3D model of the pipe, the 3D model of the water and the 3D model of the inner wall; wherein, in the real-life 3D model, the 3D model of the water is located inside the 3D model of the pipe, and the 3D model of the inner wall is located between the 3D model of the pipe and the 3D model of the water. The following technical effects are achieved: a model is established through parameter information, in which the parameter information is a variable parameter, so as to achieve the purpose of automatically updating the model according to the actual situation and improve the interactivity between the real data and the virtual model; the vector file of the water object is cut and meshed, and the three-dimensional water model of the drainage network is obtained through texture mapping and mesh deformation. The water body is modeled by a method different from pipeline modeling, and the information of the internal water body model can be observed in real time, which improves the visualization effect of the three-dimensional model and makes it easier to observe subtle defects in the pipeline; the inner wall of the pipeline is modeled so that the pipeline defects can be observed from an internal perspective, which is more intuitive and visible, and achieves refined three-dimensional data quantification.
[0118] Figure 3 Schematic diagram of the process of the real-life three-dimensional simulation method of the drainage network provided in the embodiment of the present application Figure 2 In this embodiment Figure 2 Based on the embodiment, the process of modeling the three-dimensional pipe model of the drainage network in the three-dimensional simulation method of the drainage network is described in detail. Figure 3 As shown, this embodiment provides a method for 3D simulation of a drainage network, including:
[0119] The drainage network includes multiple nodes, and the three-dimensional modeling parameter information includes: the spatial position and type of each node; if two interconnected nodes are connected by pipelines, the three-dimensional modeling parameter information also includes: the length, diameter and material of each pipeline.
[0120] The first reference point of the model is a model reference point constructed based on the first node, and the first node is any one of multiple nodes; the first node is arranged with a target multi-way elbow, and the type of the first node is used to indicate the number and direction of the elbow openings of the target multi-way elbow; the second node is a node interconnected with the first node, and the second reference point of the model corresponding to the second node is constructed.
[0121] S201, taking the first reference point of the model as a starting point, and constructing at least one model auxiliary ray according to the direction of the elbow opening of the target multi-pass elbow.
[0122] wherein the number of at least one model auxiliary ray is the same as the number of elbow openings of the target multi-pass elbow;
[0123] Specifically, the first node is placed in the extension direction allowed by the node and stored as the first reference point of the model, and a model auxiliary ray is constructed according to the direction of the target multi-pass elbow opening;
[0124] in, Figure 4 : is a target multi-way elbow opening direction diagram provided in the embodiment of the present application. Figure 4 As shown in the figure, from left to right, they can be divided into elbow nodes, T-nodes, and cross nodes. Among them, the number of extensions of the elbow node is 2, and the extension direction is any non-zero angle; the number of extensions of the T-node is 3, and the extension directions are mutually perpendicular; the number of extensions of the cross node is 4, and its extension directions are mutually perpendicular.
[0125] S202: Obtain a node relative position of the second node relative to the first node according to respective spatial positions of the first node and the second node.
[0126] Specifically, after the first node is added to the storage, the second node is added to the allowed extension direction and then stored to obtain the node relative position of the second node relative to the first node.
[0127] S203: Construct a second reference point of the model according to the relative positions of the nodes and at least one model auxiliary ray.
[0128] Specifically, the second reference point of the model is constructed according to the relative positions of the nodes and the auxiliary rays of the model, and all the nodes are added according to this process. After all the nodes are added, the length extension pipelines are selected in turn in the remaining extension directions.
[0129] S204: Construct a pipeline model component corresponding to each pipeline according to the length and diameter of each pipeline.
[0130] Among them, each pipeline model component is cylindrical.
[0131] Specifically, according to the length and diameter of each pipeline, a cylinder function in the OpenGL (full name Open Graphics Library) library is used to create a cylinder to obtain a pipeline model component.
[0132] S205, according to the connection relationship between the multiple pipelines, translate and rotate each pipeline model component respectively to obtain a first pipeline model of the drainage network;
[0133] The top and bottom center of each pipeline model component coincide with a model reference point;
[0134] Specifically, according to the connection relationship between multiple pipelines, each pipeline model component is translated and rotated at a certain angle to obtain the first pipeline model of the drainage network; wherein, the top surface center and the bottom surface center of each pipeline model component coincide with the model reference point, ensuring that the pipeline model component is established in the direction of node storage.
[0135] The position of the node is calculated by the coordinates of each node to obtain the translation parameters and rotation angle parameters. The translation parameters are calculated by the position of each node, and the rotation angle is calculated by the coordinates of each node.
[0136] For the convenience of explanation, two nodes a and b are introduced here;
[0137] Translation: Translation is to add the translation amount in the corresponding direction to the original three-dimensional coordinate point. The calculation method is as follows. Taking point a as an example,
[0138]
[0139] Among them, T X 、T Y 、T Z It is the translation amount of each coordinate axis in the corresponding direction of point a.
[0140] Rotation: Rotation is to rotate around each coordinate axis by a certain angle. The calculation method of the rotation angle is
[0141]
[0142] Among them, a x 、a y 、a z 、b x 、b y 、b z are the coordinate values corresponding to point a and point b respectively.
[0143] S206, according to the connection relationship between the multiple pipelines, multiple connection parts of the first pipeline model are obtained. The first pipeline model is smoothed to obtain the second pipeline model of the drainage network. The first drainage pipeline model is smoothed to obtain the second pipeline model of the drainage network.
[0144] Each connection portion refers to a portion where multiple pipeline model components are connected to each other.
[0145] Specifically, based on the connection relationship between the multiple pipes, the parts that need to be connected in the first pipe model of the drainage pipe network are obtained.
[0146] S207, constructing a bend pipe model component corresponding to the multi-pass bend pipe at each connection position.
[0147] The number of the bend openings of each bend model component is the same as the number of the multiple pipe model components connected to each other at the corresponding connection parts; the diameter of the bend opening of each bend model component is the same as the diameter of the corresponding pipe model component;
[0148] Specifically, a ring or a frustum with a diameter corresponding to the pipe model component is constructed at each connection position for connection, and the ring or the frustum is the bent pipe model component.
[0149] S208. Obtain a second pipe model of the drainage pipe network according to the first pipe model and the elbow model components located at each connection position.
[0150] Specifically, the second pipe model of the drainage network is obtained by connecting the elbow model component located at each connection position with the first pipe model.
[0151] S209, performing two-dimensional texture expansion on the second pipeline model;
[0152] Specifically, according to the material of each pipe, the second pipe model is surface mapped to obtain the three-dimensional model of the pipes in the drainage network. According to the material of each drainage pipe, the second pipe model is surface mapped to obtain the three-dimensional model of the pipes in the drainage network. Obtain the three-dimensional model to be mapped and the corresponding texture image, and determine the goals and requirements of the mapping, including the resolution, format and effect to be presented;
[0153] Perform UV Unwrapping on the 3D model, convert the surface geometry of the 3D model into a 2D representation, and adjust the UV layout to ensure that the texture of each part is reasonably distributed.
[0154] S210 . Mapping a texture image corresponding to each material onto the second pipe model after the two-dimensional texture is expanded according to the material of each pipe, so as to obtain a three-dimensional pipe model of the drainage pipe network.
[0155] Specifically, according to the material of each pipe, the texture image of the corresponding material is mapped onto the second pipe model after the two-dimensional texture is unfolded, and the resolution and format of the texture are adjusted to achieve a good balance between performance and quality, thereby obtaining a three-dimensional pipe model of the drainage network.
[0156] The pipe material includes a pipe surface made of steel, reinforced concrete or plastic.
[0157] S211, obtaining a real-scene three-dimensional model of the drainage network according to the three-dimensional pipeline model, the three-dimensional water body model and the three-dimensional inner wall model;
[0158] The principles of S211 and S104 are the same and will not be described in detail in this embodiment.
[0159] The present embodiment provides a method for 3D simulation of a real-life drainage network, which obtains a 3D model of the pipelines of the drainage network through pipeline modeling and surface mapping according to the 3D modeling parameter information of the nodes and pipelines of the drainage network. The following technical effects are achieved: the model is established through parameter information, wherein the parameter information is a variable parameter, so as to achieve the purpose of automatically updating the model according to the actual situation, and improve the interactivity between the real data and the virtual model; the connection of each pipeline is smoothed, so as to solve the connection problem of each pipeline in the pipeline modeling process, and make the pipeline modeling process smoother.
[0160] Figure 5 Schematic diagram of the process of the real-life three-dimensional simulation method of the drainage network provided in the embodiment of the present application Figure 3 This embodiment is Figure 2 On this basis, the process of establishing the three-dimensional model of the water body of the drainage network is described in detail, such as Figure 5 As shown, according to the monitoring parameter information of the water body object, and the vector file after the water body object is cut and meshed, the three-dimensional water model of the drainage network is obtained through texture mapping and mesh deformation. According to the monitoring parameter information of the water body object, the vector file of the water body object shape is segmented and meshed, and the three-dimensional water model of the drainage network is obtained through texture mapping and mesh deformation. The specific contents include: S301, according to the geographical location, the vector file of the water body object is cut into sections, and the vector file after the section cutting is processed into triangular mesh;
[0161] Specifically, the vector file depicting the shape of the water object is segmented according to the geographical location of each section, and further triangulated in the 3D modeling software, and then exported to the 3D development platform in a suitable format for subsequent processing.
[0162] In addition, before this step, the transparency can also be adjusted, that is, the transparency in the material parameters of the constructed three-dimensional model of the drainage pipe is set as a variable parameter to control the display of the pipe at different transparencies.
[0163] S302, obtaining a three-dimensional water model of the drainage network through texture mapping and mesh deformation according to the water level information and water quality information of the water object, as well as the vector file after the cross-section cutting and triangulation of the water object;
[0164] The texture map and mesh deformation are used to jointly display the effect information of the water object; the effect information includes: reflection, refraction and filtering effects of the water object;
[0165] The drainage network is arranged with multiple water level sensors and multiple water quality sensors; the monitoring parameter information includes: water level information and water quality information of the water body object; the water level information and water quality information are both dynamic; the water body three-dimensional model is a dynamic three-dimensional model; the water quality information is displayed according to the color depth of the water body three-dimensional model.
[0166] Specifically, based on the water level information and water quality information of the water object and the vector file after cross-section cutting and triangulation of the water object, a water effect shader is established through texture mapping and mesh deformation to reflect the reflection, refraction and ripple effect of the water surface; at the same time, the water material properties are set to reflect the wave size, reflection and refraction distortion, refraction color, ripple texture, normal map, wave speed, etc.
[0167] The water level data changes are converted into the height changes of the water body in the pipe network. Combined with the attribute data such as the diameter and burial depth of the pipe network object, the changes in the water level data and the dynamic changes in the node fullness and pipe fullness can be intuitively obtained. The water quality data is converted into the color depth changes of the water body in the pipe. Different types of pipe objects have different textures, and the transparency of the pipe can be freely adjusted, so the water quality differences of different pipe objects can be quickly and intuitively obtained through the color depth. At the same time, the water quality standard information is coupled. When the water quality data meets the standard, the pipe object will be highlighted in the three-dimensional environment, and a three-dimensional spatial distribution map of nodes and pipes that meet various water quality standards will be formed.
[0168] The embodiment of the present application provides a method for 3D simulation of real-life drainage pipe network, which obtains a 3D water model of the drainage pipe network through texture mapping and mesh deformation according to the monitoring parameter information of the water object and the vector file after cutting and meshing of the water object. The following technical effects are achieved: the vector file of the water object is cut and meshed, and the 3D water model of the drainage pipe network is obtained through texture mapping and mesh deformation. The water body is modeled by a method different from pipeline modeling, and the information of the internal water model can be observed in real time, which improves the visualization effect of the 3D model and makes it easier to observe subtle defects in the pipeline; the water level data and water quality data are represented in the form of water level height and water color depth, respectively, making the water body observation process more intuitive.
[0169] Figure 6 Schematic diagram of the process of the real-life three-dimensional simulation method of the drainage network provided in the embodiment of the present application Figure 4 This embodiment is in Figure 2 Based on this, the process of establishing the inner wall three-dimensional model of the drainage network is described in detail, such as Figure 5As shown, according to the fringe pattern projected on the inner wall of the drainage pipe network and deformed, the 3D model of the inner wall of the drainage pipe network is obtained through structured light 3D reconstruction. According to the fringe pattern projected on the inner wall of the pipe of the drainage pipe network to be drained by the projector, the phase is calculated to obtain the matching relationship between the projector and the camera, and then the 3D model of the inner wall of the drainage pipe network is obtained through structured light 3D reconstruction.
[0170] S401, controlling a projector to project a fringe pattern onto an inner wall of a pipe of a drainage network, and simultaneously controlling a camera to photograph the fringe pattern that is deformed due to being projected onto the inner wall of the pipe of the drainage network;
[0171] Specifically, a DLP (Digital Light Processing) projector using an LED light source is controlled to project the fringe pattern onto the inner wall of each pipe in the drainage network. At the same time, the projector synchronously sends high-level pulses, which are received by a high-resolution and high-frame-rate industrial camera to obtain the fringe pattern after deformation projected on the inner wall of the pipe in the drainage network.
[0172] The fringe patterns projected by the projector are all high-frequency fringe patterns. Figure 4-6 ; The last three images are not obviously alternating, they are low-frequency stripes Figure 1-3 The vertical grayscale of the fringe pattern is consistent, and the horizontal grayscale fluctuates in the shape of a sine wave. The grayscale is in the range of 0-255. The period of the three low-frequency fringe patterns is 1, and the period of the three high-frequency fringe patterns is 8. The fringe pattern intensity is expressed as
[0173]
[0174]
[0175] Among them, I1, I2, and I3 are low-frequency fringe patterns, I4, I5, and I6 are high-frequency fringe patterns, u is the column coordinate of the pixel coordinate, v is the row coordinate of the pixel coordinate, a is the background intensity of the fringe pattern, b is the intensity modulation of the fringe pattern, and width is the total number of columns of pixels in the fringe pattern.
[0176] S402, calculating the absolute phase of each pixel of the deformed fringe pattern according to the deformed fringe pattern;
[0177] Specifically, according to the deformed fringe pattern, the corresponding phase principal values are solved according to the modulated low-frequency and high-frequency phase images respectively. The calculation method is as follows:
[0178]
[0179] in, They are the low-frequency phase main value and the high-frequency phase main value respectively.
[0180] Then according to the calculation formula
[0181]
[0182] Calculate the fringe order of phase unwrapping, and then use the calculation formula
[0183]
[0184] The absolute phase of each pixel is calculated.
[0185] S403, according to the absolute phase of each pixel point, the matching relationship between the projector and the camera is obtained, and the three-dimensional point cloud inside the pipeline is reconstructed by a triangulation reconstruction method to obtain a three-dimensional point cloud.
[0186] Specifically, the absolute phase of each pixel corresponds to the number of columns in the projector pixel coordinate system; combined with the epipolar constraint method, the number of rows in the projector pixel coordinate system corresponding to each pixel of the camera can be obtained, and the matching relationship between the projector and the camera can be obtained.
[0187] The three-dimensional point cloud inside the pipeline can be reconstructed through the triangulation reconstruction method. The calculation formula is as follows:
[0188]
[0189] Where X w , Y w , Z w is the coordinate of the 3D point cloud to be reconstructed, u c 、v c 、u p 、v p are the column and row index indices of the camera and projector respectively, and the m related parameters are the homography matrix parameters of the camera and projector.
[0190] S404, stitching the three-dimensional point cloud by iterative nearest point point cloud registration algorithm to obtain a three-dimensional model of the inner wall of the drainage pipe network.
[0191] Specifically, after the binocular structured light fringe projection measurement system completes the local 3D point cloud reconstruction, an improved iterative nearest point cloud registration algorithm is used to splice the reconstructed 3D point clouds to form a complete 3D point cloud model of the pipeline.
[0192] First, input the local point cloud, select a local point cloud as the reference point cloud, and the local point cloud to be spliced as the target point cloud. According to the relationship between the local point clouds of the pipeline, set the initial transformation matrix, use the k-dimensional tree structure to segment the point cloud, and traverse the point cloud;
[0193] Secondly, according to the Euclidean distance calculation method, a certain threshold is set to remove noise point pairs and find the nearest point in the target point cloud for each point in the reference point cloud;
[0194] Thirdly, the covariance matrix and centroid offset between point clouds are calculated based on the nearest point, and the optimal rigid body transformation is calculated through singular value decomposition (SVD) to update the position of the reference point cloud;
[0195] Finally, the least squares mean error of the corresponding point pairs between the two point cloud sets is calculated. If the registration evaluation error is greater than the set threshold, the above steps are repeated for iterative calculations. If the registration evaluation error is less than the set threshold, the aligned point cloud is output, and all the above steps are repeated to complete the splicing of all local point clouds and obtain a complete pipeline 3D point cloud model.
[0196] In a possible design, when a model display instruction is received, an environmental control operation is performed on the real-scene three-dimensional model according to the model display instruction, including:
[0197] According to the near view plane and far view plane of the roaming, the real scene 3D model is removed from the view area;
[0198] Perform occlusion culling on the real-scene 3D model after view culling;
[0199] Through the lighting acceleration algorithm, the real-life 3D model after view culling and occlusion culling is rendered, and the rendering results are displayed.
[0200] Among them, the environmental control operations include: roaming, zooming, translation and potential angle transformation, transparency adjustment, transparency adjustment is used to adjust the transparency of at least one of the pipeline three-dimensional model, water body three-dimensional model and inner wall three-dimensional model; the real-scene three-dimensional model is equipped with collision monitoring.
[0201] Specifically, when a model display instruction is received, a variety of environment control operations are developed for the real-scene three-dimensional model according to the model display instruction, and the environment control operations include roaming, zooming, translation and potential angle transformation.
[0202] Among them, when receiving the roaming instruction, a collision detection function is added, that is, a collision body is set at the boundary of the object to determine whether a collision occurs with an object in the environment during the roaming process. If a collision occurs, a collision detection is performed to produce a blocking effect.
[0203] When rendering, the real-life 3D model is subjected to view culling, such as Figure 7 shown. Figure 7The diagram is a schematic diagram of field of view culling. The viewpoint is located at the top of the pyramid, FOV is the field of view, the area between the near view plane and the far view plane is the visible area, and the part outside the field of view (such as the cube in the figure) is cropped. The cropped part is ignored in subsequent processing, and the remaining reserved area (such as the cube in the figure) will become the final visible area.
[0204] Perform occlusion culling on the real-life 3D model after view culling, such as Figure 8 shown. Figure 8 This is a schematic diagram of occlusion culling. Taking the origin as the observation point, only the visible area is rendered, and the invisible area is not rendered.
[0205] Through the lighting acceleration algorithm, the real-life 3D model after view culling and occlusion culling is rendered, and the rendering results are displayed.
[0206] The present application provides a method for 3D simulation of real-life drainage network. Based on the deformed stripe pattern projected on the inner wall of the drainage network, a 3D model of the inner wall of the drainage network is obtained through structured light 3D reconstruction. The following technical effects are achieved: the inner wall of the pipeline is modeled so that pipeline defects can be observed from an internal perspective, which is more intuitive and visual, and refined 3D data quantification is achieved; the transparency of the material parameters of the pipeline is set as a variable parameter, and the control is made so that the real-time water quality and quantity in the pipeline can be observed more freely from the outside of the entire pipeline without entering the pipeline for detailed local exploration; through the field of view culling and light acceleration algorithm, the rendering process of the model is more conveniently operated, the rendering efficiency is guaranteed, the rendering complexity is reduced, and the real-time rendering of the 3D environment is improved.
[0207] The embodiment of the present invention can divide the electronic device or the main control device into functional modules according to the above method example. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing unit. The above integrated unit can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present invention is schematic and is only a logical function division. There may be other division methods in actual implementation.
[0208] Fig. 9 The structural diagram of the real-life three-dimensional simulation device for the drainage network provided in the embodiment of the present application is as follows: Fig. 9 As shown, the drainage network real-scene three-dimensional simulation device 200 includes: a pipeline modeling module 210, a water body modeling module 220, an inner wall modeling module 230, and a result module 240.
[0209] The pipeline modeling module 210 is used to obtain a three-dimensional pipeline model of the drainage network through pipeline modeling and surface mapping according to the three-dimensional modeling parameter information of the nodes and pipelines of the drainage network;
[0210] The water body modeling module 220 is used to obtain a three-dimensional water body model of the drainage network through texture mapping and mesh deformation according to the monitoring parameter information of the water body object and the vector file after the water body object is cut and meshed;
[0211] The inner wall modeling module 230 is used to obtain a three-dimensional model of the inner wall of the drainage network through structured light three-dimensional reconstruction based on the deformed fringe pattern projected onto the inner wall of the pipe of the drainage network;
[0212] The result module 240 is used to obtain a real-life three-dimensional model of the drainage network based on the pipeline three-dimensional model, the water body three-dimensional model and the inner wall three-dimensional model; wherein, in the real-life three-dimensional model, the water body three-dimensional model is located inside the pipeline three-dimensional model, and the inner wall three-dimensional model is located between the pipeline three-dimensional model and the water body three-dimensional model.
[0213] In a possible design, the drainage network includes multiple nodes, and the 3D modeling parameter information includes: the spatial position and type of each node; two interconnected nodes are connected by pipelines, and the 3D modeling parameter information also includes: the length, diameter and material of each pipeline;
[0214] The pipeline modeling module 210 includes:
[0215] A first model module is used to obtain a first pipeline model of the drainage network according to the spatial position and type of each node and the length and diameter of each pipeline;
[0216] The second model module is used to smooth the first pipeline model to obtain a second pipeline model of the drainage network;
[0217] The pipeline three-dimensional model module is used to perform surface mapping on the pipeline second model according to the material of each pipeline to obtain the pipeline three-dimensional model of the drainage network.
[0218] In a possible design, the first model module includes:
[0219] The reference point module is used to construct the model reference point corresponding to each node one by one through the topological structure construction algorithm according to the spatial position and type of each node;
[0220] The cylindrical model module is used to construct a pipeline model component corresponding to each pipeline according to the length and diameter of each pipeline; wherein each pipeline model component is cylindrical;
[0221] The connection module is used to translate and rotate each pipeline model component according to the connection relationship between multiple pipelines to obtain the first pipeline model of the drainage network; wherein the top surface center and the bottom surface center of each pipeline model component coincide with a model reference point.
[0222] In a possible design, the first reference point of the model is a model reference point constructed according to the first node, and the first node is any one of the plurality of nodes; the first node is arranged with a target multi-pass elbow, and the type of the first node is used to indicate the number and direction of the elbow openings of the target multi-pass elbow;
[0223] The second node is a node interconnected with the first node. When constructing the second reference point of the model corresponding to the second node, the reference point module includes:
[0224] Taking the first reference point of the model as the starting point, constructing at least one model auxiliary ray according to the direction of the elbow opening of the target multi-pass elbow; wherein the number of the at least one model auxiliary ray is the same as the number of the elbow openings of the target multi-pass elbow;
[0225] According to the spatial positions of the first node and the second node, a relative node position of the second node relative to the first node is obtained;
[0226] A second reference point of the model is constructed according to the relative positions of the nodes and at least one model auxiliary ray.
[0227] In one possible design, the second model module includes:
[0228] According to the connection relationship between the multiple pipelines, multiple connection parts of the first pipeline model are obtained; wherein each connection part refers to a part where multiple pipeline model components are connected to each other;
[0229] A pipe bend model component corresponding to the multi-pass pipe bend is constructed at each connection part; wherein the number of pipe bend openings of each pipe bend model component is the same as the number of multiple pipe model components connected to each other at the corresponding connection part; and the diameter of the pipe bend opening of each pipe bend model component is the same as the diameter of the corresponding pipe model component;
[0230] According to the first pipe model and the elbow model components located at each connecting part, a second pipe model of the drainage pipe network is obtained.
[0231] In one possible design, the pipeline 3D model module includes:
[0232] Perform two-dimensional texture unfolding on the second pipeline model;
[0233] According to the material of each pipe, the texture image corresponding to each material is mapped on the second pipe model after the two-dimensional texture is expanded to obtain the three-dimensional pipe model of the drainage pipe network.
[0234] In a possible design, the drainage pipe network is arranged with a plurality of water level sensors and a plurality of water quality sensors; the monitoring parameter information includes: water level information and water quality information of the water body object;
[0235] The water body modeling module 220 includes:
[0236] A cutting module is used to perform cross-section cutting on the vector file of the water body object according to the geographical location, and to perform triangulation mesh processing on the vector file after the cross-section cutting;
[0237] The water body model module is used to obtain a three-dimensional water body model of the drainage network through texture mapping and mesh deformation based on the water level information and water quality information of the water body object, as well as the cross-section cutting and triangulated meshing of the water body object. The texture mapping and mesh deformation are used to jointly display the effect information of the water body object. The effect information includes: reflection, refraction and filtering effects of the water body object.
[0238] Among them, water level information and water quality information are both dynamic; the three-dimensional model of the water body is a dynamic three-dimensional model; the water quality information is displayed according to the color depth of the three-dimensional model of the water body.
[0239] In one possible design, the drainage network is arranged with projectors and cameras;
[0240] The inner wall modeling module 230 includes:
[0241] A projection module, used to control a projector to project a fringe pattern onto an inner wall of a pipe of a drainage network, and simultaneously control a camera to shoot the fringe pattern that is deformed due to being projected onto the inner wall of a pipe of the drainage network;
[0242] The reconstruction module is used to obtain a three-dimensional model of the inner wall of the drainage network through structured light three-dimensional reconstruction based on the deformed fringe pattern.
[0243] In one possible design, the reconstruction module includes:
[0244] A phase module, used for calculating the absolute phase of each pixel of the deformed fringe pattern according to the deformed fringe pattern;
[0245] The point cloud reconstruction module is used to obtain the matching relationship between the projector and the camera according to the absolute phase of each pixel point, and to reconstruct the three-dimensional point cloud inside the pipeline through the triangulation reconstruction method to obtain the three-dimensional point cloud.
[0246] The splicing module is used to splice the three-dimensional point cloud through the iterative nearest point cloud registration algorithm to obtain the three-dimensional model of the inner wall of the drainage pipe network.
[0247] In one possible design, the result module 240 further includes:
[0248] When receiving the model display instruction, the environment control operation is performed on the real scene 3D model according to the model display instruction, including:
[0249] According to the near view plane and far view plane of the roaming, the real scene 3D model is removed from the view area;
[0250] Perform occlusion culling on the real-scene 3D model after view culling;
[0251] Through the lighting acceleration algorithm, the real-life 3D model after view culling and occlusion culling is rendered, and the rendering results are displayed;
[0252] Among them, the environmental control operations include: roaming, zooming, translation and potential angle transformation, transparency adjustment, transparency adjustment is used to adjust the transparency of at least one of the pipeline three-dimensional model, water body three-dimensional model and inner wall three-dimensional model; the real-scene three-dimensional model is equipped with collision monitoring.
[0253] The present embodiment provides a device that can execute the real-scene three-dimensional simulation method of the drainage network of the above-mentioned embodiment. The implementation principle and technical effect are similar and will not be described in detail in the present embodiment.
[0254] In the specific implementation of the aforementioned method for real-life three-dimensional simulation of a drainage network, each module can be implemented as a processor, and the processor can execute computer execution instructions stored in the memory, so that the processor executes the aforementioned method for real-life three-dimensional simulation of a drainage network.
[0255] Fig.10 This is a schematic diagram of the structure of the electronic device hardware provided in the embodiment of the present application. Fig.10 As shown, the electronic device 300 includes: at least one processor 310 and a memory 320. The electronic device 300 also includes a communication component 330. The processor 310, the memory 320 and the communication component 330 are connected via a bus 340.
[0256] In the specific implementation process, at least one processor 310 executes the computer execution instructions stored in the memory 320, so that at least one processor 310 executes a drainage network real-scene three-dimensional simulation method as executed by the electronic device side as above.
[0257] The specific implementation process of the processor 310 can be found in the above method embodiment, and its implementation principle and technical effect are similar, so this embodiment will not be repeated here.
[0258] In the above embodiments, it should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the invention may be directly implemented as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.
[0259] The memory may include a high-speed RAM memory, and may also include a non-volatile storage NVM, such as at least one disk storage.
[0260] The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present application is not limited to only one bus or one type of bus.
[0261] The above-mentioned functions implemented by the electronic device and the main control device introduce the scheme provided by the embodiment of the present invention. It can be understood that in order to implement the above-mentioned functions, the electronic device or the main control device includes a hardware structure and / or software module corresponding to the execution of each function. In combination with the units and algorithm steps of each example described in the embodiment disclosed in the embodiment of the present invention, the embodiment of the present invention can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the technical solution of the embodiment of the present invention.
[0262] The present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the above-mentioned method for three-dimensional simulation of a real-life drainage network.
[0263] The above-mentioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general or special-purpose computer.
[0264] An exemplary readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (Application Specific Integrated Circuits, referred to as: ASIC). Of course, the processor and the readable storage medium can also exist as discrete components in an electronic device or a main control device.
[0265] The present application also provides a computer program product, which includes: a computer program, which is stored in a readable storage medium. At least one processor of an electronic device can read the computer program from the readable storage medium. When the computer program is executed by the processor, it is used to implement the above-mentioned method for real-life three-dimensional simulation of a drainage network.
[0266] Those skilled in the art can understand that all or part of the steps of the above method embodiments can be completed by hardware related to program instructions. The above program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above method embodiments are executed; and the above storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.
[0267] So far, the technical solution of the present application has been described in conjunction with the preferred embodiments shown in the accompanying drawings. However, it is easy for those skilled in the art to understand that the protection scope of the present application is obviously not limited to these specific embodiments, and the above embodiments are only used to illustrate the technical solution of the present application rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein by equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for three-dimensional simulation of real-life drainage network. It is characterized in that The method comprises: According to the three-dimensional modeling parameter information of the nodes and pipelines of the drainage network, a three-dimensional model of the pipelines of the drainage network is obtained through pipeline modeling and surface mapping; According to the monitoring parameter information of the water body object and the vector file after the cutting and mesh processing of the water body object, a three-dimensional water body model of the drainage pipe network is obtained through texture mapping and mesh deformation; According to the deformed fringe pattern projected onto the inner wall of the pipe of the drainage pipe network, a three-dimensional model of the inner wall of the drainage pipe network is obtained by three-dimensional reconstruction using structured light; A real-life three-dimensional model of the drainage network is obtained based on the pipeline three-dimensional model, the water body three-dimensional model and the inner wall three-dimensional model; wherein, in the real-life three-dimensional model, the water body three-dimensional model is located inside the pipeline three-dimensional model, and the inner wall three-dimensional model is located between the pipeline three-dimensional model and the water body three-dimensional model.
2. The method according to claim 1, It is characterized in that The drainage network includes a plurality of nodes, and the three-dimensional modeling parameter information includes: the spatial position and type of each node; if two interconnected nodes are connected by pipelines, the three-dimensional modeling parameter information also includes: the length, diameter and material of each pipeline; The method of obtaining the three-dimensional model of the pipelines of the drainage network through pipeline modeling and surface mapping according to the three-dimensional modeling parameter information of the nodes and pipelines of the drainage network includes: Obtaining a first pipeline model of the drainage network according to the spatial position and type of each node and the length and diameter of each pipeline; Smoothing the first pipeline model to obtain a second pipeline model of the drainage network; According to the material of each of the pipes, surface mapping is performed on the second pipe model to obtain a three-dimensional pipe model of the drainage network.
3. The method according to claim 2, It is characterized in that The first pipeline model of the drainage network is obtained according to the spatial position and type of each node and the length and diameter of each pipeline, including: According to the spatial position and type of each node, a model reference point corresponding to each node is constructed one by one through a topological structure construction algorithm; According to the length and diameter of each pipeline, a pipeline model component corresponding to each pipeline is constructed; wherein each pipeline model component is cylindrical; According to the connection relationship between the multiple pipelines, each pipeline model component is translated and rotated respectively to obtain the first pipeline model of the drainage network; wherein the top surface center and the bottom surface center of each pipeline model component coincide with one of the model reference points.
4. The method according to claim 3, It is characterized in that The first reference point of the model is a model reference point constructed according to the first node, the first node is any one of the plurality of nodes; the first node is arranged with a target multi-pass elbow, and the type of the first node is used to indicate the number and direction of the elbow openings of the target multi-pass elbow; The second node is a node interconnected with the first node. When constructing the second reference point of the model corresponding to the second node, the model reference points corresponding to each node are constructed one by one according to the spatial position and type of each node through a topological structure construction algorithm, including: Taking the first reference point of the model as a starting point, constructing at least one model auxiliary ray according to the direction of the bend opening of the target multi-pass bend pipe; wherein the number of at least one model auxiliary ray is the same as the number of the bend openings of the target multi-pass bend pipe; Obtaining a node relative position of the second node relative to the first node according to respective spatial positions of the first node and the second node; The second reference point of the model is constructed according to the relative positions of the nodes and at least one auxiliary ray of the model.
5. The method according to claim 3, It is characterized in that The step of smoothing the first pipeline model to obtain the second pipeline model of the drainage network includes: According to the connection relationship between the plurality of pipelines, a plurality of connection parts of the first pipeline model are obtained; wherein each connection part refers to a part where the plurality of pipeline model components are connected to each other; A pipe bend model component corresponding to the multi-pass pipe bend is constructed at each of the connection parts; wherein the number of pipe bend openings of each pipe bend model component is the same as the number of the plurality of pipe model components connected to each other at the corresponding connection part; and the diameter of the pipe bend opening of each pipe bend model component is the same as the diameter of the corresponding pipe model component; According to the first pipe model and the elbow model components located at each of the connecting parts, a second pipe model of the drainage pipe network is obtained.
6. The method according to claim 2, It is characterized in that The method of performing surface mapping on the second pipe model according to the material of each pipe to obtain a three-dimensional pipe model of the drainage pipe network includes: Performing two-dimensional texture expansion on the second pipeline model; According to the material of each of the pipes, a texture image corresponding to each of the materials is mapped onto the second pipe model after the two-dimensional texture is expanded to obtain a three-dimensional pipe model of the drainage pipe network.
7. The method according to claim 1, It is characterized in that The drainage pipe network is arranged with a plurality of water level sensors and a plurality of water quality sensors; the monitoring parameter information includes: water level information and water quality information of the water body object; The method of obtaining the three-dimensional water model of the drainage network through texture mapping and mesh deformation based on the monitoring parameter information of the water object and the vector file after the cutting and mesh processing of the water object includes: According to the geographical location, the vector file of the water body object is cut into sections, and the vector file after the section cutting is processed into a triangular mesh; According to the water level information and water quality information of the water body object, and the vector file after the cross-section cutting and triangulation meshing of the water body object, a three-dimensional water body model of the drainage pipe network is obtained through the texture mapping and mesh deformation; wherein the texture mapping and mesh deformation are used to jointly display the effect information of the water body object; the effect information includes: the reflection, refraction and filtering effects of the water body object; Among them, the water level information and water quality information are both dynamic; the water body three-dimensional model is a dynamic three-dimensional model; and the water quality information is displayed according to the color depth of the water body three-dimensional model.
8. The method according to claim 1, It is characterized in that The drainage pipe network is arranged with a projector and a camera; The fringe pattern deformed by projection onto the inner wall of the pipe of the drainage pipe network is reconstructed by structured light three-dimensionally to obtain a three-dimensional model of the inner wall of the drainage pipe network, including: Controlling the projector to project the fringe pattern onto the inner wall of the pipe of the drainage network, and simultaneously controlling the camera to photograph the fringe pattern that is deformed due to being projected onto the inner wall of the pipe of the drainage network; According to the deformed fringe pattern, a three-dimensional model of the inner wall of the drainage network is obtained through the structured light three-dimensional reconstruction.
9. The method according to claim 8, It is characterized in that The method of obtaining the inner wall three-dimensional model of the drainage network by three-dimensional reconstruction of the structured light according to the deformed fringe pattern includes: According to the deformed fringe pattern, calculating the absolute phase of each pixel point of the deformed fringe pattern; According to the absolute phase of each pixel point, the matching relationship between the projector and the camera is obtained, and the three-dimensional point cloud inside the pipeline is reconstructed by a triangulation reconstruction method to obtain a three-dimensional point cloud. The three-dimensional point clouds are spliced by iterating the nearest point point cloud registration algorithm to obtain a three-dimensional model of the inner wall of the drainage pipe network.
10. The method according to claim 1, It is characterized in that After obtaining the real-scene three-dimensional model of the drainage network according to the pipeline three-dimensional model, the water body three-dimensional model and the inner wall three-dimensional model, the method further includes: When receiving the model display instruction, performing an environmental control operation on the real-scene three-dimensional model according to the model display instruction, including: According to the near view plane and the far view plane of the roaming, the real scene three-dimensional model is subjected to view culling; Performing occlusion culling on the real-scene three-dimensional model after view culling; Rendering the real-scene three-dimensional model after view culling and occlusion culling through a lighting acceleration algorithm, and displaying the rendering result; Among them, the environmental control operations include: roaming, zooming, translation and potential angle transformation, transparency adjustment, and the transparency adjustment is used to adjust the transparency of at least one of the pipeline three-dimensional model, the water body three-dimensional model and the inner wall three-dimensional model; the real-scene three-dimensional model is provided with collision monitoring.
11. A three-dimensional simulation device for real-life drainage pipe networks. It is characterized in that include: A pipeline modeling module is used to obtain a three-dimensional pipeline model of the drainage network through pipeline modeling and surface mapping according to the three-dimensional modeling parameter information of the nodes and pipelines of the drainage network; A water body modeling module, for obtaining a three-dimensional water body model of the drainage network through texture mapping and mesh deformation according to monitoring parameter information of the water body object and a vector file after cutting and mesh processing of the water body object; An inner wall modeling module is used to obtain a three-dimensional model of the inner wall of the drainage network through structured light three-dimensional reconstruction based on the deformed fringe pattern projected onto the inner wall of the pipe of the drainage network; The result module is used to obtain a real-life three-dimensional model of the drainage network based on the pipeline three-dimensional model, the water body three-dimensional model and the inner wall three-dimensional model; wherein, in the real-life three-dimensional model, the water body three-dimensional model is located inside the pipeline three-dimensional model, and the inner wall three-dimensional model is located between the pipeline three-dimensional model and the water body three-dimensional model.
12. An electronic device, It is characterized in that include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; When the processor executes the computer-executable instructions stored in the memory, it is used to implement a real-scene three-dimensional simulation method for a drainage network as described in any one of claims 1 to 7.
13. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement a real-scene three-dimensional simulation method for a drainage network as described in any one of claims 1 to 7.
