House quality detection method and system based on live-action three-dimensional model

By using a detection method based on real-world 3D models and employing OSGB format conversion and the 3D-YOLO-BuildingDefect algorithm, we have achieved 3D spatial positioning and multi-view fusion for building quality inspection. This solves the problems of insufficient defect positioning accuracy and incomplete detection coverage in traditional methods, thereby improving the accuracy and comprehensiveness of the inspection.

CN121599990APending Publication Date: 2026-03-03贵州省测绘产品质量监督检验站(贵州省测绘仪器计量检定站 贵州省测绘行业特有工种职业技能鉴定站)

Patent Information

Application Number
CN202610130959.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-30
Publication Date
2026-03-03

AI Technical Summary

Technical Problem

Existing building quality inspection methods lack comprehensive utilization of three-dimensional spatial information, resulting in insufficient defect location accuracy, incomplete inspection coverage, and inadequate utilization of geometric information.

Method used

A detection method based on real-world 3D models is adopted, which achieves 3D spatial defect detection by combining OSGB format conversion, semantic feature library segmentation of building components, multi-view projection and 3D-YOLO-BuildingDefect algorithm with depth-aware convolutional layers and normal vector-guided attention mechanism.

Benefits of technology

It improves the spatial positioning accuracy and defect identification comprehensiveness of building quality inspection, and solves the technical limitations of traditional two-dimensional inspection methods in terms of spatial positioning accuracy and inspection coverage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121599990A_ABST
    Figure CN121599990A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image processing, and discloses a house quality detection method and system based on a live-action three-dimensional model. The method comprises the following steps: converting an OSGB format live-action three-dimensional building model into a body coordinate system and carrying out quality evaluation, carrying out semantic segmentation on a standardized model to obtain a component geographic entity set, establishing an independent local coordinate system of each component to form a single three-dimensional model set, generating a multi-view projection feature image set based on a normal vector distribution planning view angle, and carrying out multi-view projection on the single three-dimensional model set. And detecting defects by adopting a 3D-YOLO-BuildingDefect algorithm, and carrying out inverse transformation to obtain three-dimensional space defect distribution and a quality grade evaluation result. The technical problems that a traditional two-dimensional detection method is insufficient in spatial positioning precision, incomplete in detection coverage rate and insufficient in geometric information utilization are solved, and the spatial positioning accuracy of house quality detection and the comprehensiveness of defect recognition are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing technology, and in particular to a method and system for inspecting the quality of houses based on a real-scene 3D model. Background Technology

[0002] Currently, building quality inspection mainly relies on traditional manual visual inspection and two-dimensional image analysis methods. Inspectors identify defects by visually observing building surfaces or taking two-dimensional photographs with digital cameras. Existing automated inspection technologies mostly employ single-viewpoint two-dimensional image processing algorithms, such as crack identification methods based on edge detection and stain detection methods based on color analysis. These methods primarily perform feature extraction and pattern recognition on a two-dimensional plane. Some advanced inspection methods have introduced deep learning technology, using convolutional neural networks to automatically classify and locate defects in two-dimensional images of building surfaces.

[0003] However, existing technologies have significant shortcomings. First, two-dimensional detection methods cannot accurately acquire the three-dimensional spatial location and geometric dimensions of defects, resulting in insufficient defect localization accuracy and making it difficult to provide accurate spatial references for maintenance decisions. Second, single-view detection methods have blind spots, easily missing hidden parts and complex geometric structures of building components, leading to incomplete detection coverage. Third, existing methods lack full utilization of the geometric features of building components, failing to effectively combine geometric information such as component normals and curvature for defect detection, thus limiting detection accuracy.

[0004] The fundamental problem with existing technologies lies in the lack of comprehensive inspection capabilities based on three-dimensional spatial information. Because building components possess complex three-dimensional geometric shapes, two-dimensional images alone cannot fully reflect their spatial characteristics. This leads to technical deficiencies in defect detection regarding spatial localization, geometric quantification, and coverage integrity. Further analysis reveals that real-world 3D models contain complete geometric and textural information about buildings, but existing technologies have failed to effectively utilize this 3D data for intelligent quality inspection. Therefore, there is an urgent need to establish a building quality inspection method based on real-world 3D models. This method should utilize techniques such as multi-view projection, 3D geometric feature fusion, and spatial defect localization to overcome the limitations of traditional two-dimensional inspection methods in terms of spatial localization accuracy, inspection coverage, and geometric information utilization. Summary of the Invention

[0005] This application provides a method and system for inspecting building quality based on a real-world 3D model, which solves the technical problems of insufficient spatial positioning accuracy, incomplete inspection coverage, and insufficient utilization of geometric information in traditional 2D inspection methods, thereby improving the spatial positioning accuracy and the comprehensiveness of defect identification in building quality inspection.

[0006] Firstly, this application provides a method for inspecting the quality of a house based on a real-scene 3D model, the method comprising:

[0007] Step S1: Convert the OSGB format real-scene 3D building model to the building body coordinate system, and obtain a standardized real-scene 3D building model through geometric accuracy verification and texture quality evaluation;

[0008] Step S2: Perform multi-level region growing segmentation on the standardized real-scene 3D building model according to the semantic feature library of building components, and obtain the set of geographic entities of building components through patch normal vector clustering and texture similarity measurement;

[0009] Step S3: Establish an independent local coordinate system for each component in the set of geographic entities of building components, and obtain a set of three-dimensional models of individual building components through vertex coordinate transformation and boundary closure processing;

[0010] Step S4: Based on the surface normal vector distribution of the components, perform adaptive view planning on the set of individual 3D models of the building components, and obtain a set of multi-view projection feature images through multi-channel rendering;

[0011] Step S5: Use the 3D-YOLO-BuildingDefect algorithm to detect defects in the multi-view projection feature image set, and obtain the three-dimensional spatial defect distribution results and component quality grade evaluation results through inverse projection transformation and multi-view fusion.

[0012] Secondly, this application provides a house quality inspection system based on a real-scene 3D model, the house quality inspection system based on the real-scene 3D model comprising:

[0013] The verification module is used to convert the OSGB format real-scene 3D building model to the building body coordinate system, and obtain a standardized real-scene 3D building model through geometric accuracy verification and texture quality evaluation.

[0014] The segmentation module is used to perform multi-level region growing segmentation on the standardized real-scene 3D building model based on the semantic feature library of building components, and to obtain a set of geographic entities of building components through patch normal vector clustering and texture similarity measurement.

[0015] The conversion module is used to establish an independent local coordinate system for each component in the set of geographic entities of building components, and obtain a set of three-dimensional models of individual building components through vertex coordinate transformation and boundary closure processing;

[0016] The rendering module is used to perform adaptive view planning on the set of three-dimensional models of individual building components based on the surface normal vector distribution of the components, and to obtain a set of multi-view projection feature images through multi-channel rendering.

[0017] The detection module is used to perform defect detection on the multi-view projection feature image set using the 3D-YOLO-BuildingDefect algorithm, and obtain the three-dimensional spatial defect distribution results and component quality grade evaluation results through inverse projection transformation and multi-view fusion.

[0018] Thirdly, a house quality inspection device based on a real-scene 3D model is provided, comprising: a memory and at least one processor, wherein the memory stores instructions; the at least one processor invokes the instructions in the memory to cause the house quality inspection device based on the real-scene 3D model to execute the aforementioned house quality inspection method based on the real-scene 3D model.

