A method, system, apparatus and storage medium for distinguishing between indoor and outdoor for a building model

CN121490378BActive Publication Date: 2026-10-20BEIJING PIXEL SOFTWARE TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511852815.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-10
Publication Date
2026-10-20
Estimated Expiration
2045-12-10

AI Technical Summary

Technical Problem

[0004]人工手动标注虽然直观,但严重依赖人力投入,尤其当项目包含大量复杂建筑或开放世界地图时,工作量呈指数级增长,人工标注效率低下,难以适应快速迭代的开发流程,显著延长了项目周期

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121490378B_ABST
    Figure CN121490378B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a method, system, device and storage medium for distinguishing indoor and outdoor of a building model, relating to the technical field of computer graphics, the method comprising: voxelizing a building model to obtain a plurality of solid columns and air columns; determining whether an air column is a middle column or a boundary column according to the number of adjacent air columns around each air column; calculating the shortest distance from each middle column to a boundary column to obtain a distance field value; dividing the middle columns and the boundary columns into a plurality of initial regions according to the distance field value; and obtaining a building indoor merged region after determining a closed region from the plurality of initial regions. Thus, by constructing the solid columns and air columns of the building model, combining the analysis of the middle columns and the boundary columns of the air columns, calculating the distance field, and judging the closed region, the indoor region is automatically identified and merged, which significantly reduces the labor input, is easy to adapt to the rapid iteration development process, and significantly shortens the project cycle.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer graphics technology, and more specifically, to a method, system, device, and storage medium for distinguishing the interior and exterior of an architectural model. Background Technology

[0002] In game development, it is often necessary to know whether the player is currently in an indoor or outdoor environment in order to provide more effects such as weather changes and scene object loading. This is of great significance for realizing functions such as dynamic lighting, weather effect switching, sound propagation simulation, and resource loading optimization.

[0003] Currently, in most 3D application development processes, distinguishing between indoor and outdoor areas typically relies on manual annotation. Developers or art designers need to pre-define which areas belong to the interior in the scene editor based on the structure of the architectural model, and add corresponding labels or triggers to them.

[0004] While manual annotation is intuitive, it heavily relies on human resources. Especially when a project contains a large number of complex buildings or open-world maps, the workload increases exponentially. Manual annotation is inefficient, difficult to adapt to rapid iterative development processes, and significantly prolongs the project cycle. Summary of the Invention

[0005] In view of this, the purpose of this invention is to provide a method, system, device and storage medium for distinguishing between the interior and exterior of a building model. By constructing a spatial structure of solid columns and air columns through voxelization of the building model, and combining the adjacency analysis, distance field calculation and closure judgment of the columns, the indoor areas are automatically identified and merged, which significantly reduces manpower input, improves processing efficiency, adapts to the rapid iterative development process and significantly shortens the project cycle.

[0006] To achieve the above objectives, in a first aspect, embodiments of the present invention provide a method for distinguishing the interior and exterior of a building model. The method includes: performing voxelization processing on the acquired building model to obtain multiple solid columns; the solid columns are composed of multiple voxels; extracting the air regions surrounding the solid columns to obtain multiple air columns; determining whether an air column is an intermediate column or a boundary column based on the number of adjacent air columns around each air column; calculating the nearest distance from each intermediate column to the boundary column to obtain a distance field value; dividing the intermediate columns and the boundary columns into multiple initial regions based on the distance field value; each initial region includes at least one intermediate column and at least one boundary column, and each intermediate column in the initial region has adjacent other intermediate columns or adjacent boundary columns, and each boundary column in the initial region has adjacent other boundary columns or adjacent intermediate columns; determining closed regions from the multiple initial regions; the closed regions represent interior areas of the building; merging closed regions of the same height to obtain at least one merged interior area of ​​the building.

[0007] In this embodiment, by extracting the air region surrounding the solid columns formed by the building model, air columns are obtained around the solid columns. This allows for the identification of intermediate columns and boundary columns, which serve as boundaries. Then, based on distance field values, the intermediate and boundary columns are divided into multiple initial regions, each containing intermediate and boundary columns. This facilitates the identification of closed regions from these initial regions. Finally, these closed regions are merged by height to obtain the merged interior regions of the building, thus distinguishing the interior and exterior areas of the building model. By constructing the spatial structure of solid and air columns using a voxelized building model, and combining intermediate and boundary column analysis, distance field calculation, and closed region identification, the system automatically identifies and merges interior regions, significantly reducing manpower input, improving processing efficiency, adapting to rapid iterative development processes, and significantly shortening project cycles.

[0008] In some embodiments, the process of voxelizing the acquired building model to obtain multiple solid columns includes: performing voxelization on the acquired building model to obtain multiple voxels of the building model; and merging the voxels that are continuous in the height direction of the building model to obtain multiple solid columns.

[0009] This setup not only reduces data redundancy but also better reflects the actual form of building components, such as walls and columns, which naturally extend vertically, thus helping to form the basic carrier for subsequent air zone extraction and spatial analysis.

[0010] In some embodiments, determining whether an air column is an intermediate column or a boundary column based on the number of adjacent air columns around each air column includes: if the number of adjacent air columns around the air column is equal to a first preset value, then the air column is determined to be an intermediate column; if the number of adjacent air columns around the air column is less than the first preset value, then the air column is determined to be a boundary column.

[0011] This configuration allows multiple air columns to be divided into intermediate columns and boundary columns based on a first preset value, effectively capturing the changing characteristics of the spatial layout and providing a reliable boundary reference source for subsequent distance field calculations.

[0012] In some embodiments, dividing the intermediate pillars and the boundary pillars into multiple initial regions based on the distance field value includes: starting with the intermediate pillar with the largest distance field value among all intermediate pillars, dividing the intermediate pillar and its neighboring intermediate pillars with the same distance field value into the same initial region; if there are still remaining undivided intermediate pillars, determining the undivided intermediate pillar with the largest distance field value; if the undivided intermediate pillar is adjacent to at least one intermediate pillar in the initial region, dividing the undivided intermediate pillar into the initial region; if the undivided intermediate pillar is not adjacent to any intermediate pillar in any of the initial regions, dividing the undivided intermediate pillar and its neighboring intermediate pillars with the same distance field value into a new initial region; if all intermediate pillars have been divided into each initial region, traversing each undivided boundary pillar and dividing the boundary pillar into each initial region; the boundary pillar is adjacent to at least one intermediate pillar in its initial region.

