A method and system for quickly constructing a three-dimensional model for a building

Acquiring images through binocular or multi-camera and using boundary outlier algorithm to remove abnormal data points solves the problem of fusion errors in the construction of 3D models in the existing technology and achieves the rapid construction of more accurate and reliable 3D models.

CN117372647BActive Publication Date: 2024-10-11TIANGONG KAIWU (SHENZHEN) TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311396209.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-26
Publication Date
2024-10-11
Estimated Expiration
2043-10-26

AI Technical Summary

Technical Problem

The existing technology lacks an overall rationality analysis of many aspects of the model in the construction of a three-dimensional model of a building, which leads to easy fusion errors during the construction of the three-dimensional model, affecting the accuracy and rapid construction of the model.

Method used

Acquire images through binocular or multi-camera cameras, extract parallax matching feature points, calculate the parallax and convert it into depth information, use the boundary outlier algorithm to remove abnormal data points, and finally convert it into a three-dimensional model.

Benefits of technology

It improves the accuracy and quality of the three-dimensional model, ensures the reliability and accuracy of data during the rapid construction of the model, and reduces abnormal data points introduced by noise and mismatching.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117372647B_ABST
    Figure CN117372647B_ABST
Patent Text Reader

Abstract

The present invention provides a method and system for quickly constructing a three-dimensional model for a building, and relates to the technical field of image data processing. The method extracts feature points required for disparity matching from images of different viewing angles, calculates the disparity between corresponding feature points, converts the disparity into depth information, and then converts it into a depth map. The depth map is post-processed according to a preset boundary outlier algorithm to remove abnormal data points in the depth map, and the post-processed depth map is converted into a three-dimensional model. The boundary intersection values ​​and local outlier values ​​of data points in the depth map are calculated, and the abnormal data points in the depth map are removed in combination with the determination of abnormal data values, so as to improve the accuracy and quality of the three-dimensional model. Descriptors are calculated for feature points, and then feature point pairs are matched and disparity is calculated for extracting depth information, so that the three-dimensional model for the building can be quickly constructed. At the same time, the descriptors and the nearest neighbor matching algorithm are used in the feature point matching stage to improve the matching accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image data processing, and in particular to a method and system for quickly constructing a three-dimensional model for a building. Background Art

[0002] Building a 3D architectural model is the process of presenting the actual structure of a building in digital form. The digital model represents the geometric shape of the building in three dimensions, including the length, width, height, and internal and external structural details of the building. The 3D model helps to improve the efficiency of architectural design and planning, enhance the understanding of buildings, support visualization and communication, and perform architectural simulation and virtual reality applications. Architectural 3D models have a wide range of applications in architecture and architecture-related fields.

[0003] The prior art proposes a method and system for constructing a three-dimensional model of a building. The method uses point cloud data to perform three-dimensional reconstruction of a building with real three-dimensional information and pixel information. The reconstructed three-dimensional building model has a stronger sense of reality, and the restored geometric information is more complete and has higher accuracy. However, when denoising the three-dimensional point cloud data, the method uses traditional technical means, and the model construction relies on the accuracy of the first collected model. There is a lack of overall rationality analysis of the model in many aspects, which easily causes fusion errors when the three-dimensional model is constructed and fused as a whole, and does not meet the accuracy of rapid model construction. Summary of the invention

[0004] In view of the above-mentioned shortcomings of the prior art, the present invention provides a method and system for quickly constructing a three-dimensional model for a building to solve the above-mentioned technical problems.

[0005] The present invention provides a method for quickly constructing a three-dimensional model for a building, comprising:

[0006] S1: Acquire a pair of images with different viewing angles through a binocular camera or a multi-camera;

[0007] S2: extracting feature points required for disparity matching from the image;

[0008] S3: calculating the disparity between corresponding feature points in the image by a feature point matching algorithm;

[0009] S4: converting the disparity into depth information through the parameters and disparity of the binocular camera or the multi-camera;

[0010] S5: Converting the depth information into a depth map, wherein each pixel value represents a depth value of a corresponding feature point in the scene;

[0011] S6: post-processing the depth map according to a preset boundary outlier algorithm to remove abnormal data points in the depth map;

[0012] S7: Convert the post-processed depth map into a three-dimensional model.

