A method for converting a two-dimensional image of a building component into a three-dimensional model

By performing quality analysis and optimization of the two-dimensional images of building components, combined with semi-global matching algorithm and grid processing technology, the problem of insufficient accuracy and smoothness during the generation of three-dimensional models is solved, and high-quality and efficient three-dimensional model construction and optimization are achieved.

CN119273537BActive Publication Date: 2025-04-11WEI LE CONSTRUCTION TECHNOLOGY (SHENZHEN) CO LTD +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411306189.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-19
Publication Date
2025-04-11
Estimated Expiration
2044-09-19

AI Technical Summary

Technical Problem

When the prior art converts the two-dimensional image of building components into a three-dimensional model, there are problems such as poor accuracy and low smoothness of the model surface, resulting in the generated three-dimensional model being unoriented and less efficient when optimizing.

Method used

By performing quality analysis on two-dimensional images, image quality coefficients are generated, low-quality images are selected and optimized. Then use the semi-global matching algorithm to generate a depth map, convert it into three-dimensional point cloud data, generate a polygon mesh model, and perform mesh repair and smoothing processing to finally obtain a high-quality three-dimensional model.

Benefits of technology

The quality and efficiency of three-dimensional model construction are improved, the accuracy and smoothness of the model are ensured, and the targetedness and efficiency of model optimization are enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119273537B_ABST
    Figure CN119273537B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for converting a two-dimensional image of a building component into a three-dimensional model, which relates to the field of image processing technology. The size of the component three-dimensional model is compared with the size of the actual building component, and the error data between the two is obtained. The corresponding accuracy is generated by the model error data set. If the accuracy of the component three-dimensional model does not exceed the expectation, the component three-dimensional model and the building component are overlapped and the overlap degree is obtained. The complete coefficient is generated by the overlap degree. The defective area is screened out in the component three-dimensional model according to the complete coefficient, and the optimization priority of each defective area is obtained by association. After the model optimization scheme is given for the defective area by the building component model optimization knowledge map, each defective area is optimized in turn according to the optimization priority. The corresponding model optimization scheme is given for the defective area by the building component model optimization knowledge map. When each defective area is optimized, the optimization is more targeted.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of image processing, and in particular to a method for converting a two-dimensional image of a building component into a three-dimensional model. Background Art

[0002] In the construction industry, Building Information Modeling and Management (BIM) is widely regarded as a new tool that can improve the efficiency of operation and asset management of buildings and large infrastructure (such as airports, subway stations, and train stations). However, many buildings and infrastructure built before the widespread popularization of BIM technology still use traditional construction drawings as design and construction delivery; rebuilding BIM models based on old CAD engineering drawings often takes a lot of time and manpower. Therefore, developing a technology that can automatically convert CAD building drawings into BIM models can eliminate the financial and material resources consumed by manual modeling and immediately realize the value of BIM models in the operation and maintenance stage of buildings and infrastructure.

[0003] At present, there are some research and patent inventions for the recognition and three-dimensional reconstruction of two-dimensional drawings. The existing cutting-edge methods basically use computer vision technology based on deep learning to recognize and semantically segment drawings converted into pixel images. For example, in the Chinese invention patent with the authorization announcement number CN110909650B, a CAD drawing recognition method and device based on domain knowledge and target detection is disclosed, including: a CAD drawing parsing module is used to obtain the drawing information in the CAD drawing to be recognized, and convert the CAD drawing to be recognized into multiple pixel images to be recognized; the target detection module is used to perform aggregate component recognition on multiple pixel images to be recognized, and determine the component information set of the components in the CAD drawing to be recognized; the building space file parsing module is used to obtain the spatial information in the CAD drawing to be recognized; the system information fusion module is used to obtain the coordinate position information of the component in the building space according to the spatial information and the component information set, and combined with the drawing information, by searching the topology of the component, determine the component system information, fuse the coordinate position information and the component system information, and generate the component recognition information. The accuracy of component recognition and information extraction is improved, and the scalability of CAD drawing recognition is enhanced.

[0004] Although these existing methods have achieved high recognition accuracy, the equipment graphics drawing rules are different in different projects, and it is difficult to use deep learning models to recognize drawings with untrained drawing methods. Therefore, many researchers also reconstruct component 3D models by recognizing images and point clouds collected on-site. However, although these methods can better capture the actual position and geometry of 2D components;

[0005] However, after completing the design of building components and obtaining the corresponding two-dimensional design drawings, and generating a three-dimensional model of the component from the two-dimensional design drawings, the generated three-dimensional model of the component may still have some defective areas, such as poor accuracy, low smoothness of the model surface, etc. Therefore, targeted maintenance is still required for these defective areas. However, in the existing maintenance methods, overall optimization is usually performed after the component three-dimensional model is generated, but this optimization is less targeted, which easily leads to low generation efficiency of the component three-dimensional model.