[0019] Fourthly, a computer-readable storage medium is provided, wherein instructions are stored therein, which, when executed on a computer, cause the computer to perform the aforementioned method for inspecting the quality of a house based on a real-world 3D model.

[0020] The technical solution provided in this application solves the problem of inconsistent 3D spatial data processing in traditional detection methods by using OSGB format parsing and building body coordinate system transformation. This allows real-world 3D building models collected from different sources and at different times to undergo quality inspection under a unified spatial reference, eliminating the impact of coordinate system differences on detection accuracy. Geometric accuracy verification and texture quality assessment features, through a quantitative quality control mechanism, ensure that the input data meets the accuracy requirements of subsequent detection algorithms, avoiding false positives and false negatives caused by poor data quality. The semantic feature library of building components and multi-level region growing segmentation feature establish an intelligent component recognition system based on architectural knowledge, overcoming the limitation of traditional methods that require manual annotation of component boundaries, and achieving automatic segmentation and classification of different building components such as exterior walls, roofs, doors, and windows. The patch normal vector clustering and texture similarity measurement feature combine the dual constraints of geometric and visual features, improving the accuracy and robustness of component segmentation and solving the technical problem of blurred component boundaries in complex building structures. The independent local coordinate system establishment and the generation technology of individual 3D model sets for building components provide a standardized geometric representation for each component, eliminating the interference of differences in position and orientation of different components in the global coordinate system on the detection, and laying the foundation for subsequent unified defect detection. The adaptive view planning and multi-channel rendering technology realizes the intelligent selection of the optimal viewing angle through spherical projection mapping and K-means clustering, ensuring that the detection view can fully cover the surface of the component without producing visual blind spots. At the same time, four-channel rendering provides multi-dimensional feature information such as RGB color, depth, normal vector, and curvature, enriching the feature expression capability of defect detection.

[0021] The 3D-YOLO-BuildingDefect algorithm, the core technical feature of this invention, is specifically designed and optimized for building quality inspection applications based on real-world 3D models. The depth-sensing convolutional layer modulates the RGB feature extraction process using depth channel information, enabling the algorithm to fully utilize 3D geometric information for defect identification, significantly improving the sensitivity to detecting geometric deformations and material defects on building surfaces. The normal vector-guided attention mechanism utilizes the characteristics of changes in building surface normal vectors to generate spatial attention weights, focusing on areas with dramatic changes in normal vectors. These areas often correspond to edges, corners, or defect locations of building components, thereby improving the targeting and accuracy of defect detection. Five dedicated detection branches feature specialized network structures designed for different geometric and visual characteristics of building quality problems such as cracks, stains, peeling, deformation, and leakage. The crack detection branch uses strip-shaped convolutional kernels to enhance linear feature detection capabilities, while the stain detection branch uses dilated convolution to expand the receptive field and capture irregular contaminated areas. This targeted design makes the algorithm more professional and practical in building defect detection tasks. The inverse projection transformation and multi-view fusion technology features the ability to accurately map two-dimensional detection results back to three-dimensional space using ray tracing, solving the fundamental problem that traditional two-dimensional detection methods cannot provide accurate spatial positioning information and providing precise spatial references for building maintenance and repair work. The three-dimensional spatial defect distribution results and component quality grade assessment technology features, based on multi-dimensional quantitative analysis of defect area, depth, and severity, establish a scientific quality assessment system, overcoming the uncertainty and inconsistency problems of traditional subjective judgment methods. Attached Figure Description

[0022] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0023] Figure 1 This is a schematic diagram of one embodiment of the house quality inspection method based on a real-scene 3D model in this application.

[0024] Figure 2 This is a schematic diagram of one embodiment of the house quality inspection system based on a real-scene 3D model in this application.

[0025] Figure 3 This is a schematic block diagram of the structure of a house quality inspection device based on a real-scene 3D model in an embodiment of the present invention. Detailed Implementation

[0026] This application provides a method and system for inspecting the quality of a building based on a real-world 3D model. The terms "first," "second," "third," "fourth," etc. (if present)," in the specification, claims, and accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in a sequence other than that illustrated or described herein. Furthermore, the terms "comprising" or "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0027] For ease of understanding, the specific process of the embodiments of this application is described below. Please refer to [link / reference]. Figure 1 One embodiment of the house quality inspection method based on a real-scene 3D model in this application includes:

[0028] Step S1: Convert the OSGB format real-scene 3D building model to the building body coordinate system, and obtain a standardized real-scene 3D building model through geometric accuracy verification and texture quality evaluation;

[0029] Step S2: Perform multi-level region growing segmentation on the standardized real-scene 3D building model based on the semantic feature library of building components, and obtain the set of geographic entities of building components through patch normal vector clustering and texture similarity measurement;

[0030] Step S3: Establish an independent local coordinate system for each component in the set of geographic entities of building components, and obtain a set of three-dimensional models of individual building components through vertex coordinate transformation and boundary closure.

[0031] Step S4: Based on the surface normal vector distribution of the components, perform adaptive view planning on the set of three-dimensional models of individual building components, and obtain a set of multi-view projection feature images through multi-channel rendering;

[0032] Step S5: Use the 3D-YOLO-BuildingDefect algorithm to detect defects in the multi-view projection feature image set. Obtain the three-dimensional spatial defect distribution results and component quality grade evaluation results through inverse projection transformation and multi-view fusion.

[0033] It is understood that the executing entity of this application can be a building quality inspection system based on a real-world 3D model, or it can be a terminal or a server; the specific implementation is not limited here. This application's embodiment uses a server as an example for illustration.

[0034] Specifically, the OSGB file uses binary encoding to store real-world 3D data. It includes a vertex coordinate array recording the x, y, and z coordinates of each spatial point, a triangular facet index array defining the vertex connection relationships, and a texture coordinate mapping relationship establishing the correspondence between the geometric model and the texture image. Building orientation identification determines the building's orientation by analyzing the distribution of normal vectors in the vertical faces of the model, establishing a transformation matrix from the geographic coordinate system to the building's body coordinate system. Geometric accuracy verification calculates the Euclidean distance between adjacent vertices and uses the standard deviation of the distance distribution to assess the uniformity of the model's point cloud density. Regions with a standard deviation exceeding 20% ​​of the average side length are marked as having uneven density. Texture quality assessment uses the Sobel operator to calculate the horizontal and vertical gradients of the texture image. Regions with an average gradient magnitude below 128 are marked as blurred texture regions, and their spatial location in the model is recorded.

[0035] The semantic feature library defines the exterior wall surface as a set of faces whose normal vectors primarily point to the outer side of the building and whose vertical component is less than 0.3; the roof surface as a set of faces whose normal vectors have a vertical component greater than 0.7 and are located at the top of the building; and doors and windows as regular geometric regions forming recesses on the exterior wall surface. In the coarse segmentation stage, the angle between the normal vectors of each pair of adjacent faces is calculated. Adjacent faces with an angle less than 30 degrees are grouped into the same candidate region, forming a region division based on geometric continuity. In the fine segmentation stage, the RGB color histogram of the texture region corresponding to each face is extracted. Bhattacharyya distance is used to measure the texture similarity of different faces, and faces with a distance less than 0.1 are merged into texture-consistent component units. Morphological opening and closing operations optimize the boundary by eliminating jagged noise at the segmentation boundary through morphological operations of erosion followed by dilation. Spatial connectivity verification checks the spatial adjacency relationships of faces within each component unit to ensure region integrity.

