Encoding method, decoding method, apparatus, and communication device
Patent Information
- Application Number
- CN202210163353.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-18
- Publication Date
- 2026-09-29
- Estimated Expiration
- 2042-02-18
AI Technical Summary
[0003]本申请实施例提供一种编码方法、解码方法、装置及通信设备,能够解决现有几何信息驱动的编码算法编码效率低下的问题
[0027]在本申请实施例中,根据三维网格中相邻三角面片的空间夹角,在第一空间范围内排除了部分顶点,并基于排除后的顶点确定待排序顶点,即减少了待排序顶点的数量,这样,在对目标顶点的排序信息进行编码时,能够进一步减少该编码信息所占用的比特数,进而有效提高编码效率。
Smart Images

Figure CN116668703B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of encoding and decoding technology, specifically relating to an encoding method, decoding method, apparatus, and communication equipment. Background Technology
[0002] 3D mesh encoding algorithms are categorized into connectivity-driven and geometry-driven algorithms based on the dominance and order of encoding geometric information and connectivity relationships. Connectivity-driven algorithms prioritize the compression of connectivity relationships, with geometric information compression following suit. However, this approach alters the vertex order when encoding geometric information, hindering compression. Geometry-driven algorithms, on the other hand, encode geometric information first, followed by connectivity relationships. However, when dealing with a large number of vertices, encoding connectivity relationships requires more bits, resulting in lower encoding efficiency. Summary of the Invention
[0003] This application provides an encoding method, a decoding method, an apparatus, and a communication device that can solve the problem of low encoding efficiency in existing geometry-driven encoding algorithms.
[0004] Firstly, an encoding method is provided, including:
[0005] The encoding end determines the vertices to be sorted within a first spatial range based on the spatial angle between adjacent triangular faces in the three-dimensional mesh. The first spatial range is the spatial range where the target vertex of the triangle to be encoded in the three-dimensional mesh is located, and the vertices to be sorted include the target vertex.
[0006] The encoding end sorts the vertices to be sorted to obtain the sorting information of the target vertices;
[0007] The encoding end obtains the encoding information of the triangle to be encoded based on the encoding information corresponding to the sorting information of the target vertices.
[0008] Secondly, a decoding method is provided, including:
[0009] The decoding end decodes the target bitstream to obtain the decoded information;
[0010] When the decoding information includes the sorting information of the target vertices, the decoding end determines the vertices to be sorted in the first spatial range according to the spatial angle between adjacent triangular faces in the three-dimensional mesh, and sorts the vertices to be sorted. The sorting information is the sequence number of the target vertex among the vertices to be sorted in the first spatial range, and the first spatial range is the spatial range where the target vertex of the triangle to be decoded is located in the three-dimensional mesh.
[0011] The decoding end determines the target vertex of the triangle to be decoded from the vertices to be sorted based on the sorting result of the vertices to be sorted and the sorting information of the target vertex.
[0012] Thirdly, an encoding device is provided, comprising:
[0013] The first determining module is used to determine the vertices to be sorted within a first spatial range based on the spatial angle between adjacent triangular faces in the three-dimensional mesh. The first spatial range is the spatial range where the target vertex of the triangle to be encoded in the three-dimensional mesh is located, and the vertices to be sorted include the target vertex.
[0014] The first acquisition module is used by the encoding end to sort the vertices to be sorted and obtain the sorting information of the target vertices;
[0015] The second acquisition module is used by the encoding end to obtain the encoding information of the triangle to be encoded based on the encoding information corresponding to the sorting information of the target vertices.
[0016] Fourthly, a decoding device is provided, comprising:
[0017] The third acquisition module is used to decode the target bitstream to obtain decoding information;
[0018] The fourth acquisition module is used to, when the decoded information includes the sorting information of the target vertex, determine the vertices to be sorted in a first spatial range based on the spatial angle between adjacent triangular faces in the three-dimensional mesh, and sort the vertices to be sorted. The sorting information is the sequence number of the target vertex among the vertices to be sorted in the first spatial range, and the first spatial range is the spatial range where the target vertex of the triangle to be decoded in the three-dimensional mesh is located.
[0019] The second determining module is used to determine the target vertex of the triangle to be decoded from the vertices to be sorted based on the sorting result of the vertices to be sorted and the sorting information of the target vertex.
[0020] Fifthly, an encoding device is provided, including a processor and a communication interface, wherein the processor is configured to determine vertices to be sorted within a first spatial range based on the spatial angle between adjacent triangular faces in a three-dimensional mesh, wherein the first spatial range is the spatial range where the target vertex of the triangle to be encoded in the three-dimensional mesh is located, and the vertices to be sorted include the target vertex; sort the vertices to be sorted to obtain sorting information of the target vertex; and obtain the encoding information of the triangle to be encoded based on the encoding information corresponding to the sorting information of the target vertex.
[0021] In a sixth aspect, a communication device is provided, the communication device including a processor and a memory, the memory storing a program or instructions executable on the processor, the program or instructions, when executed by the processor, implementing the steps of the method as described in the first or second aspect.
[0022] In a seventh aspect, a decoding device is provided, including a processor and a communication interface, wherein the processor is used to decode a target bitstream to obtain decoded information; when the decoded information includes sorting information of target vertices, vertices to be sorted within a first spatial range are determined according to the spatial angle between adjacent triangular faces in a three-dimensional mesh, and the vertices to be sorted are sorted, wherein the sorting information is the sequence number of the target vertex among the vertices to be sorted within the first spatial range, and the first spatial range is the spatial range in which the target vertex of the triangle to be decoded is located in the three-dimensional mesh; and the target vertex of the triangle to be decoded is determined from the vertices to be sorted based on the sorting result of the vertices to be sorted and the sorting information of the target vertices.
[0023] Eighthly, an encoding / decoding system is provided, comprising: an encoding device and a decoding device, wherein the encoding device is configured to perform the steps of the encoding method as described in the first aspect, and the decoding device is configured to perform the steps of the decoding method as described in the second aspect.
[0024] In a ninth aspect, a readable storage medium is provided, on which a program or instructions are stored, which, when executed by a processor, implement the steps of the method described in the first aspect, or implement the steps of the method described in the second aspect.
[0025] In a tenth aspect, a chip is provided, the chip including a processor and a communication interface coupled to the processor, the processor being configured to run programs or instructions to implement the method as described in the first aspect, or to implement the method as described in the second aspect.
[0026] Eleventhly, a computer program / program product is provided, the computer program / program product being stored in a storage medium, the computer program / program product being executed by at least one processor to implement the steps of the method as described in the first aspect, or to implement the steps of the method as described in the second aspect.
[0027] In this embodiment of the application, based on the spatial angle between adjacent triangular faces in the three-dimensional mesh, some vertices are excluded within a first spatial range, and the vertices to be sorted are determined based on the excluded vertices, thus reducing the number of vertices to be sorted. In this way, when encoding the sorting information of the target vertices, the number of bits occupied by the encoded information can be further reduced, thereby effectively improving the encoding efficiency. Attached Figure Description
[0028] Figure 1 This is a flowchart illustrating the encoding method of an embodiment of this application;
[0029] Figure 2 This is a schematic diagram illustrating the encoding method of an embodiment of this application;
[0030] Figure 3 This is one of the schematic diagrams illustrating the coded connectivity relationship in the embodiments of this application;
[0031] Figure 4 This is the second schematic diagram of the encoding connectivity relationship in the embodiments of this application;
[0032] Figure 5 This is a flowchart illustrating the decoding method according to an embodiment of this application;
[0033] Figure 6 This is a decoding schematic diagram of the decoding method according to an embodiment of this application;
[0034] Figure 7 A schematic diagram of the module of the encoding device according to an embodiment of this application;
[0035] Figure 8 One of the schematic diagrams showing the structure of the encoding device according to an embodiment of this application;
[0036] Figure 9 A second schematic diagram illustrating the structure of the encoding device according to an embodiment of this application;
[0037] Figure 10 A schematic diagram of a decoding device according to an embodiment of this application. Detailed Implementation
[0038] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.
[0039] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such terms can be used interchangeably where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first" and "second" are generally of the same class, not limited in number; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.
[0040] In this application's embodiments, both the encoding device corresponding to the encoding method and the decoding device corresponding to the decoding method can be terminals. These terminals can also be called terminal devices or user equipment (UE). Terminals can be mobile phones, tablet computers, laptop computers, personal digital assistants (PDAs), handheld computers, netbooks, ultra-mobile personal computers (UMPCs), mobile internet devices (MIDs), augmented reality (AR) / virtual reality (VR) devices, robots, wearable devices or vehicle-mounted devices (VUEs), pedestrian terminals (PUEs), and other terminal-side devices. Wearable devices include smartwatches, wristbands, headphones, glasses, etc. It should be noted that this application's embodiments do not limit the specific type of terminal.
[0041] To enable those skilled in the art to better understand the embodiments of this application, the following description is provided first.
[0042] With advancements in 3D mesh modeling and scanning technologies, higher demands have been placed on the precision and detail of 3D graphics, leading to a significant increase in the data volume of original 3D meshes. This presents substantial challenges to the transmission, storage, and computer processing of 3D meshes. Therefore, achieving efficient 3D mesh data compression while maintaining quality is crucial. A 3D mesh is composed of elements at multiple levels, including vertices, edges, and faces. Vertices are the basic elements of a 3D mesh, described using coordinates in 3D space. Edges connect two vertices in the 3D mesh. Faces are polygons formed by closed edges; most faces in 3D meshes are triangular. A 3D mesh primarily contains the following three types of information: 1. Geometric information, which is the coordinates of all vertices in the 3D mesh in 3D space; 2. Connectivity relationships, also known as topological information, used to describe the connection relationships between vertices and faces in the 3D mesh; 3. Other optional attribute information, including other information attached to the 3D mesh, such as color information, normal vectors, and texture coordinates.
[0043] Connectivity relationships are used to describe the connections between vertices in a 3D mesh, affecting the overall shape and local details of the model, and are an important component of 3D meshes.
[0044] The coding method provided in this application will be described in detail below with reference to the accompanying drawings, through some embodiments and application scenarios.
[0045] like Figure 1 As shown, this application provides an encoding method, including:
[0046] Step 101: The encoding end determines the vertices to be sorted within a first spatial range based on the spatial angle between adjacent triangular faces in the three-dimensional mesh. The first spatial range is the spatial range where the target vertex of the triangle to be encoded in the three-dimensional mesh is located, and the vertices to be sorted include the target vertex.
[0047] The encoding method in this application is a geometry-information-driven connectivity relationship encoding method, such as... Figure 2 As shown in the embodiment of this application, the encoding end first encodes the geometric information based on the three-dimensional mesh, then reconstructs the geometric information, uses the reconstructed geometric information to encode the connectivity relationship, and finally outputs the bit stream based on the encoded geometric information and the encoded connectivity relationship information.
[0048] The reconstructed geometry here includes the index information of the vertices in the 3D mesh.
[0049] In this embodiment of the application, the above-mentioned three-dimensional network can be divided into at least one triangular facet, and each triangular facet contains at least one triangle.
[0050] In this step, based on the spatial angle between adjacent triangular faces in the 3D mesh, some vertices within the first spatial range can be filtered out, and the remaining vertices are used as vertices to be sorted.
[0051] Optionally, the first spatial range includes:
[0052] The spatial range between the first sphere and the second sphere;
[0053] Wherein, the first sphere and the second sphere have the same center, the radius of the first sphere and the radius of the second sphere are different, and the center of the sphere is the target position in the first side of the triangle to be encoded, such as the center of the sphere being the midpoint of the first side of the triangle to be encoded.
[0054] Step 102: The encoding end sorts the vertices to be sorted to obtain the sorting information of the target vertices.
[0055] In this step, the vertices to be sorted are sorted according to a preset sorting criterion. For example, the sorting criterion could be based on the distance between the vertex and the midpoint of the first side of the triangle to be encoded, or it could be based on the radius of the circumcircle of the triangle formed by the vertex and the first side. Of course, other criteria can also be used, and no specific limitation is made here.
[0056] Here, by using the spatial angle between adjacent triangular facets, vertices within the first spatial range are further removed, reducing the number of vertices to be sorted. This reduces the bit information used for sorting the target vertices.
[0057] Step 103: The encoding end obtains the encoding information of the triangle to be encoded based on the encoding information corresponding to the sorting information of the target vertices.
[0058] Optionally, the encoding end encodes the sorting information of the target vertices when the target conditions are met, obtaining the encoded information; when the target conditions are not met, it encodes the index of the target vertices, obtaining the aforementioned encoded information. For example, the target conditions are that the number of vertices to be sorted within the first spatial range is less than a preset threshold, and / or, the sorting number of the target vertex is less than a preset value. Since the encoded information corresponding to the sorting information occupies a small number of bits when the number of vertices to be sorted within the first spatial range is small or the sorting number of the target vertex is small, encoding the sorting information of the target vertex can effectively reduce the number of encoding bits. However, when the number of vertices to be sorted is large or the sorting number of the target vertex is large, encoding the index of the target vertex can effectively reduce the number of encoding bits compared to encoding the sorting information.
[0059] In this embodiment of the application, some vertices are excluded within a first spatial range based on the spatial angle between adjacent triangular faces in the three-dimensional mesh, and the vertices to be sorted are determined based on the excluded vertices, which reduces the number of vertices to be sorted. In this way, when encoding the sorting information of the target vertices, the number of bits occupied by the encoded information can be further reduced, thereby effectively improving the encoding efficiency.
[0060] Optionally, before the encoding end determines the first spatial range, it further includes:
[0061] The encoding end selects a first edge from the edge set corresponding to the three-dimensional mesh, wherein the edge set is the set of at least one edge of the encoded triangle in the three-dimensional mesh;
[0062] The encoding end determines the triangle to be encoded based on the first edge and the vertex corresponding to the first edge. The target vertex of the triangle to be encoded is the vertex other than the two vertices connected to the first edge among the vertices corresponding to the first edge. The target vertex can also be described as the opposite vertex of the first edge.
[0063] Optionally, the encoding end determines the vertices to be sorted within a first spatial range based on the spatial angle between adjacent triangular faces in the three-dimensional mesh, including:
[0064] When the triangle to be encoded is a triangle other than the preset category triangle, the encoding end determines the vertices to be sorted within the first spatial range based on the spatial angle between adjacent triangular faces in the three-dimensional mesh.
[0065] Optionally, the preset category triangle includes at least one of the following:
[0066] Triangles whose angle with the coded triangle is less than a preset angle;
[0067] A triangle with two vertices coinciding or three vertices collinear. Specifically, it refers to a triangle in which two vertices coincide or three vertices are collinear.
[0068] Optionally, the method in this application embodiment further includes:
[0069] When the triangle to be encoded is a triangle of the aforementioned preset category, the encoding end obtains the encoding information of the triangle to be encoded based on the encoding information corresponding to the target vertex information of the triangle to be encoded.
[0070] For example, if the triangle to be encoded is a triangle of the preset category, the index of the target vertex of the triangle to be encoded is directly encoded, and the encoding information of the triangle to be encoded is obtained according to the encoding information corresponding to the index of the target vertex.
[0071] In this embodiment of the application, when encoding the vertex index, binary representation can be used directly or encoding algorithms such as Huffman coding can be used. No specific limitation is made on the encoding method here.
[0072] Optionally, after obtaining the encoding information of the triangle to be encoded, the method further includes:
[0073] The encoding end updates the edge set according to a first preset rule;
[0074] The encoding end re-determines the triangles to be encoded based on the updated edge set until all triangles in the three-dimensional mesh have obtained encoding information;
[0075] The first preset rule includes: adding the two sides of the triangle to be encoded, excluding the first side, to the edge set, and removing the first side from the edge set.
[0076] Optionally, the encoding end determines the vertices to be sorted within a first spatial range based on the spatial angle between adjacent triangular faces in the three-dimensional mesh, including:
[0077] The encoding end excludes all vertices of the first target triangle from the vertices within the first spatial range to obtain the remaining vertices;
[0078] The encoding end determines the vertices to be sorted within the first spatial range based on the remaining vertices;
[0079] Wherein, the first target triangle is a triangle whose included angle with an adjacent encoded triangle is less than the included angle threshold, and one side of the first target triangle is the same as the first side of the triangle to be encoded.
[0080] Optionally, the encoding information of the triangle to be encoded may further include the encoding information of the included angle threshold.
[0081] Here, by encoding the included angle threshold, the decoding end can obtain the included angle threshold based on the encoded information, and determine the vertices to be sorted within the first spatial range based on the included angle threshold. In this method, the encoding end can flexibly set the included angle threshold.
[0082] Of course, a fixed included angle threshold can be agreed upon in advance. The encoding and decoding ends determine the vertices to be sorted within the first spatial range based on the pre-agreed included angle threshold, and the encoding end does not need to encode the included angle threshold.
[0083] Optionally, the method in this application embodiment further includes: encoding the target vertex information of the triangle to be encoded within a second spatial range to obtain the encoded information of the triangle to be encoded, wherein the second spatial range is the range in the three-dimensional mesh other than the first spatial range.
[0084] Optionally, the encoding information of the triangle to be encoded may also include the encoding information of the first spatial range.
[0085] For example, the radii of the first and second spheres mentioned above can be encoded, and the first spatial range can be flexibly set in this implementation.
[0086] Of course, the encoding and decoding ends can also pre-determine the size of the first spatial range. In this method, the encoding end does not need to encode the first spatial range.
[0087] In one specific embodiment of this application, the input 3D mesh is divided into one or more slices at the encoding end, and an initial triangle is selected in each slice. The vertex indices of the initial triangle are encoded, and the edges of the initial triangle are placed into a set of edges (i.e., the edge set). An edge in the edge set is selected, and its opposite vertex is determined. The triangle formed by this edge and its opposite vertex is the triangle to be encoded. For example, the edge selected in each iteration can be denoted as τ, its opposite vertex as v, and the adjacent triangles to be encoded are encoded. Figure 3 and Figure 4 As shown, the process of encoding connectivity relationships can specifically include:
[0088] (1) Under the condition of satisfying the preset conditions, the vertex index of the triangle can be directly encoded, or the triangle can be encoded in other ways. The preset conditions may be that the triangle to be encoded belongs to several special triangles, such as a degenerate face (two points coincide or three points are collinear) or the angle between the triangle and the encoded triangle is less than a certain angle, or the preset conditions are that the number of vertices in the first space is greater than the preset number, or the preset conditions are that the target vertex is outside the second space, such as within the second space, or the preset conditions are that the sorting number of the target vertex in the first space is greater than or equal to the preset value. The preset conditions can be flexibly set according to the needs. Add the two edges of the triangle to be encoded except edge τ to the edge set, and remove edge τ from the set. Then, take the other edge of the triangle to be encoded (the edge other than edge τ) from the edge set according to certain criteria, and continue to encode the triangle adjacent to the edge. For example, the access order can be used to select the next edge τ.
[0089] (2) If the above preset conditions are not met, determine the spatial range of vertex v (i.e., the first spatial range mentioned above) and encode the spatial range. Traverse all vertices within the spatial range of the slice, filter out all vertices of the new triangle formed with edge τ that has an angle less than a certain angle with the already encoded adjacent triangle, and encode the angle value.
[0090] The spatial extent can be determined using the geometric properties of adjacent triangular facets, spatial angles, or other criteria. For example, the spatial extent can be defined by taking the midpoint of side τ as the center of a sphere and using the minimum radius R. min and maximum radius R max Combination {R min ,R max The portion between the two concentric spheres is encoded as {R}. min ,R max}Group.
[0091] Optionally, the above angle values can also be encoded.
[0092] (3) Traverse all vertices within the spatial range and sort them according to a certain sorting criterion. For example, the sorting criterion could be the distance from vertex v to the midpoint of edge τ; or the radius of the circumcircle of the triangle formed by vertex v and edge τ. Encode the index of vertex v in the sorting.
[0093] (4) Add the two sides of the newly encoded triangle except for side τ to the edge set, and remove side τ from the edge set. Then, take the other side of the newly encoded triangle from the set according to certain criteria, and continue to encode the triangle adjacent to that side.
[0094] The encoding process is iterated for each patch of the 3D mesh until all triangles in each patch are encoded. If the edge set is empty but there are unencoded triangles, an initial triangle is selected from the remaining unencoded triangles, and the encoding process is repeated.
[0095] In this embodiment of the application, some vertices are excluded within a first spatial range based on the spatial angle between adjacent triangular faces in the three-dimensional mesh, and the vertices to be sorted are determined based on the excluded vertices, which reduces the number of vertices to be sorted. In this way, when encoding the sorting information of the target vertices, the number of bits occupied by the encoded information can be further reduced, thereby effectively improving the encoding efficiency.
[0096] like Figure 5 As shown in the embodiments of this application, a decoding method is also provided, including:
[0097] Step 501: The decoding end performs decoding processing on the target bitstream to obtain the decoding information.
[0098] The target bitstream can be the bitstream obtained by encoding the above-mentioned three-dimensional grid at the encoding end.
[0099] like Figure 6 As shown, when the decoding end performs decoding, it first decodes the geometric information, and then decodes the connectivity relationship based on the geometric information.
[0100] Step 502: When the decoded information includes the sorting information of the target vertex, the decoding end determines the vertices to be sorted in the first spatial range according to the spatial angle between adjacent triangular faces in the three-dimensional mesh, and sorts the vertices to be sorted. The sorting information is the sequence number of the target vertex among the vertices to be sorted in the first spatial range, and the first spatial range is the spatial range where the target vertex of the triangle to be decoded is located in the three-dimensional mesh.
[0101] The vertex information mentioned above can be the index of the vertex.
[0102] In this step, the vertices to be sorted are sorted according to a preset sorting criterion. For example, the sorting criterion could be based on the distance between the vertex and the midpoint of the first side of the triangle to be encoded, or it could be based on the radius of the circumcircle of the triangle formed by the vertex and the first side. Of course, other criteria can also be used, and no specific limitation is made here.
[0103] Step 503: The decoding end determines the target vertex of the triangle to be decoded from the vertices to be sorted based on the sorting result of the vertices to be sorted and the sorting information of the target vertex.
[0104] Here, the sorting information of the target vertex is decoded to obtain the sorting number corresponding to the target vertex. Then, based on the sorting result of the vertices to be sorted, the target vertex is determined from the vertices to be sorted.
[0105] The method in this embodiment involves a decoding end processing a target bitstream to obtain decoded information. If the decoded information includes the sorting information of target vertices, the decoding end determines vertices to be sorted within a first spatial range based on the spatial angle between adjacent triangular faces in the 3D mesh, and sorts these vertices. Based on the sorting result of the vertices to be sorted and the sorting information of the target vertices, the decoding end determines the target vertex of the triangle to be decoded from among the vertices to be sorted. In this embodiment, some vertices are excluded within a first spatial range based on the spatial angle between adjacent triangular faces in the 3D mesh, and the vertices to be sorted are determined based on these excluded vertices, thus reducing the number of vertices to be sorted and effectively improving decoding efficiency.
[0106] Optionally, the method in this application embodiment further includes:
[0107] If the decoding information includes vertex information of the target vertex, then the decoding end determines the target vertex of the triangle to be decoded based on the vertex information.
[0108] The vertex information mentioned above can specifically refer to the vertex index.
[0109] Optionally, the method in this application embodiment further includes:
[0110] Based on the decoding information, the target vertex information of the triangle to be decoded within a second spatial range is obtained, where the second spatial range is the range in the three-dimensional mesh excluding the first spatial range;
[0111] Based on the target vertex information, the target vertex of the triangle to be decoded is determined.
[0112] Optionally, after the decoding end determines the target vertex of the triangle to be decoded, it further includes:
[0113] The decoding end determines the triangle to be decoded based on the target vertex and the first side of the triangle to be decoded;
[0114] Wherein, the first edge is selected by the decoding end from the edge set corresponding to the three-dimensional mesh, and the edge set is the set of at least one edge of the decoded triangle in the three-dimensional mesh.
[0115] Optionally, after the decoding end determines the triangle to be decoded, it further includes:
[0116] The decoding end updates the edge set according to the second preset rule;
[0117] The decoding end re-determines the first side based on the updated edge set, until each triangle in the three-dimensional mesh is determined;
[0118] The second preset rule includes: adding the two sides of the triangle to be decoded, excluding the first side, to the edge set, and removing the first side from the edge set.
[0119] Optionally, the decoding end determines the vertices to be sorted within a first spatial range based on the spatial angle between adjacent triangular faces in the three-dimensional mesh, including:
[0120] The decoding end excludes all vertices of the second target triangle from the vertices within the first spatial range to obtain the remaining vertices;
[0121] The decoding end determines the vertices to be sorted within the first spatial range based on the remaining vertices;
[0122] The second target triangle is a triangle whose included angle with an adjacent decoded triangle is less than the included angle threshold, and one side of the second target triangle is the same as the first side of the triangle to be decoded.
[0123] Optionally, the method in this application embodiment further includes:
[0124] Based on the decoding information, the information of the included angle threshold is obtained.
[0125] Optionally, the first spatial range includes:
[0126] The spatial range between the first sphere and the second sphere;
[0127] Wherein, the first sphere and the second sphere have the same center, the radius of the first sphere and the radius of the second sphere are different, and the center of the sphere is the target position in the first side of the triangle to be decoded.
[0128] Optionally, the method in this application embodiment further includes:
[0129] Based on the decoded information, information about the first spatial range is obtained.
[0130] For example, based on this decoding information, the radius information of the two spheres mentioned above can be obtained.
[0131] In one specific embodiment of this application, geometric information is first decoded at the decoding end, and then connectivity relationships are decoded based on the geometric information. The process of decoding connectivity relationships may specifically include:
[0132] (1) Decode the vertices of the initial triangle and store the edges of the initial triangle in the edge set. Take the edge τ from the edge set according to the criteria used in the encoder. If the codeword to be decoded is a vertex index, directly decode the vertex and use it as the pair vertex v. Form a new decoded triangle with vertex v and edge τ, and add the two edges of the triangle other than edge τ to the edge set. Remove edge τ from the set according to a certain rule, such as removing edge τ according to the criterion of the top of the queue. Take the next edge according to a certain rule and continue decoding the triangle adjacent to the edge. For example, the edge at the top of the queue can be taken as the rule.
[0133] (2) If the codeword to be decoded is not a vertex index, then decode it and determine the spatial range of vertex v. For example, decode the radii {R} of the two concentric spheres at the midpoint of τ. min ,R max}, traverse all vertices within the range of concentric spheres, and filter out all vertices of the new triangle formed by the edge τ and the decoded triangle with an angle smaller than a certain angle.
[0134] (3) For the remaining vertices within the spatial range of vertex v, sort the vertices according to the same sorting criteria as the encoder. Decode the index corresponding to vertex v in the triangle to be decoded, and look up the vertex v in the table to construct the decoding triangle. Add the two edges of the new decoding triangle, excluding edge τ, to the edge set, and remove edge τ from the set according to a certain rule, such as removing edge τ according to the criterion of the top of the queue. Take the next edge according to a certain rule and continue to decode the triangle adjacent to that edge, for example, the edge at the top of the queue can be taken as the rule.
[0135] The decoding process is iterated for each slice's bitstream until all triangles in each slice have been decoded. Finally, the slices are merged into a complete grid.
[0136] The method in this embodiment involves a decoding end processing a target bitstream to obtain decoded information. If the decoded information includes the sorting information of target vertices, the decoding end determines vertices to be sorted within a first spatial range based on the spatial angle between adjacent triangular faces in the 3D mesh, and sorts these vertices. Based on the sorting result of the vertices to be sorted and the sorting information of the target vertices, the decoding end determines the target vertex of the triangle to be decoded from among the vertices to be sorted. In this embodiment, some vertices are excluded within a first spatial range based on the spatial angle between adjacent triangular faces in the 3D mesh, and the vertices to be sorted are determined based on these excluded vertices, thus reducing the number of vertices to be sorted and effectively improving decoding efficiency.
[0137] The encoding method provided in this application can be executed by an encoding device. This application uses an encoding device executing the encoding method as an example to illustrate the encoding device provided in this application.
[0138] like Figure 7 As shown, this application embodiment also provides an encoding device 700, including:
[0139] The first determining module 701 is used to determine the vertices to be sorted in a first spatial range based on the spatial angle between adjacent triangular faces in the three-dimensional mesh. The first spatial range is the spatial range where the target vertex of the triangle to be encoded in the three-dimensional mesh is located, and the vertices to be sorted include the target vertex.
[0140] The first acquisition module 702 is used to sort the vertices to be sorted by the encoding end to obtain the sorting information of the target vertices;
[0141] The second acquisition module 703 is used by the encoding end to obtain the encoding information of the triangle to be encoded based on the encoding information corresponding to the sorting information of the target vertices.
[0142] The apparatus of this application embodiment excludes some vertices within a first spatial range based on the spatial angle between adjacent triangular faces in a three-dimensional mesh, and determines the vertices to be sorted based on the excluded vertices, thereby reducing the number of vertices to be sorted. In this way, when encoding the sorting information of the target vertices, the number of bits occupied by the encoded information can be further reduced, thereby effectively improving the encoding efficiency.
[0143] Optionally, the apparatus in this application embodiment further includes:
[0144] The first selection module is used to select a first edge from the edge set corresponding to the three-dimensional mesh, wherein the edge set is the set of at least one edge of the coded triangle in the three-dimensional mesh;
[0145] The third determining module is used to determine the triangle to be encoded based on the first side and the vertices corresponding to the first side, wherein the target vertices of the triangle to be encoded are the vertices corresponding to the first side excluding the two vertices connected to the first side.
[0146] Optionally, the first determining module is used to determine the vertices to be sorted within a first spatial range based on the spatial angle between adjacent triangular faces in the three-dimensional mesh when the triangle to be encoded is a triangle other than a preset category triangle.
[0147] Optionally, the apparatus in this application embodiment further includes:
[0148] The fifth acquisition module is used to obtain the encoding information of the triangle to be encoded based on the encoding information corresponding to the target vertex information of the triangle to be encoded when the triangle to be encoded is a preset category triangle.
[0149] Optionally, the preset category triangle includes at least one of the following:
[0150] Triangles whose angle with the coded triangle is less than a preset angle;
[0151] A triangle with two vertices coinciding or three vertices collinear.
[0152] Optionally, the apparatus in this application embodiment further includes:
[0153] The first update module is used to update the edge set according to a first preset rule;
[0154] The fourth determining module is used to redetermine the triangles to be encoded based on the updated edge set, until all triangles in the three-dimensional mesh have obtained encoding information;
[0155] The first preset rule includes: adding the two sides of the triangle to be encoded, excluding the first side, to the edge set, and removing the first side from the edge set.
[0156] Optionally, the first determining module includes:
[0157] The first acquisition submodule is used to exclude all vertices of the first target triangle from the vertices within the first spatial range to obtain the remaining vertices;
[0158] The first determining submodule is used to determine the vertices to be sorted within the first spatial range based on the remaining vertices;
[0159] Wherein, the first target triangle is a triangle whose included angle with an adjacent encoded triangle is less than the included angle threshold, and one side of the first target triangle is the same as the first side of the triangle to be encoded.
[0160] Optionally, the encoding information of the triangle to be encoded may further include the encoding information of the included angle threshold.
[0161] Optionally, the apparatus in this application embodiment further includes:
[0162] The sixth acquisition module is used to encode the target vertex information of the triangle to be encoded within the second spatial range to obtain the encoded information of the triangle to be encoded. The second spatial range is the range in the three-dimensional mesh other than the first spatial range.
[0163] Optionally, the first spatial range includes:
[0164] The spatial range between the first sphere and the second sphere;
[0165] Wherein, the first sphere and the second sphere have the same center, the radius of the first sphere and the radius of the second sphere are different, and the center of the sphere is the target position in the first side of the triangle to be encoded.
[0166] Optionally, the encoding information of the triangle to be encoded may also include the encoding information of the first spatial range.
[0167] The apparatus of this application embodiment excludes some vertices within a first spatial range based on the spatial angle between adjacent triangular faces in a three-dimensional mesh, and determines the vertices to be sorted based on the excluded vertices, thereby reducing the number of vertices to be sorted. In this way, when encoding the sorting information of the target vertices, the number of bits occupied by the encoded information can be further reduced, thereby effectively improving the encoding efficiency.
[0168] The encoding device in this application embodiment can be an electronic device, such as an electronic device with an operating system, or a component in an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other devices besides a terminal. Exemplary other devices can be servers, network attached storage (NAS), etc., and this application embodiment does not specifically limit the scope of the device.
[0169] The encoding device provided in this application embodiment can achieve... Figure 1 The various processes implemented in the method embodiments achieve the same technical effect, and will not be described again here to avoid repetition.
[0170] Optional, such as Figure 8 As shown, this application embodiment also provides a communication device, including a processor 801 and a memory 802. The memory 802 stores a program or instructions that can run on the processor 801. When the program or instructions are executed by the processor 801, they implement the various steps of the above-described encoding method embodiment and can achieve the same technical effect. To avoid repetition, they will not be described again here.
[0171] This application embodiment also provides an encoding device, including a processor and a communication interface. The processor is used to determine vertices to be sorted within a first spatial range based on the spatial angle between adjacent triangular facets in a three-dimensional mesh. The first spatial range is the spatial range where the target vertex of the triangle to be encoded in the three-dimensional mesh is located, and the vertices to be sorted include the target vertex. The processor sorts the vertices to be sorted to obtain sorting information of the target vertex. Based on the encoding information corresponding to the sorting information of the target vertex, the processor obtains the encoding information of the triangle to be encoded. This device embodiment corresponds to the above-described encoding method embodiment. All implementation processes and methods of the above-described method embodiment can be applied to this device embodiment and can achieve the same technical effect. Specifically, Figure 9A schematic diagram of the hardware structure of an encoding device for implementing an embodiment of this application.
[0172] The encoding device includes, but is not limited to, at least some of the following components: radio frequency unit 901, network module 902, audio output unit 903, input unit 904, sensor 905, display unit 906, user input unit 907, interface unit 908, memory 909, and processor 910.
[0173] Those skilled in the art will understand that the encoding device may also include a power supply (such as a battery) for supplying power to the various components. The power supply may be logically connected to the processor 910 through a power management system, thereby enabling functions such as managing charging, discharging, and power consumption through the power management system. Figure 9 The device structure shown does not constitute a limitation on the device. The device may include more or fewer components than shown, or combine certain components, or have different component arrangements, which will not be elaborated here.
[0174] It should be understood that, in this embodiment, the input unit 904 may include a graphics processing unit (GPU) 9041 and a microphone 9042. The GPU 9041 processes image data of still images or videos obtained by an image capture device (such as a camera) in video capture mode or image capture mode. The display unit 906 may include a display panel 9061, which may be configured in the form of a liquid crystal display, an organic light-emitting diode, or the like. The user input unit 907 includes at least one of a touch panel 9071 and other input devices 9072. The touch panel 9071 is also called a touch screen. The touch panel 9071 may include a touch detection device and a touch controller. Other input devices 9072 may include, but are not limited to, physical keyboards, function keys (such as volume control buttons, power buttons, etc.), trackballs, mice, and joysticks, which will not be described in detail here.
[0175] In this embodiment, after receiving downlink data from the network-side device, the radio frequency unit 901 can transmit it to the processor 910 for processing; in addition, the radio frequency unit 901 can send uplink data to the network-side device. Typically, the radio frequency unit 901 includes, but is not limited to, antennas, amplifiers, transceivers, couplers, low-noise amplifiers, duplexers, etc.
[0176] The memory 909 can be used to store software programs or instructions, as well as various data. The memory 909 may primarily include a first storage area for storing programs or instructions and a second storage area for storing data. The first storage area may store the operating system, application programs or instructions required for at least one function (such as sound playback, image playback, etc.). Furthermore, the memory 909 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus RAM (DRRAM). The memory 909 in the embodiments of this application includes, but is not limited to, these and any other suitable types of memory.
[0177] Processor 910 may include one or more processing units; optionally, processor 910 integrates an application processor and a modem processor, wherein the application processor mainly handles operations involving the operating system, user interface, and applications, and the modem processor mainly handles wireless communication signals, such as a baseband processor. It is understood that the aforementioned modem processor may also not be integrated into processor 910.
[0178] The processor 910 is configured to determine, based on the spatial angle between adjacent triangular faces in the three-dimensional mesh, vertices to be sorted within a first spatial range, wherein the first spatial range is the spatial range where the target vertex of the triangle to be encoded in the three-dimensional mesh is located, and the vertices to be sorted include the target vertex; sort the vertices to be sorted to obtain the sorting information of the target vertex; and obtain the encoding information of the triangle to be encoded based on the encoding information corresponding to the sorting information of the target vertex.
[0179] Optionally, the processor 910 is further configured to:
[0180] Select the first edge from the edge set corresponding to the three-dimensional mesh, wherein the edge set is the set of at least one edge of the coded triangle in the three-dimensional mesh;
[0181] Based on the first side and the vertices corresponding to the first side, a triangle to be encoded is determined, wherein the target vertices of the triangle to be encoded are the vertices corresponding to the first side excluding the two vertices connected to the first side.
[0182] Optionally, the processor 910 is further configured to:
[0183] When the triangle to be encoded is a triangle other than the preset category triangle, the vertices to be sorted within the first spatial range are determined based on the spatial angle between adjacent triangular faces in the 3D mesh.
[0184] Optionally, the processor 910 is further configured to:
[0185] When the triangle to be encoded is a preset category triangle, the encoding information of the triangle to be encoded is obtained according to the encoding information corresponding to the target vertex information of the triangle to be encoded.
[0186] Optionally, the preset category triangle includes at least one of the following:
[0187] Triangles whose angle with the coded triangle is less than a preset angle;
[0188] A triangle with two vertices coinciding or three vertices collinear.
[0189] Optionally, the processor 910 is further configured to:
[0190] The encoding end updates the edge set according to a first preset rule;
[0191] The encoding end re-determines the triangles to be encoded based on the updated edge set until all triangles in the three-dimensional mesh have obtained encoding information;
[0192] The first preset rule includes: adding the two sides of the triangle to be encoded, excluding the first side, to the edge set, and removing the first side from the edge set.
[0193] Optionally, the processor 910 is further configured to:
[0194] The encoding end excludes all vertices of the first target triangle from the vertices within the first spatial range to obtain the remaining vertices;
[0195] The encoding end determines the vertices to be sorted within the first spatial range based on the remaining vertices;
[0196] Wherein, the first target triangle is a triangle whose included angle with an adjacent encoded triangle is less than the included angle threshold, and one side of the first target triangle is the same as the first side of the triangle to be encoded.
[0197] Optionally, the encoding information of the triangle also includes the encoding information of the included angle threshold.
[0198] Optionally, the processor 910 is further configured to:
[0199] The target vertex information of the triangle to be encoded within the second spatial range is encoded to obtain the encoded information of the triangle to be encoded. The second spatial range is the range in the three-dimensional mesh other than the first spatial range.
[0200] Optionally, the first spatial range includes:
[0201] The spatial range between the first sphere and the second sphere;
[0202] Wherein, the first sphere and the second sphere have the same center, the radius of the first sphere and the radius of the second sphere are different, and the center of the sphere is the target position in the first side of the triangle to be encoded.
[0203] Optionally, the encoding information of the triangle to be encoded may also include the encoding information of the first spatial range.
[0204] In this embodiment of the application, some vertices are excluded within a first spatial range based on the spatial angle between adjacent triangular faces in the three-dimensional mesh, and the vertices to be sorted are determined based on the excluded vertices, which reduces the number of vertices to be sorted. In this way, when encoding the sorting information of the target vertices, the number of bits occupied by the encoded information can be further reduced, thereby effectively improving the encoding efficiency.
[0205] The decoding method provided in this application can be executed by a decoding device. This application uses an example of a decoding device executing the decoding method to illustrate the decoding device provided in this application.
[0206] like Figure 10 As shown, this application embodiment provides a decoding device 1000, including:
[0207] The third acquisition module 1001 is used to decode the target bitstream to obtain decoding information;
[0208] The fourth acquisition module 1002 is used to, when the decoded information includes the sorting information of the target vertex, determine the vertices to be sorted in a first spatial range based on the spatial angle between adjacent triangular faces in the three-dimensional mesh, and sort the vertices to be sorted, wherein the sorting information is the sequence number of the target vertex among the vertices to be sorted in the first spatial range, and the first spatial range is the spatial range in which the target vertex of the triangle to be decoded in the three-dimensional mesh is located.
[0209] The second determining module 1003 is used to determine the target vertex of the triangle to be decoded from the vertices to be sorted based on the sorting result of the vertices to be sorted and the sorting information of the target vertex.
[0210] Optionally, the apparatus in this application embodiment further includes:
[0211] The fifth determining module is used to determine the target vertex of the triangle to be decoded based on the vertex information when the decoded information includes the vertex information of the target vertex.
[0212] Optionally, the apparatus in this application embodiment further includes:
[0213] The seventh acquisition module is used to acquire target vertex information of the triangle to be decoded within a second spatial range based on the decoding information, wherein the second spatial range is the range in the three-dimensional mesh excluding the first spatial range;
[0214] The sixth determining module is used to determine the target vertex of the triangle to be decoded based on the target vertex information.
[0215] Optionally, the apparatus in this application embodiment further includes:
[0216] The seventh determining module is used to determine the triangle to be decoded based on the target vertex and the first side of the triangle to be decoded;
[0217] Wherein, the first edge is selected by the decoding end from the edge set corresponding to the three-dimensional mesh, and the edge set is the set of at least one edge of the decoded triangle in the three-dimensional mesh.
[0218] Optionally, the apparatus in this application embodiment further includes:
[0219] The second update module is used to update the edge set according to the second preset rule;
[0220] The eighth determining module is used to redetermine the first side based on the updated edge set, until each triangle in the three-dimensional mesh is determined;
[0221] The second preset rule includes: adding the two sides of the triangle to be decoded, excluding the first side, to the edge set, and removing the first side from the edge set.
[0222] Optionally, the second determining module includes:
[0223] The second acquisition submodule is used to exclude all vertices of the second target triangle from the vertices within the first spatial range to obtain the remaining vertices;
[0224] The second determining submodule is used to determine the vertices to be sorted within the first spatial range based on the remaining vertices;
[0225] The second target triangle is a triangle whose included angle with an adjacent decoded triangle is less than the included angle threshold, and one side of the second target triangle is the same as the first side of the triangle to be decoded.
[0226] Optionally, the apparatus in this application embodiment further includes:
[0227] The eighth acquisition module is used to acquire the angle threshold information based on the decoded information.
[0228] Optionally, the first spatial range includes:
[0229] The spatial range between the first sphere and the second sphere;
[0230] Wherein, the first sphere and the second sphere have the same center, the radius of the first sphere and the radius of the second sphere are different, and the center of the sphere is the target position in the first side of the triangle to be decoded.
[0231] Optionally, the apparatus in this application embodiment further includes:
[0232] The ninth acquisition module is used to acquire information about the first spatial range based on the decoded information.
[0233] In this embodiment, the target bitstream is decoded to obtain decoded information. If the decoded information includes the sorting information of the target vertices, vertices to be sorted within a first spatial range are determined based on the spatial angle between adjacent triangular faces in the 3D mesh, and these vertices are then sorted. Based on the sorting result of the vertices to be sorted and the sorting information of the target vertices, the target vertex of the triangle to be decoded is determined from among the vertices to be sorted. In this embodiment, some vertices are excluded within the first spatial range based on the spatial angle between adjacent triangular faces in the 3D mesh, and the vertices to be sorted are determined based on these excluded vertices, thus reducing the number of vertices to be sorted and effectively improving decoding efficiency.
[0234] The decoding device provided in this application embodiment can achieve... Figure 5 The various processes implemented in the method embodiments achieve the same technical effect, and will not be described again here to avoid repetition.
[0235] Optionally, embodiments of this application also provide a communication device (its structural schematic can be found in [reference needed]). Figure 8 The method includes a processor 801 and a memory 802. The memory 802 stores a program or instructions that can run on the processor 801. When the program or instructions are executed by the processor 801, they implement the various steps of the above-described decoding method embodiments and achieve the same technical effect. To avoid repetition, they will not be described again here.
[0236] This application embodiment also provides a decoding device, including a processor and a communication interface. The processor is used to decode a target bitstream to obtain decoded information; when the decoded information includes the sorting information of target vertices, the processor determines the vertices to be sorted within a first spatial range based on the spatial angle between adjacent triangular faces in the three-dimensional mesh, and sorts the vertices to be sorted, wherein the sorting information is the sequence number of the target vertex among the vertices to be sorted within the first spatial range, and the first spatial range is the spatial range where the target vertex of the triangle to be decoded is located in the three-dimensional mesh; based on the sorting result of the vertices to be sorted and the sorting information of the target vertices, the processor determines the target vertex of the triangle to be decoded among the vertices to be sorted.
[0237] This application also provides a decoding device, the hardware structure of which can be found in the following embodiment: Figure 9 The decoding device includes, but is not limited to, at least some of the following components: radio frequency unit 901, network module 902, audio output unit 903, input unit 904, sensor 905, display unit 906, user input unit 907, interface unit 908, memory 909, and processor 910.
[0238] Those skilled in the art will understand that the decoding device may also include a power supply (such as a battery) for supplying power to the various components. The power supply may be logically connected to the processor 910 through a power management system, thereby enabling functions such as managing charging, discharging, and power consumption through the power management system. Figure 9 The device structure shown does not constitute a limitation on the device. The device may include more or fewer components than shown, or combine certain components, or have different component arrangements, which will not be elaborated here.
[0239] It should be understood that, in this embodiment, the input unit 904 may include a graphics processing unit (GPU) 9041 and a microphone 9042. The GPU 9041 processes image data of still images or videos obtained by an image capture device (such as a camera) in video capture mode or image capture mode. The display unit 906 may include a display panel 9061, which may be configured in the form of a liquid crystal display, an organic light-emitting diode, or the like. The user input unit 907 includes at least one of a touch panel 9071 and other input devices 9072. The touch panel 9071 is also called a touch screen. The touch panel 9071 may include a touch detection device and a touch controller. Other input devices 9072 may include, but are not limited to, physical keyboards, function keys (such as volume control buttons, power buttons, etc.), trackballs, mice, and joysticks, which will not be described in detail here.
[0240] In this embodiment, after receiving downlink data from the network-side device, the radio frequency unit 901 can transmit it to the processor 910 for processing; in addition, the radio frequency unit 901 can send uplink data to the network-side device. Typically, the radio frequency unit 901 includes, but is not limited to, antennas, amplifiers, transceivers, couplers, low-noise amplifiers, duplexers, etc.
[0241] The memory 909 can be used to store software programs or instructions, as well as various data. The memory 909 may primarily include a first storage area for storing programs or instructions and a second storage area for storing data. The first storage area may store the operating system, application programs or instructions required for at least one function (such as sound playback, image playback, etc.). Furthermore, the memory 909 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus RAM (DRRAM). The memory 909 in the embodiments of this application includes, but is not limited to, these and any other suitable types of memory.
[0242] Processor 910 may include one or more processing units; optionally, processor 910 integrates an application processor and a modem processor, wherein the application processor mainly handles operations involving the operating system, user interface, and applications, and the modem processor mainly handles wireless communication signals, such as a baseband processor. It is understood that the aforementioned modem processor may also not be integrated into processor 910.
[0243] The processor 910 is configured to: determine, based on the spatial angle between adjacent triangular faces in the 3D mesh, vertices to be sorted within a first spatial range when the decoded information includes sorting information of the target vertices; and sort the vertices to be sorted, wherein the sorting information is the sequence number of the target vertex among the vertices to be sorted within the first spatial range, and the first spatial range is the spatial range in the 3D mesh where the target vertex of the triangle to be decoded is located; and determine the target vertex of the triangle to be decoded from the vertices to be sorted based on the sorting result of the vertices to be sorted and the sorting information of the target vertices.
[0244] Optionally, the processor 910 is further configured to:
[0245] If the decoding information includes vertex information of the target vertex, then the decoding end determines the target vertex of the triangle to be decoded based on the vertex information.
[0246] Optionally, the processor 910 is further configured to:
[0247] Based on the decoding information, the target vertex information of the triangle to be decoded within a second spatial range is obtained, where the second spatial range is the range in the three-dimensional mesh excluding the first spatial range;
[0248] Based on the target vertex information, the target vertex of the triangle to be decoded is determined.
[0249] Optionally, the processor 910 is further configured to:
[0250] The decoding end determines the triangle to be decoded based on the target vertex and the first side of the triangle to be decoded;
[0251] Wherein, the first edge is selected by the decoding end from the edge set corresponding to the three-dimensional mesh, and the edge set is the set of at least one edge of the decoded triangle in the three-dimensional mesh.
[0252] Optionally, the processor 910 is further configured to:
[0253] The decoding end updates the edge set according to the second preset rule;
[0254] The decoding end re-determines the first side based on the updated edge set, until each triangle in the three-dimensional mesh is determined;
[0255] The second preset rule includes: adding the two sides of the triangle to be decoded, excluding the first side, to the edge set, and removing the first side from the edge set.
[0256] Optionally, the processor 910 is further configured to:
[0257] Exclude all vertices of the second target triangle from the vertices within the first spatial range to obtain the remaining vertices;
[0258] Based on the remaining vertices, determine the vertices to be sorted within the first spatial range;
[0259] The second target triangle is a triangle whose included angle with an adjacent decoded triangle is less than the included angle threshold, and one side of the second target triangle is the same as the first side of the triangle to be decoded.
[0260] Optionally, the processor 910 is further configured to:
[0261] Based on the decoding information, the information of the included angle threshold is obtained.
[0262] Optionally, the first spatial range includes:
[0263] The spatial range between the first sphere and the second sphere;
[0264] Wherein, the first sphere and the second sphere have the same center, the radius of the first sphere and the radius of the second sphere are different, and the center of the sphere is the target position in the first side of the triangle to be decoded.
[0265] Optionally, the processor 910 is further configured to:
[0266] Based on the decoded information, information about the first spatial range is obtained.
[0267] In this embodiment, the target bitstream is decoded to obtain decoded information. If the decoded information includes the sorting information of the target vertices, vertices to be sorted within a first spatial range are determined based on the spatial angle between adjacent triangular faces in the 3D mesh, and these vertices are then sorted. Based on the sorting result of the vertices to be sorted and the sorting information of the target vertices, the target vertex of the triangle to be decoded is determined from among the vertices to be sorted. In this embodiment, some vertices are excluded within the first spatial range based on the spatial angle between adjacent triangular faces in the 3D mesh, and the vertices to be sorted are determined based on these excluded vertices, thus reducing the number of vertices to be sorted and effectively improving decoding efficiency.
[0268] This application also provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the various processes of the above-described encoding or decoding method embodiments and achieve the same technical effect. To avoid repetition, these will not be described again here.
[0269] The processor is the processor in the device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.
[0270] This application embodiment also provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement the various processes of the above-described encoding or decoding method embodiments and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0271] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.
[0272] This application also provides a computer program / program product, which is stored in a storage medium and executed by at least one processor to implement the various processes of the above-described encoding or decoding method embodiments, and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0273] This application also provides an encoding / decoding system, including an encoding device or a decoding device, wherein the encoding device can be used to perform the steps of the encoding method described above, and the decoding device can be used to perform the steps of the decoding method described above.
[0274] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
[0275] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0276] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.
Claims
1. An encoding method, characterized in that, include: The encoding end determines the vertices to be sorted within a first spatial range based on the spatial angle between adjacent triangular faces in the three-dimensional mesh. The first spatial range is the spatial range where the target vertex of the triangle to be encoded in the three-dimensional mesh is located, and the vertices to be sorted include the target vertex. The encoding end sorts the vertices to be sorted to obtain the sorting information of the target vertices; The encoding end obtains the encoding information of the triangle to be encoded based on the encoding information corresponding to the sorting information of the target vertices.
2. The method according to claim 1, characterized in that, Before the encoding end determines the first spatial range, it also includes: The encoding end selects a first edge from the edge set corresponding to the three-dimensional mesh, wherein the edge set is the set of at least one edge of the encoded triangle in the three-dimensional mesh; The encoding end determines the triangle to be encoded based on the first side and the vertices corresponding to the first side, wherein the target vertices of the triangle to be encoded are the vertices corresponding to the first side excluding the two vertices connected to the first side.
3. The method according to claim 2, characterized in that, The encoding end determines the vertices to be sorted within a first spatial range based on the spatial angle between adjacent triangular faces in the 3D mesh, including: When the triangle to be encoded is a triangle other than the preset category triangle, the encoding end determines the vertices to be sorted within the first spatial range based on the spatial angle between adjacent triangular faces in the three-dimensional mesh.
4. The method according to claim 2, characterized in that, Also includes: When the triangle to be encoded is a preset category triangle, the encoding end obtains the encoding information of the triangle to be encoded based on the encoding information corresponding to the target vertex information of the triangle to be encoded.
5. The method according to claim 3 or 4, characterized in that, The preset category triangle includes at least one of the following: Triangles whose angle with the coded triangle is less than a preset angle; A triangle with two vertices coinciding or three vertices collinear.
6. The method according to claim 3 or 4, characterized in that, After obtaining the encoding information of the triangle to be encoded, the method further includes: The encoding end updates the edge set according to a first preset rule; The encoding end re-determines the triangles to be encoded based on the updated edge set until all triangles in the three-dimensional mesh have obtained encoding information; The first preset rule includes: adding the two sides of the triangle to be encoded, excluding the first side, to the edge set, and removing the first side from the edge set.
7. The method according to claim 1, characterized in that, The encoding end determines the vertices to be sorted within a first spatial range based on the spatial angle between adjacent triangular faces in the 3D mesh, including: The encoding end excludes all vertices of the first target triangle from the vertices within the first spatial range to obtain the remaining vertices; The encoding end determines the vertices to be sorted within the first spatial range based on the remaining vertices; The first target triangle is a triangle whose included angle with an adjacent encoded triangle is less than an included angle threshold, and one side of the first target triangle is the same as the first side of the triangle to be encoded.
8. The method according to claim 7, characterized in that, The encoding information of the triangle to be encoded also includes the encoding information of the included angle threshold.
9. The method according to claim 1, characterized in that, Also includes: The target vertex information of the triangle to be encoded within the second spatial range is encoded to obtain the encoded information of the triangle to be encoded. The second spatial range is the range in the three-dimensional mesh other than the first spatial range.
10. The method according to claim 1, characterized in that, The first spatial range includes: The spatial range between the first sphere and the second sphere; Wherein, the first sphere and the second sphere have the same center, the radius of the first sphere and the radius of the second sphere are different, and the center of the sphere is the target position in the first side of the triangle to be encoded.
11. The method according to claim 1, characterized in that, The encoding information of the triangle to be encoded also includes the encoding information of the first spatial range.
12. A decoding method, characterized in that, include: The decoding end decodes the target bitstream to obtain the decoded information; When the decoding information includes the sorting information of the target vertices, the decoding end determines the vertices to be sorted in the first spatial range according to the spatial angle between adjacent triangular faces in the three-dimensional mesh, and sorts the vertices to be sorted. The sorting information is the sequence number of the target vertex among the vertices to be sorted in the first spatial range, and the first spatial range is the spatial range where the target vertex of the triangle to be decoded is located in the three-dimensional mesh. The decoding end determines the target vertex of the triangle to be decoded from the vertices to be sorted based on the sorting result of the vertices to be sorted and the sorting information of the target vertex.
13. The method according to claim 12, characterized in that, Also includes: If the decoding information includes vertex information of the target vertex, then the decoding end determines the target vertex of the triangle to be decoded based on the vertex information.
14. The method according to claim 12, characterized in that, Also includes: Based on the decoding information, the target vertex information of the triangle to be decoded within a second spatial range is obtained, where the second spatial range is the range in the three-dimensional mesh excluding the first spatial range; Based on the target vertex information, the target vertex of the triangle to be decoded is determined.
15. The method according to claim 12, 13 or 14, characterized in that, After the decoding end determines the target vertex of the triangle to be decoded, it also includes: The decoding end determines the triangle to be decoded based on the target vertex and the first side of the triangle to be decoded; Wherein, the first edge is selected by the decoding end from the edge set corresponding to the three-dimensional mesh, and the edge set is the set of at least one edge of the decoded triangle in the three-dimensional mesh.
16. The method according to claim 15, characterized in that, After the decoding end determines the triangle to be decoded, it also includes: The decoding end updates the edge set according to the second preset rule; The decoding end re-determines the first side based on the updated edge set, until each triangle in the three-dimensional mesh is determined; The second preset rule includes: adding the two sides of the triangle to be decoded, excluding the first side, to the edge set, and removing the first side from the edge set.
17. The method according to claim 12, characterized in that, The decoding end determines the vertices to be sorted within a first spatial range based on the spatial angle between adjacent triangular faces in the 3D mesh, including: The decoding end excludes all vertices of the second target triangle from the vertices within the first spatial range to obtain the remaining vertices; The decoding end determines the vertices to be sorted within the first spatial range based on the remaining vertices; The second target triangle is a triangle whose included angle with an adjacent decoded triangle is less than an included angle threshold, and one side of the second target triangle is the same as the first side of the triangle to be decoded.
18. The method according to claim 17, characterized in that, Also includes: Based on the decoding information, the information of the included angle threshold is obtained.
19. The method according to claim 12, characterized in that, The first spatial range includes: The spatial range between the first sphere and the second sphere; Wherein, the first sphere and the second sphere have the same center, the radius of the first sphere and the radius of the second sphere are different, and the center of the sphere is the target position in the first side of the triangle to be decoded.
20. The method according to claim 12 or 19, characterized in that, Also includes: Based on the decoded information, information about the first spatial range is obtained.
21. An encoding device, characterized in that, include: The first determining module is used to determine the vertices to be sorted within a first spatial range based on the spatial angle between adjacent triangular faces in the three-dimensional mesh. The first spatial range is the spatial range where the target vertex of the triangle to be encoded in the three-dimensional mesh is located, and the vertices to be sorted include the target vertex. The first acquisition module is used to sort the vertices to be sorted to obtain the sorting information of the target vertices; The second acquisition module is used to obtain the encoding information of the triangle to be encoded based on the encoding information corresponding to the sorting information of the target vertices.
22. A decoding device, characterized in that, include: The third acquisition module is used to decode the target bitstream to obtain decoding information; The fourth acquisition module is used to determine the vertices to be sorted in a first spatial range based on the spatial angle between adjacent triangular faces in the three-dimensional mesh when the decoded information includes the sorting information of the target vertices, and to sort the vertices to be sorted. The sorting information is the sequence number of the target vertex among the vertices to be sorted in the first spatial range, and the first spatial range is the spatial range in which the target vertex of the triangle to be decoded in the three-dimensional mesh is located. The second determining module is used to determine the target vertex of the triangle to be decoded from the vertices to be sorted based on the sorting result of the vertices to be sorted and the sorting information of the target vertex.
23. A communication device, characterized in that, It includes a processor and a memory, the memory storing a program or instructions that can run on the processor, the program or instructions being executed by the processor to implement the steps of the encoding method as described in any one of claims 1 to 11, or to implement the steps of the decoding method as described in any one of claims 12 to 20.
Citation Information
Patent Citations
One-dimensional nondestructive geometric compressing method of three-dimensional grid model
CN101354788A