A method for determining a value of a symbol distance function, an electronic device, and a storage medium
By generating a 3D mesh and utilizing sub-mesh interpolation points and a breadth-first search algorithm, the problem of high computational complexity in existing technologies is solved, achieving efficient SDF value determination and improving user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HONOR DEVICE CO LTD
- Filing Date
- 2024-07-12
- Publication Date
- 2026-05-19
AI Technical Summary
Existing technologies suffer from high computational complexity and low efficiency when determining the symbolic distance function value of points in a 3D object space, which negatively impacts user experience.
By generating a 3D mesh, using the interpolation points of the sub-mesh and a breadth-first search algorithm, all voxels and their SDF values within the target object are determined, with a time complexity of O(M+N), where M is the number of voxels and N is the number of sub-mesh.
It reduces the time complexity of calculating the SDF value of spatial points of 3D objects, improving computational efficiency and user experience.
Smart Images

Figure CN120747337B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing, and more particularly to a method for determining the value of a symbolic distance function, an electronic device, and a storage medium. Background Technology
[0002] In computer graphics, volume rendering can render not only the surface of an object but also its interior. Therefore, volume rendering can be used in fields such as medicine, education, and entertainment that require rendering 3D objects. During volume rendering, the texture information (such as color, brightness, and transparency) of the spatial points occupied by the 3D object is essential. Some texture information can be designed and stored in advance, while others can be calculated from the relevant parameters of the spatial points. Generally, calculating the texture information of spatial points requires not only the coordinates of the points but also their distance from the surface of the 3D object. Specifically, the distance from the spatial point to the surface of the 3D object can be represented by the signed distance function (SDF). Therefore, how to quickly and conveniently obtain the SDF value of the spatial points occupied by the 3D object is a problem that urgently needs to be solved. Summary of the Invention
[0003] This application provides a method for determining the sign distance function value, an electronic device, and a storage medium, which can quickly and conveniently obtain the SDF value of the spatial points occupied by a three-dimensional object in the control.
[0004] To achieve the above objectives, the embodiments of this application adopt the following technical solutions:
[0005] In a first aspect, embodiments of this application provide a method for determining the sign distance function (SDF) value, applied to an electronic device. The method includes: generating a three-dimensional mesh representing the surface of the target object based on captured images and depth images of the target object; the three-dimensional mesh consists of multiple sub-meshes, each sub-mesh having the same number of vertices; interpolating the sub-meshes in the three-dimensional mesh to obtain interpolation points on the sub-mesh; the interpolation points on the sub-mesh include interpolation points on the edges of the sub-mesh and interpolation points inside the sub-mesh; determining the vertices of the sub-mesh and the interpolation points on the sub-mesh as the center points of the voxels of the outermost layer constituting the voxels of the target object, and setting the sign distance function (SDF) value of the voxels corresponding to the vertices of the sub-mesh and the interpolation points on the sub-mesh to 0; using the vertices of the sub-mesh and the interpolation points on the sub-mesh as starting points, the edge length of the voxels as the search step size, and the vertical direction of the sub-mesh towards the interior of the three-dimensional mesh as the search direction, employing a breadth-first search algorithm to determine all voxels within the target object and the SDF values of all voxels.
[0006] Based on the technical solution provided in this application, after determining the three-dimensional mesh that can represent the surface of the target object, since each sub-mesh is a small polygon, multiple initial center points in each sub-mesh can be obtained by interpolating the edges and interiors of the sub-mesh. These initial center points can include the vertices of the sub-mesh and interpolated points on its edges and interiors. Because the sub-mesh itself is relatively small, the multiple initial center points obtained after interpolation can be considered as the center points of multiple voxels constituting the surface of the target object. Finally, using the initial center point of each sub-mesh as the starting point, the voxel side length as the search step size, and the vertical direction of the sub-mesh as the search direction, a breadth-first search algorithm is used to search all voxels within the target object and assign corresponding SDF values. It can be seen that, using the technical solution provided in this application, after determining the three-dimensional mesh that can represent the surface of the target object and interpolating each sub-mesh, the SDF values of all spatial points in the target object can be determined by searching and assigning values to all voxels within the target object. Taking M as the number of voxels and N as the number of sub-mesh as an example, the time complexity of the technical solution provided in this application is O(M+N). It is evident that the technical solution provided in this application can conveniently and quickly determine the SDF value of spatial points of the target object, with low time complexity, high computational efficiency, and improved user experience.
[0007] In one possible implementation of the first aspect, generating a three-dimensional mesh to characterize the surface of the target object based on the captured image and depth image of the target object includes: generating point cloud data of the target object based on the captured image and depth image of the target object; the point cloud data of the target object includes feature data of discrete points characterizing the shape of the target object in space, the feature data including three-dimensional coordinates; generating a three-dimensional mesh of the target object based on the point cloud data of the target object; the vertices of the sub-mesh included in the three-dimensional mesh are discrete points in the point cloud data.
[0008] Based on the technical solution corresponding to the above implementation method, point cloud data that can characterize the spatial morphological features of the target object can be obtained from the captured images and depth images of the target object. Then, a three-dimensional mesh reflecting the surface of the target object can be determined based on the power data. This provides data support for the subsequent process of determining the SDF value of the target object.
[0009] In one possible implementation of the first aspect, interpolating a submesh in a three-dimensional mesh to obtain interpolation points on the submesh includes: determining the number of edge interpolations of the submesh based on the preset voxel side length and the size information of the submesh; determining a uniformly distributed number of edge interpolation points on each edge of the submesh based on the number of edge interpolations; and determining interpolation points inside the submesh based on the interpolation points on the edges of the submesh.
[0010] Based on the technical solution corresponding to the above implementation method, the electronic device can determine the number of interpolation points on the sub-mesh edge based on the preset side length of the voxel, and then complete the interpolation to obtain the interpolation points on the sub-mesh. This provides initial data support for subsequent voxel searches.
[0011] In one possible implementation of the first aspect, when the shape of the sub-mesh is triangular, the interpolation points inside the sub-mesh are determined based on the interpolation points on the edges of the sub-mesh, including: establishing interpolation lines connecting corresponding interpolation points on any two pairs of adjacent edges in the sub-mesh, and determining the points where the interpolation lines intersect as the interpolation points inside the sub-mesh.
[0012] Based on the technical solution described above, interpolation points within the triangular sub-mesh can be determined. This solution divides the entire sub-mesh into multiple smaller meshes with side lengths close to the voxel's side length. Therefore, the vertex of each smaller mesh can be used as the center point of the outermost voxel of the target object. This also provides data support for subsequent searches of the remaining voxels and their SDF values within the target object.
[0013] In one possible implementation of the first aspect, when the shape of the sub-mesh is a parallelogram, after determining the interpolation points inside the sub-mesh based on the interpolation points on the edges of the sub-mesh, the method further includes: establishing interpolation lines connecting the corresponding interpolation points on two pairs of opposite edges in the sub-mesh, and determining the points where the interpolation lines intersect as the interpolation points inside the sub-mesh.
[0014] Based on the technical solution described above, interpolation points within a parallelogram-shaped sub-mesh can be determined. This solution divides the entire sub-mesh into multiple smaller meshes with side lengths close to the voxel's side length. Therefore, the vertices of each smaller mesh can be used as the center points of the outermost voxels of the target object. This also provides data support for subsequent searches of the remaining voxels and their SDF values within the target object.
[0015] In one possible implementation of the first aspect, interpolating a sub-mesh in a three-dimensional mesh to obtain interpolation points on the sub-mesh includes: determining a uniformly distributed number of interpolation points on each edge of the sub-mesh based on a preset number of edge interpolation times; and determining interpolation points inside the sub-mesh based on the interpolation points on the edges of the sub-mesh.
[0016] Based on the technical solution corresponding to the above implementation method, the mobile phone can determine the interpolation point on the sub-grid based on the preset number of edge interpolation, providing initial data support for subsequent voxel search.
[0017] In one possible implementation of the first aspect, after determining the interpolation points inside the sub-mesh based on the interpolation points on the edges of the sub-mesh, the method further includes: determining the side length of the voxel based on the edge interpolation data of all sub-mesh; the edge interpolation data of the sub-mesh includes the distance between two adjacent interpolation points on the edges of the sub-mesh.
[0018] Based on the technical solution corresponding to the above implementation method, since the voxel side length is unknown in the implementation method of determining the interpolation point on the sub-grid based on a preset number of edge interpolation iterations, the electronic device also needs to determine the voxel side length based on the edge interpolation data of all sub-grids. The sub-grid interpolation data includes the distance between two adjacent interpolation points on the edge of the sub-grid. After obtaining the distances between two adjacent interpolation points on the edge of all sub-grids, the average of these distances can be determined as the voxel side length.
[0019] In one possible implementation of the first aspect, the vertices of the sub-mesh and the interpolation points on the sub-mesh are used as starting points, the side length of the voxel is used as the search step size, and the vertical direction of the sub-mesh toward the interior of the 3D mesh is used as the search direction. A breadth-first search algorithm is used to determine all voxels in the target object and the SDF values of all voxels. This includes: taking the vertices of the sub-mesh and the interpolation points on the sub-mesh as starting points, determining the point at a distance of the voxel's side length from the starting point on the sub-mesh in the direction perpendicular to the sub-mesh and toward the interior of the 3D mesh as the center point of the first voxel in the target object, and determining the SDF value of the first voxel as the side length of the voxel.
[0020] The center point of the first voxel corresponding to the starting point is determined as the intermediate search point;
[0021] A 3D intermediate mesh is generated based on all intermediate search points. The 3D intermediate mesh includes multiple sub-intermediate meshes, each of which is a polygon composed of multiple intermediate search points, and all sub-intermediate meshes have the same number of vertices.
[0022] In the direction perpendicular to the sub-intermediate grid and towards the interior of the 3D intermediate grid, the point at which the distance from the intermediate search point on the sub-intermediate grid is equal to the side length of the voxel is determined as the center point of the (N+1)th voxel in the target object, and the SDF value of the (N+1)th voxel is determined as N+1 times the side length of the voxel; N is the number of times the 3D intermediate grid is generated.
[0023] Update the intermediate search points using the center point of the (N+1)th voxel, and regenerate the 3D intermediate mesh based on all intermediate search points.
[0024] Based on the technical solution corresponding to the above implementation method, electronic devices can complete the calculation process of determining all voxels and their corresponding SDF values in a target object with low time complexity by using a step-by-step search approach. Compared with existing technologies, this significantly reduces the time complexity of calculating the SDF values of spatial points of a 3D object, improves computational efficiency, and thus enhances the user experience.
[0025] Secondly, embodiments of this application also provide a device for determining the value of a symbolic distance function, which can be applied to an electronic device. The function of this device can be implemented in hardware or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above-described functions, such as a generation module, an interpolation module, and a processing module.
[0026] The generation module is used to generate a 3D mesh to represent the surface of the target object based on the captured image and depth image of the target object; the 3D mesh consists of multiple sub-mesh, each sub-mesh having the same number of vertices.
[0027] The interpolation module is used to interpolate the sub-mesh in the 3D mesh generated by the generation module to obtain interpolation points on the sub-mesh; the interpolation points on the sub-mesh include interpolation points on the edges of the sub-mesh and interpolation points inside the sub-mesh.
[0028] The processing module is used to determine the vertices of the sub-mesh generated by the generation module and the interpolation points on the sub-mesh obtained by the interpolation module as the center points of the voxels of the outermost layer of voxels constituting the target object, and to determine the signed distance function SDF value of the voxels corresponding to the vertices of the sub-mesh and the interpolation points on the sub-mesh as 0.
[0029] The processing module is also used to determine all voxels and their SDF values within the target object by using the vertices of the sub-mesh generated by the generation module and the interpolation points on the sub-mesh obtained by the interpolation module as starting points, the side length of the voxels as the search step size, and the vertical direction of the sub-mesh toward the interior of the 3D mesh as the search direction, and employing a breadth-first search algorithm.
[0030] Thirdly, this application provides an electronic device including a display screen, a memory, and one or more processors; the display screen, the memory, and the processors are coupled; wherein the memory stores computer program code, the computer program code including computer instructions, which, when executed by the processor, cause the electronic device to perform a method for determining the symbolic distance function value as provided in the first aspect and any possible design of the present invention.
[0031] Fourthly, this application provides a computer-readable storage medium including computer instructions that, when executed on an electronic device, cause the electronic device to perform a method for determining a symbolic distance function value as provided in the first aspect and any possible design of the present application.
[0032] Fifthly, this application provides a computer program product that, when run on an electronic device, causes the electronic device to perform a method for determining the symbolic distance function value as provided in the first aspect and any possible design of the present application.
[0033] Understandably, the beneficial effects that the technical solutions provided in the second to fifth aspects described above can be achieved can be referred to the beneficial effects in the first aspect and any of its possible design methods, which will not be repeated here. Attached Figure Description
[0034] Figure 1 A schematic diagram illustrating the physical meaning of the symbolic distance function provided in the embodiments of this application;
[0035] Figure 2 A schematic diagram illustrating the principle of a method for determining the value of a symbolic distance function provided in an embodiment of this application;
[0036] Figure 3 A schematic diagram of the hardware architecture of an electronic device provided in an embodiment of this application;
[0037] Figure 4 A schematic diagram of the software architecture of an electronic device provided in an embodiment of this application;
[0038] Figure 5 A schematic diagram of a server hardware architecture provided for an embodiment of this application;
[0039] Figure 6 A flowchart illustrating a method for determining the value of a symbolic distance function provided in this application embodiment. Figure 1 ;
[0040] Figure 7 A schematic diagram of point cloud data provided in an embodiment of this application;
[0041] Figure 8 A flowchart illustrating a method for determining the value of a symbolic distance function provided in this application embodiment. Figure 2 ;
[0042] Figure 9 This is a schematic diagram of a subgrid interpolation provided in an embodiment of this application;
[0043] Figure 10 A flowchart illustrating a method for determining the value of a symbolic distance function provided in this application embodiment. Figure 3 ;
[0044] Figure 11 A schematic diagram illustrating a search direction provided in an embodiment of this application;
[0045] Figure 12 A flowchart illustrating a method for determining the value of a symbolic distance function provided in this application embodiment. Figure 4 ;
[0046] Figure 13 A flowchart illustrating a method for determining the value of a symbolic distance function provided in this application embodiment. Figure 5 ;
[0047] Figure 14 This is a schematic diagram of a device for determining the value of a symbolic distance function provided in an embodiment of this application. Detailed Implementation
[0048] The terminology used in the following embodiments of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application. As used in the specification and appended claims of this application, the singular expressions “a,” “an,” “the,” “the,” “the,” and “this” are intended to include the plural expressions as well, unless the context clearly indicates otherwise. It should also be understood that “ / ” means “or,” for example, A / B can mean A or B; “and / or” in the text is merely a description of the relationship between related objects, indicating that three relationships can exist, for example, A and / or B can mean: A alone, A and B simultaneously, and B alone.
[0049] In this application, the reference to "embodiment" means that a specific feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a mutually exclusive, independent, or alternative embodiment. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described in this application can be combined with other embodiments.
[0050] The terms "first" and "second" in the following embodiments of this application are for descriptive purposes only and should not be construed as implying relative importance or implicitly indicating the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature, and in the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more.
[0051] First, the terms used in the embodiments of this application are explained as follows:
[0052] (1) Signed distance function (SDF): SDF is used to determine the distance from a point to the boundary of a finite region in space (e.g., the space occupied by a three-dimensional object) and simultaneously define the sign of the distance. Specifically, such as... Figure 1 As shown, points in space are positive when inside the region boundary, negative when outside, and 0 when located on the boundary. In 3D computer graphics, SDF is a method for describing the surface of an object. It provides the distance of each point in space to the nearest surface and assigns a positive or negative sign depending on whether the point is inside or outside the object.
[0053] Obtaining the SDF values of all points in a 3D object has several applications: ① SDF can effectively describe the geometry of complex objects, whether simple or intricate. It allows for more accurate capture and representation of an object's shape. ② SDF can be used for collision detection. By calculating the SDF of two objects, their distance or intersection can be quickly detected, which is particularly useful in physics simulations and game development. ③ In computer graphics, SDF can be used to generate voxelization representations or perform voxel rendering. This has wide applications in real-time rendering and simulation.
[0054] (2) Back projection: Back projection is a technique in image processing, typically used to locate specific objects or features in an image. In 3D reconstruction, back projection refers to converting objects in a 2D image into point cloud data in 3D space based on the 2D image and its corresponding depth map. Specifically, it is achieved by converting each pixel value in the depth image (representing the distance of that pixel to the camera) into coordinates in 3D space.
[0055] (3) Voxel: A voxel, short for volume pixel, is the smallest unit of digital data segmentation in three-dimensional space, usually considered as a cube or a similar small volume block. Voxels are the basic elements that make up a three-dimensional image or a three-dimensional object. This concept is similar to a pixel in two-dimensional space, but extended to the three-dimensional realm. A spatial point in a three-dimensional object is the center point of the voxels that make up that three-dimensional object.
[0056] (4) Breadth-first search (BFS): Breadth-first search is an algorithm used to traverse or search a tree or graph. This algorithm starts from a node, visits all its adjacent nodes, and then performs the same operation on each of these adjacent nodes (i.e., visits their unvisited adjacent nodes), and so on, until all reachable nodes have been visited. This process is similar to level-order traversal of a tree or level-by-level traversal of a graph.
[0057] (5) Moving Cube (MC) Algorithm: The moving cube algorithm (or moving cubes algorithm) is a computer graphics algorithm used to extract isosurfaces from a 3D discrete data field and generate a 3D mesh model. This algorithm can also be called an isosurface extraction algorithm. It approximates isosurfaces through linear interpolation, representing the surface information in volume data (such as point cloud data) as a triangular mesh.
[0058] Currently, in the process of volume rendering, the texture information (such as color, brightness, and transparency) of spatial points in the 3D space occupied by a 3D object is essential. To obtain the texture information of these spatial points, it is necessary to know the distance between the spatial point and the surface of the 3D object. The distance between the spatial point and the surface of the 3D object can be specifically represented by the signed distance function (SDF) value.
[0059] To determine the SDF values of all spatial points in a 3D object, related techniques generate a 3D mesh that constitutes the surface of the 3D object based on its point cloud data. This 3D mesh consists of multiple sub-mesh structures. Then, all voxels in the 3D object are traversed, and the minimum distance between the center of each voxel and the surface of the 3D object is calculated. The center point of every two voxels constitutes a spatial point of the 3D object.
[0060] However, this requires calculating the distance between each voxel and each sub-mesh, resulting in a time complexity of O(M*N). Here, M is the number of voxels, and N is the number of sub-mesh, both M and N being positive integers. Assuming each calculation takes one unit of time, calculating the SDF value of all points in space for a 3D object would require a constant multiple of MN units of time, which is quite lengthy. If the 3D object is large, the computational time becomes extremely long, leading to low efficiency.
[0061] It is evident that the time complexity of determining the SDF value of a spatial point in a 3D object using related technologies is high, the computational efficiency is low, and the user experience is not good.
[0062] To address the above problems, this application provides a method for determining the value of the symbolic distance function, which can be applied to electronic devices or servers. (See reference...) Figure 2 As shown, in this method, firstly, point cloud data corresponding to the 3D object can be generated based on the captured image and depth image of the 3D object. Then, a 3D mesh representing the surface of the 3D object can be generated based on this point cloud data. This 3D mesh can be composed of multiple sub-meshes. Next, since each sub-mesh is a small polygon, multiple initial center points in each sub-mesh can be obtained by interpolating the edges and interior of the sub-mesh. These initial center points can include the vertices of the sub-mesh and interpolated points on its edges and interior. Because the sub-mesh itself is relatively small, the multiple initial center points obtained after interpolation can be considered as the center points of multiple voxels constituting the surface of the 3D object. Finally, using the initial center points of each sub-mesh as the starting point, the voxel edge length as the search step size, and the vertical direction of the sub-mesh as the search direction, a breadth-first search algorithm is used to search all voxels within the 3D object and assign corresponding SDF values.
[0063] As can be seen, by adopting the technical solution provided in this application, after determining the three-dimensional mesh that can represent the surface of a three-dimensional object, and after interpolating each sub-mesh, the SDF value of all spatial points in the three-dimensional object can be determined by searching and assigning values to all voxels within the three-dimensional object. Taking M as the number of voxels and N as the number of sub-mesh as an example, the time complexity required by the technical solution provided in this application is O(M+N). Therefore, the technical solution provided in this application has low time complexity and high computational efficiency in calculating the SDF value of spatial points of a three-dimensional object, thus improving the user experience.
[0064] The technical solutions provided in the embodiments of this application will be described in detail below with reference to the accompanying drawings.
[0065] The technical solutions provided in this application can be applied to electronic devices or servers. In some embodiments, the electronic device may be a mobile phone, tablet computer, handheld computer, personal computer (PC), ultra-mobile personal computer (UMPC), netbook, as well as cellular phone, personal digital assistant (PDA), augmented reality (AR) device, virtual reality (VR) device, artificial intelligence (AI) device, wearable device, in-vehicle device, smart home device and / or smart city device, etc. The embodiments of this application do not impose special limitations on the specific type of electronic device.
[0066] For example, taking a mobile phone as an electronic device, Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of this application is shown.
[0067] Reference Figure 3 As shown, the electronic device may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, antenna 1, antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, buttons 190, a motor 191, an indicator 192, a display screen 193, a subscriber identification module (SIM) card interface 194, and a camera 195, etc. The sensor module 180 may include a pressure sensor, a gyroscope sensor, a barometric pressure sensor, a magnetic sensor, an accelerometer, a distance sensor, a proximity sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, etc.
[0068] Processor 110 may include one or more processing units, such as: application processor (AP), modem processor, graphics processing unit (GPU), image signal processor (ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, and / or neural network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0069] A controller can be the nerve center and command center of an electronic device. Based on the instruction opcode and timing signals, the controller generates operation control signals to control the fetching and execution of instructions.
[0070] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0071] In some embodiments, the processor 110 may include one or more interfaces. Interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0072] The charging management module 140 is used to receive charging input from a power supply device (such as a charger, laptop power supply, etc.). The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 can receive charging input from the wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 can receive wireless charging input via the wireless charging coil of the electronic device.
[0073] While charging the battery 142, the charging management module 140 can also supply power to the electronic device through the power management module 141. Specifically, the battery 142 can be composed of multiple batteries connected in series. The power management module 141 is used to connect the battery 142, the charging management module 140, and the processor 110.
[0074] The power management module 141 connects the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, providing power to the processor 110, internal memory 121, display screen 193, camera 195, and wireless communication module 160, etc. The power management module 141 can also monitor parameters such as battery voltage, current, battery cycle count, and battery health status (leakage current, impedance). In some other embodiments, the power management module 141 may also be located within the processor 110.
[0075] The external memory interface 120 can be used to connect to external non-volatile memory, thereby expanding the storage capacity of the electronic device. The external non-volatile memory communicates with the processor 110 through the external memory interface 120 to perform data storage functions. For example, music, video, and other files can be stored in the external non-volatile memory.
[0076] Internal memory 121 may include one or more random access memory (RAM) and one or more non-volatile memory (NVM). The RAM can be directly read and written by the processor 110 and can be used to store executable programs (e.g., machine instructions) of the operating system or other running programs, as well as user and application data. The NVM can also store executable programs and user and application data, and can be pre-loaded into the RAM for direct read and write operations by the processor 110.
[0077] A touch sensor, also known as a "touch device," can be located on the display screen 193. The touch sensor and the display screen 193 together form a touchscreen, also called a "touchscreen." The touch sensor detects touch operations applied to or near it. The touch sensor can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 193. In other embodiments, the touch sensor may also be located on the surface of the electronic device, in a different position than the display screen 193.
[0078] An ambient light sensor is used to sense ambient light brightness. For example, an ambient light sensor can measure the light intensity of four channels of ambient light. The ambient light sensor outputs the measured light intensity of the four channels of ambient light to the processor 110. The processor 110 can process the light intensity of the four channels of ambient light output by the ambient light sensor to obtain the ambient light brightness.
[0079] A pressure sensor is used to sense pressure signals and convert them into electrical signals. In some embodiments, the pressure sensor may be located on the display screen 193. There are many types of pressure sensors, such as resistive pressure sensors, inductive pressure sensors, and capacitive pressure sensors. When a touch operation is applied to the display screen 193, the electronic device monitors the intensity of the touch operation based on the pressure sensor. The electronic device can also calculate the touch location based on the monitoring signal from the pressure sensor. In some embodiments, touch operations applied to the same touch location but with different intensities can correspond to different operation commands. For example, when a touch operation with an intensity less than a first pressure threshold is applied to the SMS application icon, a command to view an SMS message is executed. When a touch operation with an intensity greater than or equal to the first pressure threshold is applied to the SMS application icon, a command to create a new SMS message is executed.
[0080] In some embodiments, an electronic device may include one or N cameras 195, where N is a positive integer greater than 1. In this application embodiment, the type of camera 195 can be distinguished based on hardware configuration and physical location. For example, a camera located on the side of the electronic device's display screen 193 can be called a front-facing camera, and a camera located on the back cover of the electronic device can be called a rear-facing camera; another example is that a camera with a short focal length and a large field of view can be called a wide-angle camera, while a camera with a long focal length and a small field of view can be called a regular camera. Here, the focal length and field of view are relative concepts and are not specifically limited by parameters. Therefore, wide-angle cameras and regular cameras are also relative concepts, and can be specifically distinguished based on physical parameters such as focal length and field of view.
[0081] The electronic device implements display functions through a GPU, a display screen 193, and an application processor. The GPU is a microprocessor for image editing, connected to the display screen 193 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0082] Electronic devices can achieve shooting functions through ISP, camera 195, video codec, GPU, display 193, and application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0083] The Information Service Provider (ISP) is used to process data fed back from the camera 195. For example, when taking a picture, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, and the camera's photosensitive element transmits the electrical signal to the ISP for processing, transforming it into an image visible to the naked eye. The ISP can also perform algorithmic optimization on image noise and brightness. The ISP can also optimize parameters such as exposure and color temperature of the shooting scene. In some embodiments, the ISP can be integrated into the camera 195. The camera 195 is used to capture still images or videos.
[0084] Digital signal processors (DSPs) are used to process digital signals. Besides digital image signals, they can also process other digital signals. For example, when an electronic device is selecting a frequency, a DSP can perform a Fourier transform on the frequency energy.
[0085] Display screen 193 is used to display images, videos, etc. Display screen 193 includes a display panel. The display panel may be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a Mini LED, a MicroLED, a Micro-OLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device may include one or N displays 193, where N is a positive integer greater than 1.
[0086] In this embodiment of the application, the display screen 193 can be used to display pages required by the electronic device (e.g., a camera interface, etc.), and display images captured by any one or more cameras 195 in the interface.
[0087] The wireless communication function of electronic devices can be realized through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem, and baseband processor.
[0088] Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in an electronic device can be used to cover one or more communication frequency bands. Different antennas can also be reused to improve antenna utilization.
[0089] The mobile communication module 150 can provide wireless communication solutions, including 2G / 3G / 4G / 5G, for use in electronic devices. The mobile communication module 150 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1. In some embodiments, at least some functional modules of the mobile communication module 150 can be housed in the processor 110. In some embodiments, at least some functional modules of the mobile communication module 150 and at least some modules of the processor 110 can be housed in the same device.
[0090] The modem processor may include a modulator and a demodulator. The modulator modulates the low-frequency baseband signal to be transmitted into a mid-to-high frequency signal. The demodulator demodulates the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After processing by the baseband processor, the low-frequency baseband signal is transmitted to the application processor. The application processor outputs sound signals through audio devices (not limited to speaker 170A, receiver 170B, etc.) or displays images or videos through the display screen 193. In some embodiments, the modem processor may be a separate device. In other embodiments, the modem processor may be independent of the processor 110 and may be housed in the same device as the mobile communication module 150 or other functional modules.
[0091] The wireless communication module 160 can provide solutions for wireless communication applications in electronic devices, including wireless local area networks (WLANs) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via antenna 2, performs frequency modulation and filtering of the electromagnetic wave signals, and sends the processed signal to processor 110. The wireless communication module 160 can also receive signals to be transmitted from processor 110, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 2.
[0092] The SIM card interface 194 is used to connect a SIM card. The SIM card can be inserted into or removed from the SIM card interface 194 to make contact with and detach from the electronic device. The electronic device can support one or more SIM card interfaces. The SIM card interface 194 supports Nano SIM cards, Micro SIM cards, and other SIM cards. Multiple cards can be inserted into the same SIM card interface 194 simultaneously. The SIM card interface 194 is also compatible with external memory cards. The electronic device interacts with the network through the SIM card to achieve functions such as calls and data communication. One SIM card corresponds to one user number.
[0093] It is understood that the interface connection relationships between the modules illustrated in the embodiments of the present invention are merely illustrative and do not constitute a limitation on the structure of the electronic device. In other embodiments of this application, the electronic device may also employ different interface connection methods or combinations of multiple interface connection methods as described in the above embodiments.
[0094] Of course, it is understandable that the above... Figure 3 The illustration shown is merely an example when the electronic device is in the form of a mobile phone. If the electronic device is in the form of a tablet, handheld computer, PC, PDA, wearable device (such as a smartwatch, smart bracelet), or other similar device, the structure of the electronic device may include more advanced features. Figure 3 The fewer structures shown can also include more than Figure 3 The structures shown are not limited here.
[0095] It is understandable that, generally speaking, the implementation of electronic device functions requires not only hardware support but also software cooperation. The software system of electronic devices can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This application's embodiment uses a layered architecture... Taking the system as an example, the software structure of the electronic device is illustrated.
[0096] Figure 4 This is a schematic diagram of the layered architecture of the software system of the electronic device provided in the embodiments of this application. The layered architecture divides the software into several layers, each with a clear role and division of labor. The layers communicate with each other through software interfaces (e.g., APIs).
[0097] In some examples, refer to Figure 4 As shown in this embodiment, the software of the electronic device is divided into five layers, from top to bottom: the application layer, the framework layer (or application framework layer), the system library and Android runtime, the HAL layer (hardware abstraction layer), and the driver layer (or kernel layer). The system library and Android runtime can also be referred to as the native framework layer or the native layer.
[0098] The application layer can include a series of applications. For example... Figure 4 As shown, the application layer can include applications (APPs) such as camera, gallery, calendar, map, WLAN, Bluetooth, music, video, SMS, call, navigation, news, and instant messaging.
[0099] In some embodiments, a user can take a picture by operating a target application with a camera function in the application layer to obtain a captured image and / or a depth image of a three-dimensional object.
[0100] The framework layer provides application programming interfaces (APIs) and programming frameworks for applications in the application layer. The application framework layer includes predefined functions or services. For example, the application framework layer may include an activity manager, window manager, content provider, audio service, view system, phone manager, resource manager, notification manager, package manager, and camera service, etc., but this application embodiment does not impose any limitations on these.
[0101] The window manager is used to manage windowed applications. It can retrieve screen size, determine the presence of a status bar, lock the screen, and capture screenshots, among other things.
[0102] Content providers store and retrieve data, making that data accessible to applications. This data can include videos, images, audio, phone calls made and received, browsing history and bookmarks, phone books, etc.
[0103] A view system includes visual controls, such as controls for displaying text and controls for displaying images. View systems can be used to build applications. A display interface can consist of one or more views. For example, a display interface including a text notification icon could include views for displaying text and views for displaying images.
[0104] A phone manager is used to provide communication functionality for electronic devices. For example, a phone manager can manage the call status of a calling application (including initiation, connection, and termination).
[0105] The file explorer provides applications with various resources, such as localized strings, icons, images, layout files, video files, and more.
[0106] The notification manager allows applications to display notifications in the status bar. These notifications can be used to deliver informational messages and can disappear automatically after a short pause, requiring no user interaction. For example, the notification manager can be used to notify users of completed downloads or message alerts. The notification manager can also display notifications as icons or scrolling text in the top status bar, such as notifications from background applications, or as dialog boxes on the screen. Examples include displaying text messages in the status bar, emitting sounds, vibrating electronic devices, and flashing indicator lights.
[0107] Package manager in The package manager is used to manage application packages. It allows applications to obtain detailed information about installed applications and their services, permissions, etc. The package manager is also used to manage events such as application installation, uninstallation, and upgrades.
[0108] The primary function of camera services is to provide applications with a unified interface and functionality for accessing and operating camera devices. Camera services act as a bridge in the framework layer of the software system architecture, encapsulating the underlying camera hardware details and providing a unified interface and functionality, enabling applications to easily access, control, capture, and process images.
[0109] The system library can include multiple functional modules. For example: Surface Manager, Media Libraries, OpenGL ES, SGL, etc. The Surface Manager manages the display subsystem and provides 2D and 3D layer blending for multiple applications. The Media Libraries support playback and recording of various common audio and video formats, as well as still image files. The Media Libraries support various audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc. OpenGL ES is used for 3D graphics drawing, image rendering, compositing, and layer processing. SGL is a 2D graphics engine. The Android runtime includes the core library and the ART virtual machine. The Android runtime is responsible for the scheduling and management of the Android system. The core library consists of two parts: one part contains the functionalities that the Java language needs to call, and the other part is the Android core library. The application layer and application framework layer run in the ART virtual machine. The ART virtual machine executes the Java files of the application layer and application framework layer as binary files. The ART virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.
[0110] The Hardware Abstraction Layer (HAL) is the interface layer between the operating system kernel and the hardware circuitry, designed to abstract the hardware. It hides the platform-specific hardware interface details, providing the operating system with a virtual hardware platform that is hardware-independent and portable across multiple platforms. The HAL provides a standard interface that exposes device hardware functionality to the higher-level Java API framework (i.e., the framework layer). The HAL contains multiple library modules, each implementing an interface for a specific type of hardware component, such as: audio HAL, Bluetooth HAL, camera HAL (also known as camera HAL or camera hardware abstraction module), and sensors HAL (or i-sensor service).
[0111] In this embodiment, the camera HAL (i.e., the camera module) primarily serves as a bridge between the upper and lower layers. It provides its own methods (or functions or APIs) to the camera service through the HIDL interface of the HAL layer, enabling the camera service to communicate with the underlying driver (so that instructions from the camera service can be transmitted to the camera module, causing the camera module to operate according to the instructions). In this way, application-layer applications can control the camera driver by calling the camera HAL through the camera service, thereby controlling the camera to take pictures.
[0112] The kernel layer is the layer between hardware and software. The kernel layer includes at least display drivers, camera drivers, audio drivers, sensor drivers, Bluetooth drivers, etc., but this application does not limit this.
[0113] Specifically, the sensor driver can include the driver for each sensor contained in the electronic device, such as the ambient light sensor driver. For example, the ambient light sensor driver can, in response to an instruction or command from the sensor module to acquire detection data, promptly send the detection data from the ambient light sensor to the sensor module. The camera driver can drive the camera in the electronic device to take pictures.
[0114] In this embodiment of the application, to implement the method for determining the symbolic distance function value provided in this application, the electronic device may further include an SDF module, which is used to implement the method for determining the symbolic distance function value. The SDF module can be located in any possible software layer, such as the framework layer or the HAL layer; this application does not impose specific limitations on this.
[0115] For example, the server used in the method for determining the symbolic distance function value provided in this application can be a single server, a server cluster consisting of multiple servers, or a cloud computing service center. This application does not impose any specific restrictions on this.
[0116] For example, Figure 5 A schematic diagram of a server structure is shown. (Refer to...) Figure 5 As shown, the server includes one or more processors 501, a communication line 502, and at least one communication interface. Figure 5 (This is merely an example illustration, using a communication interface 503 and a processor 501 as examples. Optionally, a memory 504 may also be included.)
[0117] The processor 501 may be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits used to control the execution of the program of the present application.
[0118] Communication line 502 may include a communication bus for communication between different components.
[0119] The communication interface 503 can be a transceiver module used to communicate with other devices or communication networks, such as Ethernet, RAN, and wireless local area networks (WLAN). For example, the transceiver module can be a transceiver or similar device. Optionally, the communication interface 503 can also be a transceiver circuit located within the processor 501, used to implement the processor's signal input and signal output.
[0120] Memory 504 can be a storage device. For example, it can be read-only memory (ROM) or other types of static storage devices capable of storing static information and instructions; random access memory (RAM) or other types of dynamic storage devices capable of storing information and instructions; electrically erasable programmable read-only memory (EEPROM); compact disc read-only memory (CD-ROM) or other optical disc storage; optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.); magnetic disk storage media or other magnetic storage devices; or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited to these. Memory can exist independently and be connected to the processor via communication line 502. Memory can also be integrated with the processor.
[0121] The memory 504 stores computer execution instructions for implementing the scheme of this application, and the processor 501 controls the execution. The processor 501 executes the computer execution instructions stored in the memory 504, thereby implementing the method for determining the symbolic distance function value provided in the embodiments of this application.
[0122] Optionally, the computer execution instructions in the embodiments of this application may also be referred to as application code, and the embodiments of this application do not specifically limit this.
[0123] In a specific implementation, as one example, the processor 501 may include one or more CPUs, for example... Figure 5 CPU0 and CPU1 in the CPU.
[0124] In a specific implementation, as one example, the server may include multiple processors, for example... Figure 5Processors 501 and 507 are included. Each of these processors can be a single-core processor or a multi-core processor. The processors here can include, but are not limited to, at least one of the following: a central processing unit (CPU), a microprocessor, a digital signal processor (DSP), a microcontroller unit (MCU), or an artificial intelligence processor, etc., and various computing devices that run software. Each computing device may include one or more cores for executing software instructions to perform calculations or processing.
[0125] In a specific implementation, as one embodiment, the server may further include an output device 505 and an input device 506. The output device 505 communicates with the processor 501 and can display information in various ways. For example, the output device 505 may be a liquid crystal display (LCD), a light-emitting diode (LED) display device, a cathode ray tube (CRT) display device, or a projector, etc. The input device 506 communicates with the processor 501 and can receive user input in various ways. For example, the input device 506 may be a mouse, keyboard, touchscreen device, or sensing device, etc.
[0126] The server described above can be a general-purpose device or a dedicated device. For example, the server can be a desktop computer, laptop, network server, PDA (personal digital assistant), mobile phone, tablet computer, wireless terminal device, embedded device, the aforementioned terminal device, the aforementioned network device, or something else with... Figure 5 Devices with similar structures. This application does not limit the type of server to specific embodiments.
[0127] The methods described in the following embodiments can all be implemented in electronic devices having the above-described hardware structure and software architecture, or in servers having the above-described hardware structure.
[0128] The following combination Figure 6 As shown, the method for determining the symbolic distance function value provided in the embodiments of this application will be introduced. Figure 6 This is a flowchart illustrating a method for determining the value of a symbolic distance function provided in an embodiment of this application. (Refer to...) Figure 6 As shown, taking the application of this method in an electronic device, specifically a mobile phone, as an example, the method for determining the symbolic distance function value can include S601-S606:
[0129] S601. The mobile phone acquires a captured image and a depth image of the target object.
[0130] The captured image of the target object can be an RGB image or a two-dimensional image. The depth image of the target object is used to characterize the depth information of the target object in the captured image. For example, the target object can be any possible three-dimensional object, such as a rabbit, a dog, a computer, or a human body.
[0131] The captured image of the target object may contain only the target object or may include other objects. If the captured image of the target object contains only the target object, it can also be a semantic segmentation map obtained by segmenting the image from an image containing both the target object and other objects using a semantic segmentation algorithm. The specific segmentation method can be determined according to actual needs, and this application does not impose specific restrictions on it.
[0132] In this embodiment, the image of the target object can be captured by the mobile phone using its own camera, or obtained by semantic segmentation of the captured image. The image of the target object can also be received by the mobile phone from any other possible device. Alternatively, the image of the target object can be downloaded by the mobile phone from the Internet.
[0133] The depth image of the target object can be obtained by the phone using its depth camera when taking a picture of the target object. Alternatively, the depth image can be received by the phone when receiving a picture of the target object from another device. Or, the depth image can be manually generated and input into the phone after the depth information of the target object is manually determined when the phone takes a picture of the target object.
[0134] Of course, the acquisition of images and depth images of the target object can be done in any other possible way, and this application does not impose any specific restrictions on this.
[0135] After acquiring the captured image and depth image of the target object, in order to determine the spatial points occupied by the target object or the voxels that constitute the target object, point cloud data that can discretize the spatial occupancy of the target object can be generated first, i.e., S602 is executed.
[0136] S602: The mobile phone generates point cloud data of the target object based on the captured image and depth image of the target object.
[0137] In this embodiment, the point cloud data of the target object includes feature data of discrete points that can indicate the spatial shape of the target object. For example, taking a desktop computer as the target object, the final generated discrete points can be as follows: Figure 7 As shown.
[0138] The feature data of discrete points can include their three-dimensional coordinates in three-dimensional space. The coordinate system corresponding to these three-dimensional coordinates can be the camera coordinate system of the camera that captured the image of the target object. Furthermore, this feature data can also include any possible information such as color information.
[0139] In one possible implementation, S602 can specifically be: the mobile phone can generate point cloud data of the target object based on the captured image and depth image of the target object, using a back-projection algorithm. This back-projection algorithm can be any possible back-projection algorithm, and its specific implementation can be determined according to actual needs; this application does not impose any specific restrictions on it.
[0140] After obtaining the point cloud data of the target object, it is necessary to first determine which points in the point cloud data can form the surface of the target object. This can be accomplished by generating a 3D mesh based on the point cloud data, i.e., executing S603.
[0141] S603: The mobile phone generates a 3D mesh of the target object based on the point cloud data of the target object.
[0142] The 3D mesh is used to represent or serve as the surface (or 3D surface) of the target object. This 3D mesh can consist of multiple sub-meshes, each with the same number of vertices. For example, each sub-mesh can be a triangle or a parallelogram. The vertices of each sub-mesh in the 3D mesh are discrete points in the point cloud data of the target object.
[0143] In practice, the 3D mesh of a target object generated by a mobile phone can specifically establish the connection relationship between different discrete points in the point cloud data of the target object. This connection relationship can be connected or disconnected, and can be represented by "0" or "1" in the data.
[0144] In one possible implementation, S603 can specifically involve the mobile phone generating a 3D mesh of the target object based on point cloud data and a preset algorithm. For example, the preset algorithm can be a marching cube (or marching cubes) algorithm. When the preset algorithm is the marching cube algorithm, the sub-mesh shape of the 3D mesh of the target object generated by the mobile phone is all triangular.
[0145] After obtaining a 3D mesh that characterizes the surface of the target object, we can further determine the shortest distance from the center point of each spatial point or voxel constituting the target object to its surface, i.e., determine the SDF value of all voxels in the target object. One of the simplest methods is to divide the target object into multiple voxels, calculate the distance from the center point of each voxel to each sub-mesh, and take the smallest distance among all such distances as the SDF value of that voxel. However, this method requires iterating through each voxel while simultaneously calculating the distance between each voxel and each sub-mesh. Taking M voxels and N sub-mesh numbers as an example, this approach has a time complexity of O(M*N), which is relatively high and computationally inefficient.
[0146] To reduce this time complexity, we can first interpolate each sub-mesh to determine the interpolation points on each sub-mesh. Since the sub-mesh itself is relatively small, after interpolation, the distance between adjacent interpolation points and the distance between adjacent interpolation points and sub-mesh vertices will be close to the voxel's edge length. Therefore, the interpolation points and vertices of the sub-mesh obtained after interpolation can be considered as the center points of the outermost layer of voxels that constitute the target object. Then, using the search step size as the voxel edge length, we can search layer by layer into the 3D mesh based on these sub-mesh vertices and interpolation points to determine the center points of the remaining voxels, and thus determine the SDF values of all voxels. In this way, taking the number of voxels as M and the number of sub-mesh as N as an example, since we need to search and assign an SDF value to each voxel (only the SDF values of the sub-mesh vertices and interpolation points need to be determined), and we need to interpolate each sub-mesh, the time complexity of this scheme can be O(M+N). Compared to O(M*N), there is a considerable reduction.
[0147] Based on this, S604-S606 are executed after S603.
[0148] Furthermore, in some embodiments, to facilitate calculation, after obtaining the 3D mesh of the target object, the mobile phone can normalize the coordinates of all vertices of the 3D mesh. For example, the coordinates of all vertices can be scaled according to a certain ratio so that the coordinates of each vertex are within a specific range, such as [0,1]. The specific normalization method is not specifically limited in this application and depends on the actual needs.
[0149] S604. The mobile phone interpolates the sub-mesh in the 3D mesh of the target object to obtain the interpolation points on the sub-mesh.
[0150] The interpolation points on the sub-mesh can include interpolation points on the edges of the sub-mesh, as well as interpolation points inside the sub-mesh. The interpolation points inside the sub-mesh are derived based on the interpolation points on the edges of the sub-mesh.
[0151] In some embodiments, taking a cube as an example, the side lengths of the voxels constituting the target object are pre-defined. In this case, the number of interpolation points on the sub-mesh edges can be determined based on the size information that characterizes the voxel size, thereby completing the interpolation to obtain the interpolation points on the sub-mesh. Based on this, in one possible implementation, combined with Figure 6 , refer to Figure 8 As shown, S604 may specifically include S801-S803:
[0152] S801: The mobile phone determines the number of edge interpolation operations for the sub-mesh based on the preset voxel side length and the sub-mesh size information.
[0153] In some embodiments, the size information of the sub-mesh may include the lengths of each side of the sub-mesh. Specifically, the mobile phone may determine the number of edge interpolation operations for the sub-mesh based on the side lengths of the voxels and the side lengths of the sub-mesh. This number of edge interpolation operations ensures that each side of the sub-mesh can be divided into line segments with a length equal to or similar to the side length of the voxels, which is the number of edge interpolation operations plus one.
[0154] S802, The number of edge interpolation times based on the subgrid of the mobile phone, and the number of interpolation points uniformly distributed on each edge of the subgrid.
[0155] For example, taking a sub-grid with a triangular shape as an example, refer to... Figure 9 As shown in (a), if the side lengths of the three sides of the subgrid are 4, 4, and 4, If the side length of a voxel is 1, then the number of edge interpolation steps is determined to be 3. That is, 3 interpolation points can be evenly set on each edge of the submesh, thus dividing the edge into 4 segments evenly through 3 interpolation points.
[0156] For example, taking a subgrid with a parallelogram shape as an example, refer to... Figure 9 As shown in (b), if the side lengths of the four sides of the subgrid are 3, 3, 4, and 4 respectively, and the side length of the voxel is 1, then the number of edge interpolation can be determined to be 2. That is, two interpolation points can be evenly set on each side of the subgrid, that is, the side is evenly divided into 3 segments by two interpolation points.
[0157] After determining the interpolation points on the edges of the subgrid, the interpolation points inside the subgrid can be determined based on the interpolation points on the edges, i.e., S803 is executed.
[0158] S803: The mobile phone determines the interpolation points inside the subgrid based on the interpolation points on the edges of the subgrid.
[0159] In some embodiments, if the shape of the sub-grid is triangular, then S6043 may specifically include: the mobile phone establishing interpolation lines connecting corresponding interpolation points on any two pairs of adjacent sides of the sub-grid, and determining the points where the interpolation lines intersect as interpolation points inside the sub-grid. For example, refer to... Figure 9 As shown in (a), AB1 and AC1 are interpolation points corresponding to the positions on the adjacent edges AB and AC. Similarly, AB2 and AC2, and AB3 and AC3 are also interpolation points corresponding to the positions on the adjacent edges AB and AC. BC12 and AC1, BC2 and AC2, and BC3 and AC3 are all interpolation points corresponding to the positions on the adjacent edges BC and AC. After establishing the corresponding interpolation lines, the interpolation points D, E, and F inside this subgrid can be obtained.
[0160] In other embodiments, if the sub-grid is a parallelogram, then S6043 may specifically include: the mobile phone establishing interpolation lines connecting corresponding interpolation points on two pairs of opposite sides of the sub-grid, and determining the points where the interpolation lines intersect as interpolation points inside the sub-grid. For example, refer to... Figure 9 As shown in (b), HI1 and JK1 are the interpolation points corresponding to the positions on the pairs of edges HI and JK. Similarly, HI2 and JK2 are also the interpolation points corresponding to the positions on the pairs of edges HI and JK. HJ1 and IK1, and HJ1 and IK2 are all the interpolation points corresponding to the positions on the pairs of edges HJ and IK. After establishing the corresponding interpolation connections, the interpolation points L, M, N, and O inside this subgrid can be obtained.
[0161] Based on the technical solutions corresponding to S801-S803 described above, the mobile phone can determine the number of interpolation points on the sub-grid edge based on the preset side length of the voxel, thereby completing the interpolation to obtain the interpolation points on the sub-grid. This provides initial data support for subsequent voxel searches.
[0162] In some embodiments, the side lengths of the voxels constituting the target object may not be preset. In this case, the number of edge interpolation operations on each edge of the sub-mesh can be preset, and then the sub-mesh interpolation can be performed. Based on this, in another possible implementation, combined with Figure 6 , refer to Figure 10 As shown, S604 may specifically include S1001 and S1002:
[0163] S1001. Based on a preset number of edge interpolation times, the mobile phone determines a uniformly distributed number of interpolation points on each edge of the sub-grid.
[0164] The specific implementation of S1001 can be referred to the specific implementation of S802 in the aforementioned embodiment, and will not be described in detail here.
[0165] S1002. The mobile phone determines the interpolation points inside the sub-grid based on the interpolation points on the edges of the sub-grid.
[0166] The specific implementation of S1002 can be referred to the specific implementation of S803 in the aforementioned embodiment, and will not be described in detail here.
[0167] Furthermore, since the voxel side length is unknown in this implementation, the phone also needs to determine the voxel side length based on the edge interpolation data of all sub-grids. The sub-grid interpolation data includes the distance between two adjacent interpolation points on the edge of each sub-grid. After obtaining the distances between two adjacent interpolation points on the edges of all sub-grids, the average of these distances can be used to determine the voxel side length.
[0168] Based on the technical solutions corresponding to S1001 and S1002 above, the mobile phone can determine the interpolation point on the sub-grid based on the preset number of edge interpolation, providing initial data support for subsequent voxel search.
[0169] It should be noted that the above process for determining the interpolation points of a sub-mesh is performed for each sub-mesh in the 3D mesh. Specifically, the phone can first randomly select a sub-mesh and perform the above process to determine the interpolation points on that sub-mesh. Then, a new sub-mesh can be selected and the above process performed to determine the interpolation points. This process is repeated until the interpolation points on all sub-meshes have been determined.
[0170] S605, The mobile phone determines the vertices of all sub-mesh and the interpolation points on the sub-mesh as the center points of the voxels of the outermost layer of voxels constituting the target object, and sets the SDF value of the voxels corresponding to the vertices of all sub-mesh and the interpolation points on the sub-mesh to 0.
[0171] Since the interpolation points and vertices of the submesh obtained after interpolation can be considered as the center points of the outermost layer of voxels that constitute the target object, and according to the definition of SDF value, the SDF value of the center point of the outermost voxel is 0.
[0172] The S606 mobile phone uses the vertices of the sub-mesh and the interpolation points on the sub-mesh as the starting points, the side length of the voxels as the search step size, and the vertical direction of the sub-mesh toward the interior of the 3D mesh as the search direction. It adopts a breadth-first search algorithm to determine all voxels in the target object and the SDF values of all voxels.
[0173] For example, the search direction can be illustrated as follows: Figure 11 As shown.
[0174] In one possible implementation, combining Figure 6 , refer to Figure 12 As shown, S606 may specifically include S6061-S6065:
[0175] S6061. The mobile phone takes the vertices of the sub-mesh and the interpolation points on the sub-mesh as the starting point. In the direction perpendicular to the sub-mesh and towards the interior of the 3D mesh, the point at a distance from the starting point on the sub-mesh equal to the side length of the voxel is determined as the center point of the first voxel in the target object, and the SDF value of the first voxel is determined as the side length of the voxel.
[0176] S6061 is the first search performed by the phone using a breadth-first search algorithm. After S6061 is executed, the phone can find all voxels with an SDF value of 1 among the voxels constituting the target object. Then, in the same way, all voxels in the target object can be searched step by step to determine the corresponding SDF values, i.e., S6062-S6065 are executed. Furthermore, since the sub-mesh in the 3D mesh has already been interpolated, the sub-intermediate mesh included in the subsequent generation of the 3D intermediate mesh is itself very small. Therefore, no interpolation is needed at this point, and the vertices of each sub-intermediate mesh can be used as the starting point for the next search of voxels (i.e., subsequent intermediate search points).
[0177] S6062, The mobile phone determines the center point of the first voxel corresponding to the starting point as the intermediate search point.
[0178] S6063: The mobile phone generates a three-dimensional intermediate mesh based on all intermediate search points.
[0179] The three-dimensional intermediate mesh comprises multiple sub-intermediate meshes, each of which is a polygon composed of multiple intermediate search points, and each sub-intermediate mesh has the same number of vertices. For example, each sub-intermediate mesh can be either a triangle or a parallelogram.
[0180] Specifically, the way the mobile phone generates a 3D intermediate mesh based on all intermediate search points can be any possible implementation. For example, it can establish connections between multiple intermediate search points that are closest to each other to create a 3D intermediate mesh.
[0181] Since the side length of a voxel is very small, after determining all the first voxels with an SDF value of 1 in the target object and forming a three-dimensional intermediate mesh, the shape of the three-dimensional intermediate mesh is extremely similar to the shape of the original three-dimensional mesh. Therefore, the voxels in the target object can be further determined by iteratively using the same method as S6061. That is, S6064 and S6035 are executed.
[0182] S6064. The mobile phone, in a direction perpendicular to the sub-intermediate grid and facing the interior of the three-dimensional intermediate grid, determines the point at which the distance from the intermediate search point on the sub-intermediate grid is equal to the side length of the voxel as the center point of the (N+1)th voxel in the target object, and determines the SDF value of the (N+1)th voxel as N+1 times the side length of the voxel.
[0183] Where N represents the number of times the three-dimensional intermediate mesh is generated.
[0184] After each execution of S6064, the phone can find all voxels with an SDF value of N+1 among the voxels that constitute the target object.
[0185] S6065, The phone uses the center point of the N+1th voxel to update the intermediate search point.
[0186] For example, S6065 means that the center point of the (N+1)th voxel is determined as the new intermediate search point, and the previous intermediate search points are no longer intermediate search points.
[0187] S6065 is followed by S6063.
[0188] Furthermore, since the size of the target object remains constant, the number of voxels within it is necessarily finite. During the loop of S6063-S6065, it's possible to find voxels that have already been found. If the SDF value determination continues according to this logic, the SDF value of that voxel might be modified to an incorrect value. Therefore, to avoid voxels being repeatedly assigned SDF values, leading to incorrect SDF values, during S6064, the phone also checks if a point perpendicular to the sub-intermediate grid and facing inwards from the 3D intermediate grid, with a distance equal to the side length of the voxel from the intermediate search point on the sub-intermediate grid, is a point among voxels that already have an SDF value. If so, this point is not determined as the center point of the (N+1)th voxel in the target object, nor is an SDF value determined for the voxel to which this point belongs. In this way, during the loop of S6063-S6065, it is inevitable that no new center point of the (N+1)th voxel will be found in a certain loop, and the entire loop will terminate. At this point, the corresponding SDF values of all voxels in the target object have been determined, meaning that the SDF values of all spatial points in the target object have been determined.
[0189] Based on the technical solutions corresponding to S6061-S6065 mentioned above, a step-by-step search method can be used to complete the calculation process of determining all voxels and their corresponding SDF values in the target object with low time complexity. Compared with existing technologies, this greatly reduces the time complexity of calculating the SDF values of spatial points of a 3D object, improves computational efficiency, and thus enhances the user experience.
[0190] Of course, the technical solutions corresponding to S6061-S6065 mentioned above are only one possible implementation of S606. The specific implementation of S606 can also be any other possible implementation. This application does not impose any specific restrictions on this.
[0191] Based on the technical solution provided in this application, after determining the three-dimensional mesh that can represent the surface of the target object, since each sub-mesh is a small polygon, multiple initial center points in each sub-mesh can be obtained by interpolating the edges and interiors of the sub-mesh. These initial center points can include the vertices of the sub-mesh and interpolated points on its edges and interiors. Because the sub-mesh itself is relatively small, the multiple initial center points obtained after interpolation can be considered as the center points of multiple voxels constituting the surface of the target object. Finally, using the initial center point of each sub-mesh as the starting point, the voxel side length as the search step size, and the vertical direction of the sub-mesh as the search direction, a breadth-first search algorithm is used to search all voxels within the target object and assign corresponding SDF values. It can be seen that, using the technical solution provided in this application, after determining the three-dimensional mesh that can represent the surface of the target object and interpolating each sub-mesh, the SDF values of all spatial points in the target object can be determined by searching and assigning values to all voxels within the target object. Taking M as the number of voxels and N as the number of sub-mesh as an example, the time complexity required by the technical solution provided in this application is O(M+N). It is evident that the technical solution provided in this application has low time complexity and high computational efficiency in calculating the SDF value of spatial points of the target object, thus improving the user experience.
[0192] To more clearly illustrate the technical solutions provided in the embodiments of this application, the following example uses a back-projection algorithm to generate point cloud data, pre-determines the side lengths of voxels, and sets the shape of the sub-mesh of the 3D mesh to be triangular. Figure 13 The method for determining the symbolic distance function value provided in this application is illustrated below. (Refer to...) Figure 13 As shown, the entire process of the technical solution provided in this application embodiment is as follows:
[0193] First, acquire images and depth images of the target object. Then, based on these images, a back-projection algorithm can be used to generate point cloud data. Next, a 3D mesh representing the surface of the target object can be constructed based on the point cloud data. Further, for computational convenience, the coordinates of the vertices of each sub-mesh in the 3D mesh can be normalized. Finally, the first triangular sub-mesh (which can be simply referred to as a triangle) can be randomly selected, and it can be determined whether interpolation has been performed to identify interpolation points.
[0194] If it is determined that the subgrid of the triangle shape has been interpolated, then the next subgrid of the triangle shape can be randomly selected to determine whether it has been interpolated.
[0195] If it is determined that the triangular submesh has not been interpolated, the number of edge interpolation iterations can be determined based on the voxel's side length. Then, the interpolation points in the triangular submesh can be determined based on the number of edge interpolation iterations. Finally, it can be determined whether all triangular submeshes have been interpolated.
[0196] If it is determined that all triangular sub-mesh shapes have not been interpolated, then the next triangular sub-mesh shape can be selected for interpolation. If it is determined that all triangular sub-mesh shapes have been interpolated, then all voxels and their SDF values can be searched based on the inner and outer boundaries of the target object. The inner and outer boundaries of the target object are known after the 3D mesh is generated. The specific implementation of searching all voxels and their SDF values can be found in the relevant description of S606 in the aforementioned embodiment.
[0197] Understandable. Figure 13 The specific implementation of each step in the process of determining the symbolic distance function value shown, as well as the effects that can be achieved, are the same as the method for determining the symbolic distance function value provided in the aforementioned embodiments, and will not be repeated here.
[0198] It should be noted that in the method for determining the symbolic distance function value provided in this application, all calculations after obtaining the point cloud data can be performed based on the three-dimensional coordinates of each store in the point cloud data and its derived data.
[0199] It is understood that, in order to achieve the aforementioned functions, the electronic device includes corresponding hardware structures and / or software modules for performing each function. Those skilled in the art should readily recognize that, based on the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein, the embodiments of the present invention can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in a hardware-driven or software-driven manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of the embodiments of this application.
[0200] This application embodiment can divide the above-described electronic device into functional modules based on the method example described above. For example, each function can be divided into its own functional modules, or two or more functions can be integrated into one processing module. The integrated modules can be implemented in hardware or as software functional modules. It should be noted that the module division in this embodiment is illustrative and only represents one logical functional division; in actual implementation, there may be other division methods.
[0201] When dividing each function into modules according to its corresponding function, refer to Figure 14As shown in the figure, this application embodiment also provides a device for determining the symbolic distance function value applied in electronic devices. The device may include a generation module 141, an interpolation module 142, and a processing module 143.
[0202] The generation module 141 is used to generate a three-dimensional mesh representing the surface of the target object based on the captured image and depth image of the target object; the three-dimensional mesh consists of multiple sub-mesh, and each sub-mesh has the same number of vertices.
[0203] Interpolation module 142 is used to interpolate the sub-mesh in the three-dimensional mesh generated by generation module 141 to obtain interpolation points on the sub-mesh; the interpolation points on the sub-mesh include interpolation points on the edges of the sub-mesh and interpolation points inside the sub-mesh.
[0204] The processing module 143 is used to determine the vertices of the sub-mesh generated by the generation module 141 and the interpolation points on the sub-mesh obtained by the interpolation module 142 as the center points of the voxels of the outermost layer of voxels constituting the target object, and to determine the signed distance function SDF value of the voxels corresponding to the vertices of the sub-mesh and the interpolation points on the sub-mesh as 0.
[0205] The processing module 143 is also used to determine all voxels and their SDF values within the target object by using the vertices of the sub-mesh generated by the generation module 141 and the interpolation points on the sub-mesh obtained by the interpolation module 142 as starting points, the side length of the voxels as the search step size, and the vertical direction of the sub-mesh toward the interior of the 3D mesh as the search direction, and by employing a breadth-first search algorithm.
[0206] Furthermore, the combination of generation module 141, interpolation module 142 and processing module 143 can also realize any step in the method for determining the symbolic distance function value provided in the foregoing embodiments, which will not be elaborated here.
[0207] Regarding the apparatus for determining the symbolic distance function value in the above embodiments, the specific methods by which each module performs its operations have been described in detail in the embodiments of the method for determining the symbolic distance function value in the foregoing embodiments, and will not be elaborated here. Its related beneficial effects can also be referred to the related beneficial effects of the foregoing method for determining the symbolic distance function value, and will not be repeated here.
[0208] This application also provides an electronic device, which includes a memory and one or more processors; the memory is coupled to the processors; wherein the memory stores computer program code, which includes computer instructions, and when the computer instructions are executed by the processor, the electronic device performs the method for determining the symbolic distance function value as provided in the foregoing embodiments. The specific structure of this electronic device can be referred to... Figure 3 The structure of the electronic device shown is illustrated.
[0209] This application also provides a computer-readable storage medium including computer instructions that, when executed on an electronic device, cause the electronic device to perform the method for determining the symbolic distance function value as provided in the foregoing embodiments.
[0210] This application also provides a computer program product containing executable instructions that, when run on an electronic device, cause the electronic device to perform the method for determining the symbolic distance function value as provided in the foregoing embodiments.
[0211] Through the above description of the embodiments, those skilled in the art can clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0212] In the several embodiments provided in this application, it should be understood that the disclosed apparatus / device and method can be implemented in other ways. For example, the apparatus / device embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0213] The units described as separate components may or may not be physically separate. A component shown as a unit can be one or more physical units; that is, it can be located in one place or distributed in multiple different locations. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0214] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0215] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, essentially or in other words, the parts that contribute to the prior art, or all or part of the technical solutions, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0216] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for determining the value of a signed distance function, characterized in that, Applied to electronic devices, the method includes: Based on the captured images and depth images of the target object, a three-dimensional mesh is generated to characterize the surface of the target object; the three-dimensional mesh consists of multiple sub-mesh, each sub-mesh having the same number of vertices; Interpolation is performed on the sub-mesh of the three-dimensional mesh to obtain interpolation points on the sub-mesh; the interpolation points on the sub-mesh include interpolation points on the edges of the sub-mesh and interpolation points inside the sub-mesh; The vertices of the sub-mesh and the interpolation points on the sub-mesh are determined as the center points of the voxels in the outermost layer of voxels constituting the target object, and the signed distance function (SDF) value of the voxels corresponding to the vertices of the sub-mesh and the interpolation points on the sub-mesh is set to 0. Using the vertices of the sub-mesh and the interpolation points on the sub-mesh as the starting point, the side length of the voxels as the search step size, and the vertical direction of the sub-mesh towards the interior of the target object as the search direction, a breadth-first search algorithm is used to determine all voxels within the target object and the SDF values of all voxels. This includes: using the vertices of the sub-mesh and the interpolation points on the sub-mesh as the starting point, in a direction perpendicular to the sub-mesh and towards the interior of the target object, determining the point whose distance from the starting point on the sub-mesh is equal to the side length of the voxel as the center point of the first voxel in the target object, and setting the SDF value of the first voxel as the center point of the second voxel. The SDF value of a voxel is determined as the side length of the voxel; the center point of the first voxel corresponding to the starting point is determined as the intermediate search point; a three-dimensional intermediate mesh is generated based on all the intermediate search points; the three-dimensional intermediate mesh includes multiple sub-intermediate meshes, each sub-intermediate mesh being a polygon composed of multiple intermediate search points, and all sub-intermediate meshes having the same number of vertices; in a direction perpendicular to the sub-intermediate meshes and facing the interior of the target object, a point whose distance from the intermediate search point on the sub-intermediate mesh is equal to the side length of the voxel is determined as the center point of the (N+1)th voxel in the target object, and the SDF value of the (N+1)th voxel is determined to be N+1 times the side length of the voxel; N is the number of times the three-dimensional intermediate mesh is generated; the intermediate search points are updated using the center point of the (N+1)th voxel, and a three-dimensional intermediate mesh is regenerated based on all the intermediate search points.
2. The method according to claim 1, characterized in that, The generation of a three-dimensional mesh to characterize the surface of the target object, based on the captured image and depth image of the target object, includes: Based on the captured images and depth images of the target object, point cloud data of the target object is generated; the point cloud data of the target object includes feature data of discrete points used to characterize the shape of the target object in space, and the feature data includes three-dimensional coordinates; Based on the point cloud data of the target object, a three-dimensional mesh of the target object is generated; the vertices of the sub-mesh included in the three-dimensional mesh are discrete points in the point cloud data.
3. The method according to claim 1 or 2, characterized in that, The step of interpolating the sub-mesh in the three-dimensional mesh to obtain the interpolation points on the sub-mesh includes: Based on the preset voxel side length and the size information of the sub-mesh, the number of edge interpolation times for the sub-mesh is determined; Based on the number of edge interpolation, a uniformly distributed number of interpolation points are determined on each edge of the sub-grid. Interpolation points inside the sub-grid are determined based on the interpolation points on the edges of the sub-grid.
4. The method according to claim 3, characterized in that, When the sub-mesh is triangular in shape, determining the interpolation points inside the sub-mesh based on the interpolation points on the edges of the sub-mesh includes: Establish interpolation lines connecting corresponding interpolation points on any two pairs of adjacent edges in the subgrid, and determine the points where the interpolation lines intersect as interpolation points inside the subgrid.
5. The method according to claim 3, characterized in that, When the sub-mesh is parallelogram in shape, determining the interpolation points inside the sub-mesh based on the interpolation points on the edges of the sub-mesh includes: Establish interpolation lines connecting corresponding interpolation points on two pairs of opposite edges in the subgrid, and determine the points where the interpolation lines intersect as interpolation points inside the subgrid.
6. The method according to claim 1 or 2, characterized in that, The step of interpolating the sub-mesh in the three-dimensional mesh to obtain the interpolation points on the sub-mesh includes: Based on a preset number of edge interpolation times, a uniformly distributed number of interpolation points are determined on each edge of the sub-grid. Interpolation points inside the sub-grid are determined based on the interpolation points on the edges of the sub-grid.
7. The method according to claim 6, characterized in that, After determining the interpolation points inside the sub-mesh based on the interpolation points on the edges of the sub-mesh, the method further includes: The edge length of a voxel is determined based on the edge interpolation data of all the sub-grids; the edge interpolation data of the sub-grids includes the distance between two adjacent interpolation points on the edge of the sub-grid.
8. An electronic device, characterized in that, include: A memory and one or more processors; the memory is coupled to the processors; wherein the memory stores computer program code, the computer program code including computer instructions, which, when executed by the processor, cause the electronic device to perform the method for determining the symbolic distance function value as described in any one of claims 1-7.
9. A computer-readable storage medium, characterized in that, Includes computer instructions that, when executed on an electronic device, cause the electronic device to perform a method for determining the value of the symbolic distance function as described in any one of claims 1-7.