[0006] To this end, the present invention provides a method for converting a two-dimensional image of a building component into a three-dimensional model. Summary of the invention

[0007] 1. Technical issues to be resolved

[0008] In view of the deficiencies in the prior art, the present invention provides a method for converting a two-dimensional image of a building component into a three-dimensional model, by generating a corresponding accuracy from a model error data set. If the accuracy of the component three-dimensional model does not exceed expectations, an overlap analysis is performed on the component three-dimensional model and the building component to obtain the overlap, and a complete coefficient is generated from the overlap. Defective areas are screened out in the component three-dimensional model based on the complete coefficient, and the optimization priority of each defective area is obtained by association. After a model optimization scheme is given for the defective area based on the building component model optimization knowledge graph, each defective area is optimized in turn according to the optimization priority. When optimizing each defective area, the optimization is more targeted, thereby solving the technical problems raised in the background technology.

[0009] (II) Technical solution

[0010] To achieve the above objectives, the present invention is implemented through the following technical solutions: A method for converting a two-dimensional image of a building component into a three-dimensional model, comprising: performing quality analysis on the source image and obtaining quality data, generating an image quality coefficient from the image quality data , according to the image quality factor Screening out low-quality images from a number of source images, matching an optimization solution for the low-quality images, and executing the optimization solution to optimize the low-quality images;

[0011] Among them, the contrast and noise density Perform linear normalization and map the corresponding data values ​​to the interval The image quality coefficient is generated according to the following formula :

[0012] ;

[0013] Weight coefficient, , ;

[0014] The optimized source image is used as the target image. After identifying the edges in the target image, the key points in the target image are extracted, and a semi-global matching algorithm is used to generate a depth map. After the depth map is converted into point cloud data in three-dimensional space, the three-dimensional coordinates are obtained from the pixel coordinates and the corresponding depth values ​​to construct a point cloud.

[0015] Generate a model surface from the point cloud data, convert the obtained model surface into a polygonal mesh model composed of triangular meshes, repair the holes in the polygonal mesh, smooth the noise of the polygonal mesh, and adjust the initial model of the component to obtain a three-dimensional model of the building component;

[0016] Compare the size of the component 3D model with the size of the actual building component to obtain the error data between the two, and generate the corresponding accuracy from the model error data set , if the accuracy of the component 3D model If the model does not exceed expectations, it will issue model optimization instructions to the outside world;

[0017] Perform overlap analysis on the component 3D model and the building component and obtain the overlap degree, and generate the complete coefficient from the overlap degree , according to the complete coefficient Screen out defective areas in the component 3D model and associate and obtain the optimization priority of each defective area , and then the building component model optimization knowledge graph gives a model optimization plan for the defect area, and then optimizes each defect area in turn according to the optimization priority.

[0018] Furthermore, source images related to the two-dimensional drawings of the building construction are collected, quality analysis is performed on the source images and quality data is obtained, and a quality data set is constructed after aggregation; an image quality coefficient is constructed from the image quality data set , if the image quality coefficient obtained is If the quality is lower than a preset threshold, the corresponding image quality is regarded as a low-quality image;

[0019] After screening out low-quality images, quality data of the low-quality images is obtained, features are extracted from the quality data and corresponding image features are obtained; several image optimization solutions are obtained and summarized to generate an image optimization solution library; the optimized source image is obtained, and a 3D reconstruction instruction is issued to the outside.

[0020] Furthermore, after receiving the 3D reconstruction instruction, the optimized source image is obtained and used as the target image, the Canny edge detection algorithm is used to detect strong edges in the target image, and the Sobel operator is applied to detect horizontal and vertical edges in the target image. After obtaining the edge of the target image, the continuity of the edge is optimized, and a key point detection instruction is issued to the outside.

[0021] Furthermore, after receiving the key point detection instruction, the Harris corner detection algorithm is used to detect the corner points in the target image, and the corner points are used as key points. The SURF algorithm is used to calculate the descriptors of the key points; the BFMatcher algorithm is used to identify and match the feature points in the left and right images, and the RANSAC algorithm is used to estimate the model parameters by iteratively selecting a set of random subsets to identify and exclude outliers;

[0022] The disparity map is calculated by finding the best matching pixel blocks in the left and right images, corresponding processing measures are taken according to the disparity map, and the depth map is generated using the semi-global matching algorithm. The SGM algorithm is then applied to perform cost aggregation in multiple directions.

[0023] Furthermore, a Poisson surface reconstruction algorithm is used to generate a smooth and continuous surface from the point cloud data, which is used as the model surface. The Marching Cubes algorithm is used to extract triangular meshes from the voxel data on the model surface, generate a mesh model composed of triangular meshes, and convert the implicit surface into an explicit polygonal mesh to obtain the initial model of the component.