[0013] This setup allows for the initial traversal of the intermediate pillars using distance field values ​​to obtain multiple initial regions. Then, the undivided boundary pillars are traversed, ensuring that each initial region simultaneously contains both intermediate and boundary pillars. Consequently, each boundary pillar must be adjacent to at least one intermediate pillar to be assigned to a region, guaranteeing a connection between each boundary pillar and the core space. This ensures that each initial region is a topologically connected spatial unit, possessing both internal consistency and boundary integrity.

[0014] In some embodiments, determining a closed region from the plurality of initial regions includes: obtaining the number of unclosed boundary pillars in the initial regions; calculating the ratio of the number of unclosed boundary pillars to the total number of pillars in the initial regions to obtain a closure probability; if the closure probability is greater than a second preset value, then the corresponding initial region is determined as an unclosed region; if the closure probability is less than or equal to the second preset value, then the corresponding initial region is determined as a closed region.

[0015] This setting allows for comparison between the second preset value and the closure probability value of each initial area to determine whether the initial area is a closed area or an unclosed area, thereby accurately identifying closed areas in the building model and avoiding misjudging semi-open structures such as balconies and corridors in the building model as indoor spaces.

[0016] In some embodiments, obtaining the number of unclosed boundary pillars in the initial region includes: performing ray detection on the boundary pillars in the initial region to determine whether the boundary pillars are unclosed boundary pillars; and obtaining the number of unclosed boundary pillars in the initial region based on the determined unclosed boundary pillars.

[0017] This setup allows for the determination of whether each boundary pillar is closed or open based on ray detection, which in turn helps determine the closure probability of the current initial region.

[0018] In some embodiments, the boundary column comprises a plurality of merged air voxels. The step of performing ray detection on the boundary columns within the initial region to determine whether the boundary column is an unclosed boundary column includes: performing ray detection on the air voxels in the boundary column to obtain an unclosed value for each air voxel, the unclosed value representing the number of buildings that did not hit after rays were emitted along multiple directions of the air voxel; if the unclosed value is not less than a third preset value, then the air voxel is recorded as an unclosed voxel; if the number of unclosed voxels is greater than a fourth preset value, then the boundary column is recorded as an unclosed boundary column.

[0019] This setting allows the air voxel closure value obtained from X-ray detection to be compared and judged by the third and fourth preset values ​​to determine whether the current boundary column is an unclosed boundary column, avoiding misjudgment due to individual anomalies and significantly improving the accuracy and reliability of whether the boundary column is an unclosed boundary column.

[0020] Secondly, embodiments of the present invention provide a system for distinguishing the interior and exterior of a building model. The system includes: an initialization module for performing voxelization processing on the acquired building model to obtain multiple solid columns; each solid column is composed of multiple voxels; a construction module for extracting air regions around the solid columns to obtain multiple air columns; determining whether each air column is an intermediate column or a boundary column based on the number of adjacent air columns around it; calculating the nearest distance from each intermediate column to the boundary column to obtain a distance field value; dividing the intermediate columns and the boundary columns into multiple initial regions based on the distance field value; each initial region includes at least one intermediate column and at least one boundary column, and each intermediate column in the initial region has adjacent other intermediate columns or adjacent boundary columns, and each boundary column in the initial region has adjacent other boundary columns or adjacent intermediate columns; a filtering module for determining closed regions from the multiple initial regions; each closed region represents an interior area of ​​the building; and a merging module for merging closed regions of the same height to obtain at least one merged interior area of ​​the building.

[0021] Thirdly, embodiments of the present invention provide an electronic device, including a processor and a memory, wherein the memory stores a computer program executable by the processor, and the processor can execute the computer program to implement the method for distinguishing the interior and exterior of a building model as described in the first aspect.

[0022] Fourthly, embodiments of the present invention provide a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method for distinguishing the interior and exterior of a building model as described in the first aspect.

[0023] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description

[0024] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0025] Figure 1 A flowchart illustrating a method for distinguishing the interior and exterior of a building model, as provided in an embodiment of the present invention; Figure 2 A three-dimensional directional schematic diagram provided for an embodiment of the present invention; Figure 3A schematic diagram of an air column provided in an embodiment of the present invention; Figure 4 This is a schematic diagram of the initial area after merging the interior spaces of the building model provided in an embodiment of the present invention; Figure 5 A schematic diagram of the initial merged region provided in an embodiment of the present invention; Figure 6 This is a flowchart of sub-steps S101~S102 of step S100 in step 1 of the figure; Figure 7 This is a schematic diagram of a triangular building model provided in an embodiment of the present invention; Figure 8 A schematic diagram of the columnar structure merged along the y-axis of the architectural model provided in an embodiment of the present invention; Figure 9 This is a flowchart of sub-steps S301~S302 of step S300 in step 1 of the figure; Figure 10 This is a schematic diagram of eight adjacent positions of an air column provided in an embodiment of the present invention; Figure 11 A schematic diagram of air columns with significantly different heights that are not adjacent, provided for an embodiment of the present invention; Figure 12 This is a flowchart of sub-steps S501~S503 of step S500 in step 1 of the figure; Figure 13 A numerical schematic diagram of the distance field of an air column provided in an embodiment of the present invention; Figure 14 This is another numerical diagram of the air column distance field provided in an embodiment of the present invention; Figure 15 This is another numerical diagram of the air column distance field provided in an embodiment of the present invention; Figure 16 This is another numerical diagram of the air column distance field provided in an embodiment of the present invention; Figure 17 This is a schematic diagram of the merging of outdoor air columns in a building model provided in an embodiment of the present invention; Figure 18 This is a flowchart of sub-steps S610~S640 of step S600 in step 1 of the figure; Figure 19 The architectural model room provided for embodiments of the present invention includes a schematic diagram of multiple initial areas; Figure 20 A schematic diagram of multiple separate indoor initial areas provided in an embodiment of the present invention; Figure 21 The flowchart is shown below for sub-steps S611~S612 of step S610 in step 1 of the figure. Figure 22This is a flowchart of sub-steps S6111~S6113 of step S611 in step 1 of the figure; Figure 23 A schematic diagram of the functional modules of the system for distinguishing the interior and exterior of a building model provided in an embodiment of the present invention; Figure 24 A block diagram of an electronic device provided in an embodiment of the present invention.

