Method, device and storage medium for constructing urban three-dimensional model

By acquiring building point clouds and determining the normal direction based on the neighborhood radius, classifying point cloud types, and performing filtering and spatial partitioning, high-precision construction of urban 3D models is achieved, solving the problem of low accuracy in existing technologies and generating urban 3D models that conform to the OGC CityGML 3.0 standard.

CN119919597BActive Publication Date: 2025-11-04PENG CHENG LAB +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411778958.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-05
Publication Date
2025-11-04
Estimated Expiration
2044-12-05

AI Technical Summary

Technical Problem

In existing technologies, when reconstructing 3D city models using satellite image detection and dense point cloud data, there is a problem of low accuracy, especially in achieving the accuracy of geometric features at LoD1 and higher levels of detail.

Method used

By acquiring building point clouds and determining the normal direction based on the neighborhood radius, vertical and non-vertical point clouds are divided to generate building footprints and contour information. After filtering, the point clouds are divided into wall and roof point clouds. Spatial division and semantic information standardization are performed to generate an accurate 3D urban model.

Benefits of technology

It improves the accuracy and resolution of urban 3D models, enabling the generation of high-precision urban 3D models that conform to the OGC CityGML 3.0 standard, including LoD0-LoD3 level of detail information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119919597B_ABST
    Figure CN119919597B_ABST
Patent Text Reader

Abstract

The application discloses a kind of construction methods of urban three-dimensional model, equipment and storage medium, it is related to model construction technical field, construction method includes: obtaining the building point cloud of city and preset processing parameter;Determine the normal direction of each point cloud data in building point cloud based on neighborhood radius;Point cloud data in building point cloud is divided into vertical point cloud and non-vertical point cloud based on normal direction, determine the multiple first plane area corresponding to vertical point cloud, and determine building footprint information based on the projection of non-vertical point cloud in first plane area;The height of non-vertical point cloud projected in first plane area is used to generate building contour information;Filtering processing is carried out to point cloud data, and the filtering point cloud after filtering processing is divided into wall surface point cloud and roof point cloud, and the three-dimensional space is spatially divided based on wall surface point cloud and roof point cloud, to obtain building surface information.The application can improve the accuracy of urban three-dimensional model.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of model construction, in particular to a method and device for constructing a city three-dimensional model and a storage medium. BACKGROUND

[0002] With the rapid advancement of urbanization and the booming development of Internet of Things technology, the importance of smart city is increasingly prominent. As an application of digital twin technology in city management, smart city can provide information for city planning, energy management and transportation, etc. However, due to the large scale and complex environment of the city, it is extremely challenging to construct a three-dimensional model of the city.

[0003] In the current city semantic model standard OGC CityGML (City Geography Markup Language) 3.0, multiple levels of detail (Level of Detail, LoD) of the city three-dimensional model are defined, including 0-level LoD0 (building footprint projection, usually used to represent the macro view of the entire city), 1-level LoD1 (building external structure, which can be represented as a simple geometric shape), 2-level LoD2 (detailed external structure of the building, including windows, doors, etc.), and 3-level LoD3 (internal structure of the building, including rooms, corridors, stairs, etc.), and LoD0-LoD3 can contain indoor and outdoor elements, and there is no need for separate levels of detail to distinguish indoor and outdoor parts. In related technologies, the information of a building unit can be extracted from satellite images through two-dimensional image detection, and a city three-dimensional model can be constructed based on the extracted information. However, due to the resolution and accuracy of satellite images, the accuracy of the city three-dimensional model constructed in this way is not high, and only LoD0-LoD1 level city three-dimensional model extraction can be achieved. There is another method for constructing a city three-dimensional model, which can collect a large amount of dense point cloud data and generate a three-dimensional mesh model of the city based on a surface reconstruction algorithm. However, the point cloud data collected in the real scene often has a lot of noise and holes, which seriously affects the accuracy of the geometric features of LoD1 and higher levels of detail, so it is still difficult to obtain a more accurate city three-dimensional model. Therefore, how to improve the accuracy of the city three-dimensional model is a problem that needs to be discussed and solved. SUMMARY

[0004] The present application aims to at least solve one of the technical problems existing in the prior art. To this end, the present application proposes a method and device for constructing a city three-dimensional model and a storage medium, which can improve the accuracy of the city three-dimensional model.

[0005] To solve the above technical problems, the present application proposes the following technical solutions:

[0006] The first aspect of the present application provides a method for constructing a city three-dimensional model, comprising:

[0007] obtaining a building point cloud of a city and preset processing parameters, wherein the preset processing parameters comprise a neighborhood radius;

[0008] determining a normal direction of each point cloud data in the building point cloud based on the neighborhood radius;

[0009] dividing the point cloud data in the building point cloud into vertical point cloud and non-vertical point cloud based on the normal direction, determining a plurality of first plane regions corresponding to the vertical point cloud, and determining building footprint information based on the projection of the non-vertical point cloud in the first plane region;

[0010] generating building contour information based on the height of the non-vertical point cloud projected in the first plane region;

[0011] performing filtering processing on the point cloud data, dividing the filtered point cloud after filtering processing into wall surface point cloud and roof point cloud, and performing spatial division on a three-dimensional space based on the wall surface point cloud and the roof point cloud to obtain building surface information;

[0012] performing semantic information standardization processing on the building footprint information, the building contour information and the building surface information to obtain a city three-dimensional model.

[0013] The method for constructing a city three-dimensional model according to the first aspect of the present application has at least the following beneficial effects: Compared with the traditional method of extracting building monomer information from satellite images using two-dimensional image detection, the present application can determine building footprint information and building contour information through city point cloud data, thereby improving the accuracy and resolution of the city three-dimensional model. Moreover, when determining building surface information with high accuracy requirements, the present application can use filtering technology to denoise the point cloud data to preliminarily reduce the influence of noise in the point cloud data on the accuracy of the building surface information. After obtaining the filtered point cloud, the present application divides the filtered point cloud into wall surface point cloud and roof point cloud, and performs spatial division on a three-dimensional space through the wall surface point cloud and the roof point cloud, so as to reduce the influence of noise and holes based on straight line and plane characteristics, thereby generating building surface information with higher accuracy. Further, after obtaining building footprint information corresponding to a detail level of 0, building contour information corresponding to a detail level of 1 and building surface information corresponding to a detail level of 2, the present application performs semantic standardization processing on the building footprint information, the building contour information and the building surface information to convert the three kinds of information into a unified standard format, thereby generating a city three-dimensional model with high accuracy.

[0014] According to some embodiments of the first aspect of the application, the obtaining of the building point cloud of the city and the preset processing parameter comprises:

[0015] obtaining the preset processing parameter and a point cloud file path, wherein the point cloud file path indicates a storage location of the building point cloud;

[0016] reading the building point cloud based on the point cloud file path.

[0017] According to some embodiments of the first aspect of the application, the preset processing parameter further comprises a maximum number of neighborhood points, and the determining of the normal direction of each point cloud data in the building point cloud based on the neighborhood radius comprises:

[0018] for each point cloud data in the building point cloud, determining a plurality of neighborhood point cloud data within a neighborhood range centered on the point cloud data and having the neighborhood radius as a radius;

[0019] sorting the neighborhood point cloud data from near to far according to the distance between the neighborhood point cloud data and the point cloud data, and determining the maximum number of neighborhood point cloud data in the front as candidate neighborhood point cloud data;

[0020] calculating the point cloud covariance of each candidate neighborhood point cloud data and the point cloud data, and performing fitting processing based on the point cloud covariance to obtain a fitting plane;

[0021] determining the normal vector of the fitting plane as the normal direction of the point cloud data.

[0022] According to some embodiments of the first aspect of the application, the determining of the plurality of first plane regions corresponding to the vertical point cloud comprises:

[0023] projecting the vertical point cloud onto a horizontal first plane;

[0024] dividing the first plane into a plurality of plane grids, and determining the projection of the vertical point cloud on the plane grid as a first voxel point;

[0025] performing straight line detection processing on the first voxel point by a random sample consensus algorithm to obtain a plurality of projection straight lines;

[0026] dividing the first plane into a plurality of first plane regions based on the projection straight lines.

[0027] According to some embodiments of the first aspect of the application, the performing of straight line detection processing on the first voxel point by a random sample consensus algorithm to obtain a plurality of projection straight lines comprises:

[0028] selecting one of the first voxels in each of the two different plane grids, and fitting the two first voxels to obtain a plane fitting straight line;

[0029] calculating distances from other first voxels to the plane fitting straight line, except for the first voxels at two ends of the plane fitting straight line, and determining the first voxels as inliers of the plane fitting straight line if the distance from the first voxels to the plane fitting straight line is less than a preset distance threshold;

[0030] for each plane fitting straight line, determining the plane fitting straight line as the projection straight line when the number of inliers of the plane fitting straight line reaches a preset inlier threshold, and removing the first voxels at two ends of the plane fitting straight line and the inliers of the plane fitting straight line from the plurality of first voxels, returning to the step of selecting one of the first voxels in each of the two different plane grids until the number of first voxels is less than a preset voxel number threshold or the number of times of fitting the two first voxels reaches a preset fitting number threshold.

[0031] According to some embodiments of the first aspect of the present application, the preset processing parameter further includes a projection threshold, and the determining the building footprint information based on the projection of the non-perpendicular point cloud in the first plane region comprises:

[0032] projecting the non-perpendicular point cloud onto the first plane;

[0033] dividing the first plane into a plurality of plane grids, and determining second voxels as projections of the non-perpendicular point cloud in the plane grids;

[0034] for each first plane region, calculating a projection area of the second voxels in the first plane region, and determining the first plane region as the building footprint information if the ratio of the projection area of the second voxels to the area of the first plane region reaches the projection threshold.

[0035] According to some embodiments of the first aspect of the present application, the generating the building contour information based on the height of the non-perpendicular point cloud projected in the first plane region comprises:

[0036] if the first plane region is the building footprint information, determining a point cloud height average value based on the height of the plurality of non-perpendicular point clouds projected in the first plane region;

[0037] taking the first plane region as a building cross section and taking the point cloud height average value as a building height, and generating a building prism based on the building cross section and the building height;

[0038] The building contour information is generated based on the plurality of building prisms.

[0039] According to some embodiments of the first aspect of the application, the filtering of the point cloud data comprises:

[0040] The three-dimensional space is divided into a plurality of first solid spaces, and the first solid space in which the point cloud data exists is determined as a second solid space;

[0041] A center point of the second solid space is determined as filtered point cloud data after filtering, and a set of the filtered point cloud data is taken as a filtered point cloud.

[0042] According to some embodiments of the first aspect of the application, the division of the filtered point cloud after filtering into a wall point cloud and a roof point cloud comprises:

[0043] A normal direction of each filtered point cloud data in the filtered point cloud is determined based on the neighborhood radius;

[0044] The filtered point cloud data with the normal direction parallel to the horizontal plane is determined as the wall point cloud, and the other filtered point cloud data except the wall point cloud is determined as the roof point cloud.

[0045] According to some embodiments of the first aspect of the application, the spatial division of the three-dimensional space based on the wall point cloud and the roof point cloud to obtain building surface information comprises:

[0046] A plurality of second planar regions corresponding to the wall point cloud and a plurality of third planar regions corresponding to the roof point cloud are respectively determined by a random sample consensus algorithm;

[0047] The three-dimensional space is divided into a plurality of third solid spaces based on the second planar regions and the third planar regions;

[0048] The third solid spaces are subjected to spatial planning processing, and the building surface information is determined based on a plurality of semantic information obtained after the spatial planning.

[0049] According to some embodiments of the first aspect of the application, the spatial planning processing of the third solid spaces and the determination of the building surface information based on a plurality of semantic information obtained after the spatial planning comprise:

[0050] A point cloud distribution density of the filtered point cloud data in each third solid space is obtained;

[0051] A semantic information corresponding to each third solid space is determined based on a preset optimization condition and the point cloud distribution density;

[0052] the intersection of the third space whose semantic information is interior of the building and the third space whose semantic information is exterior of the building as a building surface;

[0053] generate the building surface information based on each of the building surfaces.

[0054] According to some embodiments of the first aspect of the application, the optimization condition comprises:

[0055] If the point cloud distribution density of multiple adjacent third spaces is greater than a preset first density threshold, the filtered point cloud data in the multiple third spaces are obtained, and the semantic information of the third space where the center point of the multiple filtered point cloud data is located is determined as interior of the building.

[0056] If the filtered point cloud data in two adjacent third spaces are both concentrated on the intersection of the two third spaces, the semantic information of the third space closest to the third space whose semantic information is interior of the building is determined as interior of the building, and the semantic information of the other third space is determined as exterior of the building.

[0057] For a third space whose semantic information is not determined, if the filtered point cloud data in the third space is not concentrated on the intersection of the third space and other adjacent third spaces, and the number of third spaces adjacent to the third space whose semantic information is interior of the building reaches a preset planning threshold, the semantic information of the third space is determined as interior of the building.

[0058] For a third space whose semantic information is not determined, if the filtered point cloud data in the third space is not concentrated on the intersection of the third space and other adjacent third spaces, and the number of third spaces adjacent to the third space whose semantic information is interior of the building is less than the planning threshold, the semantic information of the third space is determined as exterior of the building.

[0059] According to some embodiments of the first aspect of the application, the semantic information standardization processing of the building footprint information, the building contour information and the building surface information to obtain a city three-dimensional model comprises:

[0060] performing semantic identification processing on the building surface information to obtain surface semantic information;

[0061] performing surface triangulation processing on the building footprint information, the building contour information and the building surface information based on the surface semantic information, to determine a first reconstruction model corresponding to the building footprint information, a second reconstruction model corresponding to the building contour information, and a third reconstruction model corresponding to the building surface information;

[0062] generate the urban three-dimensional model based on the first reconstruction model, the second reconstruction model and the third reconstruction model.

[0063] According to some embodiments of the first aspect of the application, the semantic identification processing on the building surface information obtains surface semantic information, including:

[0064] For the building surface in the building surface information, the distance between each filtered point cloud data and the building surface is calculated, the filtered point cloud data is sorted from near to far according to the distance between the filtered point cloud data and the building surface, and the maximum number of neighborhood point cloud data in front of the sorting is determined as candidate filtered point cloud data;

[0065] If the average value of the distance between multiple candidate filtered point cloud data and the ground is less than a preset distance threshold, the surface semantic information of the building surface is determined as the ground;

[0066] If the proportion of the number of candidate filtered point cloud data as roof point cloud to the total number of candidate filtered point cloud data is greater than the first proportion threshold, and the average value of the distance between multiple candidate filtered point cloud data and the ground is greater than the distance threshold, the surface semantic information of the building surface is determined as the roof;

[0067] For the building surface whose surface semantic information has not been determined, the surface semantic information of the building surface is determined as the wall surface.

[0068] According to some embodiments of the first aspect of the application, the generation of the urban three-dimensional model based on the first reconstruction model, the second reconstruction model and the third reconstruction model includes:

[0069] The first reconstruction model, the second reconstruction model and the third reconstruction model are subjected to semantic normalization processing to obtain a first geometric attribute corresponding to the first reconstruction model, a second geometric attribute corresponding to the second reconstruction model and a third geometric attribute corresponding to the third reconstruction model;

[0070] The first geometric attribute is determined as a first detail level of the urban three-dimensional model, the second geometric attribute is determined as a second detail level of the urban three-dimensional model, and the third geometric attribute is determined as a third detail level of the urban three-dimensional model;

[0071] The urban three-dimensional model is generated based on the first detail level, the second detail level and the third detail level.

[0072] The second aspect of the application provides an electronic device, including:

[0073] at least one memory;

[0074] at least one processor;

[0075] at least one program;

[0076] the program is stored in the memory, and the processor executes at least one of the programs to implement:

[0077] The method for constructing a three-dimensional model of a city according to any one of the first aspect of the application.

[0078] The third aspect of the application provides a computer readable storage medium, the computer readable storage medium stores computer executable signals, and the computer executable signals are used for executing:

[0079] The method for constructing a three-dimensional model of a city according to any one of the first aspect of the application.

[0080] Additional aspects and advantages of the application will be in part apparent and in part pointed out below. BRIEF DESCRIPTION OF DRAWINGS

[0081] Additional aspects and advantages of the application will be in part apparent and in part pointed out below.

[0082] Figure 1 The main flow chart of the method for constructing a three-dimensional model of a city provided by some embodiments of the application;

[0083] Figure 2 The schematic diagram of the three-dimensional model of a city from the detail level of 0 to the detail level of 3 provided by some embodiments of the application;

[0084] Figure 3 The flow chart of acquiring the building point cloud of a city and the preset processing parameter provided by some embodiments of the application;

[0085] Figure 4 The flow chart of determining the normal direction of each point cloud data in the building point cloud based on the neighborhood radius provided by some embodiments of the application;

[0086] Figure 5 The flow chart of determining the plurality of first plane regions corresponding to the vertical point cloud provided by some embodiments of the application;

[0087] Figure 6 The schematic diagram of projecting the vertical point cloud onto the horizontal first plane provided by some embodiments of the application;

[0088] Figure 7A flowchart for performing straight line detection on the first voxel points by using a random sample consensus algorithm to obtain a plurality of projection straight lines is provided for some embodiments of the present application.

[0089] Figure 8 A schematic diagram for selecting one first voxel point in each of two different plane grids and fitting the two first voxel points is provided for some embodiments of the present application.

[0090] Figure 9 A flowchart for determining building footprint information based on the projection of non-perpendicular point clouds in a first plane region is provided for some embodiments of the present application.

[0091] Figure 10 A flowchart for generating building contour information based on the height of non-perpendicular point clouds projected in the first plane region is provided for some embodiments of the present application.

[0092] Figure 11 A schematic diagram of a building prism is provided for some embodiments of the present application.

[0093] Figure 12 A flowchart for performing filtering processing on point cloud data is provided for some embodiments of the present application.

[0094] Figure 13 A flowchart for dividing the filtered point cloud after filtering processing into wall surface point cloud and roof point cloud is provided for some embodiments of the present application.

[0095] Figure 14 A flowchart for performing spatial division on a three-dimensional space based on the wall surface point cloud and the roof point cloud to obtain building surface information is provided for some embodiments of the present application.

[0096] Figure 15 A schematic diagram for dividing the three-dimensional space into a plurality of third three-dimensional spaces based on the second plane region and the third plane region is provided for some embodiments of the present application.