[0024] Furthermore, the texture coordinates of the two-dimensional image are assigned to each vertex of the initial model of the component through UV mapping to ensure the precise alignment and minimal deformation of the texture map on the model surface; the holes in the polygonal mesh are repaired using the mesh repair tool, and the noise of the polygonal mesh is smoothed by applying the Taubin smoothing algorithm. The initial model of the component is adjusted according to the actual building size to obtain a three-dimensional model of the building component.

[0025] Furthermore, after obtaining the reconstructed three-dimensional model of the component, it is used as the target model. After the target model is dimensioned, the annotated dimension data of the target model and the dimension data of the actual component are respectively obtained, the annotated dimension is compared with the dimension of the actual building component, and after obtaining the error ratio data between the two, the model error data set is summarized and constructed.

[0026] Furthermore, the corresponding accuracy is generated by the model error data set , where the error ratio Perform linear normalization and map the corresponding data values ​​to the interval According to the following formula:

[0027] ;

[0028] in, is the error ratio of the i-th dimension point, is the qualified target value of the error ratio, is the standard deviation of several error proportions; weight coefficient: , ,and .

[0029] Furthermore, after receiving the model optimization instruction, the target model is divided into several sub-areas, several anchor points are selected in the sub-areas, and a face in the area adjacent to the anchor points is randomly selected as the model face; the corresponding face is selected as the standard face at the corresponding position of the actual building component; and the overlap between the standard face and the model face is obtained based on the size data between the standard face and the model face.

[0030] Furthermore, the complete coefficient is generated by the overlap , where the overlap Under dimensionless conditions, it follows the following formula:

[0031] ;

[0032] Weight coefficient: , ; is the degree of overlap between the i-th standard surface and the model surface in the sub-region, is the qualified standard value of coincidence degree, is the number of overlaps;

[0033] If the complete coefficient If the complete threshold is not exceeded, the corresponding sub-area is regarded as a defective area, and each defective area is marked on the three-dimensional model of the component.

[0034] Furthermore, the location and integrity coefficient of each defect area are obtained. Post-association acquisition optimization priority , according to the optimization priority Mark each defect area as follows:

[0035] ;

[0036] in, It is Defective area to The shortest distance between defect areas, is the average distance; weight coefficient: ; is the complete coefficient of the i-th defect area, is the corresponding qualified standard value, is the variance of the complete coefficient.

[0037] Furthermore, the model status data in each defect area is obtained, and the feature extraction of the model status data position in the defect area is performed to obtain the corresponding model optimization features; the building component model optimization is used as the target word, and the building component model optimization knowledge graph is pre-constructed; based on the model optimization features and the model optimization plan in the defect area.

[0038] (III) Beneficial effects

[0039] The present invention provides a method for converting a two-dimensional image of a building component into a three-dimensional model, which has the following beneficial effects:

[0040] 1. Constructing image quality coefficient from image quality data , according to the image quality coefficient obtained The image quality of the source image can be judged, and after filtering out the low-quality images, the low-quality images can be optimized, which can improve the model construction quality when constructing a three-dimensional model.

[0041] 2. By extracting features from its image quality data and obtaining corresponding image optimization features, targeted optimization is performed for low-quality images based on the image optimization features, which can improve the optimization efficiency and effect when the image needs to be optimized.

[0042] 3. Use the semi-global matching algorithm to generate a smoother and more accurate depth map. Apply the SGM algorithm to effectively reduce the noise and discontinuity in the disparity map by performing cost aggregation in multiple directions, and generate a more consistent depth map.

[0043] 4. High-quality 3D model construction is achieved through precise surface reconstruction, precise extraction of mesh models, precise alignment of texture mapping, integrity of mesh repair, optimization of mesh smoothing, and accurate adjustment of model size.

[0044] 5. Compare the model size with the size of the actual building components, obtain the error data between the two and generate accuracy from it , according to the accuracy The accuracy of the component 3D model can be judged and evaluated. When expectations are not met, the component 3D model can be further optimized in time to improve the model construction effect.

[0045] 6. Based on the complete coefficient obtained The consistency between each sub-area and the actual component is judged. If the consistency fails to meet expectations, the defective area is screened out after the judgment is completed. When optimizing the target, the optimization target can be narrowed, which helps to achieve targeted optimization and improve the efficiency of model optimization.

[0046] 7. Analyze and obtain the optimization priority for each defect area After sorting each defect area, the optimization efficiency can be improved by optimizing each defect area in turn; after selecting the defect area, after collecting various data and extracting features in the defect area, the building component model optimization knowledge graph gives the corresponding model optimization solution for the defect area. When optimizing each defect area, the optimization is more targeted, further improving the optimization effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 The figure is a flow chart of the method for converting a two-dimensional image into a three-dimensional model according to the present invention. DETAILED DESCRIPTION

[0048] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0049] See also Figure 1 The present invention provides a method for converting a two-dimensional image of a building component into a three-dimensional model, comprising:

[0050] Step 1: Analyze the quality of the source image and obtain quality data, and generate the image quality coefficient from the image quality data , according to the image quality factor Screening out low-quality images from a number of source images, matching an optimization solution for the low-quality images, and executing the optimization solution to optimize the low-quality images;

[0051] The step 1 includes the following contents:

[0052] Step 101: when it is necessary to convert a two-dimensional image into a three-dimensional model, source images related to the two-dimensional drawings of the building construction are collected, quality analysis is performed on the source images, and quality data is obtained, including contrast, brightness, image noise, etc., and a quality data set is constructed after aggregation;

[0053] Constructing image quality coefficient from image quality data set , the image quality of the source image is judged according to the image quality coefficient, in the following way: and noise density Perform linear normalization and map the corresponding data values ​​to the interval According to the following formula:

[0054] ;

[0055] Weight coefficient, , ;The weight coefficient can be obtained by referring to the hierarchical analysis method;

[0056] If the image quality coefficient is obtained If the quality is lower than a preset threshold, the corresponding image quality is regarded as a low-quality image;

[0057] When used, after obtaining a number of two-dimensional drawing image data, the image quality coefficient is constructed from the image quality data. , according to the image quality coefficient obtained The image quality of the source image can be judged, and after filtering out the low-quality images, the low-quality images can be optimized, which can improve the model construction quality when constructing the 3D model;

[0058] Step 102: After low-quality images are screened, quality data of the low-quality images are obtained. After setting qualified standards with reference to various image quality indicators, feature extraction is performed on the quality data to obtain corresponding image features. Several image optimization solutions are obtained through offline collection and online retrieval to generate an image optimization solution library.

[0059] According to the correspondence between image features and optimization solutions, the image optimization solution library matches targeted optimization solutions for low-quality images, and the optimization solutions are executed to optimize the low-quality images;

[0060] For example, adjust the contrast of an image to make the brightness distribution more even. Use curve adjustment or histogram adjustment tools to enhance the contrast of an image; apply median filtering or Gaussian filtering to remove noise points in an image; use the four-point perspective correction method to select four corner points in the image for correction, and adjust the image scale based on a reference object of known size;

[0061] After executing the optimization scheme, the optimized source image is obtained, and a 3D reconstruction instruction is issued to the outside;

[0062] When using, combine the contents in steps 101 and 102:

[0063] After screening out low-quality images, feature extraction is performed on their image quality data to obtain corresponding image optimization features. Then, targeted optimization is performed for the low-quality images based on the image optimization features, which can improve the optimization efficiency and effect when image optimization is needed.

[0064] Step 2: Use the optimized source image as the target image, identify the edges in the target image, extract the key points in the target image, and use the semi-global matching algorithm to generate a depth map. After converting the depth map into point cloud data in three-dimensional space, obtain the three-dimensional coordinates from the pixel coordinates and the corresponding depth values ​​and construct a point cloud;

[0065] The step 2 includes the following contents:

[0066] Step 201: after receiving the 3D reconstruction instruction, obtain the optimized source image and use it as the target image, pre-set the high and low thresholds, use the Canny edge detection algorithm to detect the strong edge in the target image, and apply the Sobel operator to detect the horizontal and vertical edges in the target image, optimize the edge continuity after obtaining the edge of the target image, and issue a key point detection instruction to the outside;

[0067] When in use, the Canny edge detection algorithm and Sobel operator can accurately identify strong edges and directional edges in the target image, providing clear and accurate edge information for subsequent key point detection and feature matching; optimizing edge continuity helps to improve the stability and accuracy of subsequent processing steps, especially in key point detection and feature matching, continuous edges can provide more reliable feature point positioning.

[0068] Step 202: After receiving the key point detection instruction, the sensitivity parameters are pre-set, the Harris corner detection algorithm is used to detect the corner points in the target image, the corner points are used as key points, and the SURF algorithm is used to calculate the descriptors of the key points for subsequent feature matching; the BFMatcher algorithm is used to identify and match the feature points in the left and right images. These feature points are areas with significant changes in the image, such as corners, edges, or areas with rich textures; and the RANSAC algorithm is used to estimate the model parameters by iteratively selecting a set of random subsets, and these parameters are used to verify other points, identify and exclude outliers, significantly improve the robustness of the matching, and reduce false matches caused by image noise or occlusion.

[0069] When used, the Harris corner detection algorithm combined with the preset sensitivity parameters can effectively identify the corners in the image. These corners serve as key points and provide stable reference points for feature matching. The SURF algorithm is used to calculate the descriptors of the key points, and the BFMatcher algorithm is used for feature matching. It can efficiently identify and match the feature points in the left and right images. These feature points are areas with significant changes in the image, such as corners, edges, or areas with rich textures.

