Optical lens high-precision three-dimensional reconstruction method and system
By establishing the mapping relationship between lens characteristics and three-dimensional reconstruction parameters, dynamically adjusting the parameters, generating high-density point clouds and realistic texture three-dimensional models, the problem of difficult parameter debugging in the existing technology is solved, and the efficiency and quality of three-dimensional reconstruction is improved.
Patent Information
- Application Number
- CN202411196129.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-29
- Publication Date
- 2024-12-20
AI Technical Summary
The existing three-dimensional reconstruction algorithm of optical lenses lacks an intelligent parameter adaptation mechanism, and cannot automatically recommend the optimal point cloud density, grid resolution and texture mapping accuracy parameters based on lens characteristics, resulting in difficult improvement in reconstruction effect and parameter debugging. Work consumes a lot of manpower and material resources.
By establishing the mapping relationship between lens characteristics and three-dimensional reconstruction parameters, dynamically adjusting the calculation complexity and reconstruction quality, a high-density point cloud model is generated, and a realistic three-dimensional model is generated through texture mapping and grid reconstruction to realize the self-direction of lens characteristics. Adapt to parameter configuration.
The efficiency and quality of three-dimensional reconstruction are improved, and the parameters are adaptively configured based on lens characteristics are realized, manual debugging is reduced, and reconstruction effect is improved.
Smart Images

