Image-based three-dimensional reconstruction method for electromagnetic simulation

By employing an image-based 3D reconstruction method, utilizing multi-view images acquired by a camera for structural restoration and optimizing the simulated annealing algorithm, and combining this with the Marching Cubes method to extract triangular meshes, the problem of geometric discontinuity in traditional geometric modeling is solved. This achieves high-precision electromagnetic simulation geometric modeling and improves the accuracy and reliability of electromagnetic simulation results.

CN122023733APending Publication Date: 2026-05-12ZHEJIANG UNIV
View PDF 9 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ZHEJIANG UNIV
Filing Date
2026-04-10
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

Traditional geometric modeling methods are difficult to meet the requirements of electromagnetic simulation for geometric continuity, surface consistency and simulation usability. In particular, there are problems such as holes, cracks and unclosed boundaries in the modeling of targets in complex structures or real scenes. Furthermore, visual reconstruction methods do not handle high curvature areas and complex details properly, resulting in inaccurate electromagnetic simulation results.

Method used

An image-based 3D reconstruction method is adopted. Multi-view images are acquired by a camera to obtain sparse point clouds through structural restoration. Simulated annealing algorithm is used to jointly optimize quadratic surface primitives, and the Marching Cubes method is combined to extract triangular meshes. A symbolic distance field is constructed for 3D reconstruction, and Gaussian sputtering method is introduced to densify primitives and optimize rendering.

Benefits of technology

It significantly improves the geometric continuity and surface consistency of the reconstructed model, enhances its usability and reliability in high-frequency electromagnetic simulation, reduces the risk of numerical instability during training and rendering, and improves the overall accuracy of the reconstruction results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122023733A_ABST
    Figure CN122023733A_ABST
Patent Text Reader

Abstract

The invention discloses an image-based three-dimensional reconstruction method for electromagnetic simulation. Collecting and receiving a multi-view image structure by using a camera, and recovering to obtain sparse point cloud and camera parameters; inputting the data into a computer for processing, and performing initialization processing on each point of the sparse point cloud by using a ball initialization method to obtain respective quadric surface primitives; performing joint optimization on each quadric surface primitive through a simulated annealing algorithm; and extracting a triangular mesh for a symbol distance field formed by all the quadric surface primitives to obtain a three-dimensional reconstruction result, and inputting the three-dimensional reconstruction result into electromagnetic simulation. The method is clear in process and high in automation degree, geometric holes in a reconstruction model can be effectively reduced, surface continuity and geometric consistency are improved, the problem that an existing visual reconstruction method is difficult to meet the requirements for electromagnetic simulation geometric precision and continuity is solved, and the method is worthy of popularization and application. The usability and reliability of a reconstruction model in high-frequency electromagnetic simulation are remarkably improved, and the method has a good engineering application prospect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of electromagnetic simulation geometric modeling and artificial intelligence technology, specifically to a three-dimensional reconstruction method for electromagnetic simulation based on Gaussian sputtering. Background Technology

[0002] With the widespread application of electromagnetic simulation technology in fields such as radar scattering characteristic analysis, antenna design, electromagnetic compatibility, and electromagnetic material characterization, the realism and accuracy of geometric models are gradually becoming important factors affecting the reliability of simulation results. Electromagnetic simulation is the process of numerically solving for the electromagnetic field distribution on the surface of an object or in space to obtain its scattering, radiation, or transmission characteristics. The accuracy of its calculation results depends not only on the stability of the numerical algorithm itself and the mesh generation strategy, but also directly on the accuracy, smoothness, and topological integrity of the input geometric model. For complex structures or targets in real-world scenarios, traditional manual modeling methods struggle to ensure the consistency between the model geometry and the real object, and also fail to meet the stringent requirements of high-frequency simulations for microscale structural details.

[0003] Currently, the geometric models used in electromagnetic simulations primarily originate from CAD (Computer-Aided Design) or 3D scanning. CAD modeling relies on manual operation, is complex, and time-consuming. Especially for modeling irregular shapes or large targets, significant manual intervention and geometric simplification are required, increasing modeling costs and inevitably causing errors between the model and the actual structure. While 3D scanning methods based on LiDAR or structured light can acquire high-precision point cloud data, their high equipment costs, massive data volume, and sensitivity to ambient lighting conditions limit their application in engineering sites and complex environments.

[0004] Traditional reconstruction models often suffer from defects such as holes, cracks, and unclosed boundaries. While these defects have a relatively small impact on visual rendering, they can lead to interrupted surface current paths or incorrect boundary conditions in electromagnetic simulations, resulting in non-physical interpretations. Furthermore, visual reconstructions often smooth or simplify high-curvature regions, sharp edges, and complex details, which are precisely the areas sensitive to electromagnetic scattering and radiation responses. In addition, the reconstruction results often fall short in terms of normal continuity, surface smoothness, and fidelity in electromagnetically sensitive areas, making it difficult to meet the mesh quality requirements of high-frequency electromagnetic simulations. Summary of the Invention

[0005] To address the problem that image-based 3D reconstruction methods in the background art cannot meet the requirements of electromagnetic simulation for geometric continuity, surface consistency, and simulation usability, this invention provides an image-based 3D reconstruction method for electromagnetic simulation.

[0006] The technical solution adopted in this invention is: Step 1: Use a camera to acquire and receive multi-view images to perform structure reconstruction and obtain sparse point clouds and camera parameters; Step 2: Input the sparse point cloud and camera parameters into the computer for processing. For each point in the sparse point cloud, use the sphere initialization method to initialize and process it to obtain its own quadratic surface primitive. Step 3: Perform joint optimization on the quadratic surface primitives obtained in Step 2 using the simulated annealing algorithm; Step 4: After joint optimization is completed, the Marching Cubes method is used to extract triangular meshes from the symbolic distance field composed of all quadratic surface primitives to obtain the three-dimensional reconstruction results, which are then input into the electromagnetic simulation.

[0007] In electromagnetic simulation, it is necessary to build a triangular mesh CAD model of a scene or object. This invention obtains a computer model of a scene or object for electromagnetic simulation by analyzing and reconstructing images through visual means.

[0008] The scene or object is usually an indoor living environment and the living items and household items inside it.

[0009] Step 1 specifically involves: using a camera to capture scenes or objects from multiple perspectives to obtain multi-view images; using the Structure in Motion (SFM) algorithm to restore the structure of the multi-view images to obtain sparse point clouds; and simultaneously obtaining the camera's intrinsic and extrinsic parameters.

[0010] The camera parameters include intrinsic and extrinsic parameters.

[0011] The quadratic surface primitive is an ellipsoidal parabola, which is truncated to obtain a finite surface by extending it infinitely. In this invention, all quadratic surface primitives constitute the symbolic distance field.

[0012] In step 2, a quadratic surface primitive is generated by initializing each point of the sparse point cloud as the center point of the quadratic surface primitive using the sphere initialization method. The quadratic surface primitive includes parameters such as position, rotation, scaling, color, opacity, β kernel function control parameters, and distance value parameters.

[0013] The β kernel function control parameters are used for subsequent rendering weights, and the distance value parameters are used to identify the relationship between the inside and outside of the quadratic surface primitives.

[0014] In step 2, since the method of this invention integrates SDF and Gaussian sputtering methods, in addition to position, scale, rotation, opacity, and color information, distance value information and β kernel control parameters also need to be initialized for the primitive information. The distance value parameters of the primitives are initialized using the distance from each point to the unit sphere surface, and the orientation (i.e., rotation parameter) of the primitives is initialized based on the sphere normal vector. The position parameters are directly used from the point cloud position, the scaling parameters are initialized using the KNN algorithm, the β kernel control parameters are initialized with zero, and other parameters are obtained through random initialization.