[0026] Icons: 1000 - System for distinguishing the interior and exterior of the building model; 1100 - Initialization module; 1200 - Building module; 1300 - Filtering module; 1400 - Merging module; 2000 - Electronic equipment; 2100 - Processor; 2200 - Memory; 2300 - Bus; 2400 - Communication interface. Detailed Implementation

[0027] 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. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.

[0028] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.

[0029] It should be noted that relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0030] As described in the background section, in most 3D application development processes, distinguishing between indoor and outdoor areas typically relies on manual annotation. Developers or art designers need to pre-define which areas belong to the interior in the scene editor based on the structure of the architectural model, and add corresponding labels or triggers to them. While manual annotation is intuitive, it heavily relies on human resources, especially when the project contains a large number of complex buildings or open-world maps. The workload increases exponentially, manual annotation is inefficient, difficult to adapt to rapid iterative development processes, and significantly prolongs the project cycle.

[0031] To address this, embodiments of the present invention provide a method for distinguishing between indoor and outdoor areas in a building model. By constructing a spatial structure of solid columns and air columns using voxelization of the building model, and combining adjacency analysis, distance field calculation, and closure determination of the columns, indoor areas are automatically identified and merged. This significantly reduces manpower input, improves processing efficiency, adapts to rapid iterative development processes, and significantly shortens project cycles. (See also...) Figure 1 , Figure 1 A flowchart of a method for distinguishing the interior and exterior of a building model, provided by an embodiment of the present invention, includes steps S100 to S700: S100. Based on the acquired building model, voxelization is performed to obtain multiple solid columns.

[0032] In this embodiment, the architectural model is a three-dimensional geometric structure composed of triangular meshes, used to represent the physical boundaries of the building, such as walls, roof, and floor. Solid columns are composed of multiple voxels. Therefore, the entire space is divided into regularly arranged cubic units in the x, y, and z directions, each unit being a voxel, used to characterize whether a local space is occupied by the architectural geometry, such as... Figure 2 As shown, Figure 2 This is a three-dimensional directional schematic diagram provided for an embodiment of the present invention. Specifically, each triangular facet in the building model is traversed, and the spatial range it covers is determined based on the coordinates of its three vertices. All voxels intersecting with or contained within this triangle are marked as 1, while the remaining unoccupied voxels are marked as 0, thus forming an initial voxelized spatial distribution. Further, voxels with continuity in the height direction of the building model are vertically merged, that is, adjacent voxels in the y-axis direction that are both occupied are integrated into a continuous columnar structure. This structure has a fixed xz coordinate position on the horizontal plane and extends a certain number of layers in the height direction; such a structure is defined as a solid column. Thus, a solid column is an equivalent geometric expression of the original building structure in discrete grid space, which not only retains the spatial occupancy information of the original model but also simplifies the data granularity of subsequent processing through columnarization.

[0033] S200: Extract the air region surrounding the solid column to obtain multiple air columns.

[0034] In this embodiment, air regions refer to non-occupied spaces with a value of 0 in the voxelized space, i.e., parts not filled by the building structure. Therefore, the voxelized spatial data is extracted in reverse, identifying all voxels with a value of 0, and these voxels are merged into columnar structures according to their continuity along the y-axis. These columnar structures are called air columns, such as... Figure 3 As shown, Figure 3 This is a schematic diagram of an air column provided in an embodiment of the present invention. An air column can be understood as a cavity representation relative to a solid column, spatially surrounding a solid column or existing within an open area inside a building. For example, in a modeling scenario of a closed building, the free space inside rooms, corridors, and open areas above ground level all exist in the form of air columns. As the basic data object for subsequent area division, the air column carries information about spatial connectivity and topological relationships.

[0035] S300. Based on the number of adjacent air columns around each air column, determine whether an air column is an intermediate column or a boundary column.

[0036] In this embodiment, determining whether an air column is located at a spatial edge depends on its adjacency analysis on the xz plane. An air column located at a spatial edge is a boundary column, while one not located at a spatial edge is an intermediate column.

[0037] S400. Calculate the nearest distance from each intermediate column to the boundary column to obtain the distance field value.

[0038] In this embodiment, the identified set of boundary pillars is used as the source point set. A multi-source shortest path algorithm is employed to diffuse outward layer by layer, calculating the Euclidean distance or grid step distance between each intermediate pillar and the nearest boundary pillar. The result is the distance field value corresponding to that intermediate pillar. This distance field value can be understood as reflecting the distance of a spatial location from surrounding walls or edges; a larger value indicates proximity to the center region, while a smaller value indicates proximity to the boundary. Furthermore, this distance field serves as an important basis for region clustering, supporting subsequent spatial segmentation operations based on similarity principles.

[0039] S500: Divide the intermediate and boundary columns into multiple initial regions based on the distance field values.

[0040] In this embodiment, the initial region includes at least one intermediate pillar and at least one boundary pillar. Each intermediate pillar in the initial region has adjacent intermediate pillars or adjacent boundary pillars, and each boundary pillar in the initial region has adjacent boundary pillars or adjacent intermediate pillars. A watershed algorithm clustering strategy is adopted, starting the growth of the region from the intermediate pillar with the largest distance field value. Intermediate pillars with high distance values ​​are preferentially grouped into the same initial region along with their adjacent intermediate pillars with equal distance values, thus simulating the process of spreading from a deep pit to a shallower area. When an initial region cannot be further expanded, if there are still undivided intermediate pillars, the one with the largest distance field value is selected as the new seed point, and a new region division process is initiated. For the remaining unassigned boundary pillars, after all intermediate pillars have been classified, they are sequentially assigned to their adjacent initial regions, ensuring that each boundary pillar belongs to its spatially neighboring region. Therefore, the formation process of the initial region follows the principles of connectivity and gradient consistency, ensuring spatial continuity and semantic unity within each region.

[0041] S600, Determine the closed region from multiple initial regions.

[0042] In this embodiment, the enclosed area represents the interior area of ​​the building. The purpose of conducting an enclosure assessment for each initial area is to screen out highly enclosed spaces that meet the definition of a room, and to exclude semi-open areas such as balconies, under eaves, and porches.

[0043] S700. Merge enclosed areas of the same height to obtain at least one merged interior area of ​​the building.