[0036] Principal component analysis (PCA) calculates the covariance matrix of the component's geometric data. Eigenvalue decomposition yields three principal direction vectors: the direction corresponding to the largest eigenvalue is set as the local X-axis, the direction corresponding to the second largest eigenvalue as the local Y-axis, and the direction corresponding to the smallest eigenvalue as the local Z-axis. The coordinate transformation matrix, composed of these three principal direction vectors, converts the global vertex coordinates of the component into local coordinates through matrix multiplication. Topology reconstruction reassigns local vertex indices, starting from zero and numbering them consecutively, establishing a mapping table from global to local indices and updating vertex references in the triangular facet index array. Adjacency calculation iterates through all facet pairs, checking for faces sharing edges and establishing an adjacency matrix. A matrix element of 1 indicates that two faces are adjacent, and 0 indicates they are not adjacent. Triangulation closure identifies open boundaries generated by segmentation, generating new triangular faces in the boundary regions to achieve model closure. UV coordinate reparameterization converts the original texture coordinates into local texture coordinates for the individual model.

[0037] Spherical projection mapping projects the normal vectors of each facet of the component onto a unit sphere, representing the distribution of normal vector directions in a spherical coordinate system. The K-means clustering algorithm clusters the normal vector points on the sphere into several dominant directions, with the cluster centers representing the optimal viewing direction. The number of clusters is adaptively determined based on the complexity of the component's surface curvature variation. The virtual camera's viewing position is calculated by setting the camera position at twice the maximum size of the component's bounding box center in each dominant direction, ensuring the camera's field of view completely covers the component's surface. The camera's intrinsic parameter matrix includes a focal length parameter set to 1.2 times the width of the projected image, principal point coordinates set to the image center, and distortion coefficients set to zero. The extrinsic parameter matrix includes camera position and pose parameters; the pose is calculated using the direction vector from the camera position towards the component's center. Multi-channel rendering generates RGB color channels to record surface texture information, a depth channel to record the distance from each pixel to the camera, a normal vector channel to encode the x, y, and z components of the surface normal vector into RGB values, and a curvature channel to map the surface curvature values ​​into grayscale values.

[0038] The depth-sensing convolutional layer modulates the RGB feature extraction process using depth channel information. The convolutional kernel weights are dynamically adjusted using normalized depth values, and the modulation coefficient is set to 0.3 to enhance the depth feature response. The normal vector-guided attention mechanism generates a spatial attention map using the normal vector channel. Normal vector features are extracted through convolution operations and added element-wise to the RGB features to generate attention weights. Five dedicated detection branches handle different defect types: the crack detection branch uses 1×7 and 7×1 strip convolutional kernels to enhance linear feature detection; the stain detection branch uses 3×3 dilated convolution to expand the receptive field and detect irregular areas; the peeling detection branch combines curvature channels to detect surface material detachment; the deformation detection branch compares depth information with the theoretical plane deviation; and the leakage detection branch detects water stains through color anomalies. The inverse projection transform uses ray tracing to calculate the ray equation emanating from the camera center for each pixel in the detection frame, and solves for the intersection of the ray and the component surface to obtain the defect's position coordinates in 3D space. Multi-view fusion calculates the spatial overlap of the detection results for the same defect from different views. Results with an overlap greater than 60% are weighted and fused to improve positioning accuracy. The defect area is calculated by integrating the triangular mesh projected onto the component surface for quality assessment. The defect depth is calculated by measuring the offset of the defect area relative to the surrounding normal surface. The severity is calculated by weighting three factors: the proportion of the area, the degree of depth exceeding the limit, and the importance of the location. The component quality grade is determined based on the severity distribution.

[0039] In one specific embodiment, step S1 includes:

[0040] The binary data structure of the OSGB format real-world 3D building model is parsed to obtain the vertex coordinate array, triangle patch index array, and texture coordinate mapping relationship;

[0041] Based on the orientation identification of the main structure of the building, a coordinate system transformation matrix is ​​established to transform the vertex coordinate array from the geographic coordinate system to the building body coordinate system, thereby obtaining the geometric data in the body coordinate system.

[0042] Geometric accuracy is verified on the geometric data in the body coordinate system. The density uniformity of the model is evaluated by calculating the standard deviation of the distance distribution between adjacent vertices, and the geometric quality verification results are obtained.

[0043] The texture map corresponding to the texture coordinate mapping relationship is input into the Sobel gradient calculation for texture quality assessment. The texture quality assessment result is obtained by calculating the average gradient magnitude, and a standardized real-scene 3D building model is obtained.

[0044] Specifically, the metadata information in the file header is read, including the model's spatial extent, precision level, and data organization structure. Then, the geometric and texture data blocks are parsed segment by segment according to the OSGB binary encoding standard. The vertex coordinate array stores the three-dimensional coordinate values ​​of each spatial point; the data structure is a sequence of floating-point numbers, with every three consecutive values ​​forming the x, y, and z coordinates of a vertex. The triangle patch index array records the vertex numbers that make up the triangle patches; the data structure is a sequence of integers, with every three consecutive integers pointing to the corresponding vertex in the vertex coordinate array. The texture coordinate mapping establishes the correspondence between geometric vertices and texture image pixels; the data structure is a two-dimensional coordinate pair, with each vertex corresponding to u and v coordinate values ​​in the texture image. The u value represents the horizontal position, and the v value represents the vertical position; all coordinates are normalized values ​​between 0 and 1.

[0045] The orientation of the main building structure is identified by analyzing the distribution pattern of normal vectors in the vertical facets of the model to determine the building's primary orientation. Normal vector calculation uses the cross product of the three vertices of a triangular facet to obtain a unit vector perpendicular to the facet. The x, y, and z components of this vector represent the projection values ​​along the three coordinate axes, respectively. Vertical facets are identified by checking facets where the absolute value of the z-component of the normal vector is less than 0.3; these facets primarily constitute the building's exterior wall surface. Normal vector clustering groups the selected vertical facets according to their normal vector directions, grouping normal vectors with similar directions together. The average direction of each group represents a primary orientation of the building. The coordinate system transformation matrix is ​​constructed from the building's primary orientation, setting the most primary orientation as the positive x-axis of the new coordinate system, the vertically upward direction as the positive z-axis, and the y-axis direction as determined by the right-hand rule. Matrix multiplication converts the vertex coordinates in the original geographic coordinate system to new coordinate values ​​in the building's body coordinate system, using the formula that the new coordinates equal the product of the transformation matrix and the original coordinates.

[0046] Geometric accuracy verification assesses the model's geometric quality through statistical analysis of the distance distribution characteristics between adjacent vertices. Adjacent vertex identification involves traversing all triangular faces, extracting three pairs of vertices within each face, and calculating the Euclidean distance between vertex pairs. The distance calculation formula is the square root of the sum of the squares of the differences in coordinate axes between two points. Distance distribution statistics sort all adjacent vertex distance values ​​and calculate statistical parameters, including minimum, maximum, average, and standard deviation. The standard deviation formula is the square root of the average of the squares of the differences between all distance values ​​and the average distance value. Model density uniformity is evaluated by quantifying the ratio of the standard deviation to the average distance. A ratio less than 0.2 indicates uniform density distribution, a ratio greater than 0.5 indicates non-uniform density distribution, and a ratio in between indicates moderately uniform density distribution. Density non-uniformity region localization involves marking vertex pairs with abnormal distances and their surrounding areas, recording the spatial location and extent of the abnormal regions within the model.