[0070] Step 203: Calculate the disparity map by searching for the best matching pixel blocks in the left and right images. Considering that block matching may generate noise and discontinuity, corresponding processing measures are taken according to the disparity map, such as filling invalid areas and smoothing, so as to improve the accuracy and consistency of the disparity map. A semi-global matching algorithm is used to generate a smoother and more accurate depth map. The SGM algorithm is applied to perform cost aggregation in multiple directions, so as to effectively reduce the noise and discontinuity in the disparity map and generate a more consistent depth map.

[0071] The depth map is converted into point cloud data in three-dimensional space, and the pixel coordinates and corresponding depth values ​​are converted into three-dimensional coordinates to construct a point cloud. The point cloud is then denoised and smoothed using point cloud processing software, providing a high-quality data foundation for subsequent point cloud analysis, model reconstruction, and visualization.

[0072] When using, combine the contents in steps 201 to 203:

[0073] A semi-global matching algorithm is used to generate a smoother and more accurate depth map. The SGM algorithm is applied to effectively reduce the noise and discontinuity in the disparity map by performing cost aggregation in multiple directions, and generate a more consistent depth map.

[0074] Step 3: Generate a model surface from the point cloud data, convert the obtained model surface into a polygonal mesh model composed of triangular meshes, repair the holes in the polygonal mesh, smooth the noise of the polygonal mesh, and adjust the initial model of the component to obtain a three-dimensional model of the building component;

[0075] The step three includes the following contents:

[0076] Step 301: Use the Poisson surface reconstruction algorithm to generate a smooth and continuous surface from the point cloud data, and use it as the model surface; use the Marching Cubes algorithm to extract triangular meshes from the voxel data on the model surface, generate a mesh model composed of triangular meshes, and convert the implicit surface into an explicit polygonal mesh, thereby providing an accurate model geometry structure, laying a foundation for subsequent texture mapping and model adjustment; at this point, the preliminary construction of the component three-dimensional model is completed, and the initial model of the component is obtained;

[0077] When used, a Poisson surface reconstruction algorithm is used to generate a smooth and continuous surface from the point cloud data, which ensures the continuity and smoothness of the model surface and reduces the noise and irregularities that may exist in the point cloud data.

[0078] Step 302: Assign the texture coordinates of the two-dimensional image to each vertex of the initial model of the component through UV mapping, so as to ensure the accurate alignment and minimum deformation of the texture map on the surface of the model; make the three-dimensional model more realistic and delicate visually, and enhance the expressiveness and application value of the model;

[0079] The mesh repair tool was used to repair holes in the polygonal mesh to ensure the integrity and closure of the model and avoid rendering and analysis problems caused by holes; and the Taubin smoothing algorithm was used to smooth the noise of the polygonal mesh to further optimize the surface quality of the model and reduce the surface roughness and irregularity caused by noise. The initial model of the component was adjusted according to the actual building size to obtain the three-dimensional model of the building component and complete the model construction process;

[0080] When used, combine the contents in steps 301 and 302:

[0081] Through precise surface reconstruction, precise extraction of mesh models, precise alignment of texture mapping, integrity of mesh repair, optimization of mesh smoothing, and accurate adjustment of model size, high-quality 3D model construction is achieved, providing reliable 3D model support for architectural design and construction.

[0082] Step 4: Compare the size of the component 3D model with the size of the actual building component, obtain the error data between the two, and generate the corresponding accuracy from the model error data set , if the accuracy of the component 3D model If the model does not exceed expectations, it will issue model optimization instructions to the outside world;

[0083] The step 4 includes the following contents:

[0084] Step 401: After obtaining the reconstructed three-dimensional model of the component, use it as the target model, and after dimensioning the target model, obtain the dimension data of the target model and the dimension data of the actual component, respectively, compare the dimension of the marked dimension with the dimension of the actual building component, obtain the error ratio data between the two, and then summarize and construct a model error data set;

[0085] Step 402: Generate corresponding accuracy from the model error data set , verify the accuracy of the target model based on the accuracy, where the error ratio Perform linear normalization and map the corresponding data values ​​to the interval According to the following formula:

[0086] ;

[0087] in, is the error ratio of the i-th dimension point, is the qualified target value of the error ratio, is the standard deviation of several error proportions; weight coefficient: , ,and ;

[0088] Based on historical data and management expectations of model accuracy, the accuracy threshold is pre-set; if the accuracy obtained is If the accuracy threshold is exceeded, it means that the accuracy of the target model is feasible and the component three-dimensional model is generated. On the contrary, if the accuracy of the target model is insufficient, a model optimization instruction is issued to the outside to optimize the target model.

[0089] When using, combine the contents in steps 401 and 402:

[0090] After completing the construction of the component 3D model and marking the size data, compare the model size with the size of the actual building component, obtain the error data between the two and generate the accuracy , according to the accuracy The accuracy of the component 3D model can be judged and evaluated. When expectations are not met, the component 3D model can be further optimized in time to improve the model construction effect.