[0044] In this embodiment, the air columns in the screened enclosed area undergo geometric optimization to reduce data redundancy and improve storage and operational efficiency. Specifically, adjacent air columns with identical vertical heights on the xz plane are identified and merged into a larger rectangular column structure, such as... Figure 4 and Figure 5 As shown, Figure 4 This is a schematic diagram of the initial area after merging the interior spaces of the building model provided in an embodiment of the present invention. Figure 5 This is a schematic diagram of the initial merged region provided in an embodiment of the present invention. For example, two air columns that are continuous in the x-direction and have the same span in the z-direction can be merged into a single column spanning a wider area if their initial and final heights are the same. This merging operation can be understood as a spatial compression strategy, integrating fragmented column segments into concise geometric blocks for easy retrieval and application in the game. Based on the above description, the final output merged interior area constitutes an efficient abstract representation of the real room space, which can be used to trigger various game logic behaviors such as weather switching, sound effect loading, and lighting adjustment.

[0045] In some embodiments, for step S100, one possible implementation of the present invention is as follows: Figure 6 As shown, Figure 6 This is a flowchart of sub-steps S101~S102 of step S100 in Figure 1. Steps S101~S102 include: S101. Based on the acquired building model, voxelization is performed to obtain multiple voxels of the building model.

[0046] In this embodiment, the building model is a three-dimensional geometric structure composed of triangular meshes, the surface of which consists of a large number of interconnected triangular facets used to describe the physical boundaries of the building, such as walls, roof, and floor. Figure 7 As shown, Figure 7 This is a schematic diagram of a triangular building model provided in an embodiment of the present invention. The entire three-dimensional space is divided into regularly arranged cubic units along the x, y, and z directions. Each unit is a voxel, and its size can be set to a fixed unit size according to actual accuracy requirements. Specifically, each triangular facet in the building model is traversed, and based on the coordinates of its three vertices A1(x1,y1,z1), B1(x2,y2,z2), and C1(x3,y3,z3), the area it occupies in space is calculated. That is, in the x-direction, the range is taken from min(x1,x2,x3) to max(x1,x2,x3), and the y and z directions are calculated similarly, thereby determining the positions of all voxels covered by the triangle. If a voxel intersects with or is contained by any triangle, the voxel is marked as 1, indicating that the space is occupied by the building structure; otherwise, it is marked as 0, indicating an air area. Thus, through this voxelization process, the original continuous triangular mesh model is discretized into a three-dimensional array composed of multiple binary voxels, realizing the spatial digital representation of the building's geometry.

[0047] S102: Merge voxels that are continuous in the height direction of the building model to obtain multiple solid columns.

[0048] In this embodiment, after voxelization, the building structure typically appears as a series of adjacent voxels, all in an occupied state, in the vertical direction (i.e., the y-axis direction). During the above steps, for each group of occupied voxels continuously distributed in the y-axis direction and having the same coordinates in the xz plane, they are merged into a vertically extending columnar structure, such as... Figure 8 As shown, Figure 8This is a schematic diagram of the columnar structure merged along the y-axis of the building model provided in this embodiment of the invention. For example, if there is a series of voxels located at coordinates (0,0,0), (0,1,0), and (0,2,0), all of which are in an occupied state, then these three voxels are merged into a column with a starting position of (0,0,0) and an ending position of (0,2,0). Similarly, for continuous voxels located at (1,0,0), (1,1,0), and (1,2,0), they can also be merged into another column. It can be understood that this merging operation integrates the originally scattered individual voxels into a higher-level geometric unit—a solid column. Each solid column occupies a fixed grid position on the horizontal plane and has a start and end range in the height direction. Based on the above description, the solid column, as a compact expression of the building structure, not only retains the spatial occupancy information of the original model but also significantly reduces data complexity, providing a clear structural basis for subsequent air area extraction and spatial division.

[0049] In some embodiments, for step S300, one possible implementation of the present invention is as follows: Figure 9 As shown, Figure 9 This is a flowchart of sub-steps S301~S302 of step S300 in Figure 1. Steps S301~S302 include: S301. If the number of adjacent air columns around an air column is equal to the first preset value, then the air column is determined to be an intermediate column.

[0050] In this embodiment, the first preset value is eight. Taking each air column as the center, eight possible adjacent positions around it are examined at the same height level, including orthogonal directions (front, back, left, right) and diagonal directions (left front, right front, left back, right back). The number of other air columns present is counted. Figure 10 As shown, Figure 10 This diagram illustrates eight adjacent positions of an air column provided in an embodiment of the present invention. The first preset value here is specifically eight; that is, when an air column is completely surrounded by eight adjacent air columns in the xz plane, it indicates that the air column is located within an open and well-connected airspace, far from the edge of the building structure. Specifically, this condition corresponds to the typical distribution characteristics of a flat ground or the central area of ​​an enclosed room, in which case the air column is classified as an intermediate column. It can be understood that an intermediate column represents a relatively independent columnar cavity portion in space, independent of obstacles. Its existence reflects a high degree of spatial enclosure and continuity in the area, providing a core data foundation for subsequent distance field calculations.

[0051] It should be noted that when traversing each air column on the xz plane, if the height difference between its adjacent air columns exceeds a certain threshold, they can be considered not neighbors. For example... Figure 11 As shown, Figure 11This is a schematic diagram of air columns with significantly different heights that are not adjacent, provided as an embodiment of the present invention.

[0052] S302. If the number of adjacent air columns around an air column is less than a first preset value, then the air column is determined to be a boundary column.

[0053] In this embodiment, when an air column has fewer than eight neighboring air columns on the xz plane, it means that it is adjacent to a solid column in at least one direction or is at a spatial breakpoint. For such air columns, their proximity relationship with the building structure is identified, and they are defined as boundary columns. For example, near the exterior wall of a building, under the eaves, or at the opening of a balcony, an air column is often connected to other air columns only on one or two sides, while the other directions are blocked by walls, resulting in a significantly fewer than eight neighbors. Thus, boundary columns mark the interface between the airspace and the solid structure, and have a clear spatial demarcation significance. Based on the above classification mechanism, by setting a unified neighborhood threshold, the semantic role of air columns is automatically determined, effectively distinguishing between internal and edge regions, and providing key support for constructing a distance field that reflects spatial depth characteristics.

[0054] In some embodiments, for step S400, one possible implementation of the present invention is as follows: Figure 12 As shown, Figure 12 This is a flowchart of sub-steps S501~S503 of step S500 in Figure 1. Steps S501~S503 include: S501. Starting from the intermediate column with the largest distance field value among all intermediate columns, divide the intermediate column and its neighboring intermediate columns with the same distance field value into the same initial region.