[0047] Texture quality assessment uses the Sobel gradient operator to detect the sharpness and detail richness of texture images. The Sobel operator contains two convolution kernels, one horizontal and one vertical. The horizontal kernel detects vertical edges, and the vertical kernel detects horizontal edges. Gradient calculation involves convolving the Sobel kernels with the texture image to obtain the horizontal and vertical gradient values ​​for each pixel. The gradient magnitude is calculated as the square root of the sum of the squares of the horizontal and vertical gradient values. The average gradient magnitude is the arithmetic mean of the gradient magnitudes of all pixels in the texture image, reflecting the overall sharpness of the texture. Texture quality is graded based on the average gradient magnitude: a magnitude greater than 200 indicates high-quality texture, a magnitude between 100 and 200 indicates medium-quality texture, and a magnitude less than 100 indicates low-quality texture. Low-quality texture regions are identified by recording the pixel locations where the gradient magnitude is below a threshold and combining this with texture coordinate mapping to determine the corresponding geometric model surface regions.

[0048] In one specific embodiment, step S2 includes:

[0049] A semantic feature library for building components is constructed based on the geometric feature descriptions of exterior walls, roofs, and door and window components. The set of semantic feature parameters for components is obtained by defining the normal vector direction and vertical component threshold of the surface patch.

[0050] The normal vectors of the facets in the standardized real-world 3D building model are input to calculate the included angle for coarse segmentation. Adjacent facets with a normal vector angle of less than 30 degrees are classified to obtain a set of candidate regions.

[0051] Color histograms are calculated for the texture regions of each facet in the candidate region set, and fine segmentation is performed based on the texture similarity metric of Bach distance to obtain texture-consistent component units.

[0052] Morphological opening and closing operations are performed on the texture-consistent component units to optimize the boundaries. The set of geographic entities of building components is obtained through spatial connectivity verification and segmentation noise elimination.

[0053] Specifically, the semantic feature library for building components is constructed based on the geometric morphology and spatial distribution patterns of components in architecture. Exterior wall features are identified by the dominance of the horizontal component of the surface normal vector. The specific criteria are that the projection length of the normal vector onto the x and y planes is greater than the absolute value of its z-axis component, while the absolute value of the vertical component is less than 0.3. This definition ensures that the identified surfaces primarily constitute the vertical exterior surface of the building. Roof features are defined based on the characteristic that the surface normal vector primarily points towards the sky. The criteria are that the z-axis component of the normal vector is greater than 0.7 and the surface is located in the upper region of the building's geometric bounding box. A z-axis component close to 1 indicates that the surface is nearly horizontal and facing upwards. Door and window features are identified by detecting the regularity of recessed areas and geometric boundaries on the exterior wall. Recessed features are identified by comparing the depth difference between the surface and surrounding surfaces, while regularity is evaluated by calculating the straight-line fitting error of the boundary contour. The set of semantic feature parameters for components includes the normal vector range, positional constraints, geometric dimension range, and adjacency description for each component type, forming a rule system for identifying building components.

[0054] The coarse segmentation process employs a region growing method based on the similarity of facet normal vectors for geometric continuity analysis. The angle between facet normal vectors is calculated using a vector dot product operation; the dot product of two unit normal vectors equals the cosine of the angle, which is then calculated using the inverse cosine function. A dot product value greater than 0.866 corresponds to an angle less than 30 degrees, ensuring that adjacent faces have similar spatial orientations. Adjacent facets are categorized by traversing all facet pairs and checking their adjacency; faces sharing edges or vertices are considered adjacent. The region growing algorithm starts with a seed facet and gradually adds adjacent faces that meet the angle condition to the same region until further expansion is impossible. The candidate region set records the facet index list, geometric center coordinates, dominant normal vector direction, and region area of ​​each connected region, forming a preliminary segmentation result based on geometric continuity.

[0055] Texture similarity is quantitatively evaluated using color histogram statistical analysis and Bach distance calculation. Color histogram calculation statistically distributes pixels across the RGB color channels of the texture region corresponding to each patch, dividing each channel into 16 equally spaced intervals, forming a 48-dimensional color feature vector. Histogram normalization obtains the probability distribution by dividing the number of pixels in each interval by the total number of pixels, ensuring that histograms of texture regions of different sizes have equal statistical weights. Bach distance calculates the similarity between two probability distributions, using the formula 1 minus the sum of the square roots of the products of the corresponding interval probability values ​​of the two histograms; a smaller distance value indicates greater texture similarity. Fine-grained segmentation merges candidate regions with similar textures based on a Bach distance threshold of less than 0.1. The threshold is determined according to the typical variation range of building material textures. Texture-consistent component units are formed by recursively merging regions that meet the similarity condition, maintaining a high degree of consistency in texture features within each unit.

[0056] Morphological opening and closing operations for boundary optimization employ erosion and dilation operations from mathematical morphology to address irregularities in the segmentation boundaries. The opening operation eliminates small protrusions and burrs on the segmentation boundaries through a sequence of erosion followed by dilation. Erosion shrinks the region boundaries, while dilation expands them. A 3×3 square kernel is used as the structuring element for neighborhood operations. The closing operation fills small gaps and breaks on the segmentation boundaries through a sequence of dilation followed by erosion. The operation order is reversed compared to the opening operation, but the structuring element remains the same. Boundary optimization converts the segmentation results into a binary image representation, with each component unit corresponding to a different pixel value. After morphological processing, the image is converted back into a set of 3D facets. Spatial connectivity verification checks the topological connectivity of facets within each component unit, using a depth-first search algorithm to traverse the facet adjacency graph to determine connectivity. Segmentation noise reduction is achieved by deleting excessively small independent regions and merging incorrectly separated regions of the same type. The area threshold is set based on the typical size range of architectural components.

[0057] In one specific embodiment, step S3 includes:

[0058] Principal component analysis is performed on the geometric data of each component in the geographic entity set of building components. An independent local coordinate system is obtained by setting the direction of the largest principal component as the X-axis, the direction of the second largest principal component as the Y-axis, and the direction of the normal vector as the Z-axis.

[0059] A coordinate system transformation matrix is ​​established based on an independent local coordinate system to convert the global vertex coordinates of each component into local vertex coordinates, thereby obtaining the component geometric data in the local coordinate system.

[0060] The geometric data of the components in the local coordinate system are topologically reconstructed, and a complete triangular mesh structure is obtained by re-indexing the vertex numbers and face connection relationships.

[0061] The open boundaries generated during the segmentation process are triangulated and closed. By generating closed facets and reparameterizing the UV coordinates, a set of three-dimensional models of individual building components is obtained.

[0062] Specifically, principal component analysis (PCA) uses statistical methods to analyze the spatial distribution characteristics of the geometric data of building components. It calculates the arithmetic mean of the coordinates of all vertices within the component as the geometric center, then calculates the offset vector of each vertex relative to the geometric center, and constructs a 3×3 covariance matrix, where each element represents the covariance value of the offset along each coordinate axis. Eigenvalue decomposition (EVD) obtains three eigenvalues ​​and corresponding eigenvectors by solving the characteristic polynomial of the covariance matrix. The magnitude of the eigenvalues ​​reflects the variance of the data in the corresponding direction, and the eigenvectors indicate the main direction of change. The eigenvector corresponding to the largest principal component direction represents the main extension direction of the component's geometry and is set as the positive X-axis direction of the local coordinate system. The eigenvector corresponding to the second largest principal component direction represents the secondary extension direction of the component and is set as the positive Y-axis direction. The eigenvector corresponding to the smallest principal component direction is usually close to the normal vector direction of the component surface and is set as the positive Z-axis direction. The establishment of an independent local coordinate system eliminates the differences in position and orientation of different components in the global coordinate system, providing a unified reference benchmark for subsequent quality inspection.