[0013] In a preferred embodiment, the feature points include corner points, edges and textures.

[0014] In a preferred embodiment, step S3 specifically includes:

[0015] S31: calculating a descriptor for the feature point by a feature point description algorithm, wherein the descriptor is a vector used to describe an image area around the feature point;

[0016] S32: Matching the feature points in the left and right images by nearest neighbor matching to find corresponding feature point pairs;

[0017] S33: Calculating the disparity between corresponding feature points according to the feature point pair, wherein the disparity is the horizontal displacement of the feature point pair.

[0018] In a preferred embodiment, the specific logic of step S4 includes:

[0019] Wherein, De is the depth value, Bl is the baseline distance between cameras, FL is the focal length of the camera, and Dp is the parallax value.

[0020] In a preferred embodiment, step S6 specifically includes:

[0021] S61: Calculate boundary intersection values ​​and local outliers of the depth map data points;

[0022] S62: Calculate the abnormal data value according to the boundary intersection value and the local outlier value;

[0023] S63: When the abnormal data value of the data point is greater than a preset abnormal data threshold, it is determined to be an abnormal data point.

[0024] In a preferred embodiment, the boundary intersection value is a value of the total number of intersections generated by connecting any two data points of the depth map and including the data points.

[0025] In a preferred embodiment, the calculation logic of the local outlier is:

[0026] S611: For each data point A, calculate the first distance from the data point A to its k nearest neighbors, where k is a set value;

[0027] S612: For each nearest neighbor data point N, find k nearest neighbors of data point N, where the nearest neighbors of data point N do not include data point A;

[0028] S613: Calculate the second distance between the data point A and the data point closest to the data point A among the k nearest neighbors of the data point N;

[0029] S614: Calculate the local outlier value of data point N as the ratio of the third distance from data point N to data point A to the second distance from data point N to the k nearest neighbors that is closest to data point A.

[0030] In a preferred embodiment, the specific logic of step S62 is:

[0031]

[0032] Among them, Vab is the abnormal data value, V bc is the boundary crossing value, V lo is a local outlier, w1 and w2 are the correction coefficients of the boundary crossing value and the local outlier, respectively, and both w1 and w2 are greater than zero.

[0033] In a preferred embodiment, step S7 converts the depth map into a three-dimensional model by voxelization, triangulated mesh reconstruction or volume preservation method.

[0034] The present invention also provides a system for quickly constructing a three-dimensional model for a building, the system comprising:

[0035] Image acquisition module: acquires a pair of images with different viewing angles through a binocular camera or a multi-camera;

[0036] Feature extraction module: extracting feature points required for disparity matching from the image;

[0037] Disparity calculation module: calculates the disparity between corresponding feature points in the image through a feature point matching algorithm;

[0038] A depth conversion module: converts the disparity into depth information through the parameters and disparity of the binocular camera or the multi-camera;

[0039] A depth map conversion module: converts the depth information into a depth map, wherein each pixel value represents the depth value of a corresponding feature point in the scene;

[0040] Post-processing module: post-processing the depth map according to a preset boundary outlier algorithm to remove abnormal data points in the depth map;

[0041] Model generation module: converts the post-processed depth map into a three-dimensional model.

[0042] The present invention provides a method and system for quickly constructing a three-dimensional model for a building. The method obtains a pair of images with different viewing angles through a binocular camera or a multi-camera; extracts feature points required for parallax matching from the images; calculates the parallax between corresponding feature points in the images through a feature point matching algorithm; converts the parallax into depth information through the parameters and parallax of the binocular camera or the multi-camera; converts the depth information into a depth map, wherein each pixel value represents the depth value of the corresponding feature point in the scene; post-processes the depth map according to a preset boundary outlier algorithm to remove abnormal data points in the depth map; and converts the post-processed depth map into a three-dimensional model. The beneficial effects produced include:

[0043] By using the feature point description algorithm to calculate descriptors for feature points, and then matching the feature points in the left and right images through nearest neighbor matching, the parallax is finally calculated for depth information extraction. A 3D model for a building can be quickly constructed, and descriptors and nearest neighbor matching algorithms are used in the feature point matching stage to improve matching accuracy.