[0055] In this embodiment, the distance field value represents the spatial distance between each intermediate column and the nearest boundary column. The larger the value, the closer the location is to the center of the spatial domain. Figure 13 As shown, Figure 13 This is a schematic diagram of the distance field of an air column provided in an embodiment of the present invention; the shaded area represents the building entity. Therefore, the intermediate column with the largest distance field value is found in the already calculated distance field, such as... Figure 13The distance field value is 6, and the region growth mechanism is initiated using distance field value 6 as the seed point. Specifically, this intermediate cylinder is used as the core unit of the current initial region. Then, all its adjacent intermediate cylinders on the xz plane are searched. If the distance field value of an adjacent intermediate cylinder is equal to that of the seed point, it is considered to belong to the same depth level of continuous space and is included in the same initial region. This process can be compared to filling a depression in the terrain with water, prioritizing filling the deepest part, and grouping areas of the same depth and interconnectedness into a whole. Thus, this partitioning strategy is based on the gradient consistency principle of the distance field, ensuring that the intermediate cylinders in the initial region are not only spatially connected but also consistent in their distance from the boundary.

[0056] It should be noted that the term "adjacent" as used above refers to other intermediate pillars that are adjacent to the current intermediate pillar in the orthogonal direction (front, back, left, right) and diagonal direction (left front, right front, left back, right back) on the xz plane.

[0057] S502. If there are still undivided intermediate pillars, determine the undivided intermediate pillar with the largest distance field value. If the undivided intermediate pillar is adjacent to at least one intermediate pillar in the initial region, then divide the undivided intermediate pillar into the initial region. If the undivided intermediate pillar is not adjacent to any intermediate pillar in the initial region, then divide the undivided intermediate pillar and its neighboring intermediate pillars with the same distance field value into a new initial region.

[0058] In this embodiment, after the initial construction of the first initial region is completed, it is further determined whether there are still unclassified intermediate pillars. If so, the undivided intermediate pillar with the largest distance field value is selected as a new candidate seed point. It should be noted that the intermediate pillar with the largest distance field value is the one remaining after the previous selection. For example, if the previously selected intermediate pillar with the largest distance field value is 5, the remaining undivided intermediate pillar with the largest distance field value is now 4. At this time, it is necessary to further determine the spatial adjacency relationship of the intermediate pillar with a distance field value of 4: if the intermediate pillar with a distance field value of 4 is adjacent to any intermediate pillar in an existing initial region in the xz plane, it means that it belongs to the extension of that region, and therefore it is incorporated into that initial region, such as... Figure 14 As shown, Figure 14 This is another schematic diagram of the distance field value of an air column provided in an embodiment of the present invention. Conversely, if there are no other defined intermediate columns connected to an intermediate column with a distance field value of 4, it indicates that it is located in another independent deep pit region. A new initial region needs to be created based on this, and all adjacent intermediate columns with the same distance field value should be included simultaneously. Figure 15 As shown, Figure 15This is another numerical diagram of the air column distance field provided in an embodiment of the present invention. It can be understood that this progressive partitioning mechanism automatically identifies and groups multiple isolated or separate cavities by processing high distance value nodes layer by layer, thus avoiding erroneous merging between different spatial units.

[0059] S503. If all intermediate pillars have been assigned to the initial regions, then traverse each unassigned boundary pillar and assign the boundary pillar to the initial regions; the boundary pillar is adjacent to at least one intermediate pillar in its initial region.

[0060] In this embodiment, the column structure of the initial region consists of intermediate columns. After all the intermediate columns have been classified, the remaining boundary columns are processed. For each unassigned boundary column, it is checked whether it is directly adjacent to an intermediate column in a certain initial region on the xz plane. If an adjacency relationship exists, the boundary column is assigned to the corresponding initial region to complete the spatial closure description of that region, such as... Figure 16 As shown, Figure 16 This is another numerical schematic diagram of the air column distance field provided in an embodiment of the present invention, forming initial regions of yellow, blue, and red, respectively, where green represents the boundary columns of another initial region. For example, a boundary column located on the periphery of a room, if adjacent to a central column within the initial region to which the room belongs, is included in that room's region, thus forming a complete spatial representation encompassing the central airspace and the surrounding edges, as shown below. Figure 17 As shown, Figure 17 This is a schematic diagram of the merging of outdoor air columns in a building model provided in an embodiment of the present invention. As can be seen, this completion mechanism ensures that each initial region encompasses both the internal core space and its directly associated boundary portion, resulting in a region with complete topological structure and semantic integrity, providing an accurate data foundation for subsequent closure determination.

[0061] In some embodiments, for step S600, one possible implementation of the present invention is as follows: Figure 18 As shown, Figure 18 This is a flowchart of sub-steps S610~S640 of step S600 in Figure 1. Steps S610~S640 include: S610. Obtain the number of unclosed boundary columns in the initial region.

[0062] In this embodiment, for each initially defined region, all boundary pillars within it are traversed, and ray detection is performed on each boundary pillar to determine its connectivity with the external environment. Specifically, for a given boundary pillar, rays are emitted in four horizontal directions (east, south, west, and north) centered on its position in the xz plane. If a ray extends along a direction without hitting any physical pillar, that direction is considered an open exit. When a boundary pillar fails to hit any pillar in multiple directions, it is determined to be an unclosed boundary pillar. Furthermore, the total number of boundary pillars identified as having open characteristics within the initial region is counted to obtain the number of unclosed boundary pillars. This number reflects a quantitative indicator of the current region's connectivity with the outside world and serves as the fundamental input for subsequent assessments of closure.

[0063] S620. Calculate the ratio of the number of unclosed boundary columns to the total number of columns in the initial region to obtain the closure probability.

[0064] In this embodiment, the total number of all columns in the initial area, including the sum of intermediate and boundary columns, is obtained as a normalization benchmark. Then, the number of unclosed boundary columns obtained in the preceding steps is divided by this total number; the result is the closure probability. This ratio can be understood as representing the proportion of the edge portion of the area exposed to the outside. A higher value indicates that a larger proportion of the area's boundaries directly face the external space, lacking sufficient enclosure; conversely, a lower value indicates that its boundaries are mostly surrounded by building structures, possessing the potential to become interior space.

[0065] S630. If the closure probability is greater than the second preset value, then the corresponding initial region is determined as an unclosed region.