[0063] The coordinate system transformation matrix is ​​established based on the coordinate system transformation theory in linear algebra. The transformation matrix is ​​a 3×3 orthogonal matrix composed of the unit vectors of the three local coordinate axes arranged in columns. The first column of the matrix contains the three components of the X-axis unit vector, the second column contains the Y-axis unit vector components, and the third column contains the Z-axis unit vector components. Global vertex coordinate transformation is achieved through matrix multiplication. The global coordinates of each vertex are subtracted from the geometric center coordinates to obtain the relative coordinates, which are then multiplied by the transformation matrix to obtain the new coordinate values ​​in the local coordinate system. The transformation process preserves the relative positional relationships between vertices but aligns the main geometric features of the component with the local coordinate axes. The component's geometric data in the local coordinate system includes the transformed vertex coordinate array, the original face index relationships, and the updated geometric center position, forming an independent geometric representation of the component.

[0064] Topology reconstruction addresses the issues of incomplete component boundaries and chaotic vertex indexes during segmentation. Vertex re-indexing uses a hash table data structure to establish a mapping between global and local vertex indices. It iterates through all faces contained in a component, extracts the vertex index list, removes duplicate indices, and re-numbers them using consecutive integers starting from zero. Face connection updates are achieved by replacing the global indices in the face index array with the corresponding local indices, ensuring that face definitions correctly point to vertices in the local vertex array. Adjacency reconstruction establishes an adjacency matrix by checking shared edges or shared vertices between faces. The matrix row and column indices correspond to face numbers, and the matrix element values ​​represent the adjacency state. Topology consistency verification uses Euler's formula to check the relationship between the number of vertices, edges, and faces. For closed polyhedra, the relationship V-E+F=2 is satisfied, where V is the number of vertices, E is the number of edges, and F is the number of faces. A complete triangular mesh structure ensures that each edge is shared by at most two faces, and the faces around each vertex form a fan-shaped or cone-shaped arrangement.

[0065] Triangulation and closure processing performs face filling operations on open boundaries generated during segmentation. Open boundary identification is performed by counting the number of times each edge is shared by facets; edges with a sharing count of 1 constitute open boundary contours. Boundary contour sorting arranges open edges into ordered boundary loops according to their connectivity, establishing a loop sequence by traversing the edge connectivity using a depth-first search algorithm. The triangulation algorithm uses a scanline method to divide the interior region of the boundary loop into triangular facets, selecting ear triangles from the boundary loop and progressively removing them until the entire region is triangulated. The normal vector of the generated closed facet is determined by calculating the cross product of the three vertices, and the direction of the normal vector is consistent with the normal vector of the original facet. UV coordinate reparameterization establishes the mapping relationship between the vertices of the newly generated facet and the texture image, mapping the 3D vertex coordinates to 2D texture coordinates using a planar projection method. Coordinate normalization adjusts the texture coordinate range to between 0 and 1, ensuring the correctness of texture sampling.

[0066] In one specific embodiment, topological reconstruction processing is performed on the component geometric data in the local coordinate system. A complete triangular mesh structure is obtained by re-indexing vertex numbers and facet connectivity, including:

[0067] The vertex coordinates in the component geometry data under the local coordinate system are renumbered, and a local vertex index table is obtained by consecutive integer numbering starting from zero.

[0068] The original triangle patch index array is mapped and transformed according to the local vertex index table, and the local patch connection table is obtained through the mapping relationship from global index to local index;

[0069] Adjacency relationships are calculated on the local patch connection table, and topological connection information is obtained by establishing a patch adjacency matrix by checking patch pairs with shared edges.

[0070] Mesh integrity is verified based on topological connectivity information. A complete triangular mesh structure is obtained by identifying isolated vertices and repairing topological defects by non-manifold edges.

[0071] Specifically, the vertex coordinate renumbering process first establishes a hash map table to record each global vertex index and its frequency of occurrence in the component. A vertex index list is extracted by traversing all triangles contained in the component. The deduplication operation uses a set data structure to automatically eliminate duplicate global index values. Consecutive integer numbers are assigned sequentially starting from zero; the first global vertex index is assigned local index 0, the second 1, and so on until all vertices are renumbered. The local vertex index table is stored using a dictionary data structure, with the key being the original global index and the corresponding value being the newly assigned local index. This mapping relationship ensures the correctness of subsequent face index conversions. The index table also records the 3D coordinates of each vertex in the local coordinate system, forming a complete description of the local geometric data.

[0072] The mapping transformation process performs batch updates on the triangular facet index array based on the established local vertex index table. Each facet in the original triangular facet index array consists of three global vertex indices. The mapping transformation queries the index table one by one, replacing the global index with the corresponding local index value. The transformation process employs a double loop structure: the outer loop iterates through all faces, while the inner loop processes the three vertex indices of each facet. The mapping relationship from global to local indices is implemented through dictionary lookup operations, ensuring constant time complexity and efficient transformation. The local facet connection table records the transformed facet index information, with each row corresponding to a triangular facet and three columns storing the three local vertex indices constituting that facet. The connection table also maintains the geometric attribute information of the facets, including the facet normal vector, area size, and material type identifier, forming a complete local facet description.

[0073] Adjacency calculation establishes spatial connectivity information by analyzing shared geometric elements between faces. Shared edge checking uses an edge hash table to record each edge and its associated face index. An edge is defined as an ordered pair of two vertex indices, with the smaller index preceding the other to ensure uniqueness. Face pair adjacency is determined based on the existence of shared edges; two faces sharing an edge are considered adjacent. The adjacency matrix uses a sparse matrix storage format, with row and column indices corresponding to face numbers. A matrix element value of 1 indicates adjacency, and 0 indicates non-adjacency. Diagonal elements are set to 0 to avoid adjacency between a face and itself. Topological connectivity information also includes a list of adjacent faces for each face, stored in a linked list structure for easy topological traversal and integrity checks.

[0074] Mesh integrity verification identifies and repairs geometric defects using multiple topology checking algorithms. Isolated vertex identification involves traversing all vertices to check if they are referenced by at least one facet. Vertices not referenced by any facet are marked as isolated vertices and removed from the vertex list. Non-manifold edge checking counts the number of times each edge is shared by facets; edges with more than two sharing counts are marked as non-manifold edges, violating the topological requirements of 3D manifolds. Boundary edge identification marks edges with one sharing count as boundary edges, forming open boundaries of the model. Topology defect repair employs a local mesh reconstruction method, eliminating topological conflicts for non-manifold edges by separating overlapping facets or merging adjacent regions. Euler's formula verification checks whether the number of vertices V, edges E, and faces F satisfy the relationship V - E + F = 2. This relationship needs adjustment for open meshes with boundaries. A complete triangular mesh structure ensures that each edge is shared by at most two facets, and the facets around each vertex form a continuous fan-shaped arrangement. All facet normals point in the same direction, ensuring the orientation of the model.

[0075] In one specific embodiment, step S4 includes:

[0076] The surface normal vectors of each component in the set of individual 3D models of building components are spherically projected and mapped, and the set of dominant directions is obtained by K-means clustering.

[0077] The virtual camera observation position is calculated based on each direction in the set of dominant directions, and the camera position parameters are obtained by setting the camera at a distance of 2 times the maximum size from the center of the component bounding box.

[0078] The camera intrinsic and extrinsic parameter matrices are established based on the camera position parameters. The projection parameter configuration is obtained by setting the focal length to 1.2 times the width of the projected image and setting the principal point to the center of the image.

