Building three-dimensional reconstruction method and system based on 3D Gaussian sputtering
By identifying right-angled components of buildings using a deep learning model and generating a non-uniform Gaussian kernel distribution, and combining texture boundary verification and coplanarity loss function to optimize the Gaussian kernel distribution, the problems of large reconstruction error and texture misalignment of right-angled components in existing technologies are solved, and high-precision 3D reconstruction of buildings is achieved.
Patent Information
- Application Number
- CN202610008676.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-06
- Publication Date
- 2026-02-03
- Estimated Expiration
- 2046-01-06
AI Technical Summary
Existing 3D Gaussian sputtering reconstruction methods cannot meet the accuracy standards for reconstructing right-angled components of buildings, resulting in excessive reconstruction errors and texture misalignment at right angles, and failing to adapt to the geometric abrupt changes and texture mapping consistency of right-angled components.
The deep learning model identifies right-angled components of buildings, generates a non-uniform Gaussian kernel distribution, adopts a direction-constrained Gaussian kernel and gradient decay kernel density strategy, and combines a texture boundary verification module and a right-angle coplanarity loss function to optimize the Gaussian kernel distribution and texture mapping. An auxiliary Gaussian kernel is then implanted to optimize edge details.
It achieves the absence of rounded corner distortion and texture overlap across surfaces for right-angled components, and the reconstruction error is controlled within the accuracy range, meeting the requirements for restoring architectural construction drawings.
Smart Images