[0091] Step 5: Analyze the overlap between the component 3D model and the building component and obtain the overlap degree, and generate the complete coefficient from the overlap degree , according to the complete coefficient Screen out defective areas in the component 3D model and associate and obtain the optimization priority of each defective area , and then the building component model optimization knowledge graph is used to provide a model optimization solution for the defect area, and then each defect area is optimized in turn according to the optimization priority;

[0092] The step five includes the following contents:

[0093] Step 501: after receiving the model optimization instruction, the target model is divided into several sub-areas, several anchor points are selected in the sub-areas, and a surface in the area near the anchor points is randomly selected as the model surface; a corresponding surface is selected at a corresponding position of an actual building component and used as a standard surface; and the overlap between the standard surface and the model surface is obtained according to the size data between the standard surface and the model surface;

[0094] Step 502: Generate complete coefficients from overlap , according to the complete coefficient The defective areas are screened out in several sub-areas, where the overlap Under dimensionless conditions, it follows the following formula:

[0095] ;

[0096] Weight coefficient: , ;The weight coefficient can be obtained by referring to the hierarchical analysis method; is the degree of overlap between the i-th standard surface and the model surface in the sub-region, is the qualified standard value of coincidence degree, is the number of overlaps,

[0097] Pre-set complete thresholds based on historical data and tolerance for defects in each sub-area of ​​the target model;

[0098] If the complete coefficient If it does not exceed the complete threshold, the corresponding sub-area is regarded as a defective area, and each defective area is marked on the three-dimensional model of the component;

[0099] When using, the accuracy of the component 3D model If the expected result is not achieved and further optimization is needed, several comparison surfaces are selected and overlapped to obtain the complete coefficients. The consistency between each sub-area and the actual component is judged. If the consistency fails to meet expectations, the defective area is screened out after the judgment is completed. When optimizing the target, the optimization target can be narrowed, which helps to achieve targeted optimization and improve the efficiency of model optimization.

[0100] Step 503: Obtain the location and integrity coefficient of each defect area Post-association acquisition optimization priority , when each sub-area needs to be optimized, determine the order of optimization, based on the optimization priority Mark each defect area as follows:

[0101] ;

[0102] in, It is Defective area to The shortest distance between defect areas, is the average distance; weight coefficient: ; is the complete coefficient of the i-th defect area, is the corresponding qualified standard value, is the variance of the complete coefficient;

[0103] Step 504: when each defect region needs to be optimized, obtain the model state data in each defect region, such as model accuracy, model size, and smoothness, perform feature extraction on the model state data position in the defect region, and obtain the corresponding model optimization feature;

[0104] Taking building component model optimization as the target word, after deep retrieval and entity relationship building, the building component model optimization knowledge graph is pre-built; using the trained matching model, according to the model optimization features and the model optimization scheme in the defect area, the building component model optimization knowledge graph gives the corresponding model optimization scheme for the defect area, and optimizes each defect area according to the optimization priority;

[0105] When used, combine the contents in steps 501 and 504:

[0106] After several defect areas have been screened out, analyze and obtain the optimization priority for each defect area , after sorting each defect area, the optimization efficiency can be improved by optimizing each defect area in turn;

[0107] As a further content, after selecting the defective area, through collecting various data and extracting features in the defective area, the building component model optimization knowledge map gives the corresponding model optimization plan for the defective area. When optimizing each defective area, the optimization is more targeted, further improving the optimization effect.

[0108] The Analytic Hierarchy Process (AHP) is a decision-making method that decomposes decision-related elements into levels such as goals, criteria, and plans, and conducts qualitative and quantitative analysis on this basis. It is particularly suitable for dealing with target systems with hierarchical and staggered evaluation indicators, and when the target value is difficult to describe quantitatively, the AHP is an effective decision-making tool.

[0109] The core of the hierarchical analysis method is to decompose the decision problem into multiple levels to form a hierarchical structure, which usually includes the target level, the criterion level, the sub-criterion level and the solution level. By solving the eigenvector of the judgment matrix, the priority weight of each element of each level to an element of the previous level is obtained, and the final weight of each alternative solution to the total goal is recursively merged by the weighted sum method, so as to find the optimal solution.

[0110] The construction method of the building component model optimization knowledge graph can refer to the following:

[0111] Data collection: Data sources are determined, and various types of data related to the optimization of building component models are collected, including design drawings, construction drawings, construction specifications, material performance data, historical project data, etc. Data sources can include design units, construction units, material suppliers, scientific research institutions, etc.

[0112] Data screening and cleaning: Screen the collected data to remove redundant, erroneous or irrelevant data. Clean the data to ensure its accuracy and consistency.

[0113] Data preprocessing: Entity recognition, using natural language processing (NLP) technology to extract key entities from text data, such as building components (beams, columns, plates, walls, etc.), material types, design parameters, etc. Identify the attributes between entities, such as size, strength, weight, etc.