[0079] The three-dimensional model set of individual building components is rendered using four channels: RGB color, depth, normal vector, and curvature. Multi-view projection feature image set is obtained through multi-channel data fusion.

[0080] Specifically, the 3D normal vectors of the building component surface are converted into spherical coordinates. First, the normal vector of each triangular facet in the 3D model of the individual component is extracted. The normal vector is a unit vector perpendicular to the facet and is calculated and normalized by the cross product of the coordinates of the three vertices. Spherical projection uses polar coordinate transformation to convert the x, y, and z components of the normal vector into longitude and latitude coordinates on the sphere. The longitude angle is obtained by calculating the ratio of the y component to the x component using the arctangent function, and the latitude angle is obtained by calculating the z component using the arcsine function. The projected normal vectors form a set of distribution points on the unit sphere, with each point representing the orientation characteristics of a local area on the component surface. The K-means clustering algorithm groups the normal vector points on the sphere into clusters. The number of clusters K is adaptively determined according to the complexity of the component surface. The complexity is measured by calculating the variance of the normal vector distribution; a large variance indicates drastic surface changes and requires more cluster centers. The clustering process uses Euclidean distance to measure the similarity between spherical points, iteratively updating the cluster centers until convergence. The set of dominant directions is composed of the coordinates of the final cluster centers, and each dominant direction represents a major viewing angle of the component surface.

[0081] The virtual camera's observation position is calculated based on the optimal shooting point location determined by each direction vector in the set of dominant directions. The component's bounding box is determined by calculating the minimum and maximum coordinate values ​​by traversing all vertex coordinates, with the center of the bounding box being the midpoint of the maximum and minimum values ​​of each coordinate axis. The maximum size of the bounding box is the maximum value among the length, width, and height dimensions, reflecting the overall spatial scale of the component. The camera position parameters are determined by extending outwards from the center of the bounding box along the dominant direction by a distance equal to twice the maximum size. This distance ensures that the camera's field of view completely encompasses the component without obstruction. The camera position coordinates are calculated by adding the unit vector of the dominant direction multiplied by a displacement vector equal to twice the maximum size to the bounding box's center coordinates. Each dominant direction corresponds to a virtual camera position, forming a multi-angle observation point array around the component. The camera orientation is determined by a vector pointing from the camera position to the center of the bounding box, ensuring that all cameras are looking at the central region of the component.

[0082] The camera intrinsic and extrinsic parameter matrices are established based on the pinhole camera model theory in computer vision. The intrinsic parameter matrix includes three types of parameters: focal length, principal point coordinates, and distortion coefficients. The focal length is set to 1.2 times the width of the projected image to ensure an appropriate field of view and avoid excessive perspective distortion or an overly narrow field of view. The principal point coordinates are set to the image center position, i.e., half the coordinate values ​​of the image width and height, to ensure the symmetry of the projection. The distortion coefficients are set to zero, indicating that the ideal pinhole model does not consider the influence of lens distortion. The extrinsic parameter matrix includes the camera's rotation matrix and translation vector, describing the camera's attitude and position in the world coordinate system. The rotation matrix is ​​constructed using three orthogonal unit vectors: the view direction, the up direction, and the right direction. The view direction is a normalized vector pointing from the camera to the center of the component. The up direction is set to the positive z-axis of the world coordinate system, and the right direction is calculated by the cross product of the view direction and the up direction. The translation vector represents the camera's position coordinates in the world coordinate system. The projection parameter configuration combines the intrinsic and extrinsic parameter matrices to form a complete camera projection transformation, used to project the 3D scene onto a 2D image plane.

[0083] Four-channel rendering employs multi-channel rendering techniques from computer graphics to generate rich visual feature data. RGB color rendering generates a traditional visible light image, calculating the color value of each pixel using a lighting model. Illumination includes three components: ambient light, diffuse light, and specular light. Depth rendering generates the distance information from each pixel to the camera. The distance value is recorded during rasterization using a z-buffer algorithm, with closer pixels covering farther pixels to form the correct depth relationship. Normal vector rendering encodes the three components of the surface normal vector into three RGB color channels: the x-component is mapped to the red channel, the y-component to the green channel, and the z-component to the blue channel. The component values ​​linearly map from -1 to +1 to the color range of 0 to 255. Curvature rendering calculates the principal curvature values ​​of the surface and maps them to a grayscale image. The principal curvature is calculated by analyzing the rate of change of the surface normal vector in its local neighborhood. Flat areas with near-zero curvature are displayed as medium gray, convex areas with positive curvature are displayed as light gray, and concave areas with negative curvature are displayed as dark gray. Multi-channel data fusion combines image data from four channels into a unified feature image, with each pixel containing a four-dimensional feature vector, forming a multi-view projection feature image set.

[0084] In one specific embodiment, step S5 includes:

[0085] The multi-view projection feature image set is input into the 3D-YOLO-BuildingDefect algorithm for feature extraction. The building defect feature map is obtained through a depth-aware convolutional layer and a normal vector-guided attention mechanism.

[0086] Based on the feature map of building defects, five types of defects, namely cracks, stains, peeling, deformation and leakage, are detected and processed. The defect detection results are obtained through a dedicated detection branch and a multi-task learning loss function.

[0087] Based on the projection parameter configuration, the defect detection results are processed by inverse projection transformation, and the two-dimensional defect coordinates are converted into three-dimensional spatial coordinates by the ray tracing method to obtain the three-dimensional spatial defect distribution results.

[0088] The quality assessment calculation is performed on the three-dimensional spatial defect distribution results, and the quality grade evaluation result of the component is obtained through a comprehensive evaluation of the three dimensions of defect area, depth and severity.

[0089] Specifically, the 3D-YOLO-BuildingDefect algorithm employs a deep network architecture specifically designed for building defects in its feature extraction process, receiving four-channel data from a multi-view projection feature image set as input. The depth-aware convolutional layer integrates depth channel information into the RGB feature extraction process through a modulation mechanism. Specifically, the normalized depth value is multiplied by a modulation coefficient of 0.3 and then multiplied by the convolutional kernel weights to form a depth-adaptive convolution operation. The pixel values ​​in the depth channels reflect the distance information from the surface to the camera; smaller depth values ​​in closer regions correspond to larger convolutional responses, while larger depth values ​​in farther regions correspond to smaller convolutional responses. This modulation mechanism enhances the algorithm's sensitivity to the geometric features of the building surface. The normal vector-guided attention mechanism generates a pixel-level attention weight map using the normal vector channels. The x, y, and z components in the normal vector channels are encoded as red, green, and blue color values, respectively. After extracting the normal vector features through a 3×3 convolutional kernel, these features are added and fused pixel-by-pixel with the RGB features. Attention weights are calculated using a Sigmoid activation function, mapping the fused features to a weight range between 0 and 1. Regions with high weight values ​​indicate drastic changes in surface normal vectors, typically corresponding to edges, corners, or defect locations of building components. The building defect feature map is obtained by multiplying the RGB features with the attention weights through a weighted fusion operation, highlighting regions with significant changes in normal vectors.