[0044] By calculating the boundary intersection values ​​and local outliers of the data points in the depth map and combining the determination of abnormal data values, the abnormal data points in the depth map are removed, which helps to improve the accuracy and quality of the three-dimensional model. Especially in the process of constructing a three-dimensional model for a building from depth information, it can help remove abnormal data points that may be introduced due to noise, mismatching or other factors, thereby improving the reliability of the model.

[0045] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:

[0047] Figure 1 A flowchart of a method for quickly constructing a three-dimensional model for a building is shown as an exemplary embodiment of the present invention;

[0048] Figure 2 The present invention is a schematic diagram of a system for rapidly constructing a three-dimensional architectural model according to an exemplary embodiment of the present invention. DETAILED DESCRIPTION

[0049] The following will describe the embodiments of the present invention with reference to the accompanying drawings and preferred embodiments. Those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be understood that the preferred embodiments are only for illustrating the present invention, not for limiting the scope of protection of the present invention.

[0050] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present invention, and thus the drawings only show components related to the present invention rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.

[0051] In the following description, numerous details are discussed to provide a more thorough explanation of the embodiments of the present invention. However, it is obvious to those skilled in the art that the embodiments of the present invention can be implemented without these specific details. In other embodiments, well-known structures and devices are shown in the form of block diagrams rather than in detail to avoid making the embodiments of the present invention difficult to understand.

[0052] Figure 1 A flowchart of a method for quickly constructing a three-dimensional model for a building is shown as an exemplary embodiment of the present invention;

[0053] like Figure 1 As shown, the present invention provides a method for quickly constructing a three-dimensional model for a building, comprising:

[0054] S1: Acquire a pair of images with different viewing angles through a binocular camera or a multi-camera;

[0055] S2: extracting feature points required for disparity matching from the image;

[0056] S3: calculating the disparity between corresponding feature points in the image by a feature point matching algorithm;

[0057] S4: converting the disparity into depth information through the parameters and disparity of the binocular camera or the multi-camera;

[0058] S5: Converting the depth information into a depth map, wherein each pixel value represents a depth value of a corresponding feature point in the scene;

[0059] S6: post-processing the depth map according to a preset boundary outlier algorithm to remove abnormal data points in the depth map;

[0060] S7: Convert the post-processed depth map into a three-dimensional model.

[0061] Specifically, step S1 involves acquiring a pair of images with different perspectives through a binocular camera or a multi-camera. The purpose of this step is to collect image data from different angles for subsequent processing and depth information extraction; using a binocular camera, also known as a stereo camera, or a multi-camera, these camera systems are usually composed of two or more cameras, which are installed at appropriate positions and angles to capture images of buildings or scenes; using cameras can capture images from different perspectives to simulate the stereoscopic vision of the human eye, each camera captures images from its specific perspective, and these captured images should be slightly offset in space to ensure that the captured images of the building or scene have different perspectives. These captured images usually appear in pairs, i.e., a left camera and a right camera or multiple cameras at different positions. At the same time, synchronization and calibration between images are ensured. Synchronization ensures that the images are captured at the same time, and calibration ensures that the field of view and coordinate system are consistent.

[0062] In step S2, feature points are points with significant structures or textures in the image, usually points that are easily identified and tracked in the image. Feature points include corners, edges or textures, and textures are areas with unique textures. Feature points are usually relatively stable to changes in illumination and scale. Feature point extraction is achieved by using feature detection algorithms, such as Harris corner detection or SIFT (scale-invariant feature transform), to automatically detect feature points in the image. The feature detection algorithm will mark the feature points in the image and provide corresponding coordinate information.

[0063] Step S3 is a key step in the process of constructing a 3D model for a building, and involves using a feature point matching algorithm to calculate the disparity between corresponding feature points in a pair of images. Disparity refers to the horizontal displacement between corresponding feature points in the left and right images, and is a key component of depth information. Further, step S3 specifically includes:

[0064] S31: calculating a descriptor for the feature point by a feature point description algorithm, wherein the descriptor is a vector used to describe an image area around the feature point;

[0065] S32: Matching the feature points in the left and right images by nearest neighbor matching to find corresponding feature point pairs;

[0066] S33: Calculating the disparity between corresponding feature points according to the feature point pair, wherein the disparity is the horizontal displacement of the feature point pair.

