A 3D modeling method based on AGI algorithm

Through the 3D modeling method based on AGI algorithm, we distinguish the defects caused by modeling errors, and repair the deleted model based on the complementary model, solving the problem of inaccurate repair of 3D models in the existing technology, and improving the accuracy and authenticity of the model.

CN119091073BActive Publication Date: 2025-04-15YANCHENG KUANGYING INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411080404.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-08
Publication Date
2025-04-15
Estimated Expiration
2044-08-08

AI Technical Summary

Technical Problem

Existing 3D modeling technology is difficult to accurately distinguish between the defects of the building itself and the defects caused by 3D modeling errors, which leads to the 3D model deviating from the actual situation after repair and is not accurate enough.

Method used

Using the 3D modeling method based on AGI algorithm, by collecting building images and inputting pre-trained detection models, the defect points of the building and 3D model are determined, the defect points of the two are compared, the defects caused by the building itself and modeling errors are distinguished, and the initial model is repaired according to the complementary model to generate an accurate 3D model.

Benefits of technology

Accurate judgment and distinction between whether defects in the 3D model are caused by the building itself, unnecessary repair is avoided, and the accuracy of 3D modeling and the authenticity of the model are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119091073B_ABST
    Figure CN119091073B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of 3D modeling, and specifically discloses a 3D modeling method based on an AGI algorithm, comprising the following steps: S1: collecting an image of a current building, determining defects of the current building, and generating a first defect set; S2: adjusting the size of an initial model to be the same as that of the current building, and repeating the step S1 to generate a second defect set; S3: generating a modeling defect set; determining the defect position, obtaining a repair image, and preprocessing the repair image; generating a completion model, repairing the initial model according to the completion model, and obtaining a 3D model of the current building. The present invention can determine whether defects in a 3D model are caused by the building itself, and repair defects in the 3D model that are not caused by the building itself, thereby improving the accuracy of modeling.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of 3D modeling, and in particular to a 3D modeling method based on an AGI algorithm. Background Art

[0002] AGI, or Artificial General Intelligence, refers to an artificial intelligence system with broad cognitive capabilities that can learn, reason, solve problems and perform tasks in multiple fields like humans. AGI algorithms are key technologies for building artificial general intelligence systems. They enable machines to autonomously learn and adapt to new environments and challenges without specific guidance.

[0003] 3D modeling, or three-dimensional modeling, is the process of building a model with three-dimensional data in a virtual three-dimensional space through professional three-dimensional production software. 3D models can be copies of real-world objects or fictional designs. They are widely used in video games, movies, architectural visualization, product design, engineering simulation and other fields.

[0004] After modeling is completed, it is usually necessary to detect and repair defects in the built 3D model. Most of the methods for completing this function in the prior art are defect detection and repair functions in 3D modeling software. Although it is relatively simple and convenient, the building itself may have defects, such as cracks caused by disrepair of the exterior wall, concrete shedding, etc., which will cause some defects in the built 3D model. The existing detection methods cannot identify whether the defects are caused by defects in the building itself or by 3D modeling errors. If repairs are performed uniformly, the final 3D model will deviate from the actual situation and be inaccurate. Summary of the invention

[0005] The purpose of the present invention is to provide a 3D modeling method based on the AGI algorithm to solve the above technical problems.

[0006] The purpose of the present invention can be achieved through the following technical solutions:

[0007] A 3D modeling method based on an AGI algorithm comprises the following steps:

[0008] S1: collect images of the current building at n preset first angles, where n is a preset value, and input them into a pre-trained first detection model, and determine the defects of the current building, generate defect points A(Awz, Alx), where Awz represents the location of the defect, Alx represents the type of the defect, and generate a first defect set Afir=(A1, A2, ..., Am), where Am represents the mth defect point on the current building;