[0015] In step 3, the joint optimization for each quadratic surface primitive is specifically as follows: S1. Optimize each quadratic surface primitive and obtain the loss; S1.1 Set the weight coefficients according to the current iteration round; S1.2 Map the distance value parameter of the quadratic surface primitive to the overall opacity; S1.3. The mixed opacity is obtained by weighting the opacity of the quadratic surface primitive itself with the overall opacity using a weighted average of the weighting coefficients. S1.4 Select one of the multiple perspectives corresponding to the multi-view image as the predetermined perspective. Under the predetermined perspective, render the quadratic surface primitive using the blending opacity according to the position, rotation, scaling, color and β kernel function control parameters of the quadratic surface primitive to obtain the corresponding rendered image, depth map and normal vector map. In the rendering process, each primitive undergoes a 3D coordinate transformation from its local coordinate system to the world coordinate system, and then from the world coordinate system to the camera coordinate system. Each transformation step is calculated using a corresponding 4×4 transformation matrix. Furthermore, the scaling parameters represent the lengths of the three principal axes in the local coordinate system.

[0016] The pixel color of the rendered image is obtained based on the color of the intersection point of the light and the quadratic surface primitive. The intersection point is obtained based on the parameters of position, rotation, scaling, camera position, and light direction. The color at the intersection point is calculated based on the blending opacity and the color parameters of the quadratic surface primitive.

[0017] Each pixel in the rendered image is generated based on color and β kernel function control parameters.

[0018] S1.5 Calculate the loss of the current quadratic surface primitive based on the rendered image, depth map, and normal vector map; S2. Repeat step S2 above to optimize all quadratic surface primitives and obtain their respective losses; S3. Using all current quadratic surface primitives and their respective losses, update the parameters of all quadratic surface primitives through backpropagation using the losses, so as to dynamically reduce the value of the β kernel function parameter in the quadratic surface primitives; S4. Repeat steps S1 to S3 repeatedly for multiple iterations until the preset number of iterations is reached.

[0019] In step S1.1, the weight coefficient is set to gradually increase from 0 to 1 in each iteration of the joint optimization, and the weight coefficient is shared by all quadratic surface primitives.

[0020] In step S1.4, the rendering of the quadratic surface primitives adopts a combination of ray casting and block rendering, specifically including: The quadratic surface primitives are transformed into different coordinate systems based on their position, rotation, scaling, and camera parameters. The transformation occurs from the local coordinate system to the world coordinate system, and then back to the camera coordinate system. The intersection points of rays and quadratic surface primitives are calculated, and the opacity is calculated based on the geodesic distance at the intersection points. The geodesic distance is the shortest distance on the surface between the intersection point and the center point. After normalizing the geodesic distance, a weighted average is obtained using a β kernel function. The rendering weight is then multiplied by the opacity to obtain the opacity at the intersection points. The projection range of quadratic surface primitives on the rendering display screen is estimated by using a polynomial approximation method, and the quadratic surface primitives are then assigned to the corresponding rendering display screens.

[0021] In step S1.5, the loss includes color loss, depth loss, normal vector consistency loss, projection consistency loss, and multi-view loss: The color loss is the loss of pixel color established between the image corresponding to a predetermined viewpoint and the rendered image in the multi-view image.

[0022] The depth loss is calculated during the rendering process based on the depth value of the intersection point between the light ray and the quadratic surface primitive and its corresponding rendering weight.

[0023] The normal vector consistency loss is the loss caused by the normal deviation established between the normal map and the normal vector map obtained by reasoning from the depth map.

[0024] The projection consistency loss in step S1.5 is calculated in the following way: Project the center point of the quadratic surface primitive along the corresponding gradient direction onto the zero level set surface of the whole composed of all quadratic surface primitives to obtain the projection point and its coordinates. Then calculate the depth value of the projection point from the camera's perspective; The depth value is compared with the rendered depth map, and the difference between the two is calculated as the projection consistency loss.

[0025] The calculation process for the multi-view consistency loss in step S1.5 includes: By performing a relative rotation transformation between the reference viewpoint and the target viewpoint, the normal vectors of the normal vector map rendered under the reference viewpoint and the set of 3D point coordinates obtained based on the depth map under the reference viewpoint are transformed into the camera coordinate system of the target viewpoint; wherein the reference viewpoint is the predetermined viewpoint and the target viewpoint is the viewpoint adjacent to the reference viewpoint. The depth of the three-dimensional coordinate point set under the target viewpoint is calculated based on the camera position from the target viewpoint and the aforementioned three-dimensional coordinate point set. Calculate the reprojection error between the transformed normal vector, the depth of the 3D coordinate point set, and the normal vector of the rendered normal vector map and the depth of the depth map from the target viewpoint. Reprojection error is the loss of consistency across multiple views. Minimizing this error during the optimization process improves the geometric representation of the object's shape by the quadratic surface primitives.

[0026] In the joint optimization process after step S2 and before S3, a densification operation is also performed to dynamically improve the β kernel function parameter of the local quadratic surface primitives; the densification operation process includes: D1. Filter out low-contribution primitives based on the blend opacity. The low-contribution primitives are quadratic surface primitives with blend opacity lower than a preset opacity threshold. D2. Perform the first sampling on all quadratic surface primitives except for low-contribution primitives, and then move the low-contribution primitives accordingly. D3. Perform a second sampling and copying on all quadratic surface primitives in the scene to generate new quadratic surface primitives; D4. Set larger β kernel function parameters for the low-contribution primitives whose positions have shifted in step D3 and for the newly generated quadratic surface primitives in step D3, specifically according to the following formula: new_b = max(b + 0.5×log(t+1), 0.0) Where new_b represents the new β kernel function control parameter, b represents the original β kernel function control parameter, t is the number of times the sampled quadratic surface primitive is sampled, log represents the logarithmic operation, and max represents the larger value function. In the densification operation, a threshold for the total number of primitives is set in advance. If the number of all quadratic surface primitives in each iteration reaches the threshold for the total number of primitives, then only steps D1, D2, and D4 are performed in the densification operation of the current iteration. In step D4, a larger β kernel function parameter is set only for the low contribution primitives whose positions have moved in step D3, and the calculation method in D4 is still used.

[0027] The densification control scheme in step 4 improves representation quality by sampling based on the opacity of primitives, adjusting the attributes of primitives with high opacity, and then copying them to primitives with low opacity.

[0028] Step D2 is as follows: Based on the number of low-contribution primitives, a multinomial distribution sampling is performed on the remaining quadratic surface primitives to obtain the same number of primary sampled primitives. Each low-contribution primitive is assigned a corresponding primary sampled primitive, and each low-contribution primitive is moved to the vicinity of its corresponding primary sampled primitive to optimize the primitive distribution. Moving to the vicinity of the location refers to moving the center point of the low-contribution primitive to the center point of the sampled primitive, and then setting a random offset value to move the low-contribution primitive.

[0029] In step D3, the number of primitives to be sampled for the second time is first calculated and denoted as m. The number of samples required is m = 0.02n, where n is the total number of primitives. All quadratic surface primitives are sampled using a polynomial distribution based on their respective blending opacities to obtain m quadratic sampled primitives. The quadratic sampled primitives are copied in situ and moved with a random offset value to form a new quadratic surface primitive.

[0030] The isosurface extraction process in step 4 refers to constructing a TSDF representation based on the optimized Gaussian point cloud scene after completing the training of the 3D reconstruction model, and extracting the zero isosurface in the voxel space using the Marching Cubes algorithm, thereby obtaining a triangular mesh model that meets the requirements of geometric continuity and simulation usability.