[0067] In the S2 stage, feature points are extracted by feature detection algorithms, but now a descriptor needs to be calculated for each feature point. A descriptor is a vector that describes the image area around the feature point. These descriptors can be generated by different algorithms, such as SURF (Speeded Robust Features) or ORB (Oriented FAST and Rotated BRIEF). The descriptor captures the key information of the feature point for matching in subsequent steps. Once the descriptors of the feature points are calculated, the feature points in the left and right images need to be matched to find the corresponding feature point pairs. For each feature point in the left image, the feature point with the most similar descriptor in the right image is found through nearest neighbor matching. This creates feature point pairs, which are feature points at the same position in the left and right images. After obtaining the feature point pairs, the disparity between each pair of feature points can be calculated; the disparity represents the horizontal displacement of the feature points in the left and right images, usually in pixels. The calculation of the disparity can be achieved by measuring the horizontal displacement between the feature point pairs, that is, the difference between the x-coordinate of the feature point in the left image and its x-coordinate in the right image.

[0068] In step S4, the disparity is converted into depth information according to the disparity value in the disparity image and the camera parameters. The relationship between the disparity value and the depth depends on the camera baseline (the distance between the binocular cameras) and the focal length and other parameters. Furthermore, the specific logic of converting the disparity into the depth information is as follows: Wherein, De is the depth value, Bl is the baseline distance between cameras, FL is the focal length of the camera, and Dp is the parallax value.

[0069] In step S5, the depth map provides a depth perception of the scene. In step S4, the depth information has been calculated, and each feature point has a corresponding depth value. In the S5 stage, these depth values ​​are mapped to the image to create a depth map. The depth map is a grayscale image, in which each pixel value represents the depth value of the corresponding feature point in the scene. The depth is usually expressed in pixels or meters (or other length units). The specific unit depends on the camera parameters and the method of calculating the depth information.

[0070] Step S6 involves post-processing the depth map to remove abnormal data points, thereby improving the accuracy and quality of the depth map.

[0071] In an exemplary embodiment, step S6 specifically includes:

[0072] S61: Calculate boundary intersection values ​​and local outliers of the depth map data points;

[0073] S62: Calculate the abnormal data value according to the boundary intersection value and the local outlier value;

[0074] S63: When the abnormal data value of the data point is greater than a preset abnormal data threshold, it is determined to be an abnormal data point.

[0075] Furthermore, in step S61, the boundary intersection value is the value of the intersection points generated by connecting any two data points of the depth map including the line containing the data point, which accounts for the total intersection points, and the calculation logic of the local outlier value is: S611: for each data point A, calculate the first distance from the data point A to its k nearest neighbors, where k is a set value; S612: for each nearest neighbor data point N, find the k nearest neighbors of the data point N, where the nearest neighbors of the data point N do not include the data point A; S613: calculate the second distance from the data point A to the data point among the k nearest neighbors of the data point N; S614: calculate the local outlier value of the data point N as the ratio of the third distance from the data point N to the data point A to the second distance from the data point N to the data point A among its k nearest neighbors.

[0076] The specific logic formula of step S62 is: Where Vab is the abnormal data value, V bc is the boundary crossing value, V lo is a local outlier, w1 and w2 are the correction coefficients of the boundary crossing value and the local outlier, respectively, and w1 and w2 are both greater than or equal to zero. bc Indicates the boundary crossing value, when V bc The value of is close to 0, indicating that the data point is closer to the boundary. bc The larger the value, the closer the data point is to the center. lo is a local outlier, if V lo The value of is close to 1, indicating that the density of the data point is similar to that of its neighbors and is unlikely to be a local outlier. lo The value of is much greater than 1, indicating that the density of the data point is much lower than that of its neighbors, and it may be a local outlier. Therefore, the data points are comprehensively judged by the boundary intersection value and the local outlier value, which can fully identify those depth values ​​that do not conform to the scene structure, or abnormal data points caused by mismatching, noise or other problems, and perform abnormal processing on the abnormal data points. When quickly building a 3D model, it is necessary to pay attention to the relevant abnormal data points.

[0077] In an exemplary embodiment, w1 is 0.0012, w2 is 1.0002, and the abnormal data threshold is e 2.0014 , that is, when Vab is greater than e 2.0014 , it is judged as an abnormal data point.

