Building drawing geometry feature extraction and visual modeling method and system
By employing adaptive noise reduction, morphological operations, and convolutional neural network-based symbol feature recognition, combined with parametric 3D modeling, the problems of image quality discrepancies and lack of semantic components in architectural drawing modeling are solved, achieving efficient, accurate, and standardized 3D model generation.
Patent Information
- Application Number
- CN202511460785.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-14
- Publication Date
- 2025-12-05
- Estimated Expiration
- 2045-10-14
AI Technical Summary
Existing architectural drawing modeling methods suffer from significant differences in image quality, difficulty in balancing detail preservation and noise suppression with traditional image processing algorithms, lack of systematic reasoning mechanisms for geometric elements and semantic components, reliance on manual intervention in the 3D modeling process, low efficiency, poor accuracy, and difficulty in aligning with international standards such as IFC.
Adaptive noise reduction and contrast enhancement techniques are employed, combined with morphological operations and color line clustering, to identify and classify geometric elements. Convolutional neural networks are used to identify symbolic features, construct a semantic network for building components, and generate standardized 3D models through a parametric 3D modeling engine.
It significantly improves the noise reduction and contrast of drawing images, enhances the robustness and recognition accuracy of geometric feature extraction, achieves efficient and accurate 3D model generation, supports IFC standard integration, and improves modeling efficiency and visual expressiveness.
Smart Images