[0090] The five-category defect detection processing utilizes a specially designed detection branch network structure based on building defect feature maps. The crack detection branch employs a combination of 1×7 and 7×1 asymmetric convolutional kernels. These strip-shaped convolutional kernels have a stronger response capability to linear features; the 1×7 kernel detects horizontal crack features, while the 7×1 kernel detects vertical crack features. The stain detection branch uses a 3×3 dilated convolutional kernel with an dilation rate of 2 to increase the receptive field coverage and capture irregularly shaped contaminated areas. The peeling detection branch combines curvature channel information to identify surface material peeling phenomena. The curvature channel reflects the surface's unevenness, and peeling areas typically exhibit localized depressions. The deformation detection branch compares depth information with the theoretical plane to identify structural deformation. The theoretical plane is determined by fitting the depth values ​​of the surrounding normal area. The leakage detection branch detects water stains by analyzing RGB color anomalies; water stain areas typically exhibit dull colors and hue shifts. The multi-task learning loss function comprises three parts: detection loss, classification loss, and consistency loss. The detection loss employs an improved Focal Loss to address sample imbalance, focusing on hard-to-classify defect samples. The alpha parameter is set to 0.25, and the gamma parameter is set to 2. The classification loss uses the cross-entropy loss function to calculate the difference between the predicted and true classes. The consistency loss ensures that the prediction results for the same defect remain consistent across different detection branches. The defect detection results include the bounding box coordinates, defect type label, and confidence score for each detected defect.

[0091] The inverse projection transformation process maps the 2D detection results back to 3D space based on the established projection parameter configuration. The ray tracing method calculates the ray equation emanating from the camera center for each pixel in the detection bounding box. The ray direction is calculated using the inverse transformation of the camera intrinsic matrix to obtain the 3D direction vector corresponding to the pixel coordinates. The parametric form of the ray equation is that the spatial point equals the camera center coordinates plus the parameter 't' multiplied by the direction vector. The value of parameter 't' is determined by solving for the intersection points of the ray and the component surface. Surface intersection point calculation uses ray-triangular facet intersection detection. For each triangular facet in the component model, it is determined whether the ray intersects with it; the intersection point is the corresponding position of the pixel in 3D space. The 3D coordinates of all pixels within the bounding box form the geometric region of the defect in space, and the spatial boundary of the defect region is calculated using the convex hull algorithm. Multi-view fusion processing handles the detection results of the same defect in different projected images. The overlapping volume of the defect region in 3D space is calculated to determine if it is the same defect. If the overlapping volume exceeds 60% of the volume of a single defect, it is considered a multi-view observation of the same defect. The fusion operation performs a union operation on the bounding boxes of overlapping defects, merging them into a unified 3D defect region. The three-dimensional spatial defect distribution results record the spatial location, geometric dimensions, type label, and confidence level information of each defect.

[0092] Quality assessment calculations are based on multi-dimensional quantitative analysis of the three-dimensional spatial defect distribution results. Defect area calculation projects the defect area onto the component surface and calculates the projected area using a triangular mesh integration method. The integration process divides the defect area into several triangular elements, and the area of ​​each triangle is calculated by calculating half of the vector cross product. All triangular areas are summed to form the total area. Defect depth calculation is determined by analyzing the maximum offset of the defect area relative to the component's theoretical surface. The theoretical surface is established by fitting the surface equation of the normal area surrounding the defect using the least squares method. The depth value is the maximum distance from all points within the defect area to the theoretical surface; a positive value indicates a convex deformation, and a negative value indicates a concave defect. The comprehensive severity evaluation uses a weighted calculation method, with weights allocated as follows: area proportion coefficient 0.4, depth exceedance coefficient 0.4, and location importance coefficient 0.2. The area proportion is the ratio of the defect area to the total area of ​​the component; the depth exceedance coefficient is the ratio of the defect depth to the allowable deviation threshold; and the location importance coefficient is determined based on the defect's position within the component, with higher weights for critical structural parts. The quality grade of components is assessed using a grading standard. The excellent grade requires a severity level of less than 0.3 and no serious defects. The qualified grade requires a severity level of less than 0.7 and no more than one serious defect. The unqualified grade is defined as a situation that exceeds the qualified standard.

[0093] The above describes the house quality inspection method based on a real-scene 3D model in the embodiments of this application. The following describes the house quality inspection system based on a real-scene 3D model in the embodiments of this application. Please refer to [link / reference]. Figure 2 One embodiment of the house quality inspection system based on a real-scene 3D model in this application includes:

[0094] The verification module is used to convert the OSGB format real-scene 3D building model to the building body coordinate system, and obtain a standardized real-scene 3D building model through geometric accuracy verification and texture quality evaluation.

[0095] The segmentation module is used to perform multi-level region growing segmentation on the standardized real-scene 3D building model based on the semantic feature library of building components, and to obtain a set of geographic entities of building components through patch normal vector clustering and texture similarity measurement.

[0096] The conversion module is used to establish an independent local coordinate system for each component in the set of geographic entities of building components, and obtain a set of three-dimensional models of individual building components through vertex coordinate transformation and boundary closure processing;

[0097] The rendering module is used to perform adaptive view planning on the set of three-dimensional models of individual building components based on the surface normal vector distribution of the components, and to obtain a set of multi-view projection feature images through multi-channel rendering.

[0098] The detection module is used to perform defect detection on the multi-view projection feature image set using the 3D-YOLO-BuildingDefect algorithm, and obtain the three-dimensional spatial defect distribution results and component quality grade evaluation results through inverse projection transformation and multi-view fusion.

[0099] above Figure 2 The housing quality inspection system based on a real-scene 3D model in this embodiment of the invention will be described in detail from the perspective of modular functional entities. The housing quality inspection equipment based on a real-scene 3D model in this embodiment of the invention will be described in detail from the perspective of hardware processing.

[0100] Reference Figure 3 This invention also provides a building quality inspection device based on a real-scene 3D model. This device can be a server, and its internal structure can be as follows: Figure 3 As shown, the building quality inspection device based on a real-scene 3D model includes a processor, memory, display screen, input device, network interface, and database connected via a system bus. The processor in this computer design provides computing and control capabilities. The memory of the building quality inspection device includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database of the building quality inspection device based on the real-scene 3D model is used to store the data corresponding to this embodiment. The network interface of the building quality inspection device based on the real-scene 3D model is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements the above-described method.

[0101] Those skilled in the art will understand that Figure 3 The structure shown is merely a block diagram of a portion of the structure related to the present invention and does not constitute a limitation on the housing quality inspection equipment based on a real-scene 3D model to which the present invention is applied.

[0102] The present invention also provides a computer-readable storage medium, which can be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium, wherein the computer-readable storage medium stores instructions that, when the instructions are executed on a computer, cause the computer to perform the steps of the house quality inspection method based on a real-scene 3D model.

[0103] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0104] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a building quality inspection device (which can be a personal computer, server, or network device, etc.) based on a real-world 3D model to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0105] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for inspecting building quality based on a real-world 3D model, characterized in that, The method includes: Step S1: Convert the OSGB format real-scene 3D building model to the building body coordinate system, and obtain a standardized real-scene 3D building model through geometric accuracy verification and texture quality evaluation; Step S2: Perform multi-level region growing segmentation on the standardized real-scene 3D building model according to the semantic feature library of building components, and obtain the set of geographic entities of building components through patch normal vector clustering and texture similarity measurement; Step S3: Establish an independent local coordinate system for each component in the set of geographic entities of building components, and obtain a set of three-dimensional models of individual building components through vertex coordinate transformation and boundary closure processing; Step S4: Based on the surface normal vector distribution of the components, perform adaptive view planning on the set of individual 3D models of the building components, and obtain a set of multi-view projection feature images through multi-channel rendering; Step S5: Use the 3D-YOLO-BuildingDefect algorithm to detect defects in the multi-view projection feature image set, and obtain the three-dimensional spatial defect distribution results and component quality grade evaluation results through inverse projection transformation and multi-view fusion.

