Three-dimensional modeling method and computer device
By combining laser scanning and real-scene shooting data, data preprocessing, point cloud fusion, segmentation and filtering are solved, which solves the problems of accuracy and heavy calculation in the existing 3D scanning modeling methods, and achieves more efficient 3D construction. Modeling and rendering effects.
Patent Information
- Application Number
- CN202410808855.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-21
- Publication Date
- 2024-09-06
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing 3D scanning modeling methods have problems with accuracy deviation and large computer calculations through laser scanning or image shooting, resulting in 3D modeling distortion or increased rendering time.
Use a laser scanner and camera to scan and shoot at the same time. Through data preprocessing and point cloud fusion, segmentation, filtering and material filling, a more complete and accurate 3D modeling is generated. The data from laser scanning and real-life shooting is combined to reduce rendering time. and improve model realism.
It improves the accuracy and realism of 3D modeling, reduces the color difference of rendering, avoids software crashes through partitioned rendering, optimizes point cloud data processing, and reduces rendering time.
Smart Images

Figure CN118608699A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of three-dimensional modeling, and in particular to a three-dimensional modeling method and a computer device. Background Art
[0002] 3D modeling is a technology for creating 3D objects and scenes. It is widely used in game development, animation production, virtual reality and other fields. The basic process includes initial conception, basic modeling, detail addition, UV mapping and texturing, material and lighting settings and final rendering.
[0003] 3D scanning modeling is the process of using 3D scanning technology to obtain the geometric data of real-world objects and convert them into digital 3D models. This technology captures the surface shape and details of objects through laser scanning, optical scanning or photographic scanning. The acquired data can be directly used for modeling, design, documentation or manufacturing.
[0004] 3D scanning modeling is widely used in cultural relics protection, industrial design, medical treatment and cultural heritage protection.
[0005] However, the existing three-scanning modeling has the following problems:
[0006] Existing 3D scanning modeling generally uses laser scanners and image shooting methods for modeling, but both have certain disadvantages:
[0007] 3D scanning is transmitted through a laser scanner. A laser source, usually a diode laser, is contained inside the laser scanner. The laser source emits a narrow laser beam, which passes through the scanning system and covers the area to be scanned at a certain angle and step. Although this method can accurately scan a large range, manual filling is required during the later modeling. If the filling is deviated, the 3D modeling will be distorted.
[0008] Image capture is to shoot the panoramic view of the building from multiple angles, and finally use the computer to recognize and generate a three-dimensional model. Although this method can restore the appearance of the building more realistically, it requires taking pictures from multiple perspectives, which will increase the computer's computing power and thus increase the rendering time. Summary of the invention
[0009] In order to solve the above technical problems, the present invention adopts the following technical solutions:
[0010] A three-dimensional modeling method and a computer device, which are applied to three-dimensional modeling.
[0011] The three-dimensional modeling method specifically includes data collection, data preprocessing, point cloud fusion and incompleteness, segmentation and modeling, point cloud filtering, three-dimensional modeling generation and three-dimensional modeling material filling:
[0012] S1, the laser scanner and camera scan and photograph the scene at the same time, and obtain the point cloud data generated by the laser scanner (P_{laser}) and the image data taken by the camera (I_{camera});
[0013] S1, the laser scanner and camera scan and photograph the scene at the same time, and obtain the point cloud data generated by the laser scanner (P_{laser}) and the image data taken by the camera (I_{camera});
[0014] S2, laser scanning data and camera image data are preprocessed to ensure that they are aligned in the same coordinate system;
[0015] S3, by comparing the data of laser scanning and camera shooting, fill in the missing parts in the point cloud and generate a more complete point cloud map;
[0016] S4, split the complete point cloud data (P_{complete}) into multiple subsets, and perform 3D modeling on these subsets to obtain sub-models (Mi);
[0017] S5, selecting the retained points from the overall model according to the node positions and the characteristics of the plane point cloud;
[0018] S6. Merge the retained point clouds to obtain the final filtered point cloud data (P_{filtered};
[0019] S7. Extract point cloud data (P_{filtered}) from the complete 3D modeling file (M_{complete})
[0020] S8. Use the image data taken by the camera to fill and render the three-dimensional model with materials, extract texture information from the camera image (I_{camera}), and map it to the surface of the three-dimensional model (M_{complete}).
[0021] As a preferred implementation of the three-dimensional modeling method provided by the present invention, the laser scanner in S1 scans the target to obtain high-density point cloud data (P_{laser}), which contains geometric information of the target surface, and uses a high-resolution camera to capture multiple perspective images of the target (I_{camera});
[0022] The S2 image provides color and texture information of the target surface. When taking camera images, the stability and consistency of camera parameters (such as focal length, aperture, etc.) and the consistency of ambient lighting are ensured to calibrate the laser scanner and ensure that the position and angle of the scanner can be accurately recorded.
[0023] Use equipment Faro Laser Scanner Leica Pegasus: Backpack
[0024] As a preferred implementation of the 3D modeling method provided by the present invention, the laser scanner and camera images in S2 are imported into CloudCompare. When preprocessing the camera image data, the key steps include removing lens distortion, enhancing image quality such as sharpening and defogging, performing image segmentation and feature extraction, and finally registering and compressing the image to meet the application requirements of computer vision, navigation and map construction. The optimization of each step is aimed at improving data quality and the effectiveness of subsequent analysis;
[0025] In S3, point cloud data (P_{image_derived}) is extracted from the image, and the point cloud data (P_{laser}) generated by laser scanning and the point cloud data (P_{image_derived}) derived from the image are complemented to obtain a complete point cloud (P_{complete});
[0026] [P_{complete}=P_{laser}\cupP_{image_derived}].
[0027] As a preferred implementation of the three-dimensional modeling method provided by the present invention, S4 divides the complete point cloud data (P_{complete}) into multiple subsets (P_{complete}^{(i)}) and stores a complete three-dimensional modeling file (M_{complete});
[0028] [P_{complete}=\bigcup_{i=1}^{n}P_{complete}^{(i)}]
[0029] [M_{complete}=\text{3D_modeling}(P_{complete})]
[0030] Each subset (P_{complete}^{(i)}) is stored as a separate file and modeled and rendered.
[0031] As a preferred implementation of the three-dimensional modeling method provided by the present invention, the S5 filters out a portion of points in the node position point cloud according to a specified ratio;
[0032] Here, a complete 3D modeling file (M_{complete}) stored separately in S4 is subjected to point cloud screening, and the point cloud at the node position is changed to 20% of the total point cloud. The filtering function can be implemented as follows:
[0033] [P_{\text{filtered_node}}=\text{filter}(P_{\text{node}},0.2)]Here, (\text{filter}(P_{\text{node}},0.2)) means randomly selecting and retaining 20% of the points from (P_{\text{node}});
[0034] Similarly, according to the specified ratio, a portion of the points in the plane point cloud are filtered out. Here, the plane point cloud is changed to 5% of the total point cloud. The filtering function can be implemented as follows:
[0035] [P_{\text{filtered_plane}}=\text{filter}(P_{\text{plane}},0.05)]Here, (\text{filter}(P_{\text{plane}},0.05)) means randomly selecting and retaining 5% of the points from (P_{\text{plane}});
[0036] This point cloud filtering technique is often used to optimize the density of point cloud data or reduce the amount of data for subsequent processing such as modeling, analysis or visualization.
[0037] Using Software CloudCompare
[0038] As a preferred implementation of the three-dimensional modeling method provided by the present invention, S6 obtains the filtered node position point cloud (P_{\text{filtered_node}}) and the plane point cloud (P_{\text{filtered_plane}}) through S5, and merges these two point clouds to obtain the final filtered point cloud data (P_{\text{filtered}}), which can be performed according to the following steps:
[0039] Create an empty point cloud dataset (P_{\text{filtered}});
[0040] Add all points in the node position point cloud (P_{\text{filtered_node}}) to (P_{\text{filtered}});
[0041] Add all points in the plane point cloud (P_{\text{filtered_plane}}) to (P_{\text{filtered}});
[0042] Through the above steps, the node point cloud and the plane point cloud can be merged to obtain the final filtered point cloud data (P_{\text{filtered}}), which contains the points filtered from the node position and the plane point cloud.
[0043] As a preferred implementation of the three-dimensional modeling method provided by the present invention, S8 can use computer vision technology to process and analyze the image according to the image taken by the camera in S1 ((I_{\text{camera}})), and perform feature extraction, color analysis or texture analysis on the image to obtain material information in the image, and the material information may include color, texture, lighting, etc.;
[0044] The material information extracted from the camera image is applied to the 3D model ((M_{\text{filtered}})), and a realistic image is generated using rendering technology based on the geometric structure and material information of the 3D model. Rendering can include processing such as lighting modeling, shadow calculation, and texture mapping to produce realistic rendering results.
[0045] The memory stores a computer program, and when the computer program is executed by the processor, the processor executes the three-dimensional modeling method according to any one of claims 1 to 7.
[0046] Compared with the prior art, the present invention has the following beneficial effects:
[0047] The 3D modeling method and computer device provided by the present invention combine laser scanning with real-scene photography. After the laser scanning identifies and generates a point cloud map of a building, the real-scene photography only needs to take a small number of photos for appearance recognition and rendering filling. The combination of the two can improve the accuracy of 3D modeling while reducing the color difference of the rendered image, thereby increasing the realism of 3D modeling. At the same time, after the point cloud map is generated, it is divided into two paths. The first path filters the point cloud map of the building, thereby reducing the rendering time. The second path cuts the point cloud map, thereby restoring the 3D model of the building with higher accuracy. After the cloud map is cut, it can be rendered in partitions, thereby avoiding software crashes caused by excessively large rendering models. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the scheme of the present invention, a brief introduction is given below to the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0049] Figure 1 A schematic diagram of the overall process of the three-dimensional modeling method provided by the present invention;
[0050] Figure 2 A schematic diagram of the three-dimensional modeling process of the three-dimensional modeling method provided by the present invention;
[0051] Figure 3 A schematic diagram of a point cloud filtering operation of three-dimensional modeling in the three-dimensional modeling method provided by the present invention;
[0052] Figure 4 A schematic diagram of a subset segmentation operation of three-dimensional modeling in the three-dimensional modeling method provided by the present invention;
[0053] Figure 5 A schematic diagram of the flow of the three-dimensional modeling computer device provided by the present invention. DETAILED DESCRIPTION
[0054] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0055] In order to solve this technical problem, the present invention provides a three-dimensional modeling method and a computer device, which are applied to three-dimensional modeling.
[0056] The three-dimensional modeling method and computer device include data collection, data preprocessing, point cloud fusion and incompleteness, segmentation and modeling, point cloud filtering, three-dimensional modeling generation and three-dimensional modeling material filling:
[0057] S1, the laser scanner and camera scan and photograph the scene at the same time, and obtain the point cloud data generated by the laser scanner (P_{laser}) and the image data taken by the camera (I_{camera});
[0058] S1, the laser scanner and camera scan and photograph the scene at the same time, and obtain the point cloud data generated by the laser scanner (P_{laser}) and the image data taken by the camera (I_{camera});
[0059] S2, laser scanning data and camera image data are preprocessed to ensure that they are aligned in the same coordinate system;
[0060] S3, by comparing the data of laser scanning and camera shooting, fill in the missing parts in the point cloud and generate a more complete point cloud map;
[0061] S4, split the complete point cloud data (P_{complete}) into multiple subsets, and perform 3D modeling on these subsets to obtain sub-models (Mi);
[0062] S5, selecting the retained points from the overall model according to the node positions and the characteristics of the plane point cloud;
[0063] S6. Merge the retained point clouds to obtain the final filtered point cloud data (P_{filtered};
[0064] S7. Extract point cloud data (P_{filtered}) from the complete 3D modeling file (M_{complete})
[0065] S8. Use the image data taken by the camera to fill and render the three-dimensional model with materials, extract texture information from the camera image (I_{camera}), and map it to the surface of the three-dimensional model (M_{complete}).
[0066] In S1, a laser scanner scans the target to obtain high-density point cloud data (P_{laser}), which contains the geometric information of the target surface, and uses a high-resolution camera to capture multiple perspective images of the target (I_{camera});
[0067] The S2 image provides the color and texture information of the target surface. When taking camera images, the stability and consistency of camera parameters (such as focal length, aperture, etc.) and the consistency of ambient lighting are ensured to calibrate the laser scanner and ensure that the position and angle of the scanner can be accurately recorded.
[0068] The laser scanner and camera images in S2 are imported into CloudCompare. When preprocessing the camera image data, the key steps include removing lens distortion, enhancing image quality such as sharpening and defogging, performing image segmentation and feature extraction, and finally registering and compressing the image to meet the application requirements of computer vision, navigation, and map construction. The optimization of each step is aimed at improving data quality and the effectiveness of subsequent analysis;
[0069] In S3, point cloud data (P_{image_derived}) is extracted from the image, and the point cloud data generated by laser scanning (P_{laser}) and the point cloud data derived from the image (P_{image_derived}) are complemented to obtain a complete point cloud (P_{complete});
[0070] [P_{complete}=P_{laser}\cupP_{image_derived}].
[0071] S4 divides the complete point cloud data (P_{complete}) into multiple subsets (P_{complete}^{(i)}) and stores a complete 3D modeling file (M_{complete});
[0072] [P_{complete}=\bigcup_{i=1}^{n}P_{complete}^{(i)}]
[0073] [M_{complete}=\text{3D_modeling}(P_{complete})]
[0074] Each subset (P_{complete}^{(i)}) is stored as a separate file and modeled and rendered.
[0075] S5 filters out a portion of points in the node position point cloud according to a specified ratio;
[0076] Here, a complete 3D modeling file (M_{complete}) stored separately in S4 is filtered for point cloud, and the point cloud at the node position is changed to 20% of the total point cloud. The filtering function can be implemented as follows:
[0077] [P_{\text{filtered_node}}=\text{filter}(P_{\text{node}},0.2)]Here, (\text{filter}(P_{\text{node}},0.2)) means randomly selecting and retaining 20% of the points from (P_{\text{node}});
[0078] Similarly, according to the specified ratio, a portion of the points in the plane point cloud are filtered out. Here, the plane point cloud is changed to 5% of the total point cloud. The filtering function can be implemented as follows:
[0079] [P_{\text{filtered_plane}}=\text{filter}(P_{\text{plane}},0.05)]Here, (\text{filter}(P_{\text{plane}},0.05)) means randomly selecting and retaining 5% of the points from (P_{\text{plane}});
[0080] This point cloud filtering technique is often used to optimize the density of point cloud data or reduce the amount of data for subsequent processing such as modeling, analysis or visualization.
[0081] S6 obtains the filtered node position point cloud (P_{\text{filtered_node}}) and plane point cloud (P_{\text{filtered_plane}}) through S5. The two point clouds are merged to obtain the final filtered point cloud data (P_{\text{filtered}}). The following steps can be followed:
[0082] Create an empty point cloud dataset (P_{\text{filtered}});
[0083] Add all points in the node position point cloud (P_{\text{filtered_node}}) to (P_{\text{filtered}});
[0084] Add all points in the plane point cloud (P_{\text{filtered_plane}}) to (P_{\text{filtered}});
[0085] Through the above steps, the node point cloud and the plane point cloud can be merged to obtain the final filtered point cloud data (P_{\text{filtered}}), which contains the points filtered from the node position and the plane point cloud.
[0086] S8 can use computer vision technology to process and analyze the image (I_{\text{camera}})) taken by the camera in S1, and perform feature extraction, color analysis or texture analysis on the image to obtain material information in the image. The material information may include color, texture, lighting, etc.;
[0087] The material information extracted from the camera image is applied to the 3D model ((M_{\text{filtered}})), and a realistic image is generated using rendering technology based on the geometric structure and material information of the 3D model. Rendering can include processing such as lighting modeling, shadow calculation, and texture mapping to produce realistic rendering results.
Claims
1. A three-dimensional modeling method, characterized in that: The method includes data collection, data preprocessing, point cloud fusion and incompleteness, segmentation and modeling, point cloud filtering, 3D modeling generation and 3D modeling material filling: S1, the laser scanner and camera scan and photograph the scene at the same time, and obtain the point cloud data generated by the laser scanner (P_{laser}) and the image data taken by the camera (I_{camera}); S2, laser scanning data and camera image data are preprocessed to ensure that they are aligned in the same coordinate system; S3, by comparing the data of laser scanning and camera shooting, fill in the missing parts in the point cloud and generate a more complete point cloud map; S4, split the complete point cloud data (P_{complete}) into multiple subsets, and perform 3D modeling on these subsets to obtain sub-models (Mi); S5, selecting the retained points from the overall model according to the node positions and the characteristics of the plane point cloud; S6. Merge the retained point clouds to obtain the final filtered point cloud data (P_{filtered}; S7. Extract point cloud data (P_{filtered}) from the complete 3D modeling file (M_{complete}) S8. Use the image data taken by the camera to fill and render the three-dimensional model with materials, extract texture information from the camera image (I_{camera}), and map it to the surface of the three-dimensional model (M_{complete}).
2. The three-dimensional modeling method according to claim 1, characterized in that: In S1, the laser scanner scans the target to obtain high-density point cloud data (P_{laser}), which contains geometric information of the target surface, and uses a high-resolution camera to capture multiple perspective images of the target (I_{camera}); The S2 image provides color and texture information of the target surface. When taking camera images, the stability and consistency of camera parameters (such as focal length, aperture, etc.) and the consistency of ambient lighting are ensured to calibrate the laser scanner and ensure that the position and angle of the scanner can be accurately recorded.
3. The three-dimensional modeling method according to claim 1, characterized in that: The laser scanner and camera images in S2 are imported into CloudCompare. When preprocessing the camera image data, the key steps include removing lens distortion, enhancing image quality such as sharpening and defogging, performing image segmentation and feature extraction, and finally registering and compressing the image to meet the application requirements of computer vision, navigation and map construction. The optimization of each step is aimed at improving data quality and the effectiveness of subsequent analysis; In S3, point cloud data (P_{image_derived}) is extracted from the image, and the point cloud data (P_{laser}) generated by laser scanning and the point cloud data (P_{image_derived}) derived from the image are complemented to obtain a complete point cloud (P_{complete}); [P_{complete}=P_{laser}\cupP_{image_derived}].
4. The three-dimensional modeling method according to claim 1, characterized in that: The S4 divides the complete point cloud data (P_{complete}) into multiple subsets (P_{complete}^{(i)}) and stores a complete 3D modeling file (M_{complete}); [P_{complete}=\bigcup_{i=1}^{n}P_{complete}^{(i)}] [M_{complete}=\text{3D_model ing}(P_{complete})] Each subset (P_{complete}^{(i)}) is stored as a separate file and modeled and rendered.
5. The three-dimensional modeling method according to claim 1, characterized in that: The S5 filters out a portion of points in the node position point cloud according to a specified ratio; Here, a complete 3D modeling file (M_{complete}) stored separately in S4 is subjected to point cloud screening, and the point cloud at the node position is changed to 20% of the total point cloud. The filtering function can be implemented as follows: [P_{\text{filtered_node}}=\text{filter}(P_{\text{node}},0.2)]Here, (\text{filter}(P_{\text{node}},0.2)) means randomly selecting and retaining 20% of the points from (P_{\text{node}}); Similarly, according to the specified ratio, a portion of the points in the plane point cloud are filtered out. Here, the plane point cloud is changed to 5% of the total point cloud. The filtering function can be implemented as follows: [P_{\text{filtered_plane}}=\text{filter}(P_{\text{plane}},0.05)]Here, (\text{filter}(P_{\text{plane}},0.05)) means randomly selecting and retaining 5% of the points from (P_{\text{plane}}); This point cloud filtering technique is often used to optimize the density of point cloud data or reduce the amount of data for subsequent processing such as modeling, analysis, or visualization.
6. The three-dimensional modeling method according to claim 1, characterized in that: The S6 obtains the filtered node position point cloud (P_{\text{filtered_node}}) and the plane point cloud (P_{\text{filtered_plane}}) through S5, and merges these two point clouds to obtain the final filtered point cloud data (P_{\text{filtered}}), which can be performed according to the following steps: Create an empty point cloud dataset (P_{\text{filtered}}); Add all points in the node position point cloud (P_{\text{filtered_node}}) to (P_{\text{filtered}}); Add all points in the plane point cloud (P_{\text{filtered_plane}}) to (P_{\text{filtered}}); Through the above steps, the node point cloud and the plane point cloud can be merged to obtain the final filtered point cloud data (P_{\text{filtered}}), which contains the points filtered from the node position and the plane point cloud.
7. The three-dimensional modeling method according to claim 1, characterized in that: S8 can use computer vision technology to process and analyze the image according to the image taken by the camera in S1 (I_{\text{camera}})), and perform feature extraction, color analysis or texture analysis on the image to obtain material information in the image, which may include color, texture, lighting, etc.; The material information extracted from the camera image is applied to the 3D model ((M_{\text{filtered}})), and a realistic image is generated using rendering technology based on the geometric structure and material information of the 3D model. Rendering can include processing such as lighting modeling, shadow calculation, and texture mapping to produce realistic rendering results.
8. A three-dimensional modeling computer device, characterized in that The method comprises a memory and a processor: the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the three-dimensional modeling method according to any one of claims 1 to 7.
Citation Information
Cited By
Building apparent defect detection method and system
CN118941554A
Industrial part production nondestructive testing system based on 3D point cloud matching
CN119722584A
An industrial part production nondestructive testing system based on 3D point cloud matching
CN119722584B