[0097] Figure 16 A flowchart for performing spatial planning processing on the third three-dimensional space and determining building surface information based on a plurality of semantic information obtained after the spatial planning is provided for some embodiments of the present application.

[0098] Figure 17 A flowchart for performing semantic information standardization processing on building footprint information, building contour information, and building surface information to obtain a city three-dimensional model is provided for some embodiments of the present application.

[0099] Figure 18 A flowchart for performing semantic identification processing on building surface information to obtain surface semantic information is provided for some embodiments of the present application.

[0100] Figure 19A flowchart for generating a city three-dimensional model based on a first reconstruction model, a second reconstruction model and a third reconstruction model is provided for some embodiments of the present application.

[0101] Figure 20 A schematic diagram for spatial division of a three-dimensional space based on a wall point cloud and a roof point cloud is provided for some embodiments of the present application.

[0102] Figure 21 A module block diagram of an electronic device is provided for some embodiments of the present application. DETAILED DESCRIPTION

[0103] In order to make the objects, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and do not limit the present application.

[0104] It should be noted that although a logical sequence is shown in the flowchart, in some cases, the steps shown or described can be performed in an order different from that in the flowchart. The terms in the specification and claims and the above-described drawings are used to distinguish similar objects, and do not necessarily describe a specific sequence or order.

[0105] In the description of the present application, if the first, second, etc. are described for the purpose of distinguishing technical features, they should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated or the order of the technical features indicated.

[0106] In the description of the present application, unless otherwise explicitly limited, the words such as setting, installing, connecting, etc. should be broadly understood, and those skilled in the art can reasonably determine the specific meaning of the above words in the present application in combination with the specific content of the technical solution.

[0107] First, some terms involved in the present application are explained:

[0108] LoD (Level of Detail) is a technique used in computer graphics and three-dimensional modeling to optimize rendering performance. The core idea is to dynamically adjust the level of detail of objects based on their distance from the observer (such as the camera or the player's perspective), thereby maintaining visual quality while improving rendering efficiency. For example, in a game, when the player is close to a building, the game engine will render a high-detail version, and when the player is far away, it will switch to a low-detail version to improve frame rate. Further, in the city semantic model standard, the level of detail can describe the geometric and semantic detail level of objects in a three-dimensional city model.

[0109] The random sample consensus (RANSAC) is an iterative method for estimating the parameters of a mathematical model from a dataset that contains outliers. The basic assumption of the algorithm is that the data consists of inliers and outliers, where inliers are data that can be explained within a certain error range, and outliers do not conform to the model. RANSAC finds the best model parameters that explain or fit the data by randomly selecting sample data as inliers and iteratively refining the model parameters.

[0110] A watertight model refers to a model that, during the 3D modeling and manufacturing process, ensures that the model surface is complete and free of holes or incompletely stitched adjacent surfaces, thereby preventing the penetration of liquids such as water. The importance of a watertight model lies in its ability to provide a closed and complete geometric structure, allowing the model to maintain its functionality and reliability in various applications.

[0111] In the current city semantic model standard OGC CityGML (City Geography Markup Language) 3.0, multiple levels of detail (LoD) of city three-dimensional models are defined, including Level of Detail 0 LoD0 (building footprint projection, usually used to represent the macro view of the entire city), Level of Detail 1 LoD1 (building external structure, which can be represented as a simple geometric shape), Level of Detail 2 LoD2 (detailed external structure of the building, including windows, doors, and other details), and Level of Detail 3 LoD3 (internal structure of the building, including rooms, corridors, stairs, etc.), and LoD0-LoD3 can contain indoor and outdoor elements, and there is no need for separate levels of detail to distinguish indoor and outdoor parts. In related technologies, the information of a building monomer can be extracted from satellite images through two-dimensional image detection, and a city three-dimensional model can be constructed based on the extracted information. However, due to the resolution and accuracy of satellite images, the accuracy of the city three-dimensional model constructed in this way is not high, and only LoD0-LoD1 level city three-dimensional model extraction can be achieved. There is another method for constructing a city three-dimensional model, which can generate a three-dimensional grid model of the city by collecting a large amount of dense point cloud data and based on a surface reconstruction algorithm. However, the point cloud data collected in the real scene often has a large amount of noise and holes, which seriously affects the accuracy of the geometric features of LoD1 and higher levels of detail, so it is still difficult to obtain a more accurate city three-dimensional model. Therefore, how to improve the accuracy of the city three-dimensional model is a problem that needs to be discussed and solved.

[0112] Therefore, the method for constructing a city three-dimensional model can improve the accuracy of the city three-dimensional model.

[0113] Reference Figure 1The first aspect provides a method for constructing a city three-dimensional model, which includes but is not limited to steps S110, S120, S130, S140, S150 and S160.

[0114] S110, obtaining a building point cloud of a city and preset processing parameters, wherein the preset processing parameters include a neighborhood radius;

[0115] S120, determining a normal direction of each point cloud data in the building point cloud based on the neighborhood radius;

[0116] S130, dividing the point cloud data in the building point cloud into vertical point cloud and non-vertical point cloud based on the normal direction, determining a plurality of first plane regions corresponding to the vertical point cloud, and determining building footprint information based on a projection of the non-vertical point cloud in the first plane region;

[0117] S140, generating building contour information based on a height of the non-vertical point cloud projected in the first plane region;

[0118] S150, performing filtering processing on the point cloud data, dividing the filtered point cloud after the filtering processing into wall point cloud and roof point cloud, performing spatial division on a three-dimensional space based on the wall point cloud and the roof point cloud, and obtaining building surface information;

[0119] S160, performing semantic information standardization processing on the building footprint information, the building contour information and the building surface information, and obtaining the city three-dimensional model.

[0120] According to the embodiments of the present application, the city three-dimensional model refers to a technology for three-dimensional expression of city buildings through digital means. Referring to Figure 2 The construction of the city three-dimensional model usually adopts different levels of details (Level of Detail, LoD). The 0-level LoD0 refers to a macroscopic view of the entire city, and the buildings in the LoD0 are represented in the form of basic contours or roof edge polygons without detailed walls, doors and windows. The 1-level LoD1 represents the external structure of the buildings in the form of simple geometric shapes without detailed information such as building materials and roof shapes. The 2-level LoD2 is more detailed than the 1-level LoD1 and usually contains detailed structures of the buildings (such as balconies and outdoor stairs). The 3-level LoD3 contains the internal structure of the buildings, including rooms, corridors and stairs. In the OGC City GML 3.0, the LoD0-LoD3 can contain indoor and outdoor elements, and a separate level of detail is not needed to distinguish the indoor and outdoor parts.

[0121] It can be understood that the building point cloud refers to a collection of three-dimensional data of the surface of a building obtained by laser scanning, photogrammetry and other technologies, that is, a collection of point cloud data. These data are usually represented in the form of points, each point containing its three-dimensional coordinates and other attributes (such as reflectivity, color information, etc.). Further, in this application, the building point cloud can be obtained by airborne laser radar and unmanned aerial vehicle multi-view stereo measurement technology.

[0122] It can be understood that the preset processing parameter refers to the processing parameter preset by the user before constructing the urban three-dimensional model. The preset processing parameter includes the neighborhood radius, which refers to the radius of the open interval centered on a certain point cloud data. The larger the neighborhood radius, the larger the neighborhood of the point cloud data. Similarly, the smaller the neighborhood radius, the smaller the neighborhood of the point cloud data. The application can determine the normal direction of each point cloud data p = (x, y, z) in the building point cloud based on the neighborhood radius The normal direction is the direction of a straight line that is perpendicular to the tangent line or plane of the point cloud data starting from the point cloud data.

[0123] Further, after determining the normal direction of each point cloud data, the plurality of point cloud data can be divided into vertical point cloud and non-vertical point cloud based on the normal direction. If the normal direction of the point cloud data is parallel to the horizontal plane, the point cloud data is determined as the vertical point cloud, and if the normal direction of the point cloud data is not parallel to the horizontal plane, the point cloud data is determined as the non-vertical point cloud. The vertical point cloud generally refers to the point cloud data obtained after scanning the outer wall of the building. When the density of the vertical point cloud in a certain area is particularly high, it indicates that there is a building in the area. The plurality of first plane regions corresponding to the vertical point cloud refer to a plurality of polygonal regions obtained by dividing the plane space based on the vertical point cloud. The polygonal region can also be understood as the projection of a certain building relative to the horizontal ground. Since the non-vertical point cloud is generally the roof of the building, after determining the first plane region corresponding to the building projection, the building footprint information, that is, the physical boundary of the building in the geographical space, can be comprehensively determined in combination with the projection of the non-vertical point cloud in the first plane region. The building footprint information corresponds to the 0-level detail level LoD0.

[0124] The building contour information includes the outer structure of the building, and the building contour information corresponds to a first level of detail LoD1. After obtaining the building footprint information corresponding to the physical boundary of the building in the previous step, the building contour information can be generated in combination with the height of the building. Among them, since the non-vertical point cloud projected in the first plane region generally refers to the roof of the building, the height of the building can be determined by the height of the non-vertical point cloud projected in the first plane region. Compared with the traditional method of extracting the information of the building monomer from the satellite image by using the two-dimensional image detection, the building footprint information and the building contour information can be determined by the point cloud data of the city in the present application, so that the accuracy and resolution of the city three-dimensional model are improved.

[0125] The building surface information includes detailed external structures such as roof shapes and appendages, and the building surface information corresponds to a second level of detail LoD2. Based on this, the building surface information has a relatively high requirement for accuracy. In order to obtain watertight building surface information, the present application uses filtering technology to denoise the point cloud data, and weakens the noise in the original building point cloud, so as to preliminarily reduce the influence of the noise in the point cloud data on the accuracy of the building surface information. Further, after obtaining the filtered point cloud, the present application divides the filtered point cloud into wall point cloud and roof point cloud, so as to utilize the surface regularity of the building, reduce the influence of noise and holes based on straight line and plane features, and generate building surface information with higher accuracy.

[0126] Finally, after determining the building footprint information corresponding to the 0th level of detail, the building contour information corresponding to the 1st level of detail, and the building surface information corresponding to the 2nd level of detail, the present application performs semantic standardization processing on the building footprint information, the building contour information and the building surface information, so as to convert the three kinds of information into a unified standard format, thereby generating a city three-dimensional model with high accuracy and conforming to the city semantic model standard OGC CityGML3.0.

[0127] In an embodiment, referring to Figure 3 , step 110 comprises:

[0128] Step 310, obtaining a preset processing parameter and a point cloud file path, wherein the point cloud file path indicates a storage location of the building point cloud;

[0129] Step 320, reading the building point cloud based on the point cloud file path.

[0130] According to the embodiments of the present application, the point cloud file path refers to the storage location of the folder storing the building point cloud in the system. The preset processing parameter and the point cloud file path are both user-defined inputs. After obtaining the preset processing parameter and the point cloud file path, the software will automatically read the folder storing the building point cloud based on the point cloud file path, and then read the building point cloud in the folder.

[0131] Referring to Figure 4 , the preset processing parameter further includes a maximum number of neighborhood points, and the step 120 includes:

[0132] Step 410, for each point cloud data in the building point cloud, a plurality of neighborhood point cloud data in a neighborhood range centered on the point cloud data and with a neighborhood radius as a radius is determined;

[0133] Step 420, the neighborhood point cloud data is sorted from near to far according to the distance between the neighborhood point cloud data and the point cloud data, and the maximum number of neighborhood point cloud data in front of the sorting is determined as candidate neighborhood point cloud data;

[0134] Step 430, the point cloud covariance of each candidate neighborhood point cloud data and the point cloud data is calculated, and a fitting plane is obtained based on the point cloud covariance through fitting processing;

[0135] Step 440, the normal vector of the fitting plane is determined as the normal direction of the point cloud data.

[0136] According to the embodiments of the present application, the neighborhood point cloud data refers to other point cloud data in the neighborhood range with a neighborhood radius as a radius and with a certain point cloud data as a center. The point cloud data and the plurality of neighborhood point cloud data corresponding to the point cloud data can reflect the general outline of the building in the neighborhood range.

[0137] It can be understood that the maximum number of neighborhood points refers to the maximum number of neighborhood point centers in the neighborhood range with a neighborhood radius as a radius and with the point cloud data as a center. Therefore, after the plurality of neighborhood point cloud data in the neighborhood range with a neighborhood radius as a radius and with the point cloud data as a center is determined, the neighborhood point cloud data needs to be sorted from far to near according to the distance between the neighborhood point cloud data and the point cloud data, and the maximum number of neighborhood point cloud data closest to the point cloud data is determined as candidate neighborhood point cloud data.

[0138] Further, since the candidate neighborhood point cloud data is all in the form of coordinate points in a three-dimensional space, in order to measure the linear relationship strength between any candidate neighborhood point cloud data and the point cloud data as a center point, the covariance of each candidate neighborhood point cloud data and the point cloud data, i.e., the point cloud covariance, needs to be calculated. When the covariance is positive, it means that the point cloud data and the candidate neighborhood point cloud data change in the same direction. When the covariance is negative, it means that the point cloud data and the candidate neighborhood point cloud data change in the opposite direction. When the covariance is 0, it means that there is no linear relationship between the point cloud data and the candidate neighborhood point cloud data.

[0139] After the covariance of each candidate neighborhood point cloud data and the point cloud data is determined, a fitting process can be performed based on the plurality of point cloud covariances to obtain a fitting plane. The fitting plane can be understood as a mathematical model, and the fitting process is a process for describing how the mathematical model best fits the plurality of point cloud covariances. The fitting plane obtained by fitting the plurality of point cloud covariances can accurately describe the relationship between each candidate neighborhood point cloud data and the point cloud data.

[0140] It can be understood that the fitting plane is not only a mathematical model for describing the relationship between each neighborhood point cloud data and the point cloud data, but also accurately represents the tangent plane of the point cloud data. Based on this, the direction of the normal vector of the fitting plane can be determined as the normal direction of the point cloud data. The normal vector refers to a non-zero vector perpendicular to the fitting plane.

[0141] In an embodiment, referring to Figure 5 , step 130 comprises:

[0142] Step 510, projecting the vertical point cloud onto a horizontal first plane;

[0143] Step 520, dividing the first plane into a plurality of plane grids, and determining the projection of the vertical point cloud on the plane grid as a first voxel point;

[0144] Step 530, performing straight line detection processing on the first voxel point by a random sample consensus algorithm to obtain a plurality of projection straight lines;

[0145] Step 540, dividing the first plane into a plurality of first plane regions based on the projection straight lines.

[0146] According to embodiments of the present application, because the building footprint information reflects the situation of the building occupying the land, to determine the first plane region corresponding to the vertical point cloud, the vertical point cloud needs to be projected onto a horizontal first plane first, as shown in Figure 6 The projection of the vertical point cloud on the first plane reflects the horizontal distribution of the vertical point cloud.

[0147] It can be understood that, in order to simplify the first plane into a more easily processed structure and reduce the calculation difficulty, the first plane also needs to be divided into a plurality of plane grids, which can also be understood as pixels in a two-dimensional image. However, the plane grid is in the form of a rectangle, not a point. If there is a vertical point cloud in the plane grid, the projection of the vertical point cloud on the plane grid is determined as a first voxel point. There can be a plurality of first voxel points in one plane grid.

[0148] Further, the straight line detection processing can be performed on any two first voxel points in different planar grids by using a random sample consensus algorithm to identify and remove outliers, so as to obtain a plurality of projection straight lines as the mathematical model of the first voxel points, thereby improving the robustness of the model estimation. In this regard, for any two first voxel points, the outliers refer to other first voxel points deviating from the projection straight lines corresponding to the two first voxel points. By using the random sample consensus algorithm, the plurality of projection straight lines can be effectively estimated even in the presence of a large number of outliers, thereby improving the accuracy of the determined building footprint information.

[0149] It can be understood that, since the projection straight line is a line segment on the first plane, and the plurality of projection straight lines can enclose a closed polygon. Based on this, a plurality of closed polygons can be determined on the first plane based on the projection straight lines, and each closed polygon corresponds to a first plane region. Since the first plane region is determined based on the vertical point cloud, and the vertical point cloud is mostly obtained by scanning the wall of the building, the first plane region can reflect the projection of the building relative to the horizontal ground to a certain extent. In combination with the projection of the building relative to the horizontal ground, the building footprint information can be more accurately determined. Compared with a satellite image which can only provide a top view image of the roof of the building, the first plane region and the building footprint information can be determined by scanning the building point cloud, and higher accuracy can be achieved.

[0150] In an embodiment, referring to Figure 7 , step 530 comprises:

[0151] Step 710, selecting one first voxel point in each of two different planar grids, and fitting the two first voxel points to obtain a planar fitting straight line;

[0152] Step 720, calculating the distance from other first voxel points except the first voxel points at both ends of the planar fitting straight line to the planar fitting straight line, and determining the first voxel point as an inlier of the planar fitting straight line if the distance from the first voxel point to the planar fitting straight line is less than a preset distance threshold;

[0153] Step 730, for each planar fitting straight line, when the number of inliers corresponding to the planar fitting straight line reaches a preset inlier threshold, determining the planar fitting straight line as a projection straight line, and removing the first voxel points at both ends of the planar fitting straight line and the inliers corresponding to the planar fitting straight line from the plurality of first voxel points, returning to the step of selecting one first voxel point in each of two different planar grids, until the number of first voxel points is less than a preset voxel point number threshold, or the number of times of fitting the two first voxel points reaches a preset fitting number threshold.

[0154] According to the embodiments of the present application, Figure 8The dashed lines in the diagram divide the first plane into multiple planar grids. This is combined with... Figure 8 The following explains the step of "performing line detection on the first voxel point using a random sampling consensus algorithm": First, select one first voxel point from each of two different planar grids, resulting in first voxel point A and first voxel point B. By fitting first voxel point A and first voxel point B, a planar fitted line AB can be obtained. Then, calculate the distances from the other first voxel points (excluding first voxel points A and B) to the planar fitted line AB. Figure 8 Besides voxel points A and B, the other first voxel points include voxel points C, D, and E. Based on this, it is necessary to calculate the distances from voxel point C to the fitted line AB, the distances from voxel point D to the fitted line AB, and the distances from voxel point E to the fitted line AB. Assuming the preset distance threshold is the width of the planar grid, if the distance from a first voxel point to the fitted line AB is less than the width of the planar grid, it indicates that this first voxel point is an interior point corresponding to the fitted line AB. Figure 8 It can be seen that the distances from the first voxel point D and the first voxel point E to the plane fitting line AB are less than the width of the plane grid, while the distance from the first voxel point C to the plane fitting line AB is greater than the width of the plane grid. Therefore, the first voxel points D and E are determined as the interior points corresponding to the plane fitting line AB.

[0155] Furthermore, if the preset interior point threshold is 2, and the number of interior points corresponding to the plane fitting line AB has reached the preset interior point threshold, then the plane fitting line AB can be determined as the projection line. Simultaneously, since it has been determined that the first voxel points A, B, D, and E are all interior points corresponding to the plane fitting line AB, they can be removed from the pool of first voxel points to avoid interference from them in the subsequent fitting process.

[0156] It can be understood that, since the random sample consensus algorithm is an iterative algorithm, iterative calculation needs to be constantly performed, and therefore, after the straight line AB fitted by the plane is determined as the projection straight line, it is still needed to return to step 710 until the number of the first voxel points is less than the preset voxel point number threshold or the number of times of fitting of two first voxel points reaches the preset fitting number threshold. The plurality of projection straight lines determined based on the first voxel points are the solution of the random sample consensus algorithm. The voxel point number threshold and the fitting number threshold can both be set by the user. The voxel point number threshold can be the minimum number of first voxel points required for performing one straight line fitting operation, and the fitting number threshold can be specifically determined according to the total number of the first voxel points. Specifically, if the total number of the first voxel points is relatively large, a relatively large fitting number threshold can be set, and if the total number of the first voxel points is relatively small, a relatively small fitting number threshold can be set.

[0157] In an embodiment, the preset processing parameter further includes a projection threshold, referring to Figure 9 , step 130 includes:

[0158] Step 910, projecting the non-vertical point cloud onto the first plane;

[0159] Step 920, dividing the first plane into a plurality of plane grids, and determining the projection of the non-vertical point cloud in the plane grid as a second voxel point;

[0160] Step 930, for each first plane region, calculating the projection area of the second voxel point in the first plane region, and if the ratio of the projection area of the second voxel point to the area of the first plane region reaches the projection threshold, determining the first plane region as the building footprint information.

[0161] According to the embodiment of the present application, since the first plane region can reflect the projection of the building relative to the horizontal ground to a certain extent, and the building footprint information reflects the land occupation of the building. Therefore, on the basis of determining the first plane region, the first plane region needs to be further divided based on the non-vertical point cloud to increase the accuracy of the building footprint information. Since the building footprint information is plane information, the non-vertical point cloud needs to be projected onto the first plane first.

[0162] It can be understood that, in order to simplify the first plane into a structure that is easier to process and reduce the calculation difficulty, in step 920, the first plane also needs to be divided into a plurality of plane grids. In order to distinguish the projection of the vertical point cloud in the plane grid and the projection of the non-vertical point cloud in the plane grid, if there is a non-vertical point cloud in the plane grid, the projection of the non-vertical point cloud in the plane grid is determined as a second voxel point. There can be a plurality of second voxel points in one plane grid.

[0163] Further, because the vertical point cloud can have noise, and there are some vertical point clouds for describing some decorations on the wall of the building, which cannot reflect the boundary of the solid wall, the first planar region determined based on the vertical point cloud can not be accurate enough. Based on this, in order to accurately describe the building, for each first planar region determined by the vertical point cloud, the projection area of the second voxel point in the first planar region needs to be calculated. If the ratio of the projection area of the second voxel point to the area of the first planar region reaches a projection threshold, it means that the first planar region is the projection of the building relative to the horizontal ground and is relatively accurate, at this time the first planar region can be determined as the building footprint information. Wherein, the projection threshold refers to the minimum value of the ratio of the projection area of the second voxel point to the area of the first planar region allowed when determining the building footprint information.

[0164] In an embodiment, referring to Figure 10 , step 140 comprises:

[0165] Step 1010, if the first planar region is the building footprint information, determining the point cloud height average value based on the height of the plurality of non-vertical point clouds projected in the first planar region;

[0166] Step 1020, taking the first planar region as the building cross section and taking the point cloud height average value as the building height, generating a building prism based on the building cross section and the building height;

[0167] Step 1030, generating the building contour information based on the plurality of building prisms.

[0168] It can be understood that because the building footprint information reflects the projection of the building on the horizontal ground, the extraction of the building contour information depends on the building footprint information obtained at the detail level LoD0 corresponding to 0 level. However, the extraction of the building contour information also needs to obtain the height of the building, in this application, the height of the building can be determined based on the height of the plurality of non-vertical point clouds projected in the first planar region.

[0169] Specifically, since the non-vertical point cloud is generally obtained by scanning the roof structure of the building, if the first planar region is the building footprint information, the average value of the height of the plurality of non-vertical point clouds projected in the first planar region can be determined as the height of the building, that is, the building height. Wherein, the point cloud height average value in step 1010 refers to the average value of the height of the non-vertical point cloud.

[0170] It can be understood that after the first planar region corresponding to the projection of the building on the horizontal ground and the point cloud height average value corresponding to the height of the building are determined, the first planar region can be taken as the cross section of the building and the point cloud height average value can be taken as the building height, and a building prism can be generated, as Figure 11The first planar region is determined based on the building footprint information. Based on this, a corresponding building prism can be generated for each determined first planar region. After a plurality of building prisms are determined in the horizontal plane, the vertical surface on the adjacent line of each first planar region needs to be deleted to delete noise information and generate accurate building contour information.

[0171] In an embodiment, referring to Figure 12 , step 150 comprises:

[0172] Step 1210, dividing the three-dimensional space into a plurality of first solid spaces, and determining the first solid space in which the point cloud data exists as a second solid space;

[0173] Step 1220, determining the center point of the second solid space as the filtered point cloud data after filtering processing, and taking the set of the filtered point cloud data as the filtered point cloud.

[0174] It can be understood that the three-dimensional space in which the point cloud data exists corresponds to the three-dimensional space of an entire city. In this case, the larger the city, the more difficult the calculation. Based on this, in order to simplify the three-dimensional space into a structure that is easier to process and reduce the difficulty of calculation, in step 1210, the three-dimensional space needs to be divided into a plurality of first solid spaces. The first solid space can also be understood as a pixel in a two-dimensional image, but the first solid space is a cube shape, not a point.

[0175] Further, not every first solid space has point cloud data. In order to distinguish the first solid space in which the point cloud data exists from the first solid space in which the point cloud data does not exist, the present application determines the first solid space in which the point cloud data exists as a second solid space.

[0176] It can be understood that because the point cloud data in the collected building point cloud not only has a large density, but also has too much noise and holes, it not only increases the difficulty of calculation, but also reduces the accuracy of the city three-dimensional model. The present application can determine the center point of the second solid space as the filtered point cloud data after filtering processing, so as to reduce the density of the point cloud data while maintaining its shape features and reducing the noise in the point cloud data. There are as many filtered point cloud data as there are second solid spaces in the three-dimensional space. The set composed of a plurality of filtered point cloud data can be determined as the filtered point cloud. Based on the filtered point cloud to determine the building surface information, the influence of noise and holes can be greatly reduced while maintaining the shape features of the point cloud data, thereby improving the accuracy of the building surface information.

[0177] In an embodiment, referring to Figure 13 , step 150 comprises:

[0178] Step 1310, determining the normal direction of each filtered point cloud data in the filtered point cloud based on the neighborhood radius;

[0179] Step 1320, determining the filtered point cloud data with the normal direction parallel to the horizontal plane as the wall point cloud, and determining the other filtered point cloud data except the wall point cloud as the roof point cloud.

[0180] It can be understood that since the filtered point cloud data is the point determined after filtering the point cloud data, the normal direction of the filtered point cloud data cannot be determined according to the normal direction of the point cloud data at this time, so it is necessary to determine the normal direction of the filtered point cloud data. Specifically, the method of determining the normal direction of the filtered point cloud data is similar to the steps of determining the normal direction of the point cloud data (steps 410-440 above), which will not be described here.

[0181] Further, after the normal direction of each filtered point cloud data is determined, the plurality of filtered point cloud data can be divided into wall point cloud and roof point cloud according to the normal direction. If the normal direction of the filtered point cloud data is parallel to the horizontal plane, the filtered point cloud data is determined as the wall point cloud, and if the normal direction of the filtered point cloud data is not parallel to the horizontal plane, the filtered point cloud data is determined as the roof point cloud. The wall point cloud refers to the filtered point cloud data obtained by filtering the point cloud data obtained by scanning the wall structure of the building, and when the density of the wall point cloud in a certain area is particularly high, or is particularly concentrated in a certain area, it indicates that there is a wall of the building in the area. The roof point cloud refers to the filtered point cloud data obtained by filtering the point cloud data obtained by scanning the roof structure of the building, and when the density of the roof point cloud in a certain area is particularly high, or is particularly concentrated in a certain area, it indicates that there is a roof of the building in the area.

[0182] In an embodiment, referring to Figure 14 , step 150 comprises:

[0183] Step 1410, determining a plurality of second plane regions corresponding to the wall point cloud and a plurality of third plane regions corresponding to the roof point cloud by the random sample consensus algorithm respectively;

[0184] Step 1420, dividing the three-dimensional space into a plurality of third solid spaces based on the second plane region and the third plane region;

[0185] Step 1430, performing spatial planning processing on the third solid space, and determining the building surface information based on a plurality of semantic information obtained after the spatial planning.

[0186] It can be understood that the plurality of second plane regions corresponding to the wall point cloud are determined by the random sample consensus algorithm, including: randomly selecting a plurality of wall point clouds in the plurality of wall point clouds as a parameter estimation subset of an initial wall model; fitting the initial wall model using the selected parameter estimation subset, and adding other wall point clouds in the plurality of wall point clouds except the parameter estimation subset to the initial wall model, and calculating whether the other wall point clouds are inliers; recording the number of inliers corresponding to the current initial wall model, if the number of inliers corresponding to the initial wall model exceeds a preset inlier number threshold, the initial wall model is taken as a second plane region, and the inliers corresponding to the initial wall model are removed from the wall point cloud; returning to the step of randomly selecting a plurality of wall point clouds in the plurality of wall point clouds as a parameter estimation subset of an initial wall model until the number of wall point clouds is less than a preset wall point cloud number threshold.

[0187] It can be understood that the plurality of third plane regions corresponding to the roof point cloud are determined by the random sample consensus algorithm, including: randomly selecting a plurality of roof point clouds in the plurality of roof point clouds as a parameter estimation subset of an initial roof model; fitting the initial roof model using the selected parameter estimation subset, and adding other roof point clouds in the plurality of roof point clouds except the parameter estimation subset to the initial roof model, and calculating whether the other roof point clouds are inliers; recording the number of inliers corresponding to the current initial roof model, if the number of inliers corresponding to the initial roof model exceeds a preset inlier number threshold, the initial roof model is taken as a third plane region, and the inliers corresponding to the initial roof model are removed from the roof point cloud; returning to the step of randomly selecting a plurality of roof point clouds in the plurality of roof point clouds as a parameter estimation subset of an initial roof model until the number of roof point clouds is less than a preset roof point cloud number threshold.

[0188] Further, after the second plane region and the third plane region are determined, since the second plane region and the third plane region have an intersecting relationship, the three-dimensional space can be divided into a plurality of third solid spaces based on the second plane region and the third plane region, as shown in Figure 15 and Figure 20 It can be understood that the plurality of third solid spaces correspond to the space inside the building and the space outside the building.

[0189] According to an embodiment of the present application, the semantic information refers to the structure corresponding to each third space. For example, the semantic information of the third space can be the interior of a building, and the semantic information of the third space can also be the exterior of the building. In the present application, the space planning process can also be understood as an integer programming process. The third space with the semantic information of the interior of the building is marked as 1, and the third space with the semantic information of the exterior of the building is marked as 0. Based on this, the integer programming process is performed to determine the semantic information corresponding to each third space. Finally, based on the semantic information corresponding to each third space, the building surface information can be determined.

[0190] In an embodiment, referring to Figure 16 , step 1430 includes:

[0191] Step 1610, obtaining the point cloud distribution density of the filtered point cloud data in each third space;

[0192] Step 1620, determining the semantic information corresponding to each third space based on the preset optimization condition and the point cloud distribution density;

[0193] Step 1630, taking the interface between the third space with the semantic information of the interior of the building and the third space with the semantic information of the exterior of the building as the building surface;

[0194] Step 1640, generating the building surface information based on each building surface.

[0195] It can be understood that the point cloud distribution density refers to the density of the filtered point cloud data. The greater the point cloud distribution density, the more the filtered point cloud data in the space. Since the building body has surface regularity, after obtaining the point cloud distribution density of the filtered point cloud data in each third space, the semantic information corresponding to each third space can be determined by the preset optimization condition and the point cloud distribution density of each region in each third space.

[0196] Further, in the present application, the spatial planning process can be understood as an integer programming process, the semantic information of the third space inside the building is marked as 1, and the semantic information of the third space outside the building is marked as 0, and the integer programming process is performed based on this. Specifically, the optimization condition includes: if the point cloud distribution density of multiple adjacent third spaces is greater than the preset first density threshold, the filtered point cloud data in the multiple third spaces is obtained, and the semantic information of the third space where the center point of the multiple filtered point cloud data is located is determined as the building interior (it can be understood that the third space is marked as 1); if the filtered point cloud data in two adjacent third spaces is concentrated on the interface between the two third spaces, the semantic information of the third space closest to the third space with the semantic information of the building interior is determined as the building interior (the third space is marked as 1), and the semantic information of the other third space is determined as the building exterior (the third space is marked as 0); for the third space whose semantic information is not determined, if the filtered point cloud data in the third space is not concentrated on the interface between the third space and the adjacent other third space, and the number of third spaces adjacent to the third space with the semantic information of the building interior reaches the preset planning threshold (the number of third spaces adjacent to the third space marked as 1 reaches the preset planning threshold), the semantic information of the third space is determined as the building interior (the third space is marked as 1); for the third space whose semantic information is not determined, if the filtered point cloud data in the third space is not concentrated on the interface between the third space and the adjacent other third space, and the number of third spaces adjacent to the third space with the semantic information of the building interior is less than the planning threshold (the number of third spaces adjacent to the third space marked as 1 is less than the planning threshold), the semantic information of the third space is determined as the building exterior (the third space is marked as 0).

[0197] It is conceivable that the wall of the building separates the building interior and the building exterior. Based on this, after determining the semantic information corresponding to each third space, the semantic information of the interface of the third space can be determined based on the semantic information corresponding to each third space. Specifically, the interface between the third space with the semantic information of the building interior and the third space with the semantic information of the building exterior can be regarded as the building surface. That is, the interface between the third space marked as 0 and the third space marked as 1 is regarded as the building surface. A plurality of adjacent building surfaces can be enclosed to form a closed building surface, and based on this, a plurality of closed building surfaces, i.e., building surface information, can be generated based on the generated plurality of building surfaces.

[0198] In an embodiment, with reference to Figure 17 , step 160 includes:

[0199] Step 1710, performing semantic labeling processing on the building surface information to obtain surface semantic information;

[0200] Step 1720, performing surface triangulation processing on the building footprint information, the building contour information and the building surface information based on the surface semantic information, to determine a first reconstruction model corresponding to the building footprint information, a second reconstruction model corresponding to the building contour information and a third reconstruction model corresponding to the building surface information;

[0201] Step 1730, generating a city three-dimensional model based on the first reconstruction model, the second reconstruction model and the third reconstruction model.

[0202] It can be understood that the city semantic model standard OGC CityGML3.0 requires labeling the semantics of each surface in the second level of detail LoD2, i.e., whether the surface belongs to a roof, a wall or a ground, and therefore, the building surface information corresponding to LoD2 needs to be subjected to semantic labeling processing to obtain surface semantic information.

[0203] Then, based on the surface semantic information, the building footprint information, the building contour information and the building surface information are subjected to surface triangulation processing to simplify the complex surfaces into small triangular meshes that are easy to process, to obtain the first reconstruction model corresponding to the building footprint information, the second reconstruction model corresponding to the building contour information and the third reconstruction model corresponding to the building surface information. Compared with the original data, the first reconstruction model, the second reconstruction model and the third reconstruction model can reduce the calculation amount caused by subsequent calculations. The surface triangulation processing refers to a process of dividing a complex surface into a series of connected but non-overlapping triangles.

[0204] Finally, by integrating the first reconstruction model, the second reconstruction model and the third reconstruction model, a city three-dimensional model can be obtained. In this application, the city three-dimensional model can not only be a visual three-dimensional model, but also a CityJson file, i.e., a file format conforming to the city semantic model standard OGC CityGML3.0.

[0205] In an embodiment, with reference to Figure 18 , step 1710 includes:

[0206] Step 1810, calculating the distance between each filtered point cloud data and the building surface in the building surface information, sorting the filtered point cloud data from near to far according to the distance between the filtered point cloud data and the building surface, and determining the maximum number of neighborhood points of the filtered point cloud data sorted in the front as candidate filtered point cloud data;

[0207] Step 1820, if the average value of the distances between the plurality of candidate filtered point cloud data and the ground is less than a preset distance threshold, the surface semantic information of the building surface is determined as the ground;

[0208] Step 1830, if the proportion of the number of candidate filtered point cloud data as roof point cloud and the total number of candidate filtered point cloud data is greater than a first proportion threshold, and the average value of the distances between the plurality of candidate filtered point cloud data and the ground is greater than the distance threshold, the surface semantic information of the building surface is determined as the roof.

[0209] Step 1840, for the building surface whose surface semantic information has not been determined, the surface semantic information of the building surface is determined as the wall surface.

[0210] It can be understood that, in order to determine the semantics corresponding to each building surface in the building surface information, it is necessary to first calculate the distance between each filtered point cloud data and the building surface. Specifically, assuming that the filtered point cloud data can be represented as (x0, y0, z0) in a three-dimensional space, and the building surface can be represented as ax+by+cz+d=0 in the three-dimensional space. Then the distance between the filtered point cloud data and the building surface is

[0211] After the distance between each filtered point cloud data and the building surface is determined, the filtered point cloud data can be sorted from near to far according to the distance between the filtered point cloud data and the building surface, so as to determine the several filtered point cloud data closest to the building surface, i.e. the maximum number of neighborhood points of the filtered point cloud data sorted in the front. In order to distinguish the several filtered point cloud data closest to the building surface from other filtered point cloud data, the several filtered point cloud data are determined as candidate filtered point cloud data.

[0212] According to the embodiments of the present application, if the average value of the distances between the plurality of candidate filtered point cloud data and the ground is less than a preset distance threshold, it indicates that the distances between most candidate filtered point cloud data of the building surface and the ground are very small, and the surface semantic information of the building surface can be determined as the ground. The distance threshold refers to the maximum value of the average value of the distances between the candidate filtered point cloud data and the ground on the building surface whose semantic information is allowed to be the ground.

[0213] If the proportion of the number of candidate filtered point cloud data as roof point cloud and the total number of candidate filtered point cloud data is greater than a first proportion threshold, and the average value of the distances between the plurality of candidate filtered point cloud data and the ground is greater than the distance threshold, it indicates that most candidate filtered point cloud data of the building surface are roof point cloud, and the distances between these candidate filtered point cloud data and the ground are relatively large, and at this time the surface semantic information of the building surface can be determined as the roof.

[0214] Since the building surfaces in the LoD2 level of the city semantic model standard can have three semantics, namely ground, roof and wall, in the above steps, the building surfaces whose surface semantic information is ground and the building surfaces whose surface semantic information is roof have been determined, and the surface semantic information of the building surfaces whose surface semantic information has not been determined can be determined as wall.

[0215] In an embodiment, referring to Figure 19 , step 1730 comprises:

[0216] Step 1910, performing semantic normalization processing on the first reconstruction model, the second reconstruction model and the third reconstruction model to obtain a first geometric attribute corresponding to the first reconstruction model, a second geometric attribute corresponding to the second reconstruction model and a third geometric attribute corresponding to the third reconstruction model.

[0217] Step 1920, determining the first geometric attribute as a first detail level of the city three-dimensional model, determining the second geometric attribute as a second detail level of the city three-dimensional model, and determining the third geometric attribute as a third detail level of the city three-dimensional model.

[0218] Step 1930, generating the city three-dimensional model based on the first detail level, the second detail level and the third detail level.

[0219] It can be understood that the expressions of the first reconstruction model, the second reconstruction model and the third reconstruction model are different, in order to facilitate better understanding and processing in the subsequent, the first reconstruction model, the second reconstruction model and the third reconstruction model can be subjected to semantic normalization processing. Among them, semantic normalization processing refers to converting the vocabulary and grammar structure in the three reconstruction models into a unified standard form.

[0220] Further, when the expression form of the city three-dimensional model is a file in the city semantic model standard OGC CityGML3.0 format, after the first geometric attribute corresponding to the first reconstruction model, the second geometric attribute corresponding to the second reconstruction model and the third geometric attribute corresponding to the third reconstruction model are determined, the first geometric attribute can be written into the file in the LoD0 level corresponding to the city three-dimensional model, that is, the first geometric attribute is determined as the first detail level of the city three-dimensional model. Similarly, the second geometric attribute can be written into the file in the LoD1 level corresponding to the city three-dimensional model, that is, the second geometric attribute is determined as the second detail level of the city three-dimensional model. The third geometric attribute can be written into the file in the LoD2 level corresponding to the city three-dimensional model, that is, the third geometric attribute is determined as the third detail level of the city three-dimensional model. Based on the above steps, a file conforming to the city semantic model standard OGC CityGML3.0 format can be generated.

[0221] In a second aspect, referring to Figure 21 The embodiment of the present application provides an electronic device, comprising:

[0222] at least one memory 200;

[0223] at least one processor 100;

[0224] at least one program;

[0225] The program is stored in the memory 200, and the processor 100 executes the at least one program to implement:

[0226] The method for constructing the city three-dimensional model according to any one of the embodiments of the first aspect of the present application.

[0227] The processor 100 and the memory 200 can be connected through a bus or other means.

[0228] The memory 200 is a kind of non-transient readable storage medium, and can be used to store non-transient software instructions and non-transient instructions.In addition, the memory 200 can include high-speed random access memory 200, and can also include non-transient memory 200, such as at least one magnetic disk storage device 200, flash memory device or other non-transient solid-state memory device 200.It can be understood that the memory 200 can optionally include a memory 200 remotely arranged relative to the processor 100, and these remote memories 200 can be connected to the processor 100 through a network.The examples of the above-mentioned network include but are not limited to the Internet, intranet, local area network, mobile communication network and combination thereof.

[0229] The processor 100 runs the non-transient software instructions, instructions and signals stored in the memory 200, so as to various functional applications and data processing, that is, to implement the method for constructing the city three-dimensional model of the above-mentioned first aspect embodiment.

[0230] The non-transient software instructions and instructions required for implementing the method for constructing the city three-dimensional model of the above-mentioned embodiment are stored in the memory 200, and when executed by the processor 100, the method for constructing the city three-dimensional model of the first aspect embodiment of the present application is executed, for example, the method steps S110 to S160 in the above description Figure 1 , the method steps S310 to S320 in Figure 3 , steps S410 to S440 in Figure 4 , steps S510 to S520 in Figure 5 , steps S710 to S730 in Figure 7 , steps S910 to S930 in Figure 9 , steps S1010 to S1030 in Figure 10 , steps S1010 to S1030 in Figure 12steps S1210 to S1220 in the method of FIG. 11, Figure 13 steps S1310 to S1320 in the method of FIG. 13, Figure 14 steps S1410 to S1430 in the method of FIG. 14, Figure 16 steps S1610 to S1640 in the method of FIG. 16, Figure 17 steps S1710 to S1730 in the method of FIG. 17, Figure 18 steps S1810 to S1840 in the method of FIG. 18, Figure 19 steps S1910 to S1930 in the method of FIG. 19.

[0231] In a third aspect, the embodiments of the present application provide a computer readable storage medium, which stores computer executable signals, and the computer executable signals are used to execute the following steps:

[0232] the method of constructing a city three-dimensional model according to any one of the embodiments of the first aspect of the application.

[0233] For example, the method steps S110 to S160 in the method of FIG. 11, Figure 1 the method steps S310 to S320 in the method of FIG. 13, Figure 3 the steps S410 to S440 in the method of FIG. 14, Figure 4 the steps S510 to S520 in the method of FIG. 16, Figure 5 the steps S710 to S730 in the method of FIG. 17, Figure 7 the steps S910 to S930 in the method of FIG. 19, Figure 9 the steps S1010 to S1030 in the method of FIG. 11, Figure 10 the steps S1210 to S1220 in the method of FIG. 11, Figure 12 the steps S1310 to S1320 in the method of FIG. 13, Figure 13 the steps S1410 to S1430 in the method of FIG. 14, Figure 14 the steps S1610 to S1640 in the method of FIG. 16, Figure 16 the steps S1710 to S1730 in the method of FIG. 17, Figure 17 the steps S1810 to S1840 in the method of FIG. 18, Figure 18 the steps S1910 to S1930 in the method of FIG. 19. Figure 19 The device embodiments described above are merely illustrative, wherein the units illustrated as separate components can or can not be physically separate, and the components illustrated as units can or can not be physical units, i.e., can be located in one place, or can be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purposes of the embodiments.

[0234]

[0235] ​From the description of the above embodiments, those skilled in the art can understand that all or some steps in the method disclosed above can be implemented as software, firmware, hardware and appropriate combinations thereof. Some or all physical components can be implemented as software executed by a processor such as a central processing unit, a digital signal processor or a microprocessor, or as hardware, or as an integrated circuit such as an application specific integrated circuit. Such software can be distributed on a readable medium, which can include computer storage media (or non-transitory media) and communication media (or transitory media). As known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable signals, data structures, instruction modules or other data. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and can be accessed by a computer. Furthermore, as known to those skilled in the art, communication media typically includes computer readable signals, data structures, instruction modules or other data in modulated data signals such as carrier waves or other transport mechanisms, and can include any information delivery medium.

[0236] The above detailed description of the embodiments of the present application is made in conjunction with the accompanying drawings, but the present application is not limited to the above embodiments. Within the scope of knowledge possessed by those skilled in the art, various changes can be made without departing from the purpose of the present application.

Claims

1. A method of constructing a city three-dimensional model, characterized by, The method comprises: obtaining building point cloud of a city and preset processing parameters, wherein the preset processing parameters comprise a neighborhood radius; determining a normal direction of each point cloud data in the building point cloud based on the neighborhood radius; dividing the point cloud data in the building point cloud into vertical point cloud and non-vertical point cloud based on the normal direction, determining a plurality of first plane regions corresponding to the vertical point cloud, and determining building footprint information based on the projection of the non-vertical point cloud on the first plane region; the determination of the plurality of first plane regions corresponding to the vertical point cloud comprises: projecting the vertical point cloud onto a horizontal first plane; dividing the first plane into a plurality of plane grids, and determining the projection of the vertical point cloud on the plane grid as a first voxel point; performing straight line detection processing on the first voxel point through a random sample consensus algorithm to obtain a plurality of projection straight lines; and dividing the first plane into a plurality of first plane regions based on the projection straight lines; the preset processing parameters further comprise a projection threshold, and the determination of the building footprint information based on the projection of the non-vertical point cloud on the first plane region comprises: projecting the non-vertical point cloud onto the first plane; dividing the first plane into a plurality of plane grids, and determining the projection of the non-vertical point cloud on the plane grid as a second voxel point; for each first plane region, calculating the projection area of the second voxel point in the first plane region, and if the ratio of the projection area of the second voxel point to the area of the first plane region reaches the projection threshold, determining the first plane region as the building footprint information; generating building contour information based on the height of the non-vertical point cloud projected in the first plane region; performing filtering processing on the point cloud data, dividing the filtered point cloud after filtering processing into wall point cloud and roof point cloud, and performing spatial division on a three-dimensional space based on the wall point cloud and the roof point cloud to obtain building surface information; the filtering processing on the point cloud data comprises: dividing the three-dimensional space into a plurality of first solid spaces, and determining the first solid space in which the point cloud data exists as a second solid space; determining the center point of the second solid space as the filtered point cloud data after filtering processing, and taking the set of the filtered point cloud data as the filtered point cloud; performing semantic information standardization processing on the building footprint information, the building contour information and the building surface information to obtain a city three-dimensional model.

2. The method of claim 1, wherein The method comprises: obtaining the preset processing parameters and a point cloud file path, wherein the point cloud file path indicates the storage location of the building point cloud; reading the building point cloud based on the point cloud file path.

3. The method of claim 1, wherein The preset processing parameters further comprise a maximum number of neighborhood points, and the determination of the normal direction of each point cloud data in the building point cloud based on the neighborhood radius comprises: for each point cloud data in the building point cloud, determining a plurality of neighborhood point cloud data in a neighborhood range centered on the point cloud data and with the neighborhood radius as the radius; The neighborhood point cloud data is sorted from near to far according to the distance between the neighborhood point cloud data and the point cloud data, and the maximum neighborhood point number of the neighborhood point cloud data sorted in the front is determined as candidate neighborhood point cloud data; A point cloud covariance of each of the candidate neighborhood point cloud data and the point cloud data is calculated, and a fitting process is performed based on the point cloud covariance to obtain a fitting plane; A normal vector of the fitting plane is determined as a normal direction of the point cloud data.

4. The method of claim 1, wherein The straight line detection process on the first voxel points by the random sample consensus algorithm obtains a plurality of projection straight lines, including: Each of the first voxel points in two different plane grids is selected, and fitting is performed on the two first voxel points to obtain a plane fitting straight line; The distance from other first voxel points except the first voxel points at both ends of the plane fitting straight line to the plane fitting straight line is calculated, and if the distance from the first voxel point to the plane fitting straight line is less than a preset distance threshold, the first voxel point is determined as an in-point corresponding to the plane fitting straight line; For each plane fitting straight line, when the number of in-points corresponding to the plane fitting straight line reaches a preset in-point threshold, the plane fitting straight line is determined as the projection straight line, and the first voxel points at both ends of the plane fitting straight line and the in-points corresponding to the plane fitting straight line are removed from the plurality of first voxel points, and the step of selecting each of the first voxel points in two different plane grids is returned until the number of first voxel points is less than a preset voxel point number threshold, or the number of times of fitting on the two first voxel points reaches a preset fitting number threshold.

5. The method of claim 1, wherein The building contour information is generated based on the height of the non-vertical point cloud projected in the first plane region, including: If the first plane region is the building footprint information, a point cloud height average value is determined based on the height of a plurality of non-vertical point clouds projected in the first plane region; The first plane region is taken as a building cross section, and the point cloud height average value is taken as a building height, and a building prism is generated based on the building cross section and the building height; The building contour information is generated based on a plurality of building prisms.

6. The method of claim 1, wherein The filtered point cloud after the filtering process is divided into a wall point cloud and a roof point cloud, including: A normal direction of each of the filtered point cloud data in the filtered point cloud is determined based on the neighborhood radius; The filtered point cloud data with the normal direction parallel to the horizontal plane is determined as the wall point cloud, and the other filtered point cloud data except the wall point cloud is determined as the roof point cloud.

7. The method of claim 1, wherein The three-dimensional space is spatially divided based on the wall point cloud and the roof point cloud to obtain building surface information, including: A plurality of second plane regions corresponding to the wall point cloud and a plurality of third plane regions corresponding to the roof point cloud are respectively determined by a random sample consensus algorithm; The three-dimensional space is divided into a plurality of third solid spaces based on the second plane regions and the third plane regions; The third stereoscopic space is subjected to spatial planning processing, and the building surface information is determined based on a plurality of semantic information obtained after spatial planning.

8. The method of claim 7, wherein, The spatial planning processing of the third stereoscopic space and the determination of the building surface information based on a plurality of semantic information obtained after spatial planning comprises: obtaining a point cloud distribution density of filtered point cloud data in each third stereoscopic space; determining semantic information corresponding to each third stereoscopic space based on a preset optimization condition and the point cloud distribution density; regarding an interface between the third stereoscopic space with the semantic information being inside the building and the third stereoscopic space with the semantic information being outside the building as a building surface; generating the building surface information based on each building surface.

9. The method of claim 8, wherein, The optimization condition comprises: if the point cloud distribution densities of a plurality of adjacent third stereoscopic spaces are all greater than a preset first density threshold, obtaining the filtered point cloud data in the plurality of third stereoscopic spaces, and determining the semantic information of the third stereoscopic space in which the center point of the plurality of filtered point cloud data is located as inside the building; if the filtered point cloud data in two adjacent third stereoscopic spaces are both concentrated on the interface between the two third stereoscopic spaces, determining the semantic information of the third stereoscopic space closest to the third stereoscopic space with the semantic information being inside the building as inside the building, and determining the semantic information of the other third stereoscopic space as outside the building; for a third stereoscopic space without determined semantic information, if the filtered point cloud data in the third stereoscopic space is not concentrated on the interface between the third stereoscopic space and other adjacent third stereoscopic spaces, and the number of third stereoscopic spaces adjacent to the third stereoscopic space with the semantic information being inside the building reaches a preset planning threshold, determining the semantic information of the third stereoscopic space as inside the building; for a third stereoscopic space without determined semantic information, if the filtered point cloud data in the third stereoscopic space is not concentrated on the interface between the third stereoscopic space and other adjacent third stereoscopic spaces, and the number of third stereoscopic spaces adjacent to the third stereoscopic space with the semantic information being inside the building is less than the planning threshold, determining the semantic information of the third stereoscopic space as outside the building.

10. The method of claim 1, wherein The semantic information standardization processing of the building footprint information, the building contour information and the building surface information to obtain the city three-dimensional model comprises: performing semantic identification processing on the building surface information to obtain surface semantic information; respectively performing surface triangulation processing on the building footprint information, the building contour information and the building surface information based on the surface semantic information to determine a first reconstruction model corresponding to the building footprint information, a second reconstruction model corresponding to the building contour information and a third reconstruction model corresponding to the building surface information; generating the city three-dimensional model based on the first reconstruction model, the second reconstruction model and the third reconstruction model.

11. The method of constructing a city 3D model according to claim 10, wherein, The semantic identification processing of the building surface information to obtain surface semantic information comprises: For the building surface information in the building surface, the distance between each filtered point cloud data and the building surface is calculated, the filtered point cloud data is sorted from near to far according to the distance between the filtered point cloud data and the building surface, and the maximum number of neighborhood points of the filtered point cloud data sorted in front is determined as the candidate filtered point cloud data; If the average value of the distance between the plurality of candidate filtered point cloud data and the ground is less than a preset distance threshold, the surface semantic information of the building surface is determined as the ground; If the proportion of the number of candidate filtered point cloud data as roof point cloud and the total number of candidate filtered point cloud data is greater than a first proportion threshold, and the average value of the distance between the plurality of candidate filtered point cloud data and the ground is greater than the distance threshold, the surface semantic information of the building surface is determined as the roof; For the building surface whose surface semantic information has not been determined, the surface semantic information of the building surface is determined as the wall surface.

12. The method of claim 10, wherein, The generating of the urban three-dimensional model based on the first reconstruction model, the second reconstruction model and the third reconstruction model comprises: The first reconstruction model, the second reconstruction model and the third reconstruction model are subjected to semantic normalization processing to obtain a first geometric attribute corresponding to the first reconstruction model, a second geometric attribute corresponding to the second reconstruction model and a third geometric attribute corresponding to the third reconstruction model; The first geometric attribute is determined as a first detail level of the urban three-dimensional model, the second geometric attribute is determined as a second detail level of the urban three-dimensional model, and the third geometric attribute is determined as a third detail level of the urban three-dimensional model; The urban three-dimensional model is generated based on the first detail level, the second detail level and the third detail level.

13. An electronic device, comprising: Comprise: At least one memory; At least one processor; At least one program; The program is stored in the memory, and the processor executes at least one of the programs to realize: The construction method of the urban three-dimensional model according to any one of claims 1 to 12.

14. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer executable signals, and the computer executable signals are used to execute: The construction method of the urban three-dimensional model according to any one of claims 1 to 12. The computer readable storage medium stores computer executable signals, and the computer executable signals are used to execute:

Citation Information

Patent Citations

  • City building entity modeling method based on content awareness

    CN115619963A

  • Three-dimensional city building simple model reconstruction method and system based on global optimization

    CN116797758A