Symbol distance function value determination method, electronic equipment and storage medium
By generating a three-dimensional grid and using interpolation points and a breadth-first search algorithm, the problem of low efficiency in calculating the SDF value of three-dimensional objects in the existing technology is solved, efficient SDF value determination is achieved, and the user experience is improved.
Patent Information
- Application Number
- CN202410940476.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-12
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2044-07-12
AI Technical Summary
In the existing technology, determining the signed distance function value (SDF value) of a three-dimensional object space point has low computational efficiency and high time complexity, which affects the user experience.
By generating a 3D grid of the target object, the SDF values of all voxels in the target object are determined using the interpolation points of the subgrid and the breadth-first search algorithm, with a time complexity of O(M+N).
It improves the efficiency of calculating the SDF value of three-dimensional object space points, reduces the calculation complexity, and improves the user experience.
Smart Images

Figure CN120747337A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing, and in particular to a method for determining a signed distance function value, an electronic device, and a storage medium. Background Art
[0002] In the field of computer graphics, volume rendering can not only render the surface of an object, but also the interior of the object. Therefore, volume rendering can be used in fields such as medicine, education, and entertainment that require rendering of three-dimensional objects. In the volume rendering process, the texture information (such as color, brightness, transparency, etc.) of the spatial points in the three-dimensional space occupied by the three-dimensional object is essential information in the volume rendering process. Some texture information can be designed and stored in advance, while others can be calculated through the relevant parameters of the spatial points. Generally speaking, when calculating the texture information of a spatial point, not only the coordinates of the spatial point are required, but also the distance between the spatial point and the surface of the three-dimensional object. Among them, the distance between the spatial point and the surface of the three-dimensional object can be specifically represented by the signed distance function SDF value. Based on this, how to quickly and conveniently obtain the SDF value of the spatial point in the space occupied by the three-dimensional object is an urgent problem to be solved. Summary of the Invention
[0003] The embodiments of the present application provide a method for determining a signed distance function value, an electronic device, and a storage medium, which can quickly and conveniently obtain the SDF value of a spatial point of a control occupied by a three-dimensional object.
[0004] In order to achieve the above objectives, the embodiments of the present application adopt the following technical solutions:
[0005] In a first aspect, an embodiment of the present application provides a method for determining a signed distance function value, which is applied to an electronic device. The method includes: generating a three-dimensional grid for representing the surface of a target object based on a captured image and a depth image of the target object; the three-dimensional grid is composed of multiple sub-grids, and each sub-grid has the same number of vertices; interpolating the sub-grids in the three-dimensional grid to obtain interpolation points on the sub-grids; the interpolation points on the sub-grids include interpolation points on the edges of the sub-grids and interpolation points inside the sub-grids; determining the vertices of the sub-grids and the interpolation points on the sub-grids as the center points of the voxels of the outermost layer of voxels constituting the target object, and determining the signed distance function (SDF) values of the voxels corresponding to the vertices of the sub-grids and the interpolation points on the sub-grids to be 0; using the vertices of the sub-grids and the interpolation points on the sub-grids as starting points, the side length of the voxels as the search step length, and the vertical direction of the sub-grid toward the interior of the three-dimensional grid as the search direction, and using a breadth-first search algorithm to determine all voxels in the target object and the SDF values of all voxels.
[0006] Based on the technical solutions provided in the embodiments of the present application, after determining a three-dimensional grid that can represent the surface of the target object, since the sub-grid itself is a relatively small polygon, multiple initial center points can be obtained in each sub-grid by interpolating the edges and interior of the sub-grid. The multiple initial center points in the sub-grid can include the vertices of the sub-grid and the interpolation points on the edges and interior of the sub-grid. Since the sub-grid itself is relatively small, the multiple initial center points obtained after interpolation can be considered as the center points of the multiple voxels on the surface of the target object. Finally, a breadth-first search algorithm can be used, using the initial center point of each sub-grid as the starting point, the voxel side length as the search step, and the vertical direction of the sub-grid as the search direction, to search all voxels in the target object and assign corresponding SDF values. It can be seen that using the technical solutions provided in the present application, after determining a three-dimensional grid that can represent the surface of the target object and interpolating each sub-grid, the SDF values of all spatial points in the target object can be determined by searching and assigning values to all voxels in the target object. Taking M as the number of voxels and N as the number of subgrids as an example, the time complexity required for the technical solution provided by this application is O(M+N). It can be seen that the technical solution provided by this application can quickly and easily determine the SDF value of the spatial point of the target object with low time complexity and high computational efficiency, thereby improving the user experience.
[0007] In a possible implementation of the first aspect, a three-dimensional mesh for characterizing the surface of a target object is generated based on a captured image and a depth image of the target object, including: generating point cloud data of the target object based on the captured image and the depth image of the target object; the point cloud data of the target object includes feature data of discrete points for characterizing the shape of the target object in space, and the feature data includes 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-meshes included in the three-dimensional mesh are discrete points in the point cloud data.
[0008] Based on the technical solutions corresponding to the above implementations, point cloud data representing the spatial morphological features of the target object can be obtained from the captured image and depth image of the target object. Furthermore, a three-dimensional mesh representing 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 a possible implementation of the first aspect, subgrids in a three-dimensional grid are interpolated to obtain interpolation points on the subgrid, including: determining the number of edge interpolation times of the subgrid based on a preset voxel side length and size information of the subgrid; determining a uniformly distributed number of interpolation points on each edge of the subgrid based on the number of edge interpolation times; and determining interpolation points inside the subgrid based on the interpolation points on the edge of the subgrid.
[0010] Based on the technical solution corresponding to the above implementation, the electronic device can determine the number of interpolation points on the sub-grid edge based on the preset side length of the voxel, and then complete the interpolation to obtain the interpolation points on the sub-grid, thereby providing initial data support for subsequent voxel searches.
[0011] In a possible implementation of the first aspect, when the shape of the sub-mesh is a triangle, 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 interpolation points with corresponding positions on any two pairs of adjacent edges in the sub-mesh, and determining the points where the interpolation connections intersect as interpolation points inside the sub-mesh.
[0012] Based on the technical solution corresponding to the above implementation, it is possible to determine the interpolation points within a triangular subgrid. This technical solution allows the entire subgrid to be divided into multiple small grids with side lengths close to the voxel side length. Furthermore, the vertex of each small grid can be used as the center point of the outermost voxel of the target object. This also provides data support for the subsequent search for the remaining voxels in the target object and their SDF values.
[0013] In a possible implementation of the first aspect, when the shape of the sub-grid is a parallelogram, after determining the interpolation points inside the sub-grid based on the interpolation points on the edges of the sub-grid, the method further includes: establishing interpolation lines connecting the interpolation points with corresponding positions on two pairs of edges in the sub-grid, and determining the points where the interpolation connections intersect as the interpolation points inside the sub-grid.
[0014] Based on the technical solution corresponding to the above implementation, it is possible to determine the interpolation points within a parallelogram-shaped subgrid. This technical solution allows the entire subgrid to be divided into multiple small grids with side lengths close to the voxel side length. Furthermore, the vertex of each small grid can be used as the center point of the outermost voxel of the target object. This also provides data support for the subsequent search for the remaining voxels in the target object and their SDF values.
[0015] In a possible implementation of the first aspect, subgrids in a three-dimensional grid are interpolated to obtain interpolation points on the subgrids, including: based on a preset number of edge interpolation times, determining a uniformly distributed number of interpolation points on each edge of the subgrid; and based on the interpolation points on the edge of the subgrid, determining the interpolation points inside the subgrid.
[0016] Based on the technical solution corresponding to the above implementation method, the mobile phone can determine the interpolation points on the sub-grid based on the preset number of edge interpolation times, providing initial data support for subsequent voxel searches.
[0017] In a possible implementation of the first aspect, after determining the interpolation points inside the sub-mesh based on the interpolation points on the edge of the sub-mesh, the method further includes: determining the side length of the voxel based on the edge interpolation data of all sub-meshes; the interpolation data of the sub-mesh includes the distance between two adjacent interpolation points on the edge of the sub-mesh.
[0018] Based on the technical solution corresponding to the above implementation, since the side length of the voxel is unknown in this implementation method of determining the interpolation point on the sub-grid based on a preset number of edge interpolation, the electronic device also needs to determine the side length of the voxel based on the edge interpolation data of all sub-grids. Among them, the interpolation data of the sub-grid includes the distance between two adjacent interpolation points on the edge of the sub-grid. After obtaining the distance between two adjacent interpolation points on the edges of all sub-grids, the average of these distances can be determined as the side length of the voxel.
[0019] In a possible implementation of the first aspect, a breadth-first search algorithm is used, with vertices of a submesh and interpolation points on the submesh as starting points, a side length of a voxel as a search step, and a direction perpendicular to the submesh toward the interior of the three-dimensional grid as a search direction, to determine all voxels in the target object and the SDF values of all voxels. The method includes: using the vertices of the submesh and the interpolation points on the submesh as starting points, and in a direction perpendicular to the submesh and toward the interior of the three-dimensional grid, determining a point whose distance from the starting point on the submesh is the side length of the voxel as the center point of a first voxel in the target object, and determining the SDF value of the first voxel as the side length of the voxel.
[0020] Determine the center point of the first voxel corresponding to the starting point as the middle search point;
[0021] Based on all the intermediate search points, a three-dimensional intermediate grid is generated; the three-dimensional intermediate grid includes multiple sub-intermediate grids, each sub-intermediate grid is a polygon composed of multiple intermediate search points, and the number of vertices of all sub-intermediate grids is the same;
[0022] In the direction perpendicular to the sub-intermediate grid and toward the interior of the 3D intermediate grid, the point whose distance from the middle search point on the sub-intermediate grid is the side length of the voxel is determined as the center point of the N+1th voxel in the target object, and the SDF value of the N+1th 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] The intermediate search point is updated using the center point of the N+1th voxel, and a three-dimensional intermediate mesh is generated based on all the intermediate search points.
[0024] Based on the technical solutions corresponding to the above implementations, electronic devices can use a step-by-step search approach to complete the computational process of determining all voxels in a target object and their corresponding SDF values with minimal time complexity. Compared to existing technologies, this significantly reduces the time complexity of calculating the SDF values of spatial points of a three-dimensional object, improving computational efficiency and, in turn, enhancing the user experience.
[0025] In a second aspect, embodiments of the present application further provide a device for determining a signed distance function value, which can be applied to an electronic device. The functions of the device can be implemented by hardware or by executing corresponding software implementations in hardware. The hardware or software includes one or more modules corresponding to the above functions, such as a generation module, an interpolation module, and a processing module.
[0026] Among them, the generation module is used to generate a three-dimensional grid for representing the surface of the target object based on the captured image and depth image of the target object; the three-dimensional grid is composed of multiple sub-grids, and the number of vertices of each sub-grid is the same.
[0027] The interpolation module is used to interpolate the subgrids in the three-dimensional grid generated by the generation module to obtain interpolation points on the subgrids; the interpolation points on the subgrids include interpolation points on the edges of the subgrids and interpolation points inside the subgrids.
[0028] The processing module is used to determine the vertices of the sub-grid generated by the generation module and the interpolation points on the sub-grid obtained by the interpolation module as the center points of the voxels of the outermost layer of voxels in the voxels constituting the target object, and to determine the signed distance function (SDF) values of the voxels corresponding to the vertices of the sub-grid and the interpolation points on the sub-grid to be 0.
[0029] The processing module is also used to use the vertices of the sub-grid generated by the generation module and the interpolation points on the sub-grid obtained by the interpolation module as starting points, the side length of the voxel as the search step, and the vertical direction of the sub-grid toward the inside of the three-dimensional grid as the search direction, and adopt a breadth-first search algorithm to determine all voxels in the target object and the SDF values of all voxels.
[0030] In a third aspect, the present application provides an electronic device comprising a display screen, a memory, and one or more processors; the display screen, the memory, and the processor are coupled; wherein the memory stores computer program code, and the computer program code comprises computer instructions, which, when executed by the processor, enables the electronic device to execute the method for determining the signed distance function value provided in the first aspect and any possible design thereof.
[0031] In a fourth aspect, the present application provides a computer-readable storage medium comprising computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the method for determining the signed distance function value as provided in the first aspect and any possible design thereof.
[0032] In a fifth aspect, the present application provides a computer program product, which, when executed on an electronic device, enables the electronic device to execute the method for determining a signed distance function value as provided in the first aspect and any possible design thereof.
[0033] It can be understood that the beneficial effects that can be achieved by the technical solutions provided in the second to fifth aspects mentioned above can be referred to the beneficial effects in the first aspect and any possible design method thereof, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 A schematic diagram of the physical meaning of the signed distance function provided in an embodiment of the present application;
[0035] Figure 2 A schematic diagram of the principle of a method for determining a signed distance function value provided in an embodiment of the present application;
[0036] Figure 3 A schematic diagram of the hardware architecture of an electronic device provided in an embodiment of the present application;
[0037] Figure 4 A schematic diagram of the software architecture of an electronic device provided in an embodiment of the present application;
[0038] Figure 5 A schematic diagram of the hardware architecture of a server provided in an embodiment of the present application;
[0039] Figure 6 A schematic diagram of a method for determining a signed distance function value provided in an embodiment of the present application Figure 1 ;
[0040] Figure 7 A schematic diagram of point cloud data provided in an embodiment of the present application;
[0041] Figure 8 A schematic diagram of a method for determining a signed distance function value provided in an embodiment of the present application Figure 2 ;
[0042] Figure 9 A schematic diagram of subgrid interpolation provided in an embodiment of the present application;
[0043] Figure 10 A schematic diagram of a method for determining a signed distance function value provided in an embodiment of the present application Figure 3 ;
[0044] Figure 11 A schematic diagram of a search direction provided in an embodiment of the present application;
[0045] Figure 12 A schematic diagram of a method for determining a signed distance function value provided in an embodiment of the present application Figure 4 ;
[0046] Figure 13 A schematic diagram of a method for determining a signed distance function value provided in an embodiment of the present application Figure 5 ;
[0047] Figure 14 A schematic diagram of the structure of a device for determining a signed distance function value provided in an embodiment of the present application. DETAILED DESCRIPTION
[0048] The terms used in the following embodiments of the present application are only for the purpose of describing specific embodiments and are not intended to be limiting of the present application. As used in the specification and appended claims of the present application, the singular expressions "a", "an", "said", "above", "the" and "this" are intended to include 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 an association relationship of associated objects, indicating that three relationships can exist, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.
[0049] References to "embodiments" in this application mean that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute an independent or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described in this application may be combined with other embodiments.
[0050] The terms "first" and "second" in the following embodiments of this application are used for descriptive purposes only and should not be understood as implying or suggesting relative importance or implicitly indicating the number of the technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of this application, unless otherwise specified, "plurality" means two or more.
[0051] First, the nouns involved 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 to define the sign of the distance. Figure 1 As shown, a spatial point is positive inside the region boundary, negative outside, and 0 when it is on the boundary. In three-dimensional computer graphics, SDF is a method of describing the surface of an object. It can provide the distance from the nearest surface to each point in space and give a positive or negative sign depending on whether the point is inside or outside the object.
[0053] Obtaining the SDF values for all points in a 3D object can have the following uses: ① SDF can effectively describe the geometry of complex objects, whether simple or complex. Through SDF, the shape of an object can be captured and represented more accurately. ② SDF can be used to perform collision detection. By calculating the SDF of two objects, the distance between them or their intersection can be quickly detected, which is particularly useful in physics simulation and game development. ③ In computer graphics, SDF can be used to generate voxelized representations or perform voxel rendering. This has a wide range of applications in real-time rendering and simulation.
[0054] (2) Back projection: Back projection is a technique in image processing that is often used to locate specific objects or features in an image. In the process of 3D reconstruction, back projection refers to converting objects in a 2D image into point cloud data in 3D space based on a 2D image and a corresponding depth map. Specifically, it is achieved by converting each pixel value in the depth image (representing the distance from the pixel to the camera) into a coordinate point in 3D space.
[0055] (3) Voxel: Voxel stands for volume pixel, the smallest unit of digital data in three-dimensional space. It is usually considered a cube or similar small volume block. Voxel is the basic element that constitutes a three-dimensional image or three-dimensional object. This concept is similar to the pixel in two-dimensional space, but extended to the three-dimensional domain. A spatial point in a three-dimensional object is the center point of the voxel that constitutes the 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 of 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 like a hierarchical traversal of a tree or a layer-by-layer traversal of a graph.
[0057] (5) Marching Cube (MC) Algorithm: The marching cube algorithm (or marching cubes algorithm) is a computer graphics algorithm used to extract isosurfaces from a three-dimensional discrete data field and generate a three-dimensional mesh model. This algorithm can also be called an isosurface extraction algorithm. This algorithm approximates the isosurface through linear interpolation and represents the surface information in volume data (such as point cloud data) in the form of a triangular mesh.
[0058] Currently, in the volume rendering process, texture information (such as color, brightness, and transparency) of a spatial point in the 3D space occupied by a 3D object is essential. To obtain this texture information, the distance from the spatial point to the 3D object's surface must be known. This distance can be specifically represented by the value of the Signed Distance Function (SDF).
[0059] To determine the SDF value for all spatial points in a 3D object, related techniques generate a 3D mesh representing the object's surface based on the object's point cloud data. This mesh is composed of multiple sub-meshes. Next, the process traverses all voxels in the object and calculates the minimum distance between the center of each voxel and the object's surface. The center point of every two voxels represents a spatial point in the object.
[0060] However, this requires calculating the distance between each voxel and each subgrid, which has a time complexity of O(M*N). Here, M is the number of voxels, and N is the number of subgrids, both of which are positive integers. Assuming that each calculation takes a unit time, calculating the SDF values of all spatial points of a three-dimensional object requires a constant multiple of MN unit time, which is quite long. For larger three-dimensional objects, this takes an extremely long time, resulting in low computational efficiency.
[0061] It can be seen that the time complexity of determining the SDF value of a spatial point in a three-dimensional object in the related art is high, the calculation efficiency is low, and the user experience is not good enough.
[0062] In view of the above problems, the present application provides a method for determining a signed distance function value, which can be applied to electronic devices or servers. Figure 2 As shown, in this method, first, point cloud data corresponding to the three-dimensional object can be generated based on a captured image of the three-dimensional object and a depth image of the three-dimensional object. Then, a three-dimensional mesh representing the surface of the three-dimensional object can be generated based on the point cloud data. This three-dimensional mesh can be composed of multiple sub-meshes. Since the sub-meshes themselves are relatively small polygons, multiple initial center points can be obtained by interpolating the edges and interior of the sub-meshes to obtain each sub-mesh. These multiple initial center points can include the sub-mesh vertices and interpolated points on the sub-mesh edges and interior. Since the sub-meshes are relatively small, the multiple initial center points obtained after interpolation can be considered the center points of multiple voxels on the surface of the three-dimensional object. Finally, a breadth-first search algorithm can be used, using the initial center point of each sub-mesh as the starting point, the voxel side length as the search step, and the vertical direction of the sub-mesh as the search direction, to search all voxels within the three-dimensional object and assign corresponding SDF values.
[0063] It can be seen that by adopting the technical solution provided by this application, after determining the three-dimensional grid that can represent the surface of the three-dimensional object, after interpolating each sub-grid, the SDF values of all spatial points in the three-dimensional object can be determined by searching and assigning values to all voxels in the three-dimensional object. Taking M as the number of voxels and N as the number of sub-grids as an example, the time complexity required for the technical solution provided by this application is O(M+N). It can be seen that the technical solution provided by this application has low time complexity for calculating the SDF values of spatial points of three-dimensional objects and high computational efficiency, thereby improving the user experience.
[0064] The technical solutions provided in the embodiments of the present application are 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 can be a mobile phone, a tablet computer, a handheld computer, a personal computer (PC), an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a personal digital assistant (PDA), an augmented reality (AR) device, a virtual reality (VR) device, an artificial intelligence (AI) device, a wearable device, an in-vehicle device, a smart home device, and / or a smart city device, etc. The embodiments of this application do not impose any special restrictions on the specific type of the electronic device.
[0066] For example, taking the electronic device as a mobile phone, Figure 3 A schematic structural diagram of an electronic device provided in an embodiment of the present 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, an antenna 1, an 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, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a display 193, a subscriber identification module (SIM) card interface 194, and a camera 195. The sensor module 180 may include a pressure sensor, a gyroscope sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a fingerprint sensor, and the like.
[0068] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). The different processing units may be independent devices or integrated into one or more processors.
[0069] The controller can be the nerve center and command center of the electronic device. The controller can generate operation control signals based on the instruction opcode and timing signals to complete the control of instruction fetching and execution.
[0070] Processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 110. If processor 110 needs to use the same instruction or data again, it can directly access the memory. This avoids duplicate accesses, reduces processor 110 latency, and thus improves system efficiency.
[0071] In some embodiments, the processor 110 may include one or more interfaces. The 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.
[0072] The charging management module 140 is used to receive charging input from a power supply device (e.g., a charger, laptop charger, 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 through the USB interface 130. In some wireless charging embodiments, the charging management module 140 can receive wireless charging input through the wireless charging coil of the electronic device.
[0073] While charging the battery 142, the charging management module 140 can also power 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 is used to connect 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 and provides power to the processor 110, the internal memory 121, the display 193, the camera 195, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery voltage, current, battery cycle count, and battery health status (leakage, impedance). In other embodiments, the power management module 141 can also be provided in the processor 110.
[0075] The external memory interface 120 can be used to connect to an external non-volatile memory device to expand the storage capacity of the electronic device. The external non-volatile memory device communicates with the processor 110 via the external memory interface 120 to implement data storage. For example, files such as music and videos can be stored in the external non-volatile memory device.
[0076] The internal memory 121 may include one or more random access memories (RAMs) and one or more non-volatile memories (NVMs). 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 reading and writing by the processor 110.
[0077] A touch sensor, also known as a "touch control device," can be provided on the display screen 193. The touch sensor and the display screen 193 form a touch screen, also known as a "touch screen." The touch sensor is used to detect touch operations applied thereto or in the vicinity thereof. The touch sensor can transmit the detected touch operations to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided via the display screen 193. In other embodiments, the touch sensor can also be provided on the surface of the electronic device, at a location different from that of the display screen 193.
[0078] The ambient light sensor is used to sense ambient light brightness. For example, the ambient light sensor can measure the light intensity of four channels of ambient light. The ambient light sensor outputs the measured light intensities of the four channels of ambient light to processor 110. Processor 110 can process the light intensities of the four channels of ambient light output by the ambient light sensor to obtain the ambient light brightness.
[0079] The pressure sensor is used to sense pressure signals and can convert pressure signals into electrical signals. In some embodiments, the pressure sensor can be set on the display screen 193. There are many types of pressure sensors, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. When a touch operation is applied to the display screen 193, the electronic device monitors the touch operation intensity based on the pressure sensor. The electronic device can also calculate the position of the touch based on the monitoring signal of the pressure sensor. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities can correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than the first pressure threshold acts on the short message application icon, the instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, the instruction to create a new short message is executed.
[0080] In some embodiments, the electronic device may include 1 or N cameras 195, where N is a positive integer greater than 1. In an embodiment of the present application, the type of camera 195 can be distinguished based on the hardware configuration and physical location. For example, the camera provided on the side of the display screen 193 of the electronic device can be called a front camera, and the camera provided on the side of the back cover of the electronic device can be called a rear camera; for another example, a camera with a short focal length and a large field of view can be called a wide-angle camera, and a camera with a long focal length and a small field of view can be called a normal camera. Among them, the length of the focal length and the size of the field of view angle are relative concepts, and there is no specific parameter limitation. Therefore, wide-angle cameras and normal 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 functionality through a GPU, display screen 193, and an application processor. The GPU is a microprocessor for image processing that connects display screen 193 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or modify display information.
[0082] The electronic device can implement a camera function through an ISP, a camera 195, a video codec, a GPU, a display 193, and an application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
[0083] The ISP processes data fed back by camera 195. For example, when taking a photo, 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, which is then passed to the ISP for processing and converted into a visible image. The ISP can also perform algorithmic optimization on image noise and brightness. It can also optimize parameters such as exposure and color temperature of the captured scene. In some embodiments, the ISP can be incorporated into camera 195. Camera 195 is used to capture still images or video.
[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 selects a frequency, the DSP performs a Fourier transform on the frequency energy.
[0085] Display screen 193 is used to display images, videos, and the like. Display screen 193 includes a display panel. The display panel can 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 MiniLED, a MicroLED, a Micro-oLed, or a quantum dot light-emitting diode (QLED). In some embodiments, the electronic device can include one or N display screens 193, where N is a positive integer greater than one.
[0086] In an embodiment of the present application, the display screen 193 can be used to display pages required by the electronic device (for example, a photo taking interface, etc.), and display images taken from any one or more cameras 195 in the interface.
[0087] The wireless communication function of the electronic device can be implemented 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 a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization.
[0089] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to electronic devices. The mobile communication module 150 can receive electromagnetic waves through the antenna 1, filter, amplify, and perform other processing on the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.
[0090] The modem processor may include a modulator and a demodulator. The modulator is used to modulate the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used to demodulate 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 being processed by the baseband processor, the low-frequency baseband signal is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.) or displays an image or video through the display screen 193. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.
[0091] The wireless communication module 160 can provide wireless communication solutions for electronic devices, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc. The wireless communication module 160 can be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, frequency modulate it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0092] SIM card interface 194 is used to connect a SIM card. A SIM card can be connected to and disconnected from the electronic device by inserting or removing it from the SIM card interface 194. An electronic device may support one or more SIM card interfaces. SIM card interface 194 can support Nano SIM cards, Micro SIM cards, and SIM cards. Multiple cards can be inserted into the same SIM card interface 194 simultaneously. SIM card interface 194 is also compatible with external memory cards. Electronic devices interact with the network through SIM cards to implement functions such as call and data communications. Each SIM card corresponds to one user number.
[0093] It is understood that the interface connection relationship between the modules illustrated in the embodiments of the present invention is only a schematic illustration and does not constitute a structural limitation of the electronic device. In other embodiments of the present application, the electronic device may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[0094] Of course, it is understandable that the above Figure 3 The figure is only an example of the electronic device being a mobile phone. If the electronic device is a tablet computer, handheld computer, PC, PDA, wearable device (such as smart watch, smart bracelet) or other device forms, the structure of the electronic device may include more than Figure 3 The structure shown in the figure is less than Figure 3 More structures are shown in the figure, which are not limited here.
[0095] It is understandable that, in general, the realization of electronic device functions requires not only hardware support but also software cooperation. The software system of the electronic device can adopt a layered architecture, event-driven architecture, micro-core architecture, micro-service architecture, or cloud architecture. Taking the system as an example, the software structure of the electronic device is illustrated.
[0096] Figure 4 A schematic diagram of the layered architecture of the software system for an electronic device provided in an embodiment of the present application. The layered architecture divides the software into several layers, each with clear roles and divisions of labor. The layers communicate with each other through software interfaces (e.g., APIs).
[0097] In some examples, reference Figure 4 As shown in the embodiment of the present application, the software of the electronic device is divided into five layers, from top to bottom: the application layer, the framework layer (or called the application framework layer), the system library and the Android runtime (Android runtime), the HAL layer (hardware abstraction layer), and the driver layer (or called the kernel layer). Among them, the system library and the Android runtime can also be called the local framework layer or the native layer.
[0098] The application layer can include a series of applications. Figure 4 As shown, the application layer may include applications (APPs) such as camera, gallery, calendar, map, WLAN, Bluetooth, music, video, short message, call, navigation, news, and instant messaging.
[0099] In some embodiments, a user may obtain a captured image and / or depth image of a three-dimensional object by operating a target application with a camera function in the application layer to take a photo.
[0100] The framework layer provides an application programming interface (API) and programming framework for applications in the application layer. The application framework layer includes some predefined functions or services. For example, the application framework layer may include an activity manager, a window manager, a content provider, an audio service, a view system, a telephony manager, a resource manager, a notification manager, a package manager, and a camera service, etc., but the embodiments of the present application do not impose any restrictions on this.
[0101] The window manager is used to manage window programs. The window manager can obtain the display size, determine whether there is a status bar, lock the screen, take screenshots, etc.
[0102] Content providers are used to store and retrieve data and make it accessible to applications. This data can include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
[0103] The view system includes visual controls, such as those for displaying text and images. The view system is used to build applications. A display interface can consist of one or more views. For example, a display interface containing a text notification icon might include a view for displaying text and a view for displaying images.
[0104] The phone manager is used to provide communication functions for electronic devices. For example, the phone manager can manage the call status of the call application (including initiation, connection, and hang up).
[0105] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.
[0106] The Notification Manager allows applications to display notifications in the status bar. These messages can be displayed briefly and then disappear automatically without user interaction. For example, the Notification Manager is used to notify users of completed downloads and message reminders. The Notification Manager can also display notifications in the top status bar of the system as icons or scrolling text, such as notifications from background applications, or as dialog windows on the screen. Examples include text messages in the status bar, beeps, vibrations on electronic devices, and flashing indicator lights.
[0107] Package Manager in The system 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 the camera service is to provide applications with a unified interface and functionality for accessing and operating camera devices. The camera service acts as a bridge within the framework layer of the software system architecture, encapsulating underlying camera hardware details and providing a unified interface and functionality. This allows applications to easily access, control, capture, and process images.
[0109] System libraries can include multiple functional modules, such as the surface manager, media libraries, OpenGL ES, and SGL. The surface manager manages the display subsystem and provides fusion of 2D and 3D layers for multiple applications. The media library supports playback and recording of various common audio and video formats, as well as still image files. The media library supports a variety of audio and video codecs, such as MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG. OpenGL ES is used for 3D graphics drawing, image rendering, compositing, and layer processing. SGL is a drawing engine for 2D drawing. The Android runtime consists of the core library and the ART virtual machine. The Android runtime is responsible for scheduling and management of the Android system. The core library consists of two parts: one for Java language functions and the other for the Android core library. The application layer and application framework layer run in the ART virtual machine. The ART virtual machine executes Java files from the application layer and application framework layer as binary files. The ART virtual machine is used to perform object life cycle management, stack management, thread management, security and exception management, and garbage collection.
[0110] The HAL layer is an interface layer located between the operating system kernel and the hardware circuit. Its purpose is to abstract the hardware. It hides the hardware interface details of a specific platform and provides a virtual hardware platform for the operating system, making it hardware-independent and portable across multiple platforms. The HAL layer provides a standard interface to display device hardware capabilities to the higher-level Java API framework (i.e., the framework layer). The HAL layer contains multiple library modules, each of which implements an interface for a specific type of hardware component, such as the audio HAL audio module, the bluetooth HAL Bluetooth module, the camera HAL camera module (also known as the camera HAL or camera hardware abstraction module), and the sensors HAL sensor module (or sensor service).
[0111] In the embodiments of the present application, the camera HAL (i.e., the camera module) primarily serves as a link between the upper and lower layers. It provides its own methods (or functions or APIs) to the camera service through the HAL layer's HIDL interface, enabling the camera service to communicate with the underlying driver (i.e., transmitting the camera service's instructions to the camera module so that the camera module operates according to the instructions). In this way, the application layer can call the camera HAL through the camera service to control the camera driver, thereby controlling the camera to take photos.
[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., which are not limited in this application.
[0113] Specifically, the sensor driver may include drivers for each sensor included in the electronic device, such as the ambient light sensor driver. For example, the ambient light sensor driver may respond to an instruction or command from the sensor module to acquire detection data and promptly send the detection data from the ambient light sensor to the sensor module. The camera driver may drive the camera in the electronic device to capture images.
[0114] In an embodiment of the present application, in order to implement the method for determining the signed distance function value provided in the present application, the electronic device may further include an SDF module, which is used to implement the method for determining the signed distance function value. The SDF module can be located in any possible software layer, such as the framework layer or the HAL layer, and this application does not impose specific restrictions on this.
[0115] For example, the server used in the method for determining the signed 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, and this application does not impose any specific restrictions on this.
[0116] For example, Figure 5 A schematic diagram of the structure of a server is shown. Figure 5 As shown, the server includes one or more processors 501, a communication line 502, and at least one communication interface ( Figure 5 The example in which the communication interface 503 and a processor 501 are included is merely exemplary), and a memory 504 may be optionally included.
[0117] The processor 501 can 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] The communication circuit 502 may include a communication bus for communication between different components.
[0119] Communication interface 503 can be a transceiver module for communicating with other devices or communication networks, such as Ethernet, RAN, and wireless local area networks (WLAN). For example, the transceiver module can be a device such as a transceiver or a transceiver. Alternatively, communication interface 503 can be a transceiver circuit located within processor 501, used to implement signal input and output to the processor.
[0120] The memory 504 may be a device having a storage function. For example, it may be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (RAM) or other type of dynamic storage device that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, an optical disc storage (including a compact disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory may exist independently and be connected to the processor via a communication line 502. The memory may also be integrated with the processor.
[0121] The memory 504 is used to store computer-executable instructions for executing the solution of the present application, and the execution is controlled by the processor 501. The processor 501 is used to execute the computer-executable instructions stored in the memory 504, thereby implementing the method for determining the signed distance function value provided in the embodiment of the present application.
[0122] Optionally, the computer-executable instructions in the embodiments of the present application may also be referred to as application code, which is not specifically limited in the embodiments of the present application.
[0123] In a specific implementation, as an embodiment, the processor 501 may include one or more CPUs, such as Figure 5 CPU0 and CPU1 in.
[0124] In a specific implementation, as an embodiment, the server may include multiple processors, such as Figure 51 and 507. Each of these processors may be a single-core processor or a multi-core processor. The processors herein may 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, and other types of 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 an 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 a variety of ways. For example, the output device 505 can be a liquid crystal display (LCD), a light emitting diode (LED) display device, a cathode ray tube (CRT) display device, or a projector. The input device 506 communicates with the processor 501 and can receive user input in a variety of ways. For example, the input device 506 can be a mouse, a keyboard, a touch screen device, or a sensor device.
[0126] The server can be a general-purpose device or a dedicated device. For example, the server can be a desktop computer, a portable computer, a network server, a personal digital assistant (PDA), a mobile phone, a tablet computer, a wireless terminal device, an embedded device, the terminal device, the network device, or a computer with Figure 5 The embodiment of the present application does not limit the type of server.
[0127] The methods in the following embodiments can all be implemented in an electronic device having the above hardware structure and software architecture, or a server having the above hardware structure.
[0128] The following combination Figure 6 As shown, the method for determining the signed distance function value provided in the embodiment of the present application is introduced. Figure 6 A flow chart of a method for determining a signed distance function value provided in an embodiment of the present application. Figure 6 As shown, taking the method applied in an electronic device, where the electronic device is a mobile phone as an example, the method for determining the signed distance function value may include S601-S606:
[0129] S601: The mobile phone obtains a captured image and a depth image of a 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 represent the depth information of the target object in the captured image of the target object. For example, the target object can be any possible three-dimensional object, such as a rabbit, a puppy, a computer, a human body, etc.
[0131] The captured image of the target object may include only the target object or other objects. In the case where the captured image of the target object includes only the target object, the captured image of the target object may also be a semantic segmentation map derived by segmenting an image containing the target object and other objects using a semantic segmentation algorithm. The specific segmentation method can be determined based on actual needs and is not specifically limited in this application.
[0132] In the embodiments of the present application, the image of the target object may be captured by a mobile phone using its own camera, or may be obtained by semantic segmentation of the captured image. The image of the target object may also be received by the mobile phone from any other possible device. The image of the target object may also be downloaded by the mobile phone from the Internet.
[0133] The depth image of the target object can be obtained by the mobile phone through the depth camera when capturing the image of the target object. The depth image of the target object can also be received by the mobile phone when receiving the image of the target object from another device. The depth image of the target object can also be manually generated and input into the mobile phone after manually determining the depth information of the target object when capturing the image of the target object.
[0134] Of course, the method for acquiring the captured image and depth image of the target object can also be any other possible method, and this application does not impose any specific limitation 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 constituting the target object, point cloud data that can discretize and represent the spatial occupancy of the target object can be first generated, that is, 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 the embodiment of the present application, the point cloud data of the target object includes feature data of discrete points that can indicate the shape of the target object in space. For example, taking the target object as a desktop computer, the discrete points finally generated can be as follows: Figure 7 shown.
[0138] The feature data of the discrete points may include the three-dimensional coordinates of the discrete points in three-dimensional space. The coordinate system corresponding to the three-dimensional coordinates may be the camera coordinate system corresponding to the camera that captured the image of the target object. In addition, the feature data may also include any possible information such as color information.
[0139] In one possible implementation, S602 may specifically include: the mobile phone may generate point cloud data of the target object using a back-projection algorithm based on the captured image and depth image of the target object. The back-projection algorithm may be any possible back-projection algorithm, and its specific implementation may be determined based on actual needs, and this application does not impose any specific limitations on this.
[0140] After obtaining the point cloud data of the target object, it is necessary to first determine which points in the point cloud data constitute the surface of the target object. This can be accomplished by generating a three-dimensional mesh based on the point cloud data, i.e., executing S603.
[0141] S603: The mobile phone generates a three-dimensional mesh of the target object based on the point cloud data of the target object.
[0142] The three-dimensional grid is used to represent or serve as the surface of the target object (or referred to as a three-dimensional surface). The three-dimensional grid can be composed of multiple sub-grids, each of which has the same number of vertices. For example, the shape of each sub-grid can be a triangle or a parallelogram. The vertices of each sub-grid in the three-dimensional grid are discrete points in the point cloud data of the target object.
[0143] In practice, the 3D mesh of the target object generated by the mobile phone can 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 may specifically involve the mobile phone generating a three-dimensional mesh of the target object based on the point cloud data of the target object and a preset algorithm. For example, the preset algorithm may be a marching cube (or marching cubes) algorithm. When the preset algorithm is the marching cube algorithm, the three-dimensional mesh of the target object generated by the mobile phone includes sub-meshes that are all triangular in shape.
[0145] After obtaining a three-dimensional grid that can represent the surface of the target object, we can further determine the shortest distance between the center point of the spatial point or voxel that constitutes the target object and the surface of the target object, that is, determine the SDF value of all voxels in the target object. One of the simplest ways is to divide the target object into multiple voxels, calculate the distance between the center point of each voxel and each sub-grid, and take the minimum distance between the center point of a voxel and each sub-grid as the SDF value of the voxel. However, this method requires traversing each voxel while calculating the distance between each voxel and each sub-grid. Taking the number of voxels as M and the number of sub-grids as N as an example, the time complexity generated by this solution is O(M*N). This time complexity is relatively high and the computational efficiency is low.
[0146] To reduce this time complexity, each submesh can be interpolated to determine the interpolation points for each submesh. Since submeshes are relatively small, after interpolation, the distances between adjacent interpolation points and the distances between adjacent interpolation points and submesh vertices approach the voxel side length. Therefore, the interpolation points and vertices of the submesh obtained after interpolation can be considered the center points of the outermost layer of voxels that constitute the target object. Next, using the search step length as the voxel side length, the center points of the remaining voxels can be determined layer by layer within the 3D grid based on the vertices and interpolation points of these submeshes, thereby determining the SDF values for all voxels. In this way, assuming the number of voxels is M and the number of submeshes is N, since each voxel needs to be searched and assigned an SDF value (only the SDF values for the submesh vertices and interpolation points need to be determined), and interpolation is required for each submesh, the time complexity of this solution can be reduced to O(M+N). Compared to O(M*N), this represents a significant reduction.
[0147] Based on this, S604 to S606 are executed after S603.
[0148] Furthermore, in some embodiments, to facilitate calculations, after obtaining the 3D mesh of the target object, the mobile phone may also normalize the coordinates of all vertices of the 3D mesh. For example, the coordinates of all vertices may be scaled by 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 will be determined based on actual needs.
[0149] S604: The mobile phone interpolates the sub-grids in the three-dimensional grid of the target object to obtain interpolation points on the sub-grids.
[0150] The difference points on the sub-grid may include interpolation points on the sub-grid edge and interpolation points inside the sub-grid. The interpolation points inside the sub-grid are obtained based on the interpolation points on the sub-grid edge.
[0151] In some embodiments, taking voxels as cubes as an example, the side lengths of the voxels constituting the target object are pre-set. In this case, the number of interpolation points on the sub-grid edge can be determined based on the size information that can characterize the size of the voxels, and then the interpolation points on the sub-grid can be obtained. Based on this, in a 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 times of the sub-grid based on the preset side length of the voxel and the size information of the sub-grid.
[0153] In some embodiments, the size information of the sub-mesh may include the lengths of each side of the sub-mesh. The mobile phone may specifically determine the number of side interpolations for the sub-mesh based on the side length of the voxel and the lengths of each side of the sub-mesh. The number of side interpolations may be such that each side of the sub-mesh can be divided into line segments having a length equal to or similar to the length of the side of the voxel, equal to the number of side interpolations + 1.
[0154] S802: The mobile phone determines evenly distributed interpolation points on each edge of the sub-grid based on the number of edge interpolation times of the sub-grid.
[0155] For example, taking the shape of a sub-grid as a triangle, refer to Figure 9 As shown in (a), if the lengths of the three sides of the sub-grid are 4, 4 and If the side length of a voxel is 1, the number of edge interpolation can be determined to be 3. In other words, 3 interpolation points can be evenly set on each edge of the sub-grid, that is, the edge can be evenly divided into 4 segments through 3 interpolation points.
[0156] For example, taking the subgrid as a parallelogram, refer to Figure 9 As shown in (b), if the lengths of the four sides of the sub-mesh 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. In other words, two interpolation points can be evenly set on each edge of the sub-mesh, that is, the edge can be evenly divided into three segments by two interpolation points.
[0157] After the interpolation points on the edge of the sub-grid are determined, the interpolation points inside the sub-grid may be determined based on the interpolation points on the edge, ie, S803 is executed.
[0158] S803: The mobile phone determines the interpolation points inside the sub-grid based on the interpolation points on the edge of the sub-grid.
[0159] In some embodiments, if the shape of the sub-grid is a triangle, S6043 may specifically include: the mobile phone establishes interpolation lines connecting interpolation points corresponding to positions on any two pairs of adjacent sides of the sub-grid, and determines the points where the interpolation lines intersect as interpolation points inside the sub-grid. Figure 9 As shown in (a), AB1 and AC1 are interpolation points corresponding to the adjacent edges AB and AC. Similarly, AB2 and AC2, and AB3 and AC3 are also interpolation points corresponding to the adjacent edges AB and AC. BC12 and AC1, BC2 and AC2, and BC3 and AC3 are all interpolation points corresponding to the adjacent edges BC and AC. After establishing the corresponding interpolation lines, we can obtain the interpolation points D, E, and F within the subgrid.
[0160] In other embodiments, if the shape of the sub-grid is a parallelogram, S6043 may specifically include: the mobile phone establishes interpolation lines connecting the interpolation points corresponding to the positions on two pairs of opposite sides of the sub-grid, and determines the points where the interpolation lines intersect as the interpolation points inside the sub-grid. Figure 9 As shown in (b), HI1 and JK1 are interpolation points corresponding to the positions on the HI and JK edges. Similarly, HI2 and JK2 are interpolation points corresponding to the positions on the HI and JK edges. HJ1 and IK1, and HJ1 and IK2 are interpolation points corresponding to the positions on the HJ and IK edges. After establishing the corresponding interpolation lines, we can obtain the interpolation points L, M, N, and O within the subgrid.
[0161] Based on the technical solutions corresponding to S801-S803 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, and then complete the interpolation to obtain the interpolation points on the sub-grid, thereby providing initial data support for subsequent voxel searches.
[0162] In some embodiments, the side lengths of the voxels constituting the target object may not be pre-set. In this case, the number of edge interpolation times on each side of the sub-grid can be pre-set, and then the interpolation of the sub-grid can be completed. 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. The mobile phone determines evenly distributed edge interpolation times interpolation points on each edge of the subgrid based on a preset edge interpolation times.
[0164] The specific implementation of S1001 can refer to the specific implementation of S802 in the above embodiment, and will not be described in detail here.
[0165] S1002: The mobile phone determines interpolation points inside the sub-grid based on the interpolation points on the edge of the sub-grid.
[0166] The specific implementation of S1002 can refer to the specific implementation of S803 in the above embodiment, and will not be described in detail here.
[0167] In addition, since the side length of the voxel is unknown in this implementation, the phone also needs to determine the side length of the voxel based on the edge interpolation data of all sub-grids. The interpolation data of the sub-grid includes the distance between two adjacent interpolation points on the edge of the sub-grid. After obtaining the distance between two adjacent interpolation points on the edge of all sub-grids, the average of these distances can be determined as the side length of the voxel.
[0168] Based on the technical solutions corresponding to S1001 and S1002 above, the mobile phone can determine the interpolation points on the sub-grid based on the preset number of edge interpolation times, providing initial data support for subsequent voxel searches.
[0169] It should be noted that the above process for determining interpolation points for a subgrid is performed for each subgrid in the three-dimensional grid. Specifically, the mobile phone can first randomly select a subgrid and perform the above process to determine the interpolation points on that subgrid. Subsequently, a new subgrid can be selected and the above process can be performed to determine the interpolation points. The above steps are repeated until the difference points on all subgrids are determined.
[0170] S605: The mobile phone determines the vertices of all sub-grids and the interpolation points on the sub-grids as the center points of the outermost layer of voxels among the voxels constituting the target object, and determines the SDF values of the voxels corresponding to the vertices of all sub-grids and the interpolation points on the sub-grids to be 0.
[0171] Since the interpolation points and vertices of the sub-grid obtained after interpolation can be considered as the center points of the outermost layer of voxels among all voxels constituting the target object, according to the definition of the SDF value, the SDF value of the center point of the outermost layer of voxels is 0.
[0172] S606. The mobile phone uses the vertices of the sub-grid and the interpolation points on the sub-grid as the starting point, the side length of the voxel as the search step, and the vertical direction of the sub-grid toward the inside of the three-dimensional grid as the search direction, and 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 shown as follows: Figure 11 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 uses the vertex of the sub-mesh and the interpolation point on the sub-mesh as the starting point, and in the direction perpendicular to the sub-mesh and toward the inside of the three-dimensional grid, determines the point whose distance from the starting point on the sub-mesh is the side length of the voxel as the center point of the first voxel in the target object, and determines the SDF value of the first voxel as the side length of the voxel.
[0176] S6061 is the first search performed by the mobile phone using the breadth-first search algorithm. After S6061 is executed, the mobile phone can find all voxels with an SDF value of 1 among the voxels that constitute the target object. After that, all voxels in the target object can be searched step by step in the same way and the corresponding SDF values can be determined, that is, S6062-S6065 are executed. In addition, since the sub-grids in the three-dimensional grid have been interpolated, when the three-dimensional intermediate grid is subsequently generated, the sub-intermediate grids included therein are themselves very small, so there is no need for interpolation at this time, and the vertex of each sub-intermediate grid can be used as the starting point for the next step of searching for voxels (that is, the subsequent intermediate search point).
[0177] S6062. The mobile phone determines the center point of the first voxel corresponding to the starting point as the middle search point.
[0178] S6063. The mobile phone generates a three-dimensional intermediate grid based on all intermediate search points.
[0179] The three-dimensional intermediate grid includes multiple sub-intermediate grids, each of which is a polygon consisting of multiple intermediate search points, and each sub-intermediate grid has the same number of vertices. For example, each sub-intermediate grid is a triangle or a parallelogram.
[0180] Specifically, the mobile phone may generate the three-dimensional intermediate grid based on all the intermediate search points in any possible manner, for example, by establishing a connection relationship between multiple intermediate search points that are closest to each other, thereby generating the three-dimensional intermediate grid.
[0181] Since the side length of a voxel is inherently small, after determining the first voxel in the target object with an SDF value of 1 and forming a 3D intermediate mesh, the shape of the 3D intermediate mesh is very similar to the shape of the original 3D mesh. Therefore, the same method as in S6061 can be used repeatedly to further determine the voxels in the target object, i.e., executing S6064 and S6035.
[0182] S6064. The mobile phone determines, in a direction perpendicular to the sub-middle grid and toward the interior of the three-dimensional middle grid, a point whose distance from the middle search point on the sub-middle grid is the side length of the voxel as the center point of the N+1th voxel in the target object, and determines the SDF value of the N+1th voxel as N+1 times the side length of the voxel.
[0183] Where N is the number of times the three-dimensional intermediate grid is generated.
[0184] After each execution of S6064, the mobile phone can find all voxels with SDF value N+1 among the voxels that constitute the target object.
[0185] S6065. The mobile phone updates the middle search point using the center point of the (N+1)th voxel.
[0186] Exemplarily, S6065 refers to determining the center point of the (N+1)th voxel as a new intermediate search point, and the previous intermediate search point is no longer an intermediate search point.
[0187] After S6065, execute S6063.
[0188] Furthermore, since the size of the target object does not change, the number of voxels in the target object is necessarily finite. During the loop of steps S6063-S6065, a previously found voxel may be found. Continuing to determine the SDF value according to this logic could result in an incorrect SDF value for that voxel. To prevent duplicate SDF values from being assigned to a voxel, resulting in an incorrect SDF value, during step S6064, the phone also determines whether a point perpendicular to the sub-middle grid and facing the interior of the 3D middle grid, whose distance from the middle search point on the sub-middle grid is equal to the side length of the voxel, is already in a voxel with an existing SDF value. If so, that point is not determined as the center point of the N+1th voxel in the target object, and no SDF value is determined for the voxel to which it belongs. Consequently, during the loop of steps S6063-S6065, it is inevitable that a new center point for the N+1th voxel will not be found at some point, and the loop will terminate. At this point, the corresponding SDF values of all voxels in the target object have been determined, that is, the SDF values of all spatial points in the target object have been determined.
[0189] Based on the technical solutions corresponding to S6061-S6065 above, a stepwise search approach can be used to complete the computational process of determining all voxels in the target object and their corresponding SDF values with low time complexity. Compared to existing technologies, this greatly reduces the time complexity of calculating the SDF values of spatial points of a three-dimensional object, improves computational efficiency, and thus enhances the user experience.
[0190] Of course, the technical solution corresponding to the above S6061-S6065 is only a possible implementation method of S606. The specific implementation of S606 can also be any other possible implementation method, and this application does not make any specific restrictions on this.
[0191] Based on the technical solutions provided in the embodiments of the present application, after determining a three-dimensional grid that can represent the surface of the target object, since the sub-grid itself is a relatively small polygon, multiple initial center points can be obtained in each sub-grid by interpolating the edges and interior of the sub-grid. The multiple initial center points in the sub-grid can include the vertices of the sub-grid and the interpolation points on the edges and interior of the sub-grid. Since the sub-grid itself is relatively small, the multiple initial center points obtained after interpolation can be considered as the center points of the multiple voxels on the surface of the target object. Finally, a breadth-first search algorithm can be used, using the initial center point of each sub-grid as the starting point, the voxel side length as the search step, and the vertical direction of the sub-grid as the search direction, to search all voxels in the target object and assign corresponding SDF values. It can be seen that using the technical solutions provided in the present application, after determining a three-dimensional grid that can represent the surface of the target object and interpolating each sub-grid, the SDF values of all spatial points in the target object can be determined by searching and assigning values to all voxels in the target object. Taking M as the number of voxels and N as the number of subgrids as an example, the time complexity required for the technical solution provided by this application is O(M+N). As can be seen, the technical solution provided by this application has low time complexity for calculating the SDF value of the spatial point of the target object, high computational efficiency, and improved user experience.
[0192] In order to more clearly illustrate the technical solution provided by the embodiment of the present application, the following uses the back projection algorithm to generate point cloud data, predetermines the side length of the voxel, and the shape of the sub-grid of the three-dimensional grid is a triangle as an example. Figure 13 As shown, the method for determining the signed distance function value provided by this application is described. Figure 13 As shown, the entire process of the technical solution provided in the embodiment of the present application is as follows:
[0193] First, obtain the captured image and depth image of the target object. After that, the back-projection algorithm can be used to generate point cloud data based on the captured image and depth image of the target object. Then, a three-dimensional grid that can characterize the surface of the target object can be constructed based on the point cloud data. Furthermore, in order to facilitate calculation, the coordinates of the vertices of each sub-grid in the three-dimensional grid can be normalized. After that, the first triangular sub-grid (which can be simply referred to as a triangle) can be randomly selected, and it can be determined whether it has been interpolated to determine the interpolation point.
[0194] If it is determined that the triangular sub-grid has been interpolated, the next triangular sub-grid may be randomly selected to determine whether to interpolate.
[0195] If it is determined that the triangular sub-mesh has not been interpolated, the number of edge interpolation operations can be determined based on the side length of the voxel. Then, the difference points in the triangular sub-mesh can be determined based on the number of edge interpolation operations. Then, it can be determined whether all triangular sub-meshes have been interpolated.
[0196] If it is determined that all triangular sub-meshes have not been interpolated, the next triangular sub-mesh can be selected to determine whether to interpolate. If it is determined that all triangular sub-meshes have been interpolated, 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 three-dimensional mesh is generated. The specific implementation of searching all voxels and their SDF values here can refer to the relevant description of S606 in the above embodiment.
[0197] Understandably, Figure 13 The specific implementation of each step in the process of the method for determining the signed distance function value shown and the effects that can be achieved are the same as those of the method for determining the signed distance function value provided in the aforementioned embodiment, and will not be repeated here.
[0198] It should be noted that in the method for determining the signed distance function value provided in this application, all operations after obtaining the point cloud data can be performed based on the three-dimensional coordinates of each point in the point cloud data and its derivative data.
[0199] It is understandable that, in order to realize the above functions, the above electronic device includes hardware structures and / or software modules corresponding to the execution of each function. It should be easily appreciated by those skilled in the art that, in combination with the units and algorithm steps of the various examples described in the embodiments disclosed herein, the embodiments of the present invention can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the embodiments of the present application.
[0200] The embodiment of the present application can divide the functional modules of the above-mentioned electronic device according to the above-mentioned method example. For example, each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present invention is schematic and is only a logical function division. There may be other division methods in actual implementation.
[0201] In the case of dividing each functional module into corresponding functional modules, refer to Figure 14As shown, an embodiment of the present application further provides a device for determining a signed distance function value applied in an electronic device, which may include a generation module 141 , an interpolation module 142 and a processing module 143 .
[0202] The generating module 141 is used to generate a three-dimensional grid for representing the surface of the target object based on the captured image and depth image of the target object; the three-dimensional grid is composed of multiple sub-grids, and each sub-grid has the same number of vertices.
[0203] The interpolation module 142 is used to interpolate the subgrids in the three-dimensional grid generated by the generation module 141 to obtain interpolation points on the subgrids; the interpolation points on the subgrids include interpolation points on the edges of the subgrids and interpolation points inside the subgrids.
[0204] The processing module 143 is used to determine the vertices of the sub-grid generated by the generation module 141 and the interpolation points on the sub-grid obtained by the interpolation module 142 as the center points of the voxels of the outermost layer of voxels in the voxels constituting the target object, and determine the signed distance function (SDF) values of the voxels corresponding to the vertices of the sub-grid and the interpolation points on the sub-grid to be 0.
[0205] The processing module 143 is also used to use the vertices of the sub-grid generated by the generation module 141 and the interpolation points on the sub-grid obtained by the interpolation module 142 as starting points, the side length of the voxel as the search step, and the vertical direction of the sub-grid toward the inside of the three-dimensional grid as the search direction, and adopt a breadth-first search algorithm to determine all voxels in the target object and the SDF values of all voxels.
[0206] In addition, the cooperation among the generation module 141 , the interpolation module 142 and the processing module 143 can also implement any step in the method for determining the signed distance function value provided in the aforementioned embodiment, which will not be described in detail here.
[0207] Regarding the apparatus for determining the signed distance function value in the above-mentioned embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method for determining the signed distance function value in the above-mentioned embodiment, and will not be further elaborated here. The relevant beneficial effects thereof can also be referred to the relevant beneficial effects of the method for determining the signed distance function value in the above-mentioned embodiment, and will not be further elaborated here.
[0208] The present application also provides an electronic device, which includes: a memory and one or more processors; the memory is coupled to the processor; wherein the memory stores computer program code, the computer program code includes computer instructions, and when the computer instructions are executed by the processor, the electronic device executes the method for determining the signed distance function value provided in the above embodiment. The specific structure of the electronic device can be referred to Figure 3 The structure of the electronic device shown in .
[0209] An embodiment of the present application further provides a computer-readable storage medium, which includes computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the method for determining the signed distance function value provided in the aforementioned embodiment.
[0210] An embodiment of the present application further provides a computer program product, which includes executable instructions. When the computer program product is run on an electronic device, the electronic device executes the method for determining the signed distance function value provided in the aforementioned embodiment.
[0211] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned 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 devices / equipment and methods can be implemented in other ways. For example, the device / equipment embodiments described above are merely schematic. For example, the division of the modules or units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0213] The units described as separate components may or may not be physically separate, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple places. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0214] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0215] If the integrated unit is implemented in the form of 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 solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0216] The above content is only a specific embodiment of this application, but the scope of protection of this application is not limited to this. Any changes or replacements within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
Claims
1. A method for determining a signed distance function value, characterized in that: Applied to electronic equipment, the method includes: Based on the captured image and depth image of the target object, a three-dimensional mesh is generated for representing the surface of the target object; the three-dimensional mesh is composed of multiple sub-meshes, and each sub-mesh has the same number of vertices; interpolating a subgrid in the three-dimensional grid to obtain interpolation points on the subgrid; the interpolation points on the subgrid include interpolation points on the edge of the subgrid and interpolation points inside the subgrid; Determining the vertices of the sub-grid and the interpolation points on the sub-grid as the center points of the voxels of the outermost layer of voxels constituting the target object, and determining the signed distance function (SDF) values of the voxels corresponding to the vertices of the sub-grid and the interpolation points on the sub-grid to be 0; Taking the vertices of the sub-grid and the interpolation points on the sub-grid as the starting points, the side length of the voxel as the search step, and the vertical direction of the sub-grid toward the inside of the three-dimensional grid as the search direction, a breadth-first search algorithm is adopted to determine all voxels in the target object and the SDF values of all voxels.
2. The method according to claim 1, characterized in that The step of generating a three-dimensional grid for representing the surface of the target object based on the captured image and the depth image of the target object includes: generating point cloud data of the target object based on the captured image and the depth image of the target object; 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, the feature data including three-dimensional coordinates; A three-dimensional mesh of the target object is generated based on the point cloud data of the target object; vertices of sub-meshes 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 interpolating the subgrids in the three-dimensional grid to obtain interpolation points on the subgrids includes: Determining the number of edge interpolation times of the sub-grid based on a preset side length of the voxel and size information of the sub-grid; Based on the edge interpolation times, determining evenly distributed edge interpolation times interpolation points on each edge of the subgrid; Based on the interpolation points on the edge of the sub-grid, an interpolation point inside the sub-grid is determined.
4. The method according to claim 3, characterized in that In a case where the sub-grid is triangular in shape, determining the interpolation points inside the sub-grid based on the interpolation points on the edge of the sub-grid includes: An interpolation line is established for the interpolation points with corresponding positions on any two pairs of adjacent edges in the sub-grid, and the point where the interpolation line intersects is determined as the interpolation point inside the sub-grid.
5. The method according to claim 3, characterized in that In a case where the subgrid is a parallelogram, determining the interpolation points inside the subgrid based on the interpolation points on the sides of the subgrid includes: Interpolation lines connecting interpolation points at corresponding positions on two pairs of opposite sides of the sub-grid are established, and points where the interpolation lines intersect are determined as interpolation points inside the sub-grid.
6. The method according to claim 1 or 2, characterized in that The interpolating the subgrids in the three-dimensional grid to obtain interpolation points on the subgrids includes: Based on a preset edge interpolation number, determining evenly distributed edge interpolation number interpolation points on each edge of the subgrid; Based on the interpolation points on the edge of the sub-grid, an interpolation point inside the sub-grid is determined.
7. The method according to claim 6, characterized in that After determining the interpolation points inside the sub-grid based on the interpolation points on the edge of the sub-grid, the method further includes: The side length of the voxel is determined based on the edge interpolation data of all the sub-grids; the interpolation data of the sub-grid includes the distance between two adjacent interpolation points on the edge of the sub-grid.
8. The method according to any one of claims 1 to 7, characterized in that The method uses the vertices of the sub-grid and the interpolation points on the sub-grid as starting points, the side length of the voxel as the search step, and the vertical direction of the sub-grid toward the interior of the three-dimensional grid as the search direction, and adopts a breadth-first search algorithm to determine all voxels in the target object and the SDF values of all voxels, including: Using the vertex of the sub-grid and the interpolation point on the sub-grid as the starting point, in a direction perpendicular to the sub-grid and toward the interior of the three-dimensional grid, determine a point whose distance from the starting point on the sub-grid is the side length of the voxel as the center point of a first voxel in the target object, and determine the SDF value of the first voxel as the side length of the voxel; Determine the center point of the first voxel corresponding to the starting point as the middle search point; Based on all the intermediate search points, a three-dimensional intermediate grid is generated; the three-dimensional intermediate grid includes a plurality of sub-intermediate grids, each of the sub-intermediate grids is a polygon composed of the plurality of the intermediate search points, and all the sub-intermediate grids have the same number of vertices; In a direction perpendicular to the sub-intermediate grid and toward the interior of the three-dimensional intermediate grid, a point that is a distance from the middle search point on the sub-intermediate grid by the side length of the voxel is determined as the center point of the N+1th voxel in the target object, and an SDF value of the N+1th voxel is determined as N+1 times the side length of the voxel; N is the number of times the three-dimensional intermediate grid is generated; The intermediate search point is updated using the center point of the (N+1)th voxel, and a three-dimensional intermediate grid is generated based on all the intermediate search points.
9. An electronic device, characterized in that: include: A memory and one or more processors; the memory is coupled to the processor; wherein the memory stores a computer program code, the computer program code including computer instructions, which, when executed by the processor, causes the electronic device to execute the method for determining the signed distance function value according to any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that The method comprises computer instructions, which, when executed on an electronic device, enable the electronic device to execute the method for determining a signed distance function value according to any one of claims 1 to 8.
Citation Information
Patent Citations
Grid model reconstruction method, system and device based on two-dimensional image and medium
CN115731365A
Method and device for reconstructing three-dimensional figure model
CN116157842A
Object three-dimensional contour construction method and device, electronic equipment and storage medium
CN116310199A
Three-dimensional model reconstruction method and device, equipment and storage medium
CN117392297A
Shortest path search method and device
US20100131251A1