[0078] Step S7 is the last step in building a 3D model for a building, which involves converting the post-processed depth map data into an actual 3D model. The following is a detailed explanation of the S7 stage:

[0079] Depth map to 3D model conversion: After the depth map is post-processed in stage S6, it contains the depth information of each point in the scene. The goal of stage S7 is to convert this depth information into an actual 3D model to represent the geometric structure of the scene.

[0080] Point cloud generation: Usually, the depth map is first converted into point cloud data. Each pixel in the depth map corresponds to a point in the point cloud, whose position is calculated by the depth value and image coordinates. The point cloud represents the discrete points in the scene, and each point has an XYZ coordinate value.

[0081] 3D Surface Reconstruction: Generating a 3D model from point cloud data usually involves 3D surface reconstruction. This is a computationally intensive process that aims to transform the point cloud data into a 3D model representing the building's exterior surface. This can be achieved using different methods such as voxelization, triangulated mesh reconstruction or volume-preserving methods, depending on the application requirements and the nature of the point cloud.

[0082] Texture mapping: When creating a 3D model, an image texture is mapped onto the model surface to obtain a realistic appearance. Texture mapping operations need to be performed on the point cloud or 3D model.

[0083] Model post-processing: The generated 3D model may require further post-processing to remove unnecessary details, fill holes, smooth the surface, etc.

[0084] Final 3D model: The result of the S7 phase is a complete 3D model that can be used for architectural visualization, analysis, building information modeling (BIM) and other applications. This model fully represents the building's geometry and possible texture information.

[0085] The depth information is converted into an actual three-dimensional model through step S7, which provides useful data for various applications in the field of architecture. This step usually involves complex calculations and algorithms to ensure that the generated three-dimensional model is accurate and of high quality.

[0086] In an exemplary embodiment, Figure 2 A schematic diagram of a system structure for rapidly constructing a three-dimensional building model according to an exemplary embodiment of the present invention;

[0087] like Figure 2 As shown, the exemplary system for rapidly constructing a three-dimensional model for a building includes:

[0088] Image acquisition module: acquires a pair of images with different viewing angles through a binocular camera or a multi-camera;

[0089] Feature extraction module: extracting feature points required for disparity matching from the image;

[0090] Disparity calculation module: calculates the disparity between corresponding feature points in the image through a feature point matching algorithm;

[0091] A depth conversion module: converts the disparity into depth information through the parameters and disparity of the binocular camera or the multi-camera;

[0092] A depth map conversion module: converts the depth information into a depth map, wherein each pixel value represents the depth value of a corresponding feature point in the scene;

[0093] Post-processing module: post-processing the depth map according to a preset boundary outlier algorithm to remove abnormal data points in the depth map;

[0094] Model generation module: converts the post-processed depth map into a three-dimensional model.

[0095] It should be noted that the system for rapidly constructing a three-dimensional model for a building provided in the above embodiment and the method for rapidly constructing a three-dimensional model for a building provided in the above embodiment belong to the same concept, wherein the specific manner in which each module and unit performs operations has been described in detail in the method embodiment and will not be repeated here. In actual application, the system for rapidly constructing a three-dimensional model for a building provided in the above embodiment can allocate the above functions to different functional modules as needed, i.e., divide the internal structure of the system into different functional modules to complete all or part of the functions described above, and this is not limited here.

[0096] The above formulas are all dimensionless and numerical calculations. The formula is a formula for the most recent real situation obtained by collecting a large amount of data and performing software simulation. The preset parameters in the formula are set by technicians in this field according to actual conditions.

[0097] It should be understood that the term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. A and B can be singular or plural. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship, but it may also indicate an "and / or" relationship. Please refer to the context for specific understanding.

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

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

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

