A three-dimensional building roof surface extraction method and device, a terminal and a medium
By combining dense 3D building mesh data with building base surfaces, noise processing and fine correction are performed, solving the accuracy and batch processing problems of 3D building roof extraction in dense building environments. This achieves high-precision roof dataset output, supporting urban village governance and urban landscape management.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GUANGZHOU URBAN PLANNING & DESIGN SURVEY RES INST
- Filing Date
- 2023-01-10
- Publication Date
- 2026-05-12
AI Technical Summary
Existing technologies struggle to achieve high-precision batch extraction of 3D building rooftops in densely built environments, especially in densely built environments like urban villages. Existing methods cannot effectively handle the problem of building and environmental occlusion, and their recognition accuracy is limited.
By combining dense 3D building mesh data with the building base surface, noise processing and standardized building formation are performed, a candidate set of rooftops is collected, abnormally rough rooftops are screened by real-world comparison, and fine correction and semantic assignment are performed to output a high-precision rooftop dataset.
It enables high-precision batch extraction of 3D building rooftops in dense building environments, supports data construction in urban village governance, improves the automation level and data production accuracy of urban landscape management, and prevents illegal construction.
Smart Images

Figure CN116310789B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of machine vision technology, and in particular to a method, apparatus, terminal and medium for extracting three-dimensional building rooftops. Background Technology
[0002] Urban village development is characterized by a large number of buildings, dense construction, shared walls between multiple buildings, clustered development, irregular building layouts, and close integration and obstruction of environmental elements such as trees and vegetation. This makes the information-based governance of urban villages a complex technical challenge. Using surveying and mapping geographic information systems to control basic building data in urban villages has become a crucial support for comprehensive urban village governance. High-precision 3D data of urban village building rooftops is a vital component of this basic building data. By collecting rooftop data, effective monitoring of urban village buildings can be achieved, preventing illegal construction and improving the urban landscape. A building rooftop is the surface of a building adjacent to the sky, and it has the following characteristics: 1. The building rooftop stores information and structures that are not visible to people on the ground, such as illegally constructed sheds and additional structures; 2. Rooftop data is a graphical representation of the rooftop structure; 3. The 3D rooftop data should at least include the outline of the top floor and its height above the ground.
[0003] Current methods for rooftop extraction include: First, using precisely measured building base surfaces as a baseline, the product of the number of floors and a fixed floor height is calculated as the building roof height, thus forming a 3D roof. However, this method provides a rough estimate with low reliability, making it unsuitable for real-world management scenarios. Second, roof outline extraction is based on building point cloud data to construct 3D rooftops. However, due to the large data volume and acquisition difficulties, this method is only applicable to detached buildings and cannot adapt to the dense data environment of urban villages, nor can it achieve batch processing. Third, deep learning methods are used to identify 3D building rooftops based on orthophotos. However, this method cannot distinguish between multiple rooftops of the same building, has limited accuracy, and struggles to handle building and environmental occlusion issues. In summary, current methods are insufficient for batch 3D rooftop extraction in densely built urban village environments. Therefore, for the application scenario of comprehensive urban village governance, a method for high-precision batch 3D rooftop extraction in densely built environments is urgently needed. Summary of the Invention
[0004] This invention provides a method, apparatus, terminal, and medium for extracting three-dimensional building rooftops, which solves the technical problem of difficulty in batch extraction of high-precision three-dimensional building rooftops in dense building environments in the prior art. It can automatically extract high-precision three-dimensional building rooftops by utilizing dense three-dimensional building mesh data and combining it with the building base surface.
[0005] To achieve the above objectives, in a first aspect, embodiments of the present invention provide a method for extracting three-dimensional building rooftops, comprising:
[0006] Based on the mesh data of the dense 3D building mesh and the data of the building base surface, obtain the mesh set of the detached building;
[0007] For each standalone building in the Mesh set, noise processing is performed to form a standardized building;
[0008] Collect the candidate rooftops of the standardized building, detect the elevation value of each rooftop in the candidate rooftops, and then extract the rough rooftop set of the standardized building.
[0009] By comparing real-world scenes, abnormal rough surfaces in the aforementioned rough surface collection were selected;
[0010] The abnormal rough roof surfaces are precisely corrected, and the roof surface dataset is output after semantic assignment to all rough roof surfaces.
[0011] As an improvement to the above solution, the step of obtaining the mesh set of a detached building based on the mesh data of the dense 3D building mesh and the data of the building's foundation surface specifically includes:
[0012] Spatial registration is performed between the mesh data of the dense 3D building grid and the data of the building base surface;
[0013] Establish a vertical facade perpendicular to the building base surface. Based on the intersection of the vertical facade and the triangular facets of the Mesh data, extract the set of adjacent triangular facets of the Mesh data within the coverage area of the building base surface.
[0014] Using the set of adjacent triangular facets as the seed set, the adjacent triangular facets are iteratively calculated to obtain the set of all connected triangular facets within the coverage area of the building base surface;
[0015] Establish the connection between the set of triangular faces and the building base surface, and treat the building with the connection as a standalone building to obtain the Mesh set of the standalone building.
[0016] As an improvement to the above solution, the step of performing noise processing on each individual building in the Mesh set to form a standardized building specifically includes:
[0017] Determine the data noise level of each individual building in the Mesh set in order to perform noise processing;
[0018] If the detached building contains adjacent data noise, then adjacent data noise cleanup will be performed;
[0019] If the detached building contains overhead data noise, the overhead data portion will be automatically removed after connectivity judgment;
[0020] If the detached building contains unusual data noise, it shall be manually identified and manually removed or masked.
[0021] All the stand-alone buildings after the noise treatment are designated as standardized buildings.
[0022] As an improvement to the above scheme, the step of collecting the candidate rooftops of the standardized building, detecting the elevation value of each rooftop in the candidate rooftops, and thereby extracting the rough rooftop set of the standardized building specifically includes:
[0023] Using the building base as a foundation, the building is moved upwards step by step at a preset distance. The intersection between the building base and the standardized building is calculated, thereby collecting a candidate set of the roof of the standardized building.
[0024] A uniformly dense grid is established within the building base surface, and a vertical probe is set at the center of each grid perpendicular to the building base surface to detect the roof elevation value of the standardized building.
[0025] By calculating the roof elevation value detected by the probe and comparing it with the candidate roof set, the rough roof set of the standardized building is extracted.
[0026] As an improvement to the above solution, the step of filtering out abnormally rough sky surfaces in the rough sky surface collection through real-world comparison specifically involves:
[0027] The Mesh data is vertically flattened, and the vertically flattened data is compared with the rough surface of the rough surface collection in a planar manner to select abnormal rough surface.
[0028] The Mesh data is horizontally flattened, and the horizontally flattened data is vertically compared with the rough surface to select the abnormal rough surface.
[0029] The mesh data is compared with the rough sky surface in three dimensions to select the abnormal rough sky surface.
[0030] As an improvement to the above scheme, the step of finely correcting the abnormal rough roof surfaces and outputting a roof surface dataset after semantically assigning values to all rough roof surfaces specifically includes:
[0031] The abnormally rough surface is precisely corrected vertically, and the elevation value of each abnormally rough surface point is adjusted.
[0032] The planar coordinates of the abnormal rough surface points after vertical adjustment are precisely corrected.
[0033] After semantically assigning values to all rough roof surfaces, the roof surface dataset is output.
[0034] Secondly, embodiments of the present invention provide a three-dimensional building roof extraction device, comprising:
[0035] The Get Collection module is used to obtain the Mesh collection of a standalone building based on the Mesh data of the dense 3D building mesh and the data of the building's base surface.
[0036] The noise processing module is used to process the noise of each individual building in the Mesh set to form a standardized building;
[0037] The acquisition and detection module is used to acquire the candidate set of rooftops of the standardized building, detect the elevation value of each rooftop in the candidate set, and thereby extract the rough rooftop set of the standardized building.
[0038] The real-scene comparison module is used to filter out abnormal rough surfaces in the rough surface collection by comparing real-scene data.
[0039] The correction output module is used to finely correct the abnormal rough roof surfaces and output the roof surface dataset after semantically assigning values to all rough roof surfaces.
[0040] As an improvement to the above solution, the acquisition set module is specifically used for:
[0041] Spatial registration is performed between the mesh data of the dense 3D building grid and the data of the building base surface;
[0042] Establish a vertical facade perpendicular to the building base surface. Based on the intersection of the vertical facade and the triangular facets of the Mesh data, extract the set of adjacent triangular facets of the Mesh data within the coverage area of the building base surface.
[0043] Using the set of adjacent triangular facets as the seed set, the adjacent triangular facets are iteratively calculated to obtain the set of all connected triangular facets within the coverage area of the building base surface;
[0044] Establish the connection between the set of triangular faces and the building base surface, and treat the building with the connection as a standalone building to obtain the Mesh set of the standalone building.
[0045] Thirdly, the present invention provides a terminal including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the above-described three-dimensional building roof extraction method.
[0046] Furthermore, embodiments of the present invention also provide a computer-readable medium, the computer-readable medium including a stored computer program, wherein, when the computer program is executed, it controls the device where the computer-readable medium is located to perform the above-described three-dimensional building roof extraction method.
[0047] Compared with existing technologies, the present invention discloses a method, apparatus, terminal, and medium for extracting three-dimensional building rooftops. This method extracts individual buildings from a dense three-dimensional building mesh based on the building's base surface, removes three types of noise, refines the original building surface patch set, and uses a layered vertical probe method to detect the rooftop set of each building surface patch set. Mesh-oriented compression is used to assist in comparing the rooftop data, identifying and correcting anomalies, and finally outputting the rooftop dataset. Therefore, the present invention can mass-produce rooftop data in densely built environments, supporting the construction of urban village governance data in a real-world three-dimensional construction context. It achieves a high degree of balance in automation, data production accuracy, and data processing volume. Furthermore, by collecting rooftop data, it enables effective supervision of urban village buildings, preventing illegal construction and contributing to improved urban landscape. Attached Figure Description
[0048] Figure 1 This is a flowchart illustrating a method for extracting the roof of a three-dimensional building according to an embodiment of the present invention;
[0049] Figure 2 This is a schematic diagram of the structure of a three-dimensional building roof extraction device provided in an embodiment of the present invention. Detailed Implementation
[0050] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0051] It should be noted that the terms "comprising" and "specific" in this invention, and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units that are explicitly listed, but may include other steps or units that are not explicitly listed or that are inherent to such process, method, product, or device.
[0052] Please see Figure 1 , Figure 1 This is a flowchart illustrating a three-dimensional building roof extraction method provided in an embodiment of the present invention. The three-dimensional building roof extraction method includes steps S11 to S15:
[0053] S11: Obtain the mesh set of the detached building based on the mesh data of the dense 3D building mesh and the data of the building base surface;
[0054] It should be noted that the data of the building base surface can be structured or unstructured two-dimensional building outline data or two-dimensional building surface data in vector shapefile format; the data of the building base surface is obtained through the processing data of cadastral maps and topographic maps of surveying and mapping units, or through open data provided by Baidu API and Gaode API; the building base surface is the measured building base surface that meets the surveying and mapping accuracy requirements.
[0055] S12: For each standalone building in the Mesh set, noise processing is performed to form a standardized building;
[0056] S13: Collect the candidate rooftops of the standardized building, detect the elevation value of each rooftop in the candidate rooftops, and extract the rough rooftop set of the standardized building;
[0057] S14: By comparing with real-world scenes, the abnormal rough surfaces in the rough surface collection are selected;
[0058] S15: Fine-correct the abnormal rough surfaces and output the surface dataset after semantically assigning values to all rough surfaces.
[0059] Preferably, step S11 specifically includes:
[0060] S111: Spatial registration of the mesh data of dense 3D building grid with the data of the building base surface;
[0061] In a specific embodiment, the data of the building base surface is spatially registered with the mesh data of the dense 3D building grid, so that the two sets of data are in the same coordinate system. The spatial registration method is the feature point matching method. Specifically, any three building surfaces in the building base surface dataset are selected, and the buildings corresponding to these three building surfaces are found in the mesh data. Furthermore, the feature points of the buildings corresponding to each point of the surface are found, and a 1-1 correspondence is established between the points in the mesh and the points on the building surfaces. The average offset values of the X and Y directions of all corresponding points are calculated in the planar coordinate system. The mesh coordinates are kept unchanged, and the building base surface data is translated as a whole using this value to achieve registration.
[0062] S112: Establish a vertical facade perpendicular to the building base surface, and extract the set of adjacent triangles of the Mesh data within the coverage area of the building base surface based on the intersection of the vertical facade and the triangles of the Mesh data.
[0063] In practice, each edge of the building base surface is used as a seed line to extend and establish a vertical facade perpendicular to the base surface. The intersection of each triangular facet in the Mesh data with the vertical facade is calculated. If they intersect, the triangular facet is included in the seed facet set. The correspondence between the base surface and the seed facet set is established, and the set of adjacent triangular facets of the Mesh data within the coverage area of the base surface is extracted.
[0064] S113: Using the set of adjacent triangular facets as the seed set, iteratively calculate the adjacent triangular facets to obtain the set of all connected triangular facets within the coverage area of the building base surface;
[0065] Specifically, firstly, the enclosing edge of the seed set is calculated. Within the enclosing edge, the triangles within the edge are obtained by traversing the interconnected features of triangles sharing edges. For example, the enclosing edge can be calculated using the adjacent triangle inward spread method. The center point of all triangles in the seed face set is calculated, and the average coordinate of all center points is recorded as the inward point. For each triangle in the seed face set, the edge farthest from the inward point is calculated and used as the enclosing edge. The combination of all enclosing edges is called the enclosing edge. Secondly, the triangles within the enclosing edge are obtained using the inner set recombination method: a set A is established, and the seed set is added to set A. Based on the connectivity features, all adjacent triangles of the triangles in the seed set are obtained. If an adjacent triangle is within the enclosing edge, it is added to set A. The process of finding adjacent triangles is repeated for newly added triangles in set A until no new triangles can be found. Set A is the set of all connected triangles within the coverage area of the building foundation surface.
[0066] S114: Establish the connection relationship between the set of triangular faces and the building base surface, and take the building with the connection relationship as a standalone building to obtain the Mesh set of the standalone building.
[0067] Preferably, step S12 specifically includes:
[0068] S121: Determine the data noise level of each individual building in the Mesh set in order to perform noise processing;
[0069] Specifically, the Mesh set is traversed, and normal buildings, buildings containing adjacent data noise, buildings containing aerial data noise, and buildings with singular data noise are filtered out for noise processing.
[0070] S122: If the detached building contains adjacent data noise, then adjacent data noise cleanup is performed;
[0071] For example, if the adjacent data noise is convex adjacent noise, it is processed by cutting off the noise data and then patching the face; if the adjacent data noise is concave adjacent noise, it is processed directly by patching the face; wherein, the convex adjacent noise refers to the noise data located outside the building body data, and the concave adjacent noise refers to the noise data located inside the building body data; the cut-off and patching face method means directly deleting the outer convex triangular face, and filling the resulting hole with the fewest possible triangular face; correspondingly, direct patching does not delete the old triangular face.
[0072] S123: If the detached building contains overhead data noise, the overhead data portion will be automatically removed after connectivity judgment;
[0073] For example, using any triangular facet of the main body of a detached building as the seed point, iterate through all adjacent triangular faces. After the iteration, the triangular faces that are not found are considered as floating data noise, and the unfinished triangular faces are directly deleted.
[0074] S124: If the detached building contains singular data noise, it shall be manually identified and manually removed or masked.
[0075] It should be noted that singular data noise refers to situations that machines cannot automatically identify, such as vegetation or wooden frames on building roofs.
[0076] S125: All detached buildings after noise treatment are designated as standardized buildings.
[0077] Preferably, step S13 specifically includes:
[0078] S131: Using the building base surface as a foundation, move upwards step by step with a preset step distance, calculate the intersection between the building base surface and the standardized building body, and thus collect the candidate set of the roof of the standardized building body;
[0079] In a specific embodiment, the intersection judgment threshold is set to m, the preset step distance is k, the elevation of the building base surface D is set to h, and the elevation of the building base surface D after it is moved upward is denoted as D. i If the height of the standardized building B is H, then the number of intersection judgments is t = H / k; let t be the number of intersection judgments between B and D in the i-th judgment. i The number of intersecting triangles is Tr i The number of intersecting triangles in the (i+1)th judgment is Tr i+1 If |Tr i+1 -Tr i If |>m, then let the outermost points of all intersecting triangles form a surface, denoted as D. i+1 Meanwhile, d = D i -D i+1Add d to the rooftop candidate set. After completing all the upward shifts, obtain the rooftop candidate set {d} for a single B. c}
[0080] S132: Establish a uniformly dense grid within the building base surface, and set up a vertical probe at the center of each grid perpendicular to the building base surface to detect the roof elevation value of the standardized building body;
[0081] In practice, the process of establishing a uniformly dense grid is as follows: Set the uniformly dense step size to p, for {d} c For each face in}, a vertical grid is defined in the X and Y directions. The grid cell is a square, denoted as u, and the side length is p. The vertical probe method for detecting elevation values is as follows: the RayCaster method in the graphics system is used to project a ray perpendicular to the center of u and obtain the elevation value of the center point. The elevation detection process is as follows: calculate the mean of the elevation values of all grid centers, remove the elevation values that deviate significantly from the mean, and recalculate the mean elevation value.
[0082] S133: By calculating the roof elevation value detected by the probe and comparing it with the roof candidate set, the rough roof set of the standardized building body is extracted.
[0083] It should be noted that calculating the difference in roof elevation detected by the probe means that the elevation difference between two candidate roofs is less than a certain threshold; comparing the candidate roof set means that the elevation difference between two roofs is small and the area is small. These need to be extracted separately and judged manually. In most cases, they are sloping roofs in the form of stairs.
[0084] Specifically, step S14 is as follows:
[0085] The Mesh data is vertically flattened, and the vertically flattened data is compared with the rough surface of the rough surface collection in a planar manner to select abnormal rough surface.
[0086] The Mesh data is horizontally flattened, and the horizontally flattened data is vertically compared with the rough surface to select the abnormal rough surface.
[0087] The mesh data is compared with the rough sky surface in three dimensions to select the abnormal rough sky surface.
[0088] It should be noted that, by setting a plane in a certain direction, the mesh triangular points of a specified building are projected onto this plane, and the texture is projected accordingly, forming a directional projection map of the building on this plane; the planar comparison process involves flattening the building mesh data vertically (Z-axis) and simultaneously projecting the rough roof onto the flattened plane, judging and recording the horizontal (XY) offset value of each roof point; the vertical comparison process involves flattening the building mesh data horizontally (X or Y-axis) and simultaneously projecting the rough roof onto the flattened plane, judging and recording the elevation (Z) offset value of each roof; the stereo comparison involves superimposing the rough roof onto the original mesh scene for comparison; for deviations found during the comparison process that exceed the accuracy requirements, they are identified as abnormal cases and recorded as abnormal rough roofs; abnormal cases include positional offsets and shape deviations.
[0089] Preferably, step S15 specifically includes:
[0090] The abnormally rough surface is precisely corrected vertically, and the elevation value of each abnormally rough surface point is adjusted.
[0091] The planar coordinates of the abnormal rough surface points after vertical adjustment are precisely corrected.
[0092] After semantically assigning values to all rough roof surfaces, the roof surface dataset is output.
[0093] It should be noted that: the vertical fine correction specifically involves: calculating the average elevation deviation of all points in the Mesh data, and shifting all points on the abnormal rough roof surfaces along the Z-axis; the horizontal fine correction specifically involves: calculating the average horizontal deviation of all points in the Mesh data, and shifting all points on the abnormal rough roof surfaces along the XY-axis; semantic assignment is performed on all rough roof surfaces: based on the semantic difference of the rough roof surfaces, the uppermost layer of all rough roof surfaces is designated as roof surface 1, the second layer as roof surface 2, and so on downwards; the semantic values of the roof surface include roof surface area, perimeter, name, material type, etc.
[0094] Please see Figure 2 , Figure 2 This is a schematic diagram of a three-dimensional building roof extraction device provided in an embodiment of the present invention. The three-dimensional building roof extraction device includes:
[0095] The acquisition module 21 is used to acquire the mesh set of a detached building based on the mesh data of the dense 3D building mesh and the data of the building base surface;
[0096] The noise processing module 22 is used to process the noise of each individual building in the Mesh set to form a standardized building;
[0097] The acquisition and detection module 23 is used to acquire the candidate set of the roof of the standardized building, detect the elevation value of each roof in the candidate set, and thus extract the rough roof set of the standardized building.
[0098] The real-scene comparison module 24 is used to filter out abnormal rough surfaces in the rough surface collection through real-scene comparison.
[0099] The correction output module 25 is used to finely correct the abnormal rough roof surface and output the roof surface dataset after semantically assigning values to all rough roof surfaces.
[0100] Preferably, the acquisition module 21 is specifically used for:
[0101] Spatial registration is performed between the mesh data of the dense 3D building grid and the data of the building base surface;
[0102] Establish a vertical facade perpendicular to the building base surface. Based on the intersection of the vertical facade and the triangular facets of the Mesh data, extract the set of adjacent triangular facets of the Mesh data within the coverage area of the building base surface.
[0103] Using the set of adjacent triangular facets as the seed set, the adjacent triangular facets are iteratively calculated to obtain the set of all connected triangular facets within the coverage area of the building base surface;
[0104] Establish the connection between the set of triangular faces and the building base surface, and treat the building with the connection as a standalone building to obtain the Mesh set of the standalone building.
[0105] The three-dimensional building roof extraction device provided in this embodiment of the invention can realize all the processes of the three-dimensional building roof extraction method of the above embodiment. The functions and technical effects of each module in the device are the same as the functions and technical effects of the three-dimensional building roof extraction method of the above embodiment, and will not be repeated here.
[0106] This invention provides a terminal comprising: a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps described in the above-described three-dimensional building roof extraction method embodiment. Alternatively, when the processor executes the computer program, it implements the functions of each module described in the above-described three-dimensional building roof extraction device embodiment.
[0107] For example, the computer program may be divided into one or more modules, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program in the terminal.
[0108] The terminal can be a computing device such as a desktop computer, laptop, handheld computer, or cloud server. The terminal may include, but is not limited to, a processor and memory. Those skilled in the art will understand that the schematic diagram is merely an example of a terminal and does not constitute a limitation on the terminal. It may include more or fewer components than illustrated, or combine certain components, or use different components. For example, the terminal may also include input / output devices, network access devices, buses, etc.
[0109] The processor can be a central processing unit, or other general-purpose processors, digital signal processors, application-specific integrated circuits, field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor. The processor is the control center of the terminal, connecting various parts of the terminal via various interfaces and lines.
[0110] The memory can be used to store the computer programs and / or modules. The processor implements various functions of the terminal by running or executing the computer programs and / or modules stored in the memory and by calling data stored in the memory. The memory may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the mobile phone (such as audio data, phonebook, etc.). In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, RAM, plug-in hard disk, smart memory card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0111] If the modules integrated into the terminal are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory, a random access memory, an electrical carrier signal, a telecommunication signal, and a software distribution medium, etc.
[0112] It should be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Furthermore, in the accompanying drawings of the device embodiments provided by this invention, the connection relationships between modules indicate that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement this without any creative effort.
[0113] This invention also provides a computer-readable medium comprising a stored computer program, wherein the computer program, when running, controls the device containing the computer-readable medium to execute the three-dimensional building roof extraction method as described in the above embodiments.
[0114] In summary, this invention discloses a method, apparatus, terminal, and medium for extracting three-dimensional building rooftops. It extracts individual buildings by using a dense three-dimensional building mesh based on the building's base surface, removes three types of noise, refines the original building surface patch set, and uses a layered vertical probe method to detect the rooftop set of each building surface patch set. Mesh-oriented compression is used to assist in comparing the rooftop data, identifying anomalies, and correcting them. Finally, the rooftop dataset is output. Therefore, this invention can mass-produce rooftop data in densely built environments, supporting the construction of urban village governance data in a real-world three-dimensional construction context. It achieves a high degree of balance in automation, data production accuracy, and data processing volume. Furthermore, by collecting rooftop data, it enables effective supervision of urban village buildings, preventing illegal construction and contributing to improved urban landscape.
[0115] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. A method for extracting three-dimensional building rooftops, characterized in that, include: Based on the mesh data of the dense 3D building mesh and the data of the building base surface, obtain the mesh set of the detached building; For each standalone building in the Mesh set, noise processing is performed to form a standardized building; Collect the candidate rooftops of the standardized building, detect the elevation value of each rooftop in the candidate rooftops, and then extract the rough rooftop set of the standardized building. By comparing real-world scenes, abnormal rough surfaces in the aforementioned rough surface collection were selected; The abnormal rough roof surfaces are precisely corrected, and the roof surface dataset is output after semantic assignment of all rough roof surfaces. Specifically, the process of collecting a candidate set of rooftops for the standardized building, detecting the elevation value of each rooftop in the candidate set, and extracting the rough rooftop set of the standardized building includes: Using the building base as a foundation, the building is moved upwards step by step at a preset distance. The intersection between the building base and the standardized building is calculated, thereby collecting a candidate set of the roof of the standardized building. A uniformly dense grid is established within the building base surface, and a vertical probe is set at the center of each grid perpendicular to the building base surface to detect the roof elevation value of the standardized building. By calculating the roof elevation value detected by the probe and comparing it with the candidate roof set, the rough roof set of the standardized building is extracted.
2. The method for extracting three-dimensional building rooftops as described in claim 1, characterized in that, The process of obtaining the mesh set of a detached building based on the mesh data of a dense 3D building mesh and the data of the building's base surface specifically includes: Spatial registration is performed between the mesh data of the dense 3D building grid and the data of the building base surface; Establish a vertical facade perpendicular to the building base surface. Based on the intersection of the vertical facade and the triangular facets of the Mesh data, extract the set of adjacent triangular facets of the Mesh data within the coverage area of the building base surface. Using the set of adjacent triangular facets as the seed set, the adjacent triangular facets are iteratively calculated to obtain the set of all connected triangular facets within the coverage area of the building base surface; Establish the connection between the set of triangular faces and the building base surface, and treat the building with the connection as a standalone building to obtain the Mesh set of the standalone building.
3. The method for extracting three-dimensional building rooftops as described in claim 1, characterized in that, The process of performing noise processing on each individual building in the Mesh set to form a standardized building specifically includes: Determine the data noise level of each individual building in the Mesh set in order to perform noise processing; If the detached building contains adjacent data noise, then adjacent data noise cleanup will be performed; If the detached building contains overhead data noise, the overhead data portion will be automatically removed after connectivity judgment; If the detached building contains unusual data noise, it shall be manually identified and manually removed or masked. All the stand-alone buildings after the noise treatment are designated as standardized buildings.
4. The method for extracting three-dimensional building rooftops as described in claim 1, characterized in that, The process of filtering out abnormally rough sky surfaces from the collection of rough sky surfaces through real-world comparison specifically involves: The Mesh data is vertically flattened, and the vertically flattened data is compared with the rough surface of the rough surface collection in a planar manner to select abnormal rough surface. The Mesh data is horizontally flattened, and the horizontally flattened data is vertically compared with the rough surface to select the abnormal rough surface. The mesh data is compared with the rough sky surface in three dimensions to select the abnormal rough sky surface.
5. The method for extracting three-dimensional building rooftops as described in claim 1, characterized in that, The process of finely correcting the anomalous rough sky surfaces and outputting a sky surface dataset after semantically assigning values to all rough sky surfaces specifically includes: The abnormally rough surface is precisely corrected vertically, and the elevation value of each abnormally rough surface point is adjusted. The planar coordinates of the abnormal rough surface points after vertical adjustment are precisely corrected. After semantically assigning values to all rough roof surfaces, the roof surface dataset is output.
6. A three-dimensional building roof extraction device, characterized in that, include: The Get Collection module is used to obtain the Mesh collection of a standalone building based on the Mesh data of the dense 3D building mesh and the data of the building's base surface. The noise processing module is used to process the noise of each individual building in the Mesh set to form a standardized building; The acquisition and detection module is used to acquire the candidate set of rooftops of the standardized building, detect the elevation value of each rooftop in the candidate set, and thereby extract the rough rooftop set of the standardized building. The real-scene comparison module is used to filter out abnormal rough surfaces in the rough surface collection by comparing real-scene data. The correction output module is used to finely correct the abnormal rough roof surface and output the roof surface dataset after semantically assigning values to all rough roof surfaces. The acquisition and detection module is used for: Using the building base as a foundation, the building is moved upwards step by step at a preset distance. The intersection between the building base and the standardized building is calculated, thereby collecting a candidate set of the roof of the standardized building. A uniformly dense grid is established within the building base surface, and a vertical probe is set at the center of each grid perpendicular to the building base surface to detect the roof elevation value of the standardized building. By calculating the roof elevation value detected by the probe and comparing it with the candidate roof set, the rough roof set of the standardized building is extracted.
7. The three-dimensional building roof extraction device as described in claim 6, characterized in that, The acquisition set module is specifically used for: Spatial registration is performed between the mesh data of the dense 3D building grid and the data of the building base surface; Establish a vertical facade perpendicular to the building base surface. Based on the intersection of the vertical facade and the triangular facets of the Mesh data, extract the set of adjacent triangular facets of the Mesh data within the coverage area of the building base surface. Using the set of adjacent triangular facets as the seed set, the adjacent triangular facets are iteratively calculated to obtain the set of all connected triangular facets within the coverage area of the building base surface; Establish the connection between the set of triangular faces and the building base surface, and treat the building with the connection as a standalone building to obtain the Mesh set of the standalone building.
8. A terminal device, characterized in that, The method includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor, when executing the computer program, implements the three-dimensional building roof extraction method as described in any one of claims 1-5.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored computer program, wherein, when the computer program is executed, it controls the device containing the computer-readable storage medium to perform the three-dimensional building roof extraction method as described in any one of claims 1-5.