Building plan structured analysis and high-precision vector conversion system and method
By employing multi-level processing and explicit geometric operators, the stability issues of semantic understanding and topological convergence in architectural floor plans are resolved, enabling high-precision vector transformation and structured data generation, which is suitable for automated parsing of architectural drawings and engineering applications.
Patent Information
- Application Number
- CN202611391810.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-09
- Publication Date
- 2026-11-27
AI Technical Summary
Existing technologies struggle to achieve stable semantic understanding, local component detection, and spatial topology convergence in architectural floor plans, resulting in inaccurate geometric results and difficulty in generating editable and computable structured vector data.
A structured analysis and high-precision vector conversion system for architectural floor plans is adopted. Through multi-level processing of semantic processing layer, registration and normalization layer, local perception layer, geometric constraint layer and structural convergence layer, combined with explicit geometric operators and multi-source evidence verification, stable wall boundaries, center lines and room topology are generated.
It improves the resolvability of input images, reduces training and transfer costs, enhances the interpretability and engineering feasibility of geometric results, and outputs editable and computable structured spatial assets.
Smart Images

Figure CN123182256A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of intelligent analysis of architectural drawings, computer vision, object detection, multimodal large model-assisted image processing, floor plan vectorization, spatial topology reconstruction and structured data generation, and particularly to a system and method for structured analysis and high-precision vector conversion of architectural floor plans. Background Technology
[0002] Architectural floor plans are a common carrier of spatial information in the field of architecture, but their engineering value lies not in the pixelated images themselves, but in the structured spatial assets that can be modeled, queried, edited, and verified. Downstream tasks such as parametric 3D modeling, BIM / CAD reconstruction, spatial syntax analysis, floor plan evaluation, automated interior design, intelligent spatial applications, and front-end editable displays typically require explicit data such as wall boundaries, door and window openings, room types, spatial connectivity, and adjacency relationships.
[0003] Common input images can come from scanned images, webpage screenshots, PDF raster images, CAD exported bitmaps, or other 2D architectural floor plans, where walls, doors and windows, furniture, text annotations, dimension lines, material fills, direction symbols, and decorative elements are mixed within the same pixel plane. If these images cannot be converted into data that can be called by JSON, SVG, DXF, or CAD / BIM interfaces, downstream engineering processes will find it difficult to reuse them reliably.
[0004] Traditional computer vision methods and their limitations: Traditional computer vision methods typically reconstruct walls, doors, windows, and room areas through color thresholding, grayscale segmentation, edge detection, contour extraction, connected component analysis, morphological operations, and geometric rule stitching. These methods offer interpretable workflows, clear module boundaries, and adjustable parameters, enabling rapid assembly lines when drawing styles are standardized, wall colors are consistent, and noise levels are low.
[0005] However, traditional methods typically require performing geometric operations directly on the original mixed drawings, which is susceptible to complex dimensioning, furniture occlusion, discontinuous line types, texture fills, screenshot compression, local breaks, and stylistic differences between drawings from different sources. If the preceding binarization or segmentation results are unstable, subsequent connected component analysis, room closure, and topological inference will amplify the errors, leading to missed wall detections, boundary breaks, room fragmentation, or failure to achieve topological closure.
[0006] Deep learning methods and their limitations: Deep learning methods can learn local visual features such as walls, doors, windows, furniture, and text through detection or segmentation networks, and assemble these local predictions into editable vector floor plans using junctions, line segments, segmentation masks, integer programming, geometric correction, and topological constraints. Compared to traditional rule-based methods, these methods rely less on manual thresholding and are able to learn cross-style features from data.
[0007] However, complete end-to-end deep learning solutions typically rely heavily on high-quality labeled data, training distributions, and predefined structural representations. For sloping walls, narrow walls, weak segmentation, complex symbols, non-standard drawings, and drawings from different sources, the generalization of a single network remains unstable. Directly training room-level or full-map-level models incurs high data and transfer costs, and the root causes of errors are difficult to pinpoint.
[0008] Pure multimodal large model methods and their limitations: Pure multimodal large model methods attempt to directly input floor plan images and require the model to output vector coordinates or JSON. This method has strong global semantic understanding capabilities and zero-shot adaptability, but for precise geometric coordinates, wall thickness, node connections, scale constraints, and verifiable topological structures, its results are prone to coordinate illusions, scale distortion, spatial relationship disorder, or unstable output format.
[0009] Therefore, pure multimodal large models are not suitable as direct generators of engineering-grade geometric assets. A more reasonable technical approach is to place large models where they are better suited, namely semantic-level image cleaning of complex drawings, self-checking of image processing results, room type and semantic topology proposal, while leaving accurate geometric reconstruction to explicit computer vision and geometric operators.
[0010] The core contradiction of existing technologies lies in the fact that traditional computer vision (CV) has advantages in geometric constraints and engineering controllability, but is sensitive to semantic noise in the original mixed drawings; deep learning models have advantages in local perception, but are limited by data distribution and generalization of the whole image structure; multimodal large models have advantages in semantic understanding and cross-style adaptation, but lack verifiable and precise geometric constraints.
[0011] The technical problem to be solved by this invention is: how to establish a structured analytical workflow for architectural floor plans that features explicit intermediate states, replaceable modules, self-checking capabilities, rollback capabilities, and verifiable geometric results, so that semantic understanding, local component detection, wall geometry reconstruction, and spatial topology convergence can be mutually verified within a unified coordinate system, ultimately outputting editable, calculable, and verifiable structured vector space data. Summary of the Invention
[0012] To address the aforementioned problems, this invention provides a system and method for structured analysis and high-precision vector conversion of architectural floor plans.
[0013] This invention discloses a structured analysis and high-precision vector conversion system for architectural floor plans. The input and standardization module is connected to a semantic processing layer; the semantic processing layer is connected to a quality inspection and process control node; the quality inspection and process control node is connected to a registration and normalization layer; the registration and normalization layer is connected to a local perception layer; the local perception layer is connected to a geometric constraint layer; the local perception layer is connected to a structural convergence layer; the geometric constraint layer is connected to the structural convergence layer; the structural convergence layer is connected to a correction node; and the correction node is connected to a structured output module.
[0014] In the above scheme, the semantic processing layer includes a semantic image preprocessing module, a room semantic topology proposal node, and an OCR text recognition and room binding node; the registration and normalization layer includes wall anchor point registration and unified canvas normalization; the local perception layer includes door and window detection nodes and furniture detection nodes; the geometric constraint layer includes morphological geometric reconstruction nodes and opening constraint topology convergence nodes; the structural convergence layer includes multi-source evidence structural convergence nodes; and the structured output module includes rendering and structured output interfaces.
[0015] A method for structured analysis and high-precision vector conversion of architectural floor plans includes the following steps: S1: Input image acquisition and basic normalization; Receive architectural floor plans and perform resolution, orientation, boundary, color space, and coordinate system normalization; S2: Semantic image preprocessing and wall plan generation; remove or weaken non-wall interference, repair broken walls and double dashed line wall representations, and generate cleaned images and wall plans; proceed to S3; S3: Quality inspection and process control; determine whether the intermediate image meets the requirements for wall continuity, boundary clarity, noise residue, and subsequent geometric analysis; if it passes the inspection, proceed to S4; if it fails the inspection, proceed to S2. S4: Wall anchor point registration and unified canvas normalization, aligning the cleaning image and wall image to a unified spatial reference and standard canvas, eliminating coordinate drift; convert to S5 and then to S6 to become the base image; S5: Local component detection, detecting doors, windows, and furniture as candidate objects, and recognizing room text, outputting category, detection box, confidence score, and local semantic anchor point; door and window detection results are forwarded to S6; furniture detection and room text recognition results are forwarded to S9; S6: Morphological wall geometry reconstruction, generating wall boundaries, centerlines and node topology based on main direction, double LSD, probe, strip, polygonize and boundary edge pairs; S7: Opening constraint topology convergence and room extraction. Based on the wall geometry results output by S6 and the door and window candidate results output by S5, clean up the wall line topology, extract room polygons, and bind the door and window candidates to opening line segments aligned with the wall or room boundary. S8: Room semantic topology proposal, based on the room polygons and opening relationships output by S7, generates candidate room types, main entrances, connectivity relationships and adjacency relationships under a constrained schema; S9: The multi-source evidence structure converges and receives the wall boundaries and center lines output by S6, the room polygons and opening relationships output by S7, the room semantic topology candidates output by S8, and the furniture candidates and room text recognition results output by S5. It unifies geometric, opening, furniture, OCR and semantic evidence, and merges, retains, downweights or filters the room candidates. S10: Opening correction, rendering and structured output. Optional corrections are made to the opening results, the final preview image is generated, JSON structured data is exported, and conversion interfaces for SVG, DXF, CAD or BIM formats are provided.
[0016] In the above scheme, the semantic image preprocessing in S2 can generate at least two types of intermediate images according to their purpose: layout cleaning image is used to retain room text, furniture and main spatial semantic clues, while removing north arrows, dimension lines, irrelevant annotations, textures and background noise; wall image or wall plan image is used to remove non-wall interference from furniture, text, door and window symbols, repair locally broken walls, double dashed walls or weakly connected walls, extract binary wall images, and temporarily fill window openings or local openings in the wall image as continuous walls.
[0017] In the above scheme, in step S4, the system extracts a relatively stable wall anchor point mask from the original image, prioritizes retaining dark wall areas, and performs support filtering on the original wall mask based on the coarse registration result to remove isolated small connected domains and non-wall noise; subsequently, the system performs initial scaling and translation based on the wall range to obtain coarse alignment results, then performs local search in the scaling and translation parameter space, and calculates a comprehensive score for each candidate alignment result.
[0018] Score(M_c)=0.55·C(M_c,M_o)+0.35·R(M_c,M_o)+0.10·D(M_c,M_o) Where M_o represents the wall anchor point mask extracted from the original image, M_c represents the wall mask after alignment of the current candidate, C represents the coverage of the candidate wall in the neighborhood of the original wall, R represents the recall of the candidate result to the original wall, and D represents the consistency term based on distance transform. The system only accepts the fine registration when the fine registration result reaches the minimum gain compared with the coarse registration result, so as to avoid unstable updates introduced by local search.
[0019] In the above scheme, step S6 includes the following steps: S61: Wall mask preprocessing; The system first performs thresholding, morphological cleaning, connected component filtering and hole repair on the normalized wall image, and can combine opening candidates to perform conditional local redrawing to reduce the interference of door and window symbols, opening marks and local breaks on subsequent geometric extraction. S62: Extraction of principal directions and double LSD boundaries; First, a family of principal directions Φ is estimated to constrain subsequent line segment evidence. The family of principal directions can be obtained based on candidate line segment direction statistics, Hough direction distribution, building plan principal axis estimation or a combination thereof. The detected line segments are not directly used as the final result, but are snapped to the nearest family of principal directions. When the line segment direction deviates too much from the nearest principal direction, it can be discarded or downweighted. The system obtains complementary line segment evidence from two types of image representations: one from the opening-conditioned grayscale image, which mainly preserves long and stable wall responses; and the other from the open occupancy mask, which mainly compensates for short wall segments and local fractures. The two types of line segments are then processed through orientation snapping, length filtering, duplicate merging, and conflict cleanup to form a candidate boundary set. E = Snap_Φ( LSD(I_g;θ_g) ∪ LSD(I_m;θ_m) ) Where I_g represents the grayscale image after opening conditionalization, I_m represents the occupancy mask after opening operation, θ_g and θ_m represent two sets of LSD detection parameters respectively, and Snap_Φ represents snapping candidate line segments to the nearest main direction and removing or reducing the weight of line segments with excessive angle deviation; S63: Generate a vector wall mask based on the boundary; For a candidate line segment e, the system performs a local probe along the normal direction on both sides of the line segment, determines the wall expansion direction based on the difference in pixel support on both sides, and then generates a strip using the line segment as a seed. The length and width of the strip are limited by factors such as nearby line evidence, endpoint stopping conditions, white area stopping conditions, maximum width constraints, and wall mask support. All strips are merged through region union and then polygonized to obtain a stable wall boundary or wall polygon region. M_wall = Polygonize( ⋃_{e∈E} Strip(e,n_e,stop_e) ) Where E is the set of candidate boundaries, n_e represents the normal direction of candidate line segment e, stop_e represents the constraints such as endpoint stop, white area stop, intersection line stop, maximum width stop, and M_wall represents the wall mask or wall polygon region obtained after strip merging and polygonization. S64: Geometric topology reconstruction and centerline recovery; After obtaining the stable wall region, the system does not directly extract the skeleton using the traditional grid refinement method, but recovers the centerline from the reconstructed wall boundary. The system first represents the wall region as a set of boundary edges, and then finds the boundary edge pairs that can be interpreted as the two sides of the same wall under the final wall mask constraint. Boundary edge pair determination can be completed based on a combination of conditions such as relative or parallel consistency of direction, projection overlap, edge spacing or wall thickness range, and edge area fill rate. Only when the boundary pair meets the consistency requirements in direction, overlap, thickness and area fill will the center line be generated from the midpoint of its corresponding position, and further angle adsorption, collinear merging, ray extension and mask support filtering will be performed. C = { Mid(b_i,b_j) | Pair(b_i,b_j)=1} Where b_i and b_j represent the boundary edges of the wall area, Pair(b_i,b_j)=1 indicates that the boundary meets the requirements of direction, overlap, thickness and fill consistency, and Mid(b_i,b_j) represents the generation of the wall centerline from the midpoint of the corresponding positions of the two boundary edges. This design makes the centerline no longer a passive refinement of the grid shape, but a structured geometric representation obtained by the joint constraints of the two boundary edges of the wall.
[0020] In the above scheme, the output of the S8 room semantic topology proposal follows a unified schema: nodes include only main entrance nodes and room nodes; the types of room nodes are limited to a preset label set; edges include only connectivity relationships and only adjacency relationships; the system further performs schema normalization to constrain room type naming consistency, main entrance uniqueness, edge deduplication, node reference validity, and relationship mutual exclusion.
[0021] In the above scheme, the coordinate mapping and structural convergence node of the S9 multi-source data stream does not directly trust any single path output. Instead, it incorporates room polygons, wall boundaries, opening relationships, furniture anchors, OCR text semantics, and S8 semantic topology into the same evidence space. The system uses room polygons as the geometric basis and room nodes and relationship graphs in the semantic topology as cross-room priors. At the same time, it compresses furniture information into a small number of discriminative room-level anchors.
[0022] An electronic device comprising: a processor and a memory storing a computer-executable program, wherein the executable program, when executed, causes the processor to perform the method according to any one of claims 3-8.
[0023] A computer-readable storage medium storing one or more programs that, when executed by a processor, implement the method of any one of claims 3-8.
[0024] The advantages and beneficial effects of this invention are as follows: This invention provides a system and method for structured analysis and high-precision vector conversion of architectural floor plans. It improves the parsability of input images: through semantic image preprocessing and quality inspection, complex floor plans are transformed into wall-enhanced images with more stable boundaries and less non-wall noise. It reduces training and transfer costs: the detection model is limited to local components such as doors, windows, and furniture, rather than requiring end-to-end training at the room or full-map level. It improves the interpretability of geometric results: wall regions, boundaries, centerlines, and node relationships are generated by explicit geometric operators, avoiding direct reliance on unverifiable coordinate generation. It suppresses the spread of single-point errors: the structural convergence module does not directly trust any path output, but only changes the final room structure when multiple sources of evidence support each other. It improves module replaceability: each node is connected through a stable intermediate state interface, allowing for local replacement of models, prompts, rule thresholds, or geometric operators without reconstructing the entire pipeline. It enhances engineering feasibility: the final output is an editable, computable, and verifiable structured spatial asset that can be interfaced with JSON, SVG, DXF, CAD / BIM, or other downstream interfaces. Attached Figure Description
[0025] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0026] Figure 1 This is a schematic diagram of the system structure of the present invention; Figure 2 This is a schematic diagram of the process of the present invention; Figure 3 A schematic diagram illustrating semantic image preprocessing and wall enhancement image generation; Figure 4 This is a schematic diagram illustrating the vectorization transformation from a B6 pixel matrix to a geometric entity. Figure 5 This is a schematic diagram of wall topology cleanup, room polygon extraction, and opening binding.
[0027] In the diagram: 1. Input and Standardization Module; 2. Semantic Processing Layer; 2. Semantic Image Preprocessing Module; 2. Room Semantic Topology Proposal Node; 2. OCR Text Recognition and Room Binding Node; 3. Quality Inspection and Process Control Node; 4. Registration and Normalization Layer; 4. Wall Anchor Point Registration and Unified Canvas Normalization; 5. Local Perception Layer; 5. Door and Window Detection Node; 5. Furniture Detection Node; 6. Geometric Constraint Layer; 6. Morphological Geometric Reconstruction Node; 6. Opening Constraint Topology Convergence Node; 7. Structural Convergence Layer; 7. Multi-Source Evidence Structural Convergence Node; 8. Correction Node; 9. Structured Output Module; 9. Rendering and Structured Output Interface. Detailed Implementation
[0028] The specific embodiments of the present invention will be further described below with reference to the accompanying drawings and examples. The following examples are only used to more clearly illustrate the technical solutions of the present invention and should not be construed as limiting the scope of protection of the present invention.
[0029] like Figure 1 As shown, this invention is a structured analysis and high-precision vector conversion system for architectural floor plans. The input and standardization module is connected to the semantic processing layer. The semantic processing layer is connected to the quality inspection and process control node. The quality inspection and process control node is connected to the registration and normalization layer. The registration and normalization layer is connected to the local perception layer. The local perception layer is connected to the geometric constraint layer. The local perception layer is connected to the structural convergence layer. The geometric constraint layer is connected to the structural convergence layer. The structural convergence layer is connected to the correction node. The correction node is connected to the structured output module.
[0030] The semantic processing layer includes a semantic image preprocessing module, a room semantic topology proposal node, and an OCR text recognition and room binding node. The registration and normalization layer includes wall anchor point registration and unified canvas normalization. The local perception layer includes door and window detection nodes and furniture detection nodes. The geometric constraint layer includes morphological geometric reconstruction nodes and opening constraint topology convergence nodes. The structural convergence layer includes multi-source evidence structural convergence nodes. The structured output module includes rendering and structured output interfaces.
[0031] like Figure 2 As shown, a method for structured analysis and high-precision vector conversion of architectural floor plans includes the following steps: S1: Input image acquisition and basic normalization; Receive architectural floor plans and perform resolution, orientation, boundary, color space, and coordinate system normalization; S2: Semantic image preprocessing and wall plan generation; remove or weaken non-wall interference, repair broken walls and double dashed line wall representations, and generate cleaned images and wall plans; proceed to S3; S3: Quality inspection and process control; determine whether the intermediate image meets the requirements for wall continuity, boundary clarity, noise residue, and subsequent geometric analysis; if it passes the inspection, proceed to S4; if it fails the inspection, proceed to S2. S4: Wall anchor point registration and unified canvas normalization, aligning the cleaning image and wall image to a unified spatial reference and standard canvas, eliminating coordinate drift; convert to S5 and then to S6 to become the base image; S5: Local component detection, detecting doors, windows, and furniture as candidate objects, and recognizing room text, outputting category, detection box, confidence score, and local semantic anchor point; door and window detection results are forwarded to S6; furniture detection and room text recognition results are forwarded to S9; S6: Morphological wall geometry reconstruction, generating wall boundaries, centerlines and node topology based on main direction, double LSD, probe, strip, polygonize and boundary edge pairs; S7: Opening constraint topology convergence and room extraction. Based on the wall geometry results output by S6 and the door and window candidate results output by S5, clean up the wall line topology, extract room polygons, and bind the door and window candidates to opening line segments aligned with the wall or room boundary. S8: Room semantic topology proposal, based on the room polygons and opening relationships output by S7, generates candidate room types, main entrances, connectivity relationships and adjacency relationships under a constrained schema; S9: The multi-source evidence structure converges and receives the wall boundaries and center lines output by S6, the room polygons and opening relationships output by S7, the room semantic topology candidates output by S8, and the furniture candidates and room text recognition results output by S5. It unifies geometric, opening, furniture, OCR and semantic evidence, and merges, retains, downweights or filters the room candidates. S10: Opening correction, rendering and structured output. Optional corrections are made to the opening results, the final preview image is generated, JSON structured data is exported, and conversion interfaces for SVG, DXF, CAD or BIM formats are provided.
[0032] S1: Input Image Acquisition and Basic Standardization The input image can be a scanned image of a residential floor plan, a photo taken with a mobile phone, a screenshot of a webpage, a PDF raster image, a bitmap exported from CAD, or other two-dimensional architectural floor plans. The system performs resolution normalization, boundary cropping, rotation correction, color space conversion, coordinate origin setting, and image size recording on the input image, forming the initial coordinate information shared by all subsequent branches.
[0033] In one implementation, the system simultaneously retains the original image, the cleaned image, the wall image, the local detection results, the geometric reconstruction results, the semantic topology results, and the running status, so that the results of each stage not only exist as temporary files, but also participate in subsequent verification as reusable, inspectable, and rollback-able explicit intermediate states.
[0034] S2: Semantic image preprocessing and wall enhancement map generation (B1-B4 nodes) like Figure 3 As shown, in one implementation, the system inputs the original floor plan into a semantic image preprocessing module consisting of a large language model, a multimodal large model, an image editing model, an image segmentation model, or a combination thereof. The task of this module is not to directly output wall vector coordinates, nor to directly determine the category of all spatial objects, but rather to clean up non-wall visual interference and generate a cleaned layout map, a black-and-white wall map, or a wall enhancement map suitable for subsequent geometric analysis.
[0035] The semantic image preprocessing in S2 can generate at least two types of intermediate images according to their purpose: layout cleaning image is used to retain room text, furniture and main spatial semantic clues, while removing north arrows, dimension lines, irrelevant annotations, textures and background noise; wall image or wall plan image is used to remove non-wall interference from furniture, text, door and window symbols, repair locally broken walls, double dashed walls or weakly connected walls, extract binary wall images, and temporarily fill window openings or local openings in the wall image as continuous walls.
[0036] With this setup, traditional geometric CV no longer needs to directly understand the semantics of complex drawings, but instead performs controlled geometric calculations on a more stable wall reinforcement drawing. The output of the semantic preprocessing module is still considered an intermediate candidate result, which needs to be confirmed by subsequent quality inspection nodes before it can proceed to geometric reconstruction.
[0037] S3: Quality Inspection and Process Control Nodes F1-F4 The system sets quality inspection nodes after each stage of semantic preprocessing. These nodes can determine whether intermediate images meet the standards based on indicators such as wall continuity, boundary clarity, black and white contrast, noise residue, local breakage, residue of non-wall objects, and suitability for line segment detection.
[0038] If the quality inspection fails, the task orchestration module can re-call the current image processing node, adjust prompts or processing parameters, revert to the previous stage, use an alternative processing strategy, or enter a degraded path. If the quality inspection passes, the intermediate image is solidified as shared input for subsequent local detection, geometric reconstruction, and semantic judgment. Thus, semantic preprocessing not only performs image cleaning but also constitutes the first layer of error control mechanism in the overall workflow.
[0039] S4: Wall Anchor Point Registration and Unified Canvas Normalization B5 Node After semantic preprocessing, the system can simultaneously obtain the cleaned image and the wall image, but the two may have slight coordinate offsets due to image generation, cropping, scaling, or boundary repair. To ensure that subsequent detection, geometric reconstruction, and semantic fusion are performed in the same coordinate system, this invention introduces wall anchor point registration and unified canvas normalization steps.
[0040] In one implementation, the system extracts a relatively stable wall anchor point mask from the original image, prioritizes retaining dark wall areas, and performs support filtering on the original wall mask based on the coarse registration result to remove isolated small connected domains and non-wall noise. Subsequently, the system performs initial scaling and translation based on the wall range to obtain a coarse alignment result, performs a local search in the scaling and translation parameter space, and calculates a comprehensive score for each candidate alignment result.
[0041] Score(M_c)=0.55·C(M_c,M_o)+0.35·R(M_c,M_o)+0.10·D(M_c,M_o) Where M_o represents the wall anchor point mask extracted from the original image, M_c represents the wall mask after alignment of the current candidate, C represents the coverage of the candidate wall in the neighborhood of the original wall, R represents the recall of the candidate result to the original wall, and D represents the consistency term based on distance transform. The system only accepts the fine registration when the fine registration result reaches the minimum gain compared with the coarse registration result, so as to avoid unstable updates introduced by local search.
[0042] After registration, the system performs uniform cropping using the wall area as the primary reference and places the cleaned image and wall image onto a standard canvas. In one implementation, the standard canvas can be set to 1024×1024 pixels with margins retained. This step eliminates the need for subsequent local detection, geometric reconstruction, and semantic reasoning to separately handle coordinate drift and scale changes.
[0043] S5: Local component detection and OCR text recognition C1, D1, O1 nodes The system uses a lightweight object detection model to identify local components such as doors, windows, and furniture, and uses OCR nodes to recognize text within a room. The door and window detection node outputs categories such as windows, hinged doors, and sliding doors, along with their bounding boxes and confidence scores; the furniture detection node outputs categories such as beds, sofas, tables and chairs, sanitary ware, kitchenware, refrigerators, and washing machines, along with their bounding boxes and confidence scores; and the OCR node outputs text boxes, recognized text, and confidence scores.
[0044] This step does not use the object detection model or OCR results as the sole source for full-image structured parsing, nor does it require them to directly identify complete room boundaries or the final topology. The detection results and OCR text primarily serve as local evidence for opening relationships, room function judgments, furniture anchors, textual semantic anchors, and structural convergence, inputting them into subsequent modules.
[0045] S6: Wall Morphological Geometric Reconstruction B6 Node After semantic preprocessing and unified canvas normalization, the input wall image has become a relatively stable wall pixel matrix. At this point, the task is no longer to understand the drawing content, but to extract contours, line segments, wall regions, centerlines, and topological relationships from clear boundaries. Therefore, explicit morphological CV and geometric operators have the advantages of accuracy, controllability, and efficiency at this stage. S6 includes the following steps: S61: Wall mask preprocessing; The system first performs thresholding, morphological cleaning, connected component filtering and hole repair on the normalized wall image, and can combine opening candidates to perform conditional local redrawing to reduce the interference of door and window symbols, opening marks and local breaks on subsequent geometric extraction. S62: Extraction of principal directions and double LSD boundaries; First, a family of principal directions Φ is estimated to constrain subsequent line segment evidence. The family of principal directions can be obtained based on candidate line segment direction statistics, Hough direction distribution, building plan principal axis estimation or a combination thereof. The detected line segments are not directly used as the final result, but are snapped to the nearest family of principal directions. When the line segment direction deviates too much from the nearest principal direction, it can be discarded or downweighted. The system obtains complementary line segment evidence from two types of image representations: one from the opening-conditioned grayscale image, which mainly preserves long and stable wall responses; and the other from the open occupancy mask, which mainly compensates for short wall segments and local fractures. The two types of line segments are then processed through orientation snapping, length filtering, duplicate merging, and conflict cleanup to form a candidate boundary set. E = Snap_Φ( LSD(I_g;θ_g) ∪ LSD(I_m;θ_m) ) Where I_g represents the grayscale image after opening conditionalization, I_m represents the occupancy mask after opening operation, θ_g and θ_m represent two sets of LSD detection parameters respectively, and Snap_Φ represents snapping candidate line segments to the nearest main direction and removing or reducing the weight of line segments with excessive angle deviation; S63: Generate a vector wall mask based on the boundary; For a candidate line segment e, the system performs a local probe along the normal direction on both sides of the line segment, determines the wall expansion direction based on the difference in pixel support on both sides, and then generates a strip using the line segment as a seed. The length and width of the strip are limited by factors such as nearby line evidence, endpoint stopping conditions, white area stopping conditions, maximum width constraints, and wall mask support. All strips are merged through region union and then polygonized to obtain a stable wall boundary or wall polygon region. M_wall = Polygonize( ⋃_{e∈E} Strip(e,n_e,stop_e) ) Where E is the set of candidate boundaries, n_e represents the normal direction of candidate line segment e, stop_e represents the constraints such as endpoint stop, white area stop, intersection line stop, maximum width stop, and M_wall represents the wall mask or wall polygon region obtained after strip merging and polygonization. S64: Geometric topology reconstruction and centerline recovery; After obtaining the stable wall region, the system does not directly extract the skeleton using the traditional grid refinement method, but recovers the centerline from the reconstructed wall boundary. The system first represents the wall region as a set of boundary edges, and then finds the boundary edge pairs that can be interpreted as the two sides of the same wall under the final wall mask constraint. Boundary edge pair determination can be completed based on a combination of conditions such as relative or parallel consistency of direction, projection overlap, edge spacing or wall thickness range, and edge area fill rate. Only when the boundary pair meets the consistency requirements in direction, overlap, thickness and area fill will the center line be generated from the midpoint of its corresponding position, and further angle adsorption, collinear merging, ray extension and mask support filtering will be performed. C = { Mid(b_i,b_j) | Pair(b_i,b_j)=1} Where b_i and b_j represent the boundary edges of the wall region, Pair(b_i,b_j)=1 indicates that the boundary meets the requirements for consistency in direction, overlap, thickness, and fill. Mid(b_i,b_j) represents the generation of the wall centerline from the midpoints of the corresponding positions of the two boundary edges. This design makes the centerline no longer a passive refinement of the grid pattern, but a structured geometric representation obtained by the joint constraints of the two boundary edges of the wall. Figure 4 As shown.
[0046] S7: Wall topology cleanup, room polygon extraction and opening binding (B7-B8, C2 nodes) After obtaining wall boundaries, centerlines, and candidate doors and windows, the system does not immediately perform room semantic inference. Instead, it first performs wall line topology convergence under opening constraints. This step is used to repair line ends, duplicate parallel lines, small gaps, and local topological noise caused by door and window areas, opening symbols, and local breaks, so that subsequent room extraction is based on a more stable closed line structure.
[0047] For each door / window candidate frame b and its category c, the system constructs a category-related local extended region B′(b,c) and searches for the longest line segment that overlaps with this extended region in the set of wall lines W formed by the room boundary and the global outer contour.
[0048] ℓ*(b)=argmax_{ℓ∈W} len(B′(b,c)∩ℓ), and len(B′(b,c)∩ℓ*(b))≥τ_int Candidate boxes meeting the above conditions are converted into opening line segments aligned with the main wall structure, rather than being directly written into the topology as area-type detection boxes. For slender openings or weakly symbolic regions, the system allows a small number of bridging candidates generated during the wall processing stage to participate in compensation, while suppressing duplicate candidates with consistent orientation and spatial overlap. The main entrance is identified only among swing door candidates that have effective overlap with the global outer contour.
[0049] Subsequently, the system combines wall masks, centerlines, opening segments, and outer contours to perform line end cleanup, local endpoint extension, necessary bridging compensation, node merging, wall contour union, and room closure. The room extraction results include the room polygon, area, centroid, and geometric relationships associated with the walls and openings. Figure 5 As shown.
[0050] S8: Room Semantic Topology Proposal B9 Node Node B9 is used to generate room semantic topology candidates with constrained structures from the normalized layout diagram; in an alternative implementation, room geometry candidates, door and window opening relationships, furniture anchors, and OCR text semantics can also be combined as prompt input. This output is not a new geometric truth, but rather a semantic prior used for subsequent structural convergence.
[0051] In one implementation, the B9 output follows a unified schema: nodes include only main entrance nodes and room nodes; room node types are restricted to a preset label set; edges include only connectivity and adjacency-only relationships. The system further performs schema normalization, constraining room type naming consistency, main entrance uniqueness, edge deduplication, node reference validity, and relationship mutual exclusion.
[0052] Therefore, B9 acts as a "controlled semantic proposer" rather than a final structural decision maker. When semantic results conflict with geometric topology, opening relationships, or furniture anchors, B10 can downweight them, delay matching, or simply record them as low-confidence candidate relationships.
[0053] S9: Convergence of the multi-source evidence structure (B10 node) B10 is a coordinate mapping and structural convergence node for multi-source data streams, and its core logic is "structural convergence under evidence constraints". This node does not directly trust any single path output, but instead incorporates room polygons, wall boundaries, opening relationships, furniture anchor points, OCR text semantics, and B9 semantic topology into the same evidence space.
[0054] In one implementation, the system uses room polygons as the geometric basis and room nodes and relationship graphs in the semantic topology as cross-room priors, while compressing furniture information into a small number of discriminative room-level anchors. For example, a bed supports bedroom semantics, a sofa supports living room semantics, a stove supports kitchen semantics, a dining table supplements dining room or living / dining room semantics, and sanitary ware supports bathroom semantics.
[0055] For candidate room r and semantic node n, the system does not use simple name matching, but instead combines fixed room references, relative directions, connectivity or adjacency-only relationships, additional geometric adjacency penalties, and furniture anchor point priors to calculate the candidate matching quality.
[0056] Q(r,n)=Σ_{j∈F(r)}(s_dir(r,n;j)+s_conn(r,n;j))+λ_f·s_furniture(r,n)+λ_o·s_ocr(r,n)-η·N_extra(r,n) Where F(r) represents the set of fixed reference rooms associated with candidate room r, s_dir represents the consistency between the actual relative direction and the semantic description, s_conn represents whether the current geometry and opening constraints satisfy connectivity or adjacency only, s_furniture represents the support of furniture anchors for room types, s_ocr represents the support of OCR text semantics for room types, N_extra represents the number of extra adjacencies that are not present in the semantic topology but appear in the geometry, and λ_f, λ_o, and η are weights. The system can also calculate the relation coverage C(r,n)=m(r,n) / e(r,n), where m is the number of successfully matched evaluable relations and e is the total number of evaluable relations.
[0057] The actual assignment is not done through local greedy algorithms, but rather through a joint search among candidates of the same type to maximize global coverage, relationship consistency, and the number of strong matches. This avoids inconsistencies in the overall topology interpretation caused by locally optimal label assignments.
[0058] For the over-segmentation problem, if the number of geometric rooms of a certain type exceeds the number of corresponding nodes in the semantic topology, the system first checks whether adjacent rooms of the same type share a strong open boundary. The openness ratio can be defined as follows: ρ_open = L_open / L_shared Here, L_shared represents the length of the shared boundary between the two rooms, and L_open represents the length of the shared boundary that remains open after excluding wall occupancy. The system only prioritizes merging fragments of the same type when ρ_open meets the preset conditions and the shared boundary lacks reliable doorways or wall obstructions; otherwise, redundant semantics are downgraded to weak evidence and reallocation is delayed.
[0059] For unnamed geometric rooms, the system first limits the range of candidate types based on weak anchor points, and then performs semantic backfilling by combining remaining semantic nodes, adjacency relationships, and opening boundaries. For residual areas that still lack clear semantics, the system first attempts to merge unnamed segments with larger open boundaries; if it still cannot be explained, it absorbs the most reasonable adjacent named rooms, while avoiding the exposure of new external door openings, obvious abnormal expansion of the outer contour, or unreasonable loss of walls.
[0060] The final output of B10 includes stable room polygons, room type, consumed semantic nodes, weakened labels, global warnings, filtered candidates for subsequent opening correction, and structured floor plan objects. Through this mechanism, local detection results, OCR text results, geometric reconstruction results, and semantic topology results converge into a consistent structured interpretation within a unified evidence space.
[0061] S10: Aperture correction, final rendering, and structured export of C3, G1, and G2 nodes. After structural convergence, the system can submit the B10-filtered opening candidates to optional opening correction nodes for category correction or false detection deletion. The main entrance prioritizes valid swing door candidates based on the geometric outline. Subsequently, the system projects and regresses the room structure, opening results, and furniture results onto a unified layout diagram to generate a final semantic preview image. The preview image can use a weakened original image as a background, overlaid with room fill, room boundaries, doors, windows, main entrance, and furniture markers, for manual review of the overall parsing results.
[0062] The final aggregated results are exported in hierarchical JSON or other machine-readable formats, and can include outer contours, walls, wall centerlines, nodes, rooms, doors, windows, furniture, paths, adjacency relationships, connectivity relationships, and confidence information, depending on the application requirements. Depending on the application, the results can also be converted to SVG, DXF, CAD / BIM interface data, or front-end editable objects.
[0063] The core nodes and modules are described in Table 1 below: node Module Name enter Output Technical role B1-B4 Semantic image preprocessing nodes Original floor plan Layout cleaning plan, wall plan Generate layout cleanup diagrams and wall diagrams that preserve semantic clues based on usage, and repair local wall representations. F1-F4 Quality Inspection and Process Control Nodes Intermediate image, node status Pass, retry, downgrade, or terminate command Determine whether the intermediate product meets the requirements of subsequent CV input, and control rollback or downgrade. B5 / Registration Module Wall anchor point registration and unified canvas normalization Cleaning drawings, wall drawings, original wall anchor points Layout and wall diagrams on a standard canvas By registering wall anchor points and uniformly clipping, the multi-branch results can share a coordinate system. C1 Door and window inspection nodes Normalized layout diagram or enhanced diagram Door and window category, bbox, confidence level Identify candidate openings such as windows, swing doors, and sliding doors. D1 Furniture Inspection Nodes Normalized layout diagram or enhanced diagram Furniture category, bbox, confidence level Identify furniture or equipment as room function judgments and semantic anchors. O1-O2 OCR Text Recognition and Room Binding Nodes Normalized layout diagram, room polygon Room text, text semantic anchors Identify room text and bind it to candidate rooms as evidence for room type determination. B6 Morphological geometric reconstruction nodes Wall diagram, mask, auxiliary grayscale image Wall boundaries, center lines, and nodes Perform main direction, double LSD, probe / strip, polygonize, and boundary edge to centerline recovery. B7-B8, C2 Open-ended constraint topological convergence node Wall masking, center line, door and window bbox Open line segments, cleaned topology, room polygons Perform wall line cleanup, node merging, room closure, outer contour extraction, and door and window binding. B9 Room semantic topology proposal node Normalized layout diagram and optional hints / evidence Room type, main entrance, semantic topology The output semantic candidates under the constrained schema do not directly determine the final geometry. B10 Multi-source evidence structure convergence node Geometric topology, openings, furniture, OCR, B9 semantic topology Structural convergence of apartment layouts and filtered opening candidates Unify coordinate mapping and perform merging, retention, weight reduction, filtering, and structural reinterpretation. C3 / G1 / G2 / Output Correction, rendering and structured output interface Structural convergence of apartment layouts and filtered opening candidates Preview images, JSON / SVG / DXF / CAD / BIM interfaces Optional corrections are applied to the opening results, outputting editable, verifiable, and reusable structured spatial assets. An electronic device comprising: a processor and a memory storing a computer-executable program, wherein the executable program, when executed, causes the processor to perform the method according to any one of claims 3-8.
[0064] A computer-readable storage medium storing one or more programs that, when executed by a processor, implement the method of any one of claims 3-8.
[0065] The following describes a specific implementation of the present invention using a two-dimensional residential floor plan parsing task. This embodiment is only used to illustrate the technical approach of the present invention and should not be construed as a limitation on model type, threshold, image size, or specific software framework.
[0066] 1. The system acquires a floor plan containing walls, doors and windows, furniture, text labels, dimension lines and fill patterns, converts it into a unified format input image I_0, and records the dimensions, coordinate origin and boundary information.
[0067] 2. The semantic image preprocessing module generates a layout cleaning image I_clean and a wall image I_wall according to their purpose; where I_clean retains the room text, furniture and main semantic clues, and I_wall removes non-wall interference and enhances the wall expression.
[0068] 3. The quality inspection node assesses the wall continuity, noise residue, and boundary clarity of I_clean and I_wall. If the standards are not met, the task orchestration module adjusts the prompts or processing parameters and regenerates the task; if the standards are met, the task proceeds to the next stage of processing.
[0069] 4. The wall anchor point registration module extracts the wall anchor point mask from the original image and performs coarse registration, local search fine registration, uniform cropping, and standard canvas mapping on the cleaning image and the wall image.
[0070] 5. Node C1 detects doors and windows, node D1 detects furniture, and node O1 identifies text within the room. The output includes the bounding box, category, text, and confidence score. These results do not directly determine the final room boundaries but serve as local evidence.
[0071] 6. Node B6 performs principal direction estimation, double LSD segment extraction, normal probe, strip growth, polygonization, and boundary edge to centerline recovery on the normalized wall map to obtain the wall region, boundary set, centerline, and nodes.
[0072] 7. Nodes B7-B8 convert door and window candidates into opening segments aligned with the wall lines, and perform line cleanup, opening binding, wall outline union, node merging, and room polygon extraction.
[0073] 8. Node B9 is based on the normalized layout diagram and can combine optional cue evidence to output room type, main entrance, connectivity and adjacency-only candidate.
[0074] 9. Node B10 incorporates room polygons, wall boundaries, opening relationships, furniture anchors, OCR text semantics, and B9 semantic topology into the same evidence space, and merges, preserves, downweights, or filters over-segmented regions, unstable labels, redundant fragments, and noise blocks.
[0075] 10. Node C3 can perform category correction or false detection deletion on the opening candidates filtered by B10; the system then generates a visual preview image and outputs structured vector floor plan data for manual inspection and downstream calls.
[0076] In one experimental implementation, the local door and window detection node can be trained on approximately 70 training images and corresponding annotation boxes, achieving PR performances of approximately 0.94, 0.92, and 0.75 for windows, hinged doors, and sliding doors, respectively. The furniture detection node can be trained on approximately 100 training images and annotation boxes for different furniture categories, achieving an overall accuracy of approximately 94.6%. The above data are used to illustrate the feasibility of lightweight local detection on stable components such as doors, windows, and furniture, and do not constitute a limitation on the scope of protection of this invention.
[0077] In one comprehensive analysis result, the system can simultaneously output the semantic and contour relationships of rooms, furniture, doors and windows, and the final semantic and contour accuracy can reach approximately 90%. This effect depends on the specific dataset, drawing quality, model configuration, image preprocessing strategy, and geometric parameter settings. More complete statistical results can be supplemented in the formal application documents based on subsequent experiments.
[0078] The core of this invention lies not in introducing a single model, but in establishing a hybrid parsing mechanism driven by explicit intermediate states. The task orchestration module determines whether to continue execution, re-call the preprocessing node, adjust image processing parameters, or enter a degraded process based on the input, output, intermediate states, and quality detection results of each node.
[0079] Semantic processing layer: used to retain or remove information such as furniture, text, dimensions, textures, and symbols by branch, generate layout cleaning diagrams and stable wall diagrams, and output OCR text semantics and room semantic topology candidates.
[0080] Local perception layer: used for the recognition of local components such as doors, windows and furniture that have stable representation and high information content, outputting category, detection box, confidence score and anchor point.
[0081] Geometric constraint layer: used to perform principal direction estimation, line segment evidence aggregation, wall region reconstruction, centerline restoration, node merging, and room closure on the cleaned wall map.
[0082] Control loop: Used for quality inspection, retry, degradation, status recording and input integrity checks to prevent local errors from directly entering subsequent modules.
[0083] Structural convergence layer: used to map geometric topology, openings, furniture and semantic topology to the same evidence space, and to merge, retain, reduce weight or filter candidate rooms.
[0084] The improvements of this invention compared to the prior art are shown in Table 2 below: Existing routes Main problems Corresponding improvements of this invention Traditional computer vision (CV) directly analyzes the original image. Susceptible to furniture, lettering, dimension lines, textures, and localized breaks. First, a wall enhancement map is generated through semantic image preprocessing, and then geometric reconstruction is performed. End-to-end deep learning High annotation costs, difficulties in cross-style transfer, and challenges in pinpointing the cause of errors. Limiting depth detection to stable local objects such as doors, windows, and furniture reduces training and transfer costs. Pure multimodal large model output JSON Coordinate illusion, scale distortion, and unverifiable topology The large model serves only as an image cleaning and semantic proposal module; the final geometry is generated by explicit CV operators. Direct grid skeleton refinement Prone to burrs, breakage, and unstable centerline First, reconstruct the wall boundary area, and then restore the center line from the boundary edges. Single path fusion Local false positives can be directly amplified into final structural errors. B10 performs merging, retention, deweighting, and filtering within the multi-source evidence space. Fixed script pipeline Intermediate states are not reusable, and it is difficult to roll back or perform partial replacements. Quality inspection, retry, degradation, and module replacement are achieved through explicit intermediate states and task orchestration mechanisms. The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A system for structured analysis and high-precision vector conversion of architectural floor plans, characterized in that, The input and standardization module is connected to the semantic processing layer. The semantic processing layer is connected to the quality inspection and process control node. The quality inspection and process control node is connected to the registration and normalization layer. The registration and normalization layer is connected to the local perception layer. The local perception layer is connected to the geometric constraint layer. The local perception layer is connected to the structural convergence layer. The geometric constraint layer is connected to the structural convergence layer. The structural convergence layer is connected to the correction node. The correction node is connected to the structured output module.
2. The architectural floor plan structure analysis and high-precision vector conversion system according to claim 1, characterized in that, The semantic processing layer includes a semantic image preprocessing module, a room semantic topology proposal node, and an OCR text recognition and room binding node. The registration and normalization layer includes wall anchor point registration and unified canvas normalization. The local perception layer includes door and window detection nodes and furniture detection nodes. The geometric constraint layer includes morphological geometric reconstruction nodes and opening constraint topology convergence nodes. The structural convergence layer includes multi-source evidence structural convergence nodes. The structured output module includes rendering and structured output interfaces.
3. A method for structured analysis and high-precision vector conversion of architectural floor plans, characterized in that, Includes the following steps: S1: Input image acquisition and basic standardization; Receive architectural floor plans and perform standardization of resolution, orientation, boundaries, color space, and coordinate system; S2: Semantic image preprocessing and wall plan generation; remove or weaken non-wall interference, repair broken walls and double dashed line wall representations, and generate cleaned images and wall plans; proceed to S3; S3: Quality inspection and process control; determine whether the intermediate image meets the requirements for wall continuity, boundary clarity, noise residue, and subsequent geometric analysis; if it passes the inspection, proceed to S4; if it fails the inspection, proceed to S2. S4: Wall anchor point registration and unified canvas normalization, aligning the cleaning image and wall image to a unified spatial reference and standard canvas, eliminating coordinate drift; convert to S5 and then to S6 to become the base image; S5: Local component detection, detecting doors, windows, and furniture as candidate objects, and recognizing room text, outputting category, detection box, confidence score, and local semantic anchor point; door and window detection results are forwarded to S6; furniture detection and room text recognition results are forwarded to S9; S6: Morphological wall geometry reconstruction, generating wall boundaries, centerlines and node topology based on main direction, double LSD, probe, strip, polygonize and boundary edge pairs; S7: Opening constraint topology convergence and room extraction. Based on the wall geometry results output by S6 and the door and window candidate results output by S5, clean up the wall line topology, extract room polygons, and bind the door and window candidates to opening line segments aligned with the wall or room boundary. S8: Room semantic topology proposal, based on the room polygons and opening relationships output by S7, generates candidate room types, main entrances, connectivity relationships and adjacency relationships under a constrained schema; S9: The multi-source evidence structure converges and receives the wall boundaries and center lines output by S6, the room polygons and opening relationships output by S7, the room semantic topology candidates output by S8, and the furniture candidates and room text recognition results output by S5. It unifies geometric, opening, furniture, OCR and semantic evidence, and merges, retains, downweights or filters the room candidates. S10: Opening correction, rendering and structured output. Optional corrections are made to the opening results, the final preview image is generated, JSON structured data is exported, and conversion interfaces for SVG, DXF, CAD or BIM formats are provided.
4. The method for structured analysis and high-precision vector conversion of architectural floor plans according to claim 3, characterized in that, The semantic image preprocessing in S2 can generate at least two types of intermediate images according to their purpose: layout cleaning image is used to retain room text, furniture and main spatial semantic clues, while removing north arrows, dimension lines, irrelevant annotations, textures and background noise; wall image or wall plan image is used to remove non-wall interference from furniture, text, door and window symbols, repair locally broken walls, double dashed walls or weakly connected walls, extract binary wall images, and temporarily fill window openings or local openings in the wall image as continuous walls.
5. The method for structured analysis and high-precision vector conversion of architectural floor plans according to claim 3, characterized in that, In step S4, the system extracts relatively stable wall anchor point masks from the original image, prioritizing the preservation of dark wall areas. Based on the coarse registration results, it performs support filtering on the original wall masks to remove isolated small connected components and non-wall noise. Subsequently, the system performs initial scaling and translation based on the wall area to obtain coarse alignment results. Then, it performs a local search within the scaling and translation parameter space and calculates a comprehensive score for each candidate alignment result. Score(M_c)=0.55·C(M_c,M_o)+0.35·R(M_c,M_o)+0.10·D(M_c,M_o) Where M_o represents the wall anchor point mask extracted from the original image, M_c represents the wall mask after alignment of the current candidate, C represents the coverage of the candidate wall in the neighborhood of the original wall, R represents the recall of the candidate result to the original wall, and D represents the consistency term based on distance transform. The system only accepts the fine registration when the fine registration result reaches the minimum gain compared with the coarse registration result, so as to avoid unstable updates introduced by local search.
6. The method for structured analysis and high-precision vector conversion of architectural floor plans according to claim 3, characterized in that, S6 includes the following steps: S61: Wall mask preprocessing; The system first performs thresholding, morphological cleaning, connected component filtering and hole repair on the normalized wall image, and can combine opening candidates to perform conditional local redrawing to reduce the interference of door and window symbols, opening marks and local breaks on subsequent geometric extraction. S62: Extraction of principal directions and double LSD boundaries; First, a family of principal directions Φ is estimated to constrain subsequent line segment evidence. The family of principal directions can be obtained based on candidate line segment direction statistics, Hough direction distribution, building plan principal axis estimation or a combination thereof. The detected line segments are not directly used as the final result, but are snapped to the nearest family of principal directions. When the line segment direction deviates too much from the nearest principal direction, it can be discarded or downweighted. The system obtains complementary line segment evidence from two types of image representations: one from the opening-conditioned grayscale image, which mainly preserves long and stable wall responses; and the other from the open occupancy mask, which mainly compensates for short wall segments and local fractures. The two types of line segments are then processed through orientation snapping, length filtering, duplicate merging, and conflict cleanup to form a candidate boundary set. E = Snap_Φ( LSD(I_g;θ_g) ∪ LSD(I_m;θ_m) ) Where I_g represents the grayscale image after opening conditional processing, I_m represents the occupancy mask after opening operation processing, θ_g and θ_m represent two sets of LSD detection parameters respectively, and Snap_Φ represents snapping candidate line segments to the nearest main direction and removing or reducing the weight of line segments with excessive angle deviation; S63: Generate a vector wall mask based on the boundary; For a candidate line segment e, the system performs a local probe along the normal direction on both sides of the line segment, determines the wall expansion direction based on the difference in pixel support on both sides, and then generates a strip using the line segment as a seed. The length and width of the strip are limited by factors such as nearby line evidence, endpoint stopping conditions, white area stopping conditions, maximum width constraints, and wall mask support. All strips are merged through region union and then polygonized to obtain a stable wall boundary or wall polygon region. M_wall = Polygonize( ⋃_{e∈E} Strip(e,n_e,stop_e) ) Where E is the set of candidate boundaries, n_e represents the normal direction of candidate line segment e, stop_e represents the constraints such as endpoint stop, white area stop, intersection line stop, maximum width stop, and M_wall represents the wall mask or wall polygon region obtained after strip merging and polygonization. S64: Geometric topology reconstruction and centerline recovery; After obtaining the stable wall region, the system does not directly extract the skeleton using the traditional grid refinement method, but recovers the centerline from the reconstructed wall boundary. The system first represents the wall region as a set of boundary edges, and then finds the boundary edge pairs that can be interpreted as the two sides of the same wall under the final wall mask constraint. Boundary edge pair determination can be completed based on a combination of conditions such as relative or parallel consistency of direction, projection overlap, edge spacing or wall thickness range, and edge area fill rate. Only when the boundary pair meets the consistency requirements in direction, overlap, thickness and area fill will the center line be generated from the midpoint of its corresponding position, and further angle adsorption, collinear merging, ray extension and mask support filtering will be performed. C = { Mid(b_i,b_j) | Pair(b_i,b_j)=1} Where b_i and b_j represent the boundary edges of the wall area, Pair(b_i,b_j)=1 indicates that the boundary meets the requirements of direction, overlap, thickness and fill consistency, and Mid(b_i,b_j) represents the generation of the wall centerline from the midpoint of the corresponding positions of the two boundary edges. This design makes the centerline no longer a passive refinement of the grid shape, but a structured geometric representation obtained by the joint constraints of the two boundary edges of the wall.
7. The method for structured analysis and high-precision vector conversion of architectural floor plans according to claim 3, characterized in that, The S8 room semantic topology proposal output follows a unified schema: nodes include only main entrance nodes and room nodes; the type of room nodes is limited to a preset label set; edges include only connectivity and adjacency-only relationships; the system further performs schema normalization to constrain room type naming consistency, main entrance uniqueness, edge deduplication, node reference validity, and relationship mutual exclusion.
8. The method for structured analysis and high-precision vector conversion of architectural floor plans according to claim 3, characterized in that, The coordinate mapping and structural convergence node of the S9 multi-source data stream does not directly trust any single path output. Instead, it incorporates room polygons, wall boundaries, opening relationships, furniture anchors, OCR text semantics, and S8 semantic topology into the same evidence space. The system uses room polygons as the geometric basis and room nodes and relationship graphs in the semantic topology as cross-room priors. At the same time, it compresses furniture information into a small number of discriminative room-level anchors.
9. An electronic device, wherein, The electronic device includes a processor and a memory storing a computer-executable program, which, when executed, causes the processor to perform the method according to any one of claims 3-8.
10. A computer-readable storage medium, wherein, The computer-readable storage medium stores one or more programs that, when executed by a processor, implement the method of any one of claims 3-8.