[0101] 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 quickly constructing a three-dimensional model for a building, characterized in that: include: S1: Acquire a pair of images with different viewing angles through a binocular camera or a multi-camera; S2: extracting feature points required for disparity matching from the image; S3: calculating the disparity between corresponding feature points in the image by a feature point matching algorithm; S4: converting the disparity into depth information through the parameters and disparity of the binocular camera or the multi-camera; S5: Converting the depth information into a depth map, wherein each pixel value represents a depth value of a corresponding feature point in the scene; S6: post-processing the depth map according to a preset boundary outlier algorithm to remove abnormal data points in the depth map; S7: converting the post-processed depth map into a three-dimensional model; The feature points include corner points, edges and textures; Step S3 specifically includes: S31: calculating a descriptor for the feature point by a feature point description algorithm, wherein the descriptor is a vector used to describe an image area around the feature point; S32: Matching the feature points in the left and right images by nearest neighbor matching to find corresponding feature point pairs; S33: calculating the disparity between corresponding feature points according to the feature point pair, wherein the disparity is the horizontal displacement of the feature point pair; The specific logic of step S4 includes: , where is the depth value, is the baseline distance between cameras, is the focal length of the camera, is the value of parallax; Step S6 specifically includes: S61: Calculate boundary intersection values ​​and local outliers of the depth map data points; S62: Calculate the abnormal data value according to the boundary crossing value and the local outlier value; S63: When the abnormal data value of the data point is greater than a preset abnormal data threshold, it is determined to be an abnormal data point; The boundary intersection value is the value of the intersection points generated by connecting any two data points of the depth map, including the connection point, accounting for the total intersection points; The calculation logic of the local outlier is: S611: For each data point A, calculate the first distance from the data point A to its k nearest neighbors, where k is a set value; S612: For each nearest neighbor data point N, find k nearest neighbors of data point N, where the nearest neighbors of data point N do not include data point A; S613: Calculate the second distance between the data point A and the data point closest to the data point A among the k nearest neighbors of the data point N; S614: Calculate the local outlier value of data point N as the ratio of the third distance between data point N and data point A to the second distance between data point N and its k nearest neighbors that is closest to data point A; The specific logic of step S62 is: , where is an abnormal data value, is the boundary crossing value, is a local outlier, , are the correction coefficients for boundary crossing values ​​and local outliers, respectively, and , Are greater than or equal to zero.

2. A method for rapidly constructing a three-dimensional building model according to claim 1, characterized in that: Step S7 converts the depth map into a three-dimensional model by voxelization, triangulated mesh reconstruction or volume preservation method.

3. A system for rapidly constructing a three-dimensional model for a building, characterized in that: include: Image acquisition module: acquires a pair of images with different viewing angles through a binocular camera or a multi-camera; Feature extraction module: extracting feature points required for disparity matching from the image; the feature points include corner points, edges and textures; A disparity calculation module: calculating the disparity between corresponding feature points in the image by a feature point matching algorithm; calculating a descriptor for the feature point by a feature point description algorithm, wherein the descriptor is a vector used to describe the image area around the feature point; matching the feature points in the left and right images by nearest neighbor matching to find corresponding feature point pairs; calculating the disparity between corresponding feature points according to the feature point pairs, wherein the disparity is the horizontal displacement of the feature point pairs; A depth conversion module: converts the disparity into depth information through the parameters and disparity of the binocular camera or the multi-camera; Depth map conversion module: converts the depth information into a depth map, where each pixel value represents the depth value of the corresponding feature point in the scene; the specific logic includes: , where is the depth value, is the baseline distance between cameras, is the focal length of the camera, is the parallax value Post-processing module: post-processing the depth map according to a preset boundary outlier algorithm to remove abnormal data points in the depth map; Model generation module: convert the post-processed depth map into a three-dimensional model; calculate the boundary intersection value and local outlier value of the depth map data point; calculate the abnormal data value according to the boundary intersection value and the local outlier value; when the abnormal data value of the data point is greater than the preset abnormal data threshold, it is determined to be an abnormal data point; the boundary intersection value is the value of the intersection points generated by connecting any two data points of the depth map and the total intersection points including the data point; The calculation logic of the local outlier is: for each data point A, calculate the first distance from the data point A to its k nearest neighbors, where k is a set value; For each nearest neighbor data point N, find the k nearest neighbors of data point N, where the nearest neighbors of data point N do not include data point A; Calculate the second distance between the data point closest to data point A and data point A among the k nearest neighbors of data point N; Calculate the local outlier value of data point N as the ratio of the third distance from data point N to data point A to the second distance from data point N to its k nearest neighbors that is closest to data point A; The specific logic of abnormal data values ​​is: , where is an abnormal data value, is the boundary crossing value, is a local outlier, , are the correction coefficients for boundary crossing values ​​and local outliers, respectively, and , Are greater than or equal to zero.