[0114] Relationship extraction: Relationship extraction technology is used to extract the relationship between entities from the data, such as the connection relationship between components, the correspondence between materials and components, the relationship between design parameters and component performance, etc.

[0115] Knowledge modeling: ontology definition, defining the ontology of building component model optimization, including entities, relationships, attributes, etc. Entity definition: such as component ontology (beams, columns, plates, walls, etc.), material ontology, design parameter ontology, etc. Relationship definition: such as "composed of...", "using..." materials", "meeting..." standards, etc. Attribute definition: such as the size, weight, strength, etc. of the component.

[0116] Knowledge representation: Use structured triples (entity-relationship-entity, entity-attribute-attribute value) to represent knowledge. Build a framework for knowledge graphs, including nodes (entities) and edges (relationships).

[0117] Knowledge fusion and calculation: Knowledge fusion integrates data from different sources to eliminate contradictions and ambiguities. By integrating information from multiple data sources, a more complete and accurate knowledge system is formed.

[0118] Knowledge calculation: Evaluate the quality of the integrated knowledge to ensure the quality of the knowledge base. Perform necessary reasoning and calculations, such as calculating the bearing capacity and stability of components based on design parameters.

[0119] Knowledge graph generation and optimization: Knowledge graph generation organizes the preprocessed and modeled data according to the structure of the knowledge graph to generate a knowledge graph. Use storage technologies such as graph databases to achieve persistent storage and efficient query of knowledge.

[0120] Knowledge graph optimization: As the project progresses and data is updated, the knowledge graph is optimized and updated regularly, new data is collected and processed, old data is reviewed and updated, the structural performance of the knowledge graph is optimized, and the accuracy and efficiency of queries are ensured.

[0121] Application and feedback: Apply the constructed building component model optimization knowledge graph to actual projects to provide support and assistance for design, construction, optimization, etc. Assist decision-making and problem solving by querying and analyzing the information in the knowledge graph. Collect user feedback to understand the effects and problems of the knowledge graph in actual applications; continuously optimize and improve the construction method and application mode of the knowledge graph based on feedback.

[0122] The above embodiments can be implemented in whole or in part by software, hardware, firmware or any other combination. When implemented by software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that contains one or more available media sets. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state hard disk.

[0123] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0124] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0125] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only some logical function divisions. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0126] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0127] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0128] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, and other media that can store program codes.

[0129] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A method for converting a two-dimensional image of a building component into a three-dimensional model, characterized in that: include, Perform quality analysis on the source image and obtain quality data, and generate image quality coefficients from the image quality data , according to the image quality factor Low-quality images are screened out from a number of source images, and after an optimization solution is matched for the low-quality images, the optimization solution is executed to optimize the low-quality images; wherein, the contrast and noise density Perform linear normalization and map the corresponding data values ​​to the interval The image quality coefficient is generated according to the following formula : ; Weight coefficient, , ; The optimized source image is used as the target image. After identifying the edges in the target image, the key points in the target image are extracted, and a semi-global matching algorithm is used to generate a depth map. After the depth map is converted into point cloud data in three-dimensional space, the three-dimensional coordinates are obtained from the pixel coordinates and the corresponding depth values ​​to construct a point cloud. Generate a model surface from point cloud data, convert the obtained model surface into a polygonal mesh model composed of triangular meshes, repair the holes in the polygonal mesh, smooth the noise of the polygonal mesh, and adjust the initial model of the component to obtain a three-dimensional model of the building component; Compare the size of the component 3D model with the size of the actual building component to obtain the error data between the two, and generate the corresponding accuracy from the model error data set , if the accuracy of the component 3D model If the model does not exceed expectations, it will issue model optimization instructions to the outside world; Perform overlap analysis on the component 3D model and the building component and obtain the overlap degree, and generate the complete coefficient from the overlap degree , according to the complete coefficient Screen out defective areas in the component 3D model and associate and obtain the optimization priority of each defective area , and then the building component model optimization knowledge graph gives a model optimization plan for the defect area, and then optimizes each defect area in turn according to the optimization priority.

2. A method for converting a two-dimensional image of a building component into a three-dimensional model according to claim 1, characterized in that: Collect source images related to the two-dimensional drawings of the building construction, perform quality analysis on the source images and obtain quality data, and then construct a quality data set after aggregation; construct an image quality coefficient from the image quality data set , if the image quality coefficient obtained is If the quality is lower than a preset threshold, the corresponding image quality is regarded as a low-quality image; After screening out low-quality images, quality data of the low-quality images is obtained, features are extracted from the quality data and corresponding image features are obtained; several image optimization solutions are obtained and summarized to generate an image optimization solution library; the optimized source image is obtained, and a 3D reconstruction instruction is issued to the outside.

