Point cloud encoding method, decoding method, device and electronic equipment
By predicting the occupancy information of the node to be encoded based on the occupancy information of the encoded reference node, and using an adaptive probability model for entropy encoding, the problem of low encoding efficiency in the prior art is solved, and efficient geometric compression of point cloud encoding is achieved.
Patent Information
- Application Number
- CN202111466682.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-03
- Publication Date
- 2026-02-06
- Estimated Expiration
- 2041-12-03
AI Technical Summary
In existing technologies, the coding methods of sparse point cloud sequences and dense point cloud sequences are used to encode point cloud sequences with a large number of planar features, resulting in low coding efficiency.
The encoding end predicts the occupancy information of the node to be encoded based on the occupancy information of the already encoded reference node, determines the context of the child node to be encoded by dividing the tree structure, and uses an adaptive probability model to perform entropy encoding to generate the target bitstream.
It improves the efficiency of point cloud encoding and enhances geometric compression performance.
Smart Images

Figure CN116233435B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of coding, and particularly relates to a point cloud encoding method, a decoding method, a device and electronic equipment. BACKGROUND
[0002] In a point cloud Audio Video coding Standard (AVS) encoder framework, the geometry information of a point cloud and the attribute information corresponding to each point are encoded separately. Currently, the encoding of a space occupancy code adopts a context-based adaptive binary arithmetic encoder, and different context models are used to encode a sparse point cloud sequence and a dense point cloud sequence respectively. However, for a point cloud sequence with a large number of planar features, the point cloud sequence has unoccupied spaces, and if the encoding is still performed in the manner of the sparse point cloud sequence and the dense point cloud sequence, the encoding efficiency is low. SUMMARY
[0003] Embodiments of the present application provide a point cloud encoding method, a decoding method, a device and electronic equipment, which can solve the problem of low encoding efficiency in the related art.
[0004] In a first aspect, a point cloud encoding method is provided, comprising:
[0005] An encoding end obtains a to-be-encoded node in a point cloud sequence and m reference nodes in the point cloud sequence that have been encoded, m being a positive integer;
[0006] The encoding end predicts occupancy information of the to-be-encoded node based on occupancy information of the m reference nodes, and determines a prediction result of the to-be-encoded node;
[0007] The encoding end determines a context of a to-be-encoded sub-node based on the prediction result and a position of the to-be-encoded sub-node in the to-be-encoded node, the to-be-encoded sub-node being any one sub-node of the to-be-encoded node divided based on a structure tree;
[0008] The encoding end performs entropy encoding on the to-be-encoded sub-node according to the context, and generates a target code stream.
[0009] In a second aspect, a point cloud decoding method is provided, comprising:
[0010] A decoding end obtains a to-be-decoded node in a point cloud sequence and m reference nodes in the point cloud sequence that have been decoded, m being a positive integer;
[0011] The decoding end predicts occupancy information of the to-be-decoded node based on occupancy information of the m reference nodes, and determines a prediction result of the to-be-decoded node;
[0012] The decoding end determines a context of the to-be-decoded sub-node based on the prediction result and a position of the to-be-decoded sub-node in the to-be-decoded node, the to-be-decoded sub-node being any one sub-node obtained by dividing the to-be-decoded node based on a structure tree;
[0013] The decoding end entropy-decodes the to-be-decoded sub-node according to the context, to generate a target code stream.
[0014] In a third aspect, a point cloud encoding apparatus is provided, comprising:
[0015] A first obtaining module is configured to obtain a to-be-encoded node in a point cloud sequence and m reference nodes in the point cloud sequence that have been encoded, m being a positive integer;
[0016] A first prediction module is configured to predict occupancy information of the to-be-encoded node based on occupancy information of the m reference nodes, to determine a prediction result of the to-be-encoded node;
[0017] A first determining module is configured to determine a context of a to-be-encoded sub-node based on the prediction result and a position of the to-be-encoded sub-node in the to-be-encoded node, the to-be-encoded sub-node being any one sub-node obtained by dividing the to-be-encoded node based on a structure tree;
[0018] An encoding module is configured to entropy-encode the to-be-encoded sub-node according to the context, to generate a target code stream.
[0019] In a fourth aspect, a point cloud decoding apparatus is provided, comprising:
[0020] A second obtaining module is configured to obtain a to-be-decoded node in a point cloud sequence and m reference nodes in the point cloud sequence that have been decoded, m being a positive integer;
[0021] A second prediction module is configured to predict occupancy information of the to-be-decoded node based on occupancy information of the m reference nodes, to determine a prediction result of the to-be-decoded node;
[0022] A second determining module is configured to determine a context of a to-be-decoded sub-node based on the prediction result and a position of the to-be-decoded sub-node in the to-be-decoded node, the to-be-decoded sub-node being any one sub-node obtained by dividing the to-be-decoded node based on a structure tree;
[0023] A decoding module is configured to entropy-decode the to-be-decoded sub-node according to the context, to generate a target code stream.
[0024] In a fifth aspect, an electronic device is provided, which includes a processor and a memory, the memory storing programs or instructions executable on the processor, the programs or instructions being executed by the processor to implement the steps of the point cloud encoding method according to the first aspect, or to implement the steps of the point cloud decoding method according to the second aspect.
[0025] In a sixth aspect, a readable storage medium is provided, which stores programs or instructions executable by a processor to implement the steps of the point cloud encoding method according to the first aspect, or to implement the steps of the point cloud decoding method according to the second aspect.
[0026] In a seventh aspect, a chip is provided, which includes a processor and a communication interface, the communication interface being coupled to the processor, the processor being configured to execute programs or instructions to implement the method according to the first aspect, or to implement the method according to the second aspect.
[0027] In an eighth aspect, a computer program / program product is provided, which is stored in a storage medium, and is executed by at least one processor to implement the method according to the first aspect, or to implement the method according to the second aspect.
[0028] In the embodiments of the present application, the encoding end can predict the occupancy information of a to-be-encoded node based on the occupancy information of an already-encoded reference node, and determine the context of a to-be-encoded sub-node based on the prediction result of the to-be-encoded node and the position of the to-be-encoded sub-node in the to-be-encoded node, so that the occupancy information of the already-encoded node in the point cloud sequence can be better utilized, the geometric compression performance of the point cloud can be improved, and the encoding efficiency of the encoding end can be improved. BRIEF DESCRIPTION OF DRAWINGS
[0029] Figure 1 is an AVS codec framework diagram;
[0030] Figure 2 is a flowchart of a point cloud encoding method provided by the embodiments of the present application;
[0031] Figure 3a is a schematic diagram of a to-be-encoded node and a reference node in a point cloud sequence;
[0032] Figure 3b is a schematic diagram of a node in a point cloud sequence;
[0033] Figure 4a is a schematic diagram of a to-be-encoded sub-node and a neighbor sub-node in a point cloud sequence;
[0034] Figure 4b is a schematic diagram of a to-be-encoded node and a neighbor node in a point cloud sequence;
[0035] Figure 5a is one of the schematic diagrams of the to-be-encoded node, the to-be-encoded sub-node and the neighbor node in the point cloud sequence;
[0036] Figure 5b is the second schematic diagram of the to-be-encoded node, the to-be-encoded sub-node and the neighbor sub-node in the point cloud sequence;
[0037] Figure 6 is a flowchart of a point cloud decoding method provided by an embodiment of the present application;
[0038] Figure 7 is a structural diagram of a point cloud encoding device provided by an embodiment of the present application;
[0039] Figure 8 is a structural diagram of a point cloud decoding device provided by an embodiment of the present application;
[0040] Figure 9 is a structural diagram of an electronic device provided by an embodiment of the present application;
[0041] Figure 10 is a structural diagram of a terminal provided by an embodiment of the present application. DETAILED DESCRIPTION
[0042] The technical solutions in the embodiments of the present application will be clearly described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art belong to the scope of protection of the present application.
[0043] The terms "first", "second", and the like in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than that illustrated or described herein, and the objects distinguished by "first", "second" are generally a category, not limited to the number of objects, for example, the first object can be one or more. In addition, "and / or" in the specification and claims means at least one of the connected objects, and the character " / " generally represents an "or" relationship between the front and rear associated objects.
[0044] In order to better understand the technical solutions of the present application, the related technologies involved in the technical solutions of the present application are briefly described as follows.
[0045] Please refer to Figure 1 , Figure 1The diagram shows the AVS codec framework. In the point cloud AVS encoder framework, the geometric information of the point cloud and the attribute information corresponding to each point are encoded separately. First, the point cloud is preprocessed: a minimum rectangular prism containing all points in the input point cloud is constructed, called the bounding box. The origin coordinates of the bounding box are composed of the minimum values of the coordinates of each point in the point cloud in the x, y, and z dimensions. Next, coordinate transformation is performed on the points in the point cloud (i.e.,... Figure 1 (Coordinate translation shown in the diagram): Using the origin as a reference, the original coordinates of the points are transformed into relative coordinates relative to the origin. Then, the geometric coordinates of the points are quantized; this quantization step mainly serves a scaling function. Due to quantization rounding, some points have identical geometric information; parameters determine whether to remove these points with duplicate geometric information. Next, the preprocessed point cloud is partitioned into a structured tree (e.g., octree, quadtree, binary tree) according to breadth-first traversal order: using... Figure 1 Taking the octree partitioning shown as an example, the preprocessed bounding box is used as the root node. It is divided into eight equal parts, generating eight sub-cubes as its child nodes. Eight bits are used to represent the occupancy information (or placeholder information) of each child node, called the space occupancy code. If a sub-cube contains a point, it indicates that the child node is occupied, and the corresponding occupancy bit is set to 1; otherwise, it is set to 0. The partitioning of occupied sub-cubes continues until the resulting leaf nodes are 1x1x1 unit cubes, at which point the partitioning stops, completing the geometric octree encoding. During octree encoding, entropy encoding is performed on the generated space occupancy code and the number of points contained in the final leaf nodes to obtain the output bitstream. In the octree-based geometric decoding process, the decoder follows a breadth-first traversal order, continuously parsing the occupancy code of each node and sequentially partitioning the nodes until a 1x1x1 unit cube is obtained. The number of points contained in each leaf node is then parsed, ultimately restoring the geometrically reconstructed point cloud information.
[0046] After the geometry coding is completed, the geometry information is reconstructed. At present, the attribute coding is mainly aimed at attribute information such as color and reflectivity information. First, it is judged whether color space conversion is performed. If color space conversion is performed, the color information is converted from the RGB color space to the YUV color space. Then, the original point cloud is used to recolor the reconstructed point cloud, so that the unencoded attribute information corresponds to the reconstructed geometry information. In the color information coding, there are two modules: attribute prediction and attribute transformation. The attribute prediction process is as follows: first, the point cloud is reordered, and then difference prediction is performed. The method of reordering is Hilbert reordering. The reordered point cloud is predicted by using the difference method, and finally the prediction residual is quantized and entropy coded to generate a binary code stream. The attribute transformation process is as follows: first, the wavelet transform is performed on the point cloud attribute, and the transform coefficients are quantized; second, the attribute reconstruction value is obtained by inverse quantization and inverse wavelet transform; then, the attribute residual is calculated by calculating the difference between the original attribute and the attribute reconstruction value, and the attribute residual is quantized; finally, the quantized transform coefficients and the attribute residual are entropy coded to generate a binary code stream.
[0047] The point cloud coding method provided by the embodiments of the present application will be described in detail below in combination with the drawings and some embodiments and application scenarios.
[0048] Please refer to Figure 2 , Figure 2 is a flowchart of a point cloud coding method provided by the embodiments of the present application. As Figure 2 shown, the method comprises the following steps:
[0049] Step 201: The encoding end obtains a to-be-coded node in a point cloud sequence and m reference nodes in the point cloud sequence which have been coded.
[0050] Wherein, m is a positive integer. The encoding end can be, for example, a mobile phone, a tablet computer, a computer or the like, and the present application does not make specific limitation thereto.
[0051] It should be noted that the encoding end can sequentially code the nodes in the point cloud sequence according to a preset coding order, and the to-be-coded node can be the first unencoded node in the unencoded nodes of the point cloud sequence arranged in the preset coding order. Wherein, the reference node is an encoded node in the point cloud sequence, for example, the reference node can also be any one of the encoded nodes, or the reference node can be any one of the encoded nodes belonging to the same node division level as the to-be-coded node, or the reference node can also be the adjacent encoded node of the to-be-coded node.
[0052] The node division level refers to a node level obtained after a node is divided based on a structure tree (for example, a binary tree, a quadtree, an octree, or the like). For example, node 1 is divided based on a binary tree to obtain node 11 and node 12, node 11 is divided based on a binary tree to obtain node 111 and node 112, and node 12 is divided based on a binary tree to obtain node 121 and node 122. Node 11 and node 12 belong to the same node division level, and node 111, node 112, node 121, and node 122 belong to the same node division level.
[0053] In step 202, the encoding end predicts the occupancy information of the to-be-encoded node based on the occupancy information of the m reference nodes, and determines a prediction result of the to-be-encoded node.
[0054] The occupancy information of a node refers to occupancy of each child node of the node based on a structure tree division. The occupancy includes being occupied or not being occupied. The occupancy information of the reference node can refer to occupancy of each child node of the reference node. For example, a reference node is divided based on a binary tree to obtain child node 1 and child node 2. The occupancy information of the reference node can be represented as child node 1 being occupied and child node 2 not being occupied. Alternatively, the occupancy information of the reference node can refer to a number of occupied child nodes and a number of unoccupied child nodes in the reference node. For example, a reference node is divided based on an octree to obtain eight child nodes. The occupancy information of the reference node can be represented as the number of occupied child nodes being 3 and the number of unoccupied child nodes being 5. Alternatively, the occupancy information of the reference node can refer to occupancy of each child node in a preset region. For example, a reference node is divided based on an octree to obtain eight child nodes. The occupancy information of the reference node can be represented as occupancy in a low plane region and occupancy in a high plane region. The low plane region and the high plane region can be two plane regions of the reference node in a target direction, as shown in FIG. 3. In the z-axis direction of the coordinate system, the child nodes (the child nodes filled in FIG. 3) in the low plane region of the reference node are occupied, and the child nodes (the child nodes not filled in FIG. 3) in the high plane region of the reference node are not occupied. Figure 3a Figure 3a Alternatively, the occupancy information of the reference node can be represented in other manners, which will not be described in detail herein.
[0055] It can be understood that the reference node is a to-be-encoded node in a point cloud sequence, and therefore the occupancy information of the to-be-encoded node can be obtained. In an embodiment of the present application, after the m reference nodes are obtained, the encoding end predicts the occupancy information of the to-be-encoded node based on the occupancy information of the m reference nodes, and then determines a prediction result of the to-be-encoded node.
[0056] For example, refer to Figure 3a ,Figure 3a The middle dashed box represents a node to be encoded, and the solid line box represents a reference node, Figure 3a That is, there are three reference nodes, and the filled part represents the occupied sub-nodes. It is assumed that these nodes are divided into eight sub-nodes based on octree partitioning. In the z-axis direction, the four sub-nodes located below are the sub-nodes of the low plane region, and the four sub-nodes located above are the sub-nodes of the high plane region. If the occupancy information of the reference node is the occupancy situation of the low plane region and the occupancy situation of the high plane region of the reference node, Figure 3a In the three reference nodes, the occupied sub-nodes are located in the low plane region, and the unoccupied sub-nodes are located in the high plane region. Based on the occupancy information of the three reference nodes, it can be predicted that the occupied sub-nodes in the node to be encoded are also likely to be located in the low plane region, so that the prediction result of the occupancy information of the node to be encoded is obtained.
[0057] Step 203, the encoding end determines the context of the to-be-encoded sub-node based on the prediction result and the position of the to-be-encoded sub-node in the node to be encoded. The to-be-encoded sub-node is any one of the sub-nodes obtained by the node to be encoded based on the structure tree partitioning.
[0058] It should be noted that after obtaining the node to be encoded, the encoding end can perform structure tree partitioning on the node to be encoded in a manner such as octree, quadtree, or binary tree. For example, if an already encoded node belonging to the same node division level as the node to be encoded is divided into eight sub-nodes based on octree partitioning, then the node to be encoded is also divided into eight sub-nodes based on octree partitioning. Further, the encoding end encodes each sub-node obtained by the node to be encoded based on a preset encoding order. The to-be-encoded sub-node is any one of the unencoded sub-nodes obtained by the node to be encoded based on the structure tree partitioning.
[0059] In the embodiment of the present application, after predicting the occupancy information of the node to be encoded based on the m reference nodes and obtaining the prediction result of the node to be encoded, the encoding end determines the context of the to-be-encoded sub-node based on the prediction result and the position of the to-be-encoded sub-node in the node to be encoded.
[0060] Step 204, the encoding end entropy encodes the to-be-encoded sub-node according to the context to generate a target code stream.
[0061] Optionally, after determining the context of the to-be-encoded sub-node, the encoding end allocates an adaptive probability model for the to-be-encoded sub-node, and can perform arithmetic encoding, that is, entropy encoding, on the occupancy bit code of the to-be-encoded sub-node based on the adaptive probability model to generate a target code stream, for example, a binary code stream.
[0062] In the embodiments of the present application, the encoding end can predict the occupancy information of a to-be-encoded node based on the occupancy information of the encoded reference nodes, and determine the context of a to-be-encoded sub-node based on the prediction result of the to-be-encoded node and the position of the to-be-encoded sub-node in the to-be-encoded node. In this way, the occupancy information of the encoded nodes in the point cloud sequence can be better utilized, the geometry compression performance of the point cloud can be improved, and the encoding efficiency of the encoding end can be improved.
[0063] Optionally, the step 201 can include:
[0064] The encoding end acquires a to-be-encoded node in a point cloud sequence.
[0065] The encoding end acquires the first k encoded nodes of the to-be-encoded node based on the node encoding order, where k is a positive integer.
[0066] In a case where at least one encoded node of the first k encoded nodes has a target plane feature, the encoding end acquires m encoded reference nodes in the point cloud sequence.
[0067] In the embodiments of the present application, after the encoding end acquires a to-be-encoded node in a point cloud sequence, the encoding end acquires the first k encoded nodes of the to-be-encoded node based on the node encoding order. For example, assuming that eight nodes are arranged in the order of node 0, node 1, node 2, …, node 7 according to the node encoding order, if the to-be-encoded node is node 7, that is, the nodes before the node 7 have been encoded, and assuming that the value of k is 3, the first three encoded nodes of the to-be-encoded node are node 4, node 5 and node 6.
[0068] Further, in a case where at least one encoded node of the first k encoded nodes has a target plane feature, the encoding end acquires m encoded reference nodes in the point cloud sequence. Optionally, the m reference nodes can be nodes in the k encoded nodes, and m≤k; or the m reference nodes can not belong to the k encoded nodes, or only part of the m reference nodes belong to the k encoded nodes, for example, the m reference nodes can be the m encoded nodes adjacent to the to-be-encoded node, and these reference nodes have nothing to do with the encoding order, and part of the reference nodes are not in the first k encoded nodes.
[0069] Optionally, the target plane feature can refer to that n sub-nodes of a node divided based on an n-ary tree are divided into two planes in a target coordinate axis direction, the occupied sub-nodes are located in one of the two planes, and the sub-nodes of the other plane are not occupied, and the node is a node with a target plane feature. For example, Figure 3bThe node in the node is divided into eight sub-nodes by an octree, wherein the sub-nodes numbered 0, 2, 4 and 6 form a first plane, and the sub-nodes numbered 1, 3, 5 and 7 form a second plane. If at least one of the four sub-nodes of the first plane is occupied, and none of the four sub-nodes of the second plane is occupied, or if none of the four sub-nodes of the first plane is occupied, and at least one of the four sub-nodes of the second plane is occupied, the node is a node with a target plane feature.
[0070] In the embodiments of the present application, if at least one of the first k encoded nodes of the to-be-encoded node has the target plane feature, it is considered that the to-be-encoded node may also have the target plane feature, for example, the occupied sub-nodes in the to-be-encoded node are all located in the first plane or the second plane, and then the encoding end obtains m reference nodes encoded in the point cloud sequence to predict the occupancy information of the to-be-encoded node based on the occupancy information of the m reference nodes. By determining whether at least one of the k encoded nodes has the target plane feature, the accuracy of predicting the occupancy information of the to-be-encoded node can be improved.
[0071] Alternatively, if none of the first k encoded nodes has the target plane feature, the encoding end can not obtain the m reference nodes encoded, and then the occupancy information of the to-be-encoded node will not be predicted based on the occupancy information of the reference nodes. The encoding end can use existing related means to perform entropy encoding on the to-be-encoded node, which is not described in detail here.
[0072] Alternatively, in the case that at least one of the first k encoded nodes has the target plane feature, the encoding end obtains m reference nodes encoded in the point cloud sequence, including:
[0073] In the case that the number of the encoded nodes with the target plane feature in the first k encoded nodes is greater than or equal to a first threshold, the encoding end obtains m reference nodes encoded in the point cloud sequence.
[0074] The first threshold is a positive integer less than k.
[0075] In the embodiments of the present application, after the encoding end obtains the first k encoded nodes of the to-be-encoded node, the number of the encoded nodes with the target plane feature in the first k encoded nodes is further obtained. If the number of the encoded nodes with the target plane feature is greater than or equal to a first threshold, it is considered that the to-be-encoded node may also have the target plane feature, for example, the occupied sub-nodes in the to-be-encoded node are all located in the first plane or the second plane. In this case, the encoding end further obtains m reference nodes encoded in the point cloud sequence.
[0076] Optionally, the first threshold value can be a value pre-set by a user, or can also be an empirical value obtained by the encoding end based on a limited number of trials.
[0077] Optionally, the step 201 can further specifically include:
[0078] The encoding end obtains a to-be-encoded node in the point cloud sequence;
[0079] The encoding end determines a target coordinate system based on a coordinate value of the to-be-encoded node;
[0080] The encoding end determines, as a candidate reference node, a node in the point cloud sequence that belongs to a same node division level as the to-be-encoded node and has a same coordinate value as the to-be-encoded node on a target coordinate axis, the target coordinate axis being any coordinate axis in the target coordinate system and being perpendicular to a target plane;
[0081] The encoding end obtains m reference nodes from the candidate reference nodes.
[0082] It can be understood that the geometric information of a node in the point cloud sequence can be represented by a coordinate value (for example, x1, y1, z1) of the node in a Cartesian coordinate system, and each node in the point cloud sequence includes a corresponding coordinate value. In the embodiment of the present application, after the encoding end obtains a to-be-encoded node in the point cloud sequence, the corresponding coordinate value of the to-be-encoded node can also be obtained, and the target coordinate system is determined based on the coordinate value. The target coordinate system is also the target system corresponding to the coordinate value of the to-be-encoded node. It can be understood that based on the target coordinate system, the encoding end can determine the coordinate origin and each coordinate axis of the target coordinate system, and can also obtain the coordinate value of other nodes in the point cloud sequence, and based on the coordinate value of the node, the relative position of the node and the to-be-encoded node can be determined.
[0083] The encoding end determines, as a candidate reference node, a node in the point cloud sequence that belongs to a same node division level as the to-be-encoded node and has a same coordinate value as the to-be-encoded node on a target coordinate axis. For example, assuming that the target coordinate axis is the z axis and the coordinate value of the to-be-encoded node is (x1, y1, z1), the candidate reference node is an encoded node with a same z axis coordinate value z1, and the coordinate value of the reference node can be represented as (x1-a*xNodeSize, y1-b*yNodeSize, z1), where a and b are integers greater than or equal to 0, a and b cannot take the value 0 at the same time, xNodeSize is the node edge length of the to-be-encoded node in the x axis direction, and yNodeSize is the node edge length of the to-be-encoded node in the y axis direction. Further, m reference nodes are selected from these reference nodes.
[0084] It should be noted that the target plane feature can be determined based on the target coordinate axis. For example, assuming that the target coordinate axis is the z-axis, the target plane is a plane perpendicular to the z-axis, and when a node is located in the target plane based on the sub-nodes obtained by the structure tree division, the node is also a node with the target plane feature.
[0085] In the embodiment of the application, the encoding end predicts the occupancy information of the to-be-encoded node based on the occupancy information of the m reference nodes, and the m reference nodes are selected from nodes in the point cloud sequence that belong to the same node division level as the to-be-encoded node and have the same coordinate value as the to-be-encoded node on the target coordinate axis. The m reference nodes are also nodes around the to-be-encoded node, so that the spatial geometric relationship between the nodes in the point cloud sequence can be effectively utilized, and the accuracy of the prediction of the occupancy of the to-be-encoded node is improved.
[0086] Optionally, the step 202 can specifically include:
[0087] The encoding end determines a first plane and a second plane of the node, wherein the first plane and the second plane are both parallel to the target plane, and the first plane and the second plane are stacked in the extension direction of the target coordinate axis, the first plane is closer to the coordinate origin than the second plane, and the coordinate origin is the coordinate origin of the target coordinate system;
[0088] The encoding end obtains the number of occupied first sub-nodes and the number of occupied second sub-nodes in the m reference nodes, wherein the first sub-nodes are sub-nodes located in the first plane, and the second sub-nodes are sub-nodes located in the second plane;
[0089] The encoding end predicts the occupancy information of the to-be-encoded node based on the number of the first sub-nodes and the number of the second sub-nodes in the m reference nodes, and determines the prediction result of the to-be-encoded node.
[0090] It should be noted that the encoding end can divide the first plane and the second plane for any node in the point cloud sequence based on the above method, including but not limited to the reference nodes and the to-be-encoded node. For example, referring to FIG. 2, Figure 3a , Figure 3a The to-be-encoded node is represented by a dashed box, and the reference node is represented by a solid box, Figure 3a In other words, there are three reference nodes, and these nodes obtain eight sub-nodes based on the octree division. Assuming that the target coordinate axis is the z-axis, taking the leftmost reference node as an example, the first plane of the reference node is the plane where the four lower nodes are located, and the second plane is the plane where the four upper nodes are located. Similarly, the first plane of the other reference nodes is the plane where the four lower nodes are located, and the second plane is the plane where the four upper nodes are located.
[0091] Optionally, the target coordinate axis can also be the x-axis or the y-axis, and the first plane and the second plane are also planes perpendicular to the x-axis or the y-axis, which will not be described in detail here.
[0092] In the embodiments of the present application, based on the division of the first plane and the second plane for the nodes, the number of occupied first sub-nodes in the first plane and the number of occupied second sub-nodes in the second plane of the m reference nodes can be obtained, and the occupancy information of the to-be-encoded node is predicted based on the number of occupied first sub-nodes and the number of occupied second sub-nodes, so as to determine the prediction result of the to-be-encoded node.
[0093] Please continue to refer to Figure 3a , Figure 3a The dashed box in Figure 3a indicates the to-be-encoded node, and the solid box indicates the reference node, Figure 3a that is, there are 3 reference nodes, and the filled ones are occupied sub-nodes, so that
[0094] Optionally, the encoding end predicts the occupancy information of the to-be-encoded node based on the number of occupied first sub-nodes and the number of occupied second sub-nodes in the m reference nodes, determines the prediction result of the to-be-encoded node, and includes at least one of the following:
[0095] In the case where the number of occupied first sub-nodes and the number of occupied second sub-nodes in the m reference nodes meet the first condition, the encoding end predicts that at least one of the first sub-nodes in the to-be-encoded node is occupied, and the second sub-nodes in the to-be-encoded node are not occupied, determines the prediction result of the to-be-encoded node as the first prediction result, and the first condition is that the number of occupied first sub-nodes in the m reference nodes is greater than a second threshold, and the number of occupied second sub-nodes is less than a third threshold.
[0096] In a case where the number of occupied first sub-nodes and the number of occupied second sub-nodes in the m reference nodes meet the second condition, the encoding end predicts that at least one second sub-node in the to-be-encoded node is occupied, the first sub-node in the to-be-encoded node is not occupied, determines that the prediction result of the to-be-encoded node is a second prediction result, and the second condition is that the number of occupied second sub-nodes in the m reference nodes is greater than the second threshold, and the number of occupied first sub-nodes is less than the third threshold.
[0097] In a case where the number of occupied first sub-nodes and the number of occupied second sub-nodes in the m reference nodes do not meet the first condition and the second condition, the encoding end predicts that at least one first sub-node and at least one second sub-node in the to-be-encoded node are occupied, and determines that the prediction result of the to-be-encoded node is a third prediction result.
[0098] In the embodiments of the present application, if the number of occupied first sub-nodes in the first plane of the m reference nodes is greater than the second threshold, and the number of occupied second sub-nodes in the second plane is less than the third threshold, in this case, the prediction result of the to-be-encoded node is a first prediction result: at least one first sub-node in the first plane of the to-be-encoded node is occupied, and none of the second sub-nodes in the second plane of the to-be-encoded node is occupied.
[0099] If the number of occupied first sub-nodes in the first plane of the m reference nodes is less than the third threshold, and the number of occupied second sub-nodes in the second plane is greater than the second threshold, the prediction result of the to-be-encoded node is a second prediction result: none of the first sub-nodes in the first plane of the to-be-encoded node is occupied, and at least one second sub-node in the second plane of the to-be-encoded node is occupied.
[0100] If the number of occupied first sub-nodes in the first plane of the m reference nodes and the number of occupied second sub-nodes in the second plane do not meet the first condition and the second condition, for example, the number of occupied first sub-nodes in the m reference nodes is less than the second threshold, and the number of occupied second sub-nodes is greater than the third threshold, or the number of occupied first sub-nodes in the m reference nodes is less than the second threshold, and the number of occupied second sub-nodes is less than the third threshold, the prediction result of the to-be-encoded node is a third prediction result: at least one first sub-node in the first plane of the to-be-encoded node is occupied, and at least one second sub-node in the second plane is occupied.
[0101] In the embodiments of the present application, the occupancy information of the to-be-encoded node is predicted by comparing the sizes of the occupied first sub-node and the occupied second sub-node with the second threshold and the third threshold, thereby effectively improving the prediction accuracy of the occupancy of the to-be-encoded node.
[0102] Optionally, in the case that the first sub-node and the second sub-node in the reference node are based on n-ary tree partitioning, the second threshold is a positive integer less than or equal to n2xm-1, and the third threshold is a positive integer less than or equal to n2xm, where n is a positive integer.
[0103] For example, the first sub-node and the second sub-node in the reference node are based on octree partitioning, i.e., the value of n is 8, and it is assumed that the number of reference nodes is 3, i.e., the value of m is 3, then the second threshold is a positive integer less than or equal to 11, and the third threshold is a positive integer less than or equal to 12.
[0104] In the embodiments of the present application, after determining the prediction result of the to-be-encoded node, the encoding end determines the context of the to-be-encoded sub-node based on the prediction result and the position of the to-be-encoded sub-node in the to-be-encoded node. Optionally, the step 203 can specifically include at least one of the following:
[0105] In the case that the prediction result of the to-be-encoded node is the first prediction result and the to-be-encoded sub-node is located on the second plane of the to-be-encoded node, the encoding end determines the first preset model as the context of the to-be-encoded sub-node;
[0106] In the case that the prediction result of the to-be-encoded node is the second prediction result and the to-be-encoded sub-node is located on the first plane of the to-be-encoded node, the encoding end determines the second preset model as the context of the to-be-encoded sub-node;
[0107] In the case that the prediction result of the to-be-encoded node is the first prediction result and the to-be-encoded sub-node is located on the first plane of the to-be-encoded node, the encoding end acquires the neighbor nodes of the to-be-encoded sub-node and determines the context of the to-be-encoded sub-node based on the occupancy of the neighbor nodes;
[0108] In the case that the prediction result of the to-be-encoded node is the second prediction result and the to-be-encoded sub-node is located on the second plane of the to-be-encoded node, the encoding end acquires the neighbor nodes of the to-be-encoded sub-node and determines the context of the to-be-encoded sub-node based on the occupancy of the neighbor nodes;
[0109] In the case that the prediction result of the to-be-encoded node is the third prediction result, the encoding end acquires the neighbor nodes of the to-be-encoded sub-node and determines the context of the to-be-encoded sub-node based on the occupancy of the neighbor nodes.
[0110] Specifically, if the encoding end determines that the prediction result of the to-be-encoded node is the first prediction result, i.e., at least one first child node in the first plane of the to-be-encoded node is occupied, and none of the second child nodes in the second plane of the to-be-encoded node is occupied, for the to-be-encoded child node in the second plane of the to-be-encoded node, the encoding end determines the first preset model as the context of the to-be-encoded child node, i.e., assigns the first preset model to the to-be-encoded child node, the first preset model is an adaptive probability model, and the encoding end performs arithmetic encoding on the occupancy bit code of the to-be-encoded child node based on the adaptive probability model to generate a target code stream.
[0111] If the encoding end determines that the prediction result of the to-be-encoded node is the second prediction result, i.e., none of the first child nodes in the first plane of the to-be-encoded node is occupied, and at least one second child node in the second plane of the to-be-encoded node is occupied, for the to-be-encoded child node in the first plane of the to-be-encoded node, the encoding end determines the second preset model as the context of the to-be-encoded child node, i.e., assigns the second preset model to the to-be-encoded child node, the second preset model is also an adaptive probability model, and the encoding end performs arithmetic encoding on the occupancy bit code of the to-be-encoded child node based on the adaptive probability model to generate a target code stream. Alternatively, the first preset model and the second preset model can be the same probability model, for example, both are adaptive probability models.
[0112] If the encoding end determines that the prediction result of the to-be-encoded node is the first prediction result, for the to-be-encoded child node in the first plane of the to-be-encoded node, the encoding end obtains the neighbor node of the to-be-encoded child node and determines the context of the to-be-encoded child node based on the occupancy of the neighbor node.
[0113] If the encoding end determines that the prediction result of the to-be-encoded node is the second prediction result, for the to-be-encoded child node in the second plane of the to-be-encoded node, the encoding end can also obtain the neighbor node of the to-be-encoded child node and determine the context of the to-be-encoded child node based on the occupancy of the neighbor node.
[0114] If the encoding end determines that the prediction result of the to-be-encoded node is the third prediction result, i.e., at least one first child node in the first plane of the to-be-encoded node is occupied, and at least one second child node in the second plane is occupied, for the to-be-encoded child node in the to-be-encoded node, the encoding end can also obtain the neighbor node of the to-be-encoded child node and determine the context of the to-be-encoded child node based on the occupancy of the neighbor node.
[0115] Optionally, the encoding end obtains the neighbor nodes of the to-be-encoded sub-node, and determines the context of the to-be-encoded sub-node based on the occupancy of the neighbor nodes. There are two different ways to achieve this, which are described in detail below.
[0116] Method one
[0117] Taking octree partitioning as an example, in the octree breadth-first traversal partitioning mode, the neighbor information that the encoding end can obtain when encoding the to-be-encoded sub-node in the to-be-encoded node includes the neighbor sub-nodes in three target directions. For example, the left front lower three directions of the to-be-encoded sub-node are obtained, including 3 coplanar neighbor sub-nodes, 3 collinear neighbor sub-nodes, and 1 common point neighbor sub-node.
[0118] The context design of the sub-node layer is as follows: for the to-be-encoded sub-node, the encoding end searches for the occupancy of 3 coplanar neighbor sub-nodes, 3 collinear neighbor sub-nodes, 1 common point neighbor sub-node in the left front lower direction of the to-be-encoded sub-node in the same layer, and the neighbor sub-node two sub-node edge lengths away from the current to-be-encoded sub-node in the negative direction of the dimension with the shortest sub-node edge length. Taking the shortest sub-node edge length in the x-axis direction as an example, the reference nodes selected by each sub-node are as shown in Figure 4a The dashed box node is the current to-be-encoded node, the filled node is the current to-be-encoded sub-node, and the solid box node is the neighbor sub-node selected by each sub-node.
[0119] The encoding end considers in detail the occupancy of 3 coplanar neighbor sub-nodes, 3 collinear sub-nodes, and the sub-node two sub-node edge lengths away from the current to-be-encoded sub-node in the negative direction of the dimension with the shortest sub-node edge length. There are 2 7 -1=127 cases for each case, and 1 context is assigned to each case; if all of them are not occupied, there are 2 7 -1=127 cases for each case, and 1 context is assigned to each case; if all of them are not occupied, there are 2
[0120] If the 8 neighbor sub-nodes of the to-be-encoded sub-node in the same layer are not occupied, further obtain the occupancy of the four groups of neighbor nodes of the to-be-encoded node layer as shown in Figure 4b The dashed box node is the to-be-encoded node, and the solid box node is the neighbor node. For the to-be-encoded node layer, the context is determined according to the following steps:
[0121] 1. First, get the coplanar neighbor nodes of the three preset directions of the to-be-encoded node. Exemplarily, get the right upper rear 3 coplanar neighbor nodes of the to-be-encoded node. The occupancy situations of the right upper rear 3 coplanar neighbor nodes of the to-be-encoded node have 2 3 = 8 possible situations, and each of the not-occupied situations is assigned a context. Then, in combination with the position of the to-be-encoded sub-node in the to-be-encoded node, the 3 coplanar neighbor nodes provide (8-1) x 8 = 56 contexts. If the right upper rear 3 coplanar neighbor nodes of the to-be-encoded node are not occupied, further get the occupancy situations of the remaining three groups of neighbor nodes (i.e., the left front lower coplanar neighbor, the right upper rear collinear neighbor and the left front lower collinear neighbor) of the to-be-encoded node. Figure 4b
[0122] 2. Get the distance between the most recently occupied node and the current node. The corresponding relationship between the neighbor node occupancy situation and the distance is shown in Table 1.
[0123] Table 1 Corresponding relationship between neighbor node occupancy situation and distance of to-be-encoded node layer
[0124]
[0125] As can be seen from Table 1, the distance has 3 values, and each of the 3 values is assigned a context. In combination with the position of the to-be-encoded sub-node in the to-be-encoded node, there are 3 x 8 = 24 contexts.
[0126] At this point, the total number of contexts determined based on the above manner one is 128 + 56 + 24 = 208, and the encoding end assigns an adaptive probability model to each context.
[0127] Manner two
[0128] After determining the to-be-encoded node, the encoding end can obtain 6 neighbor nodes coplanar and collinear with the to-be-encoded node in the to-be-encoded node layer for each to-be-encoded sub-node. Figure 5a Figure 5a The node in the dashed box is the to-be-encoded node, the filled node is each to-be-encoded sub-node, and the solid box node is the coplanar and collinear neighbor node of the to-be-encoded node. For the 3 coplanar neighbor nodes, consider each distribution, which has 2 3 = 8 situations; for the remaining 3 collinear neighbor nodes, only the number of occupied nodes among the three neighbor nodes is obtained, which has 0, 1, 2, 3, a total of four situations. Combined, there are 4 x 8 = 32 situations, and each situation is configured with a context. Therefore, a total of 32 contexts are obtained for the to-be-encoded node layer.
[0129] Further, for each to-be-encoded sub-node, a neighbor node in the target direction of the same layer is obtained, for example, three coplanar neighbor sub-nodes, i.e., left, front and lower (negative direction of each coordinate axis) of the to-be-encoded sub-node, are obtained, as shown in the following formula. Figure 5b Figure 5b The node in the dashed line frame is a to-be-encoded node, the filled node is a to-be-encoded sub-node, and the node in the solid line frame is a coplanar neighbor node of the to-be-encoded sub-node in the same layer. The occupancy of the three coplanar neighbor nodes in the same layer of the to-be-encoded sub-node has two 3 = 8, and each case is assigned a context, so that the to-be-encoded sub-node provides a total of 8 contexts.
[0130] The contexts determined by the second mode are a total of 32 x 8 = 256, and the encoding end assigns an adaptive probability model to each context.
[0131] Alternatively, when the prediction result of the to-be-encoded node is the third prediction result, or the prediction result of the to-be-encoded node is the first prediction result and the to-be-encoded sub-node is located in the first plane of the to-be-encoded node, or the prediction result of the to-be-encoded node is the second prediction result and the to-be-encoded sub-node is located in the second plane of the to-be-encoded node, the encoding end can determine the context of the to-be-encoded sub-node based on the above first mode or second mode.
[0132] The embodiments of the present application also provide a point cloud decoding method. Please refer to Figure 6 , Figure 6 is a flowchart of a point cloud decoding method provided by the embodiments of the present application, as shown in the following figure, the method comprises the following steps: Figure 6
[0133] Step 601: The decoding end obtains a to-be-decoded node in a point cloud sequence and m reference nodes that have been decoded in the point cloud sequence, m is a positive integer;
[0134] Step 602: The decoding end predicts occupancy information of the to-be-decoded node based on occupancy information of the m reference nodes, and determines a prediction result of the to-be-decoded node;
[0135] Step 603: The decoding end determines a context of a to-be-decoded sub-node based on the prediction result and a position of the to-be-decoded sub-node in the to-be-decoded node, the to-be-decoded sub-node being any one sub-node obtained by dividing the to-be-decoded node based on a structure tree;
[0136] Step 604: The decoding end performs entropy decoding on the to-be-decoded sub-node according to the context, and generates a target code stream.
[0137] Optionally, the step 601 specifically comprises:
[0138] The decoding end obtains a to-be-decoded node in a point cloud sequence;
[0139] The decoding end obtains k first decoded nodes of the to-be-decoded node based on a node decoding order, k being a positive integer;
[0140] In a case where at least one of the k first decoded nodes has a target plane feature, the decoding end obtains m reference nodes that have been decoded in the point cloud sequence.
[0141] Optionally, in the case where at least one of the k first decoded nodes has the target plane feature, the decoding end obtains the m reference nodes that have been decoded in the point cloud sequence, including:
[0142] In a case where a number of the first decoded nodes that have the target plane feature is greater than or equal to a first threshold, the decoding end determines that the k first decoded nodes match the target plane feature;
[0143] The first threshold is a positive integer smaller than k.
[0144] Optionally, the step 601 can further specifically include:
[0145] The decoding end obtains a to-be-decoded node in a point cloud sequence;
[0146] The decoding end determines a target coordinate system based on a coordinate value of the to-be-decoded node;
[0147] The decoding end determines, as candidate reference nodes, nodes in the point cloud sequence that belong to a same node division level as the to-be-decoded node and have a same coordinate value as the to-be-decoded node on a target coordinate axis, the target coordinate axis being any coordinate axis in the target coordinate system and being perpendicular to a target plane;
[0148] The decoding end obtains m reference nodes from the candidate reference nodes.
[0149] Optionally, the step 602 specifically includes:
[0150] The decoding end determines a first plane and a second plane of a node, wherein the first plane and the second plane are both parallel to the target plane, the first plane and the second plane are arranged in a stacked manner along an extension direction of the target coordinate axis, the first plane is closer to a coordinate origin than the second plane, and the coordinate origin is a coordinate origin of the target coordinate system;
[0151] The decoding end obtains a number of occupied first sub-nodes and a number of occupied second sub-nodes in the m reference nodes, the first sub-nodes being sub-nodes located in the first plane, and the second sub-nodes being sub-nodes located in the second plane;
[0152] The decoding end predicts the occupancy information of the to-be-decoded node based on the number of occupied first sub-nodes and the number of occupied second sub-nodes in the m reference nodes, and determines the prediction result of the to-be-decoded node.
[0153] Optionally, the decoding end predicts the occupancy information of the to-be-decoded node based on the number of occupied first sub-nodes and the number of occupied second sub-nodes in the m reference nodes, and determines the prediction result of the to-be-decoded node, including at least one of the following:
[0154] In a case where the number of occupied first sub-nodes and the number of occupied second sub-nodes in the m reference nodes meet a first condition, the decoding end predicts that at least one of the first sub-nodes in the to-be-decoded node is occupied, and the second sub-nodes in the to-be-decoded node are not occupied, and determines the prediction result of the to-be-decoded node as a first prediction result, the first condition being that the number of occupied first sub-nodes in the m reference nodes is greater than a second threshold, and the number of occupied second sub-nodes is less than a third threshold;
[0155] In a case where the number of occupied first sub-nodes and the number of occupied second sub-nodes in the m reference nodes meet a second condition, the decoding end predicts that at least one of the second sub-nodes in the to-be-decoded node is occupied, and the first sub-nodes in the to-be-decoded node are not occupied, and determines the prediction result of the to-be-decoded node as a second prediction result, the second condition being that the number of occupied second sub-nodes in the m reference nodes is greater than the second threshold, and the number of occupied first sub-nodes is less than the third threshold;
[0156] In a case where the number of occupied first sub-nodes and the number of occupied second sub-nodes in the m reference nodes do not meet the first condition and the second condition, the decoding end predicts that at least one of the first sub-nodes and at least one of the second sub-nodes in the to-be-decoded node are occupied, and determines the prediction result of the to-be-decoded node as a third prediction result.
[0157] Optionally, the step 603 can specifically include at least one of the following:
[0158] In a case where the prediction result of the to-be-decoded node is the first prediction result and the to-be-decoded sub-node is located in the second plane of the to-be-decoded node, the decoding end determines a first preset model as the context of the to-be-decoded sub-node.
[0159] In a case where the prediction result of the to-be-decoded node is the second prediction result and the to-be-decoded sub-node is located in the first plane of the to-be-decoded node, the decoding end determines a second preset model as the context of the to-be-decoded sub-node.
[0160] In a case where the prediction result of the to-be-decoded node is the first prediction result and the to-be-decoded sub-node is located in the first plane of the to-be-decoded node, the decoding end acquires a neighbor node of the to-be-decoded sub-node and determines the context of the to-be-decoded sub-node based on an occupancy of the neighbor node.
[0161] In a case where the prediction result of the to-be-decoded node is the second prediction result and the to-be-decoded sub-node is located in the second plane of the to-be-decoded node, the decoding end acquires a neighbor node of the to-be-decoded sub-node and determines the context of the to-be-decoded sub-node based on an occupancy of the neighbor node.
[0162] In a case where the prediction result of the to-be-decoded node is the third prediction result, the neighbor node of the to-be-decoded sub-node is acquired and the context of the to-be-decoded sub-node is determined based on an occupancy of the neighbor node.
[0163] Optionally, in a case where the first sub-node and the second sub-node in the reference node are divided based on an n-ary tree, the second threshold is a positive integer less than or equal to n2×m-1, the third threshold is a positive integer less than or equal to n2×m, and n is a positive integer.
[0164] In the embodiments of the present application, the decoding end can predict the occupancy information of a to-be-decoded node based on the occupancy information of a decoded reference node, and determine the context of a to-be-decoded sub-node based on a prediction result of the to-be-decoded node and a position of the to-be-decoded sub-node in the to-be-decoded node, so that the occupancy information of the decoded node in the point cloud sequence can be better utilized, the decompression performance of the point cloud is improved, and the decoding efficiency of the decoding end is improved.
[0165] It should be noted that the point cloud decoding method provided in the embodiments of the present application is different from the point cloud encoding method in the execution subject, and the specific execution steps and implementation process can be referred to the specific description in the point cloud encoding method, which will not be described here.
[0166] The point cloud encoding method provided in the embodiments of the present application can be executed by a point cloud encoding device. The point cloud encoding method executed by the point cloud encoding device is taken as an example in the embodiments of the present application to illustrate the point cloud encoding device provided in the embodiments of the present application.
[0167] Please refer to Figure 7 , Figure 7 FIG. 7 is a structural diagram of a point cloud encoding device provided in the embodiments of the present application, as shown in the figure, the point cloud encoding device 700 comprises: Figure 7
[0168] A first obtaining module 701 is configured to obtain a to-be-encoded node in a point cloud sequence and m reference nodes that have been encoded in the point cloud sequence, m being a positive integer.
[0169] A first prediction module 702 is configured to predict occupancy information of the to-be-encoded node based on occupancy information of the m reference nodes, and determine a prediction result of the to-be-encoded node.
[0170] A first determining module 703 is configured to determine a context of a to-be-encoded sub-node based on the prediction result and a position of the to-be-encoded sub-node in the to-be-encoded node, the to-be-encoded sub-node being any one sub-node of the to-be-encoded node divided based on a structure tree.
[0171] An encoding module 704 is configured to perform entropy encoding on the to-be-encoded sub-node according to the context, and generate a target code stream.
[0172] Optionally, the first obtaining module 701 is further configured to:
[0173] obtain the to-be-encoded node in the point cloud sequence;
[0174] obtain k previous encoded nodes of the to-be-encoded node based on a node encoding order, k being a positive integer;
[0175] in a case where at least one encoded node of the k previous encoded nodes has a target plane feature, obtain the m reference nodes that have been encoded in the point cloud sequence.
[0176] Optionally, the first obtaining module 701 is further configured to:
[0177] in a case where a number of the encoded nodes with the target plane feature in the k previous encoded nodes is greater than a first threshold value, obtain the m reference nodes that have been encoded in the point cloud sequence;
[0178] wherein the first threshold value is a positive integer smaller than k.
[0179] Optionally, the first obtaining module 701 is further configured to:
[0180] obtaining a to-be-encoded node in a point cloud sequence;
[0181] determining a target coordinate system based on a coordinate value of the to-be-encoded node;
[0182] determining, as candidate reference nodes, nodes in the point cloud sequence that belong to a same node as the to-be-encoded node and have a same coordinate value as the to-be-encoded node on a target coordinate axis, the target coordinate axis being any coordinate axis in the target coordinate system and the target coordinate axis being perpendicular to a target plane;
[0183] obtaining m reference nodes from the candidate reference nodes.
[0184] Optionally, the first prediction module 702 is further configured to:
[0185] determining a first plane and a second plane of the node, wherein the first plane and the second plane are both parallel to the target plane, and the first plane and the second plane are stacked in an extension direction of the target coordinate axis, the first plane being closer to a coordinate origin than the second plane, the coordinate origin being a coordinate origin of the target coordinate system;
[0186] obtaining a number of occupied first sub-nodes and a number of occupied second sub-nodes in the m reference nodes, the first sub-nodes being sub-nodes located on the first plane, and the second sub-nodes being sub-nodes located on the second plane;
[0187] predicting occupancy information of the to-be-encoded node based on the number of occupied first sub-nodes and the number of occupied second sub-nodes in the m reference nodes, and determining a prediction result of the to-be-encoded node.
[0188] Optionally, the first prediction module 702 is further configured to perform at least one of the following:
[0189] in a case where the number of occupied first sub-nodes and the number of occupied second sub-nodes in the m reference nodes meet a first condition, predicting that at least one of the first sub-nodes in the to-be-encoded node is occupied and the second sub-nodes in the to-be-encoded node are not occupied, determining a prediction result of the to-be-encoded node as a first prediction result, and the first condition being that the number of occupied first sub-nodes in the m reference nodes is greater than a second threshold value and the number of occupied second sub-nodes is less than a third threshold value;
[0190] in a case where the number of the occupied first sub-nodes and the number of the occupied second sub-nodes in the m reference nodes meet a second condition, it is predicted that at least one of the second sub-nodes in the to-be-encoded node is occupied, the first sub-node in the to-be-encoded node is not occupied, the prediction result of the to-be-encoded node is determined as a second prediction result, and the second condition is that the number of the occupied second sub-nodes in the m reference nodes is greater than the second threshold value, and the number of the occupied first sub-nodes is less than the third threshold value;
[0191] in a case where the number of the occupied first sub-nodes and the number of the occupied second sub-nodes in the m reference nodes do not meet the first condition and the second condition, it is predicted that at least one of the first sub-nodes and at least one of the second sub-nodes in the to-be-encoded node are occupied, and the prediction result of the to-be-encoded node is determined as a third prediction result.
[0192] Optionally, the first determining module 703 is further configured to perform at least one of the following:
[0193] in a case where the prediction result of the to-be-encoded node is the first prediction result, and the to-be-encoded sub-node is located on the first plane of the to-be-encoded node, a first preset model is determined as the context of the to-be-encoded sub-node;
[0194] in a case where the prediction result of the to-be-encoded node is the second prediction result, and the to-be-encoded sub-node is located on the second plane of the to-be-encoded node, a second preset model is determined as the context of the to-be-encoded sub-node;
[0195] in a case where the prediction result of the to-be-encoded node is the first prediction result, and the to-be-encoded sub-node is located on the first plane of the to-be-encoded node, a neighbor node of the to-be-encoded sub-node is acquired, and the context of the to-be-encoded sub-node is determined based on an occupancy situation of the neighbor node;
[0196] in a case where the prediction result of the to-be-encoded node is the second prediction result, and the to-be-encoded sub-node is located on the second plane of the to-be-encoded node, a neighbor node of the to-be-encoded sub-node is acquired, and the context of the to-be-encoded sub-node is determined based on an occupancy situation of the neighbor node;
[0197] in a case where the prediction result of the to-be-encoded node is the third prediction result, a neighbor node of the to-be-encoded sub-node is acquired, and the context of the to-be-encoded sub-node is determined based on an occupancy situation of the neighbor node.
[0198] Optionally, in a case where the first child node and the second child node in the reference node are based on an n-ary tree partition, the second threshold is a positive integer less than or equal to , the third threshold is a positive integer less than or equal to , and n is a positive integer.
[0199] In the embodiments of the present application, the point cloud encoding device 700 can predict the occupancy information of a to-be-encoded node based on the occupancy information of an already-encoded reference node, and determine the context of a to-be-encoded child node based on the prediction result of the to-be-encoded node and the position of the to-be-encoded child node in the to-be-encoded node. In this way, the occupancy information of the already-encoded nodes in the point cloud sequence can be better utilized, the geometric compression performance of the point cloud can be improved, and the encoding efficiency of the point cloud encoding device 700 can be improved.
[0200] The point cloud encoding device 700 in the embodiments of the present application can be an electronic device, for example, an electronic device with an operating system, or a component in an electronic device, for example, an integrated circuit or a chip. The electronic device can be a terminal or other devices other than a terminal. Exemplarily, the terminal can include, but is not limited to, the types of the terminal 11 listed above, and the other devices can be a server, a network attached storage (NAS), etc., which are not limited in the embodiments of the present application.
[0201] The point cloud encoding device 700 provided by the embodiments of the present application can implement Figure 1 the processes of the method embodiments and achieve the same technical effects. To avoid repetition, details are not described herein.
[0202] The point cloud decoding method provided by the embodiments of the present application can be executed by a point cloud decoding device. In the embodiments of the present application, the point cloud decoding method is executed by a point cloud decoding device as an example to illustrate the point cloud decoding device provided by the embodiments of the present application.
[0203] Please refer to Figure 8 , Figure 8 is a structural diagram of a point cloud decoding device provided by the embodiments of the present application, as shown in Figure 8 , the point cloud decoding device 800 includes:
[0204] The second acquisition module 801 is configured to acquire a to-be-decoded node in a point cloud sequence and m reference nodes in the point cloud sequence that have been decoded, m being a positive integer.
[0205] The second prediction module 802 is configured to predict the occupancy information of the to-be-decoded node based on the occupancy information of the m reference nodes, and determine a prediction result of the to-be-decoded node.
[0206] The second determining module 803 is configured to determine a context of the to-be-decoded sub-node based on the prediction result and a position of the to-be-decoded sub-node in the to-be-decoded node, the to-be-decoded sub-node being any one sub-node obtained by dividing the to-be-decoded node based on a structure tree.
[0207] The decoding module 804 is configured to perform entropy decoding on the to-be-decoded sub-node based on the context, to generate a target code stream.
[0208] Optionally, the second obtaining module 801 is further configured to:
[0209] obtain a to-be-decoded node in a point cloud sequence.
[0210] obtain k first decoded nodes of the to-be-decoded node based on a node decoding order, k being a positive integer.
[0211] In a case where at least one decoded node in the k first decoded nodes has a target plane feature, obtain m reference nodes that have been decoded in the point cloud sequence.
[0212] Optionally, the second obtaining module 801 is further configured to:
[0213] In a case where a number of decoded nodes having the target plane feature in the k first decoded nodes is greater than or equal to a first threshold value, obtain m reference nodes that have been decoded in the point cloud sequence.
[0214] The first threshold value is a positive integer smaller than k.
[0215] Optionally, the second obtaining module 801 is further configured to:
[0216] obtain a to-be-decoded node in a point cloud sequence.
[0217] determine a target coordinate system based on a coordinate value of the to-be-decoded node.
[0218] determine, as candidate reference nodes, nodes in the point cloud sequence that belong to a same node division level as the to-be-decoded node and have a same coordinate value as the to-be-decoded node on a target coordinate axis, the target coordinate axis being any coordinate axis in the target coordinate system and being perpendicular to a target plane.
[0219] obtain m reference nodes from the candidate reference nodes.
[0220] Optionally, the second prediction module 802 is further configured to:
[0221] determining a first plane and a second plane of the node, wherein the first plane and the second plane are both parallel to the target plane, and the first plane and the second plane are arranged in a stacking manner along an extension direction of the target coordinate axis, the first plane is closer to a coordinate origin than the second plane, and the coordinate origin is a coordinate origin of the target coordinate system;
[0222] obtaining a number of occupied first sub-nodes and a number of occupied second sub-nodes in the m reference nodes, the first sub-nodes being sub-nodes located in the first plane, and the second sub-nodes being sub-nodes located in the second plane;
[0223] predicting occupancy information of the to-be-decoded node based on the number of occupied first sub-nodes and the number of occupied second sub-nodes in the m reference nodes, and determining a prediction result of the to-be-decoded node.
[0224] Optionally, the second prediction module 802 is further configured to perform at least one of the following:
[0225] in a case where the number of occupied first sub-nodes and the number of occupied second sub-nodes in the m reference nodes meet a first condition, predicting that at least one of the first sub-nodes in the to-be-decoded node is occupied and the second sub-nodes in the to-be-decoded node are not occupied, determining a first prediction result as the prediction result of the to-be-decoded node, and the first condition is that the number of occupied first sub-nodes in the m reference nodes is greater than a second threshold value, and the number of occupied second sub-nodes is less than a third threshold value;
[0226] in a case where the number of occupied first sub-nodes and the number of occupied second sub-nodes in the m reference nodes meet a second condition, predicting that at least one of the second sub-nodes in the to-be-decoded node is occupied and the first sub-nodes in the to-be-decoded node are not occupied, determining a second prediction result as the prediction result of the to-be-decoded node, and the second condition is that the number of occupied second sub-nodes in the m reference nodes is greater than the second threshold value, and the number of occupied first sub-nodes is less than the third threshold value;
[0227] in a case where the number of occupied first sub-nodes and the number of occupied second sub-nodes in the m reference nodes do not meet the first condition and the second condition, predicting that at least one of the first sub-nodes and at least one of the second sub-nodes in the to-be-decoded node are occupied, and determining a third prediction result as the prediction result of the to-be-decoded node.
[0228] Optionally, the second determination module 803 is further configured to perform at least one of the following:
[0229] In a case where the prediction result of the to-be-decoded node is the first prediction result and the to-be-decoded sub-node is located in the second plane of the to-be-decoded node, a first preset model is determined as the context of the to-be-decoded sub-node;
[0230] In a case where the prediction result of the to-be-decoded node is the second prediction result and the to-be-decoded sub-node is located in the first plane of the to-be-decoded node, a second preset model is determined as the context of the to-be-decoded sub-node;
[0231] In a case where the prediction result of the to-be-decoded node is the first prediction result and the to-be-decoded sub-node is located in the first plane of the to-be-decoded node, a neighbor node of the to-be-decoded sub-node is obtained, and the context of the to-be-decoded sub-node is determined based on an occupancy situation of the neighbor node;
[0232] In a case where the prediction result of the to-be-decoded node is the second prediction result and the to-be-decoded sub-node is located in the second plane of the to-be-decoded node, a neighbor node of the to-be-decoded sub-node is obtained, and the context of the to-be-decoded sub-node is determined based on an occupancy situation of the neighbor node;
[0233] In a case where the prediction result of the to-be-decoded node is the third prediction result, a neighbor node of the to-be-decoded sub-node is obtained, and the context of the to-be-decoded sub-node is determined based on an occupancy situation of the neighbor node.
[0234] Optionally, in a case where the first sub-node and the second sub-node in the reference node are based on n-ary tree partitioning, the second threshold is a positive integer less than or equal to , and the third threshold is a positive integer less than or equal to , n is a positive integer.
[0235] In the embodiments of the present application, the point cloud decoding device 800 can predict the occupancy information of a to-be-decoded node based on the occupancy information of a decoded reference node, and determine the context of a to-be-decoded sub-node based on the prediction result of the to-be-decoded node and the position of the to-be-decoded sub-node in the to-be-decoded node. In this way, the occupancy information of the decoded nodes in the point cloud sequence can be better utilized, the decompression performance of the point cloud can be improved, and the decoding efficiency of the point cloud decoding device 800 can be improved.
[0236] The point cloud decoding apparatus 800 in the embodiments of the present application can be an electronic device, for example, an electronic device with an operating system, or a component in an electronic device, for example, an integrated circuit or a chip. The electronic device can be a terminal or other device than a terminal. Exemplarily, the terminal can include, but is not limited to, the types of the terminal 11 listed above, and the other device can be a server, a network attached storage (NAS), etc., which are not limited in the embodiments of the present application.
[0237] The point cloud decoding apparatus 800 provided in the embodiments of the present application can achieve Figure 6 The method embodiments achieve various processes and achieve the same technical effects. To avoid repetition, the various processes of the method embodiments will not be repeated here.
[0238] Optionally, as shown in Figure 9 The embodiments of the present application further provide an electronic device 900, which includes a processor 901 and a memory 902, and the memory 902 stores programs or instructions executable on the processor 901. For example, when the electronic device 900 is an encoding end, the programs or instructions are executed by the processor 901 to implement the various steps of the above Figure 1 The programs or instructions are executed by the processor 901 to implement the various steps of the above Figure 6 The programs or instructions are executed by the processor 901 to implement the various steps of the above
[0239] The embodiments of the present application further provide a terminal, and the above Figure 1 and Figure 6 The various implementation processes and implementation manners of the method embodiments can be applied to the terminal embodiments, and the same technical effects can be achieved. Specifically, Figure 10 A hardware structure diagram of a terminal for implementing the embodiments of the present application is shown in FIG. 10.
[0240] The terminal 1000 includes, but is not limited to, at least part of the components such as a radio frequency unit 1001, a network module 1002, an audio output unit 1003, an input unit 1004, a sensor 1005, a display unit 1006, a user input unit 1007, an interface unit 1008, a memory 1009, and a processor 1010.
[0241] Those skilled in the art can understand that the terminal 1000 can further include a power supply (such as a battery) for supplying power to each component, and the power supply can be logically connected to the processor 1010 through a power management system, so as to realize functions such as management of charging, discharging, and power consumption management through the power management system. Figure 10The terminal structure shown in the figure does not constitute a limitation on the terminal, and the terminal can include more or fewer components than the figure, or combine certain components, or different component arrangements, which are not described here.
[0242] It should be understood that in the embodiments of the present application, the input unit 1004 can include a graphics processing unit (GPU) 10041 and a microphone 10042. The graphics processor 10041 processes image data of a still picture or a video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The display unit 1006 can include a display panel 10061, which can be configured in the form of a liquid crystal display, an organic light-emitting diode, etc. The user input unit 1007 includes at least one of a touch panel 10071 and other input devices 10072. The touch panel 10071 is also called a touch screen. The touch panel 10071 can include two parts of a touch detection device and a touch controller. The other input devices 10072 can include, but are not limited to, a physical keyboard, function keys (such as volume control keys, on-off keys, etc.), trackballs, mice, joysticks, which are not described here.
[0243] In the embodiments of the present application, after the radio frequency unit 1001 receives the downlink data from the network side device, it can be transmitted to the processor 1010 for processing. In addition, the radio frequency unit 1001 can send uplink data to the network side device. Generally, the radio frequency unit 1001 includes, but is not limited to, an antenna, an amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, etc.
[0244] The memory 1009 can be used to store software programs or instructions and various data. The memory 1009 can mainly include a first storage area storing programs or instructions and a second storage area storing data, wherein the first storage area can store an operating system, application programs or instructions required by at least one function (such as a sound playing function, an image playing function, etc.), and the like. In addition, the memory 1009 can include a volatile memory or a non-volatile memory, or the memory 1009 can include both volatile and non-volatile memories. The non-volatile memory can be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically EPROM (EEPROM), or a flash memory. The volatile memory can be a Random Access Memory (RAM), a Static RAM (SRAM), a Dynamic RAM (DRAM), a Synchronous DRAM (SDRAM), a Double Data Rate SDRAM (DDR SDRAM), an Enhanced SDRAM (ESDRAM), a Synch link DRAM (SLDRAM), and a Direct Rambus RAM (DRRAM). The memory 1009 in the embodiments of the present application includes but is not limited to these and any other suitable types of memories.
[0245] The processor 1010 can include one or more processing units; optionally, the processor 1010 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and an application program, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It can be understood that the above-mentioned modem processor can also not be integrated into the processor 1010.
[0246] When the terminal 1000 is an encoding end, the processor 1010 is configured to:
[0247] obtain a to-be-encoded node in a point cloud sequence and m reference nodes in the point cloud sequence that have been encoded, m being a positive integer;
[0248] predict occupancy information of the to-be-encoded node based on occupancy information of the m reference nodes, to obtain a prediction result of the to-be-encoded node;
[0249] determine a context of a to-be-encoded sub-node based on the prediction result and a position of the to-be-encoded sub-node in the to-be-encoded node, the to-be-encoded sub-node being any one sub-node of the to-be-encoded node divided based on a structure tree;
[0250] perform entropy encoding on the to-be-encoded sub-node according to the context, to generate a target code stream.
[0251] Optionally, the processor 1010 is further configured to:
[0252] obtain a to-be-encoded node in a point cloud sequence;
[0253] obtain k previous encoded nodes of the to-be-encoded node based on a node encoding order, k being a positive integer;
[0254] in a case where at least one encoded node of the k previous encoded nodes has a target plane feature, obtain m reference nodes in the point cloud sequence that have been encoded.
[0255] Optionally, the processor 1010 is further configured to:
[0256] in a case where a number of encoded nodes having the target plane feature in the k previous encoded nodes is greater than or equal to a first threshold value, obtain m reference nodes in the point cloud sequence that have been encoded;
[0257] wherein the first threshold value is a positive integer smaller than k.
[0258] Optionally, the processor 1010 is further configured to:
[0259] obtain a to-be-encoded node in a point cloud sequence;
[0260] determine a target coordinate system based on coordinate values of the to-be-encoded node;
[0261] determine, as candidate reference nodes, nodes in the point cloud sequence that belong to a same node division level as the to-be-encoded node and have a same coordinate value as the to-be-encoded node on a target coordinate axis, the target coordinate axis being any coordinate axis in the target coordinate system and being perpendicular to a target plane;
[0262] obtain m reference nodes from the candidate reference nodes.
[0263] Optionally, the processor 1010 is further configured to:
[0264] determining a first plane and a second plane of the node, wherein the first plane and the second plane are both parallel to the target plane, and the first plane and the second plane are stacked in the extension direction of the target coordinate axis, the first plane is closer to the coordinate origin than the second plane, and the coordinate origin is a coordinate origin of the target coordinate system;
[0265] obtaining a number of occupied first sub-nodes and a number of occupied second sub-nodes in the m reference nodes, the first sub-nodes being sub-nodes located in the first plane, and the second sub-nodes being sub-nodes located in the second plane;
[0266] predicting occupancy information of the node to be encoded based on the number of occupied first sub-nodes and the number of occupied second sub-nodes in the m reference nodes, and determining a prediction result of the node to be encoded.
[0267] Optionally, the processor 1010 is further configured to:
[0268] in a case where the number of occupied first sub-nodes and the number of occupied second sub-nodes in the m reference nodes meet a first condition, predicting that at least one of the first sub-nodes in the node to be encoded is occupied, and the second sub-nodes in the node to be encoded are not occupied, determining a prediction result of the node to be encoded as a first prediction result, and the first condition is that the number of occupied first sub-nodes in the m reference nodes is greater than a second threshold, and the number of occupied second sub-nodes is less than a third threshold;
[0269] in a case where the number of occupied first sub-nodes and the number of occupied second sub-nodes in the m reference nodes meet a second condition, predicting that at least one of the second sub-nodes in the node to be encoded is occupied, and the first sub-nodes in the node to be encoded are not occupied, determining a prediction result of the node to be encoded as a second prediction result, and the second condition is that the number of occupied second sub-nodes in the m reference nodes is greater than the second threshold, and the number of occupied first sub-nodes is less than the third threshold;
[0270] in a case where the number of occupied first sub-nodes and the number of occupied second sub-nodes in the m reference nodes do not meet the first condition and the second condition, predicting that at least one of the first sub-nodes and at least one of the second sub-nodes in the node to be encoded are occupied, and determining a prediction result of the node to be encoded as a third prediction result.
[0271] Optionally, the processor 1010 is further configured to:
[0272] In a case where the prediction result of the to-be-encoded node is the first prediction result and the to-be-encoded sub-node is located in the second plane of the to-be-encoded node, a first preset model is determined as the context of the to-be-encoded sub-node;
[0273] In a case where the prediction result of the to-be-encoded node is the second prediction result and the to-be-encoded sub-node is located in the first plane of the to-be-encoded node, a second preset model is determined as the context of the to-be-encoded sub-node;
[0274] In a case where the prediction result of the to-be-encoded node is the first prediction result and the to-be-encoded sub-node is located in the first plane of the to-be-encoded node, a neighbor node of the to-be-encoded sub-node is obtained, and the context of the to-be-encoded sub-node is determined based on an occupancy situation of the neighbor node;
[0275] In a case where the prediction result of the to-be-encoded node is the second prediction result and the to-be-encoded sub-node is located in the second plane of the to-be-encoded node, a neighbor node of the to-be-encoded sub-node is obtained, and the context of the to-be-encoded sub-node is determined based on an occupancy situation of the neighbor node;
[0276] In a case where the prediction result of the to-be-encoded node is the third prediction result, a neighbor node of the to-be-encoded sub-node is obtained, and the context of the to-be-encoded sub-node is determined based on an occupancy situation of the neighbor node.
[0277] Optionally, in a case where the first sub-node and the second sub-node in the reference node are based on n-ary tree partitioning, the second threshold is a positive integer less than or equal to , and the third threshold is a positive integer less than or equal to , where n is a positive integer.
[0278] Alternatively, in a case where the terminal 1000 is a decoding end, the processor 1010 is configured to:
[0279] obtain a to-be-decoded node in a point cloud sequence and m reference nodes in the point cloud sequence that have been decoded, where m is a positive integer;
[0280] predict occupancy information of the to-be-decoded node based on occupancy information of the m reference nodes, and determine a prediction result of the to-be-decoded node;
[0281] determine a context of a to-be-decoded sub-node based on the prediction result and a position of the to-be-decoded sub-node in the to-be-decoded node, where the to-be-decoded sub-node is any one sub-node of the to-be-decoded node based on structure tree partitioning;
[0282] perform entropy decoding on the to-be-decoded sub-node according to the context, and generate a target code stream.
[0283] Optionally, the processor 1010 is further configured to:
[0284] obtain a to-be-decoded node in a point cloud sequence;
[0285] obtain k first decoded nodes of the to-be-decoded node based on a node decoding order, k being a positive integer;
[0286] obtain m reference nodes decoded in the point cloud sequence in a case where at least one decoded node of the k first decoded nodes has a target plane feature match.
[0287] Optionally, the processor 1010 is further configured to:
[0288] obtain m reference nodes decoded in the point cloud sequence in a case where a number of decoded nodes having a target plane feature in the k first decoded nodes is greater than or equal to a first threshold value;
[0289] wherein the first threshold value is a positive integer less than k.
[0290] Optionally, the processor 1010 is further configured to:
[0291] obtain a to-be-decoded node in a point cloud sequence;
[0292] determine a target coordinate system based on a coordinate value of the to-be-decoded node;
[0293] determine, as candidate reference nodes, nodes in the point cloud sequence that belong to a same node division level as the to-be-decoded node and have a same coordinate value as the to-be-decoded node on a target coordinate axis, the target coordinate axis being any coordinate axis in the target coordinate system and the target coordinate axis being perpendicular to a target plane;
[0294] obtain m reference nodes from the candidate reference nodes.
[0295] Optionally, the processor 1010 is further configured to:
[0296] determine a first plane and a second plane of a node, wherein the first plane and the second plane are both parallel to the target plane, the first plane and the second plane are arranged in a stacked manner along an extension direction of the target coordinate axis, the first plane is closer to a coordinate origin than the second plane, and the coordinate origin is a coordinate origin of the target coordinate system;
[0297] obtain a number of occupied first sub-nodes and a number of occupied second sub-nodes in the m reference nodes, the first sub-nodes being sub-nodes located on the first plane, and the second sub-nodes being sub-nodes located on the second plane;
[0298] predict the occupancy information of the to-be-decoded node based on the number of the first sub-nodes occupied and the number of the second sub-nodes occupied in the m reference nodes, and determine the prediction result of the to-be-decoded node.
[0299] Optionally, the processor 1010 is further configured to:
[0300] in a case where the number of the first sub-nodes occupied and the number of the second sub-nodes occupied in the m reference nodes meet a first condition, predict that at least one of the first sub-nodes in the to-be-decoded node is occupied and the second sub-nodes in the to-be-decoded node are not occupied, and determine the prediction result of the to-be-decoded node as a first prediction result, the first condition being that the number of the first sub-nodes occupied in the m reference nodes is greater than a second threshold value and the number of the second sub-nodes occupied is less than a third threshold value;
[0301] in a case where the number of the first sub-nodes occupied and the number of the second sub-nodes occupied in the m reference nodes meet a second condition, predict that at least one of the second sub-nodes in the to-be-decoded node is occupied and the first sub-nodes in the to-be-decoded node are not occupied, and determine the prediction result of the to-be-decoded node as a second prediction result, the second condition being that the number of the second sub-nodes occupied in the m reference nodes is greater than the second threshold value and the number of the first sub-nodes occupied is less than the third threshold value;
[0302] in a case where the number of the first sub-nodes occupied and the number of the second sub-nodes occupied in the m reference nodes do not meet the first condition and the second condition, predict that at least one of the first sub-nodes and at least one of the second sub-nodes in the to-be-decoded node are occupied, and determine the prediction result of the to-be-decoded node as a third prediction result.
[0303] Optionally, the processor 1010 is further configured to:
[0304] in a case where the prediction result of the to-be-decoded node is the first prediction result and the to-be-decoded sub-node is located on the second plane of the to-be-decoded node, determine a first preset model as the context of the to-be-decoded sub-node;
[0305] in a case where the prediction result of the to-be-decoded node is the second prediction result and the to-be-decoded sub-node is located on the first plane of the to-be-decoded node, determine a second preset model as the context of the to-be-decoded sub-node;
[0306] In a case where the prediction result of the to-be-decoded node is the first prediction result and the to-be-decoded sub-node is located in the first plane of the to-be-decoded node, a neighbor node of the to-be-decoded sub-node is obtained, and a context of the to-be-decoded sub-node is determined based on an occupancy situation of the neighbor node.
[0307] In a case where the prediction result of the to-be-decoded node is the second prediction result and the to-be-decoded sub-node is located in the second plane of the to-be-decoded node, a neighbor node of the to-be-decoded sub-node is obtained, and a context of the to-be-decoded sub-node is determined based on an occupancy situation of the neighbor node.
[0308] In a case where the prediction result of the to-be-decoded node is the third prediction result, a neighbor node of the to-be-decoded sub-node is obtained, and a context of the to-be-decoded sub-node is determined based on an occupancy situation of the neighbor node.
[0309] Optionally, in a case where the first sub-node and the second sub-node in the reference node are based on n-ary tree partitioning, the second threshold is a positive integer less than or equal to , and the third threshold is a positive integer less than or equal to , where n is a positive integer.
[0310] The terminal 1000 provided by the embodiment of the present application can better utilize the occupancy information of the coded points and the decoded points in the point cloud sequence, improve the geometric compression performance of the point cloud, and improve the encoding efficiency and the decoding efficiency.
[0311] The embodiment of the present application further provides a readable storage medium, and the readable storage medium stores a program or instructions, and the program or instructions are executed by a processor to implement the above Figure 1 or Figure 6 processes of the method embodiments, and the same technical effects can be achieved. To avoid repetition, details are not described herein.
[0312] The processor is the processor in the terminal in the above embodiments. The readable storage medium includes a computer readable storage medium, such as a computer readable only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0313] The embodiment of the present application further provides a chip, and the chip includes a processor and a communication interface. The communication interface is coupled with the processor, and the processor is configured to run a program or instructions to implement the above Figure 1 or Figure 6 processes of the method embodiments, and the same technical effects can be achieved. To avoid repetition, details are not described herein.
[0314] It should be understood that the chip mentioned in the embodiments of the present application can also be referred to as a system chip, a system chip, a chip system, or a system on chip, etc.
[0315] The embodiments of the present application further provide a computer program / program product stored in a storage medium, and the computer program / program product is executed by at least one processor to implement the above-mentioned Figure 1 or Figure 6 The various processes of the method embodiments, and the same technical effects can be achieved, in order to avoid repetition, which will not be described here.
[0316] It should be noted that in this paper, the term "include", "contain" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or includes elements inherent to such process, method, article or device. Without more limitations, the element defined by the sentence "includes a…" does not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to the order of functions shown or discussed, but can also include functions performed in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method can be performed in an order different from the described order, and various steps can also be added, omitted or combined. In addition, the features described with reference to certain examples can be combined in other examples.
[0317] From the above description of the embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment method can be realized by means of software and necessary general hardware platform, of course, it can also be realized by hardware, but in many cases the former is a better embodiment. Based on such understanding, the technical solutions of the present application can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), including a plurality of instructions for making a terminal (which can be a mobile phone, computer, server, air conditioner, or network equipment, etc.) execute the method described in each embodiment of the present application.
[0318] The embodiments of the present application are described above in combination with the drawings, but the present application is not limited to the above-mentioned specific embodiments, the above-mentioned specific embodiments are only illustrative, not restrictive, and those skilled in the art can make many forms under the inspiration of the present application without departing from the scope of the present application and the protection scope of the claims.
Claims
1. A point cloud encoding method, characterized in that, include: The encoding end obtains the node to be encoded in the point cloud sequence and m reference nodes that have been encoded in the point cloud sequence, where m is a positive integer; The encoding end predicts the occupancy information of the node to be encoded based on the occupancy information of the m reference nodes, and determines the prediction result of the node to be encoded. The encoding end determines the context of the child node to be encoded based on the prediction result and the position of the child node to be encoded in the node to be encoded. The child node to be encoded is any child node obtained by partitioning the node to be encoded based on the tree structure. The encoding end performs entropy encoding on the child node to be encoded according to the context to generate the target bitstream; The encoding end acquires the node to be encoded in the point cloud sequence and the m already encoded reference nodes in the point cloud sequence, including: The encoding end acquires the nodes to be encoded in the point cloud sequence; The encoding end obtains the first k encoded nodes of the node to be encoded based on the node encoding order, where k is a positive integer; If at least one of the first k encoded nodes has target plane features, the encoding end acquires the m encoded reference nodes in the point cloud sequence.
2. The method according to claim 1, characterized in that, When at least one of the first k encoded nodes has target plane features, the encoding end acquires the m encoded reference nodes in the point cloud sequence, including: If the number of encoded nodes with target plane features in the first k encoded nodes is greater than or equal to a first threshold, the encoding end acquires the m encoded reference nodes in the point cloud sequence. Wherein, the first threshold is a positive integer less than k.
3. The method according to any one of claims 1-2, characterized in that, The encoding end acquires the node to be encoded in the point cloud sequence and the m already encoded reference nodes in the point cloud sequence, including: The encoding end acquires the nodes to be encoded in the point cloud sequence; The encoding end determines the target coordinate system based on the coordinate values of the node to be encoded; The encoding end divides the point cloud sequence into layers that belong to the same node as the node to be encoded, and determines the nodes that have the same coordinate value on the target coordinate axis as candidate reference nodes. The target coordinate axis is any coordinate axis in the target coordinate system, and the target coordinate axis is perpendicular to the target plane. The encoding end obtains m reference nodes from the candidate reference nodes.
4. The method according to claim 3, characterized in that, The encoding end predicts the occupancy information of the node to be encoded based on the occupancy information of the m reference nodes, and determines the prediction result of the node to be encoded, including: The encoding end determines a first plane and a second plane of the node, wherein the first plane and the second plane are both parallel to the target plane, and the first plane and the second plane are stacked in the extension direction of the target coordinate axis. The first plane is closer to the origin of the coordinate system than the second plane. The encoding end obtains the number of first child nodes and the number of second child nodes occupied among the m reference nodes, where the first child node is a child node located in the first plane and the second child node is a child node located in the second plane. The encoding end predicts the occupancy information of the node to be encoded based on the number of the first child nodes occupied and the number of the second child nodes occupied among the m reference nodes, and determines the prediction result of the node to be encoded.
5. The method according to claim 4, characterized in that, The encoding end predicts the occupancy information of the node to be encoded based on the number of occupied first child nodes and the number of occupied second child nodes among the m reference nodes, and determines the prediction result of the node to be encoded, including at least one of the following: If the number of occupied first child nodes and the number of occupied second child nodes in the m reference nodes meet the first condition, the encoding end predicts that at least one first child node in the node to be encoded is occupied and the second child node in the node to be encoded is not occupied, and determines the prediction result of the node to be encoded as the first prediction result. The first condition is that the number of occupied first child nodes in the m reference nodes is greater than the second threshold and the number of occupied second child nodes is less than the third threshold. If the number of occupied first child nodes and the number of occupied second child nodes in the m reference nodes meet the second condition, the encoding end predicts that at least one second child node in the node to be encoded is occupied, and the first child node in the node to be encoded is not occupied. The prediction result of the node to be encoded is determined as the second prediction result. The second condition is that the number of occupied second child nodes in the m reference nodes is greater than the second threshold, and the number of occupied first child nodes is less than the third threshold. If the number of the first child nodes occupied and the number of the second child nodes occupied in the m reference nodes do not meet the first condition and the second condition, the encoding end predicts that at least one of the first child nodes and at least one of the second child nodes in the node to be encoded are occupied, and determines the prediction result of the node to be encoded as the third prediction result.
6. The method according to claim 5, characterized in that, The encoding end determines the context of the child node to be encoded based on the prediction result and the position of the child node to be encoded within the node to be encoded, including at least one of the following: When the prediction result of the node to be encoded is the first prediction result, and the child node to be encoded is located on the second plane of the node to be encoded, the encoding end determines the first preset model as the context of the child node to be encoded; When the prediction result of the node to be encoded is the second prediction result, and the child node to be encoded is located on the first plane of the node to be encoded, the encoding end determines the second preset model as the context of the child node to be encoded; When the prediction result of the node to be encoded is the first prediction result, and the child node to be encoded is located on the first plane of the node to be encoded, the encoding end obtains the neighboring nodes of the child node to be encoded, and determines the context of the child node to be encoded based on the occupancy of the neighboring nodes. When the prediction result of the node to be encoded is the second prediction result, and the child node to be encoded is located in the second plane of the node to be encoded, the encoding end obtains the neighboring nodes of the child node to be encoded, and determines the context of the child node to be encoded based on the occupancy of the neighboring nodes; If the prediction result of the node to be encoded is the third prediction result, the encoding end obtains the neighboring nodes of the child node to be encoded, and determines the context of the child node to be encoded based on the occupancy status of the neighboring nodes.
7. The method according to claim 5, characterized in that, In the reference node, if the first child node and the second child node are based on an n-ary tree partition, the second threshold is less than or equal to The third threshold is a positive integer, less than or equal to A positive integer, where n is a positive integer.
8. A point cloud decoding method, characterized in that, include: The decoding end acquires the node to be decoded from the point cloud sequence and m previously decoded reference nodes from the point cloud sequence, where m is a positive integer. The decoding end predicts the occupancy information of the node to be decoded based on the occupancy information of the m reference nodes, and determines the prediction result of the node to be decoded. The decoding end determines the context of the child node to be decoded based on the prediction result and the position of the child node to be decoded in the node to be decoded. The child node to be decoded is any child node obtained by partitioning the node to be decoded based on the structure tree. The decoding end performs entropy decoding on the child node to be decoded according to the context to generate the target bitstream; The decoding end acquires the node to be decoded in the point cloud sequence and the m already decoded reference nodes in the point cloud sequence, including: The decoding end acquires the nodes to be decoded in the point cloud sequence; The decoding end obtains the first k decoded nodes of the node to be decoded based on the node decoding order, where k is a positive integer; If at least one of the first k decoded nodes has target plane features, the decoding end acquires the m decoded reference nodes in the point cloud sequence.
9. The method according to claim 8, characterized in that, When at least one of the first k decoded nodes has target plane features, the decoding end acquires the m decoded reference nodes in the point cloud sequence, including: If the number of decoded nodes with target plane features in the first k decoded nodes is greater than or equal to a first threshold, the decoding end acquires the m decoded reference nodes in the point cloud sequence. Wherein, the first threshold is a positive integer less than k.
10. The method according to claim 8, characterized in that, The decoding end acquires the node to be decoded in the point cloud sequence and the m already decoded reference nodes in the point cloud sequence, including: The decoding end acquires the nodes to be decoded in the point cloud sequence; The decoding end determines the target coordinate system based on the coordinate values of the node to be decoded; The decoding end divides the point cloud sequence into layers that belong to the same node as the node to be decoded, and determines the nodes that have the same coordinate value on the target coordinate axis as candidate reference nodes. The target coordinate axis is any coordinate axis in the target coordinate system, and the target coordinate axis is perpendicular to the target plane. The decoding end obtains m reference nodes from the candidate reference nodes.
11. The method according to claim 10, characterized in that, The decoding end predicts the occupancy information of the node to be decoded based on the occupancy information of the m reference nodes, and determines the prediction result of the node to be decoded, including: The decoding end determines a first plane and a second plane of the node, wherein the first plane and the second plane are both parallel to the target plane, and the first plane and the second plane are stacked along the extension direction of the target coordinate axis. The first plane is closer to the coordinate origin than the second plane, and the coordinate origin is the coordinate origin of the target coordinate system. The decoding end obtains the number of first child nodes and the number of second child nodes occupied among the m reference nodes, where the first child node is a child node located in the first plane and the second child node is a child node located in the second plane. The decoding end predicts the occupancy information of the node to be decoded based on the number of the first child nodes occupied and the number of the second child nodes occupied among the m reference nodes, and determines the prediction result of the node to be decoded.
12. The method according to claim 11, characterized in that, The decoding end predicts the occupancy information of the node to be decoded based on the number of occupied first child nodes and the number of occupied second child nodes among the m reference nodes, and determines the prediction result of the node to be decoded, including at least one of the following: If the number of occupied first child nodes and the number of occupied second child nodes in the m reference nodes meet the first condition, the decoding end predicts that at least one first child node in the node to be decoded is occupied and the second child node in the node to be decoded is not occupied, and the prediction result of the node to be decoded is determined as the first prediction result. The first condition is that the number of occupied first child nodes in the m reference nodes is greater than the second threshold and the number of occupied second child nodes is less than the third threshold. If the number of occupied first child nodes and the number of occupied second child nodes in the m reference nodes meet the second condition, the decoding end predicts that at least one second child node in the node to be decoded is occupied and the first child node in the node to be decoded is not occupied. The prediction result of the node to be decoded is determined as the second prediction result. The second condition is that the number of occupied second child nodes in the m reference nodes is greater than the second threshold and the number of occupied first child nodes is less than the third threshold. If the number of the first child nodes occupied and the number of the second child nodes occupied in the m reference nodes do not meet the first condition and the second condition, the decoding end predicts that at least one of the first child nodes and at least one of the second child nodes in the node to be decoded are occupied, and determines the prediction result of the node to be decoded as the third prediction result.
13. The method according to claim 12, characterized in that, The decoding end determines the context of the child node to be decoded based on the prediction result and the position of the child node to be decoded within the node to be decoded, including at least one of the following: When the prediction result of the node to be decoded is the first prediction result, and the child node to be decoded is located on the second plane of the node to be decoded, the decoding end determines the first preset model as the context of the child node to be decoded; When the prediction result of the node to be decoded is the second prediction result, and the child node to be decoded is located on the first plane of the node to be decoded, the decoding end determines the second preset model as the context of the child node to be decoded; When the prediction result of the node to be decoded is the first prediction result, and the child node to be decoded is located on the first plane of the node to be decoded, the decoding end obtains the neighboring nodes of the child node to be decoded, and determines the context of the child node to be decoded based on the occupancy of the neighboring nodes. When the prediction result of the node to be decoded is the second prediction result, and the child node to be decoded is located on the second plane of the node to be decoded, the decoding end obtains the neighboring nodes of the child node to be decoded, and determines the context of the child node to be decoded based on the occupancy of the neighboring nodes; If the prediction result of the node to be decoded is the third prediction result, the decoding end obtains the neighboring nodes of the child node to be decoded, and determines the context of the child node to be decoded based on the occupancy status of the neighboring nodes.
14. The method according to claim 12, characterized in that, In the reference node, if the first child node and the second child node are based on an n-ary tree partition, the second threshold is less than or equal to The third threshold is a positive integer, less than or equal to A positive integer, where n is a positive integer.
15. A point cloud encoding device, characterized in that, include: The first acquisition module is used to acquire the node to be encoded in the point cloud sequence and m reference nodes that have been encoded in the point cloud sequence, where m is a positive integer; The first prediction module is used to predict the occupancy information of the node to be encoded based on the occupancy information of the m reference nodes, and to determine the prediction result of the node to be encoded. The first determining module is used to determine the context of the child node to be encoded based on the prediction result and the position of the child node to be encoded in the node to be encoded, wherein the child node to be encoded is any child node obtained by partitioning the node to be encoded based on the structure tree. The encoding module is used to perform entropy encoding on the child node to be encoded according to the context to generate the target bitstream; The first acquisition module is further configured to: Obtain the nodes to be encoded from the point cloud sequence; Based on the node encoding order, obtain the first k encoded nodes of the node to be encoded, where k is a positive integer; If at least one of the first k encoded nodes has target plane features, obtain m encoded reference nodes in the point cloud sequence.
16. A point cloud decoding device, characterized in that, include: The second acquisition module is used to acquire the node to be decoded in the point cloud sequence and the m reference nodes that have been decoded in the point cloud sequence, where m is a positive integer; The second prediction module is used to predict the occupancy information of the node to be decoded based on the occupancy information of the m reference nodes, and to determine the prediction result of the node to be decoded. The second determining module is used to determine the context of the child node to be decoded based on the prediction result and the position of the child node to be decoded in the node to be decoded, wherein the child node to be decoded is any child node obtained by dividing the node to be decoded based on the structure tree; The decoding module is used to perform entropy decoding on the child node to be decoded based on the context to generate the target bitstream; The second acquisition module is further used for: Obtain the nodes to be decoded in the point cloud sequence; Based on the node decoding order, obtain the first k decoded nodes of the node to be decoded, where k is a positive integer; If at least one of the first k decoded nodes has target plane features, obtain the m decoded reference nodes in the point cloud sequence.
17. An electronic 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 point cloud encoding method as described in any one of claims 1-7, or to implement the steps of the point cloud decoding method as described in any one of claims 8-14.
18. A readable storage medium, characterized in that, The readable storage medium stores a program or instructions that, when executed by a processor, implement the steps of the point cloud encoding method as described in any one of claims 1-7, or the steps of the point cloud decoding method as described in any one of claims 8-14.
Citation Information
Patent Citations
Context determination for planar mode in octree-based point cloud coding
US10693492B1
Intra-frame prediction method and apparatus, encoder, decoder, and storage medium
WO2021189262A1
Point cloud encoding / decoding method, encoder, decoder, and storage medium
WO2021232251A1