[0031] The triangular mesh extraction in step 4 uses the Marching Cubes algorithm, which extracts isosurfaces based on the SDF representation of primitives.

[0032] The method of this invention includes: acquiring multi-view image data of the target to construct an image dataset of the scene, and obtaining camera parameters and an initial sparse point cloud through a motion reconstruction structure algorithm; initializing quadratic surface primitives from the sparse point cloud, and performing differentiable rendering of the primitives using Gaussian sputtering to obtain an initial geometric representation; constructing a 3D reconstruction model fused with a symbolic distance field, and jointly optimizing the quadratic surface primitives, camera parameters, and image data into the model to output a continuous and consistent implicit 3D geometric representation; introducing a primitive densification method based on β kernel function control and a simulated annealing training strategy during the optimization process to adaptively adjust the primitive distribution and opacity to obtain a high-precision scene geometric representation; finally, extracting isosurfaces from the optimized symbolic distance field to generate a triangular mesh model that meets the requirements of electromagnetic simulation, thereby realizing 3D reconstruction modeling for electromagnetic simulation.

[0033] The method of this invention has a clear process and a high degree of automation. It can effectively reduce geometric holes in the reconstructed model, improve the continuity of the surface and geometric consistency, and solve the problem that existing vision-based reconstruction methods cannot meet the requirements of geometric accuracy and continuity in electromagnetic simulation. It significantly improves the usability and reliability of the reconstructed model in high-frequency electromagnetic simulation and has good prospects for engineering applications.

[0034] The beneficial effects of this invention are: 1) This invention introduces the symbolic distance field into the Gaussian sputtering 3D reconstruction framework and uses continuous implicit geometric constraints to jointly optimize discrete primitives, which effectively reduces geometric holes and surface discontinuities in the reconstruction model, improves surface continuity and geometric consistency, and makes the generated 3D model more suitable for high-frequency electromagnetic simulation applications.

[0035] 2) This invention uses ellipsoidal parabolic surfaces as basic primitives for geometric representation. Compared with traditional Gaussian primitives, it can more accurately characterize the directionality and curvature features of local surfaces, improve the reconstruction stability of complex surfaces and high curvature regions, and reduce the risk of numerical instability during training and rendering.

[0036] 3) This invention uses a primitive weight modulation and densification strategy based on β kernel function control to enable primitives to adaptively cluster near implicit surfaces, thereby enhancing the ability to express geometric details and improving the overall accuracy of reconstruction results while ensuring computational efficiency. Attached Figure Description

[0037] Figure 1 This is a flowchart illustrating the execution process of the method of the present invention.

[0038] Figure 2 This is a visual diagram illustrating the β kernel function in the method of the present invention when different control parameters b are set.

[0039] Figure 3 The left side shows the reference model, and the right side shows the reconstruction result of the present invention.

[0040] Figure 4 The radar cross section (RCS) simulation results using physical optics are used as a reference model and the reconstruction results of this invention under the conditions of 3 GHz electromagnetic waves, an incident wave elevation angle of 90 degrees, and an azimuth angle of 0 to 360 degrees.

[0041] Figure 5 The image shows a truck reference model and the reconstruction result of this invention. The left side shows the reference model, and the right side shows the reconstruction result of this invention.

[0042] Figure 6The radar cross section (RCS) simulation results of the truck reference model and the reconstruction results of this invention are obtained using the physical optics method under the conditions of 3 GHz electromagnetic waves, incident wave elevation angle of 90 degrees, and azimuth angle of 0 to 360 degrees.

[0043] Figure 7 The images show the reconstruction results of the Jeep reference model and Comparative Example 1. The left side shows the reference model, and the right side shows the reconstruction results of Comparative Example 1.

[0044] Figure 8 The radar cross section (RCS) simulation results using physical optics are presented for the reconstruction results of the Jeep reference model and Comparative Example 1 under the conditions of 3 GHz electromagnetic waves, incident wave elevation angle of 90 degrees, and azimuth angle of 0 to 360 degrees. Detailed Implementation

[0045] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and do not limit the scope of protection of the invention.

[0046] Example 1:

[0047] This embodiment provides a high-precision 3D reconstruction method for electromagnetic simulation, the process of which is as follows: Figure 1 As shown, it includes the following steps: This embodiment uses a jeep model as the object of processing, reconstructs a triangular mesh model, and uses it as input for the physical optics method (a high-frequency electromagnetic simulation method) to perform electromagnetic simulation processing.

[0048] Step 1: Use a camera to acquire and receive multi-view images to perform structure reconstruction and obtain sparse point clouds and camera parameters.

[0049] The modeling object of the scene or object is captured by a camera from multiple perspectives to obtain images corresponding to each perspective as multi-view images. The multi-view images are then used to perform structure restoration by the structure motion recovery algorithm (SFM) to obtain sparse point clouds, and the intrinsic and extrinsic parameters of the camera are obtained at the same time.

[0050] Step 2: Input the sparse point cloud and camera parameters into the computer for processing. For each point in the sparse point cloud, use the sphere initialization method to initialize and process it to obtain its own quadratic surface primitive. In practice, the quadratic surface primitive uses an elliptic parabola as the basic representation unit. The elliptic parabola is defined in its own local Cartesian coordinate system by the scaling parameters of the three principal axes of the coordinate system and the coordinates of the center point. It also allows for arbitrary transformations in three-dimensional space through a rotation matrix, so as to achieve flexible modeling of complex surface structures.

[0051] The quadratic surface primitive is represented by an elliptic parabola, whose implicit function is: z = s³(x 2 / (s1) 2 + y 2 / (s2) 2 ), where s1, s2, and s3 represent the three components of the scaling parameter, and (x, y, z) represents the coordinates of a point on the ellipsoidal paraboloid. The coordinates of points on the ellipsoidal paraboloid should all satisfy the above implicit function.

[0052] By adjusting parameters s1, s2, s3, the rotation matrix, and the center point position, quadric surfaces of different shapes and orientations can be represented. During rendering, a ray casting method is used to calculate the intersection points of rays with the quadric surfaces, obtaining color, depth, and normal vectors.

[0053] Using each point in the sparse point cloud as the center point of an elliptic paraboloid, a quadratic surface primitive is generated through spherical initialization. The elliptic paraboloid contains seven parameters: position, rotation, scaling, color, opacity, β kernel function control parameters, and distance parameters. All quadratic surface primitives obtained from point processing are input into the computer for step 3. The position parameter directly uses the point cloud position, the rotation parameter is initialized based on the spherical normal vector, the scaling parameter is initialized using the KNN algorithm, the distance parameter is initialized using the distance from the point cloud to the unit sphere surface, and the other parameters are randomly initialized.

[0054] In this context, the β kernel function is used to control the opacity distribution of primitives, such as... Figure 2 As shown, its form is: B(d;b) = (1-d) β(b) For x∈[0,1], β(b)=4exp(b) Where b is an optimizable parameter, d is the normalized geodesic distance calculated based on primitives, the steepness of the opacity distribution is controlled by adjusting the value of b, B(x;b) is the β kernel function, where x is the normalized geodesic distance value, b is the control parameter of the β kernel function, β(b) indicates that the exponential term in B(x;b) is calculated using an exponential function based on b, and exp represents the natural exponential function.

[0055] When the optimizable parameter b is small, the opacity changes gradually, which is beneficial for representing low-frequency features; when the optimizable parameter b is large, the opacity changes steeply, which is beneficial for representing high-frequency features.

