A reverse modeling method, device, equipment and storage medium
Through target registration, data optimization and surface reconstruction technologies, the problem of low reverse modeling accuracy of BIM in old buildings is solved, and the construction efficiency and accuracy of building information models are improved.
Patent Information
- Application Number
- CN202411315290.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-20
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2044-09-20
AI Technical Summary
The BIM reverse modeling accuracy of old buildings in the prior art is low, resulting in insufficient construction efficiency and accuracy of building information models in urban renewal.
By obtaining the point cloud data of the target building and the point cloud data of the spherical target, target registration, redundant point cloud data are eliminated, point cloud cropping, downsampling and filtering, and finally the data is transferred based on preset surface reconstruction technology Convert to a continuous triangular grid to generate a building information model BIM.
It improves the BIM accuracy of old buildings, improves the construction efficiency and accuracy of building information models, and solves the problem of low BIM reverse modeling accuracy.
Smart Images

Figure CN118864769B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of data processing, and in particular to a reverse modeling method, device, equipment and storage medium. Background Art
[0002] In the context of urban renewal, the renovation of old buildings is particularly critical. However, since these old buildings often lack BIM archiving, it has become a bottleneck in urban renewal work to a certain extent.
[0003] At present, the BIM reverse modeling of old buildings is to directly import the point cloud data of the old buildings into the building information modeling software Revit for reverse modeling, which results in low BIM accuracy of the old buildings. Therefore, how to improve the BIM accuracy of old buildings has become a technical problem that needs to be solved urgently. Summary of the invention
[0004] In order to solve the above technical problems, the embodiments of the present disclosure provide a reverse modeling method, device, equipment and storage medium.
[0005] In a first aspect, the present disclosure provides a reverse modeling method, the method comprising:
[0006] Acquire point cloud data of a target building and point cloud data of a spherical target, and perform target registration on the point cloud data of the target building based on the point cloud data of the spherical target to obtain complete point cloud data of the target building;
[0007] Eliminating redundant point cloud data in the complete point cloud data to obtain optimized complete point cloud data;
[0008] Based on a preset surface reconstruction technology, the optimized complete point cloud data is converted into a continuous triangular mesh to obtain a reconstructed surface model;
[0009] The reconstructed surface model is used to generate a Building Information Model (BIM) of the target building.
[0010] In an optional implementation, the step of acquiring the point cloud data of the target building and the point cloud data of the spherical target, and performing target registration on the point cloud data of the target building based on the point cloud data of the spherical target to obtain the complete point cloud data of the target building includes:
[0011] Acquire point cloud data of the target building and point cloud data of the spherical target respectively collected by a plurality of monitoring points; wherein adjacent monitoring points among the plurality of monitoring points share at least three spherical targets, and the adjacent monitoring points do not include adjacent monitoring points formed by the head and the tail;
[0012] Based on the point cloud data of the spherical target, target registration is performed on the point cloud data of the target building to obtain complete point cloud data of the target building.
[0013] In an optional implementation manner, the removing redundant point cloud data from the complete point cloud data to obtain optimized complete point cloud data includes:
[0014] Performing point cloud cropping processing on the complete point cloud data to obtain first point cloud data;
[0015] Performing point cloud downsampling processing on the first point cloud data to obtain second point cloud data;
[0016] Point cloud filtering is performed on the second point cloud data to obtain optimized complete point cloud data.
[0017] In an optional implementation manner, performing point cloud clipping processing on the complete point cloud data to obtain first point cloud data includes:
[0018] Converting the complete point cloud data into a complete point cloud model of the target building;
[0019] From the complete point cloud model, point cloud data irrelevant to the target building is removed, and unnecessary point cloud data on the target building is removed to obtain first point cloud data.
[0020] In an optional implementation, the point cloud downsampling includes voxel downsampling, and performing point cloud downsampling processing on the first point cloud data to obtain second point cloud data includes:
[0021] Dividing the first point cloud data into a large number of voxels of a preset size;
[0022] From the voxels, determining the feature points corresponding to each voxel;
[0023] Based on the feature points, second point cloud data is determined.
[0024] In an optional implementation, the point cloud filtering includes statistical filtering, and the performing point cloud filtering on the second point cloud data to obtain optimized complete point cloud data includes:
[0025] Determine the density of the neighborhood point clouds corresponding to each point in the second point cloud data;
[0026] If the density is less than a preset density threshold, points corresponding to the density less than the preset density threshold are removed to obtain optimized complete point cloud data.
[0027] In an optional implementation, the preset surface reconstruction technology includes a ball rotation algorithm, and the optimized complete point cloud data is converted into a continuous triangular mesh based on the preset surface reconstruction technology to obtain a reconstructed surface model, including:
[0028] Determine the neighborhood of each point in the optimized complete point cloud data based on a hybrid search strategy of a kd-tree;
[0029] Determining the normal direction of each point in the optimized complete point cloud data based on the neighborhood;
[0030] Based on the normal direction of each point, the optimized complete point cloud data is converted into a continuous triangular mesh using a ball rotation algorithm and a preset radius list to obtain a reconstructed surface model.
[0031] In a second aspect, the present disclosure provides a reverse modeling device, the device comprising:
[0032] An acquisition module, used to acquire point cloud data of a target building and point cloud data of a spherical target, and perform target registration on the point cloud data of the target building based on the point cloud data of the spherical target to obtain complete point cloud data of the target building;
[0033] An optimization module, used to remove redundant point cloud data in the complete point cloud data to obtain optimized complete point cloud data;
[0034] A conversion module, used to convert the optimized complete point cloud data into a continuous triangular mesh based on a preset surface reconstruction technology to obtain a reconstructed surface model;
[0035] A generation module is used to generate a building information model (BIM) of the target building using the reconstructed surface model.
[0036] In a third aspect, the present disclosure provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions, and when the instructions are executed on a terminal device, the terminal device implements the above method.
[0037] In a fourth aspect, the present disclosure provides a reverse modeling device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above method when executing the computer program.
[0038] In a fifth aspect, the present disclosure provides a computer program product, wherein the computer program product comprises a computer program / instructions, and the computer program / instructions implement the above method when executed by a processor.
[0039] Compared with the prior art, the technical solution provided by the embodiments of the present disclosure has at least the following advantages:
[0040] The disclosed embodiment provides a reverse modeling method, which obtains point cloud data of a target building and point cloud data of a spherical target, and performs target registration on the point cloud data of the target building based on the point cloud data of the spherical target to obtain complete point cloud data of the target building, removes redundant point cloud data in the complete point cloud data to obtain optimized complete point cloud data, and based on a preset surface reconstruction technology, converts the optimized complete point cloud data into a continuous triangular mesh to obtain a reconstructed surface model, and uses the reconstructed surface model to generate a building information model (BIM) of the target building. It can be seen that the disclosed embodiment improves the accuracy of the BIM of the target building by removing redundant point cloud data in the complete point cloud data, and then performing surface reconstruction on the obtained optimized complete point cloud data to obtain a reconstructed surface model, and then further determining the building information model (BIM) of the target building based on the reconstructed surface model. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0042] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0043] Figure 1 A flowchart of a reverse modeling method provided by an embodiment of the present disclosure;
[0044] Figure 2 A schematic diagram of a target building provided in an embodiment of the present disclosure;
[0045] Figure 3 A schematic diagram of the structure of a reverse modeling device provided in an embodiment of the present disclosure;
[0046] Figure 4 A schematic diagram of the structure of a reverse modeling device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0047] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.
[0048] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.
[0049] BIM technology has been around for about 20 years since its conception. It can be said to be an emerging technology. For old communities built before 2000, very few of them use BIM technology. Most buildings in old communities do not have BIM 3D models archived. This has caused a lot of difficulties for smart cities and other fields that urgently need to quickly establish 3D models of various buildings and structures in urban areas or even cities. On the one hand, BIM modeling is slow, and 3D modeling of old communities will consume a lot of time, manpower, material resources, and financial resources; on the other hand, the construction years of old communities are different, and it is difficult to retrieve drawings in archives. Some older buildings have even lost their drawings, which greatly hinders BIM modeling.
[0050] Therefore, a BIM reverse modeling method is needed for old communities.
[0051] However, the current BIM reverse modeling of old buildings directly imports the point cloud data of the old buildings into the building information modeling software Revit for reverse modeling, resulting in low BIM accuracy of the old buildings. Therefore, how to improve the BIM accuracy of old buildings has become a technical problem that needs to be solved urgently.
[0052] In order to improve the accuracy of BIM of a target building, an embodiment of the present disclosure provides a reverse modeling method.
[0053] Specifically, the point cloud data of the target building and the point cloud data of the spherical target are obtained, and the point cloud data of the target building is registered based on the point cloud data of the spherical target to obtain the complete point cloud data of the target building, and the redundant point cloud data in the complete point cloud data is eliminated to obtain the optimized complete point cloud data, and based on the preset surface reconstruction technology, the optimized complete point cloud data is converted into a continuous triangular mesh to obtain a reconstructed surface model, and the reconstructed surface model is used to generate the building information model BIM of the target building. It can be seen that the embodiment of the present disclosure improves the accuracy of the BIM of the target building by eliminating the redundant point cloud data in the complete point cloud data, and then performing surface reconstruction on the obtained optimized complete point cloud data to obtain a reconstructed surface model, and then further determining the building information model BIM of the target building based on the reconstructed surface model.
[0054] Based on this, the present disclosure provides a reverse modeling method, referring to Figure 1, is a flow chart of a reverse modeling method provided by an embodiment of the present disclosure, the method comprising:
[0055] S101: acquiring point cloud data of a target building and point cloud data of a spherical target, and performing target registration on the point cloud data of the target building based on the point cloud data of the spherical target to obtain complete point cloud data of the target building.
[0056] Among them, the target building may refer to old residential areas, such as those built before 2000.
[0057] In the disclosed embodiment, the point cloud data of the target building and the point cloud data of the spherical target can be acquired based on a 3D laser scanner, such as a Leica 3D laser scanner. After acquiring the point cloud data of the target building and the point cloud data of the spherical target, the point cloud data of the target building can be aligned with the point cloud data of the spherical target using point cloud data processing software cyclone to obtain complete point cloud data of the target building.
[0058] In an optional implementation, point cloud data of the target building and point cloud data of the spherical target collected by multiple monitoring points are obtained, and based on the point cloud data of the spherical target, the point cloud data of the target building is aligned to obtain complete point cloud data of the target building.
[0059] Among them, adjacent monitoring points among the multiple monitoring points share at least three spherical targets, and the adjacent monitoring points do not include adjacent monitoring points formed by the head and the tail.
[0060] In the disclosed embodiment, in order to improve the registration accuracy, adjacent monitoring points among multiple monitoring points share at least three spherical targets. Specifically, adjacent monitoring points do not include adjacent monitoring points formed by the head and the tail, which means that the first monitoring point and the last monitoring point do not constitute adjacent monitoring points.
[0061] In the disclosed embodiment, target registration means converting the point cloud data of the target building collected by each monitoring point into the same coordinate system based on the point cloud data of at least three spherical targets shared between adjacent monitoring points to obtain complete point cloud data of the target building.
[0062] In the embodiment of the present disclosure, after the target building is determined, the influence of tree occlusion can be reduced by setting up the station reasonably. Figure 2 , is a schematic diagram of setting up a target building provided by an embodiment of the present disclosure, such as Figure 2As shown in the figure, the monitoring points are set up to reduce the impact of tree shading. After determining the site (i.e., monitoring point), it is also necessary to determine the placement of the spherical target. After placing the spherical target, set the scanning parameters of the 3D laser scanner, such as the field of view angle and resolution. After completing the scanning of the target building at each station, it is also necessary to observe the spherical target, and then obtain the point cloud data of the target building and the point cloud data of the spherical target collected by multiple monitoring points.
[0063] Furthermore, after obtaining the point cloud data of the target building and the point cloud data of the spherical target respectively collected by multiple monitoring points, cyclone is used to perform target registration on the point cloud data of the target building based on the point cloud data of the spherical target to obtain the complete point cloud data of the target building.
[0064] Specifically, the steps for target registration using cyclone are as follows:
[0065] First, in the cyclone software, right-click on the small computer icon under Servers and select "Databases".
[0066] In the pop-up menu, click "Add" to create a new .imp file, and import all the point cloud files obtained by scanning (that is, the point cloud data of the target building and the point cloud data of the spherical target collected by multiple monitoring points) into the newly created .imp file.
[0067] Right-click the newly created .imp file, select "Create-Registration", then double-click the newly created Registration project to import the point cloud file that needs to be registered.
[0068] In the Constraint column, select "Auto-Add constraints (target ID only)" to import the point cloud data of the spherical target marked in each point cloud file (the file corresponding to the point cloud data of the target building and the point cloud data of the spherical target collected at each monitoring point).
[0069] Select “Register” under Registration to calculate the error between spherical targets.
[0070] On the premise of ensuring that there are at least three common targets between every two monitoring points, spherical targets with large errors can be deleted to improve the registration accuracy. The error needs to be recalculated each time the point cloud data corresponding to the spherical target is deleted.
[0071] After determining the required point cloud data of the spherical target, click “Create ScanWorld / Freeze Registration” in Registration to freeze the point cloud data of the spherical target.
[0072] Select Registration again and click “Create and Open Model Space” to obtain the registered point cloud data (that is, the complete point cloud data of the target building).
[0073] Finally, you can export the required .txt file format through the "Export" function in the File menu.
[0074] S102: Eliminate redundant point cloud data in the complete point cloud data to obtain optimized complete point cloud data.
[0075] In the disclosed embodiment, in order to improve the BIM accuracy of the target building, it is also necessary to eliminate redundant point cloud data in the complete point cloud data of the target building to obtain optimized complete point cloud data.
[0076] In an optional implementation, the complete point cloud data is cropped to obtain the first point cloud data, the first point cloud data is then downsampled to obtain the second point cloud data, and finally the second point cloud data is filtered to obtain the optimized complete point cloud data.
[0077] Among them, point cloud clipping processing refers to removing redundant point cloud data contained in the complete point cloud data, such as trees that cause occlusion, window fences installed by residents, and other buildings collected due to field of view, which cannot be removed by filtering methods.
[0078] In an optional implementation, the complete point cloud data is converted into a complete point cloud model of the target building, point cloud data irrelevant to the target building is removed from the complete point cloud model, and unnecessary point cloud data on the target building is removed to obtain the first point cloud data.
[0079] In the disclosed embodiment, the point cloud data unrelated to the target building includes point cloud data corresponding to spherical targets, trees, other buildings, and outliers in the distance.
[0080] In the disclosed embodiment, unnecessary point cloud data on the target building include point cloud data corresponding to window fences and balcony fences, respectively.
[0081] Correspondingly, the first point cloud data is data that only contains the three-dimensional information of the target building.
[0082] In the disclosed embodiment, point cloud cropping processing may be performed on the complete point cloud data based on the three-dimensional point cloud processing software cloudcompare.
[0083] Specifically, the steps for using cloudcompare to clip point clouds are as follows:
[0084] In CloudCompare, in order not to affect the original file, you can click the "Clone" button to copy a new point cloud file and close the original file.
[0085] Select the copied point cloud file and use the “Segment” function button to crop out useless noise points around the target building, such as trees, other buildings, and outliers in the distance.
[0086] When only the target building is left in the point cloud file, since the surface of the target building is usually uneven, this feature can be used for further segmentation. For a group of buildings on the same plane, the iron fences outside the windows are cut out and the air conditioners and pipes are retained.
[0087] Finally, the cropped point cloud file (i.e. the file corresponding to the first point cloud data) can be saved in .txt format.
[0088] Furthermore, after obtaining the first point cloud data, the first point cloud data is continued to be subjected to point cloud downsampling processing to obtain the second point cloud data. In an optional implementation, when the point cloud downsampling is voxel downsampling, the first point cloud data is divided into a large number of voxels of a preset size, and from the voxels, the feature points corresponding to each voxel are determined, and based on the feature points, the second point cloud data is determined.
[0089] In the disclosed embodiment, the preset size refers to the size of the small cube unit used to divide the point cloud space during the voxel downsampling process. The size is pre-set and can be determined based on the density of the point cloud data, the required resolution, and the processing target.
[0090] In the disclosed embodiment, only the feature points may be retained to obtain the second point cloud data.
[0091] In the disclosed embodiment, the feature point includes a point selected from each voxel, which is used to represent the point cloud in the corresponding voxel, such as the center of gravity of the point in the voxel.
[0092] When processing point cloud data, we usually face the problems of long calculation time and overfitting. In order to solve this problem, it is usually necessary to downsample the point cloud data and replace a large amount of point cloud data with a small number of representative point clouds, thereby accelerating feature extraction while retaining features, reducing the processing of similar point cloud data, and improving robustness and noise resistance, as well as registration accuracy.
[0093] Voxel downsampling simplifies point cloud data by reducing the number of points in the point cloud data while retaining the feature information of the original point cloud.
[0094] Specifically, the steps are as follows:
[0095] Divide voxels: divide the first point cloud data into a large number of voxels (i.e., small cubes in three-dimensional space) according to a preset size, and each voxel contains a group of point cloud data points.
[0096] Determine feature points: In each voxel, determine a feature point to represent all the points in the voxel, such as by calculating the center of gravity of the points in the voxel
[0097] Generate second point cloud data: Generate a new point cloud data, i.e., the second point cloud data, based on the feature points of all voxels.
[0098] In practical applications, voxel downsampling can be implemented based on the programming language Python. The specific steps are as follows:
[0099] In Python, the open source 3D data processing library Open3D and NumPy library are referenced, and a function named txt_to_ply is defined. The function of this function is to use NumPy's loadtxt function to read the .txt file and convert it into a point cloud object that can be processed by Open3D. Use NumPy's loadtxt function to read the .txt file. After reading, use the function of Open3D to convert the .txt file (i.e. the .txt file corresponding to the first point cloud data) into a .ply file (i.e. the .ply file corresponding to the first point cloud data) and save it.
[0100] Perform voxel downsampling: After saving the file in .ply file format, first use the Open3D read_point_cloud function to read the .ply file and determine the number of point clouds. Then, set the voxel size (for example, the preset size is 0.05 meters, and the unit is the same as the unit in the point cloud model (such as meters). The preset size can be adjusted according to the size and accuracy requirements of the actual model), and call the downsampling function provided by Open3D for processing.
[0101] Finally, use Open3D's write_point_cloud function to save the downsampled point cloud data (i.e., the second point cloud data) in .pcd format.
[0102] Exemplarily, assuming that the number of points in the first point cloud data is 18,901,223, and a voxel with a preset size of 0.05 meters (ie, a voxel programmed as 0.05 meters) is used, after downsampling, the number of points in the second point cloud data obtained is 1,146,451.
[0103] Furthermore, after determining the second point cloud data, it is necessary to perform point cloud filtering on the second point cloud data to obtain optimized complete point cloud data. In an optional implementation, when the point cloud filtering is statistical filtering, the density of each point in the second point cloud data and its corresponding neighborhood point cloud is determined. If the density is less than a preset density threshold, the points with a density less than the preset density threshold are eliminated to obtain optimized complete point cloud data.
[0104] In 3D laser scanning, measurement noise will produce sparse outliers, which will increase the computational complexity when estimating local features, leading to erroneous values and failure to generate point cloud surfaces. Statistical filtering is an effective method to remove obvious outliers. Since outliers are sparsely distributed in space and convey little information, they can be regarded as useless information and ignored.
[0105] Point cloud filtering refers to the process of processing point cloud data through algorithms to eliminate noise points, abnormal points and outliers and retain valid information points. This process helps to improve data quality and accuracy.
[0106] Among them, the domain point cloud refers to a point cloud set consisting of a preset number of points closest to a specific point in the second point cloud data. For example, if the preset number is k, that is, for a specific point, the k points closest to the point can be selected to form its corresponding neighborhood point cloud.
[0107] In the disclosed embodiment, in the statistical filtering process, it is first necessary to determine the density of each point in the second point cloud data and its corresponding neighborhood point cloud (i.e., a preset number of points closest to the point). If the density is less than a preset density threshold, it indicates that the point is an invalid point. The points corresponding to the points with a density less than the preset density threshold are eliminated to obtain the optimized complete point cloud data.
[0108] The preset density threshold is used to characterize the density threshold of the neighborhood point cloud of the point in the second point cloud data. Specifically, the preset density threshold can be set based on demand.
[0109] In the embodiments of the present disclosure, this can be achieved based on the following methods:
[0110] Considering the sparse distribution characteristics of outliers in space, it can be understood that the point cloud density around the outliers is very small. Therefore, the outliers are removed by defining that the density of a point and its corresponding field point cloud is less than a preset density threshold.
[0111] Specifically, a statistical analysis is performed on the neighborhood point cloud of each point in the second point cloud data, and the average distance from each point to its nearest k points is calculated.
[0112] Assuming that the distances of all points in the second point cloud data form a Gaussian distribution, its shape is determined by the mean μ and the standard deviation σ.
[0113] Assume that the coordinates of the nth point in the second point cloud data are (X n , Y n , Z n ), then the point to any point m(X m , Y m , Z m ) for:
[0114]
[0115] The formula for calculating the average value μ of the distance between each point and any point is:
[0116]
[0117] The standard deviation σ is:
[0118]
[0119] Assume that the standard deviation multiple is std. In the algorithm implementation process, only two thresholds, k and std, need to be input. When the average distance from a point to its nearest k points in the second point cloud data is within the standard range (μ-σ∙std, μ+σ∙std), it indicates that the density of the point and its corresponding neighborhood point cloud is less than the preset density threshold. In this case, the point is retained. Otherwise, the point is deleted as an outlier.
[0120] In practical applications, statistical filtering can be implemented based on Python. The specific steps are as follows:
[0121] Statistical filtering of point cloud data in Python can be implemented using the remove_statistica1_outlier function in Open3D.
[0122] First, use the read_point_cloud function to read the point cloud file (such as the .pcd file corresponding to the second point cloud data mentioned above), assign the read point cloud data to the variable 'pcd', and print the variable 'pcd' to output the number of point clouds in the point cloud file.
[0123] Then, use the remove_statistical_outlier function to perform statistical filtering on the point cloud in the point cloud file. In this process, two parameters need to be set: the number of neighboring points nb_neighbors and the standard deviation ratio std_ratio. The nb_neighbors parameter is used to specify the number of neighboring points when calculating the average distance (i.e., determining the neighborhood point cloud), which can be set to 150. The std_ratio parameter is the standard deviation ratio set based on the standard deviation of the average distance, such as setting it to 2.0. Specifically, the preset standard deviation threshold is determined based on the set standard deviation ratio to determine outliers (i.e., points corresponding to the standard deviation of the average distance exceeding the preset standard deviation threshold).
[0124] After filtering, the filtered point cloud data (i.e. the optimized complete point cloud data) is extracted and assigned to the new variable 'sor_cloud'.
[0125] Finally, use the write_point_cloud function to save the optimized complete point cloud data as a .pcd format file.
[0126] S103: Based on a preset surface reconstruction technology, the optimized complete point cloud data is converted into a continuous triangular mesh to obtain a reconstructed surface model.
[0127] In the disclosed embodiment, Python can be used to convert the optimized complete point cloud data into a continuous triangular mesh based on a preset surface reconstruction technology to obtain a reconstructed surface model.
[0128] In an optional implementation, when the preset surface reconstruction technology is a ball rotation algorithm, the neighborhood of each point in the optimized complete point cloud data can be determined based on a hybrid search strategy of a kd tree, and the normal direction of each point in the optimized complete point cloud data can be determined based on the neighborhood. Based on the normal direction of each point, the ball rotation algorithm and a preset radius list are used to convert the optimized complete point cloud data into a continuous triangular mesh to obtain a reconstructed surface model.
[0129] The preset radius list is a parameter in the ball rotation algorithm, which refers to a set of radius values used when reconstructing at different scales.
[0130] In the disclosed embodiment, when processing the optimized complete point cloud data, the ball rotation algorithm can be selected as the surface reconstruction technology, and the hybrid search strategy of the kd tree can be used to quickly and effectively find the neighborhood of each point in the complete point cloud data. The neighborhood of each point is used to determine the normal direction of each point. Combined with the ball rotation algorithm and the preset radius list, the optimized complete point cloud data is connected into continuous triangular facets to form a triangular mesh. The final generated triangular mesh represents the surface of the object, that is, the surface reconstruction is completed, and the reconstructed surface model is obtained.
[0131] Specifically, the steps for surface reconstruction based on Python are as follows:
[0132] First, import the Open3D library, use the read_point_cloud function to read the point cloud file (that is, the file corresponding to the optimized complete point cloud data, such as the .pcd file mentioned above), assign the read point cloud data to the variable 'pcd', and print the variable 'pcd' to view the number of point clouds in the optimized complete point cloud data.
[0133] Then, the normal is calculated, using the estimate_normals function, and the search parameters are set. Specifically, the kd-tree-based hybrid search is used to find adjacent points, such as setting the search radius to 0.5 meters and considering a maximum of 300 points in the neighborhood (i.e., the determination of the neighborhood).
[0134] After the normal calculation is completed, a preset radius list is defined using the radius list radii, such as [0.5, 0.1, 0.2, 0.5]. These values represent the radius of the three-dimensional sphere used for surface reconstruction. The unit can be consistent with the point cloud model, such as meter.
[0135] Use the ball pivoting algorithm based on point cloud to create a triangular mesh create_from_point_cloud_ball_pivoting function, which uses the ball pivoting algorithm to create a triangular mesh and realize surface reconstruction. This function can generate a triangular mesh by ball pivoting based on a preset radius list.
[0136] Finally, use the write_triangle_mesh function to save the reconstructed surface model in .obj format. The .obj format can be imported by the building information modeling software Revit, which makes it easier to import the reconstructed surface model into Revit for further analysis.
[0137] Among them, the version of Revit is 2023 or above.
[0138] S104: Generate a Building Information Model (BIM) of the target building using the reconstructed surface model.
[0139] Among them, the Building Information Model (BIM) of the target building refers to a digital, multi-dimensional, collaborative representation of the physical and functional characteristics of the target building.
[0140] In the disclosed embodiment, the reconstructed surface model may be imported into Revit to obtain a building information model (BIM) of the target building.
[0141] In the reverse modeling method provided by the embodiment of the present disclosure, the point cloud data of the target building and the point cloud data of the spherical target are obtained, and the point cloud data of the target building is registered based on the point cloud data of the spherical target to obtain the complete point cloud data of the target building, and the redundant point cloud data in the complete point cloud data is eliminated to obtain the optimized complete point cloud data, and based on the preset surface reconstruction technology, the optimized complete point cloud data is converted into a continuous triangular mesh to obtain a reconstructed surface model, and the reconstructed surface model is used to generate the building information model BIM of the target building. It can be seen that the embodiment of the present disclosure improves the accuracy of the BIM of the target building by eliminating the redundant point cloud data in the complete point cloud data, and then performing surface reconstruction on the obtained optimized complete point cloud data to obtain a reconstructed surface model, and then further determining the building information model BIM of the target building based on the reconstructed surface model.
[0142] Based on the above method embodiment, the present disclosure also provides a reverse modeling device, referring to Figure 3 , is a schematic diagram of the structure of a reverse modeling device provided in an embodiment of the present disclosure, the device comprising:
[0143] An acquisition module 301 is used to acquire point cloud data of a target building and point cloud data of a spherical target, and perform target registration on the point cloud data of the target building based on the point cloud data of the spherical target to obtain complete point cloud data of the target building;
[0144] An optimization module 302 is used to remove redundant point cloud data in the complete point cloud data to obtain optimized complete point cloud data;
[0145] A conversion module 303 is used to convert the optimized complete point cloud data into a continuous triangular mesh based on a preset surface reconstruction technology to obtain a reconstructed surface model;
[0146] The generating module 304 is used to generate a building information model (BIM) of the target building using the reconstructed surface model.
[0147] In an optional implementation, the acquisition module 301 includes:
[0148] An acquisition submodule, used to acquire point cloud data of a target building and point cloud data of a spherical target respectively collected by a plurality of monitoring points; wherein adjacent monitoring points among the plurality of monitoring points share at least three spherical targets, and the adjacent monitoring points do not include adjacent monitoring points formed by the head and the tail;
[0149] The registration submodule is used to perform target registration on the point cloud data of the target building based on the point cloud data of the spherical target to obtain complete point cloud data of the target building.
[0150] In an optional implementation manner, the optimization module 302 includes:
[0151] A first processing submodule is used to perform point cloud clipping processing on the complete point cloud data to obtain first point cloud data;
[0152] A second processing submodule, configured to perform point cloud downsampling processing on the first point cloud data to obtain second point cloud data;
[0153] The third processing submodule is used to perform point cloud filtering processing on the second point cloud data to obtain optimized complete point cloud data.
[0154] In an optional implementation, the first processing submodule includes:
[0155] A conversion submodule, used for converting the complete point cloud data into a complete point cloud model of the target building;
[0156] The first elimination submodule is used to eliminate point cloud data irrelevant to the target building from the complete point cloud model, and eliminate unnecessary point cloud data on the target building to obtain first point cloud data.
[0157] In an optional implementation, the point cloud downsampling includes voxel downsampling, and the second processing submodule includes:
[0158] A division submodule, used for dividing the first point cloud data into a large number of voxels of preset sizes;
[0159] A first determination submodule is used to determine, from the voxels, the feature points corresponding to each voxel;
[0160] The second determining submodule is used to determine second point cloud data based on the feature points.
[0161] In an optional implementation, the point cloud filtering includes statistical filtering, and the third processing submodule includes:
[0162] A third determination submodule is used to determine the density of the neighborhood point clouds corresponding to each point in the second point cloud data;
[0163] The second elimination submodule is used to eliminate points whose density is less than a preset density threshold when the density is less than the preset density threshold, so as to obtain optimized complete point cloud data.
[0164] In an optional implementation, the preset surface reconstruction technology includes a ball rotation algorithm, and the conversion module 303 includes:
[0165] A fourth determination submodule is used to determine the neighborhood of each point in the optimized complete point cloud data based on a hybrid search strategy of a kd tree;
[0166] a fifth determination submodule, configured to determine the normal direction of each point in the optimized complete point cloud data based on the neighborhood;
[0167] The conversion submodule is used to convert the optimized complete point cloud data into a continuous triangular mesh based on the normal direction of each point, using a spherical rotation algorithm and a preset radius list, to obtain a reconstructed surface model.
[0168] In the reverse modeling device provided by the embodiment of the present disclosure, the point cloud data of the target building and the point cloud data of the spherical target are obtained, and the point cloud data of the target building is registered based on the point cloud data of the spherical target to obtain the complete point cloud data of the target building, and the redundant point cloud data in the complete point cloud data is eliminated to obtain the optimized complete point cloud data, and based on the preset surface reconstruction technology, the optimized complete point cloud data is converted into a continuous triangular mesh to obtain a reconstructed surface model, and the reconstructed surface model is used to generate the building information model BIM of the target building. It can be seen that the embodiment of the present disclosure improves the accuracy of the BIM of the target building by eliminating the redundant point cloud data in the complete point cloud data, and then performing surface reconstruction on the obtained optimized complete point cloud data to obtain a reconstructed surface model, and then further determining the building information model BIM of the target building based on the reconstructed surface model.
[0169] In addition to the above-mentioned method and apparatus, the embodiments of the present disclosure further provide a computer-readable storage medium, in which instructions are stored. When the instructions are executed on a terminal device, the terminal device implements the reverse modeling method described in the embodiments of the present disclosure.
[0170] The embodiment of the present disclosure further provides a computer program product, which includes a computer program / instructions. When the computer program / instructions are executed by a processor, the reverse modeling method described in the embodiment of the present disclosure is implemented.
[0171] In addition, the present disclosure also provides a reverse modeling device, see Figure 4 As shown, it may include:
[0172] Processor 401, memory 402, input device 403 and output device 404. The number of processors 401 in the reverse modeling device can be one or more. Figure 4 In some embodiments of the present disclosure, the processor 401, the memory 402, the input device 403 and the output device 404 may be connected via a bus or other means, wherein: Figure 4 The example of connecting through bus is taken in the following.
[0173] The memory 402 can be used to store software programs and modules. The processor 401 executes various functional applications and data processing of the reverse modeling device by running the software programs and modules stored in the memory 402. The memory 402 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application required for a function, etc. In addition, the memory 402 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. The input device 403 can be used to receive input digital or character information, and generate signal input related to user settings and function control of the reverse modeling device.
[0174] Specifically in this embodiment, the processor 401 will load the executable files corresponding to the processes of one or more applications into the memory 402 according to the following instructions, and the processor 401 will run the applications stored in the memory 402, thereby realizing the various functions of the above-mentioned reverse modeling device.
[0175] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0176] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A reverse modeling method, characterized in that: The method comprises: Acquire point cloud data of a target building and point cloud data of a spherical target, and perform target registration on the point cloud data of the target building based on the point cloud data of the spherical target to obtain complete point cloud data of the target building, wherein the target building includes an old residential area; Eliminating redundant point cloud data in the complete point cloud data to obtain optimized complete point cloud data; Based on a preset surface reconstruction technology, the optimized complete point cloud data is converted into a continuous triangular mesh to obtain a reconstructed surface model; Generate a Building Information Model (BIM) of the target building using the reconstructed surface model; The step of removing redundant point cloud data from the complete point cloud data to obtain optimized complete point cloud data includes: Using the three-dimensional point cloud processing software cloudcompare, the complete point cloud data is subjected to point cloud cropping processing to obtain first point cloud data, wherein the point cloud cropping processing is used to remove redundant point cloud data in the complete point cloud data that cannot be removed by filtering methods and is collected due to occlusions and field of view angles; Using Python to perform point cloud downsampling processing on the first point cloud data to obtain second point cloud data; The python is used to perform point cloud filtering processing on the second point cloud data to obtain optimized complete point cloud data.
2. The method according to claim 1, characterized in that The step of acquiring the point cloud data of the target building and the point cloud data of the spherical target, and performing target registration on the point cloud data of the target building based on the point cloud data of the spherical target to obtain the complete point cloud data of the target building includes: Acquire point cloud data of the target building and point cloud data of the spherical target respectively collected by a plurality of monitoring points; wherein adjacent monitoring points among the plurality of monitoring points share at least three spherical targets, and the adjacent monitoring points do not include adjacent monitoring points formed by the head and the tail; Based on the point cloud data of the spherical target, target registration is performed on the point cloud data of the target building to obtain complete point cloud data of the target building.
3. The method according to claim 1, characterized in that The step of performing point cloud clipping processing on the complete point cloud data to obtain first point cloud data includes: Converting the complete point cloud data into a complete point cloud model of the target building; From the complete point cloud model, point cloud data irrelevant to the target building is removed, and unnecessary point cloud data on the target building is removed to obtain first point cloud data.
4. The method according to claim 1, characterized in that: The point cloud downsampling includes voxel downsampling, and the performing point cloud downsampling processing on the first point cloud data to obtain second point cloud data includes: Dividing the first point cloud data into a large number of voxels of a preset size; From the voxels, determining the feature points corresponding to each voxel; Based on the feature points, second point cloud data is determined.
5. The method according to claim 1, characterized in that The point cloud filtering includes statistical filtering, and the point cloud filtering processing is performed on the second point cloud data to obtain optimized complete point cloud data, including: Determine the density of the neighborhood point clouds corresponding to each point in the second point cloud data; If the density is less than a preset density threshold, points corresponding to the density less than the preset density threshold are removed to obtain optimized complete point cloud data.
6. The method according to claim 1, characterized in that The preset surface reconstruction technology includes a ball rotation algorithm. Based on the preset surface reconstruction technology, the optimized complete point cloud data is converted into a continuous triangular mesh to obtain a reconstructed surface model, including: Determine the neighborhood of each point in the optimized complete point cloud data based on a hybrid search strategy of a kd-tree; Determining the normal direction of each point in the optimized complete point cloud data based on the neighborhood; Based on the normal direction of each point, the optimized complete point cloud data is converted into a continuous triangular mesh using a ball rotation algorithm and a preset radius list to obtain a reconstructed surface model.
7. A reverse modeling device, characterized in that: The device comprises: An acquisition module, used to acquire point cloud data of a target building and point cloud data of a spherical target, and perform target registration on the point cloud data of the target building based on the point cloud data of the spherical target to obtain complete point cloud data of the target building, wherein the target building includes an old residential area; An optimization module, used to remove redundant point cloud data in the complete point cloud data to obtain optimized complete point cloud data; A conversion module, used to convert the optimized complete point cloud data into a continuous triangular mesh based on a preset surface reconstruction technology to obtain a reconstructed surface model; A generating module, used for generating a building information model (BIM) of the target building by using the reconstructed surface model; The optimization module includes: The first processing submodule is used to perform point cloud clipping processing on the complete point cloud data using the three-dimensional point cloud processing software cloudcompare to obtain first point cloud data, wherein the point cloud clipping processing is used to remove redundant point cloud data in the complete point cloud data that cannot be removed by filtering methods and is collected due to occlusions and field of view angles; A second processing submodule is used to perform point cloud downsampling processing on the first point cloud data using Python to obtain second point cloud data; The third processing submodule is used to use the python to perform point cloud filtering processing on the second point cloud data to obtain optimized complete point cloud data.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, and when the instructions are executed on a terminal device, the terminal device implements the method according to any one of claims 1 to 6.
9. A reverse modeling device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method according to any one of claims 1 to 6 is implemented.