3. The method for converting a two-dimensional image of a building component into a three-dimensional model according to claim 2, characterized in that: After receiving the 3D reconstruction command, the optimized source image is obtained and used as the target image. The Canny edge detection algorithm is used to detect strong edges in the target image, and the Sobel operator is applied to detect horizontal and vertical edges in the target image. After obtaining the edge of the target image, the continuity of the edge is optimized, and a key point detection command is issued to the outside.

4. The method for converting a two-dimensional image of a building component into a three-dimensional model according to claim 3, characterized in that: After receiving the key point detection instruction, the Harris corner detection algorithm is used to detect the corner points in the target image, and the corner points are used as key points. The SURF algorithm is used to calculate the descriptors of the key points; the BFMatcher algorithm is used to identify and match the feature points in the left and right images, and the RANSAC algorithm is used to estimate the model parameters by iteratively selecting a set of random subsets to identify and exclude outliers; The disparity map is calculated by finding the best matching pixel blocks in the left and right images, corresponding processing measures are taken according to the disparity map, and the depth map is generated using the semi-global matching algorithm. The SGM algorithm is then applied to perform cost aggregation in multiple directions.

5. The method for converting a two-dimensional image of a building component into a three-dimensional model according to claim 4, characterized in that: A Poisson surface reconstruction algorithm is used to generate a smooth and continuous surface from the point cloud data and use it as the model surface. The Marching Cubes algorithm is used to extract triangular meshes from the voxel data on the model surface, generate a mesh model composed of triangular meshes, and convert the implicit surface into an explicit polygonal mesh to obtain the initial model of the component.

6. The method for converting a two-dimensional image of a building component into a three-dimensional model according to claim 5, characterized in that: Assign the texture coordinates of the 2D image to each vertex of the component's initial model through UV mapping, ensuring accurate alignment and minimal deformation of the texture map on the model surface; The holes in the polygonal mesh were repaired using the mesh repair tool, and the noise of the polygonal mesh was smoothed by applying the Taubin smoothing algorithm. The initial model of the component was adjusted according to the actual building size to obtain the three-dimensional model of the building component.

7. The method for converting a two-dimensional image of a building component into a three-dimensional model according to claim 6, characterized in that: After obtaining the reconstructed 3D model of the component, it is used as the target model. After dimensioning the target model, the dimension data of the target model and the dimension data of the actual component are obtained respectively. The dimension of the marked size is compared with the size of the actual building component. After obtaining the error ratio data between the two, the model error data set is summarized and constructed.

8. The method for converting a two-dimensional image of a building component into a three-dimensional model according to claim 7, characterized in that: Generate the corresponding accuracy from the model error data set , where the error ratio Perform linear normalization and map the corresponding data values ​​to the interval According to the following formula: ; in, is the error ratio of the i-th dimension point, is the qualified target value of the error ratio, is the standard deviation of several error proportions; weight coefficient: , ,and .

9. The method for converting a two-dimensional image of a building component into a three-dimensional model according to claim 8, characterized in that: After receiving the model optimization instruction, the target model is divided into several sub-areas, several anchor points are selected in the sub-areas, and a face in the area near the anchor point is randomly selected as the model face; the corresponding face is selected as the standard face at the corresponding position of the actual building component; and the overlap between the standard face and the model face is obtained based on the size data between the standard face and the model face.

10. The method for converting a two-dimensional image of a building component into a three-dimensional model according to claim 9, characterized in that: Generate complete coefficients from coincidence , where the overlap Under dimensionless conditions, it follows the following formula: ; Weight coefficient: , ; is the degree of overlap between the i-th standard surface and the model surface in the sub-region, is the qualified standard value of coincidence, is the number of overlaps; If the complete coefficient If the complete threshold is not exceeded, the corresponding sub-area is regarded as a defective area, and each defective area is marked on the three-dimensional model of the component.

11. The method for converting a two-dimensional image of a building component into a three-dimensional model according to claim 10, characterized in that: Obtaining the location and integrity coefficient of each defect area Post-association acquisition optimization priority , according to the optimization priority Mark each defect area as follows: ; in, It is Defective area to The shortest distance between defect areas, is the average distance; weight coefficient: ; is the complete coefficient of the i-th defect area, is the corresponding qualified standard value, is the variance of the complete coefficient.

12. The method for converting a two-dimensional image of a building component into a three-dimensional model according to claim 11, characterized in that: Obtain model status data in each defect area, perform feature extraction on the model status data position in the defect area, and obtain corresponding model optimization features; Taking building component model optimization as the target word, a knowledge graph of building component model optimization is pre-constructed; based on the model optimization features and model optimization solutions in the defect area.

Citation Information

Patent Citations

  • CAD drawing recognition method and apparatus based on domain knowledge and object detection

    CN110909650B

  • CAD drawing recognition method and device based on domain knowledge and target detection

    CN110909650A

  • BIM-based parameterized building facade design method, facade component and skin model

    CN113282992A