[0056] Step 3: Perform joint optimization on the quadratic surface primitives obtained in Step 2 using the simulated annealing algorithm, specifically as follows: S1. Optimize each quadratic surface primitive and obtain the loss; S1.1 Set the weight coefficients according to the current iteration round; In step S1.1, the weight coefficient is set to gradually increase from 0 to 1 in each iteration of the joint optimization. That is, the initial weight coefficient is 0, and the weight coefficient increases by a fixed value after a fixed number of iterations until the maximum number of iterations is reached, reaching position 1.

[0057] S1.2, Map the distance value parameters of the quadratic surface primitives to the overall opacity of the symbolic distance field (SDF); specifically, map the distance value parameters of the primitives to SDF. i Mapped to SDF opacity using the following formula: o i = 4exp(-λsdv i ) / (1+exp(-λsdv i )) 2 Among them, o i Indicates the symbolic distance opacity, i represents the primitive index number, exp represents the natural exponential function, and sdv i The distance parameter represents the primitive. λ is used to scale the exponential term. It is initially 1. When the weight coefficient is 1, λ will gradually increase to 10.

[0058] S1.3. The mixed opacity is obtained by weighting the opacity of the quadratic surface primitive itself and the overall opacity of the symbol distance using weighting coefficients. The weighting coefficient is used as the weight of the overall opacity of the symbol distance, and 1 minus the weighting coefficient is used as the weight of the opacity of the primitive itself. S1.4 Select one of the multiple perspectives corresponding to the multi-view image as the predetermined perspective. Under the predetermined perspective, render the quadratic surface primitive using the blending opacity according to the position, rotation, scaling, color and β kernel function control parameters of the quadratic surface primitive to obtain the corresponding rendered image, depth map and normal vector map. In step S1.4, the rendering of the quadratic surface primitives adopts a combination of ray casting and block rendering. Specifically, it includes: transforming the coordinate system of the quadratic surface primitives according to their position, rotation, scaling, and camera parameters, from the local coordinate system to the world coordinate system, and then from the world coordinate system to the camera coordinate system; calculating the intersection point of the ray and the quadratic surface primitive in the local coordinate system, calculating the opacity based on the geodesic distance at the intersection point, where the geodesic distance is the shortest distance on the surface between the intersection point and the center point and is obtained by weighting using the β kernel function; and quickly estimating the projection range of the quadratic surface primitives in the rendering display screen space using a polynomial approximation method, and assigning the quadratic surface primitives to the corresponding rendering display screen blocks to improve rendering efficiency.

[0059] S1.5 Calculate the loss of the current quadratic surface primitive based on the rendered image, depth map, and normal vector map; A joint loss function system incorporating various geometric constraints is constructed, including color loss, depth loss, normal vector consistency loss, projection consistency loss, and multi-view loss, as follows: 1) Color loss L color : Calculate the pixel differences between the rendered image and the real image; 2) Depth distortion loss L d : Ensure the stability of depth value rendering; 3) Depth-Normal Consistency Loss L n Improve surface continuity; 4) Projection consistency loss L proj Constrain the consistency between the projection points of primitives on the SDF and the rendering depth; 5) Multi-view loss L multi Maintain geometric consistency across perspectives; 6) Structural similarity loss L SSIM Improve visual quality.

[0060] The total loss function is: Loss = (1-λ SSIM )L color +λ SSIM L SSIM +λ d L d +λ n L n +λ p L proj +λ m L multi In specific implementation, color loss is the loss of pixel color established between the image corresponding to the predetermined viewpoint in the multi-view image and the rendered image; the depth loss is calculated during the rendering process based on the depth value of the intersection point of the light and the quadratic surface primitive and its corresponding rendering weight; normal vector consistency loss is the loss of normal deviation established between the normal map and the normal vector map obtained by reasoning from the depth map.

[0061] The projection consistency loss in step S1.5 is calculated as follows: Project the center point of the quadratic surface primitive along the corresponding SDF gradient direction onto the zero level set surface of the overall SDF composed of all quadratic surface primitives to obtain the projection point and its coordinates. Then calculate the depth value of the projection point from the camera's perspective; The depth values ​​are compared with the rendered depth map, and the difference between the two is calculated as the projection consistency loss to force the primitive distribution to be consistent with the SDF implicit geometry field in geometric position.

[0062] The multi-view consistency loss in step S1.5 is used to maintain the consistency of geometry and appearance under different viewpoints. Its calculation process includes: By performing a relative rotation transformation between the reference viewpoint and the target viewpoint, the normal vectors of the normal vector map rendered under the reference viewpoint and the set of 3D point coordinates obtained based on the depth map under the reference viewpoint are transformed into the camera coordinate system of the target viewpoint; wherein the reference viewpoint is the predetermined viewpoint and the target viewpoint is the viewpoint adjacent to the reference viewpoint.

[0063] The depth of the three-dimensional coordinate point set from the target's perspective can be calculated based on the camera position and the set of three-dimensional coordinate points.

[0064] Calculate the reprojection error between the transformed normal vector and the depth of the 3D coordinate point set and the normal vector map and the depth map of the depth map rendered from the target viewpoint; Reprojection error is the loss of consistency across multiple views. Minimizing this error during the optimization process improves the geometric representation of the object's shape by the quadratic surface primitives.

[0065] S2. Repeat step S2 above to optimize all quadratic surface primitives and obtain their respective losses. Then, perform a compaction operation to dynamically improve the β kernel function parameter of the local quadratic surface primitives. The compaction operation process includes: D1. Filter out low-contribution primitives based on the blend opacity. Low-contribution primitives are quadratic surface primitives whose blend opacity, which contributes to the expression of the current scene, is lower than the preset opacity threshold. D2. Perform the first sampling on all quadratic surface primitives except for low-contribution primitives, and then move the low-contribution primitives accordingly. The specific implementation involves sampling the remaining quadratic surface primitives using a multinomial distribution based on their respective blending opacities, according to the number of low-contribution primitives. This yields the same number of primary sampled primitives. The number of times each primary sampled primitive is sampled is counted. Each low-contribution primitive is then assigned a corresponding primary sampled primitive in sequence. Each low-contribution primitive is moved to the vicinity of its corresponding primary sampled primitive location to optimize the primitive distribution. Moving it to the vicinity means moving the center point of the low-contribution primitive to the center point of the sampled primitive, and then setting a random offset value to move the low-contribution primitive a small distance.

[0066] D3. Before the total number of quadratic surface primitives reaches the upper limit, perform a second sampling and copying of all quadratic surface primitives in the scene to generate new quadratic surface primitives and increase the scene density; this step will not be performed until the number of primitives reaches the set upper limit.

[0067] In practice, the number of primitives to be sampled in the second round is first calculated and denoted as m, where m = 0.02n, and n is the total number of primitives. All quadratic surface primitives are sampled using a multinomial distribution based on their respective blending opacities, resulting in m quadratic sampled primitives. Each sampled primitive is then copied in situ and moved a small distance with a random offset to form a new quadratic surface primitive.

[0068] D4. Set larger β kernel function parameters for the low-contribution primitives whose positions have shifted in step D3 and for the newly generated quadratic surface primitives in step D3, specifically according to the following formula: new_b = max(b + 0.5×log(t+1), 0.0) Where new_b represents the new β kernel function control parameter, b represents the original β kernel function control parameter, t is the number of times the sampled quadratic surface primitive is sampled, log represents the logarithmic operation, and max represents taking the larger value between the calculation result and 0.

[0069] For newly added or moved primitives, a larger value for the β kernel function parameter b is initially set, and then gradually decreased during the optimization process. This parameter controls the spatial distribution range of primitive opacity. As the optimization process progresses, the β kernel function parameter is gradually reduced, causing the influence range of the primitives to dynamically shrink as the geometric fitting accuracy improves. During the densification operation, a threshold for the total number of primitives is pre-set. If the total number of quadratic surface primitives in each iteration reaches the threshold, then only steps D1, D2, and D4 are performed sequentially in the densification operation of the current iteration, without step D3. Furthermore, in step D4, a larger β kernel function parameter is set only for low-contribution primitives whose positions have shifted in step D3. The β kernel function parameter is still calculated using the same method as in D4.