Figure CN120931840B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of building information modeling, and in particular to a building drawing geometric feature extraction and visual modeling method and system. BACKGROUND
[0002] Under the background of the increasing popularity of digital management of the whole life cycle of architectural design and construction, the automatic conversion of traditional two-dimensional architectural drawings to three-dimensional information models has become an important research direction in the field of building information modeling (BIM). A large number of stock building projects are still saved in paper or scanned image format, and the information contained in them, such as component structure, spatial relationship and symbolic annotation, needs to be digitized through image recognition, semantic analysis and modeling means to realize structured management, three-dimensional visualization and design reuse.
[0003] However, the existing building drawing modeling methods mostly have the following technical problems: first, the quality of the drawing images varies greatly, and traditional image processing algorithms cannot balance detail preservation and noise suppression, resulting in a decrease in subsequent recognition accuracy; second, there is a lack of systematic reasoning mechanism between geometric elements and semantic components, which cannot effectively extract high-level architectural semantics from low-level graphics; third, the three-dimensional modeling process lacks a unified standard, and model generation relies on manual intervention, which is low in efficiency and poor in accuracy, and is difficult to be connected with international standards such as IFC. Especially in the aspects of symbol recognition, component relationship analysis and parameterized model automatic construction, there is still a lack of a technical system with high robustness and completeness. SUMMARY
[0004] The present application provides a building drawing geometric feature extraction and visual modeling method and system, which can efficiently and accurately extract geometric elements, identify semantic components and construct standardized three-dimensional models from complex building drawing images, realizing intelligent and collaborative building design.
[0005] The building drawing geometric feature extraction and visual modeling method comprises the following steps:
[0006] S1: receiving an original building drawing image, performing adaptive noise reduction, contrast enhancement and line refinement on the original building drawing image, and performing automatic layer separation based on color and line type, and outputting a preprocessed drawing image;
[0007] S2: scanning the preprocessed drawing image, identifying and extracting all geometric elements in the preprocessed drawing image, classifying the geometric elements into linear geometric features and specific symbol geometric features, and recording the attribute parameters and spatial coordinates of each geometric element, and outputting a geometric feature set composed of linear geometric features and specific symbol geometric features;
[0008] S3: inputting the set of geometric features into a pre-defined building component semantic rule base for matching and reasoning, aggregating spatially associated linear geometric features in the set of geometric features into building components, and assigning semantic types and attributes to each building component, identifying and binding specific symbolic geometric features in the set of geometric features as attributes of corresponding building components or independent components, and generating a building component semantic network containing topological relationships among components;
[0009] S4: mapping the building component semantic network to a parametric three-dimensional modeling engine, automatically invoking corresponding three-dimensional model templates and performing parameter-driven modeling according to the semantic types and attribute parameters of components in the building component semantic network, and generating a parametric three-dimensional building model and performing visual output.
[0010] Optionally, the S1 comprises:
[0011] S11: receiving an original architectural drawing image, performing adaptive noise reduction on the original architectural drawing image using an adaptive filter based on local gray scale statistics of the image to obtain a noise-reduced image, then dynamically adjusting a contrast stretching coefficient according to global gray scale distribution of the background and foreground in the noise-reduced image, performing contrast enhancement on the noise-reduced image to obtain an enhanced image;
[0012] S12: performing morphological opening operation on the enhanced image to remove isolated noise points and burrs in the image, then performing morphological closing operation to repair broken lines and smooth jagged edges in the enhanced image, completing fine line processing, and obtaining a fine processing image;
[0013] S13: performing clustering analysis based on color values and line features on the pixels in the fine processing image, attributing pixels with similar color and line features to the same cluster, automatically separating geometric elements in the fine processing image according to the clustering results and assigning them to different logical layers, and finally outputting a pre-processed drawing image that has completed adaptive noise reduction, contrast enhancement, fine line processing, and automatic layer separation.
[0014] Optionally, the adaptive filter based on local gray scale statistics of the image is used to perform adaptive noise reduction on the original architectural drawing image, specifically: an adaptive median filter is used, and the filter window size is dynamically adjusted based on the local neighborhood gray scale statistics of each pixel in the original architectural drawing image to filter out salt and pepper noise while preserving line edges.
[0015] Optionally, the step of dynamically adjusting the contrast stretching coefficient according to the global gray scale distribution of the background and the foreground in the denoised image comprises: dividing the denoised image into a plurality of sub-regions by using a limited adaptive histogram equalization method, calculating the contrast stretching coefficient based on the local histogram of each sub-region, and enhancing the denoised image to improve the overall contrast of the image and suppress the noise amplification in the background region.
[0016] Optionally, the S2 comprises:
[0017] S21: performing edge detection on the preprocessed drawing image to obtain contour information of all geometric elements in the image, and performing vectorization processing on the contour information to generate an initial set of geometric elements composed of straight line segments and circular arc segments;
[0018] S22: classifying each geometric element in the initial set of geometric elements according to its geometric properties and morphological features, classifying geometric elements meeting the definition of straight lines, multi-segment lines or circular arcs as linear geometric features, and classifying the remaining closed or complex patterns that do not meet the definition of linear features as candidate regions of specific symbol geometric features, while accurately calculating and recording the attribute parameters and spatial coordinates of each geometric element;
[0019] S23: performing feature extraction and matching on each candidate target in the candidate region of specific symbol geometric features by using a hybrid recognition model based on shape context and convolutional neural network, comparing each candidate target in the candidate region of specific symbol geometric features with a pre-defined standard symbol library, identifying the specific type of each candidate target in the candidate region of specific symbol geometric features, and thus completing the final determination and extraction of specific symbol geometric features;
[0020] S24: merging the linear geometric features classified in S22 and the specific symbol geometric features finally determined and extracted in S23, associating their respective attribute parameters and spatial coordinates, and constructing an output geometric feature set composed of linear geometric features and specific symbol geometric features.
[0021] Optionally, the step of performing edge detection on the preprocessed drawing image in S21 comprises: processing the preprocessed drawing image by using a Canny edge detection algorithm to obtain continuous and closed geometric element contour information.
[0022] Optionally, the step of classifying according to the geometric properties and morphological features comprises: calculating the curvature feature and the closed feature of each geometric element, classifying geometric elements with a curvature lower than a preset threshold and not closed as linear geometric features, and classifying geometric elements that are closed or have a curvature higher than a preset threshold as candidate regions of specific symbol geometric features.
[0023] Optionally, the S3 comprises:
[0024] S31: input the set of geometric features into a pre-defined building component semantic rule base, traverse each rule in the building component semantic rule base, match linear geometric features and specific symbolic geometric features in the set of geometric features with conditions in the rules, for a set of geometric features satisfying the rule conditions, instantiate a basic building component with a preliminary type and a spatial position to form an initial building component instance set;
[0025] S32: traverse each basic building component in the initial building component instance set, according to the rule item on which the basic building component is generated, extract relevant attribute parameters from the set of geometric features and assign complete attribute information to the basic building component, at the same time, identify specific symbolic geometric features in the set of geometric features that are spatially associated with the basic building component as building equipment components or bind them as accessory attributes of the basic building component, generate an attribute-complete building component instance set;
[0026] S33: based on the spatial coordinates and semantic types of all building components in the attribute-complete building component instance set, infer the connection relationship, containment relationship and spatial relative position relationship between adjacent building components according to pre-defined topological relationship rules, and add these topological relationships as edges between building component nodes, finally build a building component semantic network containing all building components and their topological relationships.
[0027] Optionally, the S4 comprises:
[0028] S41: input the building component semantic network into a parametric three-dimensional modeling engine, traverse each building component in the building component semantic network, and call a matching three-dimensional model template in the three-dimensional model template library pre-installed in the parametric three-dimensional modeling engine according to the semantic type of the building component;
[0029] S42: according to the attribute parameters of each building component in the building component semantic network, parameterize and drive the corresponding three-dimensional model template called in step S41, generate a parametric three-dimensional component instance with accurate size and attributes by assigning attribute parameters to corresponding parameter variables of the three-dimensional model template, and form a three-dimensional component instance set;
[0030] S43: automatically assemble all parametric three-dimensional component instances in the three-dimensional component instance set according to their spatial coordinates and topological relationships in the building component semantic network, assemble into a complete parametric three-dimensional building model containing all components and their relationships, and call a graphic rendering engine to visualize and output the parametric three-dimensional building model.
[0031] The building drawing geometry feature extraction and visual modeling system is used for realizing the building drawing geometry feature extraction and visual modeling method, and comprises the following modules.
[0032] The drawing preprocessing module is used for performing adaptive noise reduction, contrast enhancement, line refinement processing and layer automatic separation on the original building drawing image, and outputs the preprocessed drawing image.
[0033] The geometry feature extraction module is used for performing edge detection and vectorization processing on the preprocessed drawing image, extracting linear geometry features and specific symbol geometry features, and constructing a geometry feature set comprising spatial coordinates and attribute parameters.
[0034] The component semantic modeling module is used for inputting the geometry feature set into a building component semantic rule library for matching and reasoning, and constructing a building component semantic network with semantic types, attribute parameters and topological relationships.
[0035] The recognition module is used for recognizing the type of the specific symbol geometry feature based on a shape context and a convolutional neural network extracted fusion feature vector.
[0036] The similarity calculation module is used for comparing the similarity of the fused feature vector and a template feature vector in a standard symbol library, so as to complete symbol recognition.
[0037] The parameter mapping module is used for one-to-one mapping and adaptive adjustment of the attribute parameters in the building component semantic network and the variables in the parameterized three-dimensional model template.
[0038] The three-dimensional modeling and visualization module is used for calling a three-dimensional model template conforming to the IFC standard, performing parameterized driving and automatic assembly based on topological relationships, and performing physical-based rendering and visual output through a graphic rendering engine, so as to form a complete three-dimensional building model.
[0039] The building drawing geometry feature extraction and visual modeling system has the following beneficial effects:
[0040] The building drawing geometry feature extraction and visual modeling system introduces adaptive median filtering and limiting adaptive histogram equalization processing based on local gray scale statistics of an image, significantly improves the noise reduction and contrast effect of the drawing image, realizes line refinement through morphological opening and closing operation, effectively retains weak detail information in the drawing, realizes layer automatic separation through clustering analysis of fused color value and direction gradient features, lays a high-quality foundation for subsequent geometry feature extraction, effectively reduces recognition errors caused by complex and diverse drawing sources, and improves the robustness and universality of the overall structured processing.
[0041] The present application, based on Canny edge detection and vectorization technology, constructs a set of geometric elements, and realizes accurate classification of linear and symbolic geometric features by combining curvature features and closedness judgment mechanism, and then uses a hybrid recognition model that fuses shape context and convolutional neural network to complete high-precision recognition of standard symbols in architectural drawings. Meanwhile, the present application realizes component semantic attribute assignment, accessory relationship binding and spatial connection inference through a production semantic rule reasoning mechanism and a pre-defined topological relationship rule library, and finally constructs a semantic network of architectural components with semantic types and topological structures coexisting, significantly improving the semantic completeness and spatial logic expression ability of modeling.
[0042] The present application inputs the architectural component semantic network into a parameterized three-dimensional modeling engine conforming to the IFC standard, and through a parameter mapping mechanism, the component attributes are one-to-one corresponding to the three-dimensional template variables, automatically generating component instances with accurate dimensions and attributes; by combining the spatial coordinates and topological connection relationships in the semantic network, the system can realize the spatial automatic assembly and Boolean alignment of three-dimensional components, and build a complete and topologically correct three-dimensional architectural model; finally, with the help of physical-based rendering technology, material assignment and realistic rendering are completed, supporting output as three-dimensional images or immersive VR models, thereby greatly improving the efficiency, accuracy and visual expressiveness from two-dimensional drawings to three-dimensional models. BRIEF DESCRIPTION OF DRAWINGS
[0043] In order to more clearly illustrate the technical solutions in the present application or prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description are only a part of the present application, and other drawings can also be obtained by those skilled in the art without creative effort.
[0044] Figure 1 The method flowchart of the embodiment of the present application is shown in the figure.
[0045] Figure 2 The system flowchart of the embodiment of the present application is shown in the figure. DETAILED DESCRIPTION
[0046] The present application will be described in detail below in combination with the drawings and specific embodiments. It should be noted here that in order to make the embodiments more detailed, the following embodiments are the best and preferred embodiments, and other alternative ways can also be used by those skilled in the art to implement them; and the drawings are only used to describe the embodiments more specifically, and are not intended to limit the present application specifically.
[0047] It is to be noted that references in the specification to "one embodiment", "an embodiment", "example embodiment", "some embodiments" etc. indicate that the embodiment described can include a particular feature, structure, or characteristic, but every embodiment can not necessarily include the particular feature, structure, or characteristic. Moreover, such features, structures, or characteristics can be combined in any suitable manner in different embodiments.
[0048] Generally, the terminology can be understood at least in part from usage in context. For example, the term "one or more" as used herein, depending at least in part upon context, can be used to describe any feature, structure, or characteristic in a singular sense or can be used to describe combinations of features, structures or characteristics in a plural sense. Additionally, the term "based on" can be understood as not necessarily intended to convey an exclusive set of factors, but instead can allow for existence of additional factors not necessarily expressly described, again, depending at least in part on context.
[0049] As shown in FIG. 1, the building drawing geometry extraction and visualization modeling method includes the following steps: Figure 1
[0050] S1: receiving an original building drawing image, performing adaptive noise reduction, contrast enhancement and line refinement on the original building drawing image, and performing automatic layer separation based on color and line type, and outputting a pre-processed drawing image, specifically:
[0051] S11: First, receive the original building drawing image and input it into an adaptive filter based on local gray scale statistics of the image. The adaptive filter uses an adaptive median filter algorithm. For each pixel point in the image, the local gray scale statistical parameters in its neighborhood are obtained, including the local maximum, minimum and median. The system dynamically adjusts the size of the filter window according to the deviation of the current pixel point gray value from the median value. The window size varies in the range of odd numbers (e.g. 3x3, 5x5, 7x7) to ensure that the image fine line edges are retained while effectively removing salt and pepper noise.
[0052] After adaptive median filtering, a denoised image is obtained. Subsequently, the system analyzes the global gray scale distribution characteristics of the foreground and background regions in the denoised image, divides the image into a plurality of fixed size sub-regions (such as 64x64 pixels), calculates the gray scale histogram of each sub-region, and performs a limited adaptive histogram equalization (CLAHE) operation based on the local histogram information. This method sets a contrast limit threshold for the histogram to prevent noise in the background region from being amplified due to histogram stretching. After processing, an image with enhanced overall contrast is output for subsequent processing.
[0053] S12: Morphological processing is performed on the enhanced image to remove small noise and burrs, and to repair broken line edges. First, a morphological opening operation is performed using a circular structural element with a diameter of 3 pixels, including a two-step erosion operation followed by a dilation operation, to remove noise smaller than the size of the structural element and to retain continuous line structures. Then, a morphological closing operation is performed on the opening operation result image using the same or slightly larger circular structural element (e.g., 5 pixels), including a dilation followed by an erosion, to connect line breaks caused by scanning blur, image compression, etc., to repair jagged edges and to achieve smoothing of lines in the image, obtaining a fine processed image.
[0054] S13: The system performs clustering analysis based on color values and line features on the fine processed image. First, the system extracts the RGB color values of all foreground pixel points in the image and calculates the directional gradient feature values of the lines on which they are located. The directional gradient values are combined into angle information by taking the derivative in the x and y directions using the Sobel operator. The above color values and directional gradient features are combined into a joint feature vector as the clustering input.
[0055] The system automatically sets the number of clusters or the density threshold according to the complexity of the drawing, selects an appropriate clustering algorithm, and preferentially uses the K-means clustering algorithm, and uses the unsupervised DBSCAN clustering algorithm when there are many overlapping areas of dense lines in the image. By clustering, foreground pixel points with similar color and line features are classified into the same class, and layer separation is completed. Each clustering result represents a geometric element corresponding to a logical layer.
[0056] Further, the system extracts the main features of the foreground pixel set in each clustering result, analyzes the average color value and the main line feature. The system calls a pre-set layer naming rule library, automatically assigns a semantic layer name to each class of layer based on the extracted main color and main directional gradient, such as "wall line layer", "dimension marking layer", "door and window layer", "column network layer", etc., and uses it as the logical identifier of the layer.
[0057] Finally, the preprocessed drawing image with adaptive noise reduction, contrast enhancement, line refinement, and automatic layer separation is output for subsequent geometric feature extraction and semantic modeling.
[0058] S2: Scan the preprocessed drawing image, identify and extract all geometric elements in the preprocessed drawing image, classify the geometric elements into linear geometric features and specific symbol geometric features, and record the attribute parameters and spatial coordinates of each geometric element. Output a geometric feature set composed of linear geometric features and specific symbol geometric features, which is:
[0059] S21: receiving the pre-processed drawing image output by S1, and processing the edge region in the image by using a Canny edge detection algorithm. The Canny edge detection algorithm includes four stages of Gaussian blur, gradient calculation, non-maximum suppression, and double-threshold edge connection. In the Gaussian blur stage, a fixed standard deviation parameter is used to suppress image noise; in the gradient calculation stage, a Sobel operator is used to calculate the gradient values in the x-axis and y-axis directions and synthesize a gradient amplitude and direction map; the non-maximum suppression ensures that the local maximum value position of the edge pixel points is retained; finally, the connection of weak edges and strong edges is completed by setting high and low double thresholds, forming closed and continuous contour lines, and obtaining the contour information of all geometric elements in the image.
[0060] After obtaining the complete contour information, the system performs vectorization processing on each contour region, converts the edge contour in bitmap format into a geometric figure composed of straight line segments and circular arc segments, and forms an initial set of geometric elements. The vectorization uses a contour fitting algorithm to perform piecewise linear and circular arc approximation on each closed contour region, records the basic geometric parameters of each line segment such as start and end point coordinates, direction, and radius, and saves element number and layer source information in the set to ensure consistency in subsequent feature analysis.
[0061] S22: for each geometric element in the initial set of geometric elements described above, the system classifies and processes it based on its geometric properties and morphological features. First, the curvature feature value and the closedness feature value of each geometric element are calculated. The curvature feature value is calculated by integrating the rate of change of the tangent direction of each point of the geometric element, reflecting the bending degree of the geometric shape; the closedness feature is judged by detecting whether the Euclidean distance and direction vector between the start point and the end point form a closed contour.
[0062] When the curvature feature of a geometric element is lower than the threshold set by the system (for example, 0.05 radian / pixel) and it is in a non-closed form, the element is classified as a linear geometric feature, including straight lines, multi-segment polylines, and circular arc segments. Otherwise, when the curvature is high or there is a closed structure, the geometric element is marked as a specific symbol geometric feature candidate area. The classification records the attribute parameters (including length, radius, area, direction, closedness, etc.) of each geometric element and its spatial coordinates (start and end point positions, barycenter coordinates, etc.) in the drawing as basic data for subsequent identification and modeling.
[0063] S23: for each candidate target marked as a specific symbol geometric feature candidate area, the system uses a hybrid recognition model based on shape context and convolutional neural network for accurate recognition. First, the contour curve of the candidate target is uniformly sampled by using a shape context descriptor to construct its contour feature vector, which is used to reflect the spatial contour distribution features of the graph.
[0064] Subsequently, the candidate target image region is cropped into a fixed size patch (such as 64x64 pixels), input into a pre-trained convolutional neural network model, and the internal texture feature vector is extracted, which reflects the texture features such as filling lines and symbol details inside the figure.
[0065] After fusing the above two feature vectors, a one-to-one comparison is made with the system preset standard symbol library through a similarity calculation module. The standard symbol library stores a symbol template set of general components in the field of architectural drawings, including symbols such as doors, windows, stairs, and pipeline interfaces. Each symbol template includes standardized contour and texture feature vectors and corresponding attribute parameters (such as size, orientation, number, etc.).
[0066] The recognition module judges the matching degree between the fused feature vector and the standard template by calculating the cosine similarity or Euclidean distance, and sets a recognition confidence threshold (such as 0.85). When the similarity exceeds the threshold, it is confirmed that the candidate target is a specific symbol geometric feature, and the specific type and attribute parameters are output.
[0067] S24: Merge the linear geometric features classified in S22 and the specific symbol geometric features determined in S23, and associate their attribute parameters with spatial coordinates. The system uniformly constructs a structured data set, called geometric feature set.
[0068] The data structure of the geometric feature set is in a format optimized for modeling and reasoning, in the form of a list or JSON object. Each element includes the following fields:
[0069] Layer identifier: logical name of the source layer;
[0070] Geometric type: linear geometric feature or specific symbol geometric feature;
[0071] Spatial coordinates: start and end coordinates, center of gravity coordinates, rotation angle;
[0072] Attribute parameters: length, radius, curvature, closure, symbol number, etc.
[0073] The completed geometric feature set serves as input for subsequent semantic matching and three-dimensional modeling, ensuring that the semantic modeling engine has clear spatial structure information and symbol type information support.
[0074] S3: Input the geometric feature set into the pre-defined architectural component semantic rule library for matching and reasoning. The spatially associated linear geometric features in the geometric feature set are aggregated into architectural components, and each architectural component is given a semantic type and attributes. The specific symbol geometric features in the geometric feature set are identified and bound as attributes of the corresponding architectural components or independent components, generating an architectural component semantic network containing topological relationships between components. Specifically:
[0075] S31: input the geometric feature set output by S2 into a pre-defined building component semantic rule base. The building component semantic rule base is represented by production rules, each of which consists of a condition part and an action part. The system traverses each rule in the rule base and matches each linear geometric feature in the geometric feature set with the specific symbolic geometric feature in the rule condition one by one.
[0076] For example, in the wall generation rule, the condition part is defined as the existence of two parallel linear geometric features with a distance less than a set threshold (e.g. 300mm) and consistent line type attributes; when the system detects a set of geometric features that satisfy the condition, the action part of the rule is triggered, instantiating a preliminary type of wall component building component and recording the spatial position of the wall component and the coordinates of the constituting lines.
[0077] For another example, in the door / window generation rule, the condition part is defined as the existence of a specific symbolic geometric feature of a door or window type intersecting a certain wall component in the spatial coordinates; when the condition is detected, the system instantiates a door component or a window component and marks its preliminary type as "door" or "window".
[0078] Through the above process, the system continuously traverses all rules and performs instantiation operations on geometric feature combinations that meet the conditions, eventually forming an initial building component instance set containing multiple preliminary types and spatial positions.
[0079] S32: After obtaining the initial building component instance set, the system traverses each preliminary building component in the set one by one, extracts the attribute parameters associated with it from the geometric feature set according to the rule entry corresponding to the building component, and assigns them to the building component.
[0080] Specifically, for the preliminary building component instantiated by the wall generation rule, its thickness attribute is directly assigned by the distance value of the two parallel linear geometric features on which the wall is generated, and the length attribute and endpoint coordinates of the wall are extracted and recorded as the spatial parameters of the wall component.
[0081] For the preliminary building component instantiated by the door / window generation rule, the system reads the labeling information of the specific symbolic geometric feature bound to it, parses the model, size and opening direction of the door or window from it, and writes these information as attribute parameters of the door component or window component.
[0082] In addition, for other specific symbol geometry features associated with a certain base building component in space, if the specific symbol geometry feature represents an independent device (such as a pipe interface), it is identified as an independent building device component; if the specific symbol geometry feature represents the accessory information of the component (such as the window sill height label), it is bound as the accessory attribute of the component.
[0083] After the above processing, the initial building component instance is supplemented with complete attribute parameters and accessory information to form a complete building component instance set.
[0084] S33: After obtaining the complete building component instance set, the system infers the relationship between the components according to the spatial coordinates and semantic types of all building components, combined with the pre-defined topological relationship rules.
[0085] Specifically, it includes:
[0086] Spatial connection relationship rule: if the boundary lines of two building components overlap in spatial coordinates, it is determined that the two components have a connection relationship, such as two wall bodies connected to each other.
[0087] Spatial inclusion relationship rule: if the boundary polygon of a building component completely contains the spatial coordinates of another building component, it is determined as an inclusion relationship, such as a room space containing door or window components.
[0088] Spatial relative position relationship: by analyzing the relative position of the center of gravity and the boundary coordinates of the components, the adjacency relationship of two components in horizontal or vertical direction is determined, such as a window component located in the middle of a wall component.
[0089] After completing the above relationship inference, the system takes each building component instance as a node and various topological relationships as edges to build a building component semantic network containing all building components and their relationships.
[0090] The data structure of the building component semantic network is a directed graph structure, and supports storage and output in the form of adjacency list or attribute graph. The adjacency list records the node number and adjacent node set, and the attribute graph adds semantic type, attribute parameter and spatial coordinate information to each node and edge, thereby ensuring the availability and efficiency of subsequent three-dimensional modeling and reasoning calculation.
[0091] S4: Map the building component semantic network to the parametric three-dimensional modeling engine, automatically call the corresponding three-dimensional model template and perform parameter driving according to the semantic type and attribute parameter of the component in the building component semantic network, generate a parametric three-dimensional building model and perform visual output, specifically:
[0092] S41: input the building component semantic network outputted in S3 into the parameterized three-dimensional modeling engine. The system traverses each building component node in the semantic network, reads its semantic type information, and looks up the three-dimensional model template matching the semantic type in the three-dimensional model template library preset in the parameterized three-dimensional modeling engine.
[0093] The three-dimensional model template library is built based on the Industry Foundation Classes (IFC) standard, and internally contains parameterized three-dimensional model templates conforming to the component family definition in the IFC standard, for example, the wall component corresponds to the IFCWall template, the door component corresponds to the IFCDoor template, the window component corresponds to the IFCWindow template, and the stair component corresponds to the IFCStair template. The semantic type is consistent with the component type definition in the IFC standard, thereby ensuring the standardization and scalability of the modeling process.
[0094] In the template calling process, the system checks whether the attribute parameters of the components in the semantic network correspond to the parameter variables of the model templates one by one, and triggers the parameter mapping module to perform automatic correction when inconsistencies are found, for example, re-matching non-standard symbols or generating new template mapping rules. Finally, the template calling result covering all building component semantic types is obtained, forming a set of three-dimensional model templates to be parameterized and driven.
[0095] S42: the system parameterizes and drives the three-dimensional model templates called in S41 according to the attribute parameters of each building component in the building component semantic network.
[0096] The parameterization and driving process includes one-to-one mapping and assignment of attribute parameters and model template parameter variables. For example:
[0097] For a wall component, the thickness value in its attribute parameters is assigned to the thickness parameter variable of the wall three-dimensional model template, and the height and length parameters of the wall are assigned to the corresponding height and length variables;
[0098] For a door component, the width value in its attribute parameters is assigned to the width parameter variable of the door three-dimensional model template, the height value is assigned to the height parameter variable, and the bound door opening direction attribute is parsed and assigned to the opening direction variable of the template;
[0099] For a window component, the width, height, and sill height in its attribute parameters are respectively assigned to the width, height, and bottom elevation parameter variables of the window three-dimensional model template.
[0100] After the assignment is completed, the parameterized three-dimensional modeling engine automatically instantiates to generate parameterized three-dimensional component instances with accurate dimensions and attributes. The system completes the parameter driving of all building components one by one, and finally forms a set of three-dimensional component instances containing complete wall, door, window, and stair components.
[0101] In this process, the system generates a mapping table of components and semantic network nodes simultaneously to ensure that each three-dimensional component instance is consistent with its semantic attributes, spatial coordinates, and topological relationships.
[0102] S43: The system automatically assembles all parameterized three-dimensional component instances in the three-dimensional component instance set according to their spatial coordinates and topological relationships recorded in the building component semantic network, generating a complete three-dimensional building model.
[0103] The assembly process is divided into two parts:
[0104] Spatial coordinate positioning: according to the spatial coordinate information of components recorded in the semantic network, place the three-dimensional component instance to the corresponding three-dimensional coordinate system position;
[0105] Topological relationship constraint: according to the connection relationship between components recorded in the semantic network, automatically perform Boolean operation or capture alignment at the component connection, ensuring seamless connection between walls, doors, and windows; according to the inclusion relationship, embed the auxiliary components such as doors and windows into the corresponding wall.
[0106] After completing the assembly, the system calls the graphic rendering engine to visualize the generated parameterized three-dimensional building model. The rendering process uses physical-based rendering (PBR) technology to assign material properties to different components in the three-dimensional building model, such as concrete material for walls, wood material for doors, and glass material for windows, and sets physical consistency for material parameters (reflectivity, roughness, transparency, etc.). Subsequently, the rendering engine calculates the lighting effect based on the global lighting model, generating a high-realistic three-dimensional rendering.
[0107] In addition, the system can output the rendering result as an immersive virtual reality (VR) environment, allowing users to interactively browse and view the parameterized three-dimensional building model through VR devices, achieving immersive experience and design verification of building components.
[0108] The mapping, parameter driving, assembly, and visualization process from the building component semantic network to the parameterized three-dimensional building model is completed, and the output result has standardization, accuracy, and realism.
[0109] As shown in Figure 2 the building drawing geometry feature extraction and visual modeling system is used to implement the building drawing geometry feature extraction and visual modeling method described above, including the following modules:
[0110] Drawing preprocessing module: used for adaptive noise reduction, contrast enhancement, line refinement, and automatic layer separation of original building drawing images, outputting preprocessed drawing images;
[0111] A geometric feature extraction module is configured to perform edge detection and vectorization on the preprocessed drawing image, extract linear geometric features and specific symbol geometric features, and construct a geometric feature set containing spatial coordinates and attribute parameters;
[0112] A component semantic modeling module is configured to input the geometric feature set into an architectural component semantic rule base for matching and reasoning, and construct an architectural component semantic network with semantic types, attribute parameters and topological relationships;
[0113] A recognition module is configured to recognize the type of specific symbol geometric features based on the fusion feature vector extracted by the shape context and the convolutional neural network;
[0114] A similarity calculation module is configured to compare the fused feature vector with the template feature vector in the standard symbol library in terms of similarity to complete symbol recognition;
[0115] A parameter mapping module is configured to one-to-one map and adaptively adjust the attribute parameters in the architectural component semantic network and the variables in the parameterized three-dimensional model template;
[0116] A three-dimensional modeling and visualization module is configured to call a three-dimensional model template conforming to the IFC standard, perform parameterized driving and automatic assembly based on topological relationships, and perform physics-based rendering and visualization output through a graphic rendering engine to form a complete three-dimensional architectural model.
[0117] The present application encompasses any alternative, modification, equivalent method and scheme made on the essence and scope of the present application. In order for the public to have a thorough understanding of the present application, specific details are described in the following preferred embodiments of the present application, and the present application can also be fully understood without the description of these details by those skilled in the art. In addition, in order to avoid unnecessary confusion to the essence of the present application, well-known methods, processes, procedures, elements and circuits, etc. are not described in detail.
[0118] The above is only the preferred embodiment of the present application, and it should be pointed out that for those skilled in the art, without departing from the principle of the present application, a number of improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present application.
Claims
1. A method for extracting and visualizing geometric features of architectural drawings, characterized in that, The method comprises the following steps: S1: receiving an original architectural drawing image, performing adaptive noise reduction, contrast enhancement and line refinement on the original architectural drawing image, and performing automatic layer separation based on color and line type, and outputting a preprocessed drawing image; S2: scanning the preprocessed drawing image, identifying and extracting all geometric elements in the preprocessed drawing image, classifying the geometric elements into linear geometric features and specific symbol geometric features, and recording the attribute parameters and spatial coordinates of each geometric element, and outputting a geometric feature set composed of linear geometric features and specific symbol geometric features; S3: inputting the geometric feature set into a pre-defined architectural component semantic rule library for matching and reasoning, aggregating spatially associated linear geometric features in the geometric feature set into architectural components, and assigning a semantic type and attributes to each architectural component, identifying and binding specific symbol geometric features in the geometric feature set as attributes of corresponding architectural components or independent components, and generating an architectural component semantic network containing topological relationships between components; S4: mapping the architectural component semantic network to a parametric three-dimensional modeling engine, automatically calling corresponding three-dimensional model templates and performing parameter-driven modeling according to the semantic types and attribute parameters of the components in the architectural component semantic network, generating a parametric three-dimensional architectural model and visualizing the output.
2. The method of claim 1, wherein, The S1 comprises: S11: receiving an original architectural drawing image, using an adaptive filter based on local gray scale statistics to perform adaptive noise reduction on the original architectural drawing image to obtain a noise-reduced image, and then dynamically adjusting the contrast stretching coefficient according to the global gray scale distribution of the background and foreground in the noise-reduced image to perform contrast enhancement on the noise-reduced image to obtain an enhanced image; S12: performing morphological opening operation on the enhanced image to remove isolated noise points and burrs in the image, and then performing morphological closing operation to repair broken lines and smooth jagged edges in the enhanced image, completing line refinement, and obtaining a refined image; S13: performing clustering analysis on the pixels in the refined image based on color value and line type features, attributing pixels with similar color and line type features to the same cluster, and automatically separating and assigning the geometric elements in the refined image to different logical layers according to the clustering results, and finally outputting a preprocessed drawing image that has completed adaptive noise reduction, contrast enhancement, line refinement and automatic layer separation.
3. The method of claim 2, wherein, The adaptive filter based on local gray scale statistics is used to perform adaptive noise reduction on the original architectural drawing image, specifically: an adaptive median filter is used, and the filter window size is dynamically adjusted based on the local neighborhood gray scale statistics of each pixel in the original architectural drawing image to filter out salt and pepper noise while preserving line edges.
4. The method of claim 3, wherein, The contrast stretching coefficient is dynamically adjusted according to the global gray scale distribution of the background and the foreground in the denoised image, specifically: using a restrictive adaptive histogram equalization method, the denoised image is divided into a plurality of sub-regions, the contrast stretching coefficient is calculated based on the local histogram of each sub-region, and the denoised image is enhanced to improve the overall contrast of the image and suppress the noise amplification of the background area.
5. The method of claim 4, wherein, The S2 comprises: S21: edge detection is performed on the pretreated drawing image to obtain contour information of all geometric elements in the image, and the contour information is vectorized to generate an initial geometric element set composed of straight line segments and circular arc segments; S22: for each geometric element in the initial geometric element set, the geometric attribute and morphological feature thereof are classified, geometric elements meeting the definition of straight line, multi-segment line or circular arc are classified as linear geometric features, and the remaining closed or complex patterns not meeting the definition of linearity are classified as specific symbol geometric feature candidate regions, and the attribute parameters and spatial coordinates of each geometric element are accurately calculated and recorded; S23: for each candidate target in the specific symbol geometric feature candidate region, a hybrid recognition model based on shape context and convolutional neural network is used for feature extraction and matching, each candidate target in the specific symbol geometric feature candidate region is compared with a predefined standard symbol library, and the specific type of each candidate target in the specific symbol geometric feature candidate region is identified, thereby completing the final determination and extraction of the specific symbol geometric feature; S24: the linear geometric features classified in S22 and the specific symbol geometric features finally determined and extracted in S23 are merged, and their respective attribute parameters and spatial coordinates are associated to construct an output geometric feature set composed of linear geometric features and specific symbol geometric features.
6. The method of claim 5, wherein, In S21, the edge detection is performed on the pretreated drawing image, specifically: the Canny edge detection algorithm is used to process the pretreated drawing image to obtain continuous and closed geometric element contour information.
7. The method of claim 6, wherein, The classification according to the geometric attribute and morphological feature comprises: calculating the curvature feature and the closed feature of each geometric element, classifying geometric elements with a curvature lower than a preset threshold and not closed as linear geometric features, and classifying geometric elements closed or with a curvature higher than the preset threshold as specific symbol geometric feature candidate regions.
8. The method of claim 7, wherein, The S3 comprises: S31: inputting the geometric feature set into a predefined building component semantic rule library, traversing each rule in the building component semantic rule library, matching the linear geometric features and specific symbol geometric features in the geometric feature set with the conditions in the rules, and for a group of geometric features meeting the rule conditions, instantiating a basic building component with a preliminary type and a spatial position to form an initial building component instance set; S32: traversing each base building component in the initial building component instance set, extracting relevant attribute parameters from the geometric feature set according to the rule item on which the base building component is generated, and giving the base building component complete attribute information, while identifying the specific symbolic geometric features in the geometric feature set that are spatially associated with the base building component as building equipment components or auxiliary attributes bound to the base building component, to generate an attribute-complete building component instance set; S33: based on the spatial coordinates and semantic types of all building components in the attribute-complete building component instance set, inferring the connection relationship, containment relationship and spatial relative position relationship between adjacent building components according to the predefined topological relationship rules, and adding these topological relationships as edges between building component nodes, finally constructing a building component semantic network containing all building components and their topological relationships.
9. The method of claim 8, wherein, The S4 comprises: S41: inputting the building component semantic network into a parameterized three-dimensional modeling engine, traversing each building component in the building component semantic network, and calling a matching three-dimensional model template in the three-dimensional model template library preset in the parameterized three-dimensional modeling engine according to the semantic type of the building component; S42: parameterizing and driving the corresponding three-dimensional model template called in step S41 according to the attribute parameters of each building component in the building component semantic network, generating parameterized three-dimensional component instances with accurate dimensions and attributes by assigning attribute parameters to corresponding parameter variables of the three-dimensional model template, and forming a three-dimensional component instance set; S43: automatically assembling all parameterized three-dimensional component instances in the three-dimensional component instance set according to their spatial coordinates and topological relationships in the building component semantic network, assembling into a complete parameterized three-dimensional building model containing all components and their relationships, and calling a graphic rendering engine to visualize the output of the parameterized three-dimensional building model.
10. A system for building drawing geometry feature extraction and visual modeling, for implementing the building drawing geometry feature extraction and visual modeling method according to any one of claims 1-9, characterized in that, The following modules are included: Drawing preprocessing module: for performing adaptive noise reduction, contrast enhancement, line refinement and automatic layer separation on the original building drawing image, and outputting the preprocessed drawing image; Geometric feature extraction module: for performing edge detection and vectorization processing on the preprocessed drawing image, extracting linear geometric features and specific symbolic geometric features, and constructing a geometric feature set containing spatial coordinates and attribute parameters; Component semantic modeling module: for inputting the geometric feature set into the building component semantic rule library for matching and reasoning, to construct a building component semantic network with semantic types, attribute parameters and topological relationships; Recognition module: for recognizing the type of specific symbolic geometric features based on shape context and convolutional neural network extracted fusion feature vectors; Similarity calculation module: for comparing the similarity of the fused feature vector and the template feature vector in the standard symbol library to complete symbol recognition; Parameter mapping module: for one-to-one mapping and adaptive adjustment of attribute parameters in the building component semantic network and variables in the parameterized three-dimensional model template; Three-dimensional modeling and visualization module: used to call the three-dimensional model template conforming to IFC standard, execute parameterization driving and automatic assembly based on topological relationship, and carry out physical-based rendering and visualization output through graphic rendering engine, forming complete three-dimensional building model.
Citation Information
Patent Citations
Modeling implementation method and system based on CAD
CN116011062A
Modeling construction method and system based on BIM building model
CN119047057A