[0066] In this embodiment, the second preset value is used to set a threshold standard for distinguishing between enclosed and open spaces. Its specific value can be flexibly set according to the application scenario, typically ranging from around 50%. The calculated probability of enclosure is then compared with this preset value. If the probability of enclosure exceeds this threshold, it indicates that more than half of the columns in the initial area are in an unenclosed state, and their spatial characteristics are closer to outdoor or semi-outdoor areas, such as balconies, under eaves, or courtyards. Therefore, they are classified as unenclosed areas. Thus, this judgment mechanism, by setting clear quantitative standards, achieves automated filtering of non-room-type spaces, avoiding misjudging transitional spaces as valid indoor areas.

[0067] S640. If the closure probability is less than or equal to the second preset value, then the corresponding initial region is determined as a closed region.

[0068] In this embodiment, when the closure probability does not exceed a set threshold, it indicates that the boundary of the initial area is mostly surrounded by the building structure, with only a few openings, which meets the basic definition of a room. At this time, the initial area is retained and marked as a closed area, serving as a valid output for subsequent processing. This can be understood as the determination result representing the identification of a spatial unit with sufficient enclosure to support application requirements such as weather shielding, sound effect switching, or lighting changes. Figure 19 and Figure 20 As shown, Figure 19 The architectural model room provided in this embodiment of the invention includes a schematic diagram of multiple initial areas. Figure 20 This is a schematic diagram of multiple initial indoor areas provided in an embodiment of the present invention. Based on the above description, by introducing the comprehensive evaluation index of closure probability and combining it with a comparison mechanism based on preset thresholds, intelligent mapping from geometric structure to semantic space is achieved, enabling the algorithm to accurately identify the true indoor areas of the building without human intervention.

[0069] In some embodiments, for step S610, one possible implementation of the present invention is as follows: Figure 21 As shown, Figure 21 This is a flowchart of sub-steps S611~S612 of step S610 in Figure 1. Steps S611~S612 include: S611. Perform ray detection on the boundary pillars within the initial region to determine whether the boundary pillars are unclosed boundary pillars.

[0070] In this embodiment, the boundary column, as the structural unit at the boundary between the initial area and the external space, is directly affected by whether it is surrounded by a building structure, thus influencing the determination of the area's enclosure. Therefore, for each boundary column belonging to the current initial area, multiple rays are emitted horizontally from its top, specifically in four orthogonal directions: east, south, west, and north. Each ray extends forward a certain length to detect the presence of adjacent solid columns. If a ray in a certain direction does not hit any solid column, that direction is considered open, i.e., connected to the outside. This ray detection mechanism aims to simulate spatial accessibility analysis, identifying the degree of openness by determining whether the boundary has effective obstruction. For example, a boundary column located at the edge of a balcony typically has no wall obstruction on its outer side; therefore, the rays emitted outward will not hit any solid structure, thus it is determined to have an open direction. When a boundary column fails to hit any solid column in multiple directions, it indicates a high probability of being exposed to the external environment and is therefore identified as an unenclosed boundary column.

[0071] S612. Based on the determined unclosed boundary columns, obtain the number of unclosed boundary columns in the initial region.

[0072] In this embodiment, after completing the ray detection of all boundary pillars, the boundary pillars determined to have open characteristics are counted one by one. Specifically, all boundary pillars in the initial region are traversed, and the count of each boundary pillar confirmed as unclosed in step S611 is accumulated to obtain the total number of unclosed boundary pillars in the region. This number can be understood as a key parameter for measuring the external connectivity of the initial region, reflecting the scale of the portion of its boundary lacking an enclosing structure. For example, in a region consisting of 20 boundary pillars, if 15 are identified as unclosed by ray detection, it indicates that most of the boundary of the region is unobstructed, and it is very likely to correspond to non-enclosed spaces such as under eaves or open corridors. Therefore, this statistical result provides direct data support for subsequent calculation of closure probability and is an important intermediate output for realizing automated spatial classification.

[0073] In some embodiments, the boundary column comprises multiple merged air voxels. For step S611, one possible implementation provided by this embodiment of the invention is as follows: Figure 22 As shown, Figure 22 This is a flowchart of sub-steps S6111~S6113 of step S611 in Figure 1. Steps S6111~S6113 include: S6111. Perform ray detection on the air voxels in the boundary column to obtain the unclosed value of each air voxel. The unclosed value represents the number of buildings that were not hit after the rays were fired in multiple directions along the air voxel.

[0074] In this embodiment, the boundary column is a columnar structure composed of multiple air voxels continuously merged in the height direction, with each layer in the vertical direction corresponding to an independent air voxel. For each air voxel constituting the boundary column, rays are emitted from its location in four horizontal directions (east, south, west, and north) to detect the presence of surrounding solid columns or other building structures. Each ray extends a certain distance along a specified direction; if it does not collide with any occupied voxel along its path, that direction is considered an open passage. The number of directions in which the air voxel fails to hit a building structure is counted, and the resulting value is the unclosed value of that air voxel. For example, if an air voxel's rays fail to hit a wall in the east and south directions, its unclosed value is 2; if it fails to hit in all four directions, its unclosed value is 4. Thus, this unclosed value quantifies the spatial exposure of a single air voxel, providing a fine-grained basis for determining whether it is in an unclosed environment.

[0075] S6112. If the unclosed value is not less than the third preset value, then the air voxel is recorded as an unclosed voxel.

[0076] In this embodiment, a third preset value is used as a threshold to distinguish whether an air voxel possesses significant openness. Specifically, the unclosed value obtained by ray detection for each air voxel is compared with this preset value. When the unclosed value is not less than the third preset value, it indicates that the air voxel lacks obstruction in most or all directions and is in a state of obvious external connectivity, thus being marked as an unclosed voxel. The third preset value here can be set according to the actual application scenario. For example, a value of 1 means that as long as a ray in one direction does not hit the building entity, the current air voxel is an unclosed voxel, enhancing the rigor of identifying the unclosed state and avoiding misjudging the properties of the entire voxel due to openness in a single direction.

[0077] S6113. If the number of unclosed voxels is greater than the fourth preset value, then the boundary cylinder is recorded as an unclosed boundary cylinder.