[0070] S3. Using all current quadratic surface primitives and their respective losses, update the parameters of all quadratic surface primitives through backpropagation using the losses, so as to dynamically reduce the value of the β kernel function parameter in some quadratic surface primitives; During backpropagation updates, as the optimization process progresses, the β kernel function parameter is gradually reduced, causing the influence range of the primitives to dynamically shrink as the geometric fitting accuracy improves.

[0071] In step 3, a joint optimization method using simulated annealing and SDF is employed to optimize primitives, with Gaussian sputtering as the basic rendering and geometric representation framework. To ensure numerical stability and geometric consistency during training and rendering, an ellipsoidal paraboloid is chosen as the basic primitive to represent spatial geometry. Compared to traditional spherical or isotropic Gaussian primitives, the ellipsoidal paraboloid can more effectively characterize the directionality and curvature features of local surfaces, reducing geometric blurring and numerical oscillations in high-curvature regions and edge positions. During model initialization, the primitive initialization method from step 2 is used to determine the initial center position, scale parameters, and orientation information of each primitive based on the preprocessed point cloud data, ensuring uniform spatial distribution and initial alignment with the target surface structure. Subsequently, in the rendering stage, all primitives are sorted according to the depth information of their center points in the camera coordinate system and their viewpoint-related positional relationships to ensure that subsequent transparency blending follows a rendering order from far to near. After depth sorting, a corresponding 2D bounding box region is calculated based on the projection of each primitive in screen space. This bounding box limits the influence range of the primitive in the pixel plane, thereby reducing unnecessary pixel calculations and improving rendering efficiency. Subsequently, based on the bounding box information, a custom CUDA operator is used to perform alpha blending operations on the primitive's color and opacity in parallel on the GPU to complete the rendering process. The contributions of multiple primitives at the same pixel are accumulated and calculated, ultimately generating the rendered image result from the corresponding viewpoint.

[0072] The primitive of an ellipsoidal paraboloid is defined using the following formula: z=s3(x 2 / (s1) 2 + y 2 / (s2) 2 ) Where s1, s2, and s3 represent the three components of the scaling parameter, and (x, y, z) represents the coordinates of a point on the ellipsoidal paraboloid. The coordinates of points on the ellipsoidal paraboloid should all satisfy the above implicit function.

[0073] Rotation parameters are represented using quaternions, and scaling parameters are represented using a three-dimensional vector [s1,s2,s3] to represent the lengths of the three principal axes in the local coordinate system of the primitive.

[0074] In the depth sorting stage, a 4×4 homogeneous transformation matrix is ​​used to transform primitives from the world coordinate system to the ten-point coordinate system. Then, the primitives are sorted in ascending order based on the z-component of their center coordinates. Next, the cube bounding box of the primitive in 3D space is determined based on the center point and the length of the longest principal axis. Then, a projection matrix is ​​used to project the coordinates of the cube onto the screen to determine the rectangular bounding box in screen space, thereby determining the coverage area of ​​the primitive in screen space.

[0075] The rendering process utilizes alpha blending, a concept in computer graphics. During alpha blending, the weight G of the primitive is calculated using the beta kernel function and the primitive's opacity parameter. The weight G is determined by the primitive's opacity parameter, the beta kernel function, and the intersection points of rays emitted from the pixel with the primitive.

[0076] In step S1.1 of step 3, the simulated annealing process refers to the primitives acquiring opacity attributes during initialization. However, primitives with distance values ​​closer to 0 are closer to the surface, and the opacity of primitives closer to the surface should be closer to 1. Therefore, during training, the annealing algorithm gradually transitions the control of opacity from initialization parameters to distance values.

[0077] In step S3 of step 3, the primitive geometric parameter update refers to the process of using the gradient descent method to calculate the gradient based on the error and geometric regularization term of the rendering result and the reference image, and then updating the primitive parameters based on the gradient.

[0078] S4. Repeat steps S1 to S3 repeatedly for multiple iterations until the preset number of iterations is reached.

[0079] Step 4: After joint optimization, the Marching Cubes method is used to extract triangular meshes from the symbolic distance field composed of all quadratic surface primitives to obtain the 3D reconstruction results, which are used as the reconstruction results of the scene / object and input into the electromagnetic simulation.

[0080] After optimization, the Marching Cubes algorithm is used to extract isosurfaces from the SDF representation of primitives, generate a triangular mesh model, and output the final 3D reconstruction result.

[0081] After input, the present invention obtained Figure 3 and Figure 4 The reconstruction results and the RCS results of the electromagnetic simulation are shown. It is evident that the reconstruction method proposed in this invention possesses good geometric continuity and detail fidelity, while also maintaining good consistency with the reference model in electromagnetic simulation. This provides a new technical approach for image-based geometric modeling of electromagnetic simulation.

[0082] Example 2:

[0083] This embodiment uses a truck model as the object for processing, reconstructs a triangular mesh model, and uses it as input for the physical optics method (a high-frequency electromagnetic simulation method) to perform electromagnetic simulation processing.

[0084] Step 1: Use a camera to acquire and receive multi-view images to perform structure reconstruction and obtain sparse point clouds and camera parameters.

[0085] The modeling object of the scene or object is captured by a camera from multiple perspectives to obtain images corresponding to each perspective as multi-view images. The multi-view images are then used to perform structure restoration by the structure motion recovery algorithm (SFM) to obtain sparse point clouds, and the intrinsic and extrinsic parameters of the camera are obtained at the same time.

[0086] Step 2: Input the sparse point cloud and camera parameters into the computer for processing. For each point in the sparse point cloud, use the sphere initialization method to initialize and process it to obtain its own quadratic surface primitive. In practice, the quadratic surface primitive uses an elliptic parabola as the basic representation unit. The elliptic parabola is defined in its own local Cartesian coordinate system by the scaling parameters of the three principal axes of the coordinate system and the coordinates of the center point. It also allows for arbitrary transformations in three-dimensional space through a rotation matrix, so as to achieve flexible modeling of complex surface structures.

[0087] The quadratic surface primitive is represented by an elliptic parabola, whose implicit function is: z = s³(x 2 / (s1) 2 + y 2 / (s2) 2 ), where s1, s2, and s3 represent the three components of the scaling parameter, and (x, y, z) represents the coordinates of a point on the ellipsoidal paraboloid. The coordinates of points on the ellipsoidal paraboloid should all satisfy the above implicit function.

[0088] By adjusting parameters s1, s2, s3, the rotation matrix, and the center point position, quadric surfaces of different shapes and orientations can be represented. During rendering, a ray casting method is used to calculate the intersection points of rays with the quadric surfaces, obtaining color, depth, and normal vectors.

[0089] Using each point in the sparse point cloud as the center point of an elliptic paraboloid, a quadratic surface primitive is generated through spherical initialization. The elliptic paraboloid contains seven parameters: position, rotation, scaling, color, opacity, β kernel function control parameters, and distance parameters. All quadratic surface primitives obtained from point processing are input into the computer for step 3. The position parameter directly uses the point cloud position, the rotation parameter is initialized based on the spherical normal vector, the scaling parameter is initialized using the KNN algorithm, the distance parameter is initialized using the distance from the point cloud to the unit sphere surface, and the other parameters are randomly initialized.

