A method for constructing LOD2+ building models based on image segmentation network
Through the LOD2+ building model construction method based on the image segmentation network, the problem of insufficient precision of the building's 3D model is solved. By segmenting and optimizing the point cloud, a refined 3D model is generated, achieving a level of precision higher than LOD2 and efficient computing power. use.
Patent Information
- Application Number
- CN202410944259.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-15
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2044-07-15
AI Technical Summary
The existing three-dimensional model of a single building does not pay attention to the detailed structure, resulting in a model that is not precise enough and has a low degree of restoration.
The LOD2+ architectural model construction method based on the image segmentation network is used to obtain the building image through oblique photogrammetry, extract the scene MVS point cloud and digital orthophoto map, optimize the building outline, segment the building point cloud, generate Delaunay triangulation network, and fuse Generate detailed 3D models.
The precision of the three-dimensional building model is improved, bringing it close to LOD3 level, which reduces the computing power requirements, avoids the impact of interference factors, and enhances the modeling effect of the model.
Smart Images

Figure CN118470255B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of building three-dimensional model construction, and in particular to a LOD2+ building model construction method based on an image segmentation network. Background Art
[0002] The 3D model of a city is a true restoration of the city scene. It is an important carrier for expressing urban spatial information and plays an extremely important role in urban planning, management, construction, emergency response, etc. The construction of a true 3D city has become the mainstream of the information construction of "smart cities". In the urban scene, buildings are the most representative spatial entities and the main places for human activities. High-precision 3D models of urban buildings can express the geographical and other attribute information of buildings in the real world, and can promote the development of applications such as 3D comprehensive maps, urban morphology analysis, and high-precision mapping. It has extremely important significance and development prospects.
[0003] With the development of deep learning, methods based on convolutional neural networks, especially fully convolutional neural networks, can quickly, efficiently and accurately extract multi-scale and multi-type buildings in a large range. However, the restoration of building structures needs to be strengthened. Methods based on deep learning usually use some multi-feature fusion, edge attention mechanism and other methods to maintain the spatial details of buildings. However, the edges of buildings obtained by the above methods are unstable, and different imaging conditions, lighting, shadows, tree occlusions and other factors will also cause great interference to them.
[0004] The construction of a fine single-body 3D model of a building requires extracting the detailed structure of the building from the triangulated network or point cloud based on the overall structure of the building, thereby constructing a building model with different levels of detail. Current research on 3D modeling mainly generates 3D models of buildings at the LOD2 level, and basically completes the reconstruction of the roof structure. There is less research on the reconstruction of other detailed structures such as eaves, windows, balconies, etc., resulting in a single-body 3D model of the building that is not detailed enough and has a low degree of restoration. Summary of the invention
[0005] The purpose of the present invention is to provide a LOD2+ building model construction method based on an image segmentation network to solve the problem that the existing single-body three-dimensional model of a building does not pay attention to the detailed structure, resulting in the three-dimensional model being not fine enough and having a low degree of restoration.
[0006] To achieve the above object, the present invention provides the following technical solution: a method for constructing a LOD2+ building model based on an image segmentation network, wherein the method for constructing a three-dimensional building model comprises the following steps:
[0007] S1. Obtaining a building image by oblique photogrammetry, wherein the building image includes at least one single building;
[0008] S2, acquiring the corresponding scene MVS point cloud and digital orthophoto map according to the building image;
[0009] S3, extracting the building outline according to the digital orthophoto map;
[0010] S4, optimizing the outline of the building;
[0011] S5. Acquire a single building point cloud corresponding to any single building according to the optimized building outline and the scene MVS point cloud;
[0012] S6. Extracting a point cloud of a single building detail part according to the single building point cloud, wherein the point cloud of the single building detail part includes a roof point cloud, a first type of facade point cloud, and a second type of facade point cloud;
[0013] S7, segmenting the second type of facade point cloud into multiple fine facade point clouds by a segmentation method;
[0014] S8. Generate a Delaunay triangulation based on the roof point cloud, the first type of facade point cloud and the plurality of fine facade point clouds, splice the Delaunay triangulations, and fuse them to generate a fine three-dimensional model of the single building.
[0015] Preferably, the above step S6 includes the following steps:
[0016] S61, segmenting the single building point cloud by using the RANSAC algorithm to form a roof point cloud and a facade point cloud, and dividing the facade point cloud into a first type of facade point cloud or a second type of facade point cloud;
[0017] S62: Segment the facade point cloud to obtain the second-category facade point cloud or the first-category facade point cloud.
[0018] Preferably, the facade point cloud in the above step S61 includes a front facade point cloud, a rear facade point cloud, a left facade point cloud and a right facade point cloud, and the method of classifying the facade point cloud into the first type of facade point cloud or the second type of facade point cloud is:
[0019] Classify the facade point clouds whose floating distance difference Q along the facade normal vector direction is not greater than a threshold value d in the facade point clouds as the first type of facade point clouds;
[0020] The facade point clouds whose floating distance difference Q along the facade normal vector direction is greater than a threshold value d are classified into the second type of facade point clouds.
[0021] Preferably, the segmentation method in the above step S7 is: dividing the second type of facade point cloud into n layers with equal width along the direction of the facade normal vector, traversing the points in the second type of facade point cloud to obtain point cloud sets P of different levels, and then using the (R, G, B) information of the point cloud mapping to construct the space-grayscale similarity quantization value M of the point clouds of different levels:
[0022]
[0023] Where t represents the number of points in the outermost point cloud set, o represents the number of points in the point cloud set adjacent to the outermost layer along the vertical normal vector direction, p(r,g,b) is the RGB value of the outermost point cloud set, q(r,g,b) is the RGB value of the point cloud set adjacent to the outermost layer, p(x,y,z) is the spatial position of the outermost point cloud set, q(x,y,z) is the spatial position of the point cloud set adjacent to the outermost layer, and k is the weighting factor of the normalized image distance and the set distance;
[0024] when , is the similarity threshold, merging the two layers of point cloud sets;
[0025] when , save the outermost point cloud set separately, and after traversing all the point cloud sets P, accurately divide the second type of facade point cloud into a plurality of the fine facade point clouds.
[0026] Preferably, the above step S6 further includes the following steps:
[0027] The roof point cloud is divided into roof surface point cloud and other part point cloud by RANSAC algorithm, and the average elevation Z of the roof surface point cloud is determined. roof ;
[0028] Project the elevations of the other part of the point cloud to the average elevation Z roof , traverse the points in the other part of the point cloud, and extract the points whose height is less than or equal to Z roof Points are used to form the eaves point cloud, and the points with height greater than Z are extracted. roof points to form the parapet point cloud.
[0029] Preferably, the method of segmenting the first type of facade point cloud or the second type of facade point cloud from the facade point cloud in the above step S62 is: determining the midpoint H along the direction of the facade normal vector according to the first type of facade point cloud or the second type of facade point cloud, and determining the ordinate Z of the lowest point in the eaves point cloud. min ;
[0030] Project the facade point cloud to the midpoint H along the facade normal vector direction, traverse the points in the facade point cloud, and extract the points whose distance from the midpoint H along the facade normal vector direction is not greater than Q / 2 and whose ordinate is less than Z min The points are saved separately to form the first type of facade point cloud;
[0031] Extract the points whose distance from the midpoint H along the vertical normal direction is greater than Q / 2 and whose ordinate is less than Z min The points are saved to form the second type of facade point cloud.
[0032] Preferably, the building outline optimization method in step S4 above comprises the following steps:
[0033] S41, extracting edges by using a Canny operator and encoding the outline of the building, and deleting background spots by using aspect ratio and rectangularity;
[0034] S42, optimizing the building outline by using Douglas-Peucker algorithm to reduce the number of points contained in the building outline;
[0035] S43, determining a plurality of candidate directions according to the orientations of each individual building in the building image, wherein the angle difference between two adjacent candidate directions is not less than 15°;
[0036] S44, determine the main direction and center of gravity of the single building, and use the candidate direction contribution value M ɑ Determine the main direction, M ɑ The calculation method is:
[0037]
[0038] Where: is the angle threshold of the candidate direction, β is the angle difference between the building edge and the candidate direction, D l is the length of the building side; when the angle difference between the direction of the building side and the candidate direction is less than When the building edge contributes to the candidate direction, all the building edges in the candidate direction The sum of the contribution values of the building edges within the range to the candidate directions is the total contribution value of the candidate directions, and the candidate direction with the highest total contribution value is the main direction;
[0039] Determine the center of gravity of the building outline as C (x i ,y i );
[0040] S45. Optimize the building outline by using the main direction of the building outline and the center of gravity of the building outline.
[0041] Based on another object of the present invention, the present invention provides the following technical solution: a building three-dimensional model construction system based on an image segmentation network, comprising:
[0042] A data acquisition module, used for obtaining a building image by oblique photogrammetry, wherein the building image includes at least one single building;
[0043] A data preliminary processing module is used to obtain the corresponding scene MVS point cloud and digital orthophoto map according to the building image;
[0044] A contour extraction module, used for extracting the building contour according to the digital orthophoto map;
[0045] An optimization module, used for optimizing the building outline;
[0046] A point cloud extraction module, used for obtaining a single building point cloud corresponding to any single building according to the optimized building outline and the scene MVS point cloud;
[0047] A point cloud segmentation module, used for extracting a point cloud of a single building detail part according to the single building point cloud, wherein the point cloud of the single building detail part includes a roof point cloud, a first type of facade point cloud and a second type of facade point cloud;
[0048] A second type of facade point cloud segmentation module, which segments the second type of facade point cloud into multiple fine facade point clouds by a segmentation method;
[0049] The splicing and fusion module generates a Delaunay triangulation based on the roof point cloud, the first type of facade point cloud and multiple fine facade point clouds, splices the Delaunay triangulation, and fuses them to generate a fine three-dimensional model of the single building.
[0050] Based on another purpose of the present invention, the present invention provides the following technical solution: a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the construction method as described above when executing the computer program.
[0051] Based on another object of the present invention, the present invention provides the following technical solution: a storage medium having a computer program stored thereon, and the computer program implements the above-mentioned construction method when executed by a processor.
[0052] Compared with the prior art, the present invention has the following beneficial effects: extracting the point cloud of a single building by extracting the outline of the building, and in the process of extraction, the outline of objects that are obviously not buildings can be excluded according to the area of the building outline, so as to avoid the interference of vegetation and the like in the construction of the three-dimensional model of the building. After obtaining the point cloud of the single building, the point cloud of the single building is segmented, and the first type of facade point cloud, the roof point cloud and the second type of facade point cloud are separated. Different processing decisions are taken for the roof point cloud, the first type of facade point cloud and the second type of facade point cloud. Through this multi-decision processing method, the requirements for computing power are reduced, and computing power is saved and waste of computing power is avoided while ensuring the molding effect of the three-dimensional model of the building. The first type of facade point cloud is usually a simple flat facade, and the second type of facade point cloud includes the basic flat facade and components connected to the basic flat facade and displaced along the facade normal vector direction, including balconies, window sills, windows and other different components displaced in the facade normal vector direction. The second type of facade point cloud is segmented, so that the balconies, window sills, windows and different components displaced in the facade normal vector direction are separated from the basic flat facade, and then spliced through the Delaunay triangulation, so as to make the three-dimensional model of the building more refined, and the three-dimensional model of the building can be made higher than the LOD2 (basic model) level and close to the LOD3 (standard model) level. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0054] Figure 1 A technical roadmap for a LOD2+ building model construction method based on image segmentation network;
[0055] Figure 2 It is a schematic diagram of the system structure of the present invention;
[0056] Figure 3 This is the flow chart for extracting point cloud of detailed parts of a single building.
[0057] In the figure: 100, data acquisition module; 200, data preliminary processing module; 300, contour extraction module; 400, optimization module; 500, point cloud extraction module; 600, point cloud segmentation module; 700, second type facade point cloud segmentation module; 800, splicing and fusion module. DETAILED DESCRIPTION
[0058] In order to enable those skilled in the art to better understand the solution of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0059] In this article, the terms "upper, lower, inside, outside" and the like are established based on the positional relationships shown in the drawings. The corresponding positional relationships may also change depending on the drawings, and therefore cannot be understood as absolute limitations on the scope of protection; moreover, relational terms such as "first" and "second" and the like are merely used to distinguish one component from another with the same name, and do not necessarily require or imply any actual relationship or order between these components.
[0060] Embodiment 1
[0061] like Figure 1 , Figure 3 As shown, the present embodiment provides a method for constructing a LOD2+ building model based on an image segmentation network, and the method for constructing a three-dimensional building model includes the following steps: S1, obtaining a building image through oblique photogrammetry, wherein the building image includes at least one single building; S2, obtaining a corresponding scene MVS point cloud and a digital orthophoto map according to the building image; S3, extracting the building outline according to the digital orthophoto map; S4, optimizing the building outline; S5, obtaining a single building point cloud corresponding to any single building according to the optimized building outline and the scene MVS point cloud; S6, extracting a single building detail point cloud according to the single building point cloud, wherein the single building detail point cloud includes a roof point cloud, a first type of facade point cloud, and a second type of facade point cloud; S7, segmenting the second type of facade point cloud into a plurality of fine facade point clouds through a segmentation method; S8, generating a Delaunay triangulation network based on the roof point cloud, the first type of facade point cloud, and the plurality of fine facade point clouds, splicing the Delaunay triangulation network, and fusing them to generate a refined three-dimensional model of the single building.
[0062] Specifically, the point cloud of a single building is extracted by extracting the outline of the building. During the extraction process, the outline of objects that are obviously not buildings can be excluded according to the area of the building outline to avoid interference of vegetation and the like in the construction of the building's three-dimensional model. After obtaining the point cloud of a single building, the point cloud of the single building is segmented, and the first-category facade point cloud, the roof point cloud, and the second-category facade point cloud are separated. Different processing decisions are made for the roof point cloud, the first-category facade point cloud, and the second-category facade point cloud. This multi-decision processing method reduces the requirements for computing power, saves computing power, and avoids waste of computing power while ensuring the molding effect of the building's three-dimensional model. The first type of facade point cloud is usually a simple flat facade, and the second type of facade point cloud includes the basic flat facade and components connected to the basic flat facade and displaced along the facade normal vector direction, including balconies, window sills, windows and other different components displaced in the facade normal vector direction. The second type of facade point cloud is segmented, so that the balconies, window sills, windows and different components displaced in the facade normal vector direction are separated from the basic flat facade, and then spliced through the Delaunay triangulation, so as to make the three-dimensional model of the building more refined, and the three-dimensional model of the building can be made higher than the LOD2 (basic model) level and close to the LOD3 (standard model) level.
[0063] In detail, the method for constructing a three-dimensional model of a building includes: after using an unmanned aerial vehicle to obtain images within a detection area through oblique photogrammetry, using Context Capture oblique photography software to automatically process the images obtained by the unmanned aerial vehicle, obtaining MVS point clouds and digital orthophoto images within the measurement area, extracting building outlines according to the digital orthophoto images, optimizing the building outlines, obtaining a single building point cloud corresponding to any single building according to the optimized building outlines and scene MVS point clouds, extracting single building detail point clouds according to the single building point clouds, the single building detail point clouds including roof point clouds, first-class facade point clouds and second-class facade point clouds, segmenting the second-class facade point clouds into multiple fine facade point clouds through a segmentation method, generating a Delaunay triangulation network based on the roof point cloud, the first-class facade point cloud and the multiple fine facade point clouds, splicing the Delaunay triangulation network, and fusing them to generate a refined three-dimensional model of the single building.
[0064] The above step S3 further includes the following steps:
[0065] S31, establishing a building outline extraction dataset, the building outline extraction dataset includes building blocks clipped from the digital orthophoto map, and the building outline extraction dataset also includes non-building blocks; adding non-building blocks can balance the building outline extraction dataset, preferably, the proportion of non-building blocks in the building outline extraction dataset is 15%-30%, more preferably, the proportion of non-building blocks in the building outline extraction dataset is 20%;
[0066] S32, image segmentation network training, using the image segmentation network to train in the building outline extraction data set to obtain a building outline extraction model, and using the building outline extraction model to extract the building outline. The image segmentation network is preferably U-net.
[0067] The building outline obtained by using U-net is composed of irregular broken lines, which does not conform to people's traditional cognition and the building outline in the real world. The building outline needs to be optimized. Preferably, morphological operations are first used to optimize the building outline.
[0068] Furthermore, the building outline optimization method in the above step S4 includes the following steps: S41, extracting edges and encoding the building outline through the Canny (edge detection) operator, and deleting background spots using the aspect ratio and rectangularity; S42, optimizing the building outline using the Douglas-Peucker algorithm to reduce the number of points contained in the building outline; S43, determining a number of candidate directions according to the orientation of each individual building in the building image, preferably determining 5 candidate directions, and the angle difference between two adjacent candidate directions is not less than 15°; S44, determining the main direction and center of gravity of the individual building, and using the candidate direction contribution value M ɑ Determine the main direction, M ɑ The calculation method is:
[0069]
[0070] Where: is the angle threshold of the candidate direction, β is the angle difference between the building edge and the candidate direction, D l is the length of the building side; when the angle difference between the direction of the building side and the candidate direction is less than When , the building edge contributes to the candidate direction, and all the building edges in the candidate direction The sum of the contribution values of the building edges within the range to the candidate directions is the total contribution value of the candidate directions, and the candidate direction with the highest total contribution value is the main direction;
[0071] Determine the center of gravity of the building outline as C (x i ,y i ), the centroid of the building outline can be obtained by using the first-order moment of the image. Of course, other geometric calculation methods can also be used to obtain the centroid of the building outline, which is not specifically limited here;
[0072] S45. Optimize the building outline using the main direction of the building outline and the center of gravity of the building outline. Through the main direction and the center of gravity, the corners in the building outline that are less than 100° and greater than 80° are optimized to an angle of 90° toward the center of gravity. Through the above-mentioned square-angle operation, the extracted building outline is made more consistent with the outline of the actual building.
[0073] The method for obtaining the single building point cloud in the above step S5 is: taking the optimized building outline of any building as the boundary, obtaining the point cloud within the building outline in the MVS point cloud, and the point cloud within the building outline is the single building point cloud of any building. The single building point cloud is extracted by the building outline. In the extraction process, the outline of objects that are obviously not buildings can be excluded according to the area of the building outline to avoid vegetation and other interferences in the construction of the building model.
[0074] Furthermore, the above step S6 includes the following steps: S61, segmenting the point cloud of the single building through the RANSAC (RANdom SAmpleConsensus) algorithm to form a roof point cloud and a facade point cloud, and dividing the facade point cloud into a first-class facade point cloud or a second-class facade point cloud; S62, segmenting the facade point cloud to obtain a second-class facade point cloud or a first-class facade point cloud. The facade point cloud is divided into a first-class facade point cloud or a second-class facade point cloud, and different processing decisions are taken for the roof point cloud, the first-class facade point cloud or the second-class facade point cloud. This multi-decision processing method is used to reduce the requirements for computing power.
[0075] The above step S6 also includes the following steps: segmenting the roof point cloud into the roof surface point cloud and other part point clouds by using the RANSAC algorithm, determining the average elevation Z of the roof surface point cloud roof , mean elevation Z roof is the mean of the ordinates of all points in the roof surface point cloud, where the direction of the ordinate is the height direction of the building;
[0076] Project the elevation of the other part of the point cloud to the average elevation Z roof , traverse the points in the other part of the point cloud and extract the points whose height is less than or equal to Z roof Points are used to form the eaves point cloud, and points with a height greater than Z are extracted. roof points to form the parapet point cloud.
[0077] Furthermore, the facade point cloud in the above step S61 includes a front facade point cloud, a rear facade point cloud, a left facade point cloud and a right facade point cloud, and the method of dividing the facade point cloud into the first category of facade point clouds or the second category of facade point clouds is: the facade point clouds in which the floating distance difference Q along the direction of the facade normal vector is not greater than the threshold value d are classified into the first category of facade point clouds; the facade point clouds in which the floating distance difference Q along the direction of the facade normal vector is greater than the threshold value d are classified into the second category of facade point clouds. The facade point cloud includes the front facade point cloud, the rear facade point cloud, the left facade point cloud and the right facade point cloud. In the judgment process, the facade point cloud is first divided into the front facade point cloud, the rear facade point cloud, the left facade point cloud and the right facade point cloud, and then the front facade point cloud, the rear facade point cloud, the left facade point cloud or the right facade point cloud are judged separately to determine whether it is the first type of facade point cloud or the second type of facade point cloud. The threshold d is preferably between 5dm-10dm, and more preferably, the threshold d is 5dm. The floating distance difference Q refers to the distance difference between the points in each facade point cloud along the facade normal vector direction.
[0078] Furthermore, the segmentation method in the above step S7 is: divide the second type of facade point cloud into n layers with equal width along the direction of the facade normal vector, traverse the points in the second type of facade point cloud to obtain point cloud sets P of different levels, and then use the (R, G, B) information of the point cloud mapping to construct the space-grayscale similarity quantization value M of the point clouds of different levels:
[0079]
[0080] Where t represents the number of points in the outermost point cloud set, o represents the number of points in the point cloud set adjacent to the outermost layer along the direction of the vertical normal vector, p(r,g,b) is the RGB value of the outermost point cloud set, q(r,g,b) is the RGB value of the point cloud set adjacent to the outermost layer, p(x,y,z) is the spatial position of the outermost point cloud set, q(x,y,z) is the spatial position of the point cloud set adjacent to the outermost layer, and k is the weighting factor of the normalized image distance and the set distance;
[0081] when , is the similarity threshold, Preferably 4cm-10cm, more preferably Equal to 6cm, merge two layers of point cloud sets, the RGB value of the merged point cloud set is the average of the RGB values of the two layers of point cloud sets before merging;
[0082] when , save the outermost point cloud set, and after traversing all point cloud sets P, accurately divide the second type of facade point cloud into several fine facade point clouds. When determining that the outermost point cloud set and the inner point cloud set do not belong to the same wall, for example, the outermost point cloud set is a component such as a balcony, window sill or window, and the inner point cloud set is the basic facade, at this time, saving the outermost point cloud set separately can distinguish different components, which is conducive to improving the refinement of the building's three-dimensional model.
[0083] Furthermore, the method for segmenting the first type of facade point cloud or the second type of facade point cloud from the facade point cloud in the above step S62 is: determining the midpoint H along the direction of the facade normal vector according to the first type of facade point cloud or the second type of facade point cloud, and determining the ordinate Z of the lowest point in the eaves point cloud. min ;
[0084] Project the facade point cloud to the midpoint H along the direction of the facade normal vector, traverse the points in the facade point cloud, and extract the points whose distance from the midpoint H along the direction of the facade normal vector is not greater than Q / 2 and whose ordinate is less than Z min The points are saved to form the first type of facade point cloud; extract the points whose distance from the midpoint H along the facade normal vector direction is greater than Q / 2 and whose ordinate is less than Z min The points are saved separately to form the second type of facade point cloud.
[0085] When a building has indoor balconies, window sills and other structures, drones will take pictures of the interior of the building from multiple angles, resulting in a large number of internal point clouds when generating MVS point clouds. This will cause holes to appear in some areas of the facade when RANSAC point cloud segmentation is performed. The holes will seriously affect the effect of the formed 3D model of the building.
[0086] Furthermore, the above step S61 further includes the following steps: segmenting the single building point cloud by the RANSAC algorithm to form an internal point cloud; taking the vertical coordinate Z of the lowest point in the eaves point cloud as min For constraint, the internal point cloud is segmented by the RANSAC algorithm to form a local internal point cloud connected to the second type of facade point cloud or the first type of facade point cloud, and the local internal point cloud connected to the second type of facade point cloud or the first type of facade point cloud is projected to the connected second type of facade point cloud or the first type of facade point cloud to fill the second type of facade point cloud or the first type of facade point cloud.
[0087] Embodiment 2
[0088] The same parts in this embodiment as those in the first embodiment are given the same figure marks, and the same text descriptions are omitted.
[0089] like Figure 2As shown, the present embodiment discloses a building three-dimensional model construction system based on an image segmentation network. The construction system uses the construction method in the first embodiment, including: a data acquisition module 100, which is used to obtain a building image through oblique photogrammetry, wherein the building image includes at least one single building; a data preliminary processing module 200, which is used to obtain a corresponding scene MVS point cloud and a digital orthophoto map according to the building image; a contour extraction module 300, which is used to extract the building contour according to the digital orthophoto map; an optimization module 400, which is used to optimize the building contour; a point cloud extraction module 500, which is used to extract the building contour according to the optimized building contour and scene The scene MVS point cloud obtains the single building point cloud corresponding to any single building; the point cloud segmentation module 600 is used to extract the single building detail point cloud according to the single building point cloud, and the single building detail point cloud includes the roof point cloud, the first type of facade point cloud and the second type of facade point cloud; the second type of facade point cloud segmentation module 700 divides the second type of facade point cloud into multiple fine facade point clouds through a segmentation method; the splicing and fusion module 800 generates a Delaunay triangulation based on the roof point cloud, the first type of facade point cloud and multiple fine facade point clouds, splices the Delaunay triangulation, and fuses them to generate a refined three-dimensional model of the single building.
[0090] Embodiment 3
[0091] The same parts as those in the first and second embodiments of the present embodiment are given the same reference numerals, and the same text descriptions are omitted.
[0092] This embodiment discloses a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the construction method in the first embodiment is implemented.
[0093] Embodiment 4
[0094] The same parts as those in the first, second and third embodiments of the present embodiment are given the same reference numerals, and the same textual descriptions are omitted.
[0095] This embodiment discloses a storage medium on which a computer program is stored. When the computer program is executed by a processor, the construction method in the first embodiment is implemented.
[0096] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
Claims
1. A method for constructing a LOD2+ building model based on an image segmentation network, characterized in that: The method for constructing a three-dimensional model of a building comprises the following steps: S1. Obtaining a building image by oblique photogrammetry, wherein the building image includes at least one single building; S2, acquiring the corresponding scene MVS point cloud and digital orthophoto map according to the building image; S3, extracting the building outline according to the digital orthophoto map; S4, optimizing the outline of the building; S5. Acquire a single building point cloud corresponding to any single building according to the optimized building outline and the scene MVS point cloud; S6. Extracting a point cloud of a single building detail part according to the single building point cloud, wherein the point cloud of the single building detail part includes a roof point cloud, a first type of facade point cloud, and a second type of facade point cloud; S7, segmenting the second type of facade point cloud into multiple fine facade point clouds by a segmentation method; S8, generating a Delaunay triangulation network based on the roof point cloud, the first type of facade point cloud and the plurality of the refined facade point clouds, splicing the Delaunay triangulation networks, and fusing them to generate a refined three-dimensional model of a single building; The above step S6 comprises the following steps: S61, segmenting the single building point cloud by using the RANSAC algorithm to form a roof point cloud and a facade point cloud, and dividing the facade point cloud into a first type of facade point cloud or a second type of facade point cloud; S62, segmenting the facade point cloud to obtain the second type of facade point cloud or the first type of facade point cloud; The facade point cloud in the above step S61 includes a front facade point cloud, a rear facade point cloud, a left facade point cloud and a right facade point cloud. The method of classifying the facade point cloud into a first type of facade point cloud or a second type of facade point cloud is: Classify the facade point clouds whose floating distance difference Q along the facade normal vector direction is not greater than a threshold value d in the facade point clouds as the first type of facade point clouds; Classify the facade point clouds whose floating distance difference Q along the facade normal vector direction is greater than a threshold value d as the second type of facade point clouds; The segmentation method in the above step S7 is: divide the second type of facade point cloud into n layers with equal width along the direction of the facade normal vector, traverse the points in the second type of facade point cloud to obtain point cloud sets P of different levels, and then use the (R, G, B) information of the point cloud mapping to construct the space-grayscale similarity quantization value M of the point clouds of different levels: Where t represents the number of points in the outermost point cloud set, o represents the number of points in the point cloud set adjacent to the outermost layer along the direction of the vertical normal vector, p(r,g,b) is the RGB value of the outermost point cloud set, q(r,g,b) is the RGB value of the point cloud set adjacent to the outermost layer, p(x,y,z) is the spatial position of the outermost point cloud set, q(x,y,z) is the spatial position of the point cloud set adjacent to the outermost layer, and k is the weighting factor of the normalized image distance and the set distance; when , is the similarity threshold, merging the two layers of point cloud sets; when , save the outermost point cloud set separately, and after traversing all the point cloud sets P, accurately divide the second type of facade point cloud into a plurality of the fine facade point clouds.
2. The method for constructing a LOD2+ building model based on an image segmentation network according to claim 1, characterized in that: The above step S6 further includes the following steps: The roof point cloud is divided into roof surface point cloud and other part point cloud by RANSAC algorithm, and the average elevation Z of the roof surface point cloud is determined. roof ; Project the elevations of the other part of the point cloud to the average elevation Z roof , traverse the points in the other part of the point cloud, and extract the points whose height is less than or equal to Z roof Points are used to form the eaves point cloud, and the points with height greater than Z are extracted. roof points to form the parapet point cloud.
3. The method for constructing a LOD2+ building model based on an image segmentation network according to claim 2, characterized in that: The method for segmenting the first type of facade point cloud or the second type of facade point cloud from the facade point cloud in the above step S62 is: determining the midpoint H along the direction of the facade normal vector according to the first type of facade point cloud or the second type of facade point cloud, and determining the ordinate Z of the lowest point in the eaves point cloud. min ; Project the facade point cloud to the midpoint H along the direction of the facade normal vector, traverse the points in the facade point cloud, and extract the points whose distance from the midpoint H along the direction of the facade normal vector is not greater than Q / 2 and whose ordinate is less than Z min The points are saved separately to form the first type of facade point cloud; Extract the points whose distance from the midpoint H along the vertical normal direction is greater than Q / 2 and whose ordinate is less than Z min The points are saved to form the second type of facade point cloud.
4. The method for constructing a LOD2+ building model based on an image segmentation network according to claim 1, characterized in that: The building outline optimization method in step S4 comprises the following steps: S41, extracting edges by using a Canny operator and encoding the outline of the building, and deleting background spots by using aspect ratio and rectangularity; S42, optimizing the building outline by using Douglas-Peucker algorithm to reduce the number of points contained in the building outline; S43, determining a plurality of candidate directions according to the orientations of each individual building in the building image, wherein the angle difference between two adjacent candidate directions is not less than 15°; S44, determine the main direction and center of gravity of the single building, and use the candidate direction contribution value M ɑ Determine the main direction, M ɑ The calculation method is: Where: is the angle threshold of the candidate direction, β is the angle difference between the building edge and the candidate direction, D l is the length of the building side; when the angle difference between the direction of the building side and the candidate direction is less than When the building edge contributes to the candidate direction, all the building edges in the candidate direction The sum of the contribution values of the building edges within the range to the candidate directions is the total contribution value of the candidate directions, and the candidate direction with the highest total contribution value is the main direction; Determine the center of gravity of the building outline as C (x i ,y i ); S45. Optimize the building outline by using the main direction of the building outline and the center of gravity of the building outline.
5. A building three-dimensional model construction system based on an image segmentation network, the construction system using the construction method according to any one of claims 1 to 4, characterized in that: include: A data acquisition module, used for obtaining a building image by oblique photogrammetry, wherein the building image includes at least one single building; A data preliminary processing module is used to obtain the corresponding scene MVS point cloud and digital orthophoto map according to the building image; A contour extraction module, used for extracting the building contour according to the digital orthophoto map; An optimization module, used for optimizing the building outline; A point cloud extraction module, used for obtaining a single building point cloud corresponding to any single building according to the optimized building outline and the scene MVS point cloud; A point cloud segmentation module, used for extracting a point cloud of a single building detail part according to the single building point cloud, wherein the point cloud of the single building detail part includes a roof point cloud, a first type of facade point cloud and a second type of facade point cloud; A second type of facade point cloud segmentation module, which segments the second type of facade point cloud into multiple fine facade point clouds by a segmentation method; The splicing and fusion module generates a Delaunay triangulation based on the roof point cloud, the first type of facade point cloud and multiple fine facade point clouds, splices the Delaunay triangulation, and fuses them to generate a fine three-dimensional model of the single building.
6. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the construction method according to any one of claims 1 to 4 is implemented.
7. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the construction method as described in any one of claims 1 to 4 is implemented.