[0078] In this embodiment, the overall properties of a boundary column are determined by the set of air voxels it contains, rather than relying solely on the judgment result of a single level. After classifying all air voxels within the boundary column, the number of voxels marked as unclosed is counted. This number is then compared with a fourth preset value, which represents the maximum allowable unclosed proportion among the total number of air voxels constituting the boundary column. In this embodiment, the fourth preset value is 1. If the number of unclosed voxels exceeds this threshold, the boundary column is considered to lack sufficient enclosure structure support and belongs to a part highly connected to the outside world, thus being judged as an unclosed boundary column. For example, if a boundary column is composed of 5 stacked air voxels, and 2 of them are identified as unclosed voxels, and the fourth preset value is set to 1, then the condition is met, and the boundary column is recorded as an unclosed boundary column. If only 1 voxel is identified as unclosed, the boundary column is still recorded as a closed boundary column. As can be seen, this hierarchical judgment process aggregates from air voxels to boundary columns step by step, realizing a refined assessment of spatial closure and ensuring that the final division result can accurately reflect the actual structural characteristics of the building model.

[0079] Based on the above method, embodiments of the present invention also provide a system corresponding to the above method, such as... Figure 23 As shown, Figure 23 This is a schematic diagram of the functional modules of the system for distinguishing the interior and exterior of a building model provided in this embodiment of the invention. It should be noted that the basic principle and technical effects of the system 1000 for distinguishing the interior and exterior of a building model provided in this embodiment are the same as those in the above method embodiments. For the sake of brevity, parts not mentioned in this embodiment can be referred to the corresponding content in the method embodiments.

[0080] In this embodiment, the system 1000 that distinguishes between the interior and exterior of the building model includes an initialization module 1100, a construction module 1200, a filtering module 1300, and a merging module 1400. The initialization module 1100 is used to perform voxelization processing on the acquired building model to obtain multiple solid columns; each solid column is composed of multiple voxels. It can be understood that the initialization module 1100 is used to perform the above-described step S100.

[0081] The construction module 1200 is used to extract the air region surrounding the solid column, obtaining multiple air columns; based on the number of adjacent air columns around each air column, it determines whether the air column is an intermediate column or a boundary column; it calculates the nearest distance from each intermediate column to the boundary column, obtaining a distance field value; based on the distance field value, it divides the intermediate columns and boundary columns into multiple initial regions; each initial region includes at least one intermediate column and at least one boundary column, and each intermediate column in the initial region has adjacent other intermediate columns or adjacent boundary columns, and each boundary column in the initial region has adjacent other boundary columns or adjacent intermediate columns. It can be understood that the construction module 1200 is used to perform the above steps S200~S500.

[0082] The filtering module 1300 is used to determine a closed area from multiple initial areas; the closed area represents an interior area of ​​the building. It can be understood that the filtering module 1300 is used to perform the above-described step S600.

[0083] The merging module 1400 is used to merge enclosed areas of the same height to obtain at least one merged interior area. It can be understood that the merging module 1400 is used to perform the above-described step S700.

[0084] In some embodiments, the initialization module 1100 is used to perform voxelization processing based on the acquired building model to obtain multiple voxels of the building model; and to merge voxels that are continuous in the height direction of the building model to obtain multiple solid columns. It can be understood that the initialization module 1100 is used to perform the above steps S101~S102.

[0085] In some embodiments, the construction module 1200 is used to determine an air column as an intermediate column when the number of adjacent air columns around the air column is equal to a first preset value; and to determine an air column as a boundary column when the number of adjacent air columns around the air column is less than the first preset value. It can be understood that the construction module 1200 is used to perform the above steps S301~S302.

[0086] In some embodiments, the construction module 1200 is used to start from the intermediate column with the largest distance field value among all intermediate columns, and divide the intermediate column and its neighboring intermediate columns with the same distance field value into the same initial region; if there are still remaining undivided intermediate columns, the undivided intermediate column with the largest distance field value is determined. If the undivided intermediate column is adjacent to at least one intermediate column in the initial region, the undivided intermediate column is divided into the initial region; if the undivided intermediate column is not adjacent to any intermediate column in any initial region, the undivided intermediate column and its neighboring intermediate columns with the same distance field value are divided into a new initial region; if all intermediate columns have been divided into each initial region, each undivided boundary column is traversed, and the boundary column is divided into each initial region; the boundary column is adjacent to at least one intermediate column in its initial region. It can be understood that the construction module 1200 is used to perform the above steps S501~S503.

[0087] In some embodiments, the filtering module 1300 is used to obtain the number of unclosed boundary pillars in the initial region; calculate the ratio of the number of unclosed boundary pillars to the total number of pillars in the initial region to obtain the closure probability; if the closure probability is greater than a second preset value, the corresponding initial region is determined as an unclosed region; if the closure probability is less than or equal to the second preset value, the corresponding initial region is determined as a closed region. It can be understood that the filtering module 1300 is used to perform the above steps S610~S640.

[0088] In some embodiments, the filtering module 1300 is further configured to perform ray detection on the boundary pillars within the initial region to determine whether the boundary pillars are unclosed boundary pillars; based on the determined unclosed boundary pillars, the number of unclosed boundary pillars in the initial region is obtained. It can be understood that the filtering module 1300 is used to perform the above steps S611~S612.

[0089] In some embodiments, the boundary column comprises multiple merged air voxels. The filtering module 1300 is used to perform ray detection on the air voxels in the boundary column to obtain the unclosed value of each air voxel. The unclosed value represents the number of buildings that did not hit after rays were emitted along multiple directions of the air voxel. If the unclosed value is not less than a third preset value, the air voxel is recorded as an unclosed voxel. If the number of unclosed voxels is greater than a fourth preset value, the boundary column is recorded as an unclosed boundary column. It can be understood that the filtering module 1300 is used to perform the above steps S6111~S6113.

[0090] Based on the same inventive concept disclosed above, the present invention also provides a block diagram of an electronic device 2000 performing the above method. Please refer to [link / reference]. Figure 24 , Figure 24This is a block diagram of an electronic device provided in an embodiment of the present invention. The electronic device 2000 includes a processor 2100, a memory 2200, a bus 2300, and a communication interface 2400. The processor 2100 and the memory 2200 are connected via the bus 2300, and the processor 2100 communicates with external devices via the communication interface 2400.

[0091] Processor 2100 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed through integrated logic circuits in the hardware of processor 2100 or through software instructions. The processor 2100 may be a general-purpose processor 2100, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), an off-the-shelf programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0092] The memory 2200 is used to store computer programs. For example, the system 1000 for distinguishing the interior and exterior of a building model in this embodiment of the invention includes at least one software function module that can be stored in the memory 2200 in the form of software or firmware. After receiving an execution instruction, the processor 2100 executes the program to implement the method for distinguishing the interior and exterior of a building model in this embodiment of the invention.