[0090] In this context, the β kernel function is used to control the opacity distribution of primitives, such as... Figure 2 As shown, its form is: B(d;b) = (1-d) β(b)For x∈[0,1], β(b)=4exp(b) Where b is an optimizable parameter, d is the normalized geodesic distance calculated based on primitives, the steepness of the opacity distribution is controlled by adjusting the value of b, B(x;b) is the β kernel function, where x is the normalized geodesic distance value, b is the control parameter of the β kernel function, β(b) indicates that the exponential term in B(x;b) is calculated using an exponential function based on b, and exp represents the natural exponential function.

[0091] When the optimizable parameter b is small, the opacity changes gradually, which is beneficial for representing low-frequency features; when the optimizable parameter b is large, the opacity changes steeply, which is beneficial for representing high-frequency features.

[0092] Step 3: Perform joint optimization on the quadratic surface primitives obtained in Step 2 using the simulated annealing algorithm, specifically as follows: S1. Optimize each quadratic surface primitive and obtain the loss; S1.1 Set the weight coefficients according to the current iteration round; In step S1.1, the weight coefficient is set to gradually increase from 0 to 1 in each iteration of the joint optimization. That is, the initial weight coefficient is 0, and the weight coefficient increases by a fixed value after a fixed number of iterations until the maximum number of iterations is reached, reaching position 1.

[0093] S1.2, Map the distance value parameters of the quadratic surface primitives to the overall opacity of the symbolic distance field (SDF); specifically, map the distance value parameters of the primitives to SDF. i Mapped to SDF opacity using the following formula: o i = 4exp(-λsdv i ) / (1+exp(-λsdv i )) 2 Among them, o i Indicates the symbolic distance opacity, i represents the primitive index number, exp represents the natural exponential function, and sdv i The distance parameter represents the primitive. λ is used to scale the exponential term. It is initially 1. When the weight coefficient is 1, λ will gradually increase to 10.

[0094] S1.3. The mixed opacity is obtained by weighting the opacity of the quadratic surface primitive itself and the overall opacity of the symbol distance using weighting coefficients. The weighting coefficient is used as the weight of the overall opacity of the symbol distance, and 1 minus the weighting coefficient is used as the weight of the opacity of the primitive itself. S1.4 Select one of the multiple perspectives corresponding to the multi-view image as the predetermined perspective. Under the predetermined perspective, render the quadratic surface primitive using the blending opacity according to the position, rotation, scaling, color and β kernel function control parameters of the quadratic surface primitive to obtain the corresponding rendered image, depth map and normal vector map. In step S1.4, the rendering of the quadratic surface primitives adopts a combination of ray casting and block rendering. Specifically, it includes: transforming the coordinate system of the quadratic surface primitives according to their position, rotation, scaling, and camera parameters, from the local coordinate system to the world coordinate system, and then from the world coordinate system to the camera coordinate system; calculating the intersection point of the ray and the quadratic surface primitive in the local coordinate system, calculating the opacity based on the geodesic distance at the intersection point, where the geodesic distance is the shortest distance on the surface between the intersection point and the center point and is obtained by weighting using the β kernel function; and quickly estimating the projection range of the quadratic surface primitives in the rendering display screen space using a polynomial approximation method, and assigning the quadratic surface primitives to the corresponding rendering display screen blocks to improve rendering efficiency.

[0095] S1.5 Calculate the loss of the current quadratic surface primitive based on the rendered image, depth map, and normal vector map; A joint loss function system incorporating various geometric constraints is constructed, including color loss, depth loss, normal vector consistency loss, projection consistency loss, and multi-view loss, as follows: 1) Color loss L color : Calculate the pixel differences between the rendered image and the real image; 2) Depth distortion loss L d : Ensure the stability of depth value rendering; 3) Depth-Normal Consistency Loss L n Improve surface continuity; 4) Projection consistency loss L proj Constrain the consistency between the projection points of primitives on the SDF and the rendering depth; 5) Multi-view loss L multi Maintain geometric consistency across perspectives; 6) Structural similarity loss L SSIM Improve visual quality.

[0096] The total loss function is: Loss = (1-λ SSIM )L color +λ SSIM L SSIM +λ d L d +λ n L n +λ p Lproj +λ m L multi In specific implementation, color loss is the loss of pixel color established between the image corresponding to the predetermined viewpoint in the multi-view image and the rendered image; the depth loss is calculated during the rendering process based on the depth value of the intersection point of the light and the quadratic surface primitive and its corresponding rendering weight; normal vector consistency loss is the loss of normal deviation established between the normal map and the normal vector map obtained by reasoning from the depth map.

[0097] The projection consistency loss in step S1.5 is calculated as follows: Project the center point of the quadratic surface primitive along the corresponding SDF gradient direction onto the zero level set surface of the overall SDF composed of all quadratic surface primitives to obtain the projection point and its coordinates. Then calculate the depth value of the projection point from the camera's perspective; The depth values ​​are compared with the rendered depth map, and the difference between the two is calculated as the projection consistency loss to force the primitive distribution to be consistent with the SDF implicit geometry field in geometric position.

[0098] The multi-view consistency loss in step S1.5 is used to maintain the consistency of geometry and appearance under different viewpoints. Its calculation process includes: By performing a relative rotation transformation between the reference viewpoint and the target viewpoint, the normal vectors of the normal vector map rendered under the reference viewpoint and the set of 3D point coordinates obtained based on the depth map under the reference viewpoint are transformed into the camera coordinate system of the target viewpoint; wherein the reference viewpoint is the predetermined viewpoint and the target viewpoint is the viewpoint adjacent to the reference viewpoint.

[0099] The depth of the three-dimensional coordinate point set from the target's perspective can be calculated based on the camera position and the set of three-dimensional coordinate points.

[0100] Calculate the reprojection error between the transformed normal vector and the depth of the 3D coordinate point set and the normal vector map and the depth map of the depth map rendered from the target viewpoint; Reprojection error is the loss of consistency across multiple views. Minimizing this error during the optimization process improves the geometric representation of the object's shape by the quadratic surface primitives.

[0101] S2. Repeat step S2 above to optimize all quadratic surface primitives and obtain their respective losses. Then, perform a compaction operation to dynamically improve the β kernel function parameter of the local quadratic surface primitives. The compaction operation process includes: D1. Filter out low-contribution primitives based on the blend opacity. Low-contribution primitives are quadratic surface primitives whose blend opacity, which contributes to the expression of the current scene, is lower than the preset opacity threshold. D2. Perform the first sampling on all quadratic surface primitives except for low-contribution primitives, and then move the low-contribution primitives accordingly. The specific implementation involves sampling the remaining quadratic surface primitives using a multinomial distribution based on their respective blending opacities, according to the number of low-contribution primitives. This yields the same number of primary sampled primitives. The number of times each primary sampled primitive is sampled is counted. Each low-contribution primitive is then assigned a corresponding primary sampled primitive in sequence. Each low-contribution primitive is moved to the vicinity of its corresponding primary sampled primitive location to optimize the primitive distribution. Moving it to the vicinity means moving the center point of the low-contribution primitive to the center point of the sampled primitive, and then setting a random offset value to move the low-contribution primitive a small distance.

[0102] D3. Before the total number of quadratic surface primitives reaches the upper limit, perform a second sampling and copying of all quadratic surface primitives in the scene to generate new quadratic surface primitives and increase the scene density; this step will not be performed until the number of primitives reaches the set upper limit.

[0103] In practice, the number of primitives to be sampled in the second round is first calculated and denoted as m, where m = 0.02n, and n is the total number of primitives. All quadratic surface primitives are sampled using a multinomial distribution based on their respective blending opacities, resulting in m quadratic sampled primitives. Each sampled primitive is then copied in situ and moved a small distance with a random offset to form a new quadratic surface primitive.

