Automatic generation method of building component three-dimensional model for architectural design
By using a dynamic time warping algorithm to analyze the light and shadow coexistence region and weighted fuse point cloud data during the construction of 3D models of building components, the problems of data redundancy and inconsistency caused by the angle deviation of multi-source scanning equipment are solved, thereby improving the accuracy and completeness of the model.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- XUZHOU COLLEGE OF INDAL TECH
- Filing Date
- 2025-07-24
- Publication Date
- 2026-04-24
AI Technical Summary
When constructing 3D models of architectural components with raised or recessed areas and complex textures, existing technologies suffer from data redundancy and inconsistency due to angular deviations in multi-source 3D scanning equipment, which affects the accuracy and integrity of the model.
By acquiring point clouds and images of target building components at multiple acquisition locations, a dynamic time warping algorithm is used to perform regional similarity analysis, identify areas of light and shadow coexistence, calculate the regional similarity index, and then perform weighted fusion of the point cloud data based on this to construct a 3D model.
It improves the accuracy and integrity of 3D models, reduces the impact of data differences caused by sampling angle deviations, and ensures that there are no artifacts or breaks on the model surface.
Smart Images

Figure CN120912773B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of 3D model construction technology, specifically to a method for automatically generating 3D models of building components for architectural design. Background Technology
[0002] The construction of 3D models of building components relies on the collaborative application of parametric design, building information modeling (BIM) technology, reverse engineering, and professional modeling software. This not only significantly improves design efficiency and quality and strengthens communication and collaboration among all parties, but also provides strong support for design innovation and optimization, powerfully driving the construction industry towards intelligence and automation, and achieving transformation and upgrading.
[0003] Currently, for architectural components with raised or recessed areas and complex textures, such as reliefs, multiple 3D scanning devices are typically used for scanning. In practice, corner features are extracted from the scan data of adjacent 3D scanning devices to complete the global reconstruction of the architectural component.
[0004] However, when different 3D scanning devices collect data from the same location, duplicate data acquisition often occurs, resulting in data redundancy. Furthermore, due to variations in the acquisition angles of different 3D scanning devices, discrepancies also arise between these redundant data points. These discrepancies lead to poor matching of data acquired by different 3D scanning devices, ultimately resulting in low accuracy of the 3D models of building components. Summary of the Invention
[0005] This invention provides an automated method for generating 3D models of building components for architectural design, which can improve the accuracy of 3D models of building components.
[0006] A first aspect of this invention provides a method for automatically generating three-dimensional models of building components for architectural design, comprising:
[0007] Acquire point clouds and images of the target building components at multiple acquisition locations;
[0008] Based on the pixel features in the component images, a dynamic time warping algorithm is used to perform regional similarity analysis between component images to obtain the regional similarity index of component images at adjacent acquisition locations.
[0009] Based on the regional similarity index, the component point clouds at adjacent collection locations are weighted and fused to obtain fused point cloud data.
[0010] A 3D model of the target building component is constructed based on fused point cloud data.
[0011] Furthermore, this invention proposes to perform regional similarity analysis between component images based on pixel features in the component images, using a dynamic time warping algorithm to obtain a regional similarity index of component images at adjacent acquisition locations, including:
[0012] For each component image, the regional shadow contour index of each image region in the component image is determined based on the pixel features in the component image;
[0013] Based on the regional shadow contour index of each image region in the component image, the light and shadow coexistence region in the component image is determined. The light and shadow coexistence region is the region formed by the texture protrusion region and the corresponding shadow region in the component image.
[0014] By matching the light and shadow coexistence regions in the component images at adjacent acquisition locations, the region similarity index of the component images at adjacent acquisition locations is obtained.
[0015] Furthermore, the present invention also proposes to determine the regional shadow contour index of each image region in the component image based on the pixel features in the component image, including:
[0016] Clustering of pixels in the component image yields the contours of each image region in the component image;
[0017] Starting from the pixel feature points in the contour of each image region, the image region contour is traversed along both sides to obtain two contour curves.
[0018] By comparing the two contour curves of each image region, similar curves in the contour of each image region are obtained.
[0019] Based on the similarity curves in the contours of each image region, the regional shadow contour index of each image region in the component image is determined.
[0020] Furthermore, the present invention also proposes to compare the two contour curves of each image region contour to obtain similar curves in each image region contour, including:
[0021] Construct a contour interval sequence based on the distance between adjacent pixels in the contour curve;
[0022] Based on the contour interval sequence, extract the inflection points in the contour curve;
[0023] Based on the distance between the inflection points of the two contour curves and the directional similarity between the inflection points, the distance matrix between the two contour curves is determined.
[0024] Based on the distance matrix, dynamic time warping is performed between the two contour curves to obtain similar curves in the image region contour.
[0025] Furthermore, the present invention also proposes to determine the regional shadow contour index of each image region in the component image based on the similarity curves in the contours of each image region, including:
[0026] Get the maximum distance between corresponding pixels of two contour curves in the image region contour;
[0027] Divide the number of pixels of similar curves by the number of pixels of the image region outline to obtain the proportion of similar curves in the image region outline.
[0028] By using the maximum interval distance and the proportion of similar curves, the regional shadow contour index of the image region corresponding to the image region contour is determined.
[0029] Furthermore, the present invention also proposes determining the light and shadow co-occurrence region in the component image based on the regional shadow contour index of each image region in the component image, including:
[0030] Obtain the average value of the first pixel in the target image region, and the average value of the second pixel in the neighboring image regions corresponding to the target image region;
[0031] The shadow difference between the target image region and the neighboring image regions is determined by using the regional shadow contour index of the target image region, the regional shadow contour index of the neighboring image regions, the mean value of the first pixel value, and the mean value of the second pixel value.
[0032] Based on the shadow difference, it is determined whether the target image region and the neighboring image regions constitute a region of light and shadow coexistence.
[0033] Furthermore, the present invention also proposes to match the light and shadow co-occurrence regions in component images at adjacent acquisition positions to obtain a region similarity index of component images at adjacent acquisition positions, including:
[0034] By comparing the inflection points between target matching regions at adjacent acquisition positions, the non-isotropic index of the change of target matching regions at adjacent acquisition positions is obtained. The target matching region is the texture protrusion region or shadow region in the light and shadow symbiosis region.
[0035] Based on the regional shadow contour index of the target matching area at adjacent acquisition positions, determine the shadow same index between the target matching areas at adjacent acquisition positions;
[0036] Dynamic time warping is performed on the target matching regions at adjacent acquisition locations to obtain the region contour similarity between the target matching regions at adjacent acquisition locations.
[0037] Based on the non-isotropy index of the change in the target matching region at adjacent acquisition positions, the sameness index of the shadow, and the similarity of the region contour, the region similarity index of the component image at adjacent acquisition positions is determined.
[0038] Furthermore, this invention also proposes to compare the inflection points between target matching regions at adjacent acquisition positions to obtain a non-isotropy index of the change in target matching regions at adjacent acquisition positions, including:
[0039] The concavity and convexity properties of each inflection point in the target matching region are identified, and the concavity and convexity property values of each inflection point in the target matching region are obtained.
[0040] By comparing the concavity and convexity property values of corresponding inflection points between target matching regions at adjacent acquisition positions, the non-isotropy index of the change in target matching regions at adjacent acquisition positions is obtained.
[0041] Furthermore, the present invention also proposes determining the shadow identity index between target matching regions at adjacent acquisition positions based on the region shadow contour index of the target matching region at adjacent acquisition positions, including:
[0042] Obtain the average value of the third pixel in the target matching region;
[0043] The shadow region coefficient of the target matching region is determined by using the region shadow contour index of the target matching region and the mean value of the third pixel.
[0044] Based on the difference between the shadow area coefficients of the target matching area at adjacent acquisition positions, the shadow same index between the target matching areas at adjacent acquisition positions is determined.
[0045] Furthermore, this invention also proposes to determine the region similarity index of component images at adjacent acquisition positions based on the non-isotropy index of the change in the target matching region at adjacent acquisition positions, the shadow similarity index, and the region contour similarity, including:
[0046] By utilizing the non-isotropic index of the target matching region change, the sameness index of the shadow, and the similarity of the region contour under adjacent acquisition positions, the local region similarity index of the target matching region under adjacent acquisition positions is determined.
[0047] By utilizing the local region similarity index of each target matching region at adjacent acquisition locations, the region similarity index of component images at adjacent acquisition locations is determined.
[0048] The present invention has the following beneficial effects:
[0049] The automated generation method for 3D models of building components for architectural design provided in this invention first acquires point clouds and images of the target building component at multiple acquisition locations. Then, image enhancement processing is performed on the component images to improve image quality and feature clarity. Next, image reconstruction is carried out to better represent the component structure. Based on the pixel features in the component images, a dynamic time warping algorithm is used to perform regional similarity analysis on the component images to accurately obtain a regional similarity index. This regional similarity index reflects the degree of similarity between images at adjacent acquisition locations, demonstrating the correlation and repetition of data acquired at different locations. Then, based on this regional similarity index, the component point clouds at adjacent acquisition locations are weighted and fused. This process can reasonably handle redundant data, reduce the impact of data differences caused by acquisition angle deviations, and allow the fused point cloud data to more accurately reflect the true form of the building component. Finally, the accuracy of the 3D model constructed based on the fused point cloud data is improved. Attached Figure Description
[0050] To more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0051] Figure 1 This is a flowchart illustrating an automated method for generating 3D models of building components for architectural design, provided in one embodiment of the present invention.
[0052] Figure 2 This is a schematic flowchart of S102 provided in one embodiment of the present invention;
[0053] Figure 3 This is a schematic flowchart of S201 provided in one embodiment of the present invention;
[0054] Figure 4 This is a schematic diagram illustrating the traversal of an image region contour provided in one embodiment of the present invention;
[0055] Figure 5 This is a schematic diagram of S203 provided in one embodiment of the present invention.
[0056] Legend:
[0057] 401. First pixel feature point; 402. Second pixel feature point; 403. Image region; 404. First contour curve; 405. Second contour curve. Detailed Implementation
[0058] To further illustrate the technical means and effects adopted by the present invention to achieve its intended purpose, the following, in conjunction with the accompanying drawings and preferred embodiments, details the specific implementation, structure, features, and effects of a method for automatically generating three-dimensional models of building components for architectural design based on the present invention. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.
[0059] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0060] It should be noted that the acquisition, storage, use, and processing of data in the technical solution of this invention all comply with the relevant provisions of laws and regulations.
[0061] It should be noted that in the embodiments of the present invention, certain software, components, models and other existing solutions in the industry may be mentioned. These should be regarded as exemplary and are only intended to illustrate the feasibility of implementing the technical solution of the present invention. However, they do not mean that the applicant has used or necessarily used the solution.
[0062] In traditional 3D model construction, redundant data acquired by multi-source 3D scanning equipment suffers from local geometric deformation and texture misalignment due to angular deviations, leading to decreased point cloud matching accuracy. Furthermore, differences in lighting conditions in overlapping areas at different acquisition locations cause inconsistent offsets in surface curvature and normal direction between adjacent point cloud data, further exacerbating accumulated errors during point cloud registration. This problem directly affects the topological integrity of the reconstructed 3D model, resulting in artifacts or breaks on the 3D model surface.
[0063] To address the aforementioned issues, this invention first considers the problem of local geometric deformation and texture misalignment caused by angular deviations in redundant data acquired by multi-source 3D scanning devices. Traditional methods rely on single-corner feature matching, which cannot effectively handle surface curvature inconsistency caused by lighting differences in repetitive areas. To resolve this, this invention attempts to approach the issue from the perspective of multimodal data fusion, establishing a correlation evaluation mechanism for point cloud data at adjacent acquisition locations by introducing the light and shadow co-occurrence feature analysis of component images. Furthermore, this invention discovers that the regional shadow contour index can quantify the matching degree between texture protrusion areas and shadow areas from different viewpoints, thus providing a dynamic adjustment basis for point cloud weighted fusion. By converting the image region similarity analysis results into point cloud fusion weights, the cumulative error caused by device angular deviations can be effectively suppressed, avoiding the formation of artifacts on the model surface.
[0064] In this regard, such as Figure 1As shown, this invention proposes an automated method for generating 3D models of building components for architectural design. This method can be applied to a server and includes the following steps S101 to S104:
[0065] S101, acquire the point cloud and image of the target building component at multiple acquisition locations;
[0066] S102, Based on the pixel features in the component images, the region similarity analysis between component images is performed through the dynamic time warping algorithm to obtain the region similarity index of component images at adjacent acquisition positions;
[0067] S103, based on the regional similarity index, weighted fusion of component point clouds at adjacent collection locations is performed to obtain fused point cloud data;
[0068] S104, based on fused point cloud data, constructs a 3D model of the target building component.
[0069] In this embodiment, the component point cloud refers to the set of point cloud data acquired by a 3D scanning device at different acquisition locations. Specifically, it can be acquired using a LiDAR or structured light scanner, and is used to accurately describe the surface geometry of building components, providing basic data for subsequent 3D model construction.
[0070] Component images refer to two-dimensional image data acquired synchronously with component point clouds. Specifically, they can be captured using a high-resolution optical camera to record the surface texture and light and shadow information of building components, thereby assisting in the semantic understanding and matching of point cloud data.
[0071] Region similarity analysis refers to the calculation process of matching local region features of component images at adjacent acquisition locations. Specifically, it can be implemented using a contour curve dynamic time warping algorithm based on pixel feature clustering, which is used to quantify the similarity of image regions under different viewpoints and provide a weight basis for point cloud fusion.
[0072] Weighted fusion refers to an integration method that compensates for differences between adjacent point cloud data based on regional similarity indices. Specifically, it can be implemented using a point cloud registration algorithm based on the proportional allocation of regional similarity indices. This method is used to eliminate data redundancy and matching errors caused by multi-angle acquisition and improve the consistency of point cloud data.
[0073] Fusion point cloud data refers to a unified 3D point cloud set formed after weighted fusion processing. Specifically, it can be implemented using Poisson reconstruction or triangulation algorithms to construct complete and high-precision 3D models of building components, solving the model distortion problem caused by data redundancy and angle deviation in traditional methods.
[0074] The core innovation of this invention lies in quantifying the local matching degree of component images at adjacent acquisition locations through regional similarity analysis, and performing weighted fusion processing on point cloud data based on the local matching degree to compensate for differences. This effectively eliminates redundant data differences caused by the angle deviation of acquisition from multiple devices and improves the construction accuracy of 3D models of complex textured building components.
[0075] As an example, when reconstructing a 3D model of the pillars of a church, six 3D laser scanners were first used to collect data on the pillars. These scanners were arranged in a ring around the pillars at 30° intervals, with a data acquisition distance of 1.2 meters. Each scanner simultaneously acquired point cloud data and high-resolution image data.
[0076] Then, region similarity analysis is performed on the acquired image data. First, the image is segmented to identify regions with similar texture features. Then, by comparing the texture features, lighting changes, etc., of these regions at adjacent acquisition locations, a region similarity index is calculated. For example, for the relief patterns on the surface of a column, the corresponding region similarity index is obtained by analyzing the lighting changes at different angles.
[0077] Then, based on the calculated regional similarity index, the point cloud data from adjacent acquisition locations are weighted and fused. Regions with high similarity are assigned larger fusion weights, while regions with low similarity are assigned smaller fusion weights. This method effectively addresses the data inconsistency caused by differences in acquisition angles, especially in complex structures such as reliefs on column surfaces.
[0078] Finally, the fused point cloud data was used to construct a 3D model of the column. The fused point cloud data retained high-quality information from each acquisition location while eliminating data redundancy and inconsistencies in repeatedly acquired areas, providing a high-quality data foundation for the construction of the 3D model.
[0079] This embodiment first acquires point clouds and images of the target building component at multiple acquisition locations. Then, image enhancement processing is performed on the component images to improve image quality and feature clarity. Next, image reconstruction is conducted to better represent the component structure. Based on the pixel features in the component images, a dynamic time warping algorithm is used to perform regional similarity analysis on the component images to accurately obtain a regional similarity index. This index reflects the degree of similarity between images at adjacent acquisition locations, demonstrating the correlation and repetition of data acquired at different locations. Then, based on this regional similarity index, the point clouds of components at adjacent acquisition locations are weighted and fused. This process reasonably handles redundant data, reduces the impact of data differences caused by acquisition angle deviations, and allows the fused point cloud data to more accurately reflect the true form of the building component. Finally, the accuracy of the 3D model constructed based on the fused point cloud data is improved.
[0080] In some of the above-mentioned solutions of the present invention, when performing regional similarity analysis on component images at adjacent acquisition locations, the lack of accurate identification of the light and shadow coexistence region leads to inaccurate calculation of the regional similarity index, which in turn affects the subsequent point cloud fusion effect and the accuracy of 3D model construction.
[0081] In this regard, such as Figure 2 As shown, the present invention further proposes that S102 may include the following S201 to S203:
[0082] S201, For each component image, based on the pixel features in the component image, determine the regional shadow contour index of each image region in the component image respectively;
[0083] S202, Based on the regional shadow contour index of each image region in the component image, determine the light and shadow coexistence region in the component image. The light and shadow coexistence region is the region formed by the texture protrusion region and the corresponding shadow region in the component image.
[0084] S203, Match the light and shadow coexistence regions in the component images at adjacent acquisition positions to obtain the region similarity index of the component images at adjacent acquisition positions.
[0085] In this embodiment, pixel features include color features (such as RGB values, representing the intensity of the red, green, and blue color channels, respectively) and texture features (reflecting the texture pattern of the area surrounding the pixel, such as texture information extracted through methods like local binary mode). These features can describe the visual representation of a pixel in an image.
[0086] An image region is a localized area with specific significance within a component image, defined according to certain rules or algorithms. Image segmentation techniques (such as threshold-based segmentation, region-based segmentation, edge-based segmentation, etc.) can divide an image into multiple regions, each containing a set of spatially adjacent pixels that share certain common features or attributes.
[0087] The Region Shadow Contour Index is a quantitative metric used to measure the shadow contour features of an image region. It is obtained through the analysis and calculation of pixel features within the region, reflecting information such as the sharpness and shape characteristics of the shadow contour. Specific calculation methods may involve statistically analyzing the distribution and variations of pixel features within the region, such as calculating gradient changes and contrast of pixel features at edges, and then combining these factors to derive a numerical value representing the Region Shadow Contour Index.
[0088] The light-shadow coexistence region refers to the area in a part image jointly formed by textured raised areas and their corresponding shadow areas. Under natural lighting conditions, the textured raised parts of an object's surface will produce obvious shadows. These shadows and raised parts are interconnected and interdependent, jointly reflecting the three-dimensional structural features of the object's surface. These light-shadow coexistence regions can be identified by recognizing and analyzing the region shadow contour index.
[0089] As an example, the acquired component images are first preprocessed to improve image quality and facilitate subsequent analysis. Common preprocessing methods include denoising (such as using Gaussian filtering, median filtering, etc. to remove noise interference in the image) and image enhancement (such as histogram equalization, contrast stretching, etc. to enhance image contrast and clarity). Then, a suitable image segmentation algorithm is used to divide the component image into multiple image regions. For example, threshold-based segmentation methods can select one or more thresholds based on the image's grayscale features to divide the image into different regions; region-based segmentation methods (such as region growing, split-merge, etc.) divide the image into regions based on the similarity of pixels; edge-based segmentation methods (such as Canny edge detection, Sobel edge detection, etc.) divide regions by detecting edge information in the image.
[0090] For each pixel within an image region, its relevant features are extracted. As mentioned earlier, color features (RGB or grayscale values) and texture features (such as LBP texture features, gray-level co-occurrence matrix features, etc.) can be extracted. For each image region, the region shadow contour index is calculated based on the features of its internal pixels. One possible calculation method is as follows: First, edge pixels within the image region are detected. Edge images can be obtained using edge detection algorithms (such as the Canny algorithm). Then, the gradient changes of the features of pixels surrounding the edge pixels are calculated. These gradient values are then statistically analyzed, such as calculating the mean and variance of the gradients. Finally, the region shadow contour index is derived by combining these statistical measures.
[0091] Then, based on practical application needs and experience, a threshold for the regional shadow contour index is set. This threshold is used to determine whether an image region may belong to a region of light and shadow coexistence. The threshold can be determined by experimentally analyzing the distribution of regional shadow contour indices in images of different types of parts, or it can be initially set based on prior knowledge and then adjusted and optimized in practical applications. All image regions in the part image are traversed, and the regional shadow contour index of each region is compared with the set threshold. If the regional shadow contour index of a region is greater than the threshold, the region is considered to be part of a region of light and shadow coexistence and is marked as a candidate region. For image regions marked as candidate regions, their relationship with surrounding regions is further analyzed. Combining the geometric features of texture protrusions and shadows, the final region of light and shadow coexistence is determined. For example, by analyzing the shape, size, and spatial relationship with adjacent regions of candidate regions, it can be determined whether there are cases where texture protrusion regions match their corresponding shadow regions. If certain conditions are met, these regions are merged to determine a region of light and shadow coexistence.
[0092] Finally, for the light and shadow coexisting regions in the component images at adjacent acquisition positions, their relevant features are extracted. These features can include shape features (such as the area, perimeter, aspect ratio, shape complexity, etc., which can be obtained by calculating the boundary point coordinates of the region or using shape descriptors), texture features (such as the LBP texture features and gray-level co-occurrence matrix features mentioned above), and region shadow contour indices. Appropriate similarity measurement methods are used to calculate the similarity between light and shadow coexisting regions at adjacent acquisition positions. Common similarity measurement methods include Euclidean distance, cosine similarity, and correlation coefficient. For example, Euclidean distance is used to calculate the distance between the feature vectors of two light and shadow coexisting regions; the smaller the distance, the more similar the two regions are. Cosine similarity is used to calculate the cosine value of the angle between two feature vectors; the closer the value is to 1, the more similar the two regions are. Based on the similarity calculation results, the region similarity index of the component images at adjacent acquisition positions is determined. The calculated similarity values can be normalized to a range between [0,1], and the normalized similarity value can be used as the region similarity index.
[0093] This embodiment effectively identifies regions of coexisting light and shadow in images of building components and accurately calculates the region similarity index by comparing these regions at adjacent acquisition locations. This method fully utilizes the surface texture features and lighting effects of building components, improving the accuracy of image matching and laying the foundation for subsequent point cloud fusion and 3D model construction. Furthermore, this method is adaptable to image acquisition under different lighting conditions, enhancing the robustness of 3D model generation for building components.
[0094] In some of the above-mentioned solutions of the present invention, the regional shadow contour index of each image region is determined based on the pixel features in the component image. However, in the determination process, due to the complexity of the image region contour, directly calculating the regional shadow contour index may lead to insufficient matching accuracy, which in turn affects the recognition accuracy of the light and shadow coexisting region and ultimately reduces the accuracy of the 3D model construction.
[0095] In this regard, such as Figure 3 As shown, the present invention further proposes that S201 includes the following S301 to S304:
[0096] S301, Cluster the pixels in the component image to obtain the outline of each image region in the component image;
[0097] S302, Starting from the pixel feature points in the contour of each image region, the image region contour is traversed along both sides to obtain two contour curves.
[0098] S303, compare the two contour curves of each image region to obtain the similar curves in the contour of each image region.
[0099] S304, Based on the similar curves in the contours of each image region, determine the regional shadow contour index of each image region in the component image.
[0100] In this embodiment, pixel clustering can employ clustering algorithms based on color or texture features, such as K-means or DBSCAN, to group pixels with similar features into the same image region. When traversing the image region contour along both sides, the traversal directions are clockwise and counterclockwise, and the coordinate sequence of contour pixels is recorded during the traversal. Comparison of similar curves is achieved through a dynamic time warping algorithm to calculate the similarity between two contour curves. The calculation of the region shadow contour index combines the proportion of similar curves in the contour curves and the maximum distance between the two contour curves, for example, using a weighted formula: Region Shadow Contour Index = Similar Curve Proportion × 0.6 + (1 - Maximum Distance / Maximum Possible Distance) × 0.4.
[0101] Specifically, the component image is first segmented into multiple image regions through clustering, each corresponding to an independent contour structure. Starting from pixel feature points, the image region contours are traversed in clockwise and counterclockwise directions, generating two contour curves. A dynamic time warping algorithm is used to align the two contour curves, calculating the similarity in distance and direction between their inflection points to filter out similar curve segments. The proportion of similar curves reflects contour symmetry, while the maximum interval distance reflects the geometric difference between shadow and texture regions. Finally, a region shadow contour index combines these two parameters to quantify the correlation between shadows and textures in the image region. This region shadow contour index is used for subsequent light and shadow co-occurrence region identification, improving the accuracy of image matching at adjacent acquisition locations, reducing the impact of redundant data differences on point cloud fusion, and thus improving the accuracy of 3D model construction.
[0102] like Figure 4 As shown, a schematic diagram of traversing the contour of an image region is provided. Starting from either the first pixel feature point 401 or the second pixel feature point 402 on the contour of the image region corresponding to image region 403, the contour of the image region is traversed to both sides, thereby obtaining the first contour curve 404 and the second contour curve 405.
[0103] As an example, the pixels in the component image are first clustered to obtain the contours of each image region. Clustering can be performed using the K-means algorithm, with the elbow method used to determine the optimal number of clusters K. Pixels are grouped according to color and positional features to form different image region contours. This process only achieves preliminary spatial division of textured raised areas, the bottom surface of building components, and shadow areas; it cannot yet identify specific image regions.
[0104] Starting from the pixel feature points in the contour of each image region, the image region contour is traversed along both sides to obtain two contour curves. During the traversal, the coordinates of each pixel point are recorded to form two contour curves describing the contour of the image region.
[0105] Next, the two contour curves of each image region are compared to obtain the similar curves in each image region contour. The comparison process can use a dynamic time warping algorithm to calculate the similarity between the two contour curves and extract the curve segments with similarity higher than a preset threshold as similar curves.
[0106] Finally, based on the similarity curves in the contours of each image region, the regional shadow contour index of each image region in the component image is determined. The regional shadow contour index can be calculated using a weighted formula: Regional shadow contour index = similarity curve ratio × 0.6 + (1 - maximum interval distance / maximum possible interval distance) × 0.4. This regional shadow contour index reflects the shadow characteristics of the regional contour.
[0107] This embodiment accurately identifies the contour features of each image region in a component image and obtains the region shadow contour index through comparative analysis. This method effectively captures the texture and shadow information of the building component surface, providing an important basis for subsequent 3D model reconstruction. Furthermore, this method can adapt to images under different lighting conditions, improving the robustness and accuracy of 3D model reconstruction of building components.
[0108] In some of the above-described solutions of the present invention, the two contour curves of each image region contour are compared to obtain the similar curves in each image region contour. However, in practical applications, if there is noise interference or local deformation in the spacing between adjacent pixels in the contour curve, it may affect the accuracy of contour curve matching and ultimately reduce the accuracy of calculating the region shadow contour index.
[0109] In this regard, the present invention further proposes that S303 may include:
[0110] Construct a contour interval sequence based on the distance between adjacent pixels in the contour curve;
[0111] Based on the contour interval sequence, extract the inflection points in the contour curve;
[0112] Based on the distance between the inflection points of the two contour curves and the directional similarity between the inflection points, the distance matrix between the two contour curves is determined.
[0113] Based on the distance matrix, dynamic time warping is performed between the two contour curves to obtain similar curves in the image region contour.
[0114] In this embodiment, the contour interval sequence is generated by calculating the Euclidean distance between adjacent pixels. Each element in the contour interval sequence corresponds to the spacing value between a pair of adjacent pixels, and this contour interval sequence can reflect the local morphological changes of the contour curve. Inflection point extraction is achieved by detecting abrupt changes in numerical values in the contour interval sequence. For example, when the difference between adjacent elements in the contour interval sequence exceeds a preset threshold, it is determined that an inflection point exists at that location. The construction of the distance matrix combines the spatial distance and directional similarity between inflection points. The spatial distance is calculated using Euclidean distance, and the directional similarity is quantified by the cosine value of the angle between the tangent directions at the inflection point. The dynamic time warping operation uses a dynamic programming algorithm to find the optimal matching path between two contour curves in the distance matrix, allowing the curves to be non-linearly aligned on the time axis, thereby eliminating the influence of local deformation on the matching result.
[0115] Specifically, when constructing the contour interval sequence, all pixels on the contour curve are traversed first, and the distance between adjacent points is calculated sequentially to generate the contour interval sequence. For example, for a contour curve containing n pixels, a contour interval sequence consisting of n-1 distance values can be generated. Further, when extracting inflection points, a first-order difference operation is performed on the contour interval sequence. Abrupt changes are identified by setting a difference threshold; for example, when the absolute value of the difference exceeds twice the average difference, it is determined to be an inflection point. When determining the distance matrix, for the set of inflection points in two contour curves, the Euclidean distance and directional similarity between each pair of inflection points are calculated, and their product is used as a matrix element. During the dynamic time warping operation, the optimal matching path is searched in the distance matrix by accumulating the minimum path cost. The extension direction of the path is restricted to the right, down, or diagonal direction to ensure the continuity of the matching. Therefore, the similarity curves obtained through dynamic time warping can effectively eliminate matching errors caused by acquisition angle deviations or local deformations, improve the calculation accuracy of the regional shadow contour index, and thus improve the weighted fusion effect of component point clouds at adjacent acquisition positions.
[0116] As an example, we first construct a contour interval sequence based on the distance between adjacent pixels in the contour curve. Specifically, we can calculate the Euclidean distance between every two adjacent pixels on the contour curve, and arrange these distance values in the order of the pixels to form a contour interval sequence.
[0117] Then, based on the contour interval sequence, inflection points in the contour curve are extracted. For example, inflection points can be identified by analyzing local extreme points in the contour interval sequence. When the value of a point in the contour interval sequence is significantly greater than or less than its neighboring points, the pixel corresponding to that point can be marked as an inflection point.
[0118] Then, based on the distance between the inflection points of the two contour curves and the directional similarity between the inflection points, the distance matrix between the two contour curves is determined. Specifically, the Euclidean distance between each pair of inflection points on the two contour curves can be calculated, and the angle between the line connecting the inflection points and the tangent of the contour curve can also be calculated. By combining the distance and angle information, a two-dimensional distance matrix can be constructed.
[0119] Finally, based on the distance matrix, dynamic time warping is performed on the two contour curves to obtain similar curves in the image region contour. The dynamic time warping algorithm can find the optimal matching path between two contour curves, thereby identifying similar curve segments.
[0120] Specifically, the distance matrix can be constructed using the following formula 1:
[0121]
[0122] In Formula 1, D is used to represent the distance matrix. Used to characterize the first contour curve L + The q-th inflection point and the second profile curve L - The distance between the q-th inflection points Used to characterize the first contour curve L + The q-th inflection point and the second profile curve L - The directional similarity between the q-th inflection points is given by Q, which represents the total number of inflection points in the contour curve.
[0123] This embodiment accurately identifies similar curves within image region contours, improving contour matching precision. This allows for more accurate analysis of light and shadow symbiosis regions in building component images, thereby enhancing the reconstruction quality of 3D models of building components. Furthermore, the method utilizes a dynamic time warping algorithm to achieve flexible matching of contour curves of varying lengths and shapes, strengthening the algorithm's applicability and robustness.
[0124] In some of the solutions described above in this invention, when determining the shadow contour index of a region by comparing two contour curves of the image region contour, relying solely on curve similarity may lead to inaccurate shadow contour quantization. Because the interval between contour curves and the proportion of similar curves are not considered, it is impossible to effectively distinguish the contour differences between texture protrusions and shadow regions, resulting in insufficient accuracy in identifying light and shadow coexisting regions, which in turn affects subsequent region similarity index calculation and point cloud fusion effects.
[0125] In this regard, the present invention further proposes that S304 may include:
[0126] Get the maximum distance between corresponding pixels of two contour curves in the image region contour;
[0127] Divide the number of pixels of similar curves by the number of pixels of the image region outline to obtain the proportion of similar curves in the image region outline.
[0128] By using the maximum interval distance and the proportion of similar curves, the regional shadow contour index of the image region corresponding to the image region contour is determined.
[0129] In this embodiment, the maximum interval distance is obtained by measuring the maximum Euclidean distance between corresponding pixels of the two contour curves, and the proportion of similar curves is calculated as the ratio of the number of similar pixels matched by the dynamic time warping algorithm to the total number of pixels. The region shadow contour index uses a linear weighted formula, combining the maximum interval distance and the proportion of similar curves with preset weight coefficients. The corresponding pixels of the two contour curves are determined through dynamic time warping path mapping to ensure the temporal consistency of pixel matching.
[0130] Specifically, in the image region contour analysis process, the contour curves obtained from clustering are first aligned pixel by pixel. By calculating the coordinate difference of corresponding pixels on two contour curves, the maximum interval distance is extracted as a quantitative indicator of contour morphology difference. Simultaneously, the proportion of similar pixels matched by dynamic time warping is statistically analyzed to reflect the local similarity of the contour curves. Substituting the maximum interval distance and the proportion of similar curves into the index calculation formula, the region shadow contour index is obtained. This region shadow contour index considers both overall contour morphology differences and local similarity features, accurately distinguishing between the high curvature changes in textured raised areas and the smooth transitions in shadow areas.
[0131] Specifically, the region shadow outline index can be determined using the following formula 2:
[0132]
[0133] In Formula 2, H k The region shadow contour index is used to characterize the k-th image region. N is used to represent the maximum distance between corresponding pixels of two contour curves in the k-th image region, and n is used to represent the number of pixels of similar curves in the contour of the image region corresponding to the k-th image region. k The number of pixels used to characterize the contour of the image region corresponding to the k-th image region, and norm used to characterize the linear normalization process.
[0134] in, The proportion of similar curves in the contour of an image region is the ratio of the length of the similar segment of the contour curve in the k-th image region to the overall length; for An inverse proportional processing is performed so that the region shadow outline index is positively correlated with the proportion of similar curves, and... They are inversely proportional. Specifically, The larger the value, the higher the similarity of the contour curves in the image region; while The larger the value, the smaller the maximum distance between corresponding pixels on the two contour curves, and the closer the contour curves are. In summary, the larger the proportion of similar curves and the smaller the distance between the contour curves, the greater the likelihood that the area is a shadow area.
[0135] As an example, first obtain the maximum distance between corresponding pixels of two contour curves in the image region outline. For instance, for a textured raised area of a building component, the maximum distance between corresponding pixels of two contour curves in that area can be calculated using image processing algorithms.
[0136] Next, divide the number of pixels on the similar curves by the number of pixels in the image region outline to obtain the proportion of similar curves in the image region outline. Specifically, you can count the number of pixels on the similar curves and then divide it by the total number of pixels in the entire image region outline to get a percentage value that represents the proportion of similar curves in the entire outline.
[0137] Finally, using the maximum interval distance and the proportion of similar curves, the region shadow contour index of the image region corresponding to the image region contour is determined by the above formula 2.
[0138] This embodiment effectively quantifies the shadow contour features of an image region. This allows for more accurate identification of textured raised areas and corresponding shadow areas on building components, improving the accuracy of subsequent light and shadow symbiosis region matching. Furthermore, this method can adapt to building component surfaces of varying complexity, providing a more reliable data foundation for subsequent 3D model reconstruction.
[0139] In some of the solutions described above in this invention, when determining the region of light and shadow coexistence, relying solely on the region shadow contour index may not accurately reflect the light and shadow relationship between adjacent regions, leading to misjudgment.
[0140] In this regard, the present invention further proposes that S202 may include:
[0141] Obtain the average value of the first pixel in the target image region, and the average value of the second pixel in the neighboring image regions corresponding to the target image region;
[0142] The shadow difference between the target image region and the neighboring image regions is determined by using the regional shadow contour index of the target image region, the regional shadow contour index of the neighboring image regions, the mean value of the first pixel value, and the mean value of the second pixel value.
[0143] Based on the shadow difference, it is determined whether the target image region and the neighboring image regions constitute a region of light and shadow coexistence.
[0144] In this embodiment, the first pixel value mean is the average brightness of all pixels within the target image region, and the second pixel value mean is the average brightness of all pixels within the neighboring image regions. The shadow difference can be obtained by subtracting the region shadow contour index of the target image region from the region shadow contour index of the neighboring image regions, and then multiplying the difference by the ratio of the first pixel value mean to the second pixel value mean. When the absolute value of the shadow difference is greater than a preset threshold, the target image region and the neighboring image regions are determined to constitute a region of coexisting light and shadow.
[0145] Specifically, the average pixel values of the target image region and neighboring image regions reflect the brightness of the region. Combining the region shadow contour index quantifies the difference in brightness between the two. For example, if the region shadow contour index of the target image region is 0.8, the region shadow contour index of the neighboring image region is 0.5, the average first pixel value is 120, and the average second pixel value is 60, then the shadow difference can be calculated as (0.8-0.5)*(120 / 60) = 0.6. If the preset threshold is 0.5, then the absolute value of the shadow difference, 0.6, exceeds the threshold, indicating that the two regions constitute a region of coexisting light and shadow. By combining the average pixel value and the shadow contour index, misjudgments caused by a single parameter can be avoided, improving the accuracy of identifying regions of coexisting light and shadow, and thus improving the point cloud fusion effect.
[0146] As an example, we first obtain the average first pixel value of the target image region and the average second pixel value of the corresponding neighboring image regions. For instance, for an image of a building component, we select a target region containing textured bumps and calculate the average grayscale value of all pixels within that region as the average first pixel value. Simultaneously, we select a region adjacent to the target region as a neighboring image region and calculate its average grayscale value as the average second pixel value.
[0147] Then, using the regional shadow contour index of the target image region, the regional shadow contour index of neighboring image regions, the mean value of the first pixel, and the mean value of the second pixel, the shadow difference between the target image region and neighboring image regions is determined. Specifically, the shadow difference can be determined using the following formula 3:
[0148]
[0149] In Formula 3, F is used to characterize the degree of shadow difference, and H... k H is the region shadow contour index used to characterize the k-th image region. k′ The region shadow contour index is used to characterize the neighboring image regions of the k-th image region. The mean value of the first pixel used to characterize the k-th image region The average value of the second pixel used to characterize the neighboring image regions of the k-th image region.
[0150] Finally, based on the shadow difference degree, it is determined whether the target image region and its neighboring image regions constitute a region of shared light and shadow. For example, a threshold can be set; if the absolute value of the calculated shadow difference degree is greater than the threshold, the target image region and its neighboring image regions are determined to constitute a region of shared light and shadow. Otherwise, it is determined not to constitute a region of shared light and shadow. Furthermore, when F>0, the k-th image region can be determined to be a shadow region formed by occlusion; otherwise, the k-th image region is a textured raised region.
[0151] This embodiment accurately identifies regions of light and shadow coexistence in images of building components. This effectively improves the accuracy of subsequent 3D model generation for these components. Furthermore, by introducing the shadow difference index, this method comprehensively considers the influence of both the region's shadow contour index and the average pixel value, making the determination of light and shadow coexistence regions more reliable. This image feature-based analysis method avoids the misjudgments that may result from relying on only a single feature in traditional methods, thus improving the robustness of 3D model generation for building components.
[0152] In some of the above-described solutions of the present invention, the region similarity index is determined by matching the light and shadow coexistence regions in the component images at adjacent acquisition positions. However, during the matching process, the inflection points in the light and shadow coexistence regions may have inconsistent concavity and convexity properties due to differences in acquisition angles, and the changes in lighting conditions in the shadow region may not be accurately quantified, resulting in deviations in the calculation of the region similarity index, which in turn affects the accuracy of subsequent point cloud fusion.
[0153] In this regard, such as Figure 5 As shown, the present invention further proposes that S203 includes the following S501 to S504:
[0154] S501, compare the inflection points between target matching regions at adjacent acquisition positions to obtain the non-isotropic index of the change of target matching regions at adjacent acquisition positions. The target matching region is the texture protrusion region or shadow region in the light and shadow coexistence region.
[0155] S502, Based on the regional shadow contour index of the target matching area under adjacent acquisition positions, determine the shadow same index between the target matching areas under adjacent acquisition positions;
[0156] S503, Perform dynamic time warping operation on the target matching regions at adjacent acquisition positions to obtain the region contour similarity between the target matching regions at adjacent acquisition positions;
[0157] S504. Based on the non-isomorphism index of the change in the matching region of each target at adjacent acquisition positions, the sameness index of the shadow, and the similarity of the region contour, determine the region similarity index of the component images at adjacent acquisition positions.
[0158] In this embodiment, the inflection point of the target matching region can be extracted by analyzing the contour interval sequence constructed by the distance between adjacent pixels in the contour curve. The concavity and convexity property value of the inflection point is determined by identifying the gradient change direction of the pixels on both sides of the inflection point. The calculation of the shadow same index needs to combine the regional shadow contour index of the target matching region and its third pixel value mean. The third pixel value mean is the gray value average of all pixels in the target matching region. Dynamic time warping operation is used to eliminate the local deformation of the contour curve caused by the difference in the acquisition angle. The optimal path matching is achieved by constructing a distance matrix and executing a dynamic programming algorithm.
[0159] Specifically, the convexity / concavity properties of the inflection points in the target matching region are quantified as binary parameters: convex inflection points are marked as 1, and concave inflection points as 0. The sum of the absolute values of the differences in the markings of corresponding inflection points at adjacent acquisition positions, divided by the total number of inflection points, yields the variation anisotropy index. The shadow region coefficient is calculated by multiplying the region shadow contour index by the mean of the third pixel value. The difference in the shadow region coefficient at adjacent acquisition positions is used as the shadow similarity index after inverse operation. In the dynamic time warping operation, the inflection points of the two contour curves are mapped to the same time axis. Optimal matching is achieved by minimizing the cumulative distance matrix, and the inverse of the cumulative distance after matching is used as the region contour similarity. Finally, the inverse of the variation anisotropy index is multiplied by the shadow similarity index and the region contour similarity, and the geometric mean of the product of all target matching regions is taken to obtain the region similarity index.
[0160] As an example, we first compare the inflection points between target matching regions at adjacent acquisition positions to obtain the non-isotropy index of the change in target matching regions at adjacent acquisition positions. The target matching region is the texture protrusion region or shadow region in the light and shadow symbiosis region.
[0161] Specifically, the concavity / convexity properties of each inflection point in the target matching region are first identified, yielding concavity / convexity property values for each inflection point. For example, the concavity / convexity property can be determined by calculating the curvature at the inflection point; positive curvature corresponds to a convex point, and negative curvature corresponds to a concave point. Then, the concavity / convexity property values of corresponding inflection points between adjacent acquisition positions are compared to obtain the anisotropy index of the change in the target matching region between adjacent acquisition positions.
[0162] Furthermore, based on the regional shadow contour index of the target matching region at adjacent acquisition positions, the shadow identity index between the target matching regions at adjacent acquisition positions is determined. Specific steps may include: obtaining the average third pixel value of the target matching region; using the regional shadow contour index and the average third pixel value of the target matching region to determine the shadow region coefficient of the target matching region; and determining the shadow identity index between the target matching regions at adjacent acquisition positions based on the difference between the shadow region coefficients of the target matching regions at adjacent acquisition positions.
[0163] Then, dynamic time warping is performed on the target matching regions at adjacent acquisition locations to obtain the similarity of the region contours between the target matching regions at adjacent acquisition locations. Dynamic time warping can be achieved by calculating the similarity between two time series, thereby obtaining the degree of similarity of the region contours.
[0164] Therefore, based on the non-isomorphism index of the change in the target matching region at adjacent acquisition positions, the sameness index of the shadow, and the similarity of the region contour, the region similarity index of the component image at adjacent acquisition positions is determined. In specific implementation, the reciprocal of the non-isomorphism index of the change in the target matching region at adjacent acquisition positions, the sameness index of the shadow, and the similarity of the region contour can be multiplied to obtain the local region similarity index of the target matching region at adjacent acquisition positions; then, the average of the local region similarity indices of the target matching regions at adjacent acquisition positions is calculated to obtain the region similarity index of the component image at adjacent acquisition positions.
[0165] This embodiment effectively improves the matching accuracy of component images at adjacent acquisition locations. By performing multi-dimensional analysis and comparison of the target matching region, including the non-isomorphism of inflection point changes, the consistency of shadows, and the similarity of region contours, the similarity of component images at adjacent acquisition locations can be more comprehensively evaluated. This multi-dimensional matching method can effectively reduce matching errors caused by acquisition angle deviations, improving the accuracy of 3D models of building components. Simultaneously, by introducing dynamic time warping operations, it can better handle temporal and spatial deformations between images at different acquisition locations, further improving the robustness of matching. Furthermore, this method can effectively handle building components with complex textures and lighting effects, providing a more reliable data foundation for subsequent 3D model construction.
[0166] In some of the above-described solutions of the present invention, when obtaining the change non-isotropy index by comparing the inflection points of the target matching regions at adjacent acquisition positions, the local deformation differences between the matching regions cannot be accurately captured because the geometric properties of the inflection points themselves are not quantitatively analyzed, thus affecting the calculation accuracy of the region similarity index.
[0167] In this regard, the present invention further proposes that S501 may include:
[0168] The concavity and convexity properties of each inflection point in the target matching region are identified, and the concavity and convexity property values of each inflection point in the target matching region are obtained.
[0169] By comparing the concavity and convexity property values of corresponding inflection points between target matching regions at adjacent acquisition positions, the non-isotropy index of the change in target matching regions at adjacent acquisition positions is obtained.
[0170] In this embodiment, the concavity / convexity property values can be quantified by calculating the radius of curvature or directional derivative at the inflection point. Inflection points with a radius of curvature less than a preset threshold are marked as concave points, and those with a radius of curvature greater than the threshold are marked as convex points. During the matching process of adjacent inflection points, the difference in concavity / convexity property values is represented by quantification into numerical values, with larger numerical values indicating more significant differences in local deformation.
[0171] Specifically, after obtaining the inflection points of the target matching region, curvature analysis is performed on each inflection point. A point with a curvature radius below 0.05 mm is considered a concave point, while a point with a curvature radius above this value is considered a convex point. Convex inflection points are marked as 1, and concave inflection points are marked as 0. Then, the anisotropy index is determined using the following formula 4:
[0172]
[0173] In Formula 4, T is used to characterize the non-isotropic index of change. The concavity / convexity value is used to characterize the j-th inflection point of the k-th image region at the i-th acquisition position. J is a value used to characterize the concavity / convexity properties of the j-th inflection point in the k-th image region at the (i+1)-th acquisition position. k Used to characterize the total number of inflection points.
[0174] in, These are the contour convexity / concavity parameters at adjacent acquisition locations. When the inflection point state is the same, This represents the average of the contour convexity and concavity parameters at adjacent sampling locations. When T = 0, the curve variation parameters are the same; conversely, the areas of building components sampled at adjacent locations are not the same, and the larger the T value, the greater the regional differences.
[0175] This embodiment effectively solves the feature offset problem caused by viewing angle differences when matching data acquired by adjacent scanning devices. By accurately quantifying the dynamic changes in the geometric properties of inflection points, local deformation features caused by device angle deviations can be accurately identified, thereby eliminating unreliable matching information in redundant data and improving the robustness and accuracy of feature matching during 3D model reconstruction.
[0176] In some of the solutions described above in this invention, the shadow identity index between target matching areas at adjacent acquisition positions is determined solely based on the regional shadow contour index of the target matching area at adjacent acquisition positions, which can easily affect the reliability of the shadow identity index evaluation results.
[0177] In this regard, the present invention further proposes that S502 may include:
[0178] Obtain the average value of the third pixel in the target matching region;
[0179] The shadow region coefficient of the target matching region is determined by using the region shadow contour index of the target matching region and the mean value of the third pixel.
[0180] Based on the difference between the shadow area coefficients of the target matching area at adjacent acquisition positions, the shadow same index between the target matching areas at adjacent acquisition positions is determined.
[0181] In this embodiment, the shadow region coefficient of the target matching region can be determined using the following formula 5:
[0182]
[0183] In Formula 5, Y is used to characterize the shadow region coefficient of the target matching region, and H is used to characterize the region shadow contour index of the target matching region. The average value of the third pixel used to characterize the target matching region.
[0184] The specific index of the shadow can be determined using the following formula 6:
[0185]
[0186] In Formula 6, S is used to characterize the same index of shadow, Y i Y is used to characterize the shadow region coefficient at the i-th acquisition location. i+1 This is used to characterize the shaded area coefficient at the (i+1)th acquisition position. It should be noted that, to ensure the calculation results are meaningful, in this embodiment of the invention, when performing fractional operations, if the denominator is 0, a parameter adjustment factor greater than 0 needs to be added to the denominator before summing to prevent the denominator from being 0. The value of the parameter adjustment factor is set by the implementer according to the actual situation; this application does not impose any special restrictions.
[0187] In this embodiment, the shadow region coefficient of the target matching region is determined by using the region shadow contour index of the target matching region and the mean value of the third pixel; then, based on the difference between the shadow region coefficients of the target matching regions at adjacent acquisition positions, the shadow identity index between the target matching regions at adjacent acquisition positions is determined, which can improve the reliability of the shadow identity index evaluation results.
[0188] In some of the solutions described above in this invention, the existing methods for calculating the regional similarity index of component images at adjacent acquisition locations rely solely on a single feature for similarity assessment. This results in poor matching performance of data acquired by different 3D scanning devices, affecting the accuracy of fused point cloud data and consequently reducing the construction accuracy of 3D models of building components.
[0189] In this regard, the present invention further proposes that S504 may include:
[0190] By utilizing the non-isotropic index of the target matching region change, the sameness index of the shadow, and the similarity of the region contour under adjacent acquisition positions, the local region similarity index of the target matching region under adjacent acquisition positions is determined.
[0191] By utilizing the local region similarity index of each target matching region at adjacent acquisition locations, the region similarity index of component images at adjacent acquisition locations is determined.
[0192] In this embodiment, the variation anisotropy index is obtained by comparing the concavity and convexity values of corresponding inflection points between target matching regions at adjacent acquisition positions. The shadow similarity index is determined based on the difference between the regional shadow contour index of the target matching region and the mean value of the third pixel value. The regional contour similarity is calculated through dynamic time warping. The local region similarity index is calculated from three parameters, and the overall region similarity index is generated by integrating the local indices of all target matching regions through weighted averaging or linear superposition.
[0193] As an example, the regional similarity index can be determined using the following formula 7:
[0194]
[0195] In Formula 7, R is used to characterize the regional similarity index, and T... m The non-isotropy index D(i,i+1) is used to characterize the change in the m-th target matching region. m S is used to characterize the similarity of the region contours between the i-th acquisition position and the m-th target matching region at the (i+1)-th acquisition position. m The tanh index is used to characterize the shadow uniformity of the m-th target matching region. M represents the number of target matching regions, i.e., the texture protrusion region and the corresponding shadow region. tanh is used to characterize the hyperbolic tangent function processing to achieve a normalization effect.
[0196] This embodiment effectively solves the problem of inaccurate region matching caused by acquisition angle deviation. By simultaneously examining three dimensions—contour morphology changes, shadow consistency, and contour matching degree—it can accurately identify local distortion regions caused by differences in lighting conditions or device pose, thereby automatically reducing the contribution of abnormal regions when weighted fusing point cloud data. This multi-factor coupled similarity determination mechanism significantly improves the registration accuracy of point cloud data from adjacent viewpoints, providing a reliable data foundation for subsequent construction of high-fidelity 3D models.
[0197] It should be clarified that the present invention is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present invention is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of the present invention.
[0198] It should also be noted that the exemplary embodiments mentioned in this invention describe methods or systems based on a series of steps or apparatus. However, this invention is not limited to the order of the steps described above; that is, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.
[0199] The above description is merely a specific embodiment of the present invention. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, modules, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. It should be understood that the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the protection scope of the present invention.
Claims
1. A method for automatically generating 3D models of building components for architectural design, characterized in that, The method includes: Acquire point clouds and images of the target building components at multiple acquisition locations; Based on the pixel features in the component images, a dynamic time warping algorithm is used to perform regional similarity analysis between the component images to obtain the regional similarity index of the component images at adjacent acquisition positions; Based on the regional similarity index, the point clouds of the components at adjacent collection locations are weighted and fused to obtain fused point cloud data. Based on the fused point cloud data, a three-dimensional model of the target building component is constructed; Methods for determining regional similarity indices include: For each of the component images, based on the pixel features in the component image, the regional shadow contour index of each image region in the component image is determined respectively; Based on the regional shadow contour index of each image region in the component image, the light and shadow coexistence region in the component image is determined. The light and shadow coexistence region is the region formed by the texture protrusion region and the corresponding shadow region in the component image. By matching the light and shadow coexistence regions in the component images at adjacent acquisition positions, the region similarity index of the component images at adjacent acquisition positions is obtained; Methods for determining the region shadow outline index include: Cluster the pixels in the component image to obtain the contours of each image region in the component image; Starting from the pixel feature points in the contour of each image region, two contour curves are obtained by traversing the contour of the image region on both sides. By comparing the two contour curves of each image region contour, similar curves in each image region contour are obtained respectively; Based on the similarity curves in the contours of each of the image regions, the regional shadow contour index of each image region in the component image is determined respectively; The method for determining similar curves in the contours of each of the image regions includes: Construct a contour interval sequence based on the distance between adjacent pixels in the contour curve; Based on the contour interval sequence, extract the inflection points in the contour curve; Based on the distance between the inflection points of the two contour curves and the directional similarity between the inflection points, a distance matrix between the two contour curves is determined. Based on the distance matrix, dynamic time warping is performed between the two contour curves to obtain similar curves in the contour of the image region.
2. The method for automatically generating three-dimensional models of building components for architectural design according to claim 1, characterized in that, The step of determining the region shadow contour index of each image region in the component image based on the similarity curves in the contours of each of the image regions includes: Obtain the maximum value of the interval distance between corresponding pixels of the two contour curves in the image region contour; Divide the number of pixels of the similar curve by the number of pixels of the image region contour to obtain the proportion of similar curves of the image region contour. Using the maximum value of the interval distance and the proportion of the similar curves, the region shadow contour index of the image region corresponding to the image region contour is determined.
3. The method for automatically generating three-dimensional models of building components for architectural design according to claim 1, characterized in that, The step of determining the light and shadow coexistence region in the component image based on the regional shadow contour index of each image region in the component image includes: Obtain the average first pixel value of the target image region and the average second pixel value of the neighboring image regions corresponding to the target image region; The shadow difference between the target image region and the neighboring image regions is determined by using the region shadow contour index of the target image region, the region shadow contour index of the neighboring image regions, the average value of the first pixel value, and the average value of the second pixel value. Based on the shadow difference, it is determined whether the target image region and the neighboring image region constitute the light and shadow coexistence region.
4. The method for automatically generating three-dimensional models of building components for architectural design according to claim 1, characterized in that, The step of matching the light and shadow co-occurrence regions in the component images at adjacent acquisition positions to obtain the region similarity index of the component images at adjacent acquisition positions includes: By comparing the inflection points between target matching regions at adjacent acquisition positions, the non-isotropic index of the change of the target matching region at adjacent acquisition positions is obtained. The target matching region is the texture protrusion region or the shadow region in the light and shadow symbiosis region. Based on the regional shadow contour index of the target matching area at adjacent acquisition positions, determine the shadow same index between the target matching areas at adjacent acquisition positions; Dynamic time warping is performed on the target matching regions at adjacent acquisition positions to obtain the region contour similarity between the target matching regions at adjacent acquisition positions; Based on the variation non-isotropy index, the shadow similarity index, and the region contour similarity of the target matching regions at adjacent acquisition positions, the region similarity index of the component images at adjacent acquisition positions is determined.
5. The method for automatically generating three-dimensional models of building components for architectural design according to claim 4, characterized in that, The step of comparing the inflection points between target matching regions at adjacent acquisition positions to obtain the non-isotropy index of the change in the target matching regions at adjacent acquisition positions includes: The concavity and convexity properties of each inflection point in the target matching region are identified to obtain the concavity and convexity property values of each inflection point in the target matching region. By comparing the concavity and convexity property values of corresponding inflection points between the target matching regions at adjacent acquisition positions, the non-isotropy index of the change in the target matching regions at adjacent acquisition positions is obtained.
6. The method for automatically generating three-dimensional models of building components for architectural design according to claim 4, characterized in that, The determination of the same shadow index between target matching regions at adjacent acquisition positions based on the region shadow contour index of the target matching region at adjacent acquisition positions includes: Obtain the average value of the third pixel in the target matching region; The shadow region coefficient of the target matching region is determined by using the region shadow contour index of the target matching region and the mean value of the third pixel; Based on the difference between the shadow region coefficients of the target matching regions at adjacent acquisition positions, the shadow same index between the target matching regions at adjacent acquisition positions is determined.
7. The method for automatically generating three-dimensional models of building components for architectural design according to claim 4, characterized in that, The determination of the region similarity index of the component image at adjacent acquisition positions based on the change non-isotropy index, the shadow similarity index, and the region contour similarity of the target matching regions at adjacent acquisition positions includes: By using the change non-isotropy index, the shadow sameness index, and the region contour similarity of the target matching region at adjacent acquisition positions, the local region similarity index of the target matching region at adjacent acquisition positions is determined; The region similarity index of the component images at adjacent acquisition positions is determined by using the local region similarity index of the target matching regions at adjacent acquisition positions.
Citation Information
Patent Citations
Automatic building modeling method and system based on point cloud data
CN116863099A