Figure CN119165652A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information technology, and in particular to a high-precision three-dimensional reconstruction method and system for an optical lens. Background Art
[0002] In three-dimensional reconstruction, there are significant differences in the imaging principles, optical path structures, and aberration characteristics of different lenses, which makes it difficult to uniformly set the algorithm parameters required for reconstruction. Wide-angle lenses have a wide field of view but large aberration distortion. During reconstruction, higher point cloud density and grid resolution are required to ensure reconstruction accuracy, but too high parameter settings will lead to a sharp increase in the amount of calculation. Telephoto lenses have a narrow field of view but a shallow depth of field. Texture mapping requires a more sophisticated mapping method, but too sophisticated mapping will introduce noise. There are many types of lenses, and the parameters are highly correlated. It is difficult to uniformly set the reconstruction parameters required for different types of lenses. At present, although the three-dimensional reconstruction algorithm of optical lenses is relatively mature, it lacks an intelligent parameter adaptation mechanism and cannot automatically recommend the optimal point cloud density, grid resolution, texture mapping accuracy and other parameter configuration combinations according to lens characteristics. This makes it difficult to further improve the reconstruction effect, and a large amount of parameter debugging work also consumes a lot of manpower and material resources. How to reveal the intrinsic relationship between parameters and reconstruction effects, establish intelligent parameter optimization methods, and realize parameter adaptive configuration for different lens characteristics based on a deep understanding of the lens imaging principle and the reconstruction algorithm principle is a key issue that needs to be solved urgently. Summary of the invention
[0003] The present invention provides a high-precision three-dimensional reconstruction method for an optical lens, which mainly includes:
[0004] According to the imaging principles, optical path structures and aberration characteristics of different optical lenses, a mapping relationship between lens characteristics and 3D reconstruction parameters is established to obtain parameter configurations of different lens types;
[0005] Obtain the optical lens parameters of the scene to be reconstructed, and preliminarily determine the corresponding parameters of the lens, including point cloud density, grid resolution, and texture mapping accuracy, based on the parameter configuration of different lens types;
[0006] For the initially determined mapping accuracy parameters, analyze whether the computational complexity and amount meet the preset requirements. If the computational complexity and amount are both higher than the threshold, reduce the point cloud density and grid resolution accordingly. If the reconstruction accuracy is insufficient, improve the texture mapping accuracy accordingly, and obtain a parameter configuration solution that balances computational efficiency and reconstruction quality.
[0007] The original image data is processed using a parameter configuration scheme that balances computational efficiency and reconstruction quality to obtain the original image information, and the sparse point cloud of the scene is obtained through feature extraction and matching. The point cloud is densified in combination with multi-view geometric constraints to generate a high-density point cloud model.
[0008] Filter, denoise and downsample the high-density point cloud, and reconstruct the point cloud into a triangulated mesh according to the set mesh resolution to generate a meshed 3D model of the scene;
[0009] The original image information is mapped onto a gridded 3D model, and the texture sampling rate and fusion method are controlled according to the preset mapping accuracy to obtain a 3D reconstructed model with realistic textures;
[0010] The geometric accuracy and visual quality of the 3D reconstructed model with realistic textures are analyzed. If the preset threshold is not met, the mapping accuracy parameters are readjusted. The mapping accuracy parameters are used as the preliminary determined mapping accuracy parameters, and the 3D reconstructed model with realistic textures is rebuilt. If the requirements are met, the final 3D reconstruction result is output, completing the adaptive parameter configuration process based on lens characteristics.
[0011] The present invention provides a high-precision three-dimensional reconstruction system for an optical lens, which mainly includes:
[0012] A lens characteristic analysis module is used to establish a mapping relationship between lens characteristics and three-dimensional reconstruction parameters;
[0013] An adaptive parameter configuration module, used to preliminarily determine 3D reconstruction parameters according to lens parameters;
[0014] Point cloud generation module, used to extract features from raw image data and generate high-density point clouds;
[0015] Mesh model reconstruction module, used for filtering and denoising high-density point clouds and reconstructing triangulated meshes;
[0016] Texture mapping module, used to map the original image information onto the meshed 3D model;
[0017] The accuracy evaluation and optimization module is used to analyze the accuracy of the 3D reconstruction model and adjust the parameters.
[0018] The technical solution provided by the embodiment of the present invention may have the following beneficial effects:
[0019] The present invention discloses a method and system for high-precision three-dimensional reconstruction of an optical lens. The method establishes a mapping relationship between lens characteristics and reconstruction parameters, and preliminarily determines parameters such as point cloud density, gridding resolution, and texture mapping accuracy according to the optical lens parameters of the scene to be reconstructed. Then, the computational complexity and reconstruction quality are analyzed, and the parameters are dynamically adjusted to balance efficiency and quality. Using the optimized parameter configuration scheme, the original image is processed, feature extracted, and matched to generate a high-density point cloud model. After filtering, denoising, and grid reconstruction, the texture information is mapped to the three-dimensional model. Finally, through iterative optimization, a three-dimensional reconstruction result that meets the accuracy and quality requirements is obtained. The present invention realizes parameter adaptive configuration based on lens characteristics, improves the efficiency and quality of three-dimensional reconstruction, and has strong practicality. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 The present invention is a flowchart of a method for high-precision three-dimensional reconstruction of an optical lens. DETAILED DESCRIPTION
[0021] In order to further understand the content of the present invention, the present invention is described in detail in conjunction with the accompanying drawings and embodiments. The present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It is understood that the specific embodiments described herein are only used to explain the relevant inventions, rather than to limit the invention. It is also necessary to explain that, for ease of description, only the parts related to the invention are shown in the accompanying drawings.
[0022] like Figure 1 In this embodiment, a high-precision three-dimensional reconstruction method of an optical lens may specifically include:
[0023] S101. According to the imaging principles, optical path structures and aberration characteristics of different optical lenses, a mapping relationship between lens characteristics and three-dimensional reconstruction parameters is established to obtain parameter configurations of different lens types.
[0024] The optical design drawings of the lens are obtained, wherein the optical design drawings include the focal length, field angle and lens combination data of the lens; a ray tracing algorithm is used to calculate the propagation path of light inside the lens according to the focal length, field angle and lens combination data of the lens, so as to obtain the optical path structure characteristic parameters of the lens; the Seide l aberration analysis method is used to calculate the spherical aberration, coma and astigmatism of the lens according to the optical path structure characteristic parameters, and an aberration characteristic model of the lens is established; the imaging equation of the lens is derived according to the optical path structure characteristic parameters and the aberration characteristic model by using a thin lens equation and a light propagation matrix, and a mapping relationship function between lens parameters and three-dimensional space points is established; the Levenberg-Marquardt algorithm is used to perform parameter fitting on the mapping relationship function, so as to obtain the three-dimensional reconstruction internal and external parameter matrices of the lens, and obtain the three-dimensional reconstruction parameter configuration of the lens.
[0025] Specifically, the focal length, field of view and lens combination data of the lens are obtained according to the optical design drawings of the lens, and the propagation path of the light inside the lens is calculated by the ray tracing algorithm to obtain the optical path structure characteristic parameters of the lens. According to the optical path structure characteristic parameters of the lens, the Seidel aberration analysis method is used to calculate spherical aberration, coma and astigmatism, and the aberration characteristic model of the lens is established to obtain the distortion coefficient. According to the optical path structure characteristic parameters and the aberration characteristic model of the lens, the imaging equation of this type of lens is derived using the thin lens equation and the light propagation matrix, and the mapping relationship function between the lens parameters and the three-dimensional space points is established. The obtained mapping relationship function is preliminarily verified and optimized, compared with the actual test data, and the function is corrected according to the error to obtain the optimized mapping relationship function. The Levenberg-Marquardt algorithm is used to perform parameter fitting on the optimized mapping relationship function, and the internal and external parameter matrices required for this type of lens in three-dimensional reconstruction are obtained, and the three-dimensional reconstruction parameter configuration for this type of lens is obtained. For different types of lenses, such as wide-angle, telephoto, and zoom, a parameter template library is established to quickly match and initialize the three-dimensional reconstruction parameters. The closest lens type parameters are selected from the parameter template library as the initial values, and the parameters are optimized to obtain the final three-dimensional reconstruction parameter configuration. The lens parameters are read from the optical design drawings, such as the focal length of 50mm, the field of view of 60 degrees, and the lens combination of 5 groups and 7 lenses. Using the ray tracing algorithm, the starting position and direction of the incident light are set, and the intersection and refraction direction of the light with each lens surface are calculated to obtain the optical path structure characteristic parameters of the lens. The Seide l aberration analysis method is used to calculate the spherical aberration coefficient of 0.05mm, the coma coefficient of 0.03mm, and the astigmatism coefficient of 0.02mm, and the aberration characteristic model is established. Based on the thin lens equation f=1 / (1 / u+1 / v) and the light propagation matrix, the imaging equation (x,y,z)=KR|t is derived, where K is the internal parameter matrix, R is the rotation matrix, and t is the translation vector. The mapping relationship function is verified using actual test data. For example, 10 known three-dimensional coordinate points are set to calculate the error between their imaging coordinates and the actual imaging coordinates, with an average error of 2 pixels. According to the error distribution, the mapping function is corrected to obtain the optimized mapping relationship function. The Levenberg-Marquardt algorithm is used to perform parameter fitting on the optimized mapping relationship function. The initial damping factor λ is set to 0.1, and the iterative calculation is performed until convergence to obtain the internal parameter matrix K and the external parameter matrix [R|t]. A parameter template library containing wide-angle, telephoto, and zoom is established, such as a wide-angle lens template: focal length 28mm, field of view 75 degrees; a telephoto lens template: focal length 200mm, field of view 20 degrees. According to the input lens parameters, the closest parameter is selected from the template library as the initial value. For example, if the input focal length is 35mm, the wide-angle lens template is selected to optimize the parameters and obtain the final three-dimensional reconstruction parameter configuration.
[0026] S102, obtaining optical lens parameters of the scene to be reconstructed, and preliminarily determining the corresponding point cloud density, gridding resolution, and texture mapping accuracy parameters of the lens in combination with parameter configurations of different lens types.
[0027] The focal length, field of view angle, aperture size, and sensor size are extracted from the camera EXIF information, and a pre-established lens type database is queried according to the optical lens parameters to determine the lens type used for the scene to be reconstructed; according to the lens type, the corresponding point cloud density benchmark value, grid resolution benchmark value, and texture mapping accuracy benchmark value are extracted from a parameter configuration library obtained based on a large amount of experimental data statistics as the initial parameter configuration; the Brown-Conrady distortion correction model is used to compensate for the distortion coefficient in the optical lens parameters, and the radial distortion and tangential distortion parameters are calculated to obtain the corrected field of view angle and the number of effective pixels; according to the corrected field of view angle and the effective pixel number, the corresponding point cloud density benchmark value, grid resolution benchmark value, and texture mapping accuracy benchmark value are extracted ... The effective pixel number is adjusted, and the point cloud density baseline value and the gridding resolution baseline value are adjusted. If the field of view angle increases, the point cloud density baseline value is increased, and if the effective pixel number decreases, the gridding resolution baseline value is reduced. The ratio of the image resolution of the scene to be reconstructed to the sensor size is calculated to obtain the pixel density per unit area. Combined with the corrected field of view angle, the texture mapping accuracy baseline value is calibrated. If the pixel density is higher than a preset threshold, the texture mapping accuracy baseline value is increased. According to the characteristics of the lens type, the adjusted parameters are fine-tuned to obtain a final 3D reconstruction parameter configuration suitable for the scene to be reconstructed.
[0028] Specifically, the focal length, field of view, aperture size, and sensor size are extracted from the camera EXIF information. The pre-established lens type database is queried based on these parameters to determine the lens type used for the scene to be reconstructed. For the determined lens type, the corresponding point cloud density benchmark value, gridding resolution benchmark value, and texture mapping accuracy benchmark value are extracted from the parameter configuration library obtained based on a large amount of experimental data statistics as the initial parameter configuration. The Brown-Conrady distortion correction model is used to compensate the distortion coefficient in the optical lens parameters, and the radial distortion and tangential distortion parameters are calculated to obtain the corrected field of view and effective pixel number. According to the corrected field of view and effective pixel number, the initial values of the point cloud density and gridding resolution are adjusted. If the field of view increases, the point cloud density is increased; if the effective pixel number decreases, the gridding resolution is reduced. The ratio of the image resolution of the scene to be reconstructed to the sensor size is calculated to obtain the pixel density per unit area. Combined with the corrected field of view, the texture mapping accuracy benchmark value is calibrated. If the pixel density is higher than the preset threshold, the texture mapping accuracy is improved. According to the characteristics of the lens type, the adjusted parameters are fine-tuned. The wide-angle lens increases the point cloud density and reduces the texture mapping accuracy, while the telephoto lens does the opposite, and the final 3D reconstruction parameter configuration suitable for the scene is obtained. The lens parameters are extracted from the camera EXI F information, such as the focal length of 24mm, the field of view of 84 degrees, the aperture of f / 2.8, and the sensor size of 35mm full frame. These parameters are compared with the lens type database and determined to be a wide-angle lens. The initial parameters corresponding to the wide-angle lens are extracted from the parameter configuration library: the point cloud density baseline value is 1000 points / m 2 , the gridding resolution benchmark value is 0.01m, and the texture mapping accuracy benchmark value is 4096x4096 pixels. Using the Brown-Conrady distortion correction model, the radial distortion parameters k1=-0.1, k2=0.01, and the tangential distortion parameters p1=0.001, p2=0.002 are calculated, and the corrected field of view angle is 82 degrees, and the number of effective pixels is 95%. According to the correction results, the point cloud density is adjusted to 1050 points / m 2 , the gridding resolution is adjusted to 0.0095m. Calculate the ratio of the image resolution of 6000x4000 and the sensor size of 36x24mm, and the pixel density per unit area is 7016 pixels / mm 2 . Since the pixel density is higher than the preset threshold of 6000 pixels / mm 2 , improve the texture mapping accuracy to 8192x8192 pixels. Considering the characteristics of wide-angle lens, further increase the point cloud density to 1100 points / m 2 , reducing the texture mapping accuracy to 6144x6144 pixels, and finally obtaining the 3D reconstruction parameter configuration suitable for the wide-angle lens scene.
[0029] By analyzing the focal length and aperture of the lens, and combining the scene characteristics and reconstruction requirements, the acquisition density of point cloud data is optimized. This includes adjusting the point cloud density parameters accordingly for different lens types, including wide-angle lenses and telephoto lenses, to improve data processing efficiency while ensuring reconstruction quality.
[0030] The focal length and aperture value in the lens metadata are obtained, and the lens type is matched according to the pre-established lens type database to determine whether the lens type is a wide-angle lens or a telephoto lens, and the initial point cloud density parameters are obtained; the known structured light pattern is projected by the structured light method, and the average depth of field and depth of field range of the scene are calculated by analyzing the deformation of the structured light pattern, and the clarity distribution map of the scene is obtained by combining the focal length and aperture value; the scene is semantically segmented by using U-Net to identify the main objects and background in the scene, and weight coefficients are set for different areas, and high weights are given to important areas; the clarity distribution map, regional weights and depth information are combined to generate a preliminary distribution map of the point cloud density. If the lens type is a wide-angle lens, the sampling density of the edge area is increased, and if the lens type is a telephoto lens, the sampling accuracy of the central area is improved; an adaptive sampling algorithm is implemented based on the hierarchical sampling strategy of the octree, and the point cloud density is optimized according to the preliminary distribution map, sampling points are increased in complex texture areas, and sampling points are reduced in flat areas to obtain the final point cloud sampling density parameters.
[0031] Specifically, the focal length and aperture value are extracted according to the lens metadata, and the current lens type is matched from the lens type database obtained based on the statistics of a large number of sample lens parameters. It is determined whether it is a wide-angle lens or a telephoto lens, and the initial point cloud density parameters are obtained. The structured light method is used to estimate the scene depth. The average depth of field and depth of field range of the scene are calculated by projecting a known structured light pattern and analyzing its deformation. The clarity distribution map of the scene is calculated by combining the lens focal length and aperture value. The scene is semantically segmented using U-Net to identify the main objects and background in the scene. Weight coefficients are set for different regions, and important regions are given high weights. The clarity distribution map, regional weights and depth information are comprehensively considered to generate a preliminary distribution map of the point cloud density. For wide-angle lenses, the sampling density of the edge area is increased, and for telephoto lenses, the sampling accuracy of the central area is improved. The adaptive sampling algorithm is implemented based on the hierarchical sampling strategy of the octree. The point cloud density is optimized according to the preliminary distribution map, and sampling points are increased in complex texture areas and reduced in flat areas. According to the characteristics of different scenes, high sampling density is used for indoor environments, and the sampling density of distant objects is reduced for large outdoor scenes, and the final point cloud sampling density parameters are obtained. Extract the focal length of 24mm and the aperture value of f / 2.8 from the lens metadata, query the lens type database, match the current lens as a wide-angle lens, and set the initial point cloud density to 1000 points / m 2. The structured light method is used for depth estimation, and a 60x60 grid dot pattern is projected. By analyzing the pattern deformation, the average depth of field of the scene is calculated to be 5 meters, and the depth of field range is 2-10 meters. Combining the focal length and aperture, the scene clarity distribution map is calculated. The clarity of the central area is 0.95, and the clarity of the edge area is 0.85. U-Net is used for semantic segmentation to identify the main objects and background, and weights of 0.8 for buildings, 0.7 for trees, 0.5 for the ground, and 0.3 for the sky are assigned. Combining the clarity distribution, weight and depth information, a preliminary distribution map of the point cloud density is generated, and the density of the edge area of the wide-angle lens is increased by 20%. Using the octree hierarchical sampling strategy, the scene is divided into 83=512 subspaces, and the sampling density of the complex texture area is increased to 1200 points / m 2 , flat area reduced to 800 points / m 2 Taking into account the characteristics of large outdoor scenes, the sampling density of objects >8 meters away is reduced by 30%. Finally, the optimized point cloud sampling density parameters are obtained, and the near-field building sampling density is 1500 points / m 2 , near-view trees 1300 points / m 2 , distant objects 700-900 points / m 2 , ground 600-800 points / m 2 .
[0032] S103. For the initially determined mapping accuracy parameters, analyze whether the computational complexity and amount meet the preset requirements. If the computational complexity and amount are both higher than the threshold, reduce the point cloud density and grid resolution accordingly. If the reconstruction accuracy is insufficient, increase the texture mapping accuracy accordingly, and obtain a parameter configuration solution that balances computational efficiency and reconstruction quality.
[0033] The time complexity and memory usage of the three-dimensional reconstruction process are obtained, wherein the time complexity is estimated by using the big O notation, and the memory usage is obtained by calculation; the time complexity and memory usage are compared with a preset threshold, and if the time complexity or memory usage exceeds the preset threshold, the point cloud density and the gridding resolution are reduced, and the reduction ratio is a percentage exceeding the preset threshold; the reconstruction result after the parameter reduction is instantly evaluated, and the instant evaluation uses a weighted average of a structural similarity index and a peak signal-to-noise ratio as a comprehensive evaluation index; it is determined whether the comprehensive evaluation index meets the preset standard, and if the comprehensive evaluation index does not meet the preset standard, the texture mapping accuracy is improved, and the improvement range is 5% of the current texture mapping accuracy; a new parameter configuration scheme is generated according to the adjusted point cloud density, gridding resolution and texture mapping accuracy, and complexity estimation and quality evaluation are performed, and the complexity estimation and quality evaluation are iterated repeatedly until the optimal parameter configuration is found.
[0034] Specifically, according to the initially determined mapping accuracy parameters, the time complexity of the 3D reconstruction process is estimated using the Big O notation, and the required memory usage is calculated to obtain the specific values of the computational complexity and the amount of computation. The calculated complexity and amount of computation are compared with the preset thresholds. If the computational complexity is higher than the threshold or the amount of computation exceeds the preset limit, the point cloud density and meshing resolution are proportionally reduced according to the degree of excess, and the reduction ratio is the percentage of the threshold. The reconstruction results after the parameters are reduced are immediately evaluated, and the weighted average of the structural similarity index and the peak signal-to-noise ratio are used as comprehensive evaluation indicators to determine whether the reconstruction accuracy still meets the preset standard. If the accuracy is insufficient, the texture mapping accuracy is gradually increased by 5% each time until the requirement is met or the computing resource limit is reached. According to the adjusted point cloud density, meshing resolution and texture mapping accuracy, a new parameter configuration scheme is generated, and the complexity estimation and quality evaluation are performed again. It is repeated until the optimal parameter configuration that balances computational efficiency and reconstruction quality is found, or the maximum number of iterations is 20, or the parameter change amplitude is less than 1%. During the iteration process, the parameter configuration scheme is dynamically adjusted according to the preset calculation efficiency weight and reconstruction quality weight. The weight ratio changes dynamically with the number of iterations, initially focusing on calculation efficiency and gradually focusing on reconstruction quality. For the initially determined mapping accuracy parameters, the point cloud density is 1000 points / m 2 , the gridding resolution is 0.01m, the texture mapping accuracy is 4096x4096 pixels, and the time complexity of 3D reconstruction is estimated to be O(nlogn) using the big O notation, where n is the number of point clouds, and the memory required for calculation is about 8GB. Compared with the preset thresholds of O(n^1.2) and 6GB, the time complexity meets the requirements, but the memory usage exceeds 33%. According to the excess ratio, the point cloud density is reduced to 670 points / m 2 , the gridding resolution is adjusted to 0.015m. The adjusted parameters are evaluated immediately, and the weighted average of the structural similarity index and the peak signal-to-noise ratio are used as comprehensive indicators, with weights of 0.6 and 0.4 respectively, and the evaluation score is 0.85, which is lower than the preset standard of 0.9. The texture mapping accuracy is gradually improved by 5% each time. When the accuracy reaches 4506x4506 pixels, the evaluation score reaches 0.91, which meets the requirements. After generating a new parameter configuration scheme, the complexity estimation is performed again, with a time complexity of O(nlogn) and a memory usage of about 5.8GB, both of which meet the preset thresholds. During the iteration process, the initial computational efficiency weight is 0.7 and the reconstruction quality weight is 0.3. As the number of iterations increases, the weights are gradually adjusted, and finally converge to a computational efficiency weight of 0.4 and a reconstruction quality weight of 0.6. After 12 iterations, the parameter change amplitude is less than 1%, and the final balanced configuration scheme is obtained.
[0035] S104. Process the original image data using a parameter configuration scheme that balances computational efficiency and reconstruction quality to obtain original image information; obtain a sparse point cloud of the scene through feature extraction and matching, and densify the point cloud in combination with multi-view geometric constraints to generate a high-density point cloud model.
[0036] The original image data is preprocessed, including image denoising and color correction, to obtain preprocessed image information; the scale-invariant feature transformation algorithm is used to extract features from the preprocessed image to obtain key points and descriptors; based on the key points and descriptors, a fast nearest neighbor search library algorithm is used to perform feature matching to screen out matching point pairs with high confidence; based on the matching point pairs and camera parameters, a random sampling consensus algorithm is used to estimate external parameters, and internal points are screened through iterative optimization and geometric consistency check to establish a geometric relationship between multiple views; if the geometric relationship is successfully established, the coordinates of the three-dimensional space points are calculated through triangulation to generate a sparse point cloud of the scene; combined with multi-view geometric constraints, the patch expansion algorithm is used to densify the sparse point cloud, starting from high-confidence points, and gradually expanding the patch; the expanded patch is iteratively optimized, combined with occlusion relationships and surface normal consistency, the existing point cloud is continuously expanded, the blank area is filled, and a high-density point cloud model is obtained; the high-density point cloud model is post-processed, including statistical outlier filtering and normal vector consistency smoothing, to obtain a final high-quality point cloud model.
[0037] Specifically, according to the parameter configuration scheme that balances computational efficiency and reconstruction quality, the original image data is preprocessed, including image denoising and color correction, to obtain the preprocessed image information, and the image metadata information, including camera parameters and shooting position, is extracted. The scale-invariant feature transformation algorithm is used to extract features from the preprocessed image to obtain key points and descriptors, and then the fast nearest neighbor search library algorithm is used for feature matching to screen out matching point pairs with high confidence. Based on the matching point pairs and camera parameters, the random sampling consensus algorithm is used to estimate external parameters, and the internal points are screened through iterative optimization and geometric consistency check. The geometric relationship between multiple views is established, and the coordinates of the three-dimensional space points are calculated through triangulation to generate a sparse point cloud of the scene. Combined with multi-view geometric constraints, the patch expansion algorithm is used to densify the sparse point cloud. Starting from the high-confidence points, the patches are gradually expanded, considering the occlusion relationship and surface normal consistency, and the existing point cloud is continuously expanded through iterative optimization to fill the blank area, and finally a high-density point cloud model is generated. The generated high-density point cloud is post-processed, including statistical outlier filtering and normal vector consistency smoothing, to improve the point cloud quality. In the whole process, the calculation speed is optimized through parallel computing and data block processing, which improves the processing efficiency while ensuring the reconstruction quality. In the parameter configuration scheme that balances the calculation efficiency and reconstruction quality, the point cloud density is set to 500 points / m 2, the gridding resolution is 0.02m, and the texture mapping accuracy is 2048x2048 pixels. The original image data is preprocessed and denoised using Gaussian filtering with a kernel size of 3x3 and a standard deviation of 0.5. Then, color correction is performed and the color temperature is adjusted to 6500K. The SI FT algorithm is used for feature extraction, and the upper limit of the number of feature points is set to 2000 / image, and the descriptor dimension is 128. The FLANN algorithm is used for feature matching, and k=2 is set for k-nearest neighbor search, and the ratio test threshold is 0.75. In the external parameter estimation, the number of iterations of the RANSAC algorithm is set to 1000, and the internal point threshold is 1 pixel. In the patch expansion algorithm, the initial seed point selects the point with a confidence greater than 0.9, the expansion step is 0.01m, and the normal vector consistency threshold is 15 degrees. In the post-processing of the high-density point cloud, the standard deviation multiple of the statistical outlier filtering is 2.5, and the neighborhood radius of the normal vector smoothing is 0.05m. During the entire process, the data was divided into 10x10 grid blocks for parallel processing. Each block was about 1GB in size and 8 threads were used for simultaneous calculations, which reduced the average processing time by 40%. The final high-density point cloud model contained about 10 million points, covering an area of 100 square meters, and the reconstruction accuracy reached the millimeter level.
[0038] S105 , filtering, denoising and downsampling the high-density point cloud, and reconstructing the point cloud into a triangulated grid according to a set gridding resolution to generate a gridded three-dimensional model of the scene.
[0039] Acquire high-density point cloud data, apply K-nearest neighbor algorithm to each point according to the high-density point cloud data to calculate the average distance to the nearest 50 neighboring points; determine whether the average distance exceeds a preset 2.5 times standard deviation threshold, if it exceeds the threshold, remove the point to obtain preliminary denoised point cloud data; use voxel downsampling method to process the preliminary denoised point cloud data, including: divide the space into cubic grids with a side length of a preset grid resolution, calculate the centroid of each point in the grid, and select the point closest to the centroid as a representative point; use principal component analysis to The representative points are subjected to local plane fitting, a neighborhood with a radius of 3 times the grid resolution around each point is selected, the covariance matrix of the points in the neighborhood is calculated, and the eigenvector of the covariance matrix is used as the normal vector; the simplified point cloud is subjected to triangulated mesh reconstruction using the Poisson surface reconstruction algorithm according to the normal vector, and a continuous smooth surface is generated by iteratively solving the Poisson equation; the continuous smooth surface is post-processed, including: removing triangles whose area is less than the square of the grid resolution, repairing non-manifold edges, and outputting a three-dimensional mesh model of the scene that meets the grid resolution.
[0040] Specifically, the K nearest neighbor algorithm is applied to the high-density point cloud, and the average distance from each point to the nearest 50 neighboring points is calculated. The abnormal points are removed according to the preset 2.5 times standard deviation threshold to obtain the preliminary denoised point cloud data. The voxel downsampling method is used to divide the space into a cubic grid with a side length of the resolution according to the set grid resolution. The centroid is calculated for each point in the grid, and the point closest to the centroid is selected as the representative point to generate a simplified point cloud model. At the same time, the original neighborhood information of each representative point is recorded to maintain the local geometric features. The principal component analysis is used to perform local plane fitting on the simplified point cloud. The neighborhood with a radius of 3 times the grid resolution around each point is selected. The eigenvector of the covariance matrix is calculated as the normal vector, and the normal vector is weighted average smoothing. The weight is based on the Gaussian function of the distance between points to improve the consistency of the geometric features of the point cloud. Based on the simplified and optimized point cloud, the Poisson surface reconstruction algorithm is applied to triangulate the mesh reconstruction. The octree depth is set to 8 and the solver accuracy is set to 1e-6. The Poisson equation is iteratively solved to generate a continuous and smooth surface. The generated 3D mesh model was post-processed, including boundary optimization and topology check, removing triangles with an area smaller than the square of the mesh resolution, repairing non-manifold edges, and finally outputting a 3D mesh model of the scene that meets the set mesh resolution. For a high-density point cloud containing 10 million points, the K nearest neighbor algorithm was used to calculate the average distance from each point to the nearest 50 neighboring points, and the average distance was 0.5mm and the standard deviation was 0.2mm. 2.5 times the standard deviation was set as the threshold, and about 2% of the abnormal points were removed to obtain a denoised point cloud of 9.8 million points. Voxelized downsampling was used, the grid resolution was set to 2mm, the space was divided into 5 million cubic grids, the centroid of each point in the grid was calculated, the point closest to the centroid was selected as the representative point, and a simplified point cloud of 2 million points was generated. At the same time, the original 50 neighboring point information of each representative point was recorded. The simplified point cloud was locally fitted with a plane, a neighborhood with a radius of 6mm was selected, the covariance matrix was calculated by principal component analysis, and the eigenvector corresponding to the minimum eigenvalue was extracted as the normal vector. The normal vector was smoothed using Gaussian weights to improve the consistency of geometric features. The Poisson surface reconstruction algorithm was applied, the octree depth was set to 8, the solver accuracy was set to 1e-6, and the Poisson equation was solved through 20 iterations to generate a mesh model containing 1.8 million triangular facets. The mesh model was post-processed to remove the areas less than 4mm 2 The final output is a 3D mesh model with a resolution of 2 mm, containing 1.78 million triangular facets with an average facet area of 5.6 mm. 2 .
[0041] S106, mapping the original image information onto the gridded three-dimensional model, controlling the texture sampling rate and fusion method according to a preset mapping accuracy, and obtaining a three-dimensional reconstructed model with realistic texture.
[0042] The projection area of the triangular facet in the original image is calculated according to the vertex coordinates, normal vector information and camera parameters of the three-dimensional model, and the corresponding relationship between the three-dimensional model and the two-dimensional image is established; the texture coordinates of the internal points of the triangular facet are calculated by the barycentric coordinate interpolation method, the sampling interval is determined according to the preset mapping accuracy, and the color information of the corresponding area is extracted from the original image; the line of sight visibility detection is performed using the Z-buffer algorithm to determine the visibility of the triangular facet under different viewing angles, select the best texture source image, and record the texture source information of each facet; the texture information of different viewing angles is fused by a multi-band blending algorithm, and the weight calculation of the multi-band blending algorithm is based on the viewing angle and image clarity, and the weighted average is calculated to obtain a fused texture map; the Poisson image editing technology is used to process the texture seams and color discontinuity problems in the fused texture map to ensure the smoothness of the texture transition and obtain a three-dimensional reconstructed model with realistic texture.
[0043] Specifically, according to the vertex coordinates and normal vector information of the meshed 3D model, combined with the focal length, principal point coordinates, rotation matrix, and translation vector of the camera, the projection area of each triangular face in the original image is calculated, and the corresponding relationship between the 3D model and the 2D image is established. For each triangular face, the barycentric coordinate interpolation method is used to calculate the texture coordinates of the internal points of the face, and the sampling interval is determined according to the preset mapping accuracy. The color information of the corresponding area is extracted from the original image, and the number of sampling points is proportional to the mapping accuracy. In the case where the same face is visible in multiple images, it is screened based on the viewing angle, and the image with the closest viewing angle to the normal vector is selected as the main texture source. The Z-buffer algorithm is used to perform line of sight visibility detection, determine the visibility of each triangular face at different viewing angles, solve the occlusion problem, select the best texture source image, and record the texture source information of each face. The multi-band hybrid algorithm is used to fuse the texture information of different viewing angles. The weight calculation is based on the viewing angle and image clarity. The smaller the viewing angle and the clearer the image, the greater the weight. The weighted average is calculated to generate the final texture map. Poisson image editing technology is used to deal with texture seams and color discontinuities to ensure the smoothness of texture transition. The fused texture information is mapped to the 3D model to obtain a 3D reconstructed model with realistic texture. For a meshed 3D model containing 100,000 triangular facets, the camera intrinsic parameters with a focal length of 35mm and principal point coordinates of (2000,1500) and 20 sets of external parameter data at different positions are used to calculate the projection of each facet in 50 4000x3000 resolution original images. The barycentric coordinate interpolation method is used to generate about 100 sampling points in each facet according to the preset 2K mapping accuracy, totaling about 10 million texture sampling points. For facets that appear in multiple images, images with a viewing angle of less than 30 degrees are selected as candidates, and the Z-buffer algorithm is used for visibility detection, and the depth threshold is set to 1mm. In the multi-band hybrid algorithm, the viewing angle weight coefficient is set to 0.6, the clarity weight coefficient is set to 0.4, the image clarity is evaluated by gradient variance, and the threshold is set to 100. For texture seams, Poisson image editing technology was used, with a blend radius of 5 pixels and 50 iterations. Finally, a texture map with a resolution of 4096x4096, a color depth of 24 bits, a compression rate of 80%, and a file size of about 3MB was generated. The texture was mapped to the 3D model to obtain a high-precision 3D reconstruction model with a total number of faces unchanged and a vertex number increased to 150,000. The file size was about 20MB, including geometric information and texture information.
[0044] The original image information is mapped onto the gridded 3D model, the image's color, texture and edges are extracted and analyzed, and the positional relationship between different areas in the image and the corresponding 3D model is determined to achieve image-to-model mapping; the texture sampling rate and fusion method are controlled according to the set mapping accuracy, the image is resampled and fused, and a texture matching the 3D model is generated, ultimately obtaining a 3D reconstructed model with realistic texture.
[0045] The original image is obtained, and a color space conversion from RGB to HSV is performed according to the original image, and a histogram equalization process is performed to obtain the color features of the image; the color features of the image are smoothed by using a Gaussian filter, and the edge detection is performed on the smoothed image by using a Sobel operator to obtain the edge information of the image; the texture features of the image are extracted by using a gray-level co-occurrence matrix method, and if the distance parameter is 1 and the directions are 0°, 45°, 90° and 135°, four statistics of contrast, correlation, energy and homogeneity are calculated; the surface point of the three-dimensional model corresponding to each pixel in the image is determined according to the geometric information of the three-dimensional model and the camera parameters, and the position of different areas in the image corresponding to the three-dimensional model is determined by a back projection algorithm; a five-layer Laplacian pyramid is constructed by using a multi-resolution fusion algorithm, and the texture information of multiple images is fused, wherein the low-frequency layer adopts mean fusion, and the high-frequency layer determines the weight according to the gradient amplitude, so as to obtain a high-quality texture map matching the three-dimensional model.
[0046] Specifically, the original image is converted from RGB to HSV color space and histogram equalization is performed to extract the color features of the image. Gaussian filtering and Sobel operator are used for edge detection to obtain the edge information of the image. At the same time, the gray level co-occurrence matrix method is used to extract the texture features. The distance parameter is set to 1, the directions are 0°, 45°, 90° and 135°, and the four statistics of contrast, correlation, energy and homogeneity are calculated. The extracted color, texture and edge features are used to construct feature descriptors to assist in establishing a more accurate mapping relationship between the two-dimensional image and the three-dimensional model. According to the geometric information and camera parameters of the three-dimensional model, the surface point of the three-dimensional model corresponding to each pixel in the image is calculated, and the position of different areas in the image corresponding to the three-dimensional model is determined by the back projection algorithm. The occlusion problem is solved by the depth buffer. For multi-viewing conditions, the view angle with the smallest angle between the line of sight and the surface normal is selected as the best texture source. Based on the patch density of the three-dimensional model and the expected texture quality, the appropriate texture sampling rate is determined, the original image is resampled, and the image resolution is adjusted by the bilinear interpolation algorithm to match the patch density of the three-dimensional model, and the texture coordinates are generated. A multi-resolution fusion algorithm is used to construct a 5-layer Laplacian pyramid. The texture information of multiple images is fused by combining the weighted average method. The low-frequency layer is fused by mean value, and the high-frequency layer is weighted according to the gradient amplitude to generate a high-quality texture map that matches the three-dimensional model. The Poisson image editing technique is used to deal with the problems of texture seams and color discontinuity. The width of the mixed area is set to 10 pixels, and it is iterated and optimized 50 times. Finally, the fused texture is mapped to the three-dimensional model to obtain a three-dimensional reconstruction model with realistic texture. A set of 20 original images with 4K resolution is processed. First, the RGB color space is converted to HSV, and histogram equalization is performed to increase the image contrast by about 30%. A 3x3 Gaussian kernel is used for filtering, and then the Sobel operator is applied to detect edges to obtain an edge map. The texture features are calculated by the gray-level co-occurrence matrix, and four statistics of contrast, correlation, energy and homogeneity are extracted to form a 16-dimensional feature vector. Based on these features, a 128-dimensional SI FT descriptor is constructed for image-to-model mapping. The camera intrinsic and extrinsic parameters are used to calculate the three-dimensional point corresponding to each pixel. The occlusion is solved by depth buffering, and the best viewing angle with a line of sight angle less than 30° is selected. The texture sampling rate is set to 4096x4096 according to the density of the 3D model patches, and the original image is resampled using bilinear interpolation. A 5-layer Laplacian pyramid is constructed, the low-frequency layer is averaged, and the high-frequency layer is weighted and fused according to the gradient amplitude. Poisson image editing is used, a 10-pixel blending area is set, and 50 iterations are performed to eliminate seams. Finally, a 4K resolution texture map is generated with a compression rate of 85% and a file size of about 8MB. It is mapped to a 3D model containing 500,000 patches, and a high-quality 3D reconstruction model with a total data volume of about 100MB is obtained.
[0047] During the 3D reconstruction process, original image information is obtained from multiple perspectives to cover various parts of the model, and images from different perspectives are fused. At the same time, texture mapping is optimized through weighted fusion and seamless stitching methods to eliminate color differences and seams between images from different perspectives. A seamless and texture-consistent 3D reconstructed model is generated to improve the visual quality and realism of the 3D reconstructed model.
[0048] The system uses a golden spiral algorithm to generate multiple viewing angle sampling points uniformly distributed on a spherical surface according to the geometric structure of the three-dimensional model, and obtains imaging parameters of each viewing angle by adjusting the focal length and the field of view angle; the system uses ray tracing technology to simulate and generate original image information covering various parts of the three-dimensional model based on the imaging parameters; the system pre-processes the original image information, including: unifying the color distribution of images of different viewing angles by using a histogram matching algorithm, and adjusting the local contrast of the image by using an adaptive histogram equalization algorithm; the system calculates the visible light of each triangular facet in images of different viewing angles based on the geometric information of the three-dimensional model and the imaging parameters. The system uses image stitching technology to seamlessly process the texture mapping results, uses a Poisson fusion algorithm to eliminate seams, sets Dirichlet boundary conditions, and adjusts the color and brightness of the texture boundary through least squares iterative optimization. The system uses a structural similarity index to evaluate the quality of the generated texture, calculates the SSIM value between the original image information and the reconstructed texture, and when the SSIM value is greater than a preset threshold, the final three-dimensional reconstructed model texture with seamless connection and consistent texture is obtained.
[0049] Specifically, according to the geometric structure of the three-dimensional model, the golden spiral algorithm is used to generate multiple viewing sampling points evenly distributed on the sphere. The camera parameters are optimized by adjusting the focal length and field of view to determine the imaging parameters of each viewing angle. Ray tracing technology is used to simulate and generate the original image information covering each part of the model based on the optimized camera parameters. The acquired multi-view images are preprocessed, including color correction and illumination equalization. The color distribution of images of different viewing angles is unified by the histogram matching algorithm. The local contrast of the image is adjusted by the adaptive histogram equalization algorithm to reduce the illumination difference between different viewing angles. Based on the geometric information and camera parameters of the three-dimensional model, the visibility and projection quality of each triangle in the images of different viewing angles are calculated, and the viewing weight map is constructed. The pyramid fusion method is used to align and weightedly fuse the texture information of different resolutions to generate preliminary texture mapping results. The fused texture is seamlessly processed by image stitching technology, the Poisson fusion algorithm is used to eliminate the seams, the Dirichlet boundary condition is set, and the color and brightness of the texture boundary are adjusted by the least squares method iterative optimization. The optimization is stopped when the average color difference of adjacent pixels is less than the preset threshold or the maximum number of iterations is reached. The quality of the generated texture is evaluated using the structural similarity index, and the SSIM value between the original image and the reconstructed texture is calculated. When the SSIM value is greater than 0.95, the final seamless and texture-consistent 3D reconstructed model texture is obtained. For a 3D model containing 100,000 triangular facets, the golden spiral algorithm is used to generate 100 evenly distributed viewing sampling points. The camera focal length range is set to 24mm-70mm, and the field of view is optimized between 60°-90°. Through ray tracing technology, 100 original images with 4K resolution are simulated and generated. Histogram matching is performed on these images, and the brightness distribution of all images is adjusted to a normal distribution with an average brightness of 128 and a standard deviation of 45. The adaptive histogram equalization algorithm is used to set the block size to 8x8 pixels and the contrast limit threshold to 0.02 to process each image. The visibility and projection quality of the triangular facets at different viewing angles are calculated, and a 100x100,000 weight matrix is constructed. A 5-layer pyramid fusion method was used, starting from the top 32x32 resolution, and fused layer by layer down to the original resolution. Each layer was smoothed using a 3x3 Gaussian kernel. In the Poisson fusion process, the Dirichlet boundary condition was set, and the Poisson equation was solved using the conjugate gradient method. The maximum number of iterations was 1000, or the average color difference of adjacent pixels was less than 0.5. Finally, the SSIM value was calculated. When the SSIM was greater than 0.95, a 4K resolution texture map was output, generating a complete 3D reconstruction model with a file size of about 20MB.
[0050] S107, analyzing the geometric accuracy and visual quality of the three-dimensional reconstructed model with realistic textures. If the preset threshold is not met, the mapping accuracy parameters are readjusted and used as the preliminarily determined mapping accuracy parameters, and the three-dimensional reconstructed model with realistic textures is reconstructed again. If the requirements are met, the final three-dimensional reconstruction result is output, and the adaptive parameter configuration process based on the lens characteristics is completed.
[0051] A three-dimensional reconstruction model and a reference point cloud obtained by high-precision laser scanning are obtained, and a point cloud registration algorithm is used to calculate the geometric error between the three-dimensional reconstruction model and the reference point cloud, wherein the geometric error includes an average error and a maximum error value; and the three-dimensional reconstruction model is judged to meet a preset geometric accuracy threshold according to the geometric error. The three-dimensional reconstruction model is rendered from multiple angles to obtain a two-dimensional image; and the structural similarity index, image gradient statistics, and Delta E color difference between the two-dimensional image and the original image are calculated to obtain a visual quality score. The geometric accuracy and the visual quality score are weighted averaged to obtain an overall score; and it is judged whether the overall score meets a preset threshold. If the overall score does not meet the preset threshold, a simulated annealing algorithm is used to optimize and adjust the mapping accuracy parameters, wherein the mapping accuracy parameters include point cloud density, gridding resolution, and texture mapping accuracy; and the three-dimensional reconstruction process is re-executed according to the optimized and adjusted mapping accuracy parameters. According to the final three-dimensional reconstruction result and the corresponding lens parameters obtained in the three-dimensional reconstruction process, a mapping relationship database between lens characteristics and three-dimensional reconstruction parameters is updated; and the mapping relationship database is used in an adaptive parameter configuration process based on lens characteristics.
[0052] Specifically, the point cloud registration algorithm is used to calculate the geometric error between the 3D reconstructed model and the reference point cloud obtained by high-precision laser scanning. The two models are aligned by the iterative nearest point method, and the Euclidean distance between the corresponding points is calculated to obtain the average error and the maximum error value to determine whether the preset geometric accuracy threshold is met. The structural similarity index is used to evaluate the visual quality of the 3D reconstructed model. The reconstructed model is rendered into a 2D image from multiple angles and compared with the original image to calculate the SSIM value. At the same time, the image gradient statistics are used to evaluate the texture clarity, and the Del taE color difference calculation is used to evaluate the color restoration degree to obtain a comprehensive visual quality score. The weighted average method is used to combine the geometric accuracy and visual quality scores to obtain an overall score, and the weight is set according to the application scenario requirements. If the overall score does not meet the preset threshold, the simulated annealing algorithm is used to optimize the mapping accuracy parameters, including point cloud density, grid resolution, and texture mapping accuracy, to generate a new parameter configuration scheme. Based on the adjusted mapping accuracy parameters, the 3D reconstruction process is re-executed, including point cloud generation, meshing and texture mapping, to obtain a new 3D reconstruction model. The geometric accuracy and visual quality evaluation are performed again until the requirements are met or the maximum number of iterations is reached, or the score change is less than 1% for 3 consecutive iterations, and the final 3D reconstruction result is output. According to the final 3D reconstruction result and the corresponding lens parameters, the mapping relationship database between the lens characteristics and the 3D reconstruction parameters is updated to complete the adaptive parameter configuration process based on the lens characteristics. A 3D reconstruction model containing 1 million points is aligned with a 2 million point reference point cloud obtained by high-precision laser scanning. The iterative closest point algorithm is used for 50 iterations, and the convergence threshold is set to 0.1mm. The average geometric error is calculated to be 0.5mm and the maximum error is 2mm, which are compared with the preset average error <1mm and maximum error <5mm thresholds. Images with a resolution of 2048x2048 are rendered from 8 different angles, and the average SSIM value is calculated to be 0.92. The image gradient is calculated using the Sobel operator, and the average gradient amplitude is 15.3. The color difference was calculated using the CI EDE2000 formula, and the average Del taE value was 2.8. The comprehensive visual quality score was 0.88. The weights of geometric accuracy and visual quality were set to 0.6 and 0.4, respectively, and the overall score was 0.90. The simulated annealing algorithm was used to optimize the parameters, with the initial temperature set to 100 and the cooling coefficient set to 0.95. The point cloud density, meshing resolution, and texture mapping accuracy were adjusted. After 12 iterations, the overall score reached 0.95, exceeding the preset threshold of 0.93. The final output contained a 3D reconstructed model with 1.5 million points, a mesh resolution of 0.3mm, and a texture resolution of 4096x4096. The result and the corresponding lens parameters were updated to the database for rapid parameter configuration of subsequent similar scenes.
[0053] The preferred embodiments of the present invention disclosed above are only used to help explain the present invention. The preferred embodiments do not describe all the details in detail, nor do they limit the invention to only specific implementation methods. Obviously, many modifications and changes can be made according to the content of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the present invention, so that those skilled in the art can understand and use the present invention well. The present invention is limited only by the claims and their full scope and equivalents.
Claims
1. A high-precision three-dimensional reconstruction method for an optical lens, characterized in that: The method comprises: According to the imaging principles, optical path structures and aberration characteristics of different optical lenses, a mapping relationship between lens characteristics and 3D reconstruction parameters is established to obtain parameter configurations of different lens types; Obtain the optical lens parameters of the scene to be reconstructed, and preliminarily determine the corresponding parameters of the lens, including point cloud density, grid resolution, and texture mapping accuracy, based on the parameter configuration of different lens types; For the initially determined mapping accuracy parameters, analyze whether the computational complexity and amount meet the preset requirements. If the computational complexity and amount are both higher than the threshold, reduce the point cloud density and grid resolution accordingly. If the reconstruction accuracy is insufficient, improve the texture mapping accuracy accordingly, and obtain a parameter configuration solution that balances computational efficiency and reconstruction quality. The original image data is processed using a parameter configuration scheme that balances computational efficiency and reconstruction quality to obtain the original image information, and the sparse point cloud of the scene is obtained through feature extraction and matching. The point cloud is densified in combination with multi-view geometric constraints to generate a high-density point cloud model. Filter, denoise and downsample the high-density point cloud, and reconstruct the point cloud into a triangulated mesh according to the set mesh resolution to generate a meshed 3D model of the scene; The original image information is mapped onto a gridded 3D model, and the texture sampling rate and fusion method are controlled according to the preset mapping accuracy to obtain a 3D reconstructed model with realistic textures; The geometric accuracy and visual quality of the 3D reconstructed model with realistic textures are analyzed. If the preset threshold is not met, the mapping accuracy parameters are readjusted. The mapping accuracy parameters are used as the preliminary determined mapping accuracy parameters, and the 3D reconstructed model with realistic textures is rebuilt. If the requirements are met, the final 3D reconstruction result is output, completing the adaptive parameter configuration process based on lens characteristics.
2. The method according to claim 1, characterized in that According to the imaging principle, optical path structure and aberration characteristics of different optical lenses, a mapping relationship between lens characteristics and three-dimensional reconstruction parameters is established to obtain parameter configurations of different lens types, including: Obtaining an optical design drawing of a lens, wherein the optical design drawing includes focal length and field angle of the lens and lens combination data; According to the focal length and field angle of the lens and lens combination data, a ray tracing algorithm is used to calculate the propagation path of light inside the lens to obtain the optical path structure characteristic parameters of the lens; According to the characteristic parameters of the optical path structure, the spherical aberration, coma and astigmatism of the lens are calculated by using the Seidel aberration analysis method, and an aberration characteristic model of the lens is established; According to the optical path structure characteristic parameters and the aberration characteristic model, the imaging equation of the lens is derived using the thin lens equation and the light propagation matrix, and a mapping relationship function between the lens parameters and the three-dimensional space points is established; The Levenberg-Marquardt algorithm is used to perform parameter fitting on the mapping relationship function, to obtain the three-dimensional reconstruction internal and external parameter matrices of the lens, and to obtain the three-dimensional reconstruction parameter configuration of the lens.
3. The method according to claim 1, characterized in that The optical lens parameters of the scene to be reconstructed are obtained, and the parameters corresponding to the lens including point cloud density, gridding resolution and texture mapping accuracy are preliminarily determined in combination with the parameter configuration of different lens types, including: Extract focal length, field of view, aperture size and sensor size from camera EXIF information, query the pre-established lens type database based on optical lens parameters, and determine the lens type used for the scene to be reconstructed; According to the lens type, extracting corresponding point cloud density benchmark values, gridding resolution benchmark values, and texture mapping accuracy benchmark values from a parameter configuration library obtained based on statistics of a large amount of experimental data as initial parameter configurations; The Brown-Conrady distortion correction model is used to compensate the distortion coefficient in the optical lens parameters, and the radial distortion and tangential distortion parameters are calculated to obtain the corrected field of view angle and effective pixel number. According to the corrected field of view angle and number of effective pixels, the point cloud density reference value and the gridding resolution reference value are adjusted. If the field of view angle increases, the point cloud density reference value is increased; if the number of effective pixels decreases, the gridding resolution reference value is decreased; Calculate the ratio of the resolution of the scene image to be reconstructed to the size of the sensor to obtain the pixel density per unit area, and calibrate the texture mapping accuracy reference value in combination with the corrected field of view. If the pixel density is higher than a preset threshold, increase the texture mapping accuracy reference value; Fine-tune the adjusted parameters according to the characteristics of the lens type to obtain a final 3D reconstruction parameter configuration suitable for the scene to be reconstructed; It also includes: optimizing the acquisition density of point cloud data by analyzing the focal length and aperture of the lens, combining the scene characteristics and reconstruction requirements, including adjusting the point cloud density parameters accordingly for different lens types, including wide-angle lenses and telephoto lenses, while ensuring the reconstruction quality, while improving data processing efficiency, specifically including: obtaining the focal length and aperture value in the lens metadata, matching the lens type according to a pre-established lens type database, judging whether the lens type is a wide-angle lens or a telephoto lens, and obtaining the initial point cloud density parameters; using the structured light method to project a known structured light pattern, analyzing the deformation of the structured light pattern to calculate the average depth of field and depth of field range of the scene, combining the focal length and aperture value to obtain the depth of field of the scene. clarity distribution map; use U-Net to perform semantic segmentation on the scene, identify the main objects and background in the scene, set weight coefficients for different areas, and assign high weights to important areas; combine the clarity distribution map, regional weights and depth information to generate a preliminary distribution map of point cloud density, if the lens type is a wide-angle lens, increase the sampling density of the edge area, if the lens type is a telephoto lens, improve the sampling accuracy of the central area; implement an adaptive sampling algorithm based on the hierarchical sampling strategy of the octree, optimize the point cloud density according to the preliminary distribution map, increase sampling points in complex texture areas, and reduce sampling points in flat areas to obtain the final point cloud sampling density parameters.
4. The method according to claim 1, characterized in that The mapping accuracy parameters initially determined are analyzed to determine whether the computational complexity and the amount of computation meet the preset requirements. If the computational complexity and the amount of computation are both higher than the threshold, the point cloud density and the gridding resolution are reduced accordingly. If the reconstruction accuracy is insufficient, the texture mapping accuracy is increased accordingly, and a parameter configuration scheme that balances computational efficiency and reconstruction quality is obtained, including: Obtaining the time complexity and memory usage of the 3D reconstruction process, wherein the time complexity is estimated using Big O notation, and the memory usage is obtained by calculation; Comparing the time complexity and the memory usage with a preset threshold, if the time complexity or the memory usage exceeds the preset threshold, reducing the point cloud density and the gridding resolution, the reduction ratio being a percentage exceeding the preset threshold; Performing an immediate evaluation on the reconstruction result after reducing the parameters, wherein the immediate evaluation uses a weighted average of a structural similarity index and a peak signal-to-noise ratio as a comprehensive evaluation index; Determine whether the comprehensive evaluation index reaches the preset standard. If the comprehensive evaluation index does not reach the preset standard, improve the texture mapping accuracy by 5% of the current texture mapping accuracy. A new parameter configuration scheme is generated according to the adjusted point cloud density, meshing resolution and texture mapping accuracy, and complexity estimation and quality evaluation are performed, which are iterated repeatedly until the optimal parameter configuration is found.
5. The method according to claim 1, characterized in that The parameter configuration scheme that balances computational efficiency and reconstruction quality is used to process the original image data to obtain the original image information, and the sparse point cloud of the scene is obtained by feature extraction and matching, and the point cloud is densified in combination with multi-view geometric constraints to generate a high-density point cloud model, including: Preprocessing the original image data, including image denoising and color correction, to obtain preprocessed image information; Using a scale-invariant feature transformation algorithm to extract features from the preprocessed image to obtain key points and descriptors; According to the key points and descriptors, a fast nearest neighbor search library algorithm is used to perform feature matching to screen out matching point pairs with high confidence; Based on the matching point pairs and camera parameters, a random sampling consensus algorithm is used to estimate external parameters, internal points are selected through iterative optimization and geometric consistency check, and a geometric relationship between multiple views is established; If the geometric relationship is successfully established, the coordinates of the three-dimensional space points are calculated by triangulation to generate a sparse point cloud of the scene; Combining multi-view geometric constraints, a patch expansion algorithm is used to densify the sparse point cloud, starting from high confidence points and gradually expanding the patches; Iteratively optimize the expanded facets, combine occlusion relationships and surface normal consistency, continuously expand the existing point cloud, fill in blank areas, and obtain a high-density point cloud model; The high-density point cloud model is post-processed, including statistical outlier filtering and normal vector consistency smoothing, to obtain a final high-quality point cloud model.
6. The method according to claim 1, characterized in that The filtering, denoising and downsampling of the high-density point cloud and the triangulated mesh reconstruction of the point cloud according to the set meshing resolution to generate a meshed three-dimensional model of the scene include: Acquire high-density point cloud data, and apply a K-nearest neighbor algorithm to each point according to the high-density point cloud data to calculate the average distance to the nearest 50 neighboring points; Determine whether the average distance exceeds a preset threshold of 2.5 times the standard deviation, and if so, remove the point to obtain preliminary denoised point cloud data; The preliminary denoised point cloud data is processed using a voxel downsampling method, including: dividing the space into cubic grids with a side length of a preset grid resolution, calculating the centroid of each point in the grid, and selecting the point closest to the centroid as a representative point; Perform local plane fitting on the representative points using principal component analysis, select a neighborhood with a radius of 3 times the grid resolution around each point, calculate the covariance matrix of the points in the neighborhood, and use the eigenvector of the covariance matrix as the normal vector; Applying a Poisson surface reconstruction algorithm to the simplified point cloud according to the normal vector to perform triangulated mesh reconstruction, and generating a continuous and smooth surface by iteratively solving the Poisson equation; The continuous smooth surface is post-processed, including: removing triangles with an area smaller than the square of the gridding resolution, repairing non-manifold edges, and outputting a three-dimensional grid model of the scene that meets the gridding resolution.
7. The method according to claim 1, characterized in that The original image information is mapped onto the gridded three-dimensional model, and the texture sampling rate and fusion mode are controlled according to a preset mapping accuracy to obtain a three-dimensional reconstructed model with realistic texture, including: Calculating the projection area of the triangular face in the original image according to the vertex coordinates and normal vector information of the three-dimensional model and the camera parameters, and establishing a corresponding relationship between the three-dimensional model and the two-dimensional image; The texture coordinates of the internal points of the triangular patch are calculated by using a barycentric coordinate interpolation method, a sampling interval is determined according to a preset mapping accuracy, and color information of the corresponding area is extracted from the original image; Using the Z-buffer algorithm to perform line of sight visibility detection, determine the visibility of the triangular facets at different viewing angles, select the best texture source image, and record the texture source information of each facet; A multi-band blending algorithm is used to fuse texture information from different perspectives. The weight calculation of the multi-band blending algorithm is based on the viewing angle and the image clarity. A weighted average is calculated to obtain a fused texture map. Using Poisson image editing technology to process the texture seams and color discontinuity problems in the fused texture map to ensure the smoothness of texture transition and obtain a three-dimensional reconstructed model with realistic texture; It also includes: mapping the original image information onto the gridded 3D model, extracting and analyzing the color, texture and edge of the image, determining the positional relationship between different areas in the image and the 3D model to achieve image-to-model mapping; controlling the texture sampling rate and fusion method according to the set mapping accuracy, resampling and fusing the image, generating a texture that matches the 3D model, and finally obtaining a 3D reconstructed model with realistic texture; in the 3D reconstruction process, obtaining the original image information from multiple perspectives to cover various parts of the model, fusing images from different perspectives, and optimizing the texture mapping through weighted fusion and seamless splicing methods, eliminating the color difference and seams between images from different perspectives, and generating a seamless 3D reconstructed model with consistent texture to improve the visual quality and realism of the 3D reconstructed model; The method maps the original image information onto the gridded 3D model, extracts and analyzes the color, texture and edge of the image, determines the positional relationship between different areas in the image and the 3D model, so as to realize the mapping from the image to the model; controls the texture sampling rate and fusion mode according to the set mapping accuracy, resamples and fuses the image, generates a texture matching the 3D model, and finally obtains a 3D reconstructed model with realistic texture, specifically including: obtaining the original image, performing RGB to HSV color space conversion according to the original image and performing histogram equalization processing to obtain the color features of the image; smoothing the color features of the image by using Gaussian filtering, and performing Sobel operator on the smoothed image Perform edge detection to obtain edge information of the image; apply the gray-level co-occurrence matrix method to extract texture features of the image. If the distance parameter is 1 and the directions are 0°, 45°, 90° and 135°, calculate four statistics: contrast, correlation, energy and homogeneity; determine the surface point of the 3D model corresponding to each pixel in the image according to the geometric information of the 3D model and the camera parameters, and determine the position of different areas in the image on the 3D model by the back projection algorithm; construct a 5-layer Laplacian pyramid using a multi-resolution fusion algorithm to fuse the texture information of multiple images, wherein the low-frequency layer uses mean fusion and the high-frequency layer determines the weight according to the gradient amplitude to obtain a high-quality texture map that matches the 3D model; In the 3D reconstruction process, original image information is obtained from multiple perspectives to cover various parts of the model, images from different perspectives are fused, and texture mapping is optimized through weighted fusion and seamless stitching methods to eliminate color differences and seams between images from different perspectives, so as to generate a seamless 3D reconstruction model with consistent texture to improve the visual quality and realism of the 3D reconstruction model. Specifically, the system uses a golden spiral algorithm to generate multiple perspective sampling points evenly distributed on a spherical surface according to the geometric structure of the 3D model, and obtains imaging parameters of each perspective by adjusting the focal length and field of view; the system uses ray tracing technology to simulate and generate original image information covering various parts of the 3D model based on the imaging parameters; the system pre-processes the original image information, including: using a histogram matching algorithm to unify the color distribution of images from different perspectives, and using an automatic The local contrast of the image is adjusted by an adaptive histogram equalization algorithm; based on the geometric information of the three-dimensional model and the imaging parameters, the system calculates the visibility and projection quality of each triangular facet in images of different viewing angles, constructs a viewing angle weight map, and uses a pyramid fusion method to align and weightedly fuse texture information of different resolutions to generate a preliminary texture mapping result; the system uses image stitching technology to seamlessly process the texture mapping result, uses a Poisson fusion algorithm to eliminate seams, sets a Dirichlet boundary condition, and adjusts the color and brightness of the texture boundary through iterative optimization using a least squares method; the system uses a structural similarity index to evaluate the quality of the generated texture, calculates the SSIM value between the original image information and the reconstructed texture, and when the SSIM value is greater than a preset threshold, a final three-dimensional reconstructed model texture with seamless connection and consistent texture is obtained.
8. The method according to claim 1, characterized in that The method analyzes the geometric accuracy and visual quality of the three-dimensional reconstruction model with realistic textures, and if the preset threshold is not met, readjusts the mapping accuracy parameters as the initially determined mapping accuracy parameters, and then reconstructs the three-dimensional reconstruction model with realistic textures, and if the requirements are met, outputs the final three-dimensional reconstruction result, completing the adaptive parameter configuration process based on lens characteristics, including: Acquire a three-dimensional reconstructed model and a reference point cloud acquired by high-precision laser scanning, and use a point cloud registration algorithm to calculate a geometric error between the three-dimensional reconstructed model and the reference point cloud, wherein the geometric error includes an average error and a maximum error value; Determining whether the three-dimensional reconstructed model meets a preset geometric accuracy threshold according to the geometric error; Performing multi-angle rendering on the three-dimensional reconstructed model to obtain a two-dimensional image; Calculating the structural similarity index, image gradient statistics, and DeltaE color difference between the two-dimensional image and the original image to obtain a visual quality score; Taking a weighted average of the geometric accuracy and the visual quality score to obtain an overall score; Determining whether the overall score meets a preset threshold; If the overall score does not meet the preset threshold, a simulated annealing algorithm is used to optimize and adjust the mapping accuracy parameters, wherein the mapping accuracy parameters include point cloud density, gridding resolution, and texture mapping accuracy; Re-execute the three-dimensional reconstruction process according to the optimized and adjusted mapping accuracy parameters; updating a database of mapping relationships between lens characteristics and 3D reconstruction parameters according to a final 3D reconstruction result obtained in the 3D reconstruction process and corresponding lens parameters; The mapping relationship database is used in the adaptive parameter configuration process based on lens characteristics.
9. An optical lens high-precision three-dimensional reconstruction system, characterized in that: The system comprises: A lens characteristic analysis module is used to establish a mapping relationship between lens characteristics and three-dimensional reconstruction parameters; An adaptive parameter configuration module, used to preliminarily determine 3D reconstruction parameters according to lens parameters; Point cloud generation module, used to extract features from raw image data and generate high-density point clouds; Mesh model reconstruction module, used for filtering and denoising high-density point clouds and reconstructing triangulated meshes; Texture mapping module, used to map the original image information onto the gridded 3D model; The accuracy evaluation and optimization module is used to analyze the accuracy of the 3D reconstruction model and adjust the parameters.
Citation Information
Cited By
A device and method for measuring the diameter change rate of a PVC pipe
CN119737907A
Cell tissue morphology microscopic imaging method and imaging device thereof
CN119757342A
Cylindrical lens grating two-viewpoint image fusion method for 3D display
CN119946242A
Method and system for modeling luggage and accessories thereof based on three-dimensional point cloud
CN120107515A
Point switch fault identification method and system based on data analysis
CN120318649A