[0104] D4. Set larger β kernel function parameters for the low-contribution primitives whose positions have shifted in step D3 and for the newly generated quadratic surface primitives in step D3, specifically according to the following formula: new_b = max(b + 0.5×log(t+1), 0.0) Where new_b represents the new β kernel function control parameter, b represents the original β kernel function control parameter, t is the number of times the sampled quadratic surface primitive is sampled, log represents the logarithmic operation, and max represents taking the larger value between the calculation result and 0.

[0105] For newly added or moved primitives, a larger value for the β kernel function parameter b is initially set, and then gradually decreased during the optimization process. This parameter controls the spatial distribution range of primitive opacity. As the optimization process progresses, the β kernel function parameter is gradually reduced, causing the influence range of the primitives to dynamically shrink as the geometric fitting accuracy improves. During the densification operation, a threshold for the total number of primitives is pre-set. If the total number of quadratic surface primitives in each iteration reaches the threshold, then only steps D1, D2, and D4 are performed sequentially in the densification operation of the current iteration, without step D3. Furthermore, in step D4, a larger β kernel function parameter is set only for low-contribution primitives whose positions have shifted in step D3. The β kernel function parameter is still calculated using the same method as in D4.

[0106] S3. Using all current quadratic surface primitives and their respective losses, update the parameters of all quadratic surface primitives through backpropagation using the losses, so as to dynamically reduce the value of the β kernel function parameter in some quadratic surface primitives; During backpropagation updates, as the optimization process progresses, the β kernel function parameter is gradually reduced, causing the influence range of the primitives to dynamically shrink as the geometric fitting accuracy improves.

[0107] In step 3, a joint optimization method using simulated annealing and SDF is employed to optimize primitives, with Gaussian sputtering as the basic rendering and geometric representation framework. To ensure numerical stability and geometric consistency during training and rendering, an ellipsoidal paraboloid is chosen as the basic primitive to represent spatial geometry. Compared to traditional spherical or isotropic Gaussian primitives, the ellipsoidal paraboloid can more effectively characterize the directionality and curvature features of local surfaces, reducing geometric blurring and numerical oscillations in high-curvature regions and edge positions. During model initialization, the primitive initialization method from step 2 is used to determine the initial center position, scale parameters, and orientation information of each primitive based on the preprocessed point cloud data, ensuring uniform spatial distribution and initial alignment with the target surface structure. Subsequently, in the rendering stage, all primitives are sorted according to the depth information of their center points in the camera coordinate system and their viewpoint-related positional relationships to ensure that subsequent transparency blending follows a rendering order from far to near. After depth sorting, a corresponding 2D bounding box region is calculated based on the projection of each primitive in screen space. This bounding box limits the influence range of the primitive in the pixel plane, thereby reducing unnecessary pixel calculations and improving rendering efficiency. Subsequently, based on the bounding box information, a custom CUDA operator is used to perform alpha blending operations on the primitive's color and opacity in parallel on the GPU to complete the rendering process. The contributions of multiple primitives at the same pixel are accumulated and calculated, ultimately generating the rendered image result from the corresponding viewpoint.

[0108] The primitive of an ellipsoidal paraboloid is defined using the following formula: z=s3(x 2 / (s1) 2 + y 2 / (s2) 2 ) Where s1, s2, and s3 represent the three components of the scaling parameter, and (x, y, z) represents the coordinates of a point on the ellipsoidal paraboloid. The coordinates of points on the ellipsoidal paraboloid should all satisfy the above implicit function.

[0109] Rotation parameters are represented using quaternions, and scaling parameters are represented using a three-dimensional vector [s1,s2,s3] to represent the lengths of the three principal axes in the local coordinate system of the primitive.

[0110] In the depth sorting stage, a 4×4 homogeneous transformation matrix is ​​used to transform primitives from the world coordinate system to the ten-point coordinate system. Then, the primitives are sorted in ascending order based on the z-component of their center coordinates. Next, the cube bounding box of the primitive in 3D space is determined based on the center point and the length of the longest principal axis. Then, a projection matrix is ​​used to project the coordinates of the cube onto the screen to determine the rectangular bounding box in screen space, thereby determining the coverage area of ​​the primitive in screen space.

[0111] The rendering process utilizes alpha blending, a concept in computer graphics. During alpha blending, the weight G of the primitive is calculated using the beta kernel function and the primitive's opacity parameter. The weight G is determined by the primitive's opacity parameter, the beta kernel function, and the intersection points of rays emitted from the pixel with the primitive.

[0112] In step S1.1 of step 3, the simulated annealing process refers to the primitives acquiring opacity attributes during initialization. However, primitives with distance values ​​closer to 0 are closer to the surface, and the opacity of primitives closer to the surface should be closer to 1. Therefore, during training, the annealing algorithm gradually transitions the control of opacity from initialization parameters to distance values.

[0113] In step S3 of step 3, the primitive geometric parameter update refers to the process of using the gradient descent method to calculate the gradient based on the error and geometric regularization term of the rendering result and the reference image, and then updating the primitive parameters based on the gradient.

[0114] S4. Repeat steps S1 to S3 repeatedly for multiple iterations until the preset number of iterations is reached.

[0115] Step 4: After joint optimization, the Marching Cubes method is used to extract triangular meshes from the symbolic distance field composed of all quadratic surface primitives to obtain the 3D reconstruction results, which are used as the reconstruction results of the scene / object and input into the electromagnetic simulation.

[0116] After optimization, the Marching Cubes algorithm is used to extract isosurfaces from the SDF representation of primitives, generate a triangular mesh model, and output the final 3D reconstruction result.

[0117] After input, the present invention obtained Figure 5 and Figure 6 The reconstruction results and the RCS results of the electromagnetic simulation are shown. It is evident that the reconstruction method proposed in this invention possesses good geometric continuity and detail fidelity, while also maintaining good consistency with the reference model in electromagnetic simulation. This provides a new technical approach for image-based geometric modeling of electromagnetic simulation.

[0118] Comparative Example 1: This comparative example uses a jeep model as the object of processing, reconstructs a triangular mesh model, and uses it as input for the physical optics method to perform electromagnetic simulation processing.

[0119] Step 1 is the same as in Example 1.

[0120] Step 2: Input the sparse point cloud and camera parameters into the computer for processing. For each point in the sparse point cloud, use the ball initialization method to initialize and process it to obtain its own planar primitive. In Comparative Example 1, compared with Example 1, the comparative example uses planar primitives and does not have β kernel function control parameters and distance value parameters. The other parameter initialization methods are the same as in Example 1.

[0121] Comparative Example 1 uses the Gaussian kernel function, which has the form F(di) = exp(0.5 * (di)). 2 )), where di is the Cartesian distance from the intersection of the ray and the planar primitive to the center of the primitive, and exp is the natural exponential function.

[0122] The rendering process in step 3 is the same as in Example 1. Alpha blending is used during the rendering process, a concept in computer graphics. During alpha blending, the weight G of the primitive is calculated using a Gaussian kernel function and the primitive's opacity parameter. The weight G is calculated from the primitive's opacity parameter, the Gaussian kernel function, and the intersection points of rays emitted from the pixel with the primitive.

[0123] Since there is no distance parameter in Comparative Example 1, the simulated annealing algorithm is not executed.

[0124] The parameter update method in Comparative Example 1 is the same as that in Example 1, still using the gradient descent method.

[0125] The mesh extraction method in Comparative Example 1 is the same as that in Example 1, still using the Marching Cubes method.