2. The method for inspecting building quality based on a real-scene 3D model according to claim 1, characterized in that, Step S1 includes: The binary data structure of the OSGB format real-world 3D building model is parsed to obtain the vertex coordinate array, triangle patch index array, and texture coordinate mapping relationship; Based on the orientation identification of the main structure of the building, a coordinate system transformation matrix is ​​established to transform the vertex coordinate array from the geographic coordinate system to the building body coordinate system, thereby obtaining geometric data in the body coordinate system. The geometric accuracy of the geometric data in the body coordinate system is verified. The uniformity of model density is evaluated by calculating the standard deviation of the distance distribution between adjacent vertices, and the geometric quality verification results are obtained. The texture map corresponding to the texture coordinate mapping relationship is input into the Sobel gradient calculation for texture quality assessment. The texture quality assessment result is obtained by calculating the average gradient magnitude, and the standardized real-scene 3D building model is obtained.

3. The method for inspecting building quality based on a real-scene 3D model according to claim 1, characterized in that, Step S2 includes: The semantic feature library of the building components is constructed based on the geometric feature description of the exterior wall, roof, and door and window components. The set of semantic feature parameters of the components is obtained by defining the normal vector direction of the surface and the threshold of the vertical component. The normal vectors of the facets in the standardized real-world 3D building model are input to calculate the included angle for coarse segmentation. Adjacent facets with a normal vector included angle of less than 30 degrees are classified to obtain a set of candidate regions. Color histograms are calculated for the texture regions of each facet in the candidate region set, and fine segmentation is performed based on the texture similarity metric of Bach distance to obtain texture-consistent component units. The texture-consistent component unit is subjected to morphological opening and closing operations for boundary optimization, and the set of geographic entities of the building component is obtained through spatial connectivity verification and segmentation noise elimination.

4. The method for inspecting building quality based on a real-scene 3D model according to claim 1, characterized in that, Step S3 includes: Principal component analysis is performed on the geometric data of each component in the set of geographic entities of building components. An independent local coordinate system is obtained by setting the direction of the largest principal component as the X-axis, the direction of the second largest principal component as the Y-axis, and the direction of the normal vector as the Z-axis. Based on the independent local coordinate system, a coordinate system transformation matrix is ​​established to convert the global vertex coordinates of each component into local vertex coordinates, thereby obtaining the component geometric data in the local coordinate system. The component geometric data in the local coordinate system is subjected to topological reconstruction processing, and a complete triangular mesh structure is obtained by re-indexing the vertex numbers and face connection relationships; The open boundaries generated during the segmentation process are triangulated and closed. By generating closed facets and reparameterizing the UV coordinates, a set of three-dimensional models of the individual building components is obtained.

5. The method for inspecting building quality based on a real-scene 3D model according to claim 4, characterized in that, The topology reconstruction process of the component geometric data in the local coordinate system, which obtains a complete triangular mesh structure by re-indexing vertex numbers and facet connections, includes: The vertex coordinates in the component geometric data under the local coordinate system are renumbered, and a local vertex index table is obtained by consecutive integer numbering starting from zero. The original triangle patch index array is mapped and transformed according to the local vertex index table, and the local patch connection table is obtained through the mapping relationship from global index to local index; The adjacency relationship is calculated for the local patch connection table, and the topological connection information is obtained by establishing a patch adjacency matrix by checking the patch pairs with shared edges. Mesh integrity is verified based on the topological connectivity information, and the complete triangular mesh structure is obtained by identifying isolated vertices and repairing topological defects by non-manifold edges.

6. The method for inspecting building quality based on a real-scene 3D model according to claim 1, characterized in that, Step S4 includes: The surface normal vectors of each component in the set of individual 3D models of the building components are spherically projected and mapped, and the set of dominant directions is obtained by K-means clustering. The virtual camera observation position is calculated based on each direction in the set of dominant directions, and the camera position parameters are obtained by setting the camera at a distance of 2 times the maximum size from the center of the component bounding box. Based on the camera position parameters, a camera intrinsic and extrinsic parameter matrix is ​​established, and the projection parameter configuration is obtained by setting the focal length to 1.2 times the width of the projected image and setting the principal point to the center of the image. The three-dimensional model set of the building components is rendered using four channels: RGB color, depth, normal vector, and curvature. The multi-view projection feature image set is obtained by fusing multi-channel data.

7. The method for inspecting building quality based on a real-scene 3D model according to claim 6, characterized in that, Step S5 includes: The multi-view projection feature image set is input into the 3D-YOLO-BuildingDefect algorithm for feature extraction. The building defect feature map is obtained through a depth-aware convolutional layer and a normal vector-guided attention mechanism. Based on the aforementioned building defect feature map, five types of defects—cracks, stains, peeling, deformation, and leakage—are detected and processed. The defect detection results are obtained through a dedicated detection branch and a multi-task learning loss function. Based on the projection parameter configuration, the defect detection results are subjected to inverse projection transformation, and the two-dimensional defect coordinates are converted into three-dimensional spatial coordinates by ray tracing to obtain the three-dimensional spatial defect distribution results. The quality assessment calculation is performed on the three-dimensional spatial defect distribution results, and the quality grade evaluation result of the component is obtained through a comprehensive evaluation of the three dimensions of defect area, depth and severity.

8. A building quality inspection system based on a real-scene 3D model, characterized in that, For implementing the house quality inspection method based on a real-scene 3D model as described in any one of claims 1-7, the house quality inspection system based on the real-scene 3D model comprises: The verification module is used to convert the OSGB format real-scene 3D building model to the building body coordinate system, and obtain a standardized real-scene 3D building model through geometric accuracy verification and texture quality evaluation. The segmentation module is used to perform multi-level region growing segmentation on the standardized real-scene 3D building model based on the semantic feature library of building components, and to obtain a set of geographic entities of building components through patch normal vector clustering and texture similarity measurement. The conversion module is used to establish an independent local coordinate system for each component in the set of geographic entities of building components, and obtain a set of three-dimensional models of individual building components through vertex coordinate transformation and boundary closure processing; The rendering module is used to perform adaptive view planning on the set of three-dimensional models of individual building components based on the surface normal vector distribution of the components, and to obtain a set of multi-view projection feature images through multi-channel rendering. The detection module is used to perform defect detection on the multi-view projection feature image set using the 3D-YOLO-BuildingDefect algorithm, and obtain the three-dimensional spatial defect distribution results and component quality grade evaluation results through inverse projection transformation and multi-view fusion.

9. A building quality inspection device based on a real-scene 3D model, characterized in that, The method includes a memory and a processor, the memory storing a computer program that can run on the processor, and the processor executing the computer program to implement the house quality inspection method based on a real-scene three-dimensional model as described in any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is run by the processor, it causes the processor to execute the house quality inspection method based on a real-scene three-dimensional model as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Building facade defect intelligent detection method

    CN119887763A

  • Visual detection device and method for building engineering wall quality

    CN120495262A

  • Multi-source data fusion super high-rise building group live-action three-dimensional model construction method

    CN121304967A

  • Method, apparatus, and storage medium for three-dimensional reconstruction of buildings based on missing point cloud data

    US20240257462A1

Cited By

  • Structured reconstruction method and device based on topology awareness, equipment and medium

    CN122199836A

  • Topology-aware structured reconstruction method, apparatus, device, and medium

    CN122199836B