Figure CN121458909A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of 3D Gaussian sputtering reconstruction and geometric accuracy optimization technology, specifically to a method and system for three-dimensional reconstruction of buildings based on 3D Gaussian sputtering. Background Technology
[0002] 3D Gaussian sputtering reconstruction and geometric accuracy optimization technology is an important technology, specifically applied to the 3D reconstruction of right-angle components of buildings and the restoration of architectural construction drawings. The core is to achieve high-precision reconstruction by accurately adapting the geometric features and texture mapping rules of right-angle components, thus meeting the stringent requirements of urban architectural surveying for right-angle deviation and edge resolution. Current 3D Gaussian sputtering-based methods for building reconstruction struggle to adapt to the unique structures of right-angled components in urban architectural surveying scenarios, failing to meet the accuracy standards required for construction drawing restoration. Existing 3D Gaussian sputtering reconstruction methods do not design Gaussian kernel distribution strategies specifically for the geometric abrupt changes in right-angled components, instead employing globally uniform distribution and fixed isotropic Gaussian kernels. This results in excessive overlap of Gaussian kernels at right-angle inflection points, causing originally sharp right angles to be over-smoothed into rounded corners, significantly deviating from the actual right-angled structure. Furthermore, the consistency of texture mapping between the Gaussian kernels on both sides of the right angle is not verified, leading to cross-surface mixing of Gaussian kernels and resulting in texture overlap on both sides of the walls. This misalignment between the reconstructed texture and the actual wall texture exacerbates the problem. These two issues coupled together cause reconstruction errors exceeding the specified limits, failing to meet the core requirements of right-angle deviation and edge detail resolution, and also being unsuitable for architectural construction drawing restoration applications. To address this technical problem, we present a 3D Gaussian sputtering-based method and system for building reconstruction. Summary of the Invention
[0003] The purpose of this invention is to provide a method and system for three-dimensional reconstruction of buildings based on 3D Gaussian sputtering, so as to solve the problems mentioned in the background art.
[0004] To achieve the above objectives, one of the objectives of this invention is to provide a method for three-dimensional reconstruction of buildings based on 3D Gaussian sputtering, comprising the following steps: S1. Identify the right-angled component regions of buildings in the input image through a deep learning model, including the precise outline boundaries of wall corners and door and window frames, and output a semantic segmentation map with geometric abrupt feature markers; S2. For the right-angle component regions marked in the semantic segmentation graph, generate a non-uniform Gaussian kernel distribution strategy, including prohibiting Gaussian kernel distribution within the center radius of the right-angle inflection point, implementing a gradient decay kernel density strategy in the region extending along the normal direction of the walls on both sides of the inflection point, and replacing the isotropic Gaussian kernel with a direction-constrained Gaussian kernel, i.e., the kernel principal axis direction is forcibly aligned with the wall normal. S3. Establish independent texture mapping channels for the two walls on both sides of the right-angle component. Add a texture boundary verification module in GPU parallel computing. When the Gaussian kernel coverage area crosses the two walls, automatically divide the Gaussian kernel into two independent sub-kernels and bind them to the corresponding wall textures. Implement a texture weight clearing mechanism for the overlapping area of the sub-kernels. S4. Introduce a right-angle coplanarity loss function based on projection geometry to detect the coplanar deviation of the Gaussian kernel center points on both sides of the right angle in real time. If the angle between the normal vectors of adjacent Gaussian kernels deviates from the preset angle range, iterative kernel position correction is triggered until the right-angle constraint is met. S5. An auxiliary Gaussian kernel is implanted within a fixed range at the edge of the component. The spatial coordinates of the auxiliary kernel are optimized by back-projection of edge pixels. Finally, a reconstruction model that satisfies the right angle deviation and edge resolution is output.
[0005] The second objective of this invention is to provide a system for implementing a 3D building reconstruction method based on 3D Gaussian sputtering, comprising: The semantic parsing unit for building construction integrates a dual-channel edge gradient collaborative perception network and a geometric mutation feature fusion unit. It takes the original image as input and outputs a semantic segmentation map carrying a geometric mutation feature tensor. This tensor includes error ellipsoid parameters, wall normal vector threshold, and edge thickness probability distribution histogram. The adaptive kernel distribution control unit receives the geometric abrupt change feature markers of the semantic segmentation map, establishes an ellipsoidal spatial expansion forbidden zone at the right angle inflection point and calculates the forbidden radius adaptive coefficient, and simultaneously generates a kernel density decay coordinate system to drive a negative exponential density decay curve. At the same time, it reconstructs the isotropic Gaussian kernel into an ellipsoidal anisotropic kernel with compressed major axis radius and expanded minor axis radius with edge heatmap confidence. The parallel texture processing unit deploys a texture boundary verification module in the GPU computing pipeline. When an ellipsoidal anisotropic kernel is detected to cross the semantic segmentation boundary, it triggers kernel voxel partitioning to generate sub-kernels bound to independent texture channels, and implements a texture weight clearing mechanism based on the comparison between spatial overlap rate and kernel density threshold. The geometric accuracy enhancement unit has a built-in projection geometric coplanarity checker that calculates the cross product modulus of the principal axis vector of the ellipsoidal anisotropic kernel in real time. It triggers iterative kernel position migration with the center of the forbidden area as the projection origin. At the same time, it starts the auxiliary kernel implantation program based on the confidence level of the edge heatmap and the risk of coplanar deviation. It optimizes the spatial coordinates of the auxiliary kernel through closed-loop calibration by back-projection of edge pixels until the color gradient residual converges.
[0006] Compared with the prior art, the beneficial effects of the present invention are as follows: This invention generates a non-uniform Gaussian kernel distribution targeting the geometric abrupt changes of right-angled components. It combines a texture boundary verification module to segment cross-surface Gaussian kernels and clears the texture weights of overlapping sub-kernels to zero. It also uses a right-angle coplanarity loss function to correct kernel coplanarity deviations and implants auxiliary Gaussian kernels to optimize edge details. This achieves the effect of no rounded corner distortion in right-angled components, no cross-surface texture overlap on both walls, and reconstruction errors controlled within the accuracy range while meeting the requirements for restoring architectural construction drawings. It effectively solves the problem of excessive reconstruction errors caused by the coupling of right-angle rounded corner distortion and cross-surface texture overlap due to the failure of existing 3D Gaussian sputtering reconstruction methods to adapt to right-angle geometric abrupt changes and the failure to verify texture mapping consistency. Attached Figure Description
[0007] Figure 1 This is a flowchart illustrating the overall workflow of the present invention; Figure 2 This is a schematic diagram of the overall structure of the present invention; The meanings of the labels in the diagram are as follows: 1. Semantic parsing unit for building construction; 2. Adaptive kernel distribution control unit; 3. Parallel texture processing unit; 4. Geometric accuracy enhancement unit. Detailed Implementation
[0008] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0009] Please see Figure 1 As shown, one of the objectives of this embodiment is to provide a method for three-dimensional reconstruction of buildings based on 3D Gaussian sputtering, including the following steps: S1. Identify the right-angled component regions of buildings in the input image through a deep learning model, including the precise outline boundaries of wall corners and door and window frames, and output a semantic segmentation map with geometric abrupt feature markers; S2. For the right-angle component regions marked in the semantic segmentation graph, generate a non-uniform Gaussian kernel distribution strategy, including prohibiting Gaussian kernel distribution within the center radius of the right-angle inflection point, implementing a gradient decay kernel density strategy in the region extending along the normal direction of the walls on both sides of the inflection point, and replacing the isotropic Gaussian kernel with a direction-constrained Gaussian kernel, i.e., the kernel principal axis direction is forcibly aligned with the wall normal. S3. Establish independent texture mapping channels for the two walls on both sides of the right-angle component. Add a texture boundary verification module in GPU parallel computing. When the Gaussian kernel coverage area crosses the two walls, automatically divide the Gaussian kernel into two independent sub-kernels and bind them to the corresponding wall textures. Implement a texture weight clearing mechanism for the overlapping area of the sub-kernels. S4. Introduce a right-angle coplanarity loss function based on projection geometry to detect the coplanar deviation of the Gaussian kernel center points on both sides of the right angle in real time. If the angle between the normal vectors of adjacent Gaussian kernels deviates from the preset angle range, iterative kernel position correction is triggered until the right-angle constraint is met. S5. An auxiliary Gaussian kernel is implanted within a fixed range at the edge of the component. The spatial coordinates of the auxiliary kernel are optimized by back-projection of edge pixels. Finally, a reconstruction model that satisfies the right angle deviation and edge resolution is output.
[0010] Identifying right-angled structural member regions of buildings in input images using deep learning models specifically includes: A dual-channel edge gradient collaborative perception network is constructed. The first branch uses an adaptive pane convolution kernel to extract pixel-level right-angle topological features, with the pane size matching the building texture scale. The second branch separates the wall body from the attachments through a multispectral reflectance analysis module and outputs an edge heatmap. Finally, a geometric mutation feature fusion device is used to concatenate the feature tensors output by the two branches with the original RGB image. The resulting structured semantic annotations, including interior and exterior 90-degree angles and edge entity thickness, are generated through a 3D convolutional layer.
[0011] Output a semantic segmentation map with geometric mutation feature labels, specifically including: Based on structured semantic annotation, spatial coordinate precision enhancement encoding is performed on the coordinates of right-angle inflection points, which are then mapped into high-dimensional feature vectors and stored in a geometric mutation feature tensor. This tensor contains the three-dimensional error ellipsoid parameters of the inflection point spatial coordinates, the cosine similarity threshold of the normal vectors of the two side walls, and the probability distribution histogram of the edge entity thickness. Finally, a semantic segmentation map with geometric mutation feature labels is output.
[0012] Gaussian kernel distribution is prohibited within the radius of the center of the right-angle inflection point, specifically including: The adaptive coefficient of the forbidden radius is calculated based on the error ellipsoid parameter in the geometric mutation feature marker. When the thickness probability distribution histogram of the edge entity shows that the thickness reaches the lower limit, the adaptive coefficient of the forbidden radius is reduced linearly. At the same time, combined with the cosine similarity deviation of the normal vectors of the two walls, the forbidden area is expanded in an ellipsoidal space so that the forbidden area extends a greater distance along the right angle bisector than the direction perpendicular to the wall.
[0013] The gradient decay kernel density strategy specifically includes: Based on the defined no-distribution zone boundary, a kernel density decay coordinate system is established along the wall surface normal direction. With the outer edge of the no-distribution zone at the inflection point as the origin, a negative exponential density decay curve is used to control the Gaussian kernel distribution density. The decay rate of this curve is strongly correlated with the probability distribution of edge entity thickness. That is, when the thickness reaches the lower limit, the decay rate increases to enhance the edge sharpness. At the same time, a wall surface flatness compensation factor is introduced. If a slight curvature is detected on the wall surface, the decay rate is automatically reduced to avoid kernel distribution faults.
[0014] The generation of direction-constrained Gaussian kernels specifically includes: Based on the wall normal vector data in the geometric mutation feature markers, the isotropic Gaussian kernel is reconstructed into an ellipsoidal anisotropic kernel, whose principal axis direction is forcibly locked to the normal vector direction. The major axis radius is compressed according to the kernel density decay curve, while the minor axis radius is proportional to the confidence of the extracted edge heatmap. When the edge heatmap shows that the texture edge is clear, the minor axis radius is expanded to improve the texture continuity.
[0015] The operation of automatically dividing the Gaussian kernel into two independent sub-kernels specifically includes: When a Gaussian kernel coverage area is detected to cross the texture boundary defined by the semantic segmentation map, kernel voxel partitioning is performed using the boundary method plane as the segmentation plane to generate sub-kernels belonging to the two side walls respectively. The implementation criteria for the texture weight zeroing mechanism are as follows: If the spatial overlap rate between the sub-kernel and the original kernel after segmentation exceeds the current site kernel density threshold, the texture blending weight of the overlapping area is reduced to zero, and the width of the zeroing region is adjusted according to the minor axis radius of the ellipsoidal anisotropic kernel.
[0016] The method for constructing the right-angle coplanarity loss function is as follows: The principal axis direction vector of the ellipsoidal anisotropic kernel is calculated in real time. If two adjacent kernels are located on the right-angled walls, the magnitude of the cross product of their principal axis vectors is compared with the preset right-angled reference value. Coplanar deviation detection is achieved through the projection geometric coplanarity checker. Taking the center of the inflection point forbidden zone as the projection origin, the center points of the Gaussian kernels on both sides are projected onto the right-angled theoretical plane. When the angle between the line connecting the projection points and the theoretical right-angled side deviates from the threshold, iterative kernel position migration based on the kernel density decay coordinate system is triggered.
[0017] The triggering condition for implanting an auxiliary Gaussian kernel is: When the edge heatmap confidence of a component edge in the semantic segmentation image is lower than a set threshold, and the site is marked as a high-risk area for deviation in the projection geometric coplanarity verification, the implantation procedure is initiated. The spatial coordinate optimization of the auxiliary kernel adopts edge pixel back projection closed-loop calibration, which includes back-projecting the texture boundary coordinates of the segmented sub-kernels to the input image, calculating the color gradient residual between the edge pixels and the projection position, and adjusting the three-dimensional coordinates of the auxiliary kernel through the minor axis radius of the ellipsoidal anisotropic kernel until the residual converges.
[0018] Further explanation is needed: in 3D building reconstruction based on 3D Gaussian sputtering, accurate identification of right-angled components is fundamental to subsequent kernel distribution and geometric constraints. Traditional single-channel networks are prone to blurring of right-angled contours and misjudgment of boundaries due to interference from wall attachments or texture scale mismatch. Therefore, it is necessary to construct a dual-channel edge gradient collaborative perception network, which simultaneously exerts efforts from two dimensions: topological feature extraction and separation of the entity and attachments, to accurately locate the right-angled component region. The specific implementation method is as follows: The core of constructing a dual-channel edge gradient collaborative perception network is to achieve feature complementarity. The network is based on an Encoder and Decoder architecture. The input is a 256×256 resolution RGB image of a building. The Encoder part contains 6 convolutional blocks, each consisting of 2 convolutional layers, 2 BatchNorm layers, and 2 ReLU activation functions. The Decoder achieves feature upsampling through transposed convolution, and finally outputs a feature map with the same size as the input. The dual channels are embedded in parallel between the 2nd to 5th convolutional blocks of the Encoder. The first branch focuses on extracting right-angle topological features, and the second branch focuses on separating the wall body from the attachments. The features of the two branches are fused in the Decoder stage to ensure that both geometric structure is captured and interference factors are eliminated.
[0019] During network training, a dataset of labeled right-angled building components was used, containing 5000 building images in different scenes and under different lighting conditions. The dataset included annotations of 90° interior angles, 90° exterior angles, and edge thickness. A combined cross-entropy loss function and Dice loss function were used for optimization to improve the recognition accuracy of small targets. The first branch employed an adaptive pane convolutional kernel to extract pixel-level right-angle topological features. This adaptive pane convolutional kernel refers to a kernel whose number and size of panes can be dynamically adjusted according to the building texture scale of the input image, unlike traditional convolutional kernels with fixed panes. First, the network calculates the texture period of the input image through a pre-processed texture analysis module. After grayscale processing, Fourier transform is used to extract texture frequencies; the reciprocal of the frequency is the texture period. Subsequently, the pane size is dynamically adjusted according to the texture period. If the texture period is 20 pixels, then the pane size... The size is set to 10×10 pixels to ensure that the pane can completely cover a single texture unit. If the texture period is 5 pixels, the pane size is set to 3×3 pixels to avoid the loss of detail due to an excessively large pane. At the same time, the number of panes is fixed at 4×4, forming 16 independent sub-panes. Each sub-pane is responsible for capturing the gradient relationship of local pixels. When extracting pixel-level right-angle topological features, each sub-pane calculates the gradient direction and gradient magnitude of the pixels within the pane, filters out pixel pairs with gradient direction angles close to 90°, and marks them as candidate right-angle pixels. Then, through a 3×3 neighborhood voting mechanism, if there are at least 3 candidate right-angle pixels in the 8 neighborhoods of a pixel, and the sum of the gradient magnitudes exceeds a preset threshold, then the pixel is determined to be a right-angle topological feature pixel. Finally, a single-channel right-angle topological feature map is output. The higher the pixel value in the map, the more significant the right-angle feature.
[0020] The second branch separates the wall surface from its attachments using a multispectral reflectance analysis module. This module utilizes the differences in reflectance across multiple spectral bands to separate the wall surface from its attachments. First, the module uses a spectral conversion algorithm to generate a near-infrared image from the input RGB image, forming four-band multispectral data. Then, it calculates the multispectral reflectance vector for each pixel, along with the reflectance values for the four bands. Reflectance = pixel value / incident light intensity, where the incident light intensity is calibrated using the image's grayscale mean. Next, it calls a pre-set wall reflectance template library containing multispectral reflectance data for common wall materials such as concrete, ceramic tiles, and paint. The reflectance vector is obtained through laboratory spectral measurements. Cosine similarity is used to calculate the matching degree between the current pixel's reflectance vector and each vector in the template library. Pixels with a matching degree greater than or equal to 0.85 are marked as candidate pixels for walls, while pixels with a matching degree less than 0.85 are marked as candidate pixels for attachments. To further optimize the separation effect, the module introduces a spatial continuity constraint: if more than 6 out of the 8 neighbors of a candidate pixel for an attachment are candidate pixels for walls, it is judged as a misclassification and corrected to a candidate pixel for walls, thus avoiding small-area texture noise being misclassified as attachments. Finally, the module outputs a single-channel edge heatmap, where pixel values (0-255) represent the confidence level of right-angled component edges. The pixel values of the boundary between the wall and the attachments, and the right-angle boundary of the wall itself, are 200-255 (high confidence), while the pixel values inside the wall and the attachments are 0-50 (low confidence). This visually represents the edge position of the right-angled components. Finally, the feature tensors output from the two branches are concatenated with the original RGB image through a geometric mutation feature fusion unit. The geometric mutation feature fusion unit is a module that achieves efficient fusion of multi-source features. Its core logic is channel complementarity and weight adaptation. First, the right-angle topological feature tensor (1 channel) output from the first branch, the edge heatmap feature tensor (1 channel) output from the second branch, and the original RGB image (3 channels) are concatenated according to the channel dimension. The features are concatenated to form a 5-channel fused feature tensor. Then, the fusion layer performs dimensionality compression and weight allocation on the 5-channel features using a 1×1 convolutional layer. Higher weights are assigned to the right-angle topological feature channels and edge heatmap channels (weight coefficients of 1.2-1.5), while basic weights are assigned to the RGB image channels (weight coefficient of 1.0), ensuring that geometric and edge features are given priority. Finally, the weighted fused feature tensor is input into a 3D convolutional layer with a kernel size of 3×3×5, a stride of 1, and padding of 1. The 3D convolutional layer captures the correlation features between channels to generate structured semantic annotations. The annotation result is a 3-channel feature map, with the first channel annotating the interior angles. Pixel value 1 represents an interior angle, 0 represents a non-interior angle, and the second channel indicates the exterior angle. Pixel value 1 represents an outer corner, and 0 represents a non-outer corner. The third channel marks the thickness of the edge entity, and the pixel value is a normalized value of the thickness in millimeters. The three channels work together to form a complete structural description of the right-angled component, laying the foundation for subsequent geometric abrupt feature extraction.
[0021] After obtaining structured semantic annotations, pixel-level annotations alone cannot meet the accuracy requirements of subsequent 3D Gaussian kernel distribution. It is necessary to further enhance the coordinate accuracy of right-angle inflection points and supplement geometric constraint parameters. Therefore, it is necessary to implement spatial coordinate accuracy enhancement encoding based on structured semantic annotations, construct a geometric mutation feature tensor, and finally output a semantic segmentation map with feature labels. The specific implementation method is as follows: Based on structured semantic annotation, spatial coordinate precision enhancement encoding is first applied to the coordinates of right-angle inflection points. Right-angle inflection point coordinates refer to the center coordinates (x, y) of pixels with an interior angle of 90° or an exterior angle of 90° in the structured semantic annotation. The original coordinates are directly converted from the pixel index. For example, the coordinates of the pixel in the i-th row and j-th column are (j × pixel spacing, i × pixel spacing). The pixel spacing is determined according to the image resolution and the actual scene scale; for example, 1 pixel corresponds to 5mm. Spatial coordinate precision enhancement encoding is a process of correcting the original coordinate error through neighborhood geometric constraints. First, using the original inflection point coordinates as the center, a 3×3 neighborhood of pixels is selected. The gradient direction of the right-angled topological feature pixels within the neighborhood is extracted. The equations of the two straight lines on both sides of the right angle are fitted using the least squares method, such as the horizontal line y=a and the vertical line x=b. The intersection of the lines is the corrected inflection point coordinates (b,a). The correction accuracy can reach within 1 pixel. Subsequently, the corrected 3D coordinates of the inflection point (x,y,0, the initial z coordinate is set to 0 and will be supplemented during subsequent 3D reconstruction), the coordinate correction amount (the difference between the original coordinates and the corrected coordinates), and the neighborhood gradient statistics (variance and mean of the gradient directions within the neighborhood) are mapped into a 64-dimensional high-dimensional feature vector. The mapping process is carried out through... A fully connected layer is used, taking 10-dimensional basic information as input and outputting a 64-dimensional feature vector, ensuring that the geometric information of the inflection point is fully encoded. Finally, this high-dimensional feature vector is stored in a geometric mutation feature tensor, which is a tensor of dimension H×W×64, where H and W are the image height and width. Only the tensor elements at right-angle inflection points are the aforementioned 64-dimensional feature vectors, while the rest are zero vectors, efficiently storing key geometric information. This geometric mutation feature tensor contains three types of core geometric parameters, fully supporting the subsequent Gaussian kernel distribution strategy. The first type is the three-dimensional error ellipsoid parameter of the inflection point spatial coordinates. The three-dimensional error ellipsoid describes the geometric error of the inflection point coordinate measurement. The model's parameters include the major and minor axes, flattening, and spatial orientation. The major and minor axes correspond to the error magnitudes in the x and y directions, respectively. Flattening reflects the anisotropy of the error; flattening = major axis / minor axis. The closer the flattening is to 1, the more uniform the error. Spatial orientation is consistent with the normal vectors on both sides of a right angle, obtained by fitting the error distribution of neighboring pixels using the least squares method, visually presenting the reliability of the inflection point coordinates. The second type is the cosine similarity threshold of the normal vectors of the two walls. The wall normal vector is a unit vector perpendicular to the wall plane, calculated by fitting the pixel gradient direction of the wall region in the structured semantic annotation. The cosine similarity threshold is used to determine whether the two walls are perpendicular. The key indicator is that the cosine similarity of the normal vectors of the two walls of a right-angled component is close to 0, i.e., the included angle is 90°. This threshold is determined by statistically analyzing the normal vector similarity of a large number of standard right-angled components, and is usually set to 0.1. A similarity of less than or equal to 0.1 is considered perpendicular, and a similarity of more than 0.1 is considered non-perpendicular. The third type is the probability distribution histogram of edge entity thickness. Edge entity thickness refers to the actual physical thickness of the edge of the right-angled component, which is extracted through the third channel of structured semantic annotation. The horizontal axis of the probability distribution histogram is the thickness range, and the vertical axis is the pixel ratio of the corresponding range. The peak range is the most likely value of the edge entity thickness, which provides a basis for the subsequent calculation of the forbidden zone radius.
[0022] The final output is a semantic segmentation map labeled with geometric mutation features. The specific process is as follows: First, using the original RGB image as a base, a basic semantic segmentation map is generated by overlaying the three channels of the structured semantic annotation—inner corner, outer corner, and edge thickness—using a pseudo-color overlay method. (Inner corner...) The area is marked in red, with the outer corners... Regions are labeled in blue, and edge thickness is distinguished by color intensity. Subsequently, the core parameters of the geometric mutation feature tensor, including the semi-major axis of the 3D error ellipsoid, the cosine similarity threshold of the normal vector, and the peak range of edge thickness, are embedded as feature labels into the pixel attributes of the basic semantic segmentation map. The attribute fields of each pixel include coordinates, label type, and geometric parameters. Finally, the attributed semantic segmentation map is encoded and stored using an image compression algorithm. During the encoding process, the binary data of the geometric parameters is retained to ensure that the subsequent adaptive kernel distribution control unit can quickly parse and call it. This semantic segmentation map not only intuitively presents the spatial position and type of right-angled components, but also implicitly contains high-precision geometric constraint parameters, providing accurate input basis for the subsequent non-uniform Gaussian kernel distribution strategy.
[0023] After obtaining the semantic segmentation map with geometric mutation feature markers, in order to avoid excessive aggregation of Gaussian kernels at right-angle inflection points, which would lead to blurred reconstruction edges, a forbidden zone needs to be set within the radius of the center of the inflection point. The size and shape of the forbidden zone need to be dynamically adjusted based on the geometric accuracy of the inflection point, the edge thickness, and the relationship between the wall normal vector and the inflection point, rather than using a fixed radius. The specific implementation method is as follows: The adaptive coefficient of the restricted area radius is calculated based on the error ellipsoid parameters in the geometric mutation feature markers. The error ellipsoid parameters are three-dimensional geometric parameters describing the measurement error of the coordinates of the right-angle inflection point, including the major semi-axis (a), the minor semi-axis (b), and the flattening (a / b). The major and minor semi-axis correspond to the error magnitudes of the inflection point in the wall normal direction and tangential direction, respectively. The adaptive coefficient of the restricted area radius is a parameter used to dynamically adjust the basic radius of the restricted area, and its calculation logic is as follows: First, take the average of the major and minor semi-axes of the error ellipsoid, then multiply it by the basic correction factor to obtain the initial coefficient. If the flattening of the error ellipsoid is greater than the initial coefficient, it indicates that the error in a certain direction is significantly larger. In this case, an additional flattening correction factor is applied to avoid the coefficient being too large and causing excessive expansion of the restricted area. Finally, the adaptive coefficient of the restricted radius is determined. For example, for an inflection point error ellipsoid with a=2.5mm, b=1mm, and flattening=2.5, the initial coefficient is 1.2×(2.5+1) / 2=2.1mm. After the flattening correction is added, the coefficient is 2.1×0.9=1.89mm. This coefficient directly determines the basic size of the restricted area. The larger the error, the larger the coefficient, ensuring that the restricted area can cover the possible error area and preventing the core distribution from intruding into the unreliable range of the inflection point accuracy.
[0024] When the edge entity thickness probability distribution histogram shows that the thickness has reached the lower limit, the adaptive coefficient of the forbidden radius decreases linearly. The edge entity thickness probability distribution histogram is a chart that statistically represents the probability distribution of the edge thickness of right-angled components. The horizontal axis represents the thickness range, and the vertical axis represents the pixel percentage of the corresponding range. Its lower limit refers to the minimum thickness value of the peak range in the histogram. This value reflects the minimum physical thickness of the edge entity. The thinner the thickness, the more refined the structure at the inflection point. The forbidden area needs to be reduced to avoid excessive forbidden coverage and insufficient edge core distribution. The specific reduction process is as follows: First, set the base coefficient and the target coefficient corresponding to the lower limit of the thickness. Then, calculate the reduction ratio based on the difference between the current thickness and the lower limit. If the current thickness is exactly equal to the lower limit, the coefficient is directly adjusted to the target coefficient of 1.2mm. If the current thickness is 15mm, the coefficient is calculated as base coefficient - (base coefficient - target coefficient) × (lower limit / current thickness), such as 1.89 - (1.89 - 1.2) × (10 / 1 5) = 1.89 - 0.46 = 1.43 mm, ensuring that the coefficient decreases linearly with the thickness, adapting to edge structures of different fineness. At the same time, combined with the cosine similarity deviation of the normal vectors of the two walls, the forbidden area is expanded in an ellipsoidal space. The cosine similarity deviation of the normal vectors of the two walls refers to the difference between the actual measured cosine similarity of the normal vectors of the two walls and the cosine similarity corresponding to the ideal right angle. The larger the deviation, the more serious the deviation of the actual angle of the wall is from the right angle. The forbidden area needs to be expanded along the deviation direction to cover the angle deviation area. When calculating the deviation, first extract the normal vectors of the two walls from the geometric mutation feature tensor (e.g., wall 1 normal vector n1 = (x1, y1, z1), wall 2 normal vector n2 = (x2, y2, z2)), calculate the cosine similarity between the two (cosθ = |n1·n2| / (|n1|×|n2|)), and the difference between the two and the ideal value 0 is the deviation (e.g., cosθ = 0.1, deviation = 0.1).
[0025] When expanding to an ellipsoidal shape, the center of the inflection point is taken as the center of the ellipsoid, and the forbidden zone is designed as a three-axis ellipsoid. The length of the semi-axis along the right angle bisector is equal to the adaptive coefficient of the forbidden radius × (1 + deviation × 5) (the larger the deviation, the longer the semi-axis; for example, when the deviation is 0.1, the length of the semi-axis is 1.2 × (1 + 0.1 × 5) = 1.8 mm). The length of the semi-axis perpendicular to the two walls is equal to the adaptive coefficient of the forbidden radius (e.g., 1.2 mm). This design makes the extension distance of the forbidden zone along the right angle bisector (1.8 mm) greater than that perpendicular to the wall (1.2 mm). This can cover the unstable area caused by the angle deviation without excessively occupying the effective space of the wall, ensuring that the subsequent Gaussian kernels are only distributed in the stable area of the wall.
[0026] After determining the ellipsoidal forbidden zone at the right-angle inflection point, it is necessary to control the Gaussian kernel distribution density on both sides of the inflection point through gradient control. If a uniform kernel distribution is used, it is easy to lead to insufficient kernel density near the edge of the forbidden zone or excessive density of kernels far from the forbidden zone. Therefore, it is necessary to establish a kernel density decay coordinate system based on the boundary of the forbidden zone and achieve density gradient decay through a negative exponential curve, while adapting to the edge thickness and wall flatness. The specific implementation method is as follows: Based on the defined forbidden zone boundary, a kernel density decay coordinate system is established along the wall normal direction. The forbidden zone boundary refers to the outer surface of the ellipsoidal forbidden zone, which can be calculated using the error ellipsoid parameter and expansion coefficient in the geometric catastrophe feature tensor. The wall normal direction is perpendicular to the wall plane and points outward from the wall. The wall normal vector needs to be extracted from the geometric catastrophe feature markers. For example, the wall normal vector n=(0,0,1) represents that the wall is perpendicular to the z-axis and the normal direction is along the positive z-axis. This ensures that the coordinate system can accurately reflect the distance relationship between the kernel and the forbidden zone. When establishing the coordinate system, the inflection point forbidden zone is used as the reference point. The point on the outer edge closest to the wall is designated as the origin (point O). The x-axis is set outward along the wall normal, away from the forbidden zone; the y-axis is set outward along the wall tangent, parallel to the wall edge; and the z-axis is set outward along another wall tangent, perpendicular to the y-axis. This forms a three-dimensional rectangular coordinate system. The coordinates (x, y, z) of each point in the coordinate system directly correspond to the spatial position of the core. The x-value represents the distance between the core and the outer edge of the forbidden zone. x=0 is the origin, x>0 is away from the forbidden zone, and x<0 is within the forbidden zone. This provides an intuitive distance basis for subsequent density decay calculations.
[0027] The Gaussian kernel distribution density is controlled using a negative exponential density decay curve. A negative exponential density decay curve refers to a curve where the kernel density gradually decreases exponentially with increasing x-value. Its core advantage is maintaining a high kernel density near the forbidden zone to ensure clear edge details, while gradually reducing density in areas far from the forbidden zone to avoid kernel redundancy. The specific implementation process is as follows: First, set the initial density (density at x=0, e.g., 5 nuclei per cubic millimeter) and the attenuation coefficient (preset to 0.2 to control the attenuation rate). The density calculation formula is: Current density = Initial density × e is a natural constant. This gradient distribution ensures that there are enough kernels to support the detailed reconstruction in the edge regions, while avoiding excessive density of kernels in distant areas, which would increase the computational burden.
[0028] The decay rate of this curve is strongly correlated with the probability distribution of edge entity thickness. That is, when the thickness reaches the lower limit, the decay rate increases to enhance edge sharpness. The decay rate refers to the decay coefficient in the negative exponential curve that controls the rate of density decrease. The thinner the edge entity, the finer the wall edge. It is necessary to increase the decay rate to make the kernel density near the forbidden zone quickly concentrate, enhance the edge sharpness, and avoid edge blurring. The specific correlation process is as follows: The peak range of the current thickness is extracted from the histogram of the probability distribution of edge entity thickness. A mapping relationship between thickness and attenuation rate is established. When the thickness reaches the lower limit, the attenuation rate increases to 0.3, which is higher than the base attenuation rate of 0.2. At this time, the density at x=0 is still 5 particles / mm³. When x=2mm, the density = 5×e^(-0.3×2) = 5×0.55 = 2.75 particles / mm³. The density decreases faster, and the nuclei near the forbidden zone are more concentrated. When the thickness is 15mm (normal thickness), the attenuation rate maintains the base value of 0.2. When the thickness is 20mm... When the thickness is m (thick edge), the attenuation rate decreases to 0.15, and the density decreases more slowly, ensuring that the thick edge region has sufficient core coverage for a larger area, balancing the core distribution needs of edges with different thicknesses. Simultaneously, a wall surface flatness compensation factor is introduced. If a slight curvature is detected on the wall surface, the attenuation rate is automatically reduced to avoid core distribution discontinuities. The wall surface flatness compensation factor is a parameter used to correct the attenuation rate. When a slight curvature exists on the wall surface, if the original attenuation rate is still applied, the core density in the curved area may be too low, leading to discontinuities. Therefore, the attenuation rate needs to be reduced to slow down the density decrease. The specific implementation process is as follows: First, the flatness of the wall surface is detected. The three-dimensional coordinates (x, y, z) of the pixels in the wall area are extracted from the semantic segmentation map. A 10×10mm neighborhood of pixels is selected, and the plane equation is fitted using the least squares method. The deviation between the z coordinate of each pixel in the neighborhood and the fitted plane is calculated. If the maximum deviation is greater than 0.5mm, it is determined that there is micro-curvature, and the compensation mechanism is activated. During compensation, the wall flatness compensation factor is set to 0.85, which is less than 1. The current attenuation rate is multiplied by the compensation factor to obtain the corrected attenuation rate. After correction, when x=2mm, the density is 5×e^(-0.255×2)=5×0.59=2.95 particles / mm³. The density decrease is slowed down, avoiding a sudden drop in kernel density in curved areas due to a rapid increase in x value, and ensuring that the overall kernel distribution of the wall surface is continuous and without discontinuity.
[0029] After completing the kernel density gradient distribution design, the traditional isotropic Gaussian kernel (spherical kernel) cannot adapt to the planar structure of the wall. The spherical kernel has the same coverage in the normal direction and tangential direction of the wall, which can easily lead to over-extension of the kernel in the normal direction or insufficient coverage in the tangential direction. Therefore, it is necessary to generate a directionally constrained Gaussian kernel, i.e., an ellipsoidal anisotropic kernel, based on the wall normal vector, so that the shape of the kernel is precisely matched with the wall structure. The specific implementation method is as follows: Based on the wall normal vector data in the geometric mutation feature markers, the isotropic Gaussian kernel is reconstructed into an ellipsoidal anisotropic kernel. An isotropic Gaussian kernel is a spherical kernel with the same radius in all directions in space, while an ellipsoidal anisotropic kernel is an ellipsoidal kernel with different radii in different directions. Its shape is determined by the wall normal vectors. The core principle is to make the kernel cover a wider area in the tangential direction of the wall to adapt to the wall's planar extension, and to be more compact in the normal direction to avoid exceeding the wall thickness. The specific reconstruction process is as follows: First, extract the normal vector of the current wall from the geometric mutation feature tensor, such as n=(0,0,1), representing the wall being perpendicular to the z-axis with the normal direction along the z-axis. Determine the three principal axes of the ellipsoid: the major axis direction is forced to be consistent with the normal vector direction, the z-axis and the two minor axes are along the tangent directions of the wall, and the x-axis and y-axis are perpendicular to the normal vector. Then, decompose the radius of the spherical kernel into the major axis radius and the minor axis radius to complete the reconstruction from the sphere to the ellipsoid. For example, if the original spherical kernel radius is 1mm, the reconstructed major axis radius is set to 0.8. mm, more compact along the normal direction, with a minor axis radius set to 1.2 mm, wider along the tangent direction, forming an ellipsoidal anisotropic kernel adapted to the wall surface structure, ensuring that the kernel is distributed only in the effective area of the wall surface and does not extend excessively into the normal direction. Its principal axis direction is forcibly locked to the normal vector direction, the major axis radius is compressed according to the kernel density decay curve, and the minor axis radius is proportional to the confidence level of the extracted edge heatmap. The forced locking of the principal axis direction is achieved through the kernel's direction matrix, setting the major axis direction vector of the ellipsoidal anisotropic kernel to... The unit vector is the wall normal vector. If the normal vector n = (0,0,1), then the major axis direction vector is (0,0,1). During kernel generation, regardless of the wall position, the major axis direction always remains consistent with the normal vector, ensuring that the kernel direction is strictly aligned with the wall structure. The major axis radius is compressed according to the kernel density decay curve, meaning that the major axis radius decreases as the x value (distance from the forbidden zone) increases according to the decay curve. The density decay ratio corresponding to the current x value is extracted from the kernel density decay curve and multiplied by this ratio to obtain the current major axis radius. For example, when x = 2mm, the major axis radius = 0.8 × 0.67 = 0.536mm, making the kernel more compact in areas far from the forbidden zone, adapting to the need for density reduction. The minor axis radius is proportional to the edge heatmap confidence. The edge heatmap confidence refers to the pixel value (0-255) of the current kernel position in the edge heatmap output by the second branch. The higher the confidence, the clearer the right-angle edge at that position, and the minor axis radius needs to be increased to improve texture continuity. The specific proportional relationship is as follows: A confidence level of 255 (highest) corresponds to a minor axis radius of 1.5mm, and a confidence level of 0 corresponds to a minor axis radius of 0.8mm. The current minor axis radius = 0.8 + (1.5 - 0.8) × (current confidence level / 255). For example, with a current confidence level of 200, the minor axis radius = 0.8 + 0.7 × (200 / 255) = 0.8 + 0.55 = 1.35mm. This ensures that the kernel in areas with clear edges can better cover texture details. When the edge heatmap shows clear texture edges, the minor axis radius is expanded to improve texture continuity. The criterion for clear texture edges is an edge heatmap confidence level ≥ 200 (high confidence range). These areas are mostly the boundaries between walls and attachments, and the clear outlines of right-angled components. The minor axis radius needs to be expanded to allow the coverage of adjacent kernels to overlap more, avoiding texture breaks. The specific expansion process is as follows: First, set a confidence threshold (200). If the confidence of the current kernel position is greater than or equal to 200, then add an expansion coefficient (0.2-0.3) to the original minor axis radius. For example, if the original minor axis radius is 1.35mm, the expanded value is 1.35 + 0.25 = 1.6mm. At the same time, the center spacing between adjacent kernels is set to 0.8 times the minor axis radius (e.g., if the radius is 1.6mm, the spacing is 1.6 × 0.8 = 1.28mm). This ensures that the overlap rate of the coverage area of adjacent kernels in the tangential direction is greater than or equal to 20%, forming a continuous texture coverage. If the confidence is less than 200 (texture blurry area), then the minor axis radius is not expanded, and only the basic value is maintained to balance texture continuity and kernel distribution efficiency. Through this directional constraint and dynamic radius adjustment, the generated Gaussian kernel can adapt to the planar structure of the wall and accurately respond to the texture clarity, providing a guarantee for the geometric accuracy and texture quality of subsequent 3D reconstruction.
[0030] Specific Implementation Methods for Gaussian Kernel Segmentation, Cartesian Coplanarity Loss Function Construction, and Assisted Gaussian Kernel Implantation: I. Specific Implementation Method for Automatically Segmenting the Gaussian Kernel into Two Independent Sub-Kernels and Resetting Texture Weights: After generating the directional constraint Gaussian kernel and distributing the gradient decay kernel density, if the Gaussian kernel coverage area crosses the texture boundary defined by the semantic segmentation map, it can easily lead to texture mixing on both sides of the wall, affecting the texture accuracy of the reconstructed model. Therefore, automatic segmentation needs to be achieved through kernel voxel partitioning, and texture weight reset mechanism should be used to avoid texture interference in overlapping areas. The specific implementation method is as follows: When a Gaussian kernel coverage area is detected to cross a texture boundary defined by the semantic segmentation map, the definition of the texture boundary must first be clarified. This boundary is the dividing line between different material regions in the semantic segmentation map. The edge pixel values will be labeled with the boundary normal vector, which is perpendicular to the boundary tangent direction. The specific process of detecting the crossing is as follows: From the GPU computation pipeline of the parallel texture processing unit, the spatial bounding box parameters of the current Gaussian kernel are retrieved. Taking the center of the ellipsoidal anisotropic kernel as the origin, the ranges of xmin / xmax, ymin / ymax, and zmin / zmax are determined by the radii of the major and minor axes. Simultaneously, the 3D coordinates of the texture boundary corresponding to this spatial range are extracted from the semantic segmentation map. Through the mapping relationship between pixel coordinates and 3D spatial coordinates, if the bounding box of the Gaussian kernel intersects with the texture boundary (i.e., the boundary line passes through the interior of the bounding box), it is determined that the kernel crosses the texture boundary. In this case, kernel voxel partitioning is performed using the boundary normal plane as the segmentation surface. The boundary normal plane is a plane that passes through the texture boundary and whose normal vector is consistent with the boundary normal vector. Its plane equation is obtained by fitting the 3D coordinates of three consecutive pixels on the boundary. Therefore, kernel voxel partitioning discretizes the ellipsoidal anisotropic kernel into tiny voxel units of 0.1mm × 0.1mm × 0.1mm. Each voxel unit is assigned to a region by substituting it into the plane equation. If Ax + By + Cz + D < 0, the voxel belongs to wall A on one side of the texture boundary; if Ax + By + Cz + D > 0, the voxel belongs to wall B on the other side. After partitioning, the voxels on the same side are re-aggregated to generate two independent sub-kernels, sub-kernel A and sub-kernel B. Each sub-kernel retains the orientation parameters of the original kernel, including the principal axis direction and the major / minor axis radii, only its volume is reduced proportionally to the number of voxels. At the same time, they are bound to the texture ID of the corresponding wall. For example, sub-kernel A is bound to the texture data of wall A, and sub-kernel B is bound to the texture data of wall B, ensuring that the texture of the sub-kernel strictly matches the texture of the wall to which it belongs.
[0031] The implementation of the texture weight zeroing mechanism needs to avoid texture mixing in the overlapping areas of sub-kernels. Its criteria revolve around the spatial overlap rate and the kernel density threshold. The spatial overlap rate refers to the proportion of voxels overlapping between the segmented sub-kernel and the original Gaussian kernel to the total number of voxels in the original kernel. For example, if the original kernel contains 1000 voxels, and sub-kernel A overlaps with the original kernel by 800 voxels, the overlap rate is 80%. The current site kernel density threshold is the upper limit of the Gaussian kernel distribution density at that spatial location. For example, based on the gradient decay curve, the current site density threshold is 5 kernels per cubic millimeter, corresponding to an overlap rate threshold of 30%. That is, an overlap rate exceeding 30% easily leads to excessive texture mixing. The specific implementation process is as follows: First, the spatial overlap rate between each sub-kernel and the original kernel is calculated. If the overlap rate of a sub-kernel exceeds the kernel density threshold at the current site, the texture blending weight of the overlapping area in that sub-kernel is reduced to zero. The texture blending weight is a parameter that controls the contribution of the sub-kernel texture to the reconstruction model. A weight of 1 represents complete contribution, and 0 represents no contribution. After the overlap area weight is cleared to zero, the region is contributed solely by the texture of the other sub-kernel, avoiding blurring due to the mixing of two textures. At the same time, the width of the zeroing region is adjusted according to the minor axis radius of the ellipsoidal anisotropic kernel. The minor axis radius reflects the coverage range of the kernel in the tangential direction of the wall. The larger the minor axis radius, the wider the zeroing region becomes, ensuring that the zeroing region can completely cover the overlapping area without affecting the texture continuity of the non-overlapping area. For example, for a sub-kernel with a minor axis radius of 1.2 mm, when the overlap rate exceeds the threshold, the width of the zeroing region is set to 0.24 mm, extending along the texture boundary into the sub-kernel to accurately eliminate interference from overlapping textures.
[0032] While ensuring accurate Gaussian kernel segmentation and reasonable texture weight control, if the Gaussian kernels on both sides of a right angle have a coplanar deviation, it will cause the reconstructed right-angled component to be distorted. Therefore, it is necessary to construct a right-angle coplanarity loss function, and through real-time detection and iterative correction, ensure that the spatial position of the kernel satisfies the right-angle constraint. The specific implementation method is as follows: The construction of the rectangular coplanarity loss function begins with the real-time calculation of the principal axis direction vector of the ellipsoidal anisotropic kernel. The principal axis direction vector is the unit vector along the major axis of the ellipsoidal anisotropic kernel, which is consistent with the direction of the wall normal vector. Its extraction process is as follows: From the kernel parameters output by the adaptive kernel distribution control unit, the major axis direction parameter of each ellipsoidal anisotropic kernel is retrieved. This parameter is then normalized by dividing by the vector magnitude to obtain the unit vector of the principal axis direction, ensuring the vector length is uniformly 1 for subsequent calculations. The kernels are distinguished by the wall IDs in the semantic segmentation graph. If two adjacent kernels are located on opposite walls at a right angle (e.g., kernel 1 belongs to wall A, kernel 2 belongs to wall B), and the two walls are labeled as being at a right angle, then the magnitude of the cross product of the principal axis direction vectors of the two kernels is calculated. The magnitude of the cross product reflects the relationship between the two kernels. The perpendicularity of vectors: In an ideal right angle, the normal vectors of the two walls are perpendicular. The magnitude of the cross product equals the product of the magnitudes of the two vectors. Due to vector normalization, the product of the magnitudes is 1. The preset right angle reference value, which is the cross product magnitude value in an ideal right angle, is set to 1. The actual calculated cross product magnitude is compared with the reference value. If the magnitude is less than 0.9 (threshold, representing that the angle between the two vectors deviates from 90° by more than 6°), it is determined that there is a coplanar deviation between the two kernels, triggering the calculation of the loss function. The loss value = reference value - actual cross product magnitude. The larger the loss value, the more serious the deviation.
[0033] Coplanar deviation detection is achieved through a projective geometric coplanarity checker. This checker is a functional module based on the principle of projective geometry to verify whether the kernel center points are coplanar. First, the projection parameters are determined, with the center of the forbidden zone at the inflection point as the projection origin. The coordinates of the forbidden zone center are extracted from the geometric mutation feature tensor. The right-angle theoretical plane refers to a plane constructed based on the ideal geometric shape of the right-angle component. Through the ideal right-angle sides of the center of the forbidden zone at the inflection point and the two side walls, a plane z=Oz is fitted. Assuming that the right angle lies in the xy plane, this plane represents the geometric plane that the right-angle component should have. The projection process is as follows: The Gaussian kernel center points on both walls, such as kernel 1 center point (x1, y1, z1) on wall A and kernel 2 center point (x2, y2, z2) on wall B, are projected onto the right-angled theoretical plane along the line connecting the projection origin and the kernel center point. This results in projection points, such as (x1', y1', Oz) for kernel 1 and (x2', y2', Oz) for kernel 2. The projection coordinates are calculated using the principle of similar triangles, e.g., x1' = Ox + (x1 - Ox) × (Oz - Oz) / (z1 - Oz). After simplification, x1' = x1 and y1' = y1. Since the theoretical plane z = Oz, actual projection requires correction based on camera intrinsic and extrinsic parameters to ensure accurate projection relationships. When the angle between the line connecting the projection points and the theoretical right-angled side deviates from a threshold, iterative kernel position migration based on the kernel density decay coordinate system is triggered. The theoretical right-angled side refers to the right-angled theoretical... The ideal right-angled side in the plane is defined as follows: the side along the x-axis is theoretical side 1, and the side along the y-axis is theoretical side 2. The angle between the line connecting the projection points, such as the line connecting the projection points of kernel 1 and kernel 2, and the theoretical right-angled side is calculated. If the angle deviates from the preset threshold, iterative migration is initiated. The migration coordinate system adopts the kernel density decay coordinate system established earlier. The x-axis is along the wall normal direction, and the y-axis and z-axis are along the wall tangent direction. The migration object is the kernel on the deviation side. The migration step size is determined according to the loss value. The center coordinates of the kernel are adjusted along the x-axis direction (normal direction). After each migration, the angle between the cross product modulus of the principal axis vector and the projection is recalculated. If the angle is less than or equal to the threshold and the loss value is less than 0.05, the migration stops. If the standard is not met after 5 iterations, the step size is increased to 0.2mm and the migration continues until the right-angle constraint is met, ensuring that all kernel center points are in the theoretical plane and eliminating coplanar deviation.
[0034] After optimizing the kernel position and improving geometric accuracy through the right-angle coplanarity loss function, the edge region of the component may have a sparse Gaussian kernel distribution due to low confidence in the edge heatmap and a high risk of coplanar deviation, which in turn affects the edge resolution of the reconstructed model. Therefore, it is necessary to implant an auxiliary Gaussian kernel and optimize its spatial coordinates to fill the gaps in edge details. The specific implementation method is as follows: The triggering condition for implanting the auxiliary Gaussian kernel requires the simultaneous fulfillment of two prerequisites: low confidence in the edge heatmap and a high deviation risk zone. Both are indispensable. The edge heatmap confidence is the numerical value (0-255) of the component edge pixels in the edge heatmap output by the second branch. The threshold is determined statistically through a large number of reconstructed samples. Values below this indicate blurred edge textures and sparse kernel distribution. If the confidence of a certain point is less than 150, it is marked as a low-confidence edge. The high deviation risk zone is the area where, in the projection geometric coplanarity verification, the projection angle of the kernel center point deviates from the threshold but does not meet the iterative migration standard. The verifier will label the region with a high-bias risk label. When a site is simultaneously labeled as a low-confidence edge and a high-bias risk area, the auxiliary kernel implantation program will be automatically started. The implantation position is the 3D spatial coordinates corresponding to the edge pixels of the site. Through the pixel and spatial mapping relationship transformation of the semantic segmentation map, the initial parameters of the auxiliary kernel inherit the direction parameters of the surrounding normal kernel. The principal axis direction is consistent with the wall normal vector, the major axis radius is 0.8 times the major axis radius of the surrounding kernel, and the minor axis radius is 0.8 times the minor axis radius of the surrounding kernel, to ensure that the auxiliary kernel is morphologically compatible with the surrounding kernel and avoid abruptness.
[0035] The spatial coordinate optimization of the auxiliary kernel employs edge pixel back-projection closed-loop calibration. This calibration method ensures precise matching between the texture of the auxiliary kernel and the edge pixels of the input image. First, the texture boundary coordinates of the segmented sub-kernels are inversely projected onto the input image. The sub-kernel texture boundary coordinates are the 3D coordinates of the texture boundaries of the segmented sub-kernels surrounding the auxiliary kernel. Then, the color gradient residual between the edge pixels and the projection position is calculated. The edge pixels are the true edge pixels of the region extracted from the input image using the Canny edge detection algorithm. The color gradient residual is the sum of the RGB gradient differences between the edge pixels and the pixels at the projection position. Finally, the three-dimensional coordinates of the auxiliary kernel are adjusted by the minor axis radius of the ellipsoidal anisotropic kernel. The auxiliary kernel covers the area along the tangent direction of the wall. The larger the minor axis radius, the larger the adjustment step size. The adjustment direction is determined according to the source of the residual. If the residual mainly originates from the x-direction and the projection position is biased to the left, the center coordinates of the auxiliary kernel are adjusted along the x-axis. If it originates from the z-direction and the projection position is biased to the top, it is adjusted along the z-axis. After each adjustment, the projection position and residual are recalculated. If the residual is less than 0.1 (convergence threshold, indicating that the color matching accuracy meets the standard), the adjustment is stopped. If the residual still does not converge after 10 iterations, the step size is increased by 1.2 times to continue optimization until the residual converges. Finally, the spatial coordinates of the auxiliary kernel that accurately matches the edge of the input image are obtained, filling the gaps in the edge kernel distribution and improving the edge resolution of the reconstruction model.
[0036] The second objective of this invention is to provide a system for implementing a 3D building reconstruction method based on 3D Gaussian sputtering, comprising: Building construction semantic parsing unit 1 integrates a dual-channel edge gradient collaborative perception network and a geometric mutation feature fusion unit. It takes the original image as input and outputs a semantic segmentation map carrying a geometric mutation feature tensor. This tensor includes error ellipsoid parameters, wall normal vector threshold, and edge thickness probability distribution histogram. The adaptive kernel distribution control unit 2 receives the geometric abrupt change feature markers of the semantic segmentation map, establishes an ellipsoidal spatial expansion forbidden zone at the right angle inflection point and calculates the forbidden radius adaptive coefficient, and simultaneously generates a kernel density decay coordinate system to drive a negative exponential density decay curve. At the same time, it reconstructs the isotropic Gaussian kernel into an ellipsoidal anisotropic kernel with compressed major axis radius and expanded minor axis radius with edge heatmap confidence. Parallel texture processing unit 3 deploys a texture boundary verification module in the GPU computing pipeline. When an ellipsoidal anisotropic kernel is detected to cross the semantic segmentation boundary, it triggers kernel voxel partitioning to generate sub-kernels bound to independent texture channels, and implements a texture weight clearing mechanism based on the comparison between spatial overlap rate and kernel density threshold. The geometric accuracy enhancement unit 4 has a built-in projection geometric coplanarity checker that calculates the cross product modulus of the principal axis vector of the ellipsoidal anisotropic kernel in real time. It triggers iterative kernel position migration with the center of the forbidden area as the projection origin. At the same time, it starts the auxiliary kernel implantation program based on the confidence level of the edge heatmap and the risk of coplanar deviation. It optimizes the spatial coordinates of the auxiliary kernel through closed-loop calibration by back-projection of edge pixels until the color gradient residual converges.
[0037] This invention identifies right-angled building components through a dual-channel network, outputs a semantic segmentation map with geometric abrupt changes, generates a non-uniform Gaussian kernel distribution, includes ellipsoidal forbidden zones with right-angle inflection points and gradient decay kernel density along the wall normal direction, reconstructs isotropic kernels into ellipsoidal anisotropic kernels aligned with the normal direction, establishes independent texture channels, segments cross-plane Gaussian kernels and clears the texture weights in overlapping areas, introduces a right-angle coplanarity loss function to correct kernel coplanarity bias, implants auxiliary kernels in low-confidence, high-bias regions at the edges, and optimizes coordinates through back-projection calibration. The system includes semantic parsing of building components, adaptive kernel distribution control, parallel texture processing, and geometric accuracy enhancement units, ultimately outputting a high-precision reconstruction model with right-angle distortion-free and high edge resolution, suitable for the reconstruction of architectural construction drawings.
[0038] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely preferred examples and are not intended to limit the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the present invention as claimed. The scope of protection of the present invention is defined by the appended claims and their equivalents.
Claims
1. A method for three-dimensional reconstruction of buildings based on 3D Gaussian sputtering, characterized in that: Includes the following steps: S1. Identify the right-angled component regions of buildings in the input image through a deep learning model, including the precise outline boundaries of wall corners and door and window frames, and output a semantic segmentation map with geometric abrupt feature markers; S2. For the right-angle component regions marked in the semantic segmentation graph, generate a non-uniform Gaussian kernel distribution strategy, including prohibiting Gaussian kernel distribution within the radius of the center of the right-angle inflection point, and implementing a gradient decay kernel density strategy in the region extending along the normal direction of the walls on both sides of the inflection point. At the same time, replace the isotropic Gaussian kernel with a direction-constrained Gaussian kernel, that is, the kernel principal axis direction is forcibly aligned with the wall normal. S3. Establish independent texture mapping channels for the two walls on both sides of the right-angle component. Add a texture boundary verification module in GPU parallel computing. When the Gaussian kernel coverage area crosses the two walls, automatically divide the Gaussian kernel into two independent sub-kernels and bind them to the corresponding wall textures. Implement a texture weight clearing mechanism for the overlapping area of the sub-kernels. S4. Introduce a right-angle coplanarity loss function based on projection geometry to detect the coplanar deviation of the center points of the Gaussian kernels on both sides of the right angle in real time. If the angle between the normal vectors of adjacent Gaussian kernels deviates from the preset angle range, iterative kernel position correction is triggered until the right-angle constraint is met. S5. An auxiliary Gaussian kernel is implanted within a fixed range at the edge of the component. The spatial coordinates of the auxiliary kernel are optimized by back-projection of edge pixels. Finally, a reconstruction model that satisfies the right angle deviation and edge resolution is output.
2. The method for three-dimensional reconstruction of buildings based on 3D Gaussian sputtering according to claim 1, characterized in that: The specific steps of identifying right-angled building component regions in the input image using a deep learning model include: A dual-channel edge gradient collaborative perception network is constructed. The first branch uses an adaptive pane convolution kernel to extract pixel-level right-angle topological features, with the pane size matching the building texture scale. The second branch separates the wall body from the attachments through a multispectral reflectance analysis module and outputs an edge heatmap. Finally, a geometric mutation feature fusion device is used to concatenate the feature tensors output by the two branches with the original RGB image. The resulting structured semantic annotations, including interior and exterior 90-degree angles and edge entity thickness, are generated through a 3D convolutional layer.
3. The method for three-dimensional reconstruction of buildings based on 3D Gaussian sputtering according to claim 2, characterized in that: The output semantic segmentation map with geometric mutation feature markers specifically includes: Based on the structured semantic annotation, spatial coordinate precision enhancement encoding is performed on the coordinates of right-angle inflection points, which are then mapped into high-dimensional feature vectors and stored in a geometric mutation feature tensor. This tensor contains the three-dimensional error ellipsoid parameters of the inflection point spatial coordinates, the cosine similarity threshold of the normal vectors of the two side walls, and the probability distribution histogram of the edge entity thickness. Finally, a semantic segmentation map with geometric mutation feature labels is output.
4. The method for three-dimensional reconstruction of buildings based on 3D Gaussian sputtering according to claim 1, characterized in that: The prohibition of Gaussian kernel distribution within the radius of the center of the right-angle inflection point specifically includes: The adaptive coefficient of the forbidden radius is calculated based on the error ellipsoid parameter in the geometric mutation feature marker. When the thickness probability distribution histogram of the edge entity shows that the thickness reaches the lower limit, the adaptive coefficient of the forbidden radius is reduced linearly. At the same time, combined with the cosine similarity deviation of the normal vectors of the two walls, the forbidden area is expanded in an ellipsoidal space so that the forbidden area extends a greater distance along the right angle bisector than the direction perpendicular to the wall.
5. The method for three-dimensional reconstruction of buildings based on 3D Gaussian sputtering according to claim 1, characterized in that: The gradient decay kernel density strategy specifically includes: Based on the defined no-distribution zone boundary, a kernel density decay coordinate system is established along the wall surface normal direction. With the outer edge of the no-distribution zone at the inflection point as the origin, a negative exponential density decay curve is used to control the Gaussian kernel distribution density. The decay rate of this curve is strongly correlated with the probability distribution of the edge entity thickness. That is, when the thickness reaches the lower limit, the decay rate increases to enhance the edge sharpness. At the same time, a wall surface flatness compensation factor is introduced. If a slight curvature is detected on the wall surface, the decay rate is automatically reduced to avoid kernel distribution faults.
6. The method for three-dimensional reconstruction of buildings based on 3D Gaussian sputtering according to claim 1, characterized in that: The generation of the direction-constrained Gaussian kernel specifically includes: Based on the wall normal vector data in the geometric mutation feature markers, the isotropic Gaussian kernel is reconstructed into an ellipsoidal anisotropic kernel, with its principal axis direction forcibly locked to the normal vector direction. The major axis radius is compressed according to the kernel density decay curve, while the minor axis radius is proportional to the confidence level of the extracted edge heatmap. When the edge heatmap shows clear texture edges, the minor axis radius is expanded to improve texture continuity.
7. The method for three-dimensional reconstruction of buildings based on 3D Gaussian sputtering according to claim 1, characterized in that: The operation of automatically dividing the Gaussian kernel into two independent sub-kernels specifically includes: When a Gaussian kernel coverage area is detected to cross the texture boundary defined by the semantic segmentation map, kernel voxel partitioning is performed using the boundary method plane as the segmentation plane to generate sub-kernels belonging to the two side walls respectively. The implementation criteria for the texture weight zeroing mechanism are as follows: If the spatial overlap rate between the sub-kernel and the original kernel after segmentation exceeds the current site kernel density threshold, the texture blending weight of the overlapping area is reduced to zero, and the width of the zeroing region is adjusted according to the minor axis radius of the ellipsoidal anisotropic kernel.
8. The method for three-dimensional reconstruction of buildings based on 3D Gaussian sputtering according to claim 1, characterized in that: The method for constructing the right-angle coplanarity loss function is as follows: The principal axis direction vector of the ellipsoidal anisotropic kernel is calculated in real time. If two adjacent kernels are located on the right-angled walls, the magnitude of the cross product of their principal axis vectors is compared with the preset right-angled reference value. The coplanar deviation detection is achieved through a projection geometric coplanarity checker. The center of the inflection point forbidden zone is used as the projection origin. The center points of the Gaussian kernels on both sides are projected onto the right-angled theoretical plane. When the angle between the line connecting the projection points and the theoretical right-angled side deviates from the threshold, iterative kernel position migration based on the kernel density decay coordinate system is triggered.
9. The method for three-dimensional reconstruction of buildings based on 3D Gaussian sputtering according to claim 1, characterized in that: The triggering condition for the implanted auxiliary Gaussian kernel is: When the edge heatmap confidence of a component edge in the semantic segmentation image is lower than a set threshold, and the site is marked as a high-risk area for deviation in the projection geometric coplanarity verification, the implantation procedure is initiated. The spatial coordinate optimization of the auxiliary kernel adopts edge pixel back projection closed-loop calibration, which includes back-projecting the texture boundary coordinates of the segmented sub-kernels to the input image, calculating the color gradient residual between the edge pixels and the projection position, and adjusting the three-dimensional coordinates of the auxiliary kernel through the minor axis radius of the ellipsoidal anisotropic kernel until the residual converges.
10. A system for implementing a 3D building reconstruction method based on 3D Gaussian sputtering as described in any one of claims 1-9, characterized in that, include: The building construction semantic parsing unit (1) integrates a dual-channel edge gradient collaborative perception network and a geometric mutation feature fusion device. It inputs the original image and outputs a semantic segmentation map carrying a geometric mutation feature tensor. This tensor contains error ellipsoid parameters, wall normal vector threshold, and edge thickness probability distribution histogram. The adaptive kernel distribution control unit (2) receives the geometric mutation feature markers of the semantic segmentation map, establishes an ellipsoidal spatial expansion forbidden zone at the right angle inflection point and calculates the forbidden radius adaptive coefficient, synchronously generates the kernel density decay coordinate system to drive the negative exponential density decay curve, and reconstructs the isotropic Gaussian kernel into an ellipsoidal anisotropic kernel with compressed major axis radius and expanded minor axis radius with edge heatmap confidence. The parallel texture processing unit (3) deploys a texture boundary verification module in the GPU computing pipeline. When it detects that the ellipsoidal anisotropic kernel crosses the semantic segmentation boundary, it triggers the kernel voxel partitioning to generate sub-kernels that are bound to independent texture channels, and implements a texture weight clearing mechanism based on the comparison between the spatial overlap rate and the kernel density threshold. The geometric accuracy enhancement unit (4) has a built-in projection geometric coplanarity checker that calculates the cross product modulus of the principal axis vector of the ellipsoidal anisotropic kernel in real time. It triggers iterative kernel position migration with the center of the forbidden area as the projection origin. At the same time, it starts the auxiliary kernel implantation program based on the confidence level of the edge heat map and the risk of coplanar deviation. It optimizes the spatial coordinates of the auxiliary kernel through closed-loop calibration of edge pixel back projection until the color gradient residual converges.
Citation Information
Patent Citations
Three-dimensional Gaussian sputtering scene reconstruction method based on structure perception refined Gaussian
CN120655860A
Explicit volume rendering primitive densification method based on detail perception gradient
CN120976400A
Cross-source data three-dimensional reconstruction method and system based on improved Gaussian sputtering
CN120976449A
3DGS segmentation method and system based on boundary adaptive Gaussian splitting
CN121074068A
3D gaussian diffusion for single-view reconstruction
US20250285236A1