[0093] The memory 2200 may include high-speed random access memory (RAM) or non-volatile memory. Optionally, the memory 2200 may be a storage device built into the processor 2100 or a storage device independent of the processor 2100.

[0094] Bus 2300 can be ISA bus 2300, PCI bus 2300 or EISA bus 2300, etc. Figure 24 It is indicated by only one double-headed arrow, but does not mean that there is only one bus 2300 or one type of bus 2300.

[0095] Electronic devices 2000 can be mobile phones, tablets, laptops, desktop computers, and other computer devices.

[0096] Based on the same inventive concept, embodiments of the present invention also provide a computer-readable storage medium storing a computer program thereon. When executed by a processor 2100, this computer program implements the method described above for distinguishing the interior and exterior of a building model. This computer-readable storage medium may include various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0097] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for distinguishing the interior and exterior of an architectural model, characterized in that, The method includes; Based on the acquired building model, voxelization is performed to obtain multiple solid columns; each solid column is composed of multiple voxels. Extract the air region surrounding the solid column to obtain multiple air columns; Based on the number of adjacent air columns around each air column, the air column is determined to be an intermediate column or a boundary column. Calculate the nearest distance from each of the intermediate pillars to the boundary pillars to obtain the distance field value; The intermediate column and the boundary column are divided into multiple initial regions based on the distance field values; The initial region includes at least one intermediate pillar and at least one boundary pillar, and each intermediate pillar in the initial region has an adjacent other intermediate pillar or an adjacent boundary pillar, and each boundary pillar in the initial region has an adjacent other boundary pillar or an adjacent intermediate pillar. Determine a closed region from the plurality of said initial regions; The enclosed area represents the interior area of ​​the building; Determining the closed region from the plurality of said initial regions includes: Obtain the number of unclosed boundary pillars in the initial region; The closure probability is obtained by calculating the ratio of the number of unclosed boundary pillars to the total number of pillars in the initial region. If the closure probability is greater than the second preset value, then the corresponding initial region is determined as an unclosed region; If the closure probability is less than or equal to the second preset value, then the corresponding initial region is determined as a closed region; By merging the enclosed areas of the same height, at least one combined interior area of ​​the building is obtained.

2. The method according to claim 1, characterized in that, The process of voxelizing the acquired building model yields multiple solid columns, including: The obtained building model is voxelized to obtain multiple voxels of the building model. By merging the voxels that are continuous in the height direction of the building model, multiple solid columns are obtained.

3. The method according to claim 1, characterized in that, The step of determining whether an air column is an intermediate column or a boundary column based on the number of adjacent air columns around each air column includes: If the number of adjacent air columns around the air column is equal to a first preset value, then the air column is determined to be an intermediate column. If the number of adjacent air columns around the air column is less than a first preset value, then the air column is determined to be a boundary column.

4. The method according to claim 1, characterized in that, The step of dividing the intermediate column and the boundary column into multiple initial regions based on the distance field value includes: Starting with the intermediate column with the largest distance field value among all intermediate columns, the intermediate column and its neighboring intermediate columns with the same distance field value are assigned to the same initial region. If there are still undivided intermediate pillars, then the undivided intermediate pillar with the largest distance field value is determined. If the undivided intermediate pillar is adjacent to at least one intermediate pillar in the initial region, then the undivided intermediate pillar is assigned to the initial region. If the undivided intermediate column is not adjacent to any of the intermediate columns in the initial regions, then the undivided intermediate column and its neighboring intermediate columns that are adjacent to the undivided intermediate column and have the same distance field value are divided into a new initial region. If all intermediate pillars have been assigned to the initial regions, then each unassigned boundary pillar is traversed and assigned to the initial regions; the boundary pillar is adjacent to at least one intermediate pillar in its initial region.

5. The method according to claim 1, characterized in that, The process of obtaining the number of unclosed boundary pillars in the initial region includes: Ray detection is performed on the boundary pillars within the initial region to determine whether the boundary pillars are unclosed boundary pillars. Based on the determined unclosed boundary columns, the number of unclosed boundary columns in the initial region is obtained.

6. The method according to claim 5, characterized in that, The boundary pillar comprises multiple merged air voxels, and the step of performing ray detection on the boundary pillars within the initial region to determine whether the boundary pillar is an unclosed boundary pillar includes: The air voxels in the boundary column are subjected to ray detection to obtain the unclosed value of each air voxel. The unclosed value represents the number of buildings that were not hit after the rays were shot out in multiple directions along the air voxel. If the unsealed value is not less than the third preset value, then the air voxel is recorded as an unsealed voxel; If the number of unclosed voxels is greater than a fourth preset value, then the boundary column is recorded as an unclosed boundary column.

7. A system for distinguishing the interior and exterior of a building model, characterized in that, The system includes: An initialization module is used to perform voxelization processing based on the acquired building model to obtain multiple solid columns; the solid columns are composed of multiple voxels. A construction module is used to extract the air region surrounding the solid column to obtain multiple air columns; determine whether each air column is an intermediate column or a boundary column based on the number of adjacent air columns around it; calculate the nearest distance from each intermediate column to the boundary column to obtain a distance field value; and divide the intermediate columns and the boundary columns into multiple initial regions based on the distance field value; each initial region includes at least one intermediate column and at least one boundary column, and each intermediate column in the initial region has adjacent other intermediate columns or adjacent boundary columns, and each boundary column in the initial region has adjacent other boundary columns or adjacent intermediate columns. A filtering module is used to determine closed areas from multiple initial areas; the closed areas represent interior areas of a building; the filtering module is specifically used to: obtain the number of unclosed boundary columns in the initial areas; calculate the ratio of the number of unclosed boundary columns to the total number of columns in the initial areas to obtain a closure probability; if the closure probability is greater than a second preset value, the corresponding initial area is determined as an unclosed area; if the closure probability is less than or equal to the second preset value, the corresponding initial area is determined as a closed area. The merging module is used to merge the enclosed areas of the same height to obtain at least one merged interior area of ​​the building.

8. An electronic device, characterized in that, It includes a processor and a memory, the memory storing a computer program executable by the processor, the processor being able to execute the computer program to implement the method for distinguishing the interior and exterior of a building model as described in any one of claims 1-6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method for distinguishing the interior and exterior of a building model as described in any one of claims 1-6.

Citation Information

Patent Citations

  • Methods for localizing digitally-modeled object with respect to digitally-modeled space and for performing volumetric queries

    CN112818424A

  • Indoor space extraction method and system based on building information model

    CN117649488A