[0126] After inputting, I received Figure 7 and Figure 8The reconstruction results and the RCS results of the electromagnetic simulation are shown. It is evident that the reconstruction results of the method model in the comparative example are poor, and inconsistencies also exist between it and the reference model in the electromagnetic simulation. This demonstrates the effectiveness of the method of this invention.

[0127] The above specific embodiments are used to explain and illustrate the present invention, but not to limit the present invention. Any modifications and changes made to the present invention within the spirit and scope of the claims shall fall within the protection scope of the present invention.

[0128] The above description is only a preferred embodiment of the present invention. Therefore, all equivalent changes or modifications made to the structure, features and principles described in the claims of this patent application are included in the scope of this patent application.

Claims

1. An image-based 3D reconstruction method for electromagnetic simulation, characterized in that, Includes the following steps: Step 1: Use a camera to acquire and receive multi-view images to perform structure reconstruction and obtain sparse point clouds and camera parameters; Step 2: Input the sparse point cloud and camera parameters into the computer for processing. For each point in the sparse point cloud, use the sphere initialization method to initialize and process it to obtain its own quadratic surface primitive. Step 3: In the computer, the quadratic surface primitives obtained in Step 2 are jointly optimized based on opacity, rendering and computational loss using the simulated annealing algorithm; Step 4: After the joint optimization is completed, extract the triangular mesh from the symbolic distance field composed of all quadratic surface primitives to obtain the three-dimensional reconstruction result, which is then input into the electromagnetic simulation.

2. The image-based 3D reconstruction method for electromagnetic simulation according to claim 1, characterized in that: Step 1 specifically involves: using a camera to capture scenes or objects from multiple perspectives to obtain multi-view images; using the Structure in Motion (SFM) algorithm to restore the structure of the multi-view images to obtain sparse point clouds; and simultaneously obtaining the camera's intrinsic and extrinsic parameters.

3. The image-based 3D reconstruction method for electromagnetic simulation according to claim 1, characterized in that: In step 2, a quadratic surface primitive is generated by initializing each point of the sparse point cloud as the center point of the quadratic surface primitive using the sphere initialization method. The quadratic surface primitive includes parameters such as position, rotation, scaling, color, opacity, β kernel function control parameters, and distance value parameters.

4. The image-based 3D reconstruction method for electromagnetic simulation according to claim 1, characterized in that: In step 3, the joint optimization for each quadratic surface primitive is specifically as follows: S1. Perform the following optimization process on each quadratic surface primitive and obtain the loss; S1.1 Set the weight coefficients according to the current iteration round; S1.2 Map the distance value parameter of the quadratic surface primitive to the overall opacity; S1.

3. The mixed opacity is obtained by weighting the opacity of the quadratic surface primitive itself with the overall opacity using a weighted average of the weighting coefficients. S1.4 Select one of the multiple perspectives corresponding to the multi-view image as the predetermined perspective. Under the predetermined perspective, render the quadratic surface primitive using the blending opacity according to the position, rotation, scaling, color and β kernel function control parameters of the quadratic surface primitive to obtain the corresponding rendered image, depth map and normal vector map. S1.5 Calculate the loss of the current quadratic surface primitive based on the rendered image, depth map, and normal vector map; S2. Repeat step S2 above to optimize all quadratic surface primitives and obtain their respective losses; S3. Using all current quadratic surface primitives and their respective losses, update the parameters of all quadratic surface primitives through backpropagation using the losses, so as to dynamically reduce the value of the β kernel function parameter in the quadratic surface primitives; S4. Repeat steps S1 to S3 repeatedly for multiple iterations until the preset number of iterations is reached.

5. The image-based 3D reconstruction method for electromagnetic simulation according to claim 4, characterized in that: In step S1.1, the weight coefficient is set to gradually increase from 0 to 1 in each iteration of the joint optimization, and the weight coefficient is shared by all quadratic surface primitives.

6. The image-based 3D reconstruction method for electromagnetic simulation according to claim 4, characterized in that: In step S1.4, the rendering of the quadratic surface primitive adopts a combination of ray casting and block rendering, specifically including: transforming the coordinate system of the quadratic surface primitive according to its position, rotation, scaling and camera parameters, transforming it from the local coordinate system to the world coordinate system, and then transforming it from the world coordinate system to the camera coordinate system; calculating the intersection point of the ray and the quadratic surface primitive, calculating the opacity based on the geodesic distance at the intersection point, wherein the geodesic distance is the shortest distance on the surface between the intersection point and the center point, normalizing the geodesic distance and then weighting it using the β kernel function to obtain the rendering weight, multiplying the rendering weight by the opacity to obtain the opacity at the intersection point; estimating the projection range of the quadratic surface primitive on the rendering display screen using the polynomial approximation method, and assigning the quadratic surface primitive to the corresponding rendering display screen.

7. The image-based 3D reconstruction method for electromagnetic simulation according to claim 4, characterized in that: In step S1.5, the loss includes color loss, depth loss, normal vector consistency loss, projection consistency loss, and multi-view loss: the color loss is the loss of pixel color established between the image corresponding to the predetermined viewpoint in the multi-view image and the rendered image; the depth loss is calculated based on the intersection points of light rays and quadratic surface primitives during the rendering process; the normal vector consistency loss is the loss of normal deviation established between the normal map and the normal vector map obtained by reasoning from the depth map; the projection consistency loss is established by comparing the quadratic surface primitives with the projection and depth map; the multi-view consistency loss is obtained by constructing reprojection error through the normal vector maps, depth maps, and camera positions of the reference viewpoint and the target viewpoint.

8. The image-based 3D reconstruction method for electromagnetic simulation according to claim 4, characterized in that: In the joint optimization process after step S2 and before S3, a densification operation is also performed to dynamically improve the β kernel function parameter of the local quadratic surface primitives; the densification operation process includes: D1. Filter out low-contribution primitives based on the blend opacity. The low-contribution primitives are quadratic surface primitives with blend opacity lower than a preset opacity threshold. D2. Perform the first sampling on all quadratic surface primitives except for low-contribution primitives, and then move the low-contribution primitives accordingly. D3. Perform a second sampling and copying on all quadratic surface primitives in the scene to generate new quadratic surface primitives; D4. Set larger β kernel function parameters for the low-contribution primitives whose positions have shifted in step D3 and for the newly generated quadratic surface primitives in step D3, specifically according to the following formula: new_b = max(b + 0.5×log(t+1), 0.0) Where new_b represents the new β kernel function control parameter, b represents the original β kernel function control parameter, t is the number of times the sampled quadratic surface primitive is sampled, log represents the logarithmic operation, and max represents the larger value function. In the densification operation, a threshold for the total number of primitives is preset. If the number of all quadratic surface primitives in each iteration reaches the threshold for the total number of primitives, then only steps D1, D2, and D4 are performed in the densification operation of the current iteration. In step D4, a larger β kernel function parameter is set only for the low contribution primitives whose positions have moved in step D3.

9. The image-based 3D reconstruction method for electromagnetic simulation according to claim 7, characterized in that: Step D2 is as follows: Based on the number of low-contribution primitives, a multinomial distribution sampling is performed on the remaining quadratic surface primitives to obtain the same number of primary sampled primitives. Each low-contribution primitive is assigned a corresponding primary sampled primitive, and each low-contribution primitive is moved to the vicinity of its corresponding primary sampled primitive to optimize the primitive distribution.

10. The image-based 3D reconstruction method for electromagnetic simulation according to claim 7, characterized in that: In step D3, the number of primitives to be sampled for the second time is first calculated, and the required number of samples is set to m=0.02n. All quadratic surface primitives are sampled using a polynomial distribution based on their respective blending opacities to obtain m quadratic sampled primitives. The sampled primitives are then copied in situ and moved with a random offset value to form new quadratic surface primitives.