CN-122023733-A - Three-dimensional reconstruction method based on image and oriented to electromagnetic simulation
Abstract
The invention discloses an electromagnetic simulation-oriented three-dimensional reconstruction method based on images. The method comprises the steps of acquiring and receiving a multi-view image structure by a camera to recover to obtain a sparse point cloud and camera parameters, inputting the sparse point cloud and camera parameters into a computer to be processed, initializing each point of the sparse point cloud by using a sphere initialization method to obtain each quadric surface primitive, carrying out joint optimization on each quadric surface primitive by using a simulated annealing algorithm, extracting triangular grids for a symbol distance field formed by all the quadric surface primitives, and obtaining a three-dimensional reconstruction result for inputting the three-dimensional reconstruction result into electromagnetic simulation. The method has clear flow and high automation degree, can effectively reduce geometric holes in the reconstruction model, improves the continuity and geometric consistency of the curved surface, solves the problem that the existing vision-based reconstruction method is difficult to meet the geometric precision and continuity requirements of electromagnetic simulation, remarkably improves the usability and reliability of the reconstruction model in high-frequency electromagnetic simulation, and has good engineering application prospect.
Inventors
- LIN HAI
- JIA YANPENG
Assignees
- 浙江大学
Dates
- Publication Date
- 20260512
- Application Date
- 20260410
Claims (10)
- 1. An electromagnetic simulation-oriented three-dimensional reconstruction method based on images is characterized by comprising the following steps of: step 1, acquiring and receiving a multi-view image by using a camera, and performing structure recovery to obtain sparse point clouds and camera parameters; step 2, inputting the sparse point cloud and camera parameters into a computer for processing, and initializing each point of the sparse point cloud by using a ball initialization method to obtain each quadric surface primitive; Step 3, performing joint optimization on each quadric surface primitive obtained in the step 2 based on opacity, rendering and calculation loss through a simulated annealing algorithm in a computer; and step 4, extracting triangular grids for a symbol distance field formed by all quadric surface primitives after the joint optimization is completed, and obtaining a three-dimensional reconstruction result which is used for being input into electromagnetic simulation.
- 2. The method for three-dimensional reconstruction based on image oriented to electromagnetic simulation of claim 1, wherein the step 1 is specifically that a multi-view image is obtained by shooting a scene or an object from a plurality of view angles by using a camera, the multi-view image is subjected to structure restoration by using a motion structure restoration algorithm SFM to obtain sparse point clouds, and meanwhile, internal parameters and external parameters of the camera are obtained.
- 3. The method for three-dimensional reconstruction based on electromagnetic simulation of claim 1, wherein in the step 2, each point of the sparse point cloud is used as a center point of the quadric surface primitive, and a sphere initialization method is used for initializing the quadric surface primitive to generate the quadric surface primitive, wherein the quadric surface primitive comprises parameters such as position, rotation, scaling, color, opacity, beta kernel function control parameters, distance value parameters and the like.
- 4. The method for three-dimensional reconstruction based on image oriented to electromagnetic simulation according to claim 1, wherein in the step 3, the joint optimization for each quadric surface primitive is specifically: S1, carrying out the following optimization treatment on each quadric surface primitive and obtaining loss; S1.1, setting a weight coefficient according to the current iteration round; s1.2, mapping distance value parameters of quadric surface primitives into integral opacity; s1.3, carrying out weighted average on the opacity of the quadric surface primitive and the overall opacity by using a weight coefficient to obtain mixed opacity; s1.4, selecting one view angle from a plurality of view angles corresponding to the multi-view image as a preset view angle, and rendering the quadric surface element by using mixed opacity according to the position, rotation, scaling, color and beta kernel function control parameters of the quadric surface element under the preset view angle to obtain a corresponding rendered image, a depth map and a normal vector map; S1.5, calculating the loss of the current quadric surface primitive according to the rendered image, the depth map and the normal vector map; s2, repeating the step S2 to optimize all quadric surface primitives and obtain respective losses; S3, updating parameters of all quadric primitives by using the current quadric primitives and losses of the current quadric primitives by using the losses through counter propagation so as to dynamically reduce the value of the beta kernel function parameter in the quadric primitives; and S4, repeating the steps S1-S3 continuously for repeated iteration processing until the preset iteration times are reached.
- 5. The method for three-dimensional reconstruction of electromagnetic simulation based on image of claim 4, wherein in step S1.1, the weight coefficient is set to gradually increase from 0 to 1 in each iteration process of joint optimization, and the weight coefficient is shared by all quadric surface primitives.
- 6. The electromagnetic simulation-oriented three-dimensional reconstruction method based on the image is characterized in that in the step S1.4, the quadric surface primitive is rendered by combining ray projection and block rendering, specifically, the method comprises the steps of transforming a quadric surface primitive into a coordinate system from a local coordinate system to a world coordinate system according to the position, rotation, scaling and parameters of a camera of the quadric surface primitive, transforming the world coordinate system to the camera coordinate system, calculating an intersection point of the ray and the quadric surface primitive, calculating opacity based on a geodesic distance at the intersection point, normalizing the geodesic distance to obtain a rendering weight through a beta kernel function, multiplying the rendering weight by the opacity to obtain the opacity at the intersection point, estimating the projection range of the quadric surface primitive on a rendering display screen through a polynomial approximation method, and distributing the quadric surface primitive to the corresponding rendering display screen.
- 7. The electromagnetic simulation-oriented three-dimensional reconstruction method based on the image is characterized in that in the step S1.5, the loss comprises color loss, depth loss, normal vector consistency loss, projection consistency loss and multi-view angle loss, wherein the color loss is loss of pixel color established between an image corresponding to a preset view angle in a multi-view image and a rendered image, the depth loss is calculated based on an intersection point of light rays and a quadric surface primitive in the rendering process, the normal vector consistency loss is loss of normal deviation established between a normal map obtained by reasoning a depth map and a normal vector map, the projection consistency loss is obtained by comparing the quadric surface primitive with the normal vector map, the depth map and a camera position of a reference view angle, and the multi-view angle consistency loss is obtained by constructing a re-projection error by comparing the normal vector map, the depth map and the camera position of the reference view angle and the target view.
- 8. The method for three-dimensional reconstruction based on image oriented electromagnetic simulation of claim 4, further performing densification operation in the joint optimization process after the step S2 and before the step S3 to dynamically increase the beta kernel function parameter of the local quadric primitive, wherein the densification operation process comprises: D1, screening out low-contribution graphic primitives according to the mixed opacity, wherein the low-contribution graphic primitives are quadric graphic primitives with the mixed opacity lower than a preset opacity threshold; D2, sampling the residual quadric primitives except for the low-contribution primitives for all the quadric primitives for the first time, and moving the low-contribution primitives according to the sampled residual quadric primitives; d3, performing secondary sampling and copying on all quadric surface primitives in the scene to generate new quadric surface primitives; D4, setting larger beta kernel function parameters for the low-contribution graphic element with the position shifted in the step D3 and the quadric graphic element newly generated in the step D3, and specifically setting according to the following formula: new_b = max(b + 0.5×log(t+1), 0.0) Wherein new_b represents a new beta kernel function control parameter, b represents an original beta kernel function control parameter, t is the sampled times of the sampled quadric surface primitives, log represents log operation, and max represents a larger value function; and presetting a primitive total number threshold in the densification operation process, if the number of all quadric surface primitives under each iteration at present reaches the primitive total number threshold, only performing steps D1, D2 and D4 in the densification operation process of the current iteration, and setting a larger beta kernel function parameter for only the low-contribution primitives with the positions moving in the step D3 in the step D4.
- 9. The method for three-dimensional reconstruction based on electromagnetic simulation of claim 7, wherein step D2 is characterized in that according to the number of low-contribution primitives, polynomial distribution sampling is performed based on the respective mixed opacity of the remaining quadric surface primitives to obtain the same number of primary sampled primitives, each low-contribution primitive is allocated to a corresponding primary sampled primitive, and each low-contribution primitive is moved to the vicinity of the position of the corresponding primary sampled primitive, so as to optimize primitive distribution.
- 10. The method of three-dimensional reconstruction of electromagnetic simulation based on image of claim 7, wherein in step D3, the number of primitives to be sampled for the second time is calculated first, the required number of samples m=0.02n is set, polynomial distribution sampling is performed on all quadric surface primitives based on respective mixed opacities to obtain m secondary sampled primitives, the secondary sampled primitives are copied in situ by themselves, and random offset values are set to move to form new quadric surface primitives.
Description
Three-dimensional reconstruction method based on image and oriented to electromagnetic simulation Technical Field The invention relates to the technical field of electromagnetic simulation geometric modeling and artificial intelligence, in particular to a three-dimensional reconstruction method facing electromagnetic simulation based on Gaussian sputtering. Background Along with the wide application of electromagnetic simulation technology in the fields of radar scattering characteristic analysis, antenna design, electromagnetic compatibility, electromagnetic material characterization and the like, the authenticity and precision of a geometric model are gradually becoming important factors influencing the reliability of simulation results. Electromagnetic simulation is a process of obtaining scattering properties, radiation properties or transmission properties of an object by numerically solving electromagnetic field distribution of the object surface or space. The accuracy of the calculation result not only depends on the stability of the numerical algorithm and the meshing strategy, but also directly depends on the accuracy, smoothness and topological integrity of the input geometric model. For targets in complex structures or real scenes, the consistency of model geometry and real objects is difficult to ensure in a traditional manual modeling mode, and strict requirements of high-frequency simulation on micro-scale structural details are also difficult to meet. At present, the geometric model in electromagnetic simulation mainly originates from CAD (Computer AIDED DESIGN) design or three-dimensional scanning. CAD modeling relies on manual operation, has complex flow and long period, and particularly for the modeling process of irregular shapes or large targets, a great deal of manual intervention and geometric simplification are needed, which not only increases modeling cost, but also inevitably causes errors between the model and a real structure. The three-dimensional scanning method based on the laser radar or the structured light can acquire the point cloud data with higher precision, but has the advantages of high equipment cost, huge data volume and sensitivity to the environmental illumination condition, and limits the application of the method in engineering sites and complex environments. The problems of holes, cracks, and non-closed boundaries often exist in the traditional reconstruction model, the defects have small influence in visual rendering, but surface current path interruption or boundary condition errors can be caused in electromagnetic simulation, so that non-object understanding is generated, and the visual reconstruction usually adopts smooth or simplified processing on high curvature areas, sharp edges and complex details, and the geometric features are precisely sensitive areas in electromagnetic scattering and radiation response. In addition, the reconstruction result is also often insufficient in terms of normal continuity, curved surface smoothness and fidelity of an electromagnetic sensitive area, and the mesh quality requirement of high-frequency electromagnetic simulation is difficult to meet. Disclosure of Invention The invention provides an electromagnetic simulation-oriented three-dimensional reconstruction method based on images, which aims to solve the problem that the three-dimensional reconstruction method based on images in the background technology is difficult to meet the requirements of electromagnetic simulation on geometric continuity, curved surface consistency and simulation usability. The technical scheme adopted by the invention is as follows: step 1, acquiring and receiving a multi-view image by using a camera, and performing structure recovery to obtain sparse point clouds and camera parameters; step 2, inputting the sparse point cloud and camera parameters into a computer for processing, and initializing each point of the sparse point cloud by using a ball initialization method to obtain each quadric surface primitive; Step 3, performing joint optimization on each quadric surface primitive obtained in the step2 through a simulated annealing algorithm; And 4, extracting a triangular mesh by adopting a Marching Cubes method aiming at a symbol distance field formed by all quadric surface primitives after the joint optimization is completed, so as to obtain a three-dimensional reconstruction result, and inputting the three-dimensional reconstruction result into electromagnetic simulation. In electromagnetic simulation, a triangular mesh CAD model of a scene or an object is required to be built, and the invention obtains a computer model of the scene or the object for electromagnetic simulation by analyzing and reconstructing a visual image. Scenes or objects are typically living environments in a room and living and household items within. The step 1 specifically includes that a camera is adopted to shoot a scene or an object from multiple view angles to o