[0009] S2: Obtain the 3D model of the current building and use it as the initial model. Adjust the size of the initial model to be the same as the current building, collect images of the initial model at n first angles, and repeat step S1 to generate a second defect set Asec=(A1', A2', ..., A M '), where A M ' represents the Mth defect point on the initial model;

[0010] S3: Generate a modeling defect set Ajm = (A1", A2", ..., Aa"), where Aa"∈Asec and Aa" represents the ath modeling defect point;

[0011] Determine the position of the modeling defect point as the defect position, obtain images of the defect position on the current building at preset n' angles as repair images, where n' is a preset value, and pre-process the repair image;

[0012] A completion model is generated according to the preprocessed repair image, wherein the completion model is a 3D model reconstructed at the defect position, and the initial model is repaired according to the completion model to obtain a 3D model of the current building.

[0013] As a further solution of the present invention: the process of obtaining the first detection model specifically includes:

[0014] A first database is established, in which images with marked defects are stored, and a first detection model is established through a deep learning model, which is then verified and optimized through the first database to obtain a first detection model.

[0015] As a further solution of the present invention: the images with marked defects stored in the first database are acquired manually.

[0016] As a further solution of the present invention: the process of preprocessing the repaired image specifically includes: denoising, correcting uneven illumination and correcting geometric distortion.

[0017] As a further solution of the present invention: the process of generating the completion model specifically includes:

[0018] Feature points are extracted from the preprocessed repaired image through the SIFT algorithm, and the preprocessed repaired image is aligned through feature point matching. The disparity map in the preprocessed image is calculated through the stereo matching algorithm, and the disparity map is converted into a depth map according to the intrinsic parameters of the camera. A dense point cloud is generated, and a completion model is generated based on the dense point cloud.

[0019] As a further solution of the present invention, the process of aligning the preprocessed repaired image by feature point matching specifically includes:

[0020] Calculating feature descriptors of the feature points, using the feature descriptors to match feature points, determining a geometric transformation model between two preprocessed restoration images by a RANSAC algorithm, and determining an optimal model, wherein the optimal model is a geometric transformation model that maximizes compliance with most point pairs;

[0021] Based on the optimal model, a geometric transformation matrix from one image to another is calculated;

[0022] For each pixel point (x, y) in the image, the new coordinates (x', y') after transformation are calculated according to the geometric transformation matrix, and the pixel values ​​in the original image are mapped to the corresponding positions in the new image to generate an aligned image.

[0023] As a further solution of the present invention: when the new coordinates are not integer coordinates, the pixel values ​​are calculated by bilinear interpolation and filled into the aligned image matrix.

[0024] As a further solution of the present invention: the process of repairing the initial model according to the completed model specifically includes:

[0025] The edge of the defect position described in the initial model is determined, the initial model and the completed model are aligned by an ICP algorithm, and the aligned initial model and the completed model are merged by a surface reconstruction algorithm.

[0026] Beneficial effects of the present invention: In the present invention, firstly, an image of a building is collected to determine the defects existing in the building itself, such as peeling of the wall skin and cracks caused by disrepair, which may be mistakenly regarded as defects of 3D modeling in the subsequent 3D model detection, thereby affecting the accuracy of the 3D model; then the defects existing in the image of the built 3D model are determined, and compared with the actual defects existing in the current building to determine whether they are the same. When the defects on the 3D model are the same as the defects existing in the building itself, it means that this is caused by the defects existing in the building itself, so it is not regarded as a defect of the 3D model, and it does not need to be repaired in the subsequent repair process, thereby ensuring the accuracy of the 3D model; then the position to be repaired is determined according to the defects existing only in the 3D model, and the image at the position is collected to generate a completion model, and the initial model is repaired according to the completion model to obtain an accurate 3D model of the current building. The present invention can determine whether the defects in the 3D model are caused by the building itself, and repair the defects in the 3D model that are not caused by the building itself, thereby improving the accuracy of modeling. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] The present invention will be further described below in conjunction with the accompanying drawings.

[0028] Figure 1 It is a flow chart of a 3D modeling method based on the AGI algorithm of the present invention. DETAILED DESCRIPTION

[0029] 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.

[0030] See also Figure 1 As shown, the present invention is a 3D modeling method based on the AGI algorithm, comprising the following steps:

[0031] S1: collect images of the current building at n preset first angles, where n is a preset value, and input them into a pre-trained first detection model, and determine the defects of the current building, generate defect points A(Awz, Alx), where Awz represents the location of the defect, Alx represents the type of the defect, and generate a first defect set Afir=(A1, A2, ..., Am), where Am represents the mth defect point on the current building;

[0032] S2: Obtain the 3D model of the current building and use it as the initial model. Adjust the size of the initial model to be the same as the current building, collect images of the initial model at n first angles, and repeat step S1 to generate a second defect set Asec=(A1', A2', ..., A M '), where A M ' represents the Mth defect point on the initial model;

[0033] S3: Generate a modeling defect set Ajm = (A1", A2", ..., Aa"), where Aa"∈Asec and Aa" represents the ath modeling defect point;

[0034] Determine the position of the modeling defect point as the defect position, obtain images of the defect position on the current building at preset n' angles as repair images, where n' is a preset value, and pre-process the repair image;

[0035] A completion model is generated according to the preprocessed repair image, wherein the completion model is a 3D model reconstructed at the defect position, and the initial model is repaired according to the completion model to obtain a 3D model of the current building.

[0036] It should be noted that first, the image of the building is collected to determine the defects in the building itself, such as peeling of wall paint and cracks caused by disrepair. These may be mistakenly regarded as defects in 3D modeling in the subsequent 3D model detection, thereby affecting the accuracy of the 3D model; then the defects in the image of the built 3D model are determined, and compared with the actual defects on the current building to determine whether they are the same. When the defects on the 3D model are the same as the defects in the building itself, it means that this is caused by the defects in the building itself. Therefore, it is not regarded as a defect in the 3D model, and there is no need to repair it in the subsequent repair process, thereby ensuring the accuracy of the 3D model; then the position that needs to be repaired is determined based on the defects that only exist in the 3D model, and the image at the position is collected to generate a completed model, and the initial model is repaired according to the completed model to obtain an accurate 3D model of the current building.

[0037] In another preferred implementation of the present invention, the process of obtaining the first detection model specifically includes:

[0038] A first database is established, in which images with marked defects are stored, and a first detection model is established through a deep learning model, which is then verified and optimized through the first database to obtain a first detection model.

[0039] It is worth noting that a deep learning model suitable for image processing and detection tasks, such as a convolutional neural network (CNN), is selected, and the labeled images in the first database are used as training data. These images are input into the deep learning model for training. The model learns the defect features in the image by continuously adjusting its own parameters, and learns to identify and locate these defects. During the training process, the model is verified using a validation set to evaluate its performance, and the accuracy and robustness of the model are continuously improved by adjusting model parameters, optimizing algorithms, and other means. After training and optimization, a model that can effectively detect building defects is obtained, namely the first detection model, which can receive input building images and output the location and type of defects.

[0040] In another preferred implementation of the present invention, the images with marked defects stored in the first database are acquired manually.

[0041] In another preferred implementation of the present invention, the process of preprocessing the repaired image specifically includes: denoising, correcting uneven illumination and correcting geometric distortion.

[0042] It can be understood that eliminating noise can make the image clearer, thereby improving the accuracy of defect detection and the reliability of subsequent processing; by correcting uneven lighting, the lighting of each part of the image is consistent, which can improve the contrast and clarity of the image, thereby enhancing the visibility and recognition of defects; by correcting geometric distortion, the straight lines in the image are restored to straight lines and the image proportions are restored to normal, thereby improving the geometric accuracy of the image; by denoising the repaired image, correcting uneven lighting and correcting geometric distortion, the quality and accuracy of the image can be significantly improved.

[0043] In another preferred implementation of the present invention, the process of generating the completion model specifically includes:

[0044] Feature points are extracted from the preprocessed repaired image through the SIFT algorithm, and the preprocessed repaired image is aligned through feature point matching. The disparity map in the preprocessed image is calculated through the stereo matching algorithm, and the disparity map is converted into a depth map according to the intrinsic parameters of the camera. A dense point cloud is generated, and a completion model is generated based on the dense point cloud.

[0045] It is worth noting that the use of the SIFT algorithm to extract feature points and match them can ensure that consistent feature points are found in images collected from different angles; through feature point matching and image alignment, the geometric consistency between images can be ensured, errors can be reduced, and the accuracy of disparity maps and depth maps can be improved, thereby generating more accurate dense point clouds; using the stereo matching algorithm and camera internal parameters, reliable depth information can be calculated from the disparity map to ensure the accuracy and completeness of the dense point cloud; the dense point cloud contains detailed three-dimensional information of the scene, which can be used to generate high-quality completion models, accurately repair and reconstruct defect locations, and ultimately obtain a complete 3D model.

[0046] In another preferred implementation of the present invention, the process of aligning the preprocessed repaired image by feature point matching specifically includes:

[0047] Calculating feature descriptors of the feature points, using the feature descriptors to match feature points, determining a geometric transformation model between two preprocessed restoration images by a RANSAC algorithm, and determining an optimal model, wherein the optimal model is a geometric transformation model that maximizes compliance with most point pairs;

[0048] Based on the optimal model, a geometric transformation matrix from one image to another is calculated;

[0049] For each pixel point (x, y) in the image, the new coordinates (x', y') after transformation are calculated according to the geometric transformation matrix, and the pixel values ​​in the original image are mapped to the corresponding positions in the new image to generate an aligned image.

[0050] It should be noted that feature descriptors are mathematical representations of feature points, which are used to describe local image features around feature points. Common feature descriptors include SIFT, SURF, and ORB. Feature descriptors enable feature points to be compared and matched between different images, thereby finding corresponding point pairs. Common methods for matching feature points using feature descriptors include nearest neighbor matching and k-nearest neighbor matching. By comparing the similarity of feature descriptors (such as Euclidean distance), corresponding feature points in different images are found, providing a basis for subsequent geometric transformation calculations. RANSAC (Random Sample Accuracy) The RANSAC algorithm is an iterative method for estimating mathematical model parameters. It eliminates outliers and noise through random sampling and model verification to find the best fitting model. In feature point matching, there may be wrong matches (outliers). The RANSAC algorithm determines a geometric transformation model that can maximally conform to most matching point pairs through multiple random sampling and verification, thereby improving the accuracy and robustness of the model. The geometric transformation matrix describes the spatial relationship between images. Through this matrix, one image can be accurately transformed into the coordinate system of another image, ensuring the spatial consistency of the image. Through pixel value mapping, the information in the original image can be accurately transferred to the aligned image, ensuring the retention of image details and alignment quality.

[0051] In another preferred implementation of the present invention, when the new coordinates are not integer coordinates, pixel values ​​are calculated by bilinear interpolation and filled into the aligned image matrix.

[0052] It is worth noting that when performing geometric transformations on images (such as rotation, scaling, translation, perspective transformation, etc.), the results of new coordinate calculations are often not integers, but floating-point numbers, which means that the new coordinate position may fall between the pixel grids of the original image, rather than exactly at the center of a pixel. In order to obtain the pixel value of the new coordinate position, the pixel values ​​around it must be interpolated. Bilinear interpolation uses the values ​​of the four nearest neighboring pixels around the new coordinate, and calculates the pixel value of the new coordinate position by linearly interpolating these four points in the horizontal and vertical directions, thereby obtaining a higher quality image during the geometric transformation process.

[0053] In another preferred implementation of the present invention, the process of repairing the initial model according to the completed model specifically includes:

[0054] The edge of the defect position described in the initial model is determined, the initial model and the completed model are aligned by an ICP algorithm, and the aligned initial model and the completed model are merged by a surface reconstruction algorithm.

[0055] It should be noted that when repairing a model, it is very important to accurately identify and determine the edges of the defect position, which can ensure that the repaired part can accurately cover and repair the defective area; during the repair process, the completed model needs to be accurately aligned to the defect position of the initial model. The ICP algorithm ensures that the completed model is completely aligned with the initial model in space through the alignment process, thereby achieving accurate repair. The ICP algorithm is a classic algorithm for aligning two point cloud data. It continuously adjusts the position of one point cloud relative to another point cloud through an iterative process to minimize the distance between the corresponding points of the two point clouds; after the initial model and the completed model are aligned, the two need to be fused into a continuous overall model. The surface reconstruction algorithm can smoothly connect the edges of the initial model and the completed model, eliminate gaps and discontinuities, and make the final 3D model complete and consistent; this method can achieve accurate repair of the initial model, ensure the accuracy of the repair process and the quality of the final model, and enable the completed model to be naturally integrated into the initial model to provide a complete and high-quality 3D model.

[0056] The above is a detailed description of an embodiment of the present invention, but the content is only a preferred embodiment of the present invention and cannot be considered to limit the scope of implementation of the present invention. All equivalent changes and improvements made within the scope of the present invention should still fall within the scope of the patent coverage of the present invention.

Claims

1. A 3D modeling method based on AGI algorithm, characterized in that: The following steps are involved: S1: collect images of the current building at n preset first angles, where n is a preset value, and input them into a pre-trained first detection model, and determine the defects of the current building, generate defect points A(Awz, Alx), where Awz represents the location of the defect, Alx represents the type of the defect, and generate a first defect set Afir=(A1, A2, ..., Am), where Am represents the mth defect point on the current building; S2: Obtain the 3D model of the current building and use it as the initial model. Adjust the size of the initial model to be the same as the current building, collect images of the initial model at n first angles, and repeat step S1 to generate a second defect set Asec=(A1', A2', ..., A M '), where A M ' represents the Mth defect point on the initial model; S3: Generate a modeling defect set Ajm = (A1", A2", ..., Aa"), where Aa"∈Asec and Aa" represents the ath modeling defect point; Determine the position of the modeling defect point as the defect position, obtain images of the defect position on the current building at preset n' angles as repair images, where n' is a preset value, and pre-process the repair image; A completion model is generated according to the preprocessed repair image, wherein the completion model is a 3D model reconstructed at the defect position, and the initial model is repaired according to the completion model to obtain a 3D model of the current building.

2. The 3D modeling method based on the AGI algorithm according to claim 1, characterized in that: The process of obtaining the first detection model specifically includes: A first database is established, in which images with marked defects are stored, and a first detection model is established through a deep learning model, which is then verified and optimized through the first database to obtain a first detection model.

3. The 3D modeling method based on the AGI algorithm according to claim 2, characterized in that: The images with marked defects stored in the first database are acquired manually.

4. The 3D modeling method based on the AGI algorithm according to claim 1, characterized in that: The process of preprocessing the repaired image specifically includes: denoising, correcting uneven illumination and correcting geometric distortion.

5. The 3D modeling method based on the AGI algorithm according to claim 1, characterized in that: The process of generating the completion model specifically includes: Feature points are extracted from the preprocessed repaired image through the SIFT algorithm, and the preprocessed repaired image is aligned through feature point matching. The disparity map in the preprocessed image is calculated through the stereo matching algorithm, and the disparity map is converted into a depth map according to the intrinsic parameters of the camera. A dense point cloud is generated, and a completion model is generated based on the dense point cloud.

6. The 3D modeling method based on the AGI algorithm according to claim 1, characterized in that: The process of aligning the preprocessed repaired image by feature point matching specifically includes: Calculating feature descriptors of the feature points, using the feature descriptors to match feature points, determining a geometric transformation model between two preprocessed restoration images by a RANSAC algorithm, and determining an optimal model, wherein the optimal model is a geometric transformation model that maximizes compliance with most point pairs; Based on the optimal model, a geometric transformation matrix from one image to another is calculated; For each pixel point (x, y) in the image, the new coordinates (x', y') after transformation are calculated according to the geometric transformation matrix, and the pixel values ​​in the original image are mapped to the corresponding positions in the new image to generate an aligned image.

7. The 3D modeling method based on the AGI algorithm according to claim 6, characterized in that: When the new coordinates are not integer coordinates, the pixel values ​​are calculated by bilinear interpolation and filled into the aligned image matrix.

8. The 3D modeling method based on the AGI algorithm according to claim 1, characterized in that: The process of repairing the initial model according to the completion model specifically includes: The edge of the defect position described in the initial model is determined, the initial model and the completed model are aligned by an ICP algorithm, and the aligned initial model and the completed model are merged by a surface reconstruction algorithm.

Citation Information

Patent Citations

  • A fabricated building concrete pouring method based on BIM

    CN109726445A

  • Repairing model creation method and system and storage medium

    CN111275811A