WO2023173238A1 - 编解码方法、码流、编码器、解码器以及存储介质 - Google Patents

编解码方法、码流、编码器、解码器以及存储介质 Download PDF

Info

Publication number
WO2023173238A1
WO2023173238A1 PCT/CN2022/080500 CN2022080500W WO2023173238A1 WO 2023173238 A1 WO2023173238 A1 WO 2023173238A1 CN 2022080500 W CN2022080500 W CN 2022080500W WO 2023173238 A1 WO2023173238 A1 WO 2023173238A1
Authority
WO
WIPO (PCT)
Prior art keywords
current node
reference set
nodes
node
initial
Prior art date
Application number
PCT/CN2022/080500
Other languages
English (en)
French (fr)
Inventor
魏红莲
Original Assignee
Oppo广东移动通信有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Priority to PCT/CN2022/080500 priority Critical patent/WO2023173238A1/zh
Publication of WO2023173238A1 publication Critical patent/WO2023173238A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T9/00Image coding
    • G06T9/40Tree coding, e.g. quadtree, octree
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding

Definitions

  • the embodiments of the present application relate to the field of point cloud compression technology, and in particular, to a coding and decoding method, a code stream, an encoder, a decoder, and a storage medium.
  • the geometric information and attribute information of the point cloud are encoded separately. After the geometric encoding is completed, the geometric information is reconstructed, and the encoding of attribute information will depend on the reconstructed geometric information.
  • attribute information encoding is mainly aimed at encoding color information, converting it into a YUV color space that is more in line with human visual characteristics, and then performing attribute encoding on the preprocessed attribute information, and finally generating a binary attribute code stream.
  • Embodiments of the present application provide a coding and decoding method, a code stream, an encoder, a decoder, and a storage medium, which can improve the prediction accuracy of point cloud attributes and improve the coding and decoding performance of point cloud attributes.
  • embodiments of the present application provide a decoding method, which is applied to a decoder.
  • the method includes:
  • the current node After decoding the current node according to the initial reference set, the current node is placed at the target position to obtain the target reference set.
  • inventions of the present application provide an encoding method, which is applied to an encoder.
  • the method includes:
  • the current node After encoding the current node according to the initial reference set, the current node is placed at the target position to obtain the target reference set.
  • embodiments of the present application provide a code stream, which is generated by bit encoding based on the information to be encoded; wherein the information to be encoded at least includes: the attribute residual value corresponding to the current node.
  • embodiments of the present application provide an encoder, which includes a first determination unit and a coding unit; wherein,
  • the first determination unit is configured to determine the index sequence number corresponding to the current node and the initial reference set; and based on the distance between the reference node in the initial reference set and the current node, determine the target position corresponding to the maximum distance value in the initial reference set;
  • the encoding unit is configured to, after encoding the current node according to the initial reference set, place the current node at the target position to obtain the target reference set.
  • embodiments of the present application provide an encoder, which includes a first memory and a first processor; wherein,
  • a first memory for storing a computer program capable of running on the first processor
  • the first processor is used to perform the method of the second aspect when running the computer program.
  • embodiments of the present application provide a decoder, which includes a second determination unit and a decoding unit; wherein,
  • the second determination unit is configured to determine the index sequence number corresponding to the current node and the initial reference set; and based on the distance between the reference node in the initial reference set and the current node, determine the target position corresponding to the maximum distance value in the initial reference set;
  • the decoding unit is configured to decode the current node according to the initial reference set, and then place the current node at the target position to obtain the target reference set.
  • embodiments of the present application provide a decoder, which includes a second memory and a second processor; wherein,
  • a second memory for storing a computer program capable of running on the second processor
  • the second processor is used to execute the method of the first aspect when running the computer program.
  • embodiments of the present application provide a computer-readable storage medium.
  • the computer-readable storage medium stores a computer program.
  • the computer program is executed, the method of the first aspect is implemented, or the method of the second aspect is implemented. .
  • the embodiment of the present application provides a coding and decoding method, a code stream, an encoder, a decoder and a storage medium.
  • the index number corresponding to the current node and the initial reference set are determined; based on the reference node in the initial reference set and the current
  • the distance between nodes determines the target position corresponding to the maximum distance value in the initial reference set; after encoding the current node according to the initial reference set, the current node is placed at the target position to obtain the target reference set.
  • the decoding end determine the index number corresponding to the current node and the initial reference set; based on the distance between the reference node in the initial reference set and the current node, determine the target position corresponding to the maximum distance value in the initial reference set; based on the initial reference set
  • the current node place the current node at the target position to obtain the target reference set.
  • the current node is used to replace the reference node corresponding to the maximum distance value to construct a target reference set.
  • Using this target reference set to predict point cloud attributes can improve the prediction accuracy of point cloud attributes and improve the encoding and decoding performance of point cloud attributes. .
  • Figure 1A is a schematic diagram of a three-dimensional point cloud image provided by an embodiment of the present application.
  • Figure 1B is a partially enlarged schematic diagram of a three-dimensional point cloud image provided by an embodiment of the present application.
  • Figure 2A is a schematic diagram of point cloud images at different viewing angles provided by an embodiment of the present application.
  • Figure 2B is a schematic diagram of the data storage format corresponding to Figure 2A provided by an embodiment of the present application;
  • Figure 3 is a schematic diagram of a point cloud encoding and decoding network architecture provided by an embodiment of the present application
  • Figure 4 is a schematic structural diagram of a point cloud encoder provided by an embodiment of the present application.
  • Figure 5 is a schematic structural diagram of a point cloud decoder provided by an embodiment of the present application.
  • Figure 6A is a schematic diagram of the distribution of current nodes and coplanar nodes provided by an embodiment of the present application.
  • Figure 6B is a schematic diagram of the distribution of current nodes and collinear nodes provided by an embodiment of the present application.
  • Figure 6C is a schematic diagram of the distribution of current nodes and common nodes provided by an embodiment of the present application.
  • Figure 7 is a schematic flow chart of a decoding method provided by an embodiment of the present application.
  • Figures 8A to 8H are schematic diagrams of eight modes corresponding to the current node orientation provided by the embodiment of the present application.
  • Figures 9A to 9H are schematic diagrams of the distribution of coplanar, collinear, and co-point neighbor blocks corresponding to a current node in eight modes provided by an embodiment of the present application;
  • Figure 10 is a schematic flow chart of an encoding method provided by an embodiment of the present application.
  • Figure 11 is a schematic flowchart of a reference range determination provided by an embodiment of the present application.
  • Figure 12 is a schematic structural diagram of an encoder provided by an embodiment of the present application.
  • Figure 13 is a schematic diagram of the specific hardware structure of an encoder provided by an embodiment of the present application.
  • Figure 14 is a schematic structural diagram of a decoder provided by an embodiment of the present application.
  • Figure 15 is a schematic diagram of the specific hardware structure of a decoder provided by an embodiment of the present application.
  • first ⁇ second ⁇ third involved in the embodiments of this application are only used to distinguish similar objects and do not represent a specific ordering of objects. It is understandable that “first ⁇ second ⁇ The third "specific order or sequence may be interchanged where permitted, so that the embodiments of the application described herein can be implemented in an order other than that illustrated or described herein.
  • Point Cloud is a three-dimensional representation of the surface of an object.
  • collection equipment such as photoelectric radar, lidar, laser scanner, and multi-view camera, the point cloud (data) of the surface of the object can be collected.
  • Point cloud is a set of discrete points randomly distributed in space that expresses the spatial structure and surface properties of a three-dimensional object or scene.
  • Figure 1A shows a three-dimensional point cloud image
  • Figure 1B shows a partial enlargement of the three-dimensional point cloud image. It can be seen that the point cloud surface is composed of densely distributed points.
  • Two-dimensional images have information expressed in each pixel and are distributed regularly, so there is no need to record additional position information; however, the distribution of points in the point cloud in the three-dimensional space is random and irregular, so each point needs to be recorded Only the position of the point in space can completely express a point cloud.
  • each position in the collection process has corresponding attribute information, usually RGB color values, and the color values reflect the color of the object; for point clouds, the attribute information corresponding to each point is in addition to color information. , and the more common one is the reflectance value, which reflects the surface material of the object. Therefore, points in the point cloud can include point location information and point attribute information.
  • the position information of the point may be the three-dimensional coordinate information (x, y, z) of the point.
  • the position information of a point can also be called the geometric information of the point.
  • the attribute information of a point may include color information (three-dimensional color information) and/or reflectance (one-dimensional reflectance information r), and so on.
  • color information can be information on any color space.
  • the color information may be RGB information. Among them, R represents red (Red, R), G represents green (Green, G), and B represents blue (Blue, B).
  • the color information may be brightness and chrominance (YCbCr, YUV) information. Among them, Y represents brightness (Luma), Cb(U) represents blue color difference, and Cr(V) represents red color difference.
  • the points in the point cloud can include the three-dimensional coordinate information of the point and the reflectivity value of the point.
  • the points in the point cloud may include the three-dimensional coordinate information of the point and the three-dimensional color information of the point.
  • a point cloud is obtained by combining the principles of laser measurement and photogrammetry. The points in the point cloud may include the three-dimensional coordinate information of the point, the reflectivity value of the point, and the three-dimensional color information of the point.
  • Figure 2A and Figure 2B show a point cloud image and its corresponding data storage format.
  • Figure 2A provides six viewing angles of the point cloud image.
  • Figure 2B is composed of the file header information part and the data part.
  • the header information includes the data format, data representation type, total number of point cloud points, and the content represented by the point cloud. .
  • the point cloud is in ".ply" format and is represented by ASCII code.
  • the total number of points is 207242.
  • Each point has three-dimensional coordinate information (x, y, z) and three-dimensional color information (r, g, b).
  • Point clouds can be divided into:
  • Static point cloud that is, the object is stationary and the device that obtains the point cloud is also stationary;
  • Dynamic point cloud The object is moving, but the device that obtains the point cloud is stationary;
  • Dynamically acquire point clouds The device that acquires point clouds is in motion.
  • point clouds are divided into two categories according to their uses:
  • Category 1 Machine perception point cloud, which can be used in scenarios such as autonomous navigation systems, real-time inspection systems, geographic information systems, visual sorting robots, and rescue and disaster relief robots;
  • Category 2 Human eye perception point cloud, which can be used in point cloud application scenarios such as digital cultural heritage, free-viewpoint broadcasting, three-dimensional immersive communication, and three-dimensional immersive interaction.
  • Point clouds can flexibly and conveniently express the spatial structure and surface properties of three-dimensional objects or scenes, and because point clouds are obtained by directly sampling real objects, they can provide a strong sense of reality while ensuring accuracy, so they are widely used and their scope Including virtual reality games, computer-aided design, geographic information systems, automatic navigation systems, digital cultural heritage, free-viewpoint broadcasting, three-dimensional immersive telepresence, three-dimensional reconstruction of biological tissues and organs, etc.
  • Point cloud collection mainly has the following methods: computer generation, 3D laser scanning, 3D photogrammetry, etc.
  • Computers can generate point clouds of virtual three-dimensional objects and scenes; 3D laser scanning can obtain point clouds of static real-world three-dimensional objects or scenes, and can obtain millions of point clouds per second; 3D photogrammetry can obtain dynamic real-world three-dimensional objects or scenes Point clouds can obtain tens of millions of point clouds per second.
  • the number of points in each frame of the point cloud is 700,000, and each point has coordinate information xyz (float) and color information RGB (uchar)
  • the data volume of 1280 ⁇ 720 2D video at 24fps for 10s is about 1280 ⁇ 720 ⁇ 12bit ⁇ 24fps ⁇ 10s ⁇ 0.33GB
  • point cloud compression has become a key issue to promote the development of the point cloud industry.
  • the point cloud is a collection of massive points, storing the point cloud will not only consume a lot of memory, but is also not conducive to transmission. There is not such a large bandwidth to support the direct transmission of the point cloud at the network layer without compression. Therefore, , the point cloud needs to be compressed.
  • the point cloud coding framework that can compress point clouds can be the Geometry-based Point Cloud Compression (G-PCC) codec framework provided by the Moving Picture Experts Group (MPEG) Or the Video-based Point Cloud Compression (V-PCC) codec framework, or the AVS-PCC codec framework provided by AVS.
  • G-PCC Geometry-based Point Cloud Compression
  • MPEG Moving Picture Experts Group
  • V-PCC Video-based Point Cloud Compression
  • AVS-PCC codec framework provided by AVS.
  • the G-PCC encoding and decoding framework can be used to compress the first type of static point cloud and the third type of dynamic point cloud
  • the V-PCC encoding and decoding framework can be used to compress the second type of dynamic point cloud.
  • the G-PCC encoding and decoding framework is also called point cloud codec TMC13
  • the V-PCC encoding and decoding framework is also called point cloud codec TMC2.
  • FIG. 3 is a schematic diagram of the network architecture of a point cloud encoding and decoding system provided by an embodiment of the present application.
  • the network architecture includes one or more electronic devices 13 to 1N and a communication network 01 , wherein the electronic devices 13 to 1N can perform video interaction through the communication network 01 .
  • electronic devices may be various types of devices with point cloud encoding and decoding functions.
  • the electronic devices may include mobile phones, tablet computers, personal computers, personal digital assistants, navigators, digital phones, and video phones.
  • televisions, sensing equipment, servers, etc. are not limited by the embodiments of this application.
  • the decoder or encoder in the embodiment of the present application can be the above-mentioned electronic device.
  • the electronic device in the embodiment of the present application has a point cloud encoding and decoding function, and generally includes a point cloud encoder (ie, encoder) and a point cloud decoder (ie, decoder).
  • a point cloud encoder ie, encoder
  • a point cloud decoder ie, decoder
  • the following uses the AVS-PCC encoding and decoding framework as an example to illustrate the point cloud compression technology.
  • point cloud compression generally adopts the method of compressing point cloud geometric information and attribute information separately.
  • the point cloud geometric information is first encoded in the geometry encoder, and then the reconstructed geometric information is input into the attribute encoder as additional information.
  • the point cloud geometric information is first decoded in the geometry decoder, and then the decoded geometric information is input into the attribute decoder as additional information to assist in the compression of point cloud attributes.
  • the entire codec consists of pre-processing/post-processing, geometry encoding/decoding, and attribute encoding/decoding.
  • the embodiment of the present application provides a point cloud encoder.
  • Figure 4 shows the framework of the point cloud compression reference platform PCRM provided by AVS.
  • the point cloud encoder 11 includes a geometric encoder: a coordinate translation unit 111 and a coordinate quantization unit. 112. Octree construction unit 113, geometric entropy encoder 114, geometric reconstruction unit 115. Attribute encoder: attribute recoloring unit 116, color space transform unit 117, first attribute prediction unit 118, quantization unit 119 and attribute entropy encoder 1110.
  • the original geometric information is first preprocessed, the geometric origin is normalized to the minimum position in the point cloud space through the coordinate translation unit 111, and the geometric information is transferred from the float to the point cloud space through the coordinate quantization unit 112.
  • the points are converted into shapes to facilitate subsequent regularization processing; then the regularized geometric information is geometrically encoded, and the octree structure is used in the octree construction unit 113 to recursively divide the point cloud space, dividing the current node each time into eight sub-blocks of the same size, and determine the occupied codeword status of each sub-block.
  • the sub-block does not contain points, it is recorded as empty, otherwise it is recorded as non-empty.
  • the occupancy of all blocks is recorded at the last level of recursive division.
  • the codeword information is geometrically encoded; on the one hand, the geometric information expressed through the octree structure is input to the geometric entropy encoder 114 to form a geometric code stream; on the other hand, the geometric reconstruction process is performed in the geometric reconstruction unit 115. The reconstructed geometry The information is input to the attribute encoder as additional information.
  • the original attribute information is first preprocessed. Since the geometric information changes after the geometric encoding, the attribute value is reassigned to each point after the geometric encoding through the attribute recoloring unit 116 to realize the attribute Repaint.
  • the attribute information being processed is color information
  • the original color information needs to be transformed into a color space through the color space transformation unit 117 to convert it into a YUV color space that is more in line with the visual characteristics of the human eye; and then predicted through the first attribute Unit 118 performs attribute encoding on the preprocessed attribute information.
  • the point cloud needs to be reordered.
  • the reordering method is Morton code, so the traversal order of attribute encoding is Morton order.
  • the attribute prediction method in PCRM is a single point prediction based on Morton order, that is, going back one point from the current point to be encoded (current node) according to Morton order, and the node found is the prediction reference point of the current point to be encoded, and then The attribute reconstruction value of the prediction reference point is used as the attribute prediction value, and the attribute residual value is the difference between the attribute original value and the attribute prediction value of the current point to be encoded; finally, the attribute residual value is quantized through the quantization unit 119, and The quantized residual information is input to the attribute entropy encoder 1110 to form an attribute code stream.
  • the embodiment of the present application also provides a point cloud decoder.
  • Figure 5 shows the framework of the point cloud compression reference platform PCRM provided by AVS.
  • the point cloud decoder 12 includes a geometric decoder: a geometric entropy decoder 121, Octree reconstruction unit 122, coordinate inverse quantization unit 123, and coordinate inverse translation unit 124.
  • Attribute decoder attribute entropy decoder 125, inverse quantization unit 126, second attribute prediction unit 127 and color space inverse transform unit 128.
  • geometry and attributes are also decoded separately.
  • the geometry code stream is first entropy decoded through the geometric entropy decoder 121 to obtain the geometric information of each node, and then the octree structure is constructed through the octree reconstruction unit 122 in the same way as the geometry encoding, combined with
  • the decoded geometry reconstructs the geometric information expressed through the octree structure after coordinate transformation.
  • the information is coordinate inverse quantized through the coordinate inverse quantization unit 123 and inversely translated through the coordinate inverse translation unit 124 to obtain the decoded geometry information.
  • it is input to the attribute decoder as additional information.
  • the Morton order is constructed in the same way as the encoding end.
  • the attribute code stream is entropy decoded through the attribute entropy decoder 125 to obtain the quantized residual information; then inverse quantization is performed through the inverse quantization unit 126.
  • Obtain the attribute residual value similarly, in the same manner as attribute encoding, obtain the attribute prediction value of the current to-be-decoded point through the second attribute prediction unit 127, and then add the attribute prediction value and the attribute residual value to recover
  • the attribute reconstruction value of the current point to be decoded (for example, YUV attribute value); finally, the decoding attribute information is obtained through the inverse color space transformation of the color space inverse transformation unit 128 .
  • test conditions There are 4 types of test conditions:
  • Condition 1 The geometric position is limited and lossy, and the attributes are lossy;
  • Condition 3 The geometric position is lossless, and the attributes are limited and lossy
  • Condition 4 The geometric position is lossless and the attributes are lossless.
  • the universal test sequence includes five categories: Cat1A, Cat1B, Cat1C, Cat2-frame and Cat3. Among them, Cat1A and Cat2-frame point clouds only contain reflectivity attribute information, Cat1B and Cat3 point clouds only contain color attribute information, and Cat1C point clouds contain both color and reflectance attribute information.
  • Embodiment 1 Prediction branch, attribute compression adopts prediction-based method
  • Embodiment 2 Transform branch, attribute compression adopts a transformation-based method, including two transformation algorithms: one is the wavelet transform algorithm, and the other is the k-element discrete cosine transform (Discrete Cosine Transform, DCT) transformation algorithm.
  • one is the wavelet transform algorithm
  • the other is the k-element discrete cosine transform (Discrete Cosine Transform, DCT) transformation algorithm.
  • the current node is mainly predicted with reference to its adjacent nodes, and the attribute residual is calculated based on the attribute prediction value and the original attribute value of the current node.
  • the attribute residual value is transmitted to the decoder through quantization, transformation and other processes; after receiving and parsing the code stream, the decoder obtains the attribute residual value through inverse transformation and inverse quantization steps, and the decoder predicts it through the same process Obtain the attribute prediction value, superimpose the attribute prediction value and the attribute residual value to obtain the attribute reconstruction value corresponding to the current node.
  • the specific attribute prediction process mainly includes the following two types:
  • the first is a global search method based on encoding and decoding order. Assuming that the current node is Pi, the encoded/decoded reference nodes are (P0, P1,...,Pi-1).
  • the searchRange points before the current node in Hilbert order such as (Pi-searchRange,...,Pi-2,Pi-1), are searched forward one by one in Hilbert order to find the closest distance to the current node.
  • the k points of are used as the prediction nodes of the current node.
  • the point corresponding to d3 is moved out of the prediction point set, and the j point is added to the prediction point set.
  • the second type is a search method based on spatial relationships.
  • the geometric relationship between nodes i.e., spatial relationship
  • the geometric coplanar, collinear, and common point nodes of the current node are used as prediction nodes.
  • the condition that the prediction node needs to meet is that the encoding/decoding has been completed before the current node.
  • the weight value to the reciprocal of the geometric Manhattan distance between the predicted node and the current node, that is, the weight of coplanar nodes is 1, the weight of collinear nodes is 1/2, and the weight of common nodes is 1/3, and the weight of all predicted nodes is calculated.
  • the weighted average of the attribute reconstruction values is the attribute prediction value corresponding to the current node (especially, for the first node encoded, there is no reference node for prediction, and its attribute prediction value can be directly set to 0).
  • FIG. 6A shows a schematic distribution diagram of a current node and its coplanar nodes provided by an embodiment of the present application
  • FIG. 6B shows a schematic distribution diagram of a current node and its coplanar nodes provided by an embodiment of the present application
  • FIG. 6C shows a schematic distribution diagram of a current node and its common nodes provided by an embodiment of the present application.
  • the sequence number of the current node O is 7, with a total of 6 faces, 12 edges, and 8 points.
  • the coplanar nodes are 3, 5, 6, 14, 21, and 35; in Figure 6B, the colinear nodes are 1, 2, 4, 10, 12, 17, 20, 28, 33, 34, 42, and 49; in Figure 6C, the common nodes are 0, 8, 16, 24, 32, 40, 48, and 56.
  • nodes that may satisfy the condition of "encoding/decoding completed before the current node” include: coplanar nodes 3, 5, 6, Collinear nodes 1, 2, 4, 10, 12, 17, 20, 33, 34, common nodes 0, 8, 16, 24, 32, 40, 48; therefore, the predicted nodes will be at coplanar nodes 3, 5 , 6, collinear nodes 1, 2, 4, 10, 12, 17, 20, 33, 34, generated among common nodes 0, 8, 16, 24, 32, 40, 48.
  • the search method based on spatial relationships can quickly locate nodes near the current node, it may not necessarily be able to find the prediction node closest to the current node, so it cannot maximize the accuracy of intra-frame prediction.
  • embodiments of the present application provide a coding and decoding method.
  • the index number corresponding to the current node and the initial reference set are determined; based on the distance between the reference node in the initial reference set and the current node, the maximum distance is determined.
  • the target position corresponding to the value in the initial reference set after encoding the current node according to the initial reference set, place the current node at the target position to obtain the target reference set.
  • the decoding end determine the index number corresponding to the current node and the initial reference set; based on the distance between the reference node in the initial reference set and the current node, determine the target position corresponding to the maximum distance value in the initial reference set; based on the initial reference set
  • After decoding the current node place the current node at the target position to obtain the target reference set.
  • the prediction accuracy of point cloud attributes can be improved, and the encoding and decoding performance of point cloud attributes can be improved.
  • FIG. 7 shows a schematic flowchart of a decoding method provided by an embodiment of the present application. As shown in Figure 7, the method may include:
  • S701 Determine the index sequence number and initial reference set corresponding to the current node.
  • the decoding method described in the embodiment of the present application specifically refers to a point cloud decoding method, and more specifically, an intra-frame prediction method of point cloud attributes, which is used to construct a reference range for determining prediction nodes.
  • This method can be applied to point cloud decoders (also simply called “decoders").
  • the point cloud to be processed includes at least one node.
  • a node in the point cloud to be processed when decoding the node, it can be used as a node to be decoded in the point cloud to be processed, and there are multiple decoded nodes around the node.
  • the current node is the node to be decoded that currently needs to be decoded among the at least one node.
  • each node in the point cloud to be processed corresponds to a geometric information and an attribute information; wherein, the geometric information represents the spatial relationship of the point, and the attribute information represents the attribute information of the point. .
  • the attribute information may be color components, reflectivity or other attributes, which are not specifically limited in the embodiments of this application.
  • the attribute information when it is a color component, it can specifically be color information in any color space.
  • the attribute information may be color information in the RGB space, color information in the YUV space, color information in the YCbCr space, etc., which are not specifically limited in the embodiments of the present application.
  • the decoder can arrange the at least one node according to a preset decoding order in order to determine the index number corresponding to each node. In this way, according to the index number corresponding to each node, the decoder can process each node in the point cloud to be processed according to the preset decoding order.
  • the preset decoding order may be one of the following: point cloud original order, Morton order, Hilbert order, etc., which is not specifically limited in the embodiments of this application.
  • the initial reference set represents the initial reference range for each node to search for prediction nodes, and the reference nodes within this range are all decoded nodes before the current node. Specifically, assuming that the index number of the current node is i, then the nodes with index numbers 0 to i-1 are all decoded nodes, and the initial reference set is determined based on these decoded nodes.
  • the initial reference set is composed of N decoded reference nodes; the method may also include:
  • the index number of the current node is greater than or equal to 0 and less than the preset constant value, then it is determined that the value of N is equal to the index number of the current node;
  • the maximum value of the initial reference set for each node to search for prediction nodes is a fixed value, which can be represented by a preset constant value.
  • the preset constant value represents the maximum number of reference nodes included in the initial reference set.
  • the preset constant value may be 128, but this is not specifically limited.
  • N is an integer greater than or equal to 0 and less than or equal to a preset constant value. If N is equal to 0, then the initial reference set is an empty set; if N is not equal to 0, then the initial reference set is a non-empty set.
  • S702 Based on the distance between the reference node in the initial reference set and the current node, determine the target position corresponding to the maximum distance value in the initial reference set.
  • the target reference set represents the initial reference set corresponding to the next node in the preset decoding order of the current node.
  • the method may also include: when the index number of the current node is greater than or equal to 0 and less than a preset constant value, determine the position of the current node in the initial reference set according to the preset decoding order. The corresponding target position in;
  • placing the current node at the target location may include:
  • the current node is used to replace the reference node at the target position.
  • the current node can be placed in the initial reference set according to the preset decoding order.
  • the target reference set if the index number of the current node is greater than or equal to the preset constant value, then after decoding the current node according to the initial reference set, the target position corresponding to the current node in the initial reference set can be determined based on the maximum distance value. Then the current node is used to replace the reference node at the target position to obtain the target reference set.
  • decoding the current node according to the initial reference set may include:
  • the attribute reconstruction value corresponding to the current node is determined.
  • the decoder can parse the attribute residual value corresponding to the current node from the code stream.
  • the attribute residual value parsed in the code stream is the residual value after inverse transformation and inverse quantization.
  • determining the attribute reconstruction value corresponding to the current node based on the attribute residual value and the attribute predicted value may include: performing an addition calculation on the attribute residual value and the attribute predicted value, Get the attribute reconstruction value corresponding to the current node.
  • determining the attribute prediction value corresponding to the current node based on the initial reference set may include: if the index number of the current node is equal to 0, then determining that the initial reference set is an empty set, The preset attribute value is directly determined as the attribute prediction value corresponding to the current node; if the index number of the current node is not equal to 0, the initial reference set is determined to be a non-empty set, and at least one prediction node is determined from the initial reference set, based on at least one The prediction node determines the attribute prediction value corresponding to the current node.
  • the attribute prediction value corresponding to the current node can be directly set to the preset attribute value.
  • the preset attribute value can be (128, 128, 128); for the reflectance attribute, the preset attribute value can be 0; after completing the decoding process of the current node, the current node can be placed in the preset decoding order The position at the head of the team in the initial reference set. If the initial reference set is a non-empty set, then at least one prediction node can be obtained based on the initial reference set, and then the attribute prediction value corresponding to the current node is determined based on the at least one prediction node.
  • determining the attribute prediction value corresponding to the current node based on at least one prediction node may include:
  • the attribute reconstruction value of the prediction node is directly determined as the attribute prediction value corresponding to the current node;
  • At least one prediction node includes at least two prediction nodes, a weighted average calculation is performed on the respective attribute reconstruction values of the at least two prediction nodes to obtain the attribute prediction value corresponding to the current node.
  • the weighted average calculation in one possible implementation, if the weight values are all set to 1, then the weighted average calculation is performed on the respective attribute reconstruction values of at least two prediction nodes, that is, the weighted average calculation is performed on at least two prediction nodes. The reconstructed attribute values of each of the two prediction nodes are averaged. In another possible implementation, if among the at least two prediction nodes, it is assumed that the weight value of the first type node is 1, the weight value of the second type node is 1/2, and the weight value of the third type node is 1/3, then a weighted average calculation can be performed on the respective attribute reconstruction values of the at least two prediction nodes based on these weight values.
  • determining at least one prediction node from the initial reference set may include:
  • index number of the current node is equal to 1, then determine one reference node included in the initial reference set as at least one prediction node;
  • index number of the current node is equal to 2 If the index number of the current node is equal to 2, determine the two reference nodes included in the initial reference set as at least one prediction node;
  • index number of the current node is greater than or equal to 3 and less than or equal to the preset constant value, obtain the first number of reference nodes of the current node in the preset decoding order from the initial reference set, and add the first number of reference nodes to Identified as at least one prediction node;
  • a second number of reference nodes with a relatively small distance value from the current node are obtained from the initial reference set, and the second number of reference nodes are determined as at least one prediction node.
  • first quantity and the second quantity may be the same or different.
  • first number can be set to 3
  • second number can be set to k; wherein k can be a fixed value (for example, 3) or a range (for example, 3 to 16).
  • k can be a fixed value (for example, 3) or a range (for example, 3 to 16).
  • the second number of reference nodes with a relatively small distance value from the current node is obtained from the initial reference set.
  • a second number of reference nodes with relatively small distance values from the current node are obtained using a spatial relationship depth-first search method.
  • the second number of reference nodes can be determined by searching in the initial reference set using a global search method, or searching in the initial reference set using a spatial relationship search method, or by searching in the initial reference set.
  • the spatial relationship depth-first search method can be used to search in the initial reference set, and other search methods can even be used to search in the initial reference set, etc., which are not specifically limited here.
  • using a global search method to obtain a second number of reference nodes with relatively small distance values from the current node may include:
  • determining the target position corresponding to the maximum distance value in the initial reference set based on the distance between the reference node in the initial reference set and the current node may include: from the obtained N The maximum distance value is determined among the distance values, and the position corresponding to the maximum distance value in the initial reference set is used as the target position.
  • the distance value between each reference node in the initial reference set and the current node can be calculated using the Manhattan distance calculation method, the Euclidean distance calculation method, etc., which will not be specified in the embodiment of the present application. limited.
  • the second quantity is represented by k.
  • N distance values can be calculated; from these N distance values, k distance values with relatively small distance values and the maximum distance value are selected, and then based on these k distance values
  • the reference nodes whose values are determined are the k reference nodes closest to the current node, which are used as k prediction nodes; the position corresponding to the maximum distance value in the initial reference set is used as the target position to determine the farthest point for subsequent After decoding is completed, the farthest point is replaced with the current node to obtain the target reference set including the current node.
  • using a spatial relationship search method to obtain a second number of reference nodes with relatively small distance values from the current node may include:
  • K is equal to the second number, then the K reference nodes are used as the second number of reference nodes.
  • determining the target position corresponding to the maximum distance value in the initial reference set based on the distance between the reference node in the initial reference set and the current node may include: from the obtained M The maximum distance value is determined among the distance values, and the position corresponding to the maximum distance value in the initial reference set is used as the target position.
  • the reference nodes that meet the preset conditions include at least: child nodes in the upper block of the current node, child nodes in the neighbor block coplanar with the upper block of the current node, and upper blocks of the current node. Child nodes within neighbor blocks that are collinear and child nodes within neighbor blocks that have a common point with the block above the current node.
  • the upper-layer block of the current node includes at least one of the following: the parent block of the current node and the grandfather block of the current node.
  • the distance value between each of the M reference nodes and the current node can be calculated using the Manhattan distance calculation method, the Euclidean distance calculation method, etc., in the embodiment of the present application No specific limitation is made.
  • M is an integer greater than or equal to 0
  • K is an integer greater than or equal to 0 and less than or equal to M.
  • the parent block of the current node (or, the grandfather block of the current node, etc.) itself and the parent block of the current node (or, the grandfather block of the current node, etc.) can be searched from the initial reference set. etc.) sub-nodes in the neighbor blocks that are coplanar, collinear, and co-point, get M reference nodes; then determine the k reference nodes closest to the current node and the furthest distance from the current node from these M reference nodes. The furthest distance point, these k reference nodes are used as k prediction nodes for attribute prediction. After decoding is completed, the furthest distance point is replaced with the current node to obtain the target reference set including the current node.
  • the method may further include:
  • the global search method is used to calculate the distance value between the reference node in the initial reference set and the current node, and the node with a relatively small distance value is determined based on the comparison result between the distance value and the K distance values. a second number of distance values, and a second number of reference nodes determined based on the second number of distance values;
  • the target position corresponding to the maximum distance value in the initial reference set including:
  • the initial maximum distance value is updated.
  • the maximum distance value is determined based on the updated initial maximum distance value, and the position corresponding to the maximum distance value in the initial reference set is used as the target position.
  • the spatial relationship depth-first search method is used to obtain a second number of reference nodes with relatively small distance values from the current node, which may include:
  • K2 is equal to the second number, then the K2 reference nodes are used as the second number of reference nodes, and the initial maximum distance value is used as the maximum distance value;
  • K2 is less than the second number, continue to search from the initial reference set for child nodes in the neighbor block that are coplanar with the upper block of the current node, and obtain K3 reference nodes;
  • K4 Calculate the distance value between each of the K3 reference nodes and the current node, and determine K4 distance values with relatively small distance values based on the comparison results of the K3 distance values and K2 distance values. According to K4 Determine K4 reference nodes based on distance values, and update the initial maximum distance value based on K3 distance values;
  • K4 reference nodes are used as the second number of reference nodes, and the updated initial maximum distance value is used as the maximum distance value
  • K4 is less than the second number, continue to search from the initial reference set for child nodes in the neighbor block that are collinear with the upper block of the current node, and obtain K5 reference nodes;
  • K6 Calculate the distance value between each of the K5 reference nodes and the current node, and determine K6 distance values with relatively small distance values based on the comparison results of the K5 distance values and K4 distance values. According to K6 Determine K6 reference nodes based on distance values, and continue to update the initial maximum distance value based on K5 distance values;
  • K6 is equal to the second number, then the K6 reference nodes are used as the second number of reference nodes, and the updated initial maximum distance value is used as the maximum distance value;
  • K6 is less than the second number, continue to search from the initial reference set for child nodes in the neighbor block that have the same point as the upper block of the current node, and obtain K7 reference nodes;
  • K8 Calculate the distance value between each of the K7 reference nodes and the current node, and determine K8 distance values with relatively small distance values based on the comparison results of the K7 distance values and K6 distance values. According to K8 Determine K8 reference nodes based on distance values, and continue to update the initial maximum distance value based on K7 distance values;
  • K8 is equal to the second number, then the K8 reference nodes are used as the second number of reference nodes, and the updated initial maximum distance value is used as the maximum distance value;
  • K8 is less than the second number, use the global search method to calculate the distance value between the reference node in the initial reference set and the current node, and determine the relatively small distance value based on the comparison result between the distance value and K8 distance values. a second number of distance values, and a second number of reference nodes determined based on the second number of distance values;
  • the target position corresponding to the maximum distance value in the initial reference set including:
  • the maximum distance value is determined based on the updated initial maximum distance value, and the position corresponding to the maximum distance value in the initial reference set is used as the target position.
  • the upper-level block of the current node includes at least one of the following: the parent block of the current node and the grandfather block of the current node.
  • the distance value between each of the M reference nodes and the current node can be calculated using the Manhattan distance calculation method, the Euclidean distance calculation method, etc., in the embodiment of the present application No specific limitation is made.
  • the initial reference set is searched for child nodes in neighboring blocks that are coplanar with the upper block of the current node. If there are three coplanar neighboring blocks here, then these three Coplanar neighbor blocks can be searched all at once or sequentially. For example, when searching sequentially, you can first search within the first coplanar neighbor block. If the search completes the second number of reference nodes, then the search will no longer be performed; if the second number of reference nodes is not satisfied, Then search within the second coplanar neighbor block.
  • the search will no longer be performed; otherwise, continue to search within the third coplanar neighbor block, and so on; the same This can also be done for searching from the initial reference set for child nodes in the neighbor block that are collinear with the upper block of the current node, and from the initial reference set for searching for child nodes in the neighbor block that are in common with the upper block of the current node. ; There is no restriction on this here.
  • the first step can be to search the child nodes in the parent block of the current node (or the grandfather block of the current node, etc.) from the initial reference set, and determine the initial maximum distance value corresponding to The furthest distance point; if k predicted nodes are not satisfied, then the second step can be to search the child nodes in the coplanar neighbor block of the current node's parent block (or, the current node's grandparent block, etc.) from the initial reference set, And update the initial maximum distance value to update the farthest distance point; if k predicted nodes are still not satisfied, then the third step can search the parent block of the current node (or, the grandfather block of the current node, etc.) from the initial reference set for collinearity child nodes within the neighbor block, and update the initial maximum distance value to update the farthest point; if k predicted nodes are still not satisfied, then the fourth step can search the parent block of the current node (or, the current node
  • FIG. 8A to 8H there are eight modes for the orientation of the current node, including: the mode in which the current node is in the upper right side of the back as shown in Figure 8A, the mode in which the current node is in the lower right side of the back as shown in Figure 8B, The current node shown in Figure 8C is in the upper left mode of the back side, the current node shown in Figure 8D is in the lower left mode of the back side, the current node shown in Figure 8E is in the upper right mode of the front side, the current node shown in Figure 8F is in A mode in which the front side is lower right, a mode in which the current node shown in FIG.
  • Figures 9A to 9H respectively show the corresponding coplanar neighbor blocks, collinear neighbor blocks, and co-point neighbor blocks in each mode.
  • the parent block (or grandparent block, etc.) of the current node is represented by a bold box and filled with white
  • the coplanar neighbor blocks are filled with grid lines
  • the collinear neighbor blocks are filled with diagonal lines.
  • Point neighbor blocks are filled with points.
  • the embodiments of the present application provide a method for predicting point cloud attributes, which combines spatial relationships and global search, and constructs a target reference set by replacing the farthest point, thereby performing intra-frame prediction of point cloud attributes. To achieve a good compromise between coding efficiency and performance.
  • the method may further include: when the index number is greater than or equal to a preset constant value, determining the tail position of the queue in the initial reference set as the target position;
  • the method may also include: after decoding the current node according to the initial reference set, deleting the reference node at the head position in the initial reference set, and placing the current node at the target position to obtain the target reference set.
  • the head position of the team represents the corresponding position in the initial reference set of the value obtained by using the index number of the current node and the preset constant value to perform a remainder operation;
  • the tail position of the team represents the current node The position to be placed; therefore, after completing the decoding process of the current node, the point at the head position of the team in the initial reference set can be eliminated, and the current node can be added to the tail position of the team in the initial reference set; it can also be regarded as using the current node to replace the head position of the team The reference node at the location to get the target reference set.
  • the current node is decoded, and then the point at the head of the team in the initial reference set is eliminated, and the current node is added to the tail of the team; only when When entering the global search, the current node will be used to replace the farthest point to obtain the target reference set.
  • the initial reference set may include a first initial reference set and a second initial reference set; the method may further include:
  • a first target reference set is obtained; wherein the first target reference set is obtained by replacing the reference node at the target position in the first initial reference set based on the current node; and/ or
  • a second target reference set is obtained; wherein the second target reference set is based on deleting the reference node at the target position in the second initial reference set and placing the current node in the queue.
  • the tail position is obtained.
  • the method may also include: if the current node uses the spatial relationship search method or the spatial relationship depth first search method, decoding the current node according to the second initial reference set; if the current node uses the global In search mode, the current node is decoded according to the first initial reference set.
  • the first target reference set is the first initial reference set of the next node of the current node in the preset decoding order, which can be regarded as the reference range 1;
  • the second target reference set is the current node in the preset decoding order.
  • the second initial reference set of the next node on can be regarded as reference range 2. That is to say, the embodiment of the present application can maintain two reference ranges, and the contents in reference range 1 and reference range 2 are consistent, but the order is inconsistent.
  • reference range 1 is maintained by replacing the farthest point with the current node
  • reference range 2 is maintained by deleting the farthest point and placing the current node at the end of the queue; this ensures reference range 2
  • the reference nodes in are arranged in Hilbert order, which can speed up search based on spatial relationships; therefore, when determining prediction nodes based on spatial relationships, search in reference range 2; when entering global search to determine prediction nodes, then Search in reference range 1.
  • the method may also include:
  • determining the first target reference set and the second target reference set is based on deleting the reference node at the head of the team and placing the current node at the tail of the team. maintain;
  • the current node uses the global search method, it is determined that the first target reference set is maintained based on the current node replacing the reference node at the target position, and the second target reference set is based on deleting the reference node at the target position and placing the current node at The position at the end of the team is maintained.
  • the embodiments of this application can maintain two reference ranges. If k prediction nodes are found based on the spatial relationship, then the current node is decoded, and then the reference range 1 and the reference range 2 are maintained by excluding the point at the head of the team and adding the current node to the tail position; when entering During global search, reference range 1 is maintained by replacing the farthest point with the current node, while reference range 2 is maintained by eliminating the farthest point and adding the current node to the end of the queue.
  • the head position of the team represents the corresponding position in the initial reference set of the value obtained by using the index number of the current node and the preset constant value to perform a remainder operation;
  • the tail position of the team represents the current position in the initial reference set. The position where the node is to be placed; therefore, after completing the decoding process of the current node, the point at the head of the team can be eliminated and the current node added to the tail of the team; it can also be regarded as using the current node to replace the reference node at the head of the team.
  • This embodiment provides a decoding method through which the reference range can be determined.
  • the reference range is constructed by replacing the farthest point with the current node, and prediction nodes are found within this reference range for point cloud processing.
  • Intra-frame prediction of attributes can not only reduce encoding and decoding efficiency based on spatial relationships, but also improve intra-frame prediction accuracy through global search, achieving a good compromise between encoding efficiency and performance, thereby improving the encoding and decoding of point cloud attributes. performance.
  • FIG. 10 shows a schematic flowchart of an encoding method provided by an embodiment of the present application. As shown in Figure 10, the method may include:
  • S1001 Determine the index sequence number and initial reference set corresponding to the current node.
  • the encoding method described in the embodiment of the present application specifically refers to a point cloud encoding method, and more specifically, an intra-frame prediction method of point cloud attributes, which is used to construct a reference range for determining prediction nodes.
  • This method can be applied to point cloud encoders (also simply called “encoders").
  • the point cloud to be processed includes at least one node.
  • the node in the point cloud to be processed when encoding the node, it can be used as the node to be encoded in the point cloud to be processed, and there are multiple encoded nodes around the node.
  • the current node is the node to be encoded that currently needs to be encoded among the at least one node.
  • each node in the point cloud to be processed corresponds to a geometric information and an attribute information; wherein, the geometric information represents the spatial relationship of the point, and the attribute information represents the attribute information of the point.
  • the attribute information may be color components, reflectivity or other attributes, which are not specifically limited in the embodiments of this application.
  • the encoder can arrange the at least one node according to a preset encoding order to determine the index number corresponding to each node. In this way, according to the index number corresponding to each node, the encoder can process each node in the point cloud to be processed according to the preset encoding order.
  • the preset encoding order may be one of the following: point cloud original order, Morton order, Hilbert order, etc., which is not specifically limited in the embodiments of this application.
  • the initial reference set represents the initial reference range for each node to search for prediction nodes, and the reference nodes within this range are all coded nodes before the current node. Specifically, assuming that the index number of the current node is i, then the nodes with index numbers 0 to i-1 are all coded nodes, and the initial reference set is determined based on these coded nodes.
  • the initial reference set is composed of N coded reference nodes; the method may also include:
  • the index number of the current node is greater than or equal to 0 and less than the preset constant value, then it is determined that the value of N is equal to the index number of the current node;
  • the maximum value of the initial reference set for each node to search for prediction nodes is a fixed value, which can be represented by a preset constant value.
  • the preset constant value represents the maximum number of reference nodes included in the initial reference set.
  • the preset constant value may be 128, but this is not specifically limited.
  • N is an integer greater than or equal to 0 and less than or equal to a preset constant value. If N is equal to 0, then the initial reference set is an empty set; if N is not equal to 0, then the initial reference set is a non-empty set.
  • S1002 Based on the distance between the reference node in the initial reference set and the current node, determine the target position corresponding to the maximum distance value in the initial reference set.
  • the target reference set represents the initial reference set corresponding to the next node in the preset coding sequence of the current node.
  • the method may also include: when the index number of the current node is greater than or equal to 0 and less than a preset constant value, determine the position of the current node in the initial reference set according to the preset coding order. The corresponding target position in;
  • placing the current node at the target location may include:
  • the current node When the index number of the current node is greater than or equal to 0 and less than the preset constant value, the current node is directly placed at the target position in the initial reference set;
  • the current node is used to replace the reference node at the target position.
  • the current node can be placed in the initial reference set according to the preset encoding order.
  • the target reference set if the index number of the current node is greater than or equal to the preset constant value, then after encoding the current node according to the initial reference set, the target position corresponding to the current node in the initial reference set can be determined based on the maximum distance value. Then the current node is used to replace the reference node at the target position to obtain the target reference set.
  • encoding the current node according to the initial reference set may include:
  • determining the attribute residual value corresponding to the current node based on the original attribute value and the predicted attribute value may include: performing a subtraction calculation on the original attribute value and the predicted attribute value to obtain the attribute residual value corresponding to the current node. Attribute residual value.
  • the attribute residual value written into the code stream is the residual value after transformation and quantization. That is to say, the attribute residual value is encoded, including transforming and quantizing the attribute residual value, and then writing it into the code stream according to the encoding bits.
  • determining the attribute prediction value corresponding to the current node based on the initial reference set may include: if the index number is equal to 0, determining the initial reference set to be an empty set, and directly determining the preset attribute value as the current node. The corresponding attribute prediction value; if the index number is not equal to 0, determine that the initial reference set is a non-empty set, determine at least one prediction node from the initial reference set, and determine the attribute prediction value corresponding to the current node based on at least one prediction node.
  • the index number when the index number is equal to 0, it means that the initial reference set is an empty set.
  • the attribute prediction value corresponding to the current node can be directly set to the preset attribute value.
  • the preset attribute value can be (128, 128, 128); for the reflectance attribute, the preset attribute value can be 0; after completing the encoding process of the current node, the current node can be placed in the preset encoding order The position at the head of the team in the initial reference set.
  • determining at least one prediction node from the initial reference set may include:
  • one reference node included in the initial reference set is determined as at least one prediction node
  • index number If the index number is equal to 2, determine the two reference nodes included in the initial reference set as at least one prediction node
  • index number is greater than or equal to 3 and less than or equal to the preset constant value, obtain the first number of reference nodes of the current node in the preset coding sequence from the initial reference set, and determine the first number of reference nodes to be at least a prediction node;
  • a second number of reference nodes with a relatively small distance value from the current node are obtained from the initial reference set, and the second number of reference nodes are determined as at least one prediction node.
  • determining the attribute prediction value corresponding to the current node based on the at least one prediction node may include:
  • the attribute reconstruction value of the prediction node is directly determined as the attribute prediction value corresponding to the current node;
  • At least one prediction node includes at least two prediction nodes, a weighted average calculation is performed on the respective attribute reconstruction values of the at least two prediction nodes to obtain the attribute prediction value corresponding to the current node.
  • the weighted average calculation is performed on the respective attribute reconstruction values of at least two prediction nodes, that is, the weighted average calculation is performed on at least two prediction nodes.
  • the reconstructed values of the respective attributes of the predicted nodes are averaged.
  • first quantity and the second quantity may be the same or different.
  • first number can be set to 3
  • second number can be set to k; wherein k can be a fixed value (for example, 3) or a range (for example, 3 to 16).
  • k can be a fixed value (for example, 3) or a range (for example, 3 to 16).
  • the second number of reference nodes with a relatively small distance value from the current node is obtained from the initial reference set.
  • a second number of reference nodes with relatively small distance values from the current node are obtained using a spatial relationship depth-first search method.
  • using a global search method to obtain a second number of reference nodes with relatively small distance values from the current node may include:
  • determining the target position corresponding to the maximum distance value in the initial reference set based on the distance between the reference node in the initial reference set and the current node may include: from the obtained N The maximum distance value is determined among the distance values, and the position corresponding to the maximum distance value in the initial reference set is used as the target position.
  • the second quantity is represented by k.
  • N distance values can be calculated; from these N distance values, k distance values with relatively small distance values and the maximum distance value are selected, and then based on these k distance values
  • the reference nodes whose values are determined are the k reference nodes closest to the current node, which are used as k prediction nodes; the position corresponding to the maximum distance value in the initial reference set is used as the target position to determine the farthest point for subsequent After completing the encoding, replace the farthest point with the current node to obtain the target reference set including the current node.
  • using a spatial relationship search method to obtain a second number of reference nodes with relatively small distance values from the current node may include:
  • K is equal to the second number, then the K reference nodes are used as the second number of reference nodes.
  • determining the target position corresponding to the maximum distance value in the initial reference set based on the distance between the reference node in the initial reference set and the current node may include: from the obtained M The maximum distance value is determined among the distance values, and the position corresponding to the maximum distance value in the initial reference set is used as the target position.
  • the reference nodes that meet the preset conditions include at least: child nodes in the upper block of the current node, child nodes in the neighbor block coplanar with the upper block of the current node, and upper blocks of the current node. Child nodes within neighbor blocks that are collinear and child nodes within neighbor blocks that have a common point with the block above the current node.
  • M is an integer greater than or equal to 0
  • K is an integer greater than or equal to 0 and less than or equal to M.
  • the parent block of the current node (or, the grandfather block of the current node, etc.) itself and the parent block of the current node (or, the grandfather block of the current node, etc.) can be searched from the initial reference set. etc.) sub-nodes in the neighbor blocks that are coplanar, collinear, and co-point, get M reference nodes; then determine the k reference nodes closest to the current node and the furthest distance from the current node from these M reference nodes. The furthest distance point, these k reference nodes are used as k prediction nodes for attribute prediction. After completing the encoding, the furthest distance point is replaced with the current node to obtain the target reference set including the current node.
  • the method may further include:
  • the global search method is used to calculate the distance value between the reference node in the initial reference set and the current node, and the node with a relatively small distance value is determined based on the comparison result between the distance value and the K distance values. a second number of distance values, and a second number of reference nodes determined based on the second number of distance values;
  • the target position corresponding to the maximum distance value in the initial reference set including:
  • the initial maximum distance value is updated.
  • the maximum distance value is determined based on the updated initial maximum distance value, and the position corresponding to the maximum distance value in the initial reference set is used as the target position.
  • using a spatial relationship depth-first search method to obtain a second number of reference nodes with relatively small distance values from the current node may include:
  • K2 is equal to the second number, then the K2 reference nodes are used as the second number of reference nodes, and the initial maximum distance value is used as the maximum distance value;
  • K2 is less than the second number, continue to search from the initial reference set for child nodes in the neighbor block that are coplanar with the upper block of the current node, and obtain K3 reference nodes;
  • K4 Calculate the distance value between each of the K3 reference nodes and the current node, and determine K4 distance values with relatively small distance values based on the comparison results of the K3 distance values and K2 distance values. According to K4 Determine K4 reference nodes based on distance values, and update the initial maximum distance value based on K3 distance values;
  • K4 reference nodes are used as the second number of reference nodes, and the updated initial maximum distance value is used as the maximum distance value
  • K4 is less than the second number, continue to search from the initial reference set for child nodes in the neighbor block that are collinear with the upper block of the current node, and obtain K5 reference nodes;
  • K6 Calculate the distance value between each of the K5 reference nodes and the current node, and determine K6 distance values with relatively small distance values based on the comparison results of the K5 distance values and K4 distance values. According to K6 Determine K6 reference nodes based on distance values, and continue to update the initial maximum distance value based on K5 distance values;
  • K6 is equal to the second number, then the K6 reference nodes are used as the second number of reference nodes, and the updated initial maximum distance value is used as the maximum distance value;
  • K6 is less than the second number, continue to search from the initial reference set for child nodes in the neighbor block that have the same point as the upper block of the current node, and obtain K7 reference nodes;
  • K8 Calculate the distance value between each of the K7 reference nodes and the current node, and determine K8 distance values with relatively small distance values based on the comparison results of the K7 distance values and K6 distance values. According to K8 Determine K8 reference nodes based on distance values, and continue to update the initial maximum distance value based on K7 distance values;
  • K8 is equal to the second number, then the K8 reference nodes are used as the second number of reference nodes, and the updated initial maximum distance value is used as the maximum distance value;
  • K8 is less than the second number, use the global search method to calculate the distance value between the reference node in the initial reference set and the current node, and determine the relatively small distance value based on the comparison result between the distance value and K8 distance values. a second number of distance values, and a second number of reference nodes determined based on the second number of distance values;
  • the target position corresponding to the maximum distance value in the initial reference set including:
  • the maximum distance value is determined based on the updated initial maximum distance value, and the position corresponding to the maximum distance value in the initial reference set is used as the target position.
  • the upper-level block of the current node includes at least one of the following: the parent block of the current node and the grandfather block of the current node.
  • the distance value between each of the M reference nodes and the current node can be calculated using the Manhattan distance calculation method, the Euclidean distance calculation method, etc., in the embodiment of the present application No specific limitation is made.
  • the initial reference set is searched for child nodes in neighboring blocks that are coplanar with the upper block of the current node. If there are three coplanar neighboring blocks here, then these three Coplanar neighbor blocks can be searched all at once or sequentially. For example, when searching sequentially, you can first search within the first coplanar neighbor block. If the search completes the second number of reference nodes, then the search will no longer be performed; if the second number of reference nodes is not satisfied, Then search within the second coplanar neighbor block.
  • the search will no longer be performed; otherwise, continue to search within the third coplanar neighbor block, and so on; the same This can also be done for searching from the initial reference set for child nodes in the neighbor block that are collinear with the upper block of the current node, and from the initial reference set for searching for child nodes in the neighbor block that are in common with the upper block of the current node. ; There is no restriction on this here.
  • the first step can be to search for the children in the parent block of the current node (or the grandfather block of the current node, etc.) from the initial reference set. node, and determine the furthest distance point corresponding to the initial maximum distance value; if k predicted nodes are not satisfied, then the second step can be to search the parent block of the current node (or the grandfather block of the current node, etc.) from the initial reference set.
  • the third step can search the parent block of the current node from the initial reference set (or, The current node's grandparent block, etc.) child nodes within the collinear neighbor block, and update the initial maximum distance value to update the farthest point; if k predicted nodes are still not satisfied, then the fourth step can be searched from the initial reference set The child nodes in the neighbor blocks of the current node's parent block (or the current node's grandparent block, etc.), and the initial maximum distance value is updated to update the farthest point; if the sum of the previous four steps does not satisfy k predictions node, then the fifth step is to enter the global search mode and calculate the distance value between the reference node in the initial reference set and the current node in order to complete the k prediction nodes. At the same time, it is still necessary to update the initial maximum distance value to update the farthest point.
  • the embodiments of the present application provide a method for predicting point cloud attributes, which combines spatial relationships and global search, and constructs a target reference set by replacing the farthest point, thereby performing intra-frame prediction of point cloud attributes. To achieve a good compromise between coding efficiency and performance.
  • the method may further include: when the index number is greater than or equal to a preset constant value, determining the tail position of the queue in the initial reference set as the target position;
  • the method may also include: after encoding the current node according to the initial reference set, deleting the reference node at the head position in the initial reference set, and placing the current node at the target position to obtain the target reference set.
  • the current node is encoded, and then the point at the head position of the team in the initial reference set is eliminated, and the current node is added to the tail position; only when When entering the global search, the current node will be used to replace the farthest point to obtain the target reference set.
  • the head position of the team represents the corresponding position in the initial reference set of the value obtained by using the remainder operation of the current node's index number and the preset constant value; the tail position of the team represents the position where the current node is to be placed; therefore, after completing the current After the node encoding process, the point at the head position of the team in the initial reference set can be eliminated, and the current node can be added to the tail position of the team in the initial reference set; it can also be regarded as using the current node to replace the reference node at the head position of the team to obtain the target Reference collection.
  • the initial reference set includes a first initial reference set and a second initial reference set; the method may further include:
  • a first target reference set is obtained; wherein the first target reference set is obtained by replacing the reference node at the target position in the first initial reference set based on the current node; and/ or
  • a second target reference set is obtained; wherein the second target reference set is based on deleting the reference node at the target position in the second initial reference set and placing the current node in the queue.
  • the tail position is obtained.
  • the method may also include: if the current node uses the spatial relationship search method or the spatial relationship depth first search method, encoding the current node according to the second initial reference set; if the current node uses the global In search mode, the current node is encoded according to the first initial reference set.
  • the first target reference set is the first initial reference set of the next node of the current node in the preset coding order, which can be regarded as the reference range 1;
  • the second target reference set is the current node in the preset coding order.
  • the second initial reference set of the next node on can be regarded as reference range 2. That is to say, the embodiment of the present application can maintain two reference ranges, and the contents in reference range 1 and reference range 2 are consistent, but the order is inconsistent.
  • reference range 1 is maintained by replacing the farthest point with the current node
  • reference range 2 is maintained by deleting the farthest point and placing the current node at the end of the queue; this ensures reference range 2
  • the reference nodes in are arranged in Hilbert order, which can speed up search based on spatial relationships; therefore, when determining prediction nodes based on spatial relationships, search in reference range 2; when entering global search to determine prediction nodes, then Search in reference range 1.
  • the method may also include:
  • determining the first target reference set and the second target reference set is based on deleting the reference node at the head of the team and placing the current node at the tail of the team. maintain;
  • the current node uses the global search method, it is determined that the first target reference set is maintained based on the current node replacing the reference node at the target position, and the second target reference set is based on deleting the reference node at the target position and placing the current node at The position at the end of the team is maintained.
  • the embodiments of this application can maintain two reference ranges. If k prediction nodes are found based on the spatial relationship, then the current node is encoded, and then the reference range 1 and the reference range 2 are maintained by excluding the point at the head of the team and adding the current node to the tail position; when entering During global search, reference range 1 is maintained by replacing the farthest point with the current node, while reference range 2 is maintained by removing the point at the target position and adding the current node to the end of the queue.
  • the head position of the team represents the corresponding position in the initial reference set of the value obtained by using the index number of the current node and the preset constant value to perform a remainder operation;
  • the tail position of the team represents the current position in the initial reference set. The position where the node is to be placed; therefore, after completing the encoding process of the current node, the point at the head of the team can be eliminated and the current node can be added to the tail of the team; it can also be regarded as using the current node to replace the reference node at the head of the team.
  • This embodiment provides a coding method through which the reference range can be determined.
  • the reference range is constructed by replacing the farthest point with the current node, and prediction nodes are found within this reference range for point cloud processing.
  • Intra-frame prediction of attributes can not only reduce encoding and decoding efficiency based on spatial relationships, but also improve intra-frame prediction accuracy through global search, achieving a good compromise between encoding efficiency and performance, thereby improving the encoding and decoding of point cloud attributes. performance.
  • FIG. 11 shows a schematic flowchart of a reference range determination provided by the embodiment of the present application. As shown in Figure 11, the process may include:
  • S1101 Determine the index sequence number and initial reference set corresponding to the current node.
  • S1102 Determine at least one prediction node according to the initial reference set, and simultaneously determine the target position where the current node is placed within the initial reference set.
  • S1103 Predict the current node according to at least one prediction node, and after completing the encoding/decoding process of the current node, place the current node at the determined target position to obtain a target reference set.
  • the initial reference set does not include the current node
  • the target reference set includes the current node
  • the target reference set represents the next node corresponding to the current node in the preset encoding/decoding order.
  • Initial reference set That is to say, the initial reference set/target reference set here is used to characterize the reference range for determining the prediction node, and the reference range is continuously updated as the current node changes.
  • the reference range determination process shown in Figure 11 can be applied to both the encoding end and the decoding end.
  • the embodiment of this application processes each node in the point cloud according to a fixed encoding/decoding order (for example, the original order of the point cloud, Morton order, Hilbert order, etc.) at the encoding and decoding end.
  • the specific implementation steps are as follows:
  • Step 1 Assume that the maximum reference range of each node to search for predicted nodes is a fixed value, such as 128.
  • Step 2 After determining the reference range, the current node needs to determine the predicted node within the reference range, and at the same time determine the target position where the current node is placed within the reference range;
  • Step 3 Predict the current node based on the attribute reconstruction value of the predicted node, complete encoding/decoding of the current node, and then place the encoded/decoded current node at the target position within the reference range determined in step 2.
  • the embodiment of the present application may have multiple implementation modes. Three implementation modes are taken as examples for a detailed description below.
  • the first implementation mode global search (ie global search method).
  • the reference range is empty, and the attribute prediction value of the current node can be directly set to a fixed value (for example, for the color attribute, it can be set to (128,128,128); for the reflectance attribute, it can be set to 0).
  • a fixed value for example, for the color attribute, it can be set to (128,128,128); for the reflectance attribute, it can be set to 0.
  • the reference range contains the 0th node P0, then directly determine P0 as the prediction node, and after completing the encoding/decoding, the current node is added to the reference range in order;
  • the reference range includes P0 and P1, directly determine P0 and P1 as prediction nodes, and after completing encoding/decoding, add the current nodes to the reference range in order;
  • i>1208 compare the index numbers from large to small (or small to large) in the reference range to determine the k closest to the current node distance (Manhattan distance, Euclidean distance, etc.) among all nodes in the reference range.
  • nodes k can be a fixed value of 3, or a range of 3 to 16
  • the farthest point Use these k points as the prediction nodes of the current node.
  • the second implementation mode search based on spatial relationship (ie, spatial relationship search method).
  • the reference range is empty, and the attribute prediction value of the current node can be directly set to a fixed value (for example, for the color attribute, it can be set to (128,128,128); for the reflectance attribute, it can be set to 0).
  • a fixed value for example, for the color attribute, it can be set to (128,128,128); for the reflectance attribute, it can be set to 0.
  • the reference range contains the 0th node P0, then directly determine P0 as the prediction node, and after completing the encoding/decoding, the current node is added to the reference range in order;
  • the reference range includes P0 and P1, directly determine P0 and P1 as prediction nodes, and after completing encoding/decoding, add the current nodes to the reference range in order;
  • i i>128, based on the spatial relationship within the reference range, first search for the parent block of the current node (or the grandfather block of the current node, etc.), and the parent block of the current node (or the grandfather block of the current node, etc.).
  • the child nodes in the neighbor blocks of lines and common points are determined within these child nodes to determine the k nodes closest to the current node distance (Manhattan distance, Euclidean distance, etc.) (k can be a fixed value of 3, or a range of 3 ⁇ 16) and the farthest point.
  • the third implementation mode depth-first search based on spatial relationship (ie, spatial relationship depth-first search method).
  • the reference range is empty, and the attribute prediction value of the current node can be directly set to a fixed value (for example, for the color attribute, it can be set to (128,128,128); for the reflectance attribute, it can be set to 0).
  • a fixed value for example, for the color attribute, it can be set to (128,128,128); for the reflectance attribute, it can be set to 0.
  • the reference range contains the 0th node P0, then directly determine P0 as the prediction node, and after completing the encoding/decoding, the current node is added to the reference range in order;
  • the reference range includes P0 and P1, directly determine P0 and P1 as prediction nodes, and after completing encoding/decoding, add the current nodes to the reference range in order;
  • i based on the spatial relationship within the reference range, first search for the child nodes in the parent block of the current node (or the grandfather block of the current node, etc.), and determine the distance (Manhattan distance, Euclidean distance) to the current node within these child nodes. etc.) the nearest k nodes (k can be a fixed value of 3, or a range of 3 to 16) and the farthest point. If 3 to 16 prediction nodes are found, the encoding/decoding is completed through these prediction nodes.
  • replace the location of the farthest point with the current node that is, the operation of adding the current node to the reference range is completed; if 3 to 16 predicted nodes are not found, then the location of the farthest point is found based on the spatial relationship within the reference range.
  • the child nodes in the coplanar neighbor blocks of the parent block (or the grandfather block of the current node, etc.) complete 3 to 16 prediction nodes and update the farthest point.
  • the current The node replaces the location of the farthest point, that is, the operation of adding the current node to the reference range is completed; if 3 to 16 predicted nodes are still not found, the parent block of the current node is searched based on the spatial relationship within the reference range. (or the grandparent block of the current node, etc.) child nodes in the collinear neighbor block, complete 3 to 16 prediction nodes, and update the farthest point.
  • the location of the farthest point is to complete the operation of adding the current node to the reference range; if the first three steps combined do not find enough 3 to 16 predicted nodes, then search for the current node based on the spatial relationship within the reference range.
  • the child nodes in the neighbor blocks that share the same point with the parent block (or the current node's grandparent block, etc.) complete 3 to 16 prediction nodes, and update the farthest point.
  • the node replaces the location of the farthest point, that is, the operation of adding the current node to the reference range is completed; if the first four steps combined do not find enough 3 to 16 predicted nodes, then enter the global search mode to complete the 3 to 16 prediction nodes. prediction nodes and update the farthest point. After encoding/decoding is completed through these prediction nodes, the position of the farthest point is replaced with the current node, that is, the operation of adding the current node to the reference range is completed.
  • the second implementation mode and the third implementation mode if 3 to 16 prediction nodes are found based on spatial relationships, encoding/decoding is performed, and then the first position of the team within the reference range is eliminated. point, add the current node to the end of the queue, and only when entering the global search will the current node replace the farthest point.
  • reference range 1 and reference range 2 two reference ranges
  • reference range 1 and reference range 2 can be maintained, and the contents in reference range 1 and reference range 2 are consistent , but the order is inconsistent.
  • reference range 1 is maintained by replacing the farthest point with the current node; while reference range 2 is maintained by eliminating the farthest point and adding the current node to the end of the queue.
  • the search based on the spatial relationship can be accelerated; when the prediction node is determined based on the spatial relationship, the search can be performed in the reference range 2.
  • the prediction nodes within the reference range 1 and 2 are eliminated.
  • the current node is predicted based on at least one prediction node.
  • the attribute residual can also be calculated based on the attribute prediction value and the original attribute value corresponding to the current node. value, and then the attribute residual value needs to be written into the code stream for transmission to the decoding end. Therefore, embodiments of the present application also provide a code stream, which is generated by bit encoding based on the information to be encoded; wherein the information to be encoded at least includes: the attribute residual value corresponding to the current node.
  • the decoding end receives the code stream and parses the code stream, and can obtain the attribute residual value; then the decoding end uses the same process to predict the attribute prediction value, and After adding the attribute prediction value and the attribute residual value, the attribute reconstruction value corresponding to the current node can be obtained.
  • this technical solution provides a method for point cloud attribute prediction, which combines spatial relationships and global search. And by replacing the farthest point to maintain the reference range, it can not only reduce encoding and decoding efficiency based on spatial relationships, but also improve intra-frame prediction accuracy through global search, achieving a good compromise between coding efficiency and performance.
  • FIG. 12 shows a schematic structural diagram of an encoder 120 provided by an embodiment of the present application.
  • the encoder 120 may include: a first determining unit 1201 and an encoding unit 1202; wherein,
  • the first determination unit 1201 is configured to determine the index number corresponding to the current node and the initial reference set; and based on the distance between the reference node in the initial reference set and the current node, determine the target position corresponding to the maximum distance value in the initial reference set. ;
  • the encoding unit 1202 is configured to, after encoding the current node according to the initial reference set, place the current node at the target position to obtain the target reference set.
  • the first determination unit 1201 is also configured to determine the target position corresponding to the current node in the initial reference set according to the preset coding order when the index number is greater than or equal to 0 and less than the preset constant value;
  • the encoding unit 1202 is also configured to, after encoding the current node according to the initial reference set, directly place the current node at the target position in the initial reference set when the index number is greater than or equal to 0 and less than the preset constant value; When the index number is greater than or equal to the preset constant value, the current node is used to replace the reference node at the target position.
  • the preset constant value indicates that the initial reference set includes the maximum number of reference nodes, and the target reference set indicates the initial reference set corresponding to the next node in the preset coding sequence of the current node.
  • the initial reference set is composed of N coded reference nodes; accordingly, the first determination unit 1201 is also configured to determine N if the index number is greater than or equal to 0 and less than a preset constant value. The value is equal to the index serial number; if the index serial number is greater than or equal to the preset constant value, it is determined that the value of N is equal to the preset constant value.
  • the encoder 120 may also include a first prediction unit 1203 configured to obtain the original attribute value corresponding to the current node; and determine the predicted attribute value corresponding to the current node according to the initial reference set;
  • the first determination unit 1201 is also configured to determine the attribute residual value corresponding to the current node based on the original attribute value and the attribute predicted value;
  • the encoding unit 1202 is also configured to encode the attribute residual value and write the resulting encoded bits into the code stream.
  • the first determination unit 1201 is also configured to perform subtraction calculation on the original attribute value and the attribute predicted value to obtain the attribute residual value corresponding to the current node.
  • the first prediction unit 1203 is also configured to determine that the initial reference set is an empty set if the index number is equal to 0, and directly determine the preset attribute value as the attribute prediction value corresponding to the current node; if the index number is not If equal to 0, it is determined that the initial reference set is a non-empty set, at least one prediction node is determined from the initial reference set, and the attribute prediction value corresponding to the current node is determined based on at least one prediction node.
  • the first determining unit 1201 is further configured to determine a reference node included in the initial reference set as at least one prediction node if the index number is equal to 1; if the index number is equal to 2, then determine the initial reference node
  • the two reference nodes included in are determined to be at least one prediction node; if the index number is greater than or equal to 3 and less than or equal to the preset constant value, the first number of the current node in the preset coding order is obtained from the initial reference set reference nodes, determine the first number of reference nodes as at least one prediction node; if the index number is greater than the preset constant value, obtain the second number of reference nodes from the initial reference set that have a relatively small distance value from the current node.
  • the encoder 120 may further include a first search unit 1204 configured to obtain a second number with a relatively small distance value from the current node using a global search method from the initial reference set. reference nodes; or, from the initial reference set, use the spatial relationship search method to obtain the second number of reference nodes with a relatively small distance value from the current node; or, from the initial reference set, use the spatial relationship depth first
  • the search method obtains a second number of reference nodes with a relatively small distance value from the current node.
  • the first search unit 1204 is also configured to calculate the distance value between each reference node in the initial reference set and the current node, and select a relatively small distance value from the obtained N distance values. a second number of distance values; and determining a second number of reference nodes based on the second number of distance values;
  • the first determination unit 1201 is further configured to determine the maximum distance value from the obtained N distance values, and use the position corresponding to the maximum distance value in the initial reference set as the target position.
  • the first search unit 1204 is also configured to search for reference nodes that meet preset conditions from the initial reference set based on the spatial relationship between nodes, and obtain M reference nodes; and calculate M reference nodes. The distance value between each reference node in the node and the current node, select K distance values with relatively small distance values from the obtained M distance values, and determine K reference nodes based on the K distance values; and if K is equal to the second number, then the K reference nodes are used as the second number of reference nodes;
  • the first determination unit 1201 is also configured to determine the maximum distance value from the obtained M distance values, and use the position corresponding to the maximum distance value in the initial reference set as the target position;
  • the reference nodes that meet the preset conditions include at least: child nodes in the upper block of the current node, child nodes in the neighbor block that are coplanar with the upper block of the current node, and neighbor blocks that are collinear with the upper block of the current node.
  • the first search unit 1204 is also configured to use a global search method to calculate the distance value between the reference node in the initial reference set and the current node if K is less than the second number, and calculate the distance value based on the distance.
  • the comparison result between the value and the K distance values determines a second number of distance values with relatively small distance values, and determines a second number of reference nodes based on the second number of distance values;
  • the first determination unit 1201 is also configured to determine the initial maximum distance value from the obtained M distance values; and after using the global search method to calculate the distance value between the reference node in the initial reference set and the current node, if the initial If the distance between the reference node and the current node in the reference set is greater than the initial maximum distance value, the initial maximum distance value is updated; and the maximum distance value is determined based on the updated initial maximum distance value, and the maximum distance value is corresponding in the initial reference set position as the target position.
  • the first search unit 1204 is also configured to search the child nodes in the upper block of the current node from the initial reference set to obtain K1 reference nodes based on the spatial relationship between nodes; and calculate K1 The distance value between each of the reference nodes and the current node is selected from the K1 distance values obtained, and K2 distance values with relatively small distance values and the initial maximum distance value are selected, and determined based on the K2 distance values.
  • K2 reference nodes if K2 is equal to the second number, then K2 reference nodes are used as the second number of reference nodes, and the initial maximum distance value is used as the maximum distance value; if K2 is less than the second number, continue to select from the initial reference set Search for child nodes in the neighbor block that are coplanar with the upper block of the current node, and obtain K3 reference nodes; and calculate the distance value between each of the K3 reference nodes and the current node, and calculate the distance value based on the obtained K3 reference nodes.
  • the comparison result between the distance value and K2 distance values determines K4 distance values with relatively small distance values, determines K4 reference nodes based on the K4 distance values, and updates the initial maximum distance value based on the K3 distance values; if K4 is equal to the second quantity, then K4 reference nodes will be used as the second number of reference nodes, and the updated initial maximum distance value will be used as the maximum distance value; if K4 is less than the second number, continue to search for the upper block with the current node from the initial reference set For the child nodes in the collinear neighbor block, K5 reference nodes are obtained; and the distance value between each of the K5 reference nodes and the current node is calculated, and based on the obtained K5 distance values and K4 distance values
  • the comparison result determines K6 distance values with relatively small distance values, determines K6 reference nodes based on the K6 distance values, and continues to update the initial maximum distance value based on the K5 distance values; if K6 is equal to the second number, then K6 The reference no
  • K7 reference nodes obtain K7 reference nodes; and calculate the distance value between each of the K7 reference nodes and the current node, and determine the distance value based on the comparison results of the K7 distance values and K6 distance values obtained Relatively small K8 distance values, determine K8 reference nodes based on K8 distance values, and continue to update the initial maximum distance value based on K7 distance values; if K8 is equal to the second number, then K8 reference nodes are used as the second number reference nodes, use the updated initial maximum distance value as the maximum distance value; if K8 is less than the second number, use the global search method to calculate the distance value between the reference node in the initial reference set and the current node, and calculate the distance value according to the The comparison result between the distance value and K8 distance values determines a second number of distance values with relatively small distance values, and determines a second number of reference nodes based on the second number of distance values;
  • the first determination unit 1201 is also configured to, after calculating the distance value between the reference node in the initial reference set and the current node using the global search method, if the distance between the reference node and the current node in the initial reference set is greater than the initial maximum distance value, continue to update the initial maximum distance value; and determine the maximum distance value based on the updated initial maximum distance value, and use the position corresponding to the maximum distance value in the initial reference set as the target position.
  • the upper-level block of the current node includes at least one of the following: the parent block of the current node, or the grandfather block of the current node.
  • the first determination unit 1201 is also configured to determine the tail position in the initial reference set as the target position when the index number is greater than or equal to the preset constant value;
  • the encoding unit 1202 is also configured to, after encoding the current node according to the initial reference set, delete the reference node at the head position in the initial reference set, and place the current node at the target position to obtain the target reference set.
  • the initial reference set includes a first initial reference set and a second initial reference set; accordingly, the encoding unit 1202 is further configured to obtain the first target after encoding the current node according to the first initial reference set.
  • Reference set wherein, the first target reference set is obtained by replacing the reference node at the target position in the first initial reference set based on the current node; and/or, after decoding the current node according to the second initial reference set, the third target reference set is obtained.
  • Two target reference sets wherein, the second target reference set is obtained based on deleting the reference node at the target position in the second initial reference set and placing the current node at the end of the queue.
  • the encoding unit 1202 is also configured to encode the current node according to the second initial reference set if the current node uses the spatial relationship search method or the spatial relationship depth first search method; if the current node uses the global search method , then the current node is encoded according to the first initial reference set.
  • the first determination unit 1201 is also configured to determine that both the first target reference set and the second target reference set are based on deleting the head of the team if the current node uses the spatial relationship search method or the spatial relationship depth first search method.
  • the reference node of the position is maintained by placing the current node at the end of the queue; if the current node uses the global search method, the first target reference set is determined based on the current node replacing the reference node at the target position.
  • the second target The reference set is maintained based on deleting the reference node at the target position and placing the current node at the end of the queue.
  • the "unit" may be part of a circuit, part of a processor, part of a program or software, etc., and of course may also be a module, or may be non-modular.
  • each component in this embodiment can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit.
  • the above integrated units can be implemented in the form of hardware or software function modules.
  • the integrated unit is implemented in the form of a software function module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium.
  • the technical solution of this embodiment is essentially either The part that contributes to the existing technology or all or part of the technical solution can be embodied in the form of a software product.
  • the computer software product is stored in a storage medium and includes a number of instructions to make a computer device (can It is a personal computer, server, or network device, etc.) or processor that executes all or part of the steps of the method described in this embodiment.
  • the aforementioned storage media include: U disk, mobile hard disk, Read Only Memory (ROM), Random Access Memory (RAM), magnetic disk or optical disk and other media that can store program code.
  • embodiments of the present application provide a computer-readable storage medium for use in the encoder 120.
  • the computer-readable storage medium stores a computer program.
  • the computer program is executed by the first processor, any of the foregoing embodiments can be implemented. The method described in one item.
  • the encoder 120 may include: a first communication interface 1301 , a first memory 1302 and a first processor 1303 ; the various components are coupled together through a first bus system 1304 .
  • the first bus system 1304 is used to implement connection communication between these components.
  • the first bus system 1304 also includes a power bus, a control bus and a status signal bus.
  • various buses are labeled as the first bus system 1304 in FIG. 13 . in,
  • the first communication interface 1301 is used for receiving and sending signals during the process of sending and receiving information with other external network elements;
  • the first memory 1302 is used to store a computer program capable of running on the first processor 1303;
  • the first processor 1303 is configured to execute: when running the computer program:
  • the current node After encoding the current node according to the initial reference set, the current node is placed at the target position to obtain the target reference set.
  • the first memory 1302 in the embodiment of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories.
  • non-volatile memory can be read-only memory (Read-Only Memory, ROM), programmable read-only memory (Programmable ROM, PROM), erasable programmable read-only memory (Erasable PROM, EPROM), electrically removable memory. Erase programmable read-only memory (Electrically EPROM, EEPROM) or flash memory.
  • Volatile memory may be Random Access Memory (RAM), which is used as an external cache.
  • RAM static random access memory
  • DRAM dynamic random access memory
  • DRAM synchronous dynamic random access memory
  • SDRAM double data rate synchronous dynamic random access memory
  • Double Data Rate SDRAM DDRSDRAM
  • enhanced SDRAM ESDRAM
  • Synchlink DRAM SLDRAM
  • Direct Rambus RAM DRRAM
  • the first memory 1302 of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
  • the first processor 1303 may be an integrated circuit chip with signal processing capabilities. During the implementation process, each step of the above method can be completed by instructions in the form of hardware integrated logic circuits or software in the first processor 1303 .
  • the above-mentioned first processor 1303 can be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), or an off-the-shelf programmable gate array (Field Programmable Gate Array, FPGA). or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
  • DSP Digital Signal Processor
  • ASIC Application Specific Integrated Circuit
  • FPGA Field Programmable Gate Array
  • a general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.
  • the steps of the method disclosed in conjunction with the embodiments of the present application can be directly implemented by a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor.
  • the software module can be located in random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, registers and other mature storage media in this field.
  • the storage medium is located in the first memory 1302.
  • the first processor 1303 reads the information in the first memory 1302 and completes the steps of the above method in combination with its hardware.
  • the embodiments described in this application can be implemented using hardware, software, firmware, middleware, microcode, or a combination thereof.
  • the processing unit can be implemented in one or more Application Specific Integrated Circuits (ASIC), Digital Signal Processing (DSP), Digital Signal Processing Device (DSP Device, DSPD), programmable Logic device (Programmable Logic Device, PLD), Field-Programmable Gate Array (FPGA), general-purpose processor, controller, microcontroller, microprocessor, and other devices used to perform the functions described in this application electronic unit or combination thereof.
  • ASIC Application Specific Integrated Circuits
  • DSP Digital Signal Processing
  • DSP Device Digital Signal Processing Device
  • DSPD Digital Signal Processing Device
  • PLD programmable Logic Device
  • FPGA Field-Programmable Gate Array
  • the technology described in this application can be implemented through modules (such as procedures, functions, etc.) that perform the functions described in this application.
  • Software code may be stored in memory and executed by a processor.
  • the memory can be implemented in the processor or external to the processor.
  • the first processor 1303 is further configured to perform the method described in any one of the preceding embodiments when running the computer program.
  • This embodiment provides an encoder in which a target reference set is constructed based on the farthest point, and then the target reference set is used to predict point cloud attributes, which can improve the prediction accuracy of point cloud attributes, and Improve the encoding and decoding performance of point cloud attributes.
  • FIG. 14 shows a schematic structural diagram of a decoder 140 provided by an embodiment of the present application.
  • the decoder 140 may include: a second determination unit 1401 and a decoding unit 1402; wherein,
  • the second determination unit 1401 is configured to determine the index number corresponding to the current node and the initial reference set; and based on the distance between the reference node in the initial reference set and the current node, determine the target position corresponding to the maximum distance value in the initial reference set. ;
  • the decoding unit 1402 is configured to decode the current node according to the initial reference set, and then place the current node at the target position to obtain the target reference set.
  • the second determination unit 1401 is also configured to determine the target position corresponding to the current node in the initial reference set according to the preset decoding order when the index number is greater than or equal to 0 and less than the preset constant value;
  • the decoding unit 1402 is also configured to, after decoding the current node according to the initial reference set, directly place the current node at the target position in the initial reference set when the index number is greater than or equal to 0 and less than the preset constant value; When the index number is greater than or equal to the preset constant value, the current node is used to replace the reference node at the target position.
  • the preset constant value indicates that the initial reference set includes the maximum number of reference nodes, and the target reference set indicates the initial reference set corresponding to the next node in the preset decoding order of the current node.
  • the initial reference set is composed of N decoded reference nodes; accordingly, the second determination unit 1401 is also configured to determine N if the index number is greater than or equal to 0 and less than a preset constant value. The value of is equal to the index serial number; if the index serial number is greater than or equal to the preset constant value, it is determined that the value of N is equal to the preset constant value.
  • the decoder 140 may also include a second prediction unit 1403 configured to determine the attribute prediction value corresponding to the current node according to the initial reference set;
  • the decoding unit 1402 is also configured to parse the code stream and determine the attribute residual value corresponding to the current node;
  • the second determination unit 1401 is also configured to determine the attribute reconstruction value corresponding to the current node based on the attribute residual value and the attribute prediction value.
  • the second determination unit 1401 is further configured to perform an addition calculation on the attribute residual value and the attribute prediction value to obtain the attribute reconstruction value corresponding to the current node.
  • the second prediction unit 1403 is also configured to determine that the initial reference set is an empty set if the index number is equal to 0, and directly determine the preset attribute value as the attribute prediction value corresponding to the current node; if the index number is not If equal to 0, it is determined that the initial reference set is a non-empty set, at least one prediction node is determined from the initial reference set, and the attribute prediction value corresponding to the current node is determined based on at least one prediction node.
  • the second determination unit 1401 is further configured to determine a reference node included in the initial reference set as at least one prediction node if the index number is equal to 1; if the index number is equal to 2, then determine the initial reference node
  • the two reference nodes included in are determined to be at least one prediction node; if the index number is greater than or equal to 3 and less than or equal to the preset constant value, the first number of the current node in the preset decoding order is obtained from the initial reference set reference nodes, determine the first number of reference nodes as at least one prediction node; if the index number is greater than the preset constant value, obtain the second number of reference nodes from the initial reference set that have a relatively small distance value from the current node.
  • the decoder 140 may further include a second search unit 1404 configured to obtain a second number with a relatively small distance value from the current node using a global search method from the initial reference set. reference nodes; or, from the initial reference set, use the spatial relationship search method to obtain the second number of reference nodes with a relatively small distance value from the current node; or, from the initial reference set, use the spatial relationship depth first
  • the search method obtains a second number of reference nodes with a relatively small distance value from the current node.
  • the second search unit 1404 is also configured to calculate the distance value between each reference node in the initial reference set and the current node, and select a relatively small distance value from the obtained N distance values. a second number of distance values; and determining a second number of reference nodes based on the second number of distance values;
  • the second determination unit 1401 is also configured to determine the maximum distance value from the obtained N distance values, and use the position corresponding to the maximum distance value in the initial reference set as the target position.
  • the second search unit 1404 is also configured to search for reference nodes that meet preset conditions from the initial reference set based on the spatial relationship between nodes, and obtain M reference nodes; and calculate M reference nodes. The distance value between each reference node in the node and the current node, select K distance values with relatively small distance values from the obtained M distance values, and determine K reference nodes based on the K distance values; and if K is equal to the second number, then the K reference nodes are used as the second number of reference nodes;
  • the second determination unit 1401 is also configured to determine the maximum distance value from the obtained M distance values, and use the position corresponding to the maximum distance value in the initial reference set as the target position;
  • the reference nodes that meet the preset conditions include at least: child nodes in the upper block of the current node, child nodes in the neighbor block that are coplanar with the upper block of the current node, and neighbor blocks that are collinear with the upper block of the current node.
  • the second search unit 1404 is also configured to use a global search method to calculate the distance value between the reference node in the initial reference set and the current node if K is less than the second number, and calculate the distance value based on the distance value.
  • the comparison result with the K distance values determines a second number of distance values with relatively small distance values, and determines a second number of reference nodes based on the second number of distance values;
  • the second determination unit 1401 is also configured to determine the initial maximum distance value from the obtained M distance values; and after using the global search method to calculate the distance value between the reference node in the initial reference set and the current node, if the initial If the distance between the reference node and the current node in the reference set is greater than the initial maximum distance value, the initial maximum distance value is updated; and the maximum distance value is determined based on the updated initial maximum distance value, and the maximum distance value is corresponding in the initial reference set position as the target position.
  • the second search unit 1404 is also configured to search the child nodes in the upper block of the current node from the initial reference set to obtain K1 reference nodes based on the spatial relationship between nodes; and calculate K1 The distance value between each of the reference nodes and the current node is selected from the K1 distance values obtained, and K2 distance values with relatively small distance values and the initial maximum distance value are selected, and determined based on the K2 distance values.
  • K2 reference nodes if K2 is equal to the second number, then K2 reference nodes are used as the second number of reference nodes, and the initial maximum distance value is used as the maximum distance value; if K2 is less than the second number, continue to select from the initial reference set Search for child nodes in the neighbor block that are coplanar with the upper block of the current node, and obtain K3 reference nodes; and calculate the distance value between each of the K3 reference nodes and the current node, and calculate the distance value based on the obtained K3 reference nodes.
  • the comparison result between the distance value and K2 distance values determines K4 distance values with relatively small distance values, determines K4 reference nodes based on the K4 distance values, and updates the initial maximum distance value based on the K3 distance values; if K4 is equal to the second quantity, then K4 reference nodes will be used as the second number of reference nodes, and the updated initial maximum distance value will be used as the maximum distance value; if K4 is less than the second number, continue to search for the upper block with the current node from the initial reference set For the child nodes in the collinear neighbor block, K5 reference nodes are obtained; and the distance value between each of the K5 reference nodes and the current node is calculated, and based on the obtained K5 distance values and K4 distance values
  • the comparison result determines K6 distance values with relatively small distance values, determines K6 reference nodes based on the K6 distance values, and continues to update the initial maximum distance value based on the K5 distance values; if K6 is equal to the second number, then K6 The reference no
  • K7 reference nodes obtain K7 reference nodes; and calculate the distance value between each of the K7 reference nodes and the current node, and determine the distance value based on the comparison results of the K7 distance values and K6 distance values obtained Relatively small K8 distance values, determine K8 reference nodes based on K8 distance values, and continue to update the initial maximum distance value based on K7 distance values; if K8 is equal to the second number, then K8 reference nodes are used as the second number reference nodes, use the updated initial maximum distance value as the maximum distance value; if K8 is less than the second number, use the global search method to calculate the distance value between the reference node in the initial reference set and the current node, and calculate the distance value according to the The comparison result between the distance value and K8 distance values determines a second number of distance values with relatively small distance values, and determines a second number of reference nodes based on the second number of distance values;
  • the second determination unit 1401 is also configured to, after calculating the distance value between the reference node and the current node in the initial reference set using the global search method, if the distance between the reference node and the current node in the initial reference set is greater than the initial maximum distance value, continue to update the initial maximum distance value; and determine the maximum distance value based on the updated initial maximum distance value, and use the position corresponding to the maximum distance value in the initial reference set as the target position.
  • the upper-level block of the current node includes at least one of the following: the parent block of the current node, or the grandfather block of the current node.
  • the second determination unit 1401 is also configured to determine the tail position in the initial reference set as the target position when the index number is greater than or equal to the preset constant value;
  • the decoding unit 1402 is also configured to, after decoding the current node according to the initial reference set, delete the reference node at the head position in the initial reference set, and place the current node at the target position to obtain the target reference set.
  • the initial reference set includes a first initial reference set and a second initial reference set; accordingly, the decoding unit 1402 is further configured to obtain the first target after decoding the current node according to the first initial reference set.
  • Reference set wherein, the first target reference set is obtained by replacing the reference node at the target position in the first initial reference set based on the current node; and/or, after decoding the current node according to the second initial reference set, the third target reference set is obtained.
  • Two target reference sets wherein, the second target reference set is obtained based on deleting the reference node at the target position in the second initial reference set and placing the current node at the end of the queue.
  • the decoding unit 1402 is also configured to decode the current node according to the second initial reference set if the current node uses the spatial relationship search method or the spatial relationship depth first search method; if the current node uses the global search method , then the current node is decoded according to the first initial reference set.
  • the second determination unit 1401 is also configured to determine that both the first target reference set and the second target reference set are based on deleting the head of the team if the current node uses the spatial relationship search method or the spatial relationship depth first search method.
  • the reference node of the position is maintained by placing the current node at the end of the queue; if the current node uses the global search method, the first target reference set is determined based on the current node replacing the reference node at the target position.
  • the second target The reference set is maintained based on deleting the reference node at the target position and placing the current node at the end of the queue.
  • the "unit" may be part of a circuit, part of a processor, part of a program or software, etc., and of course may also be a module, or may be non-modular.
  • each component in this embodiment can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit.
  • the above integrated units can be implemented in the form of hardware or software function modules.
  • the integrated unit is implemented in the form of a software function module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium.
  • this embodiment provides a computer-readable storage medium for use in the decoder 140.
  • the computer-readable storage medium stores a computer program.
  • the computer program is executed by the second processor, the foregoing embodiments are implemented. any one of the methods.
  • the decoder 140 may include: a second communication interface 1501, a second memory 1502, and a second processor 1503; the various components are coupled together through a second bus system 1504. It can be understood that the second bus system 1504 is used to implement connection communication between these components.
  • the second bus system 1504 also includes a power bus, a control bus and a status signal bus.
  • various buses are labeled as second bus system 1504 in FIG. 15 . in,
  • the second communication interface 1501 is used for receiving and sending signals during the process of sending and receiving information with other external network elements;
  • the second memory 1502 is used to store a computer program capable of running on the second processor 1503;
  • the second processor 1503 is used to execute: when running the computer program:
  • the current node After decoding the current node according to the initial reference set, the current node is placed at the target position to obtain the target reference set.
  • the second processor 1503 is further configured to perform the method described in any one of the preceding embodiments when running the computer program.
  • This embodiment provides a decoder, in which a target reference set is constructed based on the farthest point, and then the target reference set is used to predict point cloud attributes, which can improve the prediction accuracy of point cloud attributes, and Improve the encoding and decoding performance of point cloud attributes.
  • the index number corresponding to the current node and the initial reference set are determined; based on the distance between the reference node in the initial reference set and the current node, the maximum distance value in the initial reference set is determined The corresponding target position; after encoding/decoding the current node according to the initial reference set, place the current node at the target position to obtain the target reference set. In this way, the current node is used to replace the reference node corresponding to the maximum distance value to construct a target reference set.
  • Using this target reference set to predict point cloud attributes can improve the prediction accuracy of point cloud attributes and improve the encoding and decoding performance of point cloud attributes. .

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

本申请实施例公开了一种编解码方法、码流、编码器、解码器以及存储介质,应用于解码器,该方法包括:确定当前节点对应的索引序号以及初始参考集合;基于初始参考集合中的参考节点与当前节点之间的距离,确定最大距离值在初始参考集合中对应的目标位置;根据初始参考集合对当前节点进行解码处理之后,将当前节点放置于目标位置,得到目标参考集合。这样,利用当前节点替换最大距离值对应的参考节点来构建目标参考集合,利用该目标参考集合能够提高点云属性的预测准确性,并且提高点云属性的编解码性能。

Description

编解码方法、码流、编码器、解码器以及存储介质 技术领域
本申请实施例涉及点云压缩技术领域,尤其涉及一种编解码方法、码流、编码器、解码器以及存储介质。
背景技术
在基于音视频编码标准提供的点云压缩(Audio Video Standard-Point Cloud Compression,AVS-PCC)编解码框架中,点云的几何信息和属性信息是分开进行编码的。几何编码完成后,对几何信息进行重建,而属性信息的编码将依赖于重建的几何信息。其中,属性信息编码主要针对颜色信息的编码,将其转变成更符合人眼视觉特性的YUV色彩空间,然后对预处理后属性信息进行属性编码,最终生成二进制的属性码流。
目前,点云压缩参考平台(Point Cloud Reference Model,PCRM)在属性编码过程中,主要是利用全局搜索方式或者空间关系搜索方式来实现对当前节点的属性预测。然而,已有的全局搜索方式和空间关系搜索方式均存在一些缺陷,导致用于确定预测节点的参考范围构建不准确,降低了属性预测的准确性。
发明内容
本申请实施例提供一种编解码方法、码流、编码器、解码器以及存储介质,能够提高点云属性的预测准确性,并且提高点云属性的编解码性能。
本申请实施例的技术方案可以如下实现:
第一方面,本申请实施例提供了一种解码方法,应用于解码器,该方法包括:
确定当前节点对应的索引序号以及初始参考集合;
基于初始参考集合中的参考节点与当前节点之间的距离,确定最大距离值在初始参考集合中对应的目标位置;
根据初始参考集合对当前节点进行解码处理之后,将当前节点放置于目标位置,得到目标参考集合。
第二方面,本申请实施例提供了一种编码方法,应用于编码器,该方法包括:
确定当前节点对应的索引序号以及初始参考集合;
基于初始参考集合中的参考节点与当前节点之间的距离,确定最大距离值在初始参考集合中对应的目标位置;
根据初始参考集合对当前节点进行编码处理之后,将当前节点放置于目标位置,得到目标参考集合。
第三方面,本申请实施例提供了一种码流,该码流是根据待编码信息进行比特编码生成的;其中,待编码信息至少包括:当前节点对应的属性残差值。
第四方面,本申请实施例提供了一种编码器,该编码器包括第一确定单元和编码单元;其中,
第一确定单元,配置为确定当前节点对应的索引序号以及初始参考集合;以及基于初始参考集合中的参考节点与当前节点之间的距离,确定最大距离值在初始参考集合中对应的目标位置;
编码单元,配置为根据初始参考集合对当前节点进行编码处理之后,将当前节点放置于目标位置,得到目标参考集合。
第五方面,本申请实施例提供了一种编码器,该编码器包括第一存储器和第一处理器;其中,
第一存储器,用于存储能够在第一处理器上运行的计算机程序;
第一处理器,用于在运行计算机程序时,执行如第二方面的方法。
第六方面,本申请实施例提供了一种解码器,该解码器包括第二确定单元和解码单元;其中,
第二确定单元,配置为确定当前节点对应的索引序号以及初始参考集合;以及基于初始参考集合中的参考节点与当前节点之间的距离,确定最大距离值在初始参考集合中对应的目标位置;
解码单元,配置为根据初始参考集合对当前节点进行解码处理之后,将当前节点放置于目标位置,得到目标参考集合。
第七方面,本申请实施例提供了一种解码器,该解码器包括第二存储器和第二处理器;其中,
第二存储器,用于存储能够在第二处理器上运行的计算机程序;
第二处理器,用于在运行计算机程序时,执行如第一方面的方法。
第八方面,本申请实施例提供了一种计算机可读存储介质,该计算机可读存储介质存储有计算机程序,计算机程序被执行时实现如第一方面的方法、或者实现如第二方面的方法。
本申请实施例提供了一种编解码方法、码流、编码器、解码器以及存储介质,在编码端,确定当前节点对应的索引序号以及初始参考集合;基于初始参考集合中的参考节点与当前节点之间的距离,确定最大距离值在初始参考集合中对应的目标位置;根据初始参考集合对当前节点进行编码处理之后,将当前节点放置于目标位置,得到目标参考集合。在解码端,确定当前节点对应的索引序号以及初始参考集合;基于初始参考集合中的参考节点与当前节点之间的距离,确定最大距离值在初始参考集合中对应的目标位置;根据初始参考集合对当前节点进行解码处理之后,将当前节点放置于目标位置,得到目标参考集合。这样,利用当前节点替换最大距离值对应的参考节点来构建目标参考集合,利用该目标参考集合进行点云的属性预测,能够提高点云属性的预测准确性,并且提高点云属性的编解码性能。
附图说明
图1A为本申请实施例提供的一种三维点云图像示意图;
图1B为本申请实施例提供的一种三维点云图像的局部放大示意图;
图2A为本申请实施例提供的一种不同观看角度下的点云图像示意图;
图2B为本申请实施例提供的一种图2A对应的数据存储格式示意图;
图3为本申请实施例提供的一种点云编解码的网络架构示意图;
图4为本申请实施例提供的一种点云编码器的组成结构示意图;
图5为本申请实施例提供的一种点云解码器的组成结构示意图;
图6A为本申请实施例提供的一种当前节点与共面节点的分布示意图;
图6B为本申请实施例提供的一种当前节点与共线节点的分布示意图;
图6C为本申请实施例提供的一种当前节点与共点节点的分布示意图;
图7为本申请实施例提供的一种解码方法的流程示意图;
图8A~图8H为本申请实施例提供的一种当前节点方位对应的八种模式示意图;
图9A~图9H为本申请实施例提供的一种当前节点在八种模式下对应的共面、共线、共点邻居块的分布示意图;
图10为本申请实施例提供的一种编码方法的流程示意图;
图11为本申请实施例提供的一种参考范围确定的流程示意图;
图12为本申请实施例提供的一种编码器的组成结构示意图;
图13为本申请实施例提供的一种编码器的具体硬件结构示意图;
图14为本申请实施例提供的一种解码器的组成结构示意图;
图15为本申请实施例提供的一种解码器的具体硬件结构示意图。
具体实施方式
为了能够更加详尽地了解本申请实施例的特点与技术内容,下面结合附图对本申请实施例的实现进行详细阐述,所附附图仅供参考说明之用,并非用来限定本申请实施例。
除非另有定义,本文所使用的所有的技术和科学术语与属于本申请的技术领域的技术人员通常理解的含义相同。本文中所使用的术语只是为了描述本申请实施例的目的,不是旨在限制本申请。
在以下的描述中,涉及到“一些实施例”,其描述了所有可能实施例的子集,但是可以理解,“一些实施例”可以是所有可能实施例的相同子集或不同子集,并且可以在不冲突的情况下相互结合。
还需要指出,本申请实施例所涉及的术语“第一\第二\第三”仅是用于区别类似的对象,不代表针对对象的特定排序,可以理解地,“第一\第二\第三”在允许的情况下可以互换特定的顺序或先后次序,以使这里描述的本申请实施例能够以除了在这里图示或描述的以外的顺序实施。
点云(Point Cloud)是物体表面的三维表现形式,通过光电雷达、激光雷达、激光扫描仪、多视角相机等采集设备,可以采集得到物体表面的点云(数据)。
点云是空间中一组无规则分布的、表达三维物体或场景的空间结构及表面属性的离散点集,图1A展示了三维点云图像和图1B展示了三维点云图像的局部放大图,可以看到点云表面是由分布稠密的点所组成的。
二维图像在每一个像素点均有信息表达,分布规则,因此不需要额外记录其位置信息;然而点云中的点在三维空间中的分布具有随机性和不规则性,因此需要记录每一个点在空间中的位置,才能完整地表达一幅点云。与二维图像类似,采集过程中每一个位置均有对应的属性信息,通常为RGB颜色值,颜色值反映物体的色彩;对于点云来说,每一个点所对应的属性信息除了颜色信息以外,还有比较常见的是反射率(reflectance)值,反射率值反映物体的表面材质。因此,点云中的点可以包括点的位置信息和点的属性信息。例如,点的位置信息可以是点的三维坐标信息(x,y,z)。点的位置信息也可称为点的几何信息。例如,点的属性信息可以包括颜色信息(三维颜色信息)和/或反射率(一维反射率信息r)等等。例如,颜色信息可以是任意一种色彩空间上的信息。例如,颜色信息可以是RGB信息。其中,R表示红色(Red,R),G表示绿色(Green,G),B表示蓝色(Blue,B)。再如,颜色信息可以是亮度色度(YCbCr,YUV)信息。其中,Y表示明亮度(Luma),Cb(U)表示蓝色色差,Cr(V)表示红色色差。
根据激光测量原理得到的点云,点云中的点可以包括点的三维坐标信息和点的反射率值。再如,根据摄影测量原理得到的点云,点云中的点可以可包括点的三维坐标信息和点的三维颜色信息。再如,结合激光测量和摄影测量原理得到点云,点云中的点可以可包括点的三维坐标信息、点的反射率值和点的三维颜色信息。
如图2A和图2B所示为一幅点云图像及其对应的数据存储格式。其中,图2A提供了点云图像的六个观看角度,图2B由文件头信息部分和数据部分组成,头信息包含了数据格式、数据表示类型、点云总点数、以及点云所表示的内容。例如,点云为“.ply”格式,由ASCII码表示,总点数为207242,每个点具有三维坐标信息(x,y,z)和三维颜色信息(r,g,b)。
点云可以按获取的途径分为:
静态点云:即物体是静止的,获取点云的设备也是静止的;
动态点云:物体是运动的,但获取点云的设备是静止的;
动态获取点云:获取点云的设备是运动的。
例如,按点云的用途分为两大类:
类别一:机器感知点云,其可以用于自主导航系统、实时巡检系统、地理信息系统、视觉分拣机器人、抢险救灾机器人等场景;
类别二:人眼感知点云,其可以用于数字文化遗产、自由视点广播、三维沉浸通信、三维沉浸交互等点云应用场景。
点云可以灵活方便地表达三维物体或场景的空间结构及表面属性,并且由于点云通过直接对真实物体采样获得,在保证精度的前提下能提供极强的真实感,因而应用广泛,其范围包括虚拟现实游戏、计算机辅助设计、地理信息系统、自动导航系统、数字文化遗产、自由视点广播、三维沉浸远程呈现、生物组织器官三维重建等。
点云的采集主要有以下途径:计算机生成、3D激光扫描、3D摄影测量等。计算机可以生成虚拟三维物体及场景的点云;3D激光扫描可以获得静态现实世界三维物体或场景的点云,每秒可以获取百万级点云;3D摄影测量可以获得动态现实世界三维物体或场景的点云,每秒可以获取千万级点云。这些技术降低了点云数据获取成本和时间周期,提高了数据的精度。点云数据获取方式的变革,使大量点云数据的获取成为可能,伴随着应用需求的增长,海量3D点云数据的处理遭遇存储空间和传输带宽限制的瓶颈。
示例性地,以帧率为30帧每秒(fps)的点云视频为例,每帧点云的点数为70万,每个点具有坐标信息xyz(float)和颜色信息RGB(uchar),则10s点云视频的数据量大约为0.7million×(4Byte×3+1Byte×3)×30fps×10s=3.15GB,其中,1Byte为8bit,而YUV采样格式为4:2:0,帧率为24fps的1280×720二维视频,其10s的数据量约为1280×720×12bit×24fps×10s≈0.33GB,10s的两视角三维视频的数据量约为0.33×2=0.66GB。由此可见,点云视频的数据量远超过相同时长的二维视频和三维视频的数据量。因此,为更好地实现数据管理,节省服务器存储空间,降低服务器与客户端之间的传输流量及传输时间,点云压缩成为促进点云产业发展的关键问题。
也就是说,由于点云是海量点的集合,存储点云不仅会消耗大量的内存,而且不利于传输,也没有这么大的带宽可以支持将点云不经过压缩直接在网络层进行传输,因此,需要对点云进行压缩。
目前,可对点云进行压缩的点云编码框架可以是运动图像专家组(Moving Picture Experts Group,MPEG)提供的基于几何的点云压缩(Geometry-based Point Cloud Compression,G-PCC)编解码框架或基于视频的点云压缩(Video-based Point Cloud Compression,V-PCC)编解码框架,也可以是AVS提供的AVS-PCC编解码框架。G-PCC编解码框架可用于针对第一类静态点云和第三类动态获取点云进行压缩,V-PCC编解码框架可用于针对第二类动态点云进行压缩。G-PCC编解码框架也称为点云编解码器 TMC13,V-PCC编解码框架也称为点云编解码器TMC2。
本申请实施例提供了一种包含解码方法和编码方法的点云编解码系统的网络架构,图3为本申请实施例提供的一种点云编解码的网络架构示意图。如图3所示,该网络架构包括一个或多个电子设备13至1N和通信网络01,其中,电子设备13至1N可以通过通信网络01进行视频交互。电子设备在实施的过程中可以为各种类型的具有点云编解码功能的设备,例如,所述电子设备可以包括手机、平板电脑、个人计算机、个人数字助理、导航仪、数字电话、视频电话、电视机、传感设备、服务器等,本申请实施例不作限制。其中,本申请实施例中的解码器或编码器就可以为上述电子设备。
其中,本申请实施例中的电子设备具有点云编解码功能,一般包括点云编码器(即编码器)和点云解码器(即解码器)。
下面以AVS-PCC编解码框架为例进行点云压缩技术的说明。
可以理解,点云压缩一般采用点云几何信息和属性信息分别压缩的方式,在编码端,首先在几何编码器中编码点云几何信息,然后将重建几何信息作为附加信息输入到属性编码器中,辅助点云属性的压缩;在解码端,首先在几何解码器中解码点云几何信息,然后将解码后的几何信息作为附加信息输入到属性解码器中,辅助点云属性的压缩。整个编解码器由预处理/后处理、几何编码/解码、属性编码/解码几部分组成。
本申请实施例提供一种点云编码器,如图4所示为AVS所提供的点云压缩参考平台PCRM的框架,该点云编码器11包括几何编码器:坐标平移单元111、坐标量化单元112、八叉树构建单元113、几何熵编码器114、几何重建单元115。属性编码器:属性重上色单元116、颜色空间变换单元117、第一属性预测单元118、量化单元119和属性熵编码器1110。
对于PCRM,在编码端的几何编码部分,首先对原始几何信息进行预处理,通过坐标平移单元111将几何原点归一化到点云空间中的最小值位置,通过坐标量化单元112将几何信息从浮点数转化为整形,便于后续的规则化处理;然后对规则化的几何信息进行几何编码,在八叉树构建单元113中采用八叉树结构对点云空间进行递归划分,每次将当前节点划分成八个相同大小的子块,并判断每个子块的占有码字情况,当子块内不包含点时记为空,否则记为非空,在递归划分的最后一层记录所有块的占有码字信息,并进行几何编码;通过八叉树结构表达的几何信息一方面输入到几何熵编码器114中形成几何码流,另一方面在几何重建单元115进行几何重建处理,重建后的几何信息作为附加信息输入到属性编码器中。
在属性编码部分,首先对原始的属性信息进行预处理,由于几何信息在几何编码之后有所异动,因此,通过属性重上色单元116为几何编码后的每一个点重新分配属性值,实现属性重上色。此外,如果处理的属性信息为颜色信息,还需要将原始的颜色信息通过颜色空间变换单元117进行颜色空间变换,将其转变成更符合人眼视觉特性的YUV色彩空间;然后通过第一属性预测单元118对预处理后属性信息进行属性编码,属性编码首先需要将点云进行重排序,重排序的方式是莫顿码,因此属性编码的遍历顺序为莫顿顺序。PCRM中的属性预测方法为基于莫顿顺序的单点预测,即按照莫顿顺序从当前待编码点(当前节点)向前回溯一个点,找到的节点为当前待编码点的预测参考点,然后将预测参考点的属性重建值作为属性预测值,属性残差值为当前待编码点的属性原始值与属性预测值之间的差值;最后通过量化单元119对属性残差值进行量化,将量化后的残差信息输入到属性熵编码器1110中形成属性码流。
本申请实施例还提供一种点云解码器,如图5所示为AVS所提供的点云压缩参考平台PCRM的框架,该点云解码器12包括几何解编码器:几何熵解码器121、八叉树重建单元122、坐标反量化单元123、坐标反平移单元124。属性解码器:属性熵解码器125、反量化单元126、第二属性预测单元127和颜色空间反变换单元128。
在解码端,同样采用几何和属性分别解码的方式。在几何解码部分,首先通过几何熵解码器121对几何码流进行熵解码,得到每个节点的几何信息,然后按照和几何编码相同的方式通过八叉树重建单元122构建八叉树结构,结合解码几何重建出坐标变换后的、通过八叉树结构表达的几何信息,一方面将该信息通过坐标反量化单元123进行坐标反量化和通过坐标反平移单元124进行反平移,得到解码几何信息。另一方面作为附加信息输入到属性解码器中。在属性解码部分,按照与编码端相同的方式构建莫顿顺序,先通过属性熵解码器125对属性码流进行熵解码,得到量化后的残差信息;然后通过反量化单元126进行反量化,得到属性残差值;类似的,按照与属性编码相同的方式,通过第二属性预测单元127获得当前待解码点的属性预测值,然后将属性预测值与属性残差值相加,可以恢复出当前待解码点的属性重建值(例如,YUV属性值);最后,经过颜色空间反变换单元128的颜色空间反变换得到解码属性信息。
还可以理解,对于AVS-PCC编解码框架而言,通用测试条件如下:
(1)测试条件共4种:
条件1:几何位置有限度有损、属性有损;
条件2:几何位置无损、属性有损;
条件3:几何位置无损、属性有限度有损;
条件4:几何位置无损、属性无损。
(2)通用测试序列包括Cat1A,Cat1B,Cat1C,Cat2-frame和Cat3共五类。其中,Cat1A、Cat2-frame点云只包含反射率属性信息,Cat1B、Cat3点云只包含颜色属性信息,Cat1C点云同时包含颜色和反射率属性信息。
(3)实施方式:共2种,以属性压缩所采用的算法进行区分。
实施方式1:预测分支,属性压缩采用基于预测的方法;
实施方式2:变换分支,属性压缩采用基于变换的方法,共包含两种变换算法:一种是小波变换算法,一种是k元离散余弦变换(Discrete Cosine Transform,DCT)变换算法。
(4)对于点云压缩中的属性编码部分,具体是指帧内预测部分,这里主要参考当前节点的相邻节点对当前节点进行预测,根据属性预测值与当前节点的属性原始值计算属性残差值后经量化、变换等过程,将属性残差值传输到解码端;解码端在接收并解析码流后,经反变换与反量化等步骤得到属性残差值,解码端以相同过程预测得到属性预测值,将属性预测值与属性残差值叠加后得到当前节点对应的属性重建值。
其中,在编码端和解码端均实施相同的操作来确定属性预测值,具体的属性预测过程主要包括以下两种:
第一种为基于编解码顺序的全局搜索方式。假定当前节点为Pi,则已编码/解码的参考节点为(P0,P1,…,Pi-1)。
如果i=0,那么无需查找,直接将{128,128,128}作为预测值;
如果i=1,那么P0作为预测节点;
如果i=2,那么P0、P1作为预测节点;
如果i>=3,那么若i<maxNumOfNeighbours,则searchRange=i,否则searchRange=maxNumOfNeighbours(其中,maxNumOfNeighbours为一特定数值,例如128)。
这样,在当前节点希尔伯特顺序之前的searchRange个点,例如(Pi-searchRange,…,Pi-2,Pi-1)中按照希尔伯特顺序逐一向前搜索,查找与当前节点距离最近的k个点作为当前节点的预测节点,具体过程如下:
(a)当在处理当前节点在希尔伯特顺序下的首3个节点时,按照顺序将这3个节点插入预测点集合,且每插入一个节点之后,都要根据预测点集合中的点(xi-j,yi-j,zi-j)与当前节点(xi,yi,zi)之间的距离,对预测点集合中的点进行升序排序,使得排序之后的三个点的距离满足d1<=d2<=d3。其中,距离d的计算采用曼哈顿距离计算方法,定义为:
d=|xi-xi-j|+|yi-yi-j|+|zi-zi-j|                  (1)
(b)继续向前搜索第j点,当预测点集合中的点数等于3个时,若第j点与当前节点之间的距离dj=d3,则将第j点加入到等距离点集合中;
若第j点与当前节点之间的距离dj<d3,则将d3对应的点移出预测点集合,并将j点加入预测点集合,加入新点后再次根据预测点集合中的点与当前节点之间的距离,对预测点集合中的点进行升序排序,然后将重排序后的d3与被移出点的距离dtemp进行比较,若dtemp=d3,则将被移出的点加入到等距离点集合中,否则将等距离点集合清空;
(c)直到搜索到点Pi-searchRange,最终获得3个距离最近的点作为预测节点,以及最多13个等距离点。
第二种为基于空间关系的搜索方式。利用节点与节点之间的几何关系(即空间关系),以当前节点的几何共面、共线、共点节点作为预测节点,同时预测节点需要满足的条件是在当前节点之前已编码/解码完成,然后将权重值设为预测节点与当前节点的几何曼哈顿距离的倒数,即共面节点权重为1,共线节点权重为1/2,共点节点权重为1/3,计算所有预测节点的属性重建值的加权平均值为当前节点对应的属性预测值(特别的,对于编码的第一个节点,没有参考节点进行预测,其属性预测值可直接设置为0)。
简单来说,需要满足的两个条件为:(a)与当前节点满足共面、共线、共点关系;(b)在当前节点之前已编码/解码完成。
示例性地,图6A示出了本申请实施例提供的一种当前节点与其共面节点的分布示意图,图6B示出了本申请实施例提供的一种当前节点与其共线节点的分布示意图,图6C示出了本申请实施例提供的一种当前节点与其共点节点的分布示意图。如图6A-图6C所示,假设当前节点O的序号为7,共有6 个面,12条边,8个点。其中,在图6A中,共面节点有3、5、6、14、21、35;在图6B中,共线节点有1、2、4、10、12、17、20、28、33、34、42、49;在图6C中,共点节点有0、8、16、24、32、40、48、56。
在所有这些共面节点、共线节点、共点节点中,无论当前节点的位置如何,可能满足“在当前节点之前已编码/解码完成”条件的节点包括:共面节点3、5、6,共线节点1、2、4、10、12、17、20、33、34,共点节点0、8、16、24、32、40、48;因此,预测节点将在共面节点3、5、6,共线节点1、2、4、10、12、17、20、33、34,共点节点0、8、16、24、32、40、48当中产生。
然而,基于空间关系的搜索方式虽然能较快定位到与当前节点附近的节点,但不一定能够找到距离当前节点最近的预测节点,因此不能最大化帧内预测的准确性。
基于此,本申请实施例提供了一种编解码方法,在编码端,确定当前节点对应的索引序号以及初始参考集合;基于初始参考集合中的参考节点与当前节点之间的距离,确定最大距离值在初始参考集合中对应的目标位置;根据初始参考集合对当前节点进行编码处理之后,将当前节点放置于目标位置,得到目标参考集合。在解码端,确定当前节点对应的索引序号以及初始参考集合;基于初始参考集合中的参考节点与当前节点之间的距离,确定最大距离值在初始参考集合中对应的目标位置;根据初始参考集合对当前节点进行解码处理之后,将当前节点放置于目标位置,得到目标参考集合。这样,通过替换最大距离值对应的参考节点来构建目标参考集合,利用该目标参考集合进行点云的属性预测,能够提高点云属性的预测准确性,并且提高点云属性的编解码性能。
下面将结合附图对本申请各实施例进行详细说明。
在本申请的一实施例中,参见图7,其示出了本申请实施例提供的一种解码方法的流程示意图。如图7所示,该方法可以包括:
S701:确定当前节点对应的索引序号以及初始参考集合。
需要说明的是,本申请实施例所述的解码方法具体是指点云解码方法,更具体地是一种点云属性的帧内预测方法,用于构建确定预测节点的参考范围。该方法可以应用于点云解码器(也可简称为“解码器”)。
还需要说明的是,在本申请实施例中,待处理点云包括至少一个节点。其中,对于待处理点云中的节点,在对该节点进行解码时,其可以作为待处理点云中的待解码节点,而且该节点的周围存在有多个已解码节点。在这里,当前节点即是这至少一个节点中当前需要解码的待解码节点。
进一步地,在本申请实施例中,对于待处理点云中的每一个节点,其对应一个几何信息和一个属性信息;其中,几何信息表征该点的空间关系,属性信息表征该点的属性信息。
在这里,属性信息可以为颜色分量,也可以是反射率或者其它属性,本申请实施例不作具体限定。其中,当属性信息为颜色分量时,具体可以为任意颜色空间的颜色信息。示例性地,属性信息可以为RGB空间的颜色信息,也可以为YUV空间的颜色信息,还可以为YCbCr空间的颜色信息等等,本申请实施例也不作具体限定。
还需要说明的是,在本申请实施例中,解码器可以按照预设解码顺序对这至少一个节点进行排列,以便确定每一节点对应的索引序号。这样,根据每一节点对应的索引序号,解码器能够按照预设解码顺序处理待处理点云中的每一节点。
在一些实施例中,预设解码顺序可以为下述其中之一:点云原始顺序、莫顿顺序、希尔伯特顺序等等,本申请实施例不作具体限定。
可以理解地,初始参考集合表示每一个节点查找预测节点的初始参考范围,在该范围内的参考节点均为当前节点之前的已解码节点。具体地,假定当前节点的索引序号为i,那么索引序号为0~i-1的节点均为已解码节点,而且初始参考集合就是根据这些已解码节点确定的。
在一些实施例中,初始参考集合是由N个已解码的参考节点组成;该方法还可以包括:
若当前节点的索引序号大于或等于0且小于预设常数值,则确定N的取值等于当前节点的索引序号;
若当前节点的索引序号大于或等于预设常数值,则确定N的取值等于预设常数值。
需要说明的是,在本申请实施例中,每一个节点查找预测节点的初始参考集合的最大值为一固定值,可以用预设常数值表示。换句话说,预设常数值表示初始参考集合包括参考节点个数的最大值。示例性地,预设常数值可以为128,但是并不作具体限定。
还需要说明的是,在本申请实施例中,N为大于或等于0且小于或等于预设常数值的整数。如果N等于0,那么初始参考集合为空集合;如果N不等于0,那么初始参考集合为非空集合。
在一种具体的实施例中,假定预设常数值为128,初始参考集合是由N个已解码的参考节点组成, 那么在当前节点为第0~127节点时,即当前节点的索引序号i=0~127,此时N=i;否则,N=128。
S702:基于初始参考集合中的参考节点与当前节点之间的距离,确定最大距离值在初始参考集合中对应的目标位置。
S703:根据初始参考集合对当前节点进行解码处理之后,将当前节点放置于目标位置,得到目标参考集合。
需要说明的是,在本申请实施例中,目标参考集合表示当前节点在预设解码顺序上的下一节点对应的初始参考集合。
还需要说明的是,在一些实施例中,该方法还可以包括:在当前节点的索引序号大于或等于0且小于预设常数值的情况下,按照预设解码顺序确定当前节点在初始参考集合中对应的目标位置;
相应地,根据初始参考集合对当前节点进行解码处理之后,将当前节点放置于目标位置,可以包括:
在当前节点的索引序号大于或等于0且小于预设常数值的情况下,直接将当前节点放置于初始参考集合中的目标位置;
在当前节点的索引序号大于或等于预设常数值的情况下,利用当前节点替换目标位置处的参考节点。
也就是说,如果当前节点的索引序号大于或等于0且小于预设常数值,那么根据初始参考集合对当前节点进行解码处理之后,可以将当前节点按照预设解码顺序放置于初始参考集合中,得到目标参考集合;如果当前节点的索引序号大于或等于预设常数值,那么根据初始参考集合对当前节点进行解码处理之后,可以基于最大距离值确定当前节点在初始参考集合中对应的目标位置,然后利用当前节点替换目标位置处的参考节点,得到目标参考集合。
在一些实施例中,所述根据初始参考集合对当前节点进行解码处理,可以包括:
解析码流,确定当前节点对应的属性残差值;
根据初始参考集合,确定当前节点对应的属性预测值;
根据属性残差值和属性预测值,确定当前节点对应的属性重建值。
需要说明的是,在本申请实施例中,解码器在获取到码流之后,可以从码流中解析出当前节点对应的属性残差值。其中,码流中解析出的属性残差值为反变换与反量化后的残差值。
还需要说明的是,在本申请实施例中,所述根据属性残差值和属性预测值,确定当前节点对应的属性重建值,可以包括:对属性残差值和属性预测值进行加法计算,得到当前节点对应的属性重建值。
还需要说明的是,在本申请实施例中,所述根据初始参考集合,确定当前节点对应的属性预测值,可以包括:若当前节点的索引序号等于0,则确定初始参考集合为空集合,将预设属性值直接确定为当前节点对应的属性预测值;若当前节点的索引序号不等于0,则确定初始参考集合为非空集合,从初始参考集合中确定至少一个预测节点,根据至少一个预测节点确定当前节点对应的属性预测值。
也就是说,如果初始参考集合为空集合,这时候不存在预测节点,可以直接将当前节点对应的属性预测值设置为预设属性值。示例性地,对于颜色属性,预设属性值可以为(128,128,128);对于反射率属性,预设属性值可以为0;在完成对当前节点的解码处理之后,当前节点可以按照预设解码顺序放置于初始参考集合中的队首位置。如果初始参考集合为非空集合,这时候根据初始参考集合可以得到至少一个预测节点,然后根据这至少一个预测节点确定当前节点对应的属性预测值。
在一种具体的实施例中,在当前节点的索引序号不等于0的情况下,所述根据至少一个预测节点确定当前节点对应的属性预测值,可以包括:
获取至少一个预测节点各自的属性重建值;
若至少一个预测节点仅包括一个预测节点,则将该预测节点的属性重建值直接确定为当前节点对应的属性预测值;
若至少一个预测节点包括至少两个预测节点,则对至少两个预测节点各自的属性重建值进行加权平均计算,得到当前节点对应的属性预测值。
需要说明的是,对于加权平均计算而言,在一种可能的实现方式中,如果权重值均设置为1,那么对至少两个预测节点各自的属性重建值进行加权平均计算,即为对至少两个预测节点各自的属性重建值进行平均值计算。在另一种可能的实现方式中,如果在这至少两个预测节点中,假定第一类节点的权重值为1,第二类节点的权重值为1/2,第三类节点的权重值为1/3,那么可以根据这些权重值对这至少两个预测节点各自的属性重建值进行加权平均计算。
在一种具体的实施例中,在当前节点的索引序号不等于0的情况下,所述从初始参考集合中确定至少一个预测节点,可以包括:
若当前节点的索引序号等于1,则将初始参考集合中包括的一个参考节点确定为至少一个预测节点;
若当前节点的索引序号等于2,则将初始参考集合中包括的两个参考节点确定为至少一个预测节点;
若当前节点的索引序号大于或等于3且小于或等于预设常数值,则从初始参考集合中获取当前节点在预设解码顺序上的前第一数量个参考节点,将第一数量个参考节点确定为至少一个预测节点;
若当前节点的索引序号大于预设常数值,则从初始参考集合中获取与当前节点之间的距离值相对较小的第二数量个参考节点,将第二数量个参考节点确定为至少一个预测节点。
需要说明的是,第一数量与第二数量可以相同,也可以不相同。示例性地,第一数量可以设置为3,第二数量可以设置为k;其中,k可以为一固定值(例如,3),也可以为一范围(例如,3~16),本申请实施例并不作具体限定。
还需要说明的是,假定第一数量为3,第二数量为k,i表示当前节点的索引序号,那么对于预测节点而言,若i=0,则不存在预测节点;若i=1,则初始参考集合中包括第0节点,可以将第0节点直接确定为预测节点;若i=2,则初始参考集合中包括第0节点和第1节点,可以将第0节点和第1节点直接确定为预测节点;若i>=3且i<128,则从初始参考集合中获取当前节点在预设解码顺序上的前3个参考节点,将这3个参考节点确定为预测节点;若i=128,则从初始参考集合中获取当前节点在预设解码顺序上的前3个参考节点,将这3个参考节点确定为预测节点;若i>128,则从初始参考集合中获取与当前节点之间的距离值相对较小的k个参考节点,将k个参考节点确定为预测节点。
进一步地,在一些实施例中,在当前节点的索引序号大于预设常数值的情况下,所述从初始参考集合中获取与当前节点之间的距离值相对较小的第二数量个参考节点,可以包括:
从初始参考集合中,利用全局搜索方式获取与当前节点之间的距离值相对较小的第二数量个参考节点;或者,
从初始参考集合中,利用空间关系搜索方式获取与当前节点之间的距离值相对较小的第二数量个参考节点;或者,
从初始参考集合中,利用空间关系深度优先搜索方式获取与当前节点之间的距离值相对较小的第二数量个参考节点。
也就是说,在本申请实施例中,对于第二数量个参考节点的确定,可以利用全局搜索方式在初始参考集合中搜索得到,也可以利用空间关系搜索方式在初始参考集合中搜索得到,还可以利用空间关系深度优先搜索方式在初始参考集合中搜索得到,甚至还可以利用其他搜索方式在初始参考集合中搜索得到等等,这里并不作具体限定。
在一种可能的实现方式中,所述利用全局搜索方式获取与当前节点之间的距离值相对较小的第二数量个参考节点,可以包括:
计算初始参考集合中每一个参考节点与当前节点之间的距离值,从所得到的N个距离值中选取距离值相对较小的第二数量个距离值;
根据第二数量个距离值,确定第二数量个参考节点。
相应地,在一些实施例中,所述基于初始参考集合中的参考节点与当前节点之间的距离,确定最大距离值在初始参考集合中对应的目标位置,可以包括:从所得到的N个距离值中确定最大距离值,将最大距离值在初始参考集合中对应的位置作为目标位置。
需要说明的是,在本申请实施例中,计算初始参考集合中每一个参考节点与当前节点之间的距离值,可以采用曼哈顿距离计算方式、欧式距离计算方式等等,本申请实施例不作具体限定。
还需要说明的是,第二数量用k表示。这样,由于初始参考集合包括N个参考节点,那么可以计算得到N个距离值;从这N个距离值中选取距离值相对较小的k个距离值和最大距离值,进而根据这k个距离值确定的参考节点即为与当前节点距离最近的k个参考节点,以作为k个预测节点;将最大距离值在初始参考集合中对应的位置作为目标位置来确定最远距离点,以便后续在完成解码之后,用当前节点替换最远距离点,得到包含当前节点在内的目标参考集合。需要注意的是,“从这N个距离值中选取距离值最小的k个距离值和最大距离值”,可以同时进行,但是也可以不同时进行,本申请实施例不作具体限定。
在另一种可能的实现方式中,所述利用空间关系搜索方式获取与当前节点之间的距离值相对较小的第二数量个参考节点,可以包括:
基于节点与节点之间的空间关系,从初始参考集合中搜索符合预设条件的参考节点,得到M个参考节点;
计算M个参考节点中每一个参考节点与当前节点之间的距离值,从所得到的M个距离值中选取距离值相对较小的K个距离值,并根据K个距离值确定K个参考节点;
若K等于第二数量,则将K个参考节点作为第二数量个参考节点。
相应地,在一些实施例中,所述基于初始参考集合中的参考节点与当前节点之间的距离,确定最大距离值在初始参考集合中对应的目标位置,可以包括:从所得到的M个距离值中确定最大距离值,将 最大距离值在初始参考集合中对应的位置作为目标位置。
在本申请实施例中,符合预设条件的参考节点,至少包括:当前节点的上层块内的子节点、与当前节点的上层块共面的邻居块内的子节点、与当前节点的上层块共线的邻居块内的子节点和与当前节点的上层块共点的邻居块内的子节点。
还需要说明的是,在本申请实施例中,当前节点的上层块至少包括下述其中之一:当前节点的父块、当前节点的祖父块。
还需要说明的是,在本申请实施例中,计算M个参考节点中每一个参考节点与当前节点之间的距离值,可以采用曼哈顿距离计算方式、欧式距离计算方式等等,本申请实施例不作具体限定。另外,M为大于或等于0的整数,K为大于或等于0且小于或等于M的整数。
这样,基于节点与节点之间的空间关系,可以从初始参考集合中搜索当前节点的父块(或者,当前节点的祖父块等)自身以及与当前节点的父块(或者,当前节点的祖父块等)共面、共线、共点的邻居块内的子节点,得到M个参考节点;然后从这M个参考节点中确定与当前节点距离最近的k个参考节点和与当前节点距离最远的最远距离点,将这k个参考节点作为k个预测节点进行属性预测,在完成解码之后,用当前节点替换最远距离点,得到包含当前节点在内的目标参考集合。
进一步地,如果待处理点云属于稀疏点云,从这M个参考节点中无法确定出k个预测节点,那么还需要进入全局搜索方式继续搜索参考节点,以便补齐k个预测节点。因此,在一些实施例中,该方法还可以包括:
若K小于第二数量,则利用全局搜索方式计算初始参考集合中的参考节点与当前节点之间的距离值,并根据所述距离值与K个距离值的比较结果确定距离值相对较小的第二数量个距离值,根据第二数量个距离值确定第二数量个参考节点;
相应地,基于初始参考集合中的参考节点与当前节点之间的距离,确定最大距离值在初始参考集合中对应的目标位置,包括:
从所得到的M个距离值中确定初始最大距离值;
在利用全局搜索方式计算初始参考集合中的参考节点与当前节点之间的距离值之后,若初始参考集合中存在参考节点与当前节点之间的距离大于初始最大距离值,则更新初始最大距离值;
根据更新后的初始最大距离值确定最大距离值,将最大距离值在初始参考集合中对应的位置作为目标位置。
需要说明的是,在利用空间关系搜索方式确定出M个参考节点和初始最大距离值对应的最远距离点之后,如果从M个参考节点中只能选取距离值相对较小的K个参考节点,而且K小于第二数量即没有满足k个预测节点,那么还需要进入全局搜索方式,通过计算初始参考集合中的参考节点与当前节点的距离值,并根据所计算得到的距离值与K个距离值的比较结果来确定距离值相对较小的第二数量个参考节点,从而能够补齐k个预测节点,同时还需要更新初始最大距离值来更新最远距离点;在完成解码之后,用当前节点替换最远距离点,得到包含当前节点在内的目标参考集合。
在又一种可能的实现方式中,利用空间关系深度优先搜索方式获取与当前节点之间的距离值相对较小的第二数量个参考节点,可以包括:
基于节点与节点之间的空间关系,从初始参考集合中搜索当前节点的上层块内的子节点,得到K1个参考节点;
计算K1个参考节点中每一个参考节点与当前节点之间的距离值,从所得到的K1个距离值中选取距离值相对较小的K2个距离值和初始最大距离值,并根据K2个距离值确定K2个参考节点;
若K2等于第二数量,则将K2个参考节点作为第二数量个参考节点,将初始最大距离值作为最大距离值;
若K2小于第二数量,则继续从初始参考集合中搜索与当前节点的上层块共面的邻居块内的子节点,得到K3个参考节点;
计算K3个参考节点中每一个参考节点与当前节点之间的距离值,并根据所得到的K3个距离值和K2个距离值的比较结果确定距离值相对较小的K4个距离值,根据K4个距离值确定K4个参考节点,以及基于K3个距离值更新初始最大距离值;
若K4等于第二数量,则将K4个参考节点作为第二数量个参考节点,将更新后的初始最大距离值作为最大距离值;
若K4小于第二数量,则继续从初始参考集合中搜索与当前节点的上层块共线的邻居块内的子节点,得到K5个参考节点;
计算K5个参考节点中每一个参考节点与当前节点之间的距离值,并根据所得到的K5个距离值和K4个距离值的比较结果确定距离值相对较小的K6个距离值,根据K6个距离值确定K6个参考节点, 以及基于K5个距离值继续更新初始最大距离值;
若K6等于第二数量,则将K6个参考节点作为第二数量个参考节点,将更新后的初始最大距离值作为最大距离值;
若K6小于第二数量,则继续从初始参考集合中搜索与当前节点的上层块共点的邻居块内的子节点,得到K7个参考节点;
计算K7个参考节点中每一个参考节点与当前节点之间的距离值,并根据所得到的K7个距离值和K6个距离值的比较结果确定距离值相对较小的K8个距离值,根据K8个距离值确定K8个参考节点,以及基于K7个距离值继续更新初始最大距离值;
若K8等于第二数量,则将K8个参考节点作为第二数量个参考节点,将更新后的初始最大距离值作为最大距离值;
若K8小于第二数量,则利用全局搜索方式计算初始参考集合中的参考节点与当前节点之间的距离值,并根据所述距离值与K8个距离值的比较结果确定距离值相对较小的第二数量个距离值,根据第二数量个距离值确定第二数量个参考节点;
相应地,基于初始参考集合中的参考节点与当前节点之间的距离,确定最大距离值在初始参考集合中对应的目标位置,包括:
在利用全局搜索方式计算初始参考集合中的参考节点与当前节点之间的距离值之后,若初始参考集合中存在参考节点与当前节点之间的距离大于初始最大距离值,则继续更新初始最大距离值;
根据更新后的初始最大距离值确定最大距离值,将最大距离值在初始参考集合中对应的位置作为目标位置。
需要说明的是,在本申请实施例中,当前节点的上层块至少包括下述其中之一:当前节点的父块、当前节点的祖父块。
还需要说明的是,在本申请实施例中,计算M个参考节点中每一个参考节点与当前节点之间的距离值,可以采用曼哈顿距离计算方式、欧式距离计算方式等等,本申请实施例不作具体限定。
还需要说明的是,在本申请实施例中,从初始参考集合中搜索与当前节点的上层块共面的邻居块内的子节点,如果这里存在有三个共面的邻近块,那么这三个共面的邻居块可以一次性进行搜索,也可以依次进行搜索。例如,在依次搜索时,可以先在第一个共面的邻居块内搜索,如果搜索补齐了第二数量个参考节点,那么将不再进行搜索;如果不满足第二数量个参考节点,那么再在第二个共面的邻居块内搜索,如果搜索补齐了第二数量个参考节点,那么将不再进行搜索;否则继续在第三个共面的邻居块内搜索等等;同理,对于从初始参考集合中搜索与当前节点的上层块共线的邻居块内的子节点、从初始参考集合中搜索与当前节点的上层块共点的邻居块内的子节点也可以如此操作;这里对此不作任何限定。
这样,基于节点与节点之间的空间关系,第一步可以先从初始参考集合中搜索当前节点的父块(或者,当前节点的祖父块等)内的子节点,并确定初始最大距离值对应的最远距离点;如果没有满足k个预测节点,那么第二步可以从初始参考集合中搜索当前节点的父块(或者,当前节点的祖父块等)共面的邻居块内的子节点,以及更新初始最大距离值来更新最远距离点;如果仍然没有满足k个预测节点,那么第三步可以从初始参考集合中搜索当前节点的父块(或者,当前节点的祖父块等)共线的邻居块内的子节点,以及更新初始最大距离值来更新最远距离点;如果仍然没有满足k个预测节点,那么第四步可以从初始参考集合中搜索当前节点的父块(或者,当前节点的祖父块等)共点的邻居块内的子节点,以及更新初始最大距离值来更新最远距离点;如果前面四步之和都没有满足k个预测节点,那么第五步再进入全局搜索方式,通过计算初始参考集合中的参考节点与当前节点的距离值,以便补齐k个预测节点,同时仍需要更新初始最大距离值来更新最远距离点;在完成解码之后,用当前节点替换最远距离点,得到包含当前节点在内的目标参考集合。
可以理解地,在本申请实施例中,无论是空间关系搜索方式还是空间关系深度优先搜索方式,基于空间关系的搜索过程描述如下:
(a)首先依据当前节点在父块(或祖父块等)中所处的方位,确定与其父块(或祖父块等)共面、共线、共点的邻居块。如图8A~图8H所示,当前节点的方位共有八种模式,具体包括:图8A所示的当前节点处于后侧右上的模式、图8B所示的当前节点处于后侧右下的模式、图8C所示的当前节点处于后侧左上的模式、图8D所示的当前节点处于后侧左下的模式、图8E所示的当前节点处于前侧右上的模式、图8F所示的当前节点处于前侧右下的模式、图8G所示的当前节点处于前侧左上的模式、图8H所示的当前节点处于前侧左下的模式等。针对这八种模式,图9A~图9H分别示出了在每一种模式下对应的共面邻居块、共线邻居块、共点邻居块。其中,在图9A~图9H中,当前节点的父块(或祖父块等)用加粗框且白色填充表示,共面邻居块用网格线填充,共线邻居块用斜线填充,共点邻居块用点填充。
示例性地,以希尔伯特码(也可以是莫顿码等)为例,通过当前节点的父块(或祖父块等)的几何坐标,再加上一定的偏移量,可以计算出邻居块的几何坐标,通过几何坐标可计算出相应的希尔伯特码,八种模式所对应的偏移量分别为:
hilbertShift[8][7][3]={
{{0,-1,0},{-1,0,0},{0,0,-1},{-1,-1,0},{-1,0,-1},{0,-1,-1},{-1,-1,-1}},
{{0,-1,0},{-1,0,0},{0,0,1},{-1,-1,0},{-1,0,1},{0,-1,1},{-1,-1,1}},
{{0,1,0},{-1,0,0},{0,0,-1},{-1,1,0},{-1,0,-1},{0,1,-1},{-1,1,-1}},
{{0,1,0},{-1,0,0},{0,0,1},{-1,1,0},{-1,0,1},{0,1,1},{-1,1,1}},
{{0,-1,0},{1,0,0},{0,0,-1},{1,-1,0},{1,0,-1},{0,-1,-1},{1,-1,-1}},
{{0,-1,0},{1,0,0},{0,0,1},{1,-1,0},{1,0,1},{0,-1,1},{1,-1,1}},
{{0,1,0},{1,0,0},{0,0,-1},{-1,1,0},{1,0,-1},{0,1,-1},{1,1,-1}},
{{0,1,0},{1,0,0},{0,0,1},{1,1,0},{1,0,1},{0,1,1},{1,1,1}}
}
(b)通过比较初始参考集合内参考节点的希尔伯特码与邻居块的希尔伯特码,即可确定该参考节点是否满足共面、共线、共点的条件。
可以理解地,本申请实施例提供了一种点云属性预测的方法,结合基于空间关系和全局搜索,并通过替换最远距离点来构建目标参考集合,从而进行点云属性的帧内预测,以便在编码效率和性能之间取得良好的折中。
在一些实施例中,该方法还可以包括:在索引序号大于或等于预设常数值的情况下,将初始参考集合中的队尾位置确定为目标位置;
相应地,该方法还可以包括:根据初始参考集合对当前节点进行解码处理之后,删除初始参考集合中队首位置处的参考节点,并将当前节点放置于目标位置,得到目标参考集合。
需要说明的是,在本申请实施例中,队首位置表示利用当前节点的索引序号与预设常数值进行取余操作之后得到的数值在初始参考集合中对应的位置;队尾位置表示当前节点待放置位置;因此,在完成当前节点的解码处理之后,可以剔除初始参考集合内队首位置的点,将当前节点加入初始参考集合的队尾位置;也可以看作是利用当前节点替换队首位置处的参考节点,以得到目标参考集合。
在一种具体的实施例中,如果基于空间关系搜索到了k个预测节点,那么对当前节点进行解码处理,然后剔除初始参考集合内队首位置的点,将当前节点加入队尾位置;只有当进入到全局搜索时,才会利用当前节点替换最远距离点,以得到目标参考集合。
在一些实施例中,初始参考集合可以包括第一初始参考集合和第二初始参考集合;该方法还可以包括:
根据第一初始参考集合对当前节点进行解码处理之后,得到第一目标参考集合;其中,第一目标参考集合是基于当前节点替换第一初始参考集合中目标位置处的参考节点得到的;和/或
根据第二初始参考集合对当前节点进行解码处理之后,得到第二目标参考集合;其中,第二目标参考集合是基于删除第二初始参考集合中目标位置处的参考节点、将当前节点放置于队尾位置得到的。
在一种具体的实施例中,该方法还可以包括:若当前节点使用空间关系搜索方式或者空间关系深度优先搜索方式,则根据第二初始参考集合对当前节点进行解码处理;若当前节点使用全局搜索方式,则根据第一初始参考集合对当前节点进行解码处理。
需要说明的是,第一目标参考集合为当前节点在预设解码顺序上的下一节点的第一初始参考集合,可以看做参考范围1;第二目标参考集合为当前节点在预设解码顺序上的下一节点的第二初始参考集合,可以看做参考范围2。也就是说,本申请实施例可以维持两个参考范围,而且参考范围1和参考范围2中的内容一致,但顺序不一致。在这里,参考范围1是通过当前节点替换最远距离点来维持的,而参考范围2是基于删除最远距离点,并将当前节点放置于队尾位置来维持的;这样能保证参考范围2中的参考节点按照希尔伯特顺序排列,能够加速基于空间关系的查找;因此,在基于空间关系来确定预测节点时,在参考范围2中进行查找;进入全局搜索来确定预测节点时,则在参考范围1中进行查找。
除此之外,在一些实施例中,该方法还可以包括:
若当前节点使用空间关系搜索方式或者空间关系深度优先搜索方式,则确定第一目标参考集合和第二目标参考集合均是基于删除队首位置的参考节点、将当前节点放置于队尾位置的方式维持;
若当前节点使用全局搜索方式,则确定第一目标参考集合是基于当前节点替换目标位置处的参考节点的方式维持,第二目标参考集合是基于删除目标位置处的参考节点、将当前节点放置于队尾位置的方式维持。
需要说明的是,本申请实施例可以维持两个参考范围。如果基于空间关系找到了k个预测节点,那么对当前节点进行解码处理,然后参考范围1和参考范围2都是剔除队首位置的点,将当前节点加入队 尾位置来维持的;当进入到全局搜索时,这时候参考范围1是通过当前节点替换最远距离点的方式维持,而参考范围2则是通过剔除最远距离点、将当前节点加入队尾位置的方式维持。
还需要说明的是,在本申请实施例中,队首位置表示利用当前节点的索引序号与预设常数值进行取余操作之后得到的数值在初始参考集合中对应的位置;队尾位置表示当前节点待放置位置;因此,在完成当前节点的解码处理之后,可以剔除队首位置的点,将当前节点加入队尾位置;也可以看作是利用当前节点替换队首位置处的参考节点。
本实施例提供了一种解码方法,通过该解码方法可以实现参考范围的确定,具体地,通过当前节点替换最远距离点来构建参考范围,并在此参考范围内查找预测节点以进行点云属性的帧内预测,既能通过基于空间关系降低编解码效率,又能通过全局搜索提高帧内预测准确性,在编码效率和性能之间取得良好的折中,从而提高点云属性的编解码性能。
在本申请的另一实施例中,参见图10,其示出了本申请实施例提供的一种编码方法的流程示意图。如图10所示,该方法可以包括:
S1001:确定当前节点对应的索引序号以及初始参考集合。
需要说明的是,本申请实施例所述的编码方法具体是指点云编码方法,更具体地是一种点云属性的帧内预测方法,用于构建确定预测节点的参考范围。该方法可以应用于点云编码器(也可简称为“编码器”)。
还需要说明的是,在本申请实施例中,待处理点云包括至少一个节点。其中,对于待处理点云中的节点,在对该节点进行编码时,其可以作为待处理点云中的待编码节点,而且该节点的周围存在有多个已编码节点。在这里,当前节点即是这至少一个节点中当前需要编码的待编码节点。
进一步地,在本申请实施例中,对于待处理点云中的每一个节点,其对应一个几何信息和一个属性信息;其中,几何信息表征该点的空间关系,属性信息表征该点的属性信息。在这里,属性信息可以为颜色分量,也可以是反射率或者其它属性,本申请实施例不作具体限定。
还需要说明的是,在本申请实施例中,编码器可以按照预设编码顺序对这至少一个节点进行排列,以便确定每一节点对应的索引序号。这样,根据每一节点对应的索引序号,编码器能够按照预设编码顺序处理待处理点云中的每一节点。
在一些实施例中,预设编码顺序可以为下述其中之一:点云原始顺序、莫顿顺序、希尔伯特顺序等等,本申请实施例不作具体限定。
可以理解地,初始参考集合表示每一个节点查找预测节点的初始参考范围,在该范围内的参考节点均为当前节点之前的已编码节点。具体地,假定当前节点的索引序号为i,那么索引序号为0~i-1的节点均为已编码节点,而且初始参考集合就是根据这些已编码节点确定的。
在一些实施例中,初始参考集合是由N个已编码的参考节点组成;该方法还可以包括:
若当前节点的索引序号大于或等于0且小于预设常数值,则确定N的取值等于当前节点的索引序号;
若当前节点的索引序号大于或等于预设常数值,则确定N的取值等于预设常数值。
需要说明的是,在本申请实施例中,每一个节点查找预测节点的初始参考集合的最大值为一固定值,可以用预设常数值表示。换句话说,预设常数值表示初始参考集合包括参考节点个数的最大值。示例性地,预设常数值可以为128,但是并不作具体限定。
还需要说明的是,在本申请实施例中,N为大于或等于0且小于或等于预设常数值的整数。如果N等于0,那么初始参考集合为空集合;如果N不等于0,那么初始参考集合为非空集合。
在一种具体的实施例中,假定预设常数值为128,初始参考集合是由N个已编码的参考节点组成,那么在当前节点为第0~127节点时,即当前节点的索引序号i=0~127,此时N=i;否则,N=128。
S1002:基于初始参考集合中的参考节点与当前节点之间的距离,确定最大距离值在初始参考集合中对应的目标位置。
S1003:根据初始参考集合对当前节点进行编码处理之后,将当前节点放置于目标位置,得到目标参考集合。
需要说明的是,在本申请实施例中,目标参考集合表示当前节点在预设编码顺序上的下一节点对应的初始参考集合。
还需要说明的是,在一些实施例中,该方法还可以包括:在当前节点的索引序号大于或等于0且小于预设常数值的情况下,按照预设编码顺序确定当前节点在初始参考集合中对应的目标位置;
相应地,根据初始参考集合对当前节点进行编码处理之后,将当前节点放置于目标位置,可以包括:
在当前节点的索引序号大于或等于0且小于预设常数值的情况下,直接将当前节点放置于初始参 考集合中的目标位置;
在当前节点的索引序号大于或等于预设常数值的情况下,利用当前节点替换目标位置处的参考节点。
也就是说,如果当前节点的索引序号大于或等于0且小于预设常数值,那么根据初始参考集合对当前节点进行编码处理之后,可以将当前节点按照预设编码顺序放置于初始参考集合中,得到目标参考集合;如果当前节点的索引序号大于或等于预设常数值,那么根据初始参考集合对当前节点进行编码处理之后,可以基于最大距离值确定当前节点在初始参考集合中对应的目标位置,然后利用当前节点替换目标位置处的参考节点,得到目标参考集合。
在一些实施例中,所述根据初始参考集合对当前节点进行编码处理,可以包括:
获取当前节点对应的属性原始值;
根据初始参考集合,确定当前节点对应的属性预测值;
根据属性原始值和属性预测值,确定当前节点对应的属性残差值;
对属性残差值进行编码处理,将得到的编码比特写入码流。
在一种具体的实施例中,所述根据属性原始值和属性预测值,确定当前节点对应的属性残差值,可以包括:对属性原始值和属性预测值进行减法计算,得到当前节点对应的属性残差值。
需要说明的是,在本申请实施例中,写入码流中的属性残差值为变换与量化后的残差值。也就是说,对属性残差值进行编码处理,包括对属性残差值进行变换与量化处理,然后再将其按照编码比特写入码流。
在一些实施例中,所述根据初始参考集合,确定当前节点对应的属性预测值,可以包括:若索引序号等于0,则确定初始参考集合为空集合,将预设属性值直接确定为当前节点对应的属性预测值;若索引序号不等于0,则确定初始参考集合为非空集合,从初始参考集合中确定至少一个预测节点,根据至少一个预测节点确定当前节点对应的属性预测值。
需要说明的是,当索引序号等于0时,意味着初始参考集合为空集合,这时候不存在预测节点,可以直接将当前节点对应的属性预测值设置为预设属性值。示例性地,对于颜色属性,预设属性值可以为(128,128,128);对于反射率属性,预设属性值可以为0;在完成对当前节点的编码处理之后,当前节点可以按照预设编码顺序放置于初始参考集合中的队首位置。
还需要说明的是,当所述索引序号不等于0时,所述从初始参考集合中确定至少一个预测节点,可以包括:
若索引序号等于1,则将初始参考集合中包括的一个参考节点确定为至少一个预测节点;
若索引序号等于2,则将初始参考集合中包括的两个参考节点确定为至少一个预测节点;
若索引序号大于或等于3且小于或等于预设常数值,则从初始参考集合中获取当前节点在预设编码顺序上的前第一数量个参考节点,将第一数量个参考节点确定为至少一个预测节点;
若索引序号大于预设常数值,则从初始参考集合中获取与当前节点之间的距离值相对较小的第二数量个参考节点,将第二数量个参考节点确定为至少一个预测节点。
在本申请实施例中,在确定出至少一个预测节点之后,所述根据至少一个预测节点确定当前节点对应的属性预测值,可以包括:
获取至少一个预测节点各自的属性重建值;
若至少一个预测节点仅包括一个预测节点,则将该预测节点的属性重建值直接确定为当前节点对应的属性预测值;
若至少一个预测节点包括至少两个预测节点,则对至少两个预测节点各自的属性重建值进行加权平均计算,得到当前节点对应的属性预测值。
在这里,对于加权平均计算而言,在一种可能的实现方式中,如果权重值均设置为1,那么对至少两个预测节点各自的属性重建值进行加权平均计算,即为对至少两个预测节点各自的属性重建值进行平均值计算。
还需要说明的是,第一数量与第二数量可以相同,也可以不相同。示例性地,第一数量可以设置为3,第二数量可以设置为k;其中,k可以为一固定值(例如,3),也可以为一范围(例如,3~16),本申请实施例并不作具体限定。
进一步地,在一些实施例中,在当前节点的索引序号大于预设常数值的情况下,所述从初始参考集合中获取与当前节点之间的距离值相对较小的第二数量个参考节点,可以包括:
从初始参考集合中,利用全局搜索方式获取与当前节点之间的距离值相对较小的第二数量个参考节点;或者,
从初始参考集合中,利用空间关系搜索方式获取与当前节点之间的距离值相对较小的第二数量个 参考节点;或者,
从初始参考集合中,利用空间关系深度优先搜索方式获取与当前节点之间的距离值相对较小的第二数量个参考节点。
在一种可能的实现方式中,所述利用全局搜索方式获取与当前节点之间的距离值相对较小的第二数量个参考节点,可以包括:
计算初始参考集合中每一个参考节点与当前节点之间的距离值,从所得到的N个距离值中选取距离值相对较小的第二数量个距离值;
根据第二数量个距离值,确定第二数量个参考节点。
相应地,在一些实施例中,所述基于初始参考集合中的参考节点与当前节点之间的距离,确定最大距离值在初始参考集合中对应的目标位置,可以包括:从所得到的N个距离值中确定最大距离值,将最大距离值在初始参考集合中对应的位置作为目标位置。
需要说明的是,第二数量用k表示。这样,由于初始参考集合包括N个参考节点,那么可以计算得到N个距离值;从这N个距离值中选取距离值相对较小的k个距离值和最大距离值,进而根据这k个距离值确定的参考节点即为与当前节点距离最近的k个参考节点,以作为k个预测节点;将最大距离值在初始参考集合中对应的位置作为目标位置来确定最远距离点,以便后续在完成编码之后,用当前节点替换最远距离点,得到包含当前节点在内的目标参考集合。
在一种可能的实现方式中,所述利用空间关系搜索方式获取与当前节点之间的距离值相对较小的第二数量个参考节点,可以包括:
基于节点与节点之间的空间关系,从初始参考集合中搜索符合预设条件的参考节点,得到M个参考节点;
计算M个参考节点中每一个参考节点与当前节点之间的距离值,从所得到的M个距离值中选取距离值相对较小的K个距离值,并根据K个距离值确定K个参考节点;
若K等于第二数量,则将K个参考节点作为第二数量个参考节点。
相应地,在一些实施例中,所述基于初始参考集合中的参考节点与当前节点之间的距离,确定最大距离值在初始参考集合中对应的目标位置,可以包括:从所得到的M个距离值中确定最大距离值,将最大距离值在初始参考集合中对应的位置作为目标位置。
在本申请实施例中,符合预设条件的参考节点,至少包括:当前节点的上层块内的子节点、与当前节点的上层块共面的邻居块内的子节点、与当前节点的上层块共线的邻居块内的子节点和与当前节点的上层块共点的邻居块内的子节点。
在本申请实施例中,M为大于或等于0的整数,K为大于或等于0且小于或等于M的整数。
这样,基于节点与节点之间的空间关系,可以从初始参考集合中搜索当前节点的父块(或者,当前节点的祖父块等)自身以及与当前节点的父块(或者,当前节点的祖父块等)共面、共线、共点的邻居块内的子节点,得到M个参考节点;然后从这M个参考节点中确定与当前节点距离最近的k个参考节点和与当前节点距离最远的最远距离点,将这k个参考节点作为k个预测节点进行属性预测,在完成编码之后,用当前节点替换最远距离点,得到包含当前节点在内的目标参考集合。
进一步地,如果待处理点云属于稀疏点云,从这M个参考节点中无法确定出k个预测节点,那么还需要进入全局搜索方式继续搜索参考节点,以便补齐k个预测节点。因此,在一些实施例中,该方法还可以包括:
若K小于第二数量,则利用全局搜索方式计算初始参考集合中的参考节点与当前节点之间的距离值,并根据所述距离值与K个距离值的比较结果确定距离值相对较小的第二数量个距离值,根据第二数量个距离值确定第二数量个参考节点;
相应地,基于初始参考集合中的参考节点与当前节点之间的距离,确定最大距离值在初始参考集合中对应的目标位置,包括:
从所得到的M个距离值中确定初始最大距离值;
在利用全局搜索方式计算初始参考集合中的参考节点与当前节点之间的距离值之后,若初始参考集合中存在参考节点与当前节点之间的距离大于初始最大距离值,则更新初始最大距离值;
根据更新后的初始最大距离值确定最大距离值,将最大距离值在初始参考集合中对应的位置作为目标位置。
需要说明的是,在利用空间关系搜索方式确定出M个参考节点和初始最大距离值对应的最远距离点之后,如果从M个参考节点中只能选取距离值相对较小的K个参考节点,而且K小于第二数量即没有满足k个预测节点,那么还需要进入全局搜索方式,通过计算初始参考集合中的参考节点与当前节点的距离值,并根据所计算得到的距离值与K个距离值的比较结果来确定距离值相对较小的第二数量个 距离值,从而能够补齐k个预测节点,同时还需要更新初始最大距离值来更新最远距离点;在完成解码之后,用当前节点替换最远距离点,得到包含当前节点在内的目标参考集合。
在又一种可能的实现方式中,所述利用空间关系深度优先搜索方式获取与当前节点之间的距离值相对较小的第二数量个参考节点,可以包括:
基于节点与节点之间的空间关系,从初始参考集合中搜索当前节点的上层块内的子节点,得到K1个参考节点;
计算K1个参考节点中每一个参考节点与当前节点之间的距离值,从所得到的K1个距离值中选取距离值相对较小的K2个距离值和初始最大距离值,并根据K2个距离值确定K2个参考节点;
若K2等于第二数量,则将K2个参考节点作为第二数量个参考节点,将初始最大距离值作为最大距离值;
若K2小于第二数量,则继续从初始参考集合中搜索与当前节点的上层块共面的邻居块内的子节点,得到K3个参考节点;
计算K3个参考节点中每一个参考节点与当前节点之间的距离值,并根据所得到的K3个距离值和K2个距离值的比较结果确定距离值相对较小的K4个距离值,根据K4个距离值确定K4个参考节点,以及基于K3个距离值更新初始最大距离值;
若K4等于第二数量,则将K4个参考节点作为第二数量个参考节点,将更新后的初始最大距离值作为最大距离值;
若K4小于第二数量,则继续从初始参考集合中搜索与当前节点的上层块共线的邻居块内的子节点,得到K5个参考节点;
计算K5个参考节点中每一个参考节点与当前节点之间的距离值,并根据所得到的K5个距离值和K4个距离值的比较结果确定距离值相对较小的K6个距离值,根据K6个距离值确定K6个参考节点,以及基于K5个距离值继续更新初始最大距离值;
若K6等于第二数量,则将K6个参考节点作为第二数量个参考节点,将更新后的初始最大距离值作为最大距离值;
若K6小于第二数量,则继续从初始参考集合中搜索与当前节点的上层块共点的邻居块内的子节点,得到K7个参考节点;
计算K7个参考节点中每一个参考节点与当前节点之间的距离值,并根据所得到的K7个距离值和K6个距离值的比较结果确定距离值相对较小的K8个距离值,根据K8个距离值确定K8个参考节点,以及基于K7个距离值继续更新初始最大距离值;
若K8等于第二数量,则将K8个参考节点作为第二数量个参考节点,将更新后的初始最大距离值作为最大距离值;
若K8小于第二数量,则利用全局搜索方式计算初始参考集合中的参考节点与当前节点之间的距离值,并根据所述距离值与K8个距离值的比较结果确定距离值相对较小的第二数量个距离值,根据第二数量个距离值确定第二数量个参考节点;
相应地,基于初始参考集合中的参考节点与当前节点之间的距离,确定最大距离值在初始参考集合中对应的目标位置,包括:
在利用全局搜索方式计算初始参考集合中的参考节点与当前节点之间的距离值之后,若初始参考集合中存在参考节点与当前节点之间的距离大于初始最大距离值,则继续更新初始最大距离值;
根据更新后的初始最大距离值确定最大距离值,将最大距离值在初始参考集合中对应的位置作为目标位置。
需要说明的是,在本申请实施例中,当前节点的上层块至少包括下述其中之一:当前节点的父块、当前节点的祖父块。
还需要说明的是,在本申请实施例中,计算M个参考节点中每一个参考节点与当前节点之间的距离值,可以采用曼哈顿距离计算方式、欧式距离计算方式等等,本申请实施例不作具体限定。
还需要说明的是,在本申请实施例中,从初始参考集合中搜索与当前节点的上层块共面的邻居块内的子节点,如果这里存在有三个共面的邻近块,那么这三个共面的邻居块可以一次性进行搜索,也可以依次进行搜索。例如,在依次搜索时,可以先在第一个共面的邻居块内搜索,如果搜索补齐了第二数量个参考节点,那么将不再进行搜索;如果不满足第二数量个参考节点,那么再在第二个共面的邻居块内搜索,如果搜索补齐了第二数量个参考节点,那么将不再进行搜索;否则继续在第三个共面的邻居块内搜索等等;同理,对于从初始参考集合中搜索与当前节点的上层块共线的邻居块内的子节点、从初始参考集合中搜索与当前节点的上层块共点的邻居块内的子节点也可以如此操作;这里对此不作任何限定。
这样,在空间关系深度优先搜索方式中,基于节点与节点之间的空间关系,第一步可以先从初始参 考集合中搜索当前节点的父块(或者,当前节点的祖父块等)内的子节点,并确定初始最大距离值对应的最远距离点;如果没有满足k个预测节点,那么第二步可以从初始参考集合中搜索当前节点的父块(或者,当前节点的祖父块等)共面的邻居块内的子节点,以及更新初始最大距离值来更新最远距离点;如果仍然没有满足k个预测节点,那么第三步可以从初始参考集合中搜索当前节点的父块(或者,当前节点的祖父块等)共线的邻居块内的子节点,以及更新初始最大距离值来更新最远距离点;如果仍然没有满足k个预测节点,那么第四步可以从初始参考集合中搜索当前节点的父块(或者,当前节点的祖父块等)共点的邻居块内的子节点,以及更新初始最大距离值来更新最远距离点;如果前面四步之和都没有满足k个预测节点,那么第五步再进入全局搜索方式,通过计算初始参考集合中的参考节点与当前节点的距离值,以便补齐k个预测节点,同时仍需要更新初始最大距离值来更新最远距离点;在完成编码之后,用当前节点替换最远距离点,得到包含当前节点在内的目标参考集合。
可以理解地,本申请实施例提供了一种点云属性预测的方法,结合基于空间关系和全局搜索,并通过替换最远距离点来构建目标参考集合,从而进行点云属性的帧内预测,以便在编码效率和性能之间取得良好的折中。
在一些实施例中,该方法还可以包括:在索引序号大于或等于预设常数值的情况下,将初始参考集合中的队尾位置确定为目标位置;
相应地,该方法还可以包括:根据初始参考集合对当前节点进行编码处理之后,删除初始参考集合中队首位置处的参考节点,并将当前节点放置于目标位置,得到目标参考集合。
在一种具体的实施例中,如果基于空间关系搜索到了k个预测节点,那么对当前节点进行编码处理,然后剔除初始参考集合内队首位置的点,将当前节点加入队尾位置;只有当进入到全局搜索时,才会利用当前节点替换最远距离点,以得到目标参考集合。
在这里,队首位置表示利用当前节点的索引序号与预设常数值进行取余操作之后得到的数值在初始参考集合中对应的位置;队尾位置表示当前节点待放置位置;因此,在完成当前节点的编码处理之后,可以剔除初始参考集合内队首位置的点,将当前节点加入初始参考集合的队尾位置;也可以看作是利用当前节点替换队首位置处的参考节点,以得到目标参考集合。
在一些实施例中,初始参考集合包括第一初始参考集合和第二初始参考集合;该方法还可以包括:
根据第一初始参考集合对当前节点进行编码处理之后,得到第一目标参考集合;其中,第一目标参考集合是基于当前节点替换第一初始参考集合中目标位置处的参考节点得到的;和/或
根据第二初始参考集合对当前节点进行编码处理之后,得到第二目标参考集合;其中,第二目标参考集合是基于删除第二初始参考集合中目标位置处的参考节点、将当前节点放置于队尾位置得到的。
在一种具体的实施例中,该方法还可以包括:若当前节点使用空间关系搜索方式或者空间关系深度优先搜索方式,则根据第二初始参考集合对当前节点进行编码处理;若当前节点使用全局搜索方式,则根据第一初始参考集合对当前节点进行编码处理。
需要说明的是,第一目标参考集合为当前节点在预设编码顺序上的下一节点的第一初始参考集合,可以看做参考范围1;第二目标参考集合为当前节点在预设编码顺序上的下一节点的第二初始参考集合,可以看做参考范围2。也就是说,本申请实施例可以维持两个参考范围,而且参考范围1和参考范围2中的内容一致,但顺序不一致。在这里,参考范围1是通过当前节点替换最远距离点来维持的,而参考范围2是基于删除最远距离点,并将当前节点放置于队尾位置来维持的;这样能保证参考范围2中的参考节点按照希尔伯特顺序排列,能够加速基于空间关系的查找;因此,在基于空间关系来确定预测节点时,在参考范围2中进行查找;进入全局搜索来确定预测节点时,则在参考范围1中进行查找。
除此之外,在一些实施例中,该方法还可以包括:
若当前节点使用空间关系搜索方式或者空间关系深度优先搜索方式,则确定第一目标参考集合和第二目标参考集合均是基于删除队首位置的参考节点、将当前节点放置于队尾位置的方式维持;
若当前节点使用全局搜索方式,则确定第一目标参考集合是基于当前节点替换目标位置处的参考节点的方式维持,第二目标参考集合是基于删除目标位置处的参考节点、将当前节点放置于队尾位置的方式维持。
需要说明的是,本申请实施例可以维持两个参考范围。如果基于空间关系找到了k个预测节点,那么对当前节点进行编码处理,然后参考范围1和参考范围2都是剔除队首位置的点,将当前节点加入队尾位置来维持的;当进入到全局搜索时,这时候参考范围1是通过当前节点替换最远距离点的方式维持,而参考范围2则是通过剔除目标位置处的点、将当前节点加入队尾位置的方式维持。
还需要说明的是,在本申请实施例中,队首位置表示利用当前节点的索引序号与预设常数值进行取余操作之后得到的数值在初始参考集合中对应的位置;队尾位置表示当前节点待放置位置;因此,在完成当前节点的编码处理之后,可以剔除队首位置的点,将当前节点加入队尾位置;也可以看作是利用当 前节点替换队首位置处的参考节点。
本实施例提供了一种编码方法,通过该编码方法可以实现参考范围的确定,具体地,通过当前节点替换最远距离点来构建参考范围,并在此参考范围内查找预测节点以进行点云属性的帧内预测,既能通过基于空间关系降低编解码效率,又能通过全局搜索提高帧内预测准确性,在编码效率和性能之间取得良好的折中,从而提高点云属性的编解码性能。
在本申请的又一实施例中,参见图11,其示出了本申请实施例提供的一种参考范围确定的流程示意图。如图11所示,该流程可以包括:
S1101:确定当前节点对应的索引序号以及初始参考集合。
S1102:根据初始参考集合确定至少一个预测节点,同时确定当前节点放置到初始参考集合内的目标位置。
S1103:根据至少一个预测节点对当前节点进行预测,在完成对当前节点的编码/解码处理之后,将当前节点放置于所述确定的目标位置,以得到目标参考集合。
需要说明的是,在本申请实施例中,初始参考集合中不包括当前节点,目标参考集合中包括当前节点,而且目标参考集合表示当前节点在预设编码/解码顺序上的下一节点对应的初始参考集合。也就是说,这里的初始参考集合/目标参考集合是用于表征确定预测节点的参考范围,该参考范围是随着当前节点的变化而不断更新的。
还需要说明的是,图11所示的参考范围确定流程,既可以应用于编码端,也可以应用于解码端。本申请实施例是在编解码端按照固定的编码/解码顺序(例如,点云原始顺序、莫顿顺序、希尔伯特顺序等)处理点云中的每一个节点,具体实施步骤如下:
步骤1,假定每一个节点搜索预测节点的参考范围最大值为一固定值,例如128,这个参考范围可以是由N个在当前节点之前已编码/解码的参考节点组成,若当前节点为第0~127节点(即其索引序号i=0~127时),则N=i;否则,N=128;
步骤2,在确定参考范围之后,当前节点需要在该参考范围内确定预测节点,与此同时确定当前节点放置到参考范围内的目标位置;
步骤3,根据预测节点的属性重建值对当前节点进行预测,完成对当前节点的编码/解码,然后将编码/解码后的当前节点放置在步骤2中所确定的参考范围内的目标位置。
对于步骤2,本申请实施例可以有多种实施方式,下面以三种实施方式为例进行详细描述。
第一种实施方式:全局搜索(即全局搜索方式)。
假定当前节点为Pi,已编码/解码的参考节点为(P0,P1,…,Pi-1)。
如果i=0,那么参考范围为空,可直接将当前节点的属性预测值设置为固定值(例如,对于颜色属性,可设置为(128,128,128);对于反射率属性,可设置为0),完成编码/解码后,将当前节点按顺序加入参考范围中;
如果i=1,参考范围内包含第0节点P0,则直接确定P0为预测节点,完成编码/解码后,将当前节点按顺序加入参考范围中;
如果i=2,参考范围内包含P0和P1,直接确定P0、P1为预测节点,完成编码/解码后,将当前节点按顺序加入参考范围中;
如果i>=3,且i<128,直接确定当前节点的前3个点为预测节点,完成编码/解码后,将当前节点按顺序加入参考范围中;
如果i=128,直接确定当前节点的前3个点为预测节点,完成编码/解码,在参考范围内按照索引序号从大到小(或从小到大)的顺序比较,确定参考范围内的所有节点中与当前节点距离(曼哈顿距离、欧式距离等)最远的一个点,用当前节点替换最远的一个点所在位置,即完成将当前节点加入参考范围的操作;
如果i>128,则在参考范围内按照索引序号从大到小(或从小到大)的顺序比较,确定参考范围内的所有节点中与当前节点距离(曼哈顿距离、欧式距离等)最近的k个节点(k可以是固定值3,也可以是一个范围3~16)和最远的一个点,将这k个点作为当前节点的预测节点,完成编码/解码后,用当前节点替换最远的一个点所在位置,即完成将当前节点加入参考范围的操作。
第二种实施方式:基于空间关系的搜索(即空间关系搜索方式)。
假定当前节点为Pi,已编码/解码的参考节点为(P0,P1,…,Pi-1)。
如果i=0,那么参考范围为空,可直接将当前节点的属性预测值设置为固定值(例如,对于颜色属性,可设置为(128,128,128);对于反射率属性,可设置为0),完成编码/解码后,将当前节点按顺序加入参考范围中;
如果i=1,参考范围内包含第0节点P0,则直接确定P0为预测节点,完成编码/解码后,将当前节点按顺序加入参考范围中;
如果i=2,参考范围内包含P0和P1,直接确定P0、P1为预测节点,完成编码/解码后,将当前节点按顺序加入参考范围中;
如果i>=3,且i<128,直接确定当前节点的前3个点为预测节点,完成编码/解码后,将当前节点按顺序加入参考范围中;
如果i=128,直接确定当前节点的前3个点为预测节点,完成编码/解码,在参考范围内按照索引序号从大到小(或从小到大)的顺序比较,确定参考范围内的所有节点中与当前节点距离(曼哈顿距离、欧式距离等)最远的一个点,用当前节点替换最远的一个点所在位置,即完成将当前节点加入参考范围的操作;
如果i>128,则在参考范围内基于空间关系首先查找当前节点的父块(或当前节点的祖父块等)、以及与当前节点的父块(或当前节点的祖父块等)共面、共线、共点的邻居块内的子节点,在这些子节点内确定与当前节点距离(曼哈顿距离、欧式距离等)最近的k个节点(k可以是固定值3,也可以是一个范围3~16)和最远的一个点,如果找到3~16个预测节点,则通过这些预测节点完成编码/解码后,用当前节点替换最远的一个点所在位置,即完成将当前节点加入参考范围的操作;如果没有找够3~16个预测节点时,则进入全局搜索的方式,补齐3~16个预测节点,并更新最远的一个点,通过这些预测节点完成编码/解码后,用当前节点替换最远的一个点所在位置,即完成将当前节点加入参考范围的操作。
第三种实施方式:基于空间关系的深度优先搜索(即空间关系深度优先搜索方式)。
假定当前节点为Pi,已编码/解码的参考节点为(P0,P1,…,Pi-1)。
如果i=0,那么参考范围为空,可直接将当前节点的属性预测值设置为固定值(例如,对于颜色属性,可设置为(128,128,128);对于反射率属性,可设置为0),完成编码/解码后,将当前节点按顺序加入参考范围中;
如果i=1,参考范围内包含第0节点P0,则直接确定P0为预测节点,完成编码/解码后,将当前节点按顺序加入参考范围中;
如果i=2,参考范围内包含P0和P1,直接确定P0、P1为预测节点,完成编码/解码后,将当前节点按顺序加入参考范围中;
如果i>=3,且i<128,直接确定当前节点的前3个点为预测节点,完成编码/解码后,将当前节点按顺序加入参考范围中;
如果i=128,直接确定当前节点的前3个点为预测节点,完成编码/解码,在参考范围内按照索引序号从大到小(或从小到大)的顺序比较,确定参考范围内的所有节点中与当前节点距离(曼哈顿距离、欧式距离等)最远的一个点,用当前节点替换最远的一个点所在位置,即完成将当前节点加入参考范围的操作;
如果i>128,则在参考范围内基于空间关系首先查找当前节点的父块(或当前节点的祖父块等)内的子节点,在这些子节点内确定与当前节点距离(曼哈顿距离、欧式距离等)最近的k个节点(k可以是固定值3,也可以是一个范围3~16)和最远的一个点,如果找到3~16个预测节点,则通过这些预测节点完成编码/解码后,用当前节点替换最远的一个点所在位置,即完成将当前节点加入参考范围的操作;如果没有找够3~16个预测节点时,则再在参考范围内基于空间关系查找与当前节点的父块(或当前节点的祖父块等)共面的邻居块内的子节点,补齐3~16个预测节点,并更新最远的一个点,通过这些预测节点完成编码/解码后,用当前节点替换最远的一个点所在位置,即完成将当前节点加入参考范围的操作;如果仍没有找够3~16个预测节点时,则再在参考范围内基于空间关系查找与当前节点的父块(或当前节点的祖父块等)共线的邻居块内的子节点,补齐3~16个预测节点,并更新最远的一个点,通过这些预测节点完成编码/解码后,用当前节点替换最远的一个点所在位置,即完成将当前节点加入参考范围的操作;如果前三步加起来都没有找够3~16个预测节点,则再在参考范围内基于空间关系查找与当前节点的父块(或当前节点的祖父块等)共点的邻居块内的子节点,补齐3~16个预测节点,并更新最远的一个点,通过这些预测节点完成编码/解码后,用当前节点替换最远的一个点所在位置,即完成将当前节点加入参考范围的操作;如果前四步加起来都没有找够3~16个预测节点,则进入全局搜索的方式,补齐3~16个预测节点,并更新最远的一个点,通过这些预测节点完成编码/解码后,用当前节点替换最远的一个点所在位置,即完成将当前节点加入参考范围的操作。
需要说明的是,在第二种实施方式和第三种实施方式中,具体的基于空间关系的查找方式描述如下:
(a)首先依据当前节点在父块(或祖父块等)中所处的方位,确定与其父块(或祖父块等)共面、共线、共点的邻居块,如图8A~图8H示出了当前节点的方位共有八种模式,图9A~图9H示出了在每一种模式下对应的共面、共线、共点的邻居块分布。以希尔伯特码(也可以是莫顿码等)为例,通过当 前节点的父块(或祖父块等)的几何坐标,加上一定的偏移量,可以计算出邻居块的几何坐标,通过几何坐标可计算出相应的希尔伯特码,八种模式所对应的偏移量详见前述内容。
(b)通过比较参考范围内节点的希尔伯特码与邻居块的希尔伯特码,即可确定该节点是否满足共面、共线、共点的条件。
简单来说,在本申请实施例中,结合基于空间关系和全局搜索,并通过替换最远距离点维持参考范围,然后利用该参考范围进行点云属性的帧内预测。
进一步地,在本申请实施例中,对于第二种实施方式和第三种实施方式,如果基于空间关系找到了3~16个预测节点,则进行编码/解码,然后剔除参考范围内队首位置的点,将当前节点加入队尾位置,只有当进入到全局搜索时,才会进行当前节点替换最远距离点。
进一步地,在本申请实施例中,对于第二种实施方式和第三种实施方式,可以维持两个参考范围(参考范围1和参考范围2),而且参考范围1和参考范围2中内容一致,但顺序不一致。其中,参考范围1是通过当前节点替换最远距离点的方式维持;而参考范围2是剔除最远距离点,并将当前节点加入到队尾位置的方式维持。这样,能够保证参考范围2中的节点按照希尔伯特顺序排列,能够加速基于空间关系的查找;在基于空间关系确定预测节点时,可以在参考范围2中进行查找。
进一步地,在本申请实施例中,对于第二种实施方式和第三种实施方式,如果基于空间关系找到了3~16个预测节点,那么进行编码/解码,然后剔除参考范围1、2内队首位置的点,将当前节点加入参考范围1、2的队尾位置;当进入到全局搜索时,参考范围1是通过当前节点替换最远距离点的方式维持,而参考范围2是通过剔除最远距离点,并将当前节点加入到队尾位置的方式维持。
还需要说明的是,在编码端,根据至少一个预测节点对当前节点进行预测,得到当前节点对应的属性预测值之后,还可以根据属性预测值与当前节点对应的属性原始值计算得到属性残差值,然后需要将属性残差值写入码流以传输到解码端。因此,本申请实施例还提供了一种码流,该码流是根据待编码信息进行比特编码生成的;其中,待编码信息至少包括:当前节点对应的属性残差值。
这样,属性残差值写入码流由编码端传输到解码端之后,解码端接收码流并解析码流后,可以得到属性残差值;然后解码端以相同过程预测得到属性预测值,将属性预测值与属性残差值相加之后即可得到当前节点对应的属性重建值。
通过上述实施例对前述实施例的具体实现进行详细阐述,根据前述实施例的技术方案,从中可以看出,本技术方案提供了一种点云属性预测的方法,结合基于空间关系和全局搜索,并通过替换最远距离点来维持参考范围,既能通过基于空间关系降低编解码效率,又能通过全局搜索提高帧内预测准确性,在编码效率和性能之间取得良好的折中。
在本申请的再一实施例中,基于前述实施例相同的发明构思,参见图12,其示出了本申请实施例提供的一种编码器120的组成结构示意图。如图12所示,该编码器120可以包括:第一确定单元1201和编码单元1202;其中,
第一确定单元1201,配置为确定当前节点对应的索引序号以及初始参考集合;以及基于初始参考集合中的参考节点与当前节点之间的距离,确定最大距离值在初始参考集合中对应的目标位置;
编码单元1202,配置为根据初始参考集合对当前节点进行编码处理之后,将当前节点放置于目标位置,得到目标参考集合。
在一些实施例中,第一确定单元1201,还配置为在索引序号大于或等于0且小于预设常数值的情况下,按照预设编码顺序确定当前节点在初始参考集合中对应的目标位置;
编码单元1202,还配置为根据初始参考集合对当前节点进行编码处理之后,在索引序号大于或等于0且小于预设常数值的情况下,直接将当前节点放置于初始参考集合中的目标位置;在索引序号大于或等于预设常数值的情况下,利用当前节点替换目标位置处的参考节点。
在一些实施例中,预设常数值表示初始参考集合包括参考节点个数的最大值,目标参考集合表示当前节点在预设编码顺序上的下一节点对应的初始参考集合。
在一些实施例中,初始参考集合是由N个已编码的参考节点组成;相应地,第一确定单元1201,还配置为若索引序号大于或等于0且小于预设常数值,则确定N的取值等于索引序号;若索引序号大于或等于预设常数值,则确定N的取值等于预设常数值。
在一些实施例中,参见图12,编码器120还可以包括第一预测单元1203,配置为获取当前节点对应的属性原始值;以及根据初始参考集合,确定当前节点对应的属性预测值;
第一确定单元1201,还配置为根据属性原始值和属性预测值,确定当前节点对应的属性残差值;
编码单元1202,还配置为对属性残差值进行编码处理,将得到的编码比特写入码流。
在一些实施例中,第一确定单元1201,还配置为对属性原始值和属性预测值进行减法计算,得到 当前节点对应的属性残差值。
在一些实施例中,第一预测单元1203,还配置为若索引序号等于0,则确定初始参考集合为空集合,将预设属性值直接确定为当前节点对应的属性预测值;若索引序号不等于0,则确定初始参考集合为非空集合,从初始参考集合中确定至少一个预测节点,根据至少一个预测节点确定当前节点对应的属性预测值。
在一些实施例中,第一确定单元1201,还配置为若索引序号等于1,则将初始参考集合中包括的一个参考节点确定为至少一个预测节点;若索引序号等于2,则将初始参考集合中包括的两个参考节点确定为至少一个预测节点;若索引序号大于或等于3且小于或等于预设常数值,则从初始参考集合中获取当前节点在预设编码顺序上的前第一数量个参考节点,将第一数量个参考节点确定为至少一个预测节点;若索引序号大于预设常数值,则从初始参考集合中获取与当前节点之间的距离值相对较小的第二数量个参考节点,将第二数量个参考节点确定为至少一个预测节点。
在一些实施例中,参见图12,编码器120还可以包括第一搜索单元1204,配置为从初始参考集合中,利用全局搜索方式获取与当前节点之间的距离值相对较小的第二数量个参考节点;或者,从初始参考集合中,利用空间关系搜索方式获取与当前节点之间的距离值相对较小的第二数量个参考节点;或者,从初始参考集合中,利用空间关系深度优先搜索方式获取与当前节点之间的距离值相对较小的第二数量个参考节点。
在一些实施例中,第一搜索单元1204,还配置为计算初始参考集合中每一个参考节点与当前节点之间的距离值,从所得到的N个距离值中选取距离值相对较小的第二数量个距离值;以及根据第二数量个距离值,确定第二数量个参考节点;
第一确定单元1201,还配置为从所得到的N个距离值中确定最大距离值,将最大距离值在初始参考集合中对应的位置作为目标位置。
在一些实施例中,第一搜索单元1204,还配置为基于节点与节点之间的空间关系,从初始参考集合中搜索符合预设条件的参考节点,得到M个参考节点;以及计算M个参考节点中每一个参考节点与当前节点之间的距离值,从所得到的M个距离值中选取距离值相对较小的K个距离值,并根据K个距离值确定K个参考节点;以及若K等于第二数量,则将K个参考节点作为第二数量个参考节点;
第一确定单元1201,还配置为从所得到的M个距离值中确定最大距离值,将最大距离值在初始参考集合中对应的位置作为目标位置;
其中,符合预设条件的参考节点,至少包括:当前节点的上层块内的子节点、与当前节点的上层块共面的邻居块内的子节点、与当前节点的上层块共线的邻居块内的子节点和与当前节点的上层块共点的邻居块内的子节点。
在一些实施例中,第一搜索单元1204,还配置为在若K小于第二数量,则利用全局搜索方式计算初始参考集合中的参考节点与当前节点之间的距离值,并根据所述距离值与K个距离值的比较结果确定距离值相对较小的第二数量个距离值,根据第二数量个距离值确定第二数量个参考节点;
第一确定单元1201,还配置为从所得到的M个距离值中确定初始最大距离值;以及在利用全局搜索方式计算初始参考集合中的参考节点与当前节点之间的距离值之后,若初始参考集合中存在参考节点与当前节点之间的距离大于初始最大距离值,则更新初始最大距离值;以及根据更新后的初始最大距离值确定最大距离值,将最大距离值在初始参考集合中对应的位置作为目标位置。
在一些实施例中,第一搜索单元1204,还配置为基于节点与节点之间的空间关系,从初始参考集合中搜索当前节点的上层块内的子节点,得到K1个参考节点;以及计算K1个参考节点中每一个参考节点与当前节点之间的距离值,从所得到的K1个距离值中选取距离值相对较小的K2个距离值和初始最大距离值,并根据K2个距离值确定K2个参考节点;若K2等于第二数量,则将K2个参考节点作为第二数量个参考节点,将初始最大距离值作为最大距离值;若K2小于第二数量,则继续从初始参考集合中搜索与当前节点的上层块共面的邻居块内的子节点,得到K3个参考节点;以及计算K3个参考节点中每一个参考节点与当前节点之间的距离值,并根据所得到的K3个距离值和K2个距离值的比较结果确定距离值相对较小的K4个距离值,根据K4个距离值确定K4个参考节点,以及基于K3个距离值更新初始最大距离值;若K4等于第二数量,则将K4个参考节点作为第二数量个参考节点,将更新后的初始最大距离值作为最大距离值;若K4小于第二数量,则继续从初始参考集合中搜索与当前节点的上层块共线的邻居块内的子节点,得到K5个参考节点;以及计算K5个参考节点中每一个参考节点与当前节点之间的距离值,并根据所得到的K5个距离值和K4个距离值的比较结果确定距离值相对较小的K6个距离值,根据K6个距离值确定K6个参考节点,以及基于K5个距离值继续更新初始最大距离值;若K6等于第二数量,则将K6个参考节点作为第二数量个参考节点,将更新后的初始最大距离值作为最大距离值;若K6小于第二数量,则继续从初始参考集合中搜索与当前节点的上层块共点的 邻居块内的子节点,得到K7个参考节点;以及计算K7个参考节点中每一个参考节点与当前节点之间的距离值,并根据所得到的K7个距离值和K6个距离值的比较结果确定距离值相对较小的K8个距离值,根据K8个距离值确定K8个参考节点,以及基于K7个距离值继续更新初始最大距离值;若K8等于第二数量,则将K8个参考节点作为第二数量个参考节点,将更新后的初始最大距离值作为最大距离值;若K8小于第二数量,则利用全局搜索方式计算初始参考集合中的参考节点与当前节点之间的距离值,并根据所述距离值与K8个距离值的比较结果确定距离值相对较小的第二数量个距离值,根据第二数量个距离值确定第二数量个参考节点;
第一确定单元1201,还配置为在利用全局搜索方式计算初始参考集合中的参考节点与当前节点之间的距离值之后,若初始参考集合中存在参考节点与当前节点之间的距离大于初始最大距离值,则继续更新初始最大距离值;以及根据更新后的初始最大距离值确定最大距离值,将最大距离值在初始参考集合中对应的位置作为目标位置。
在一些实施例中,当前节点的上层块至少包括下述其中之一:当前节点的父块、当前节点的祖父块。
在一些实施例中,第一确定单元1201,还配置为在索引序号大于或等于预设常数值的情况下,将初始参考集合中的队尾位置确定为目标位置;
编码单元1202,还配置为根据初始参考集合对当前节点进行编码处理之后,删除初始参考集合中队首位置处的参考节点,并将当前节点放置于目标位置,得到目标参考集合。
在一些实施例中,初始参考集合包括第一初始参考集合和第二初始参考集合;相应地,编码单元1202,还配置为根据第一初始参考集合对当前节点进行编码处理之后,得到第一目标参考集合;其中,第一目标参考集合是基于当前节点替换第一初始参考集合中目标位置处的参考节点得到的;和/或,根据第二初始参考集合对当前节点进行解码处理之后,得到第二目标参考集合;其中,第二目标参考集合是基于删除第二初始参考集合中目标位置处的参考节点、将当前节点放置于队尾位置得到的。
在一些实施例中,编码单元1202,还配置为若当前节点使用空间关系搜索方式或者空间关系深度优先搜索方式,则根据第二初始参考集合对当前节点进行编码处理;若当前节点使用全局搜索方式,则根据第一初始参考集合对当前节点进行编码处理。
在一些实施例中,第一确定单元1201,还配置为若当前节点使用空间关系搜索方式或者空间关系深度优先搜索方式,则确定第一目标参考集合和第二目标参考集合均是基于删除队首位置的参考节点、将当前节点放置于队尾位置的方式维持;若当前节点使用全局搜索方式,则确定第一目标参考集合是基于当前节点替换目标位置处的参考节点的方式维持,第二目标参考集合是基于删除目标位置处的参考节点、将当前节点放置于队尾位置的方式维持。
可以理解地,在本实施例中,“单元”可以是部分电路、部分处理器、部分程序或软件等等,当然也可以是模块,还可以是非模块化的。而且在本实施例中的各组成部分可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。
所述集成的单元如果以软件功能模块的形式实现并非作为独立的产品进行销售或使用时,可以存储在一个计算机可读取存储介质中,基于这样的理解,本实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或processor(处理器)执行本实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
因此,本申请实施例提供了一种计算机可读存储介质,应用于编码器120,该计算机可读存储介质存储有计算机程序,所述计算机程序被第一处理器执行时实现前述实施例中任一项所述的方法。
基于上述编码器120的组成以及计算机可读存储介质,参见图13,其示出了本申请实施例提供的编码器120的具体硬件结构示意图。如图13所示,编码器120可以包括:第一通信接口1301、第一存储器1302和第一处理器1303;各个组件通过第一总线系统1304耦合在一起。可理解,第一总线系统1304用于实现这些组件之间的连接通信。第一总线系统1304除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图13中将各种总线都标为第一总线系统1304。其中,
第一通信接口1301,用于在与其他外部网元之间进行收发信息过程中,信号的接收和发送;
第一存储器1302,用于存储能够在第一处理器1303上运行的计算机程序;
第一处理器1303,用于在运行所述计算机程序时,执行:
确定当前节点对应的索引序号以及初始参考集合;
基于初始参考集合中的参考节点与当前节点之间的距离,确定最大距离值在初始参考集合中对应的目标位置;
根据初始参考集合对当前节点进行编码处理之后,将当前节点放置于目标位置,得到目标参考集合。
可以理解,本申请实施例中的第一存储器1302可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(Random Access Memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)、同步动态随机存取存储器(Synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(Double Data Rate SDRAM,DDRSDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(Synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(Direct Rambus RAM,DRRAM)。本申请描述的系统和方法的第一存储器1302旨在包括但不限于这些和任意其它适合类型的存储器。
而第一处理器1303可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤可以通过第一处理器1303中的硬件的集成逻辑电路或者软件形式的指令完成。上述的第一处理器1303可以是通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于第一存储器1302,第一处理器1303读取第一存储器1302中的信息,结合其硬件完成上述方法的步骤。
可以理解的是,本申请描述的这些实施例可以用硬件、软件、固件、中间件、微码或其组合来实现。对于硬件实现,处理单元可以实现在一个或多个专用集成电路(Application Specific Integrated Circuits,ASIC)、数字信号处理器(Digital Signal Processing,DSP)、数字信号处理设备(DSP Device,DSPD)、可编程逻辑设备(Programmable Logic Device,PLD)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、通用处理器、控制器、微控制器、微处理器、用于执行本申请所述功能的其它电子单元或其组合中。对于软件实现,可通过执行本申请所述功能的模块(例如过程、函数等)来实现本申请所述的技术。软件代码可存储在存储器中并通过处理器执行。存储器可以在处理器中或在处理器外部实现。
可选地,作为另一个实施例,第一处理器1303还配置为在运行所述计算机程序时,执行前述实施例中任一项所述的方法。
本实施例提供了一种编码器,在该编码器中,基于最远距离点构建目标参考集合,然后利用该目标参考集合进行点云的属性预测,能够提高点云属性的预测准确性,并且提高点云属性的编解码性能。
在本申请的再一实施例中,基于前述实施例相同的发明构思,参见图14,其示出了本申请实施例提供的一种解码器140的组成结构示意图。如图14所示,该解码器140可以包括:第二确定单元1401和解码单元1402;其中,
第二确定单元1401,配置为确定当前节点对应的索引序号以及初始参考集合;以及基于初始参考集合中的参考节点与当前节点之间的距离,确定最大距离值在初始参考集合中对应的目标位置;
解码单元1402,配置为根据初始参考集合对当前节点进行解码处理之后,将当前节点放置于目标位置,得到目标参考集合。
在一些实施例中,第二确定单元1401,还配置为在索引序号大于或等于0且小于预设常数值的情况下,按照预设解码顺序确定当前节点在初始参考集合中对应的目标位置;
解码单元1402,还配置为根据初始参考集合对当前节点进行解码处理之后,在索引序号大于或等于0且小于预设常数值的情况下,直接将当前节点放置于初始参考集合中的目标位置;在索引序号大于或等于预设常数值的情况下,利用当前节点替换目标位置处的参考节点。
在一些实施例中,预设常数值表示初始参考集合包括参考节点个数的最大值,目标参考集合表示当前节点在预设解码顺序上的下一节点对应的初始参考集合。
在一些实施例中,初始参考集合是由N个已解码的参考节点组成;方相应地,第二确定单元1401,还配置为若索引序号大于或等于0且小于预设常数值,则确定N的取值等于索引序号;若索引序号大 于或等于预设常数值,则确定N的取值等于预设常数值。
在一些实施例中,参见图14,解码器140还可以包括第二预测单元1403,配置为根据初始参考集合,确定当前节点对应的属性预测值;
解码单元1402,还配置为解析码流,确定当前节点对应的属性残差值;
第二确定单元1401,还配置为根据属性残差值和属性预测值,确定当前节点对应的属性重建值。
在一些实施例中,第二确定单元1401,还配置为对属性残差值和属性预测值进行加法计算,得到当前节点对应的属性重建值。
在一些实施例中,第二预测单元1403,还配置为若索引序号等于0,则确定初始参考集合为空集合,将预设属性值直接确定为当前节点对应的属性预测值;若索引序号不等于0,则确定初始参考集合为非空集合,从初始参考集合中确定至少一个预测节点,根据至少一个预测节点确定当前节点对应的属性预测值。
在一些实施例中,第二确定单元1401,还配置为若索引序号等于1,则将初始参考集合中包括的一个参考节点确定为至少一个预测节点;若索引序号等于2,则将初始参考集合中包括的两个参考节点确定为至少一个预测节点;若索引序号大于或等于3且小于或等于预设常数值,则从初始参考集合中获取当前节点在预设解码顺序上的前第一数量个参考节点,将第一数量个参考节点确定为至少一个预测节点;若索引序号大于预设常数值,则从初始参考集合中获取与当前节点之间的距离值相对较小的第二数量个参考节点,将第二数量个参考节点确定为至少一个预测节点。
在一些实施例中,参见图14,解码器140还可以包括第二搜索单元1404,配置为从初始参考集合中,利用全局搜索方式获取与当前节点之间的距离值相对较小的第二数量个参考节点;或者,从初始参考集合中,利用空间关系搜索方式获取与当前节点之间的距离值相对较小的第二数量个参考节点;或者,从初始参考集合中,利用空间关系深度优先搜索方式获取与当前节点之间的距离值相对较小的第二数量个参考节点。
在一些实施例中,第二搜索单元1404,还配置为计算初始参考集合中每一个参考节点与当前节点之间的距离值,从所得到的N个距离值中选取距离值相对较小的第二数量个距离值;以及根据第二数量个距离值,确定第二数量个参考节点;
第二确定单元1401,还配置为从所得到的N个距离值中确定最大距离值,将最大距离值在初始参考集合中对应的位置作为目标位置。
在一些实施例中,第二搜索单元1404,还配置为基于节点与节点之间的空间关系,从初始参考集合中搜索符合预设条件的参考节点,得到M个参考节点;以及计算M个参考节点中每一个参考节点与当前节点之间的距离值,从所得到的M个距离值中选取距离值相对较小的K个距离值,并根据K个距离值确定K个参考节点;以及若K等于第二数量,则将K个参考节点作为第二数量个参考节点;
第二确定单元1401,还配置为从所得到的M个距离值中确定最大距离值,将最大距离值在初始参考集合中对应的位置作为目标位置;
其中,符合预设条件的参考节点,至少包括:当前节点的上层块内的子节点、与当前节点的上层块共面的邻居块内的子节点、与当前节点的上层块共线的邻居块内的子节点和与当前节点的上层块共点的邻居块内的子节点。
在一些实施例中,第二搜索单元1404,还配置为若K小于第二数量,则利用全局搜索方式计算初始参考集合中的参考节点与当前节点之间的距离值,并根据所述距离值与K个距离值的比较结果确定距离值相对较小的第二数量个距离值,根据第二数量个距离值确定第二数量个参考节点;
第二确定单元1401,还配置为从所得到的M个距离值中确定初始最大距离值;以及在利用全局搜索方式计算初始参考集合中的参考节点与当前节点之间的距离值之后,若初始参考集合中存在参考节点与当前节点之间的距离大于初始最大距离值,则更新初始最大距离值;以及根据更新后的初始最大距离值确定最大距离值,将最大距离值在初始参考集合中对应的位置作为目标位置。
在一些实施例中,第二搜索单元1404,还配置为基于节点与节点之间的空间关系,从初始参考集合中搜索当前节点的上层块内的子节点,得到K1个参考节点;以及计算K1个参考节点中每一个参考节点与当前节点之间的距离值,从所得到的K1个距离值中选取距离值相对较小的K2个距离值和初始最大距离值,并根据K2个距离值确定K2个参考节点;若K2等于第二数量,则将K2个参考节点作为第二数量个参考节点,将初始最大距离值作为最大距离值;若K2小于第二数量,则继续从初始参考集合中搜索与当前节点的上层块共面的邻居块内的子节点,得到K3个参考节点;以及计算K3个参考节点中每一个参考节点与当前节点之间的距离值,并根据所得到的K3个距离值和K2个距离值的比较结果确定距离值相对较小的K4个距离值,根据K4个距离值确定K4个参考节点,以及基于K3个距离值更新初始最大距离值;若K4等于第二数量,则将K4个参考节点作为第二数量个参考节点,将更新 后的初始最大距离值作为最大距离值;若K4小于第二数量,则继续从初始参考集合中搜索与当前节点的上层块共线的邻居块内的子节点,得到K5个参考节点;以及计算K5个参考节点中每一个参考节点与当前节点之间的距离值,并根据所得到的K5个距离值和K4个距离值的比较结果确定距离值相对较小的K6个距离值,根据K6个距离值确定K6个参考节点,以及基于K5个距离值继续更新初始最大距离值;若K6等于第二数量,则将K6个参考节点作为第二数量个参考节点,将更新后的初始最大距离值作为最大距离值;若K6小于第二数量,则继续从初始参考集合中搜索与当前节点的上层块共点的邻居块内的子节点,得到K7个参考节点;以及计算K7个参考节点中每一个参考节点与当前节点之间的距离值,并根据所得到的K7个距离值和K6个距离值的比较结果确定距离值相对较小的K8个距离值,根据K8个距离值确定K8个参考节点,以及基于K7个距离值继续更新初始最大距离值;若K8等于第二数量,则将K8个参考节点作为第二数量个参考节点,将更新后的初始最大距离值作为最大距离值;若K8小于第二数量,则利用全局搜索方式计算初始参考集合中的参考节点与当前节点之间的距离值,并根据所述距离值与K8个距离值的比较结果确定距离值相对较小的第二数量个距离值,根据第二数量个距离值确定第二数量个参考节点;
第二确定单元1401,还配置为在利用全局搜索方式计算初始参考集合中的参考节点与当前节点之间的距离值之后,若初始参考集合中存在参考节点与当前节点之间的距离大于初始最大距离值,则继续更新初始最大距离值;以及根据更新后的初始最大距离值确定最大距离值,将最大距离值在初始参考集合中对应的位置作为目标位置。
在一些实施例中,当前节点的上层块至少包括下述其中之一:当前节点的父块、当前节点的祖父块。
在一些实施例中,第二确定单元1401,还配置为在索引序号大于或等于预设常数值的情况下,将初始参考集合中的队尾位置确定为目标位置;
解码单元1402,还配置为根据初始参考集合对当前节点进行解码处理之后,删除初始参考集合中队首位置处的参考节点,并将当前节点放置于目标位置,得到目标参考集合。
在一些实施例中,初始参考集合包括第一初始参考集合和第二初始参考集合;相应地,解码单元1402,还配置为根据第一初始参考集合对当前节点进行解码处理之后,得到第一目标参考集合;其中,第一目标参考集合是基于当前节点替换第一初始参考集合中目标位置处的参考节点得到的;和/或,根据第二初始参考集合对当前节点进行解码处理之后,得到第二目标参考集合;其中,第二目标参考集合是基于删除第二初始参考集合中目标位置处的参考节点、将当前节点放置于队尾位置得到的。
在一些实施例中,解码单元1402,还配置为若当前节点使用空间关系搜索方式或者空间关系深度优先搜索方式,则根据第二初始参考集合对当前节点进行解码处理;若当前节点使用全局搜索方式,则根据第一初始参考集合对当前节点进行解码处理。
在一些实施例中,第二确定单元1401,还配置为若当前节点使用空间关系搜索方式或者空间关系深度优先搜索方式,则确定第一目标参考集合和第二目标参考集合均是基于删除队首位置的参考节点、将当前节点放置于队尾位置的方式维持;若当前节点使用全局搜索方式,则确定第一目标参考集合是基于当前节点替换目标位置处的参考节点的方式维持,第二目标参考集合是基于删除目标位置处的参考节点、将当前节点放置于队尾位置的方式维持。
可以理解地,在本实施例中,“单元”可以是部分电路、部分处理器、部分程序或软件等等,当然也可以是模块,还可以是非模块化的。而且在本实施例中的各组成部分可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。
所述集成的单元如果以软件功能模块的形式实现并非作为独立的产品进行销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本实施例提供了一种计算机可读存储介质,应用于解码器140,该计算机可读存储介质存储有计算机程序,所述计算机程序被第二处理器执行时实现前述实施例中任一项所述的方法。
基于上述解码器140的组成以及计算机可读存储介质,参见图15,其示出了本申请实施例提供的解码器140的具体硬件结构示意图。如图15所示,解码器140可以包括:第二通信接口1501、第二存储器1502和第二处理器1503;各个组件通过第二总线系统1504耦合在一起。可理解,第二总线系统1504用于实现这些组件之间的连接通信。第二总线系统1504除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图15中将各种总线都标为第二总线系统1504。其中,
第二通信接口1501,用于在与其他外部网元之间进行收发信息过程中,信号的接收和发送;
第二存储器1502,用于存储能够在第二处理器1503上运行的计算机程序;
第二处理器1503,用于在运行所述计算机程序时,执行:
确定当前节点对应的索引序号以及初始参考集合;
基于初始参考集合中的参考节点与当前节点之间的距离,确定最大距离值在初始参考集合中对应的目标位置;
根据初始参考集合对当前节点进行解码处理之后,将当前节点放置于目标位置,得到目标参考集合。
可选地,作为另一个实施例,第二处理器1503还配置为在运行所述计算机程序时,执行前述实施例中任一项所述的方法。
可以理解,第二存储器1502与第一存储器1302的硬件功能类似,第二处理器1503与第一处理器1303的硬件功能类似;这里不再详述。
本实施例提供了一种解码器,在该解码器中,基于最远距离点构建目标参考集合,然后利用该目标参考集合进行点云的属性预测,能够提高点云属性的预测准确性,并且提高点云属性的编解码性能。
需要说明的是,在本申请中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。
本申请所提供的几个方法实施例中所揭露的方法,在不冲突的情况下可以任意组合,得到新的方法实施例。
本申请所提供的几个产品实施例中所揭露的特征,在不冲突的情况下可以任意组合,得到新的产品实施例。
本申请所提供的几个方法或设备实施例中所揭露的特征,在不冲突的情况下可以任意组合,得到新的方法实施例或设备实施例。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。
工业实用性
本申请实施例中,在编码端或解码端,确定当前节点对应的索引序号以及初始参考集合;基于初始参考集合中的参考节点与当前节点之间的距离,确定最大距离值在初始参考集合中对应的目标位置;根据初始参考集合对当前节点进行编码/解码处理之后,将当前节点放置于目标位置,得到目标参考集合。这样,利用当前节点替换最大距离值对应的参考节点来构建目标参考集合,利用该目标参考集合进行点云的属性预测,能够提高点云属性的预测准确性,并且提高点云属性的编解码性能。

Claims (42)

  1. 一种解码方法,应用于解码器,所述方法包括:
    确定当前节点对应的索引序号以及初始参考集合;
    基于所述初始参考集合中的参考节点与所述当前节点之间的距离,确定最大距离值在所述初始参考集合中对应的目标位置;
    根据所述初始参考集合对所述当前节点进行解码处理之后,将所述当前节点放置于所述目标位置,得到目标参考集合。
  2. 根据权利要求1所述的方法,其中,所述方法还包括:
    在所述索引序号大于或等于0且小于预设常数值的情况下,按照预设解码顺序确定所述当前节点在所述初始参考集合中对应的目标位置;
    相应地,根据所述初始参考集合对所述当前节点进行解码处理之后,所述将所述当前节点放置于所述目标位置,包括:
    在所述索引序号大于或等于0且小于预设常数值的情况下,直接将所述当前节点放置于所述初始参考集合中的所述目标位置;
    在所述索引序号大于或等于预设常数值的情况下,利用所述当前节点替换所述目标位置处的参考节点。
  3. 根据权利要求2所述的方法,其中,所述预设常数值表示所述初始参考集合包括参考节点个数的最大值,所述目标参考集合表示所述当前节点在预设解码顺序上的下一节点对应的初始参考集合。
  4. 根据权利要求2所述的方法,其中,所述初始参考集合是由N个已解码的参考节点组成;所述方法还包括:
    若所述索引序号大于或等于0且小于预设常数值,则确定N的取值等于所述索引序号;
    若所述索引序号大于或等于预设常数值,则确定N的取值等于所述预设常数值。
  5. 根据权利要求4所述的方法,其中,所述根据所述初始参考集合对所述当前节点进行解码处理,包括:
    解析码流,确定所述当前节点对应的属性残差值;
    根据所述初始参考集合,确定所述当前节点对应的属性预测值;
    根据所述属性残差值和所述属性预测值,确定所述当前节点对应的属性重建值。
  6. 根据权利要求5所述的方法,其中,所述根据所述属性残差值和所述属性预测值,确定所述当前节点对应的属性重建值,包括:
    对所述属性残差值和所述属性预测值进行加法计算,得到所述当前节点对应的属性重建值。
  7. 根据权利要求5所述的方法,其中,所述根据所述初始参考集合,确定所述当前节点对应的属性预测值,包括:
    若所述索引序号等于0,则确定所述初始参考集合为空集合,将预设属性值直接确定为所述当前节点对应的属性预测值;
    若所述索引序号不等于0,则确定所述初始参考集合为非空集合,从所述初始参考集合中确定至少一个预测节点,根据所述至少一个预测节点确定所述当前节点对应的属性预测值。
  8. 根据权利要求7所述的方法,其中,当所述索引序号不等于0时,所述从所述初始参考集合中确定至少一个预测节点,包括:
    若所述索引序号等于1,则将所述初始参考集合中包括的一个参考节点确定为所述至少一个预测节点;
    若所述索引序号等于2,则将所述初始参考集合中包括的两个参考节点确定为所述至少一个预测节点;
    若所述索引序号大于或等于3且小于或等于预设常数值,则从所述初始参考集合中获取所述当前节点在预设解码顺序上的前第一数量个参考节点,将所述第一数量个参考节点确定为所述至少一个预测节点;
    若所述索引序号大于预设常数值,则从所述初始参考集合中获取与所述当前节点之间的距离值相对较小的第二数量个参考节点,将所述第二数量个参考节点确定为所述至少一个预测节点。
  9. 根据权利要求8所述的方法,其中,所述从所述初始参考集合中获取与所述当前节点之间的距离值相对较小的第二数量个参考节点,包括:
    从所述初始参考集合中,利用全局搜索方式获取与所述当前节点之间的距离值相对较小的第二数 量个参考节点;或者,
    从所述初始参考集合中,利用空间关系搜索方式获取与所述当前节点之间的距离值相对较小的第二数量个参考节点;或者,
    从所述初始参考集合中,利用空间关系深度优先搜索方式获取与所述当前节点之间的距离值相对较小的第二数量个参考节点。
  10. 根据权利要求9所述的方法,其中,所述利用全局搜索方式获取与所述当前节点之间的距离值相对较小的第二数量个参考节点,包括:
    计算所述初始参考集合中每一个参考节点与所述当前节点之间的距离值,从所得到的N个距离值中选取距离值相对较小的第二数量个距离值;
    根据所述第二数量个距离值,确定所述第二数量个参考节点;
    相应地,所述基于所述初始参考集合中的参考节点与所述当前节点之间的距离,确定最大距离值在所述初始参考集合中对应的目标位置,包括:
    从所得到的N个距离值中确定所述最大距离值,将所述最大距离值在所述初始参考集合中对应的位置作为所述目标位置。
  11. 根据权利要求9所述的方法,其中,所述利用空间关系搜索方式获取与所述当前节点之间的距离值相对较小的第二数量个参考节点,包括:
    基于节点与节点之间的空间关系,从所述初始参考集合中搜索符合预设条件的参考节点,得到M个参考节点;
    计算所述M个参考节点中每一个参考节点与所述当前节点之间的距离值,从所得到的M个距离值中选取距离值相对较小的K个距离值,并根据所述K个距离值确定K个参考节点;
    若所述K等于所述第二数量,则将所述K个参考节点作为所述第二数量个参考节点;
    相应地,所述基于所述初始参考集合中的参考节点与所述当前节点之间的距离,确定最大距离值在所述初始参考集合中对应的目标位置,包括:
    从所得到的M个距离值中确定所述最大距离值,将所述最大距离值在所述初始参考集合中对应的位置作为所述目标位置;
    其中,所述符合预设条件的参考节点,至少包括:所述当前节点的上层块内的子节点、与所述当前节点的上层块共面的邻居块内的子节点、与所述当前节点的上层块共线的邻居块内的子节点和与所述当前节点的上层块共点的邻居块内的子节点。
  12. 根据权利要求11所述的方法,其中,所述方法还包括:
    若所述K小于所述第二数量,则利用全局搜索方式计算所述初始参考集合中的参考节点与当前节点之间的距离值,并根据所述距离值与所述K个距离值的比较结果确定距离值相对较小的第二数量个距离值,根据所述第二数量个距离值确定所述第二数量个参考节点;
    相应地,所述基于所述初始参考集合中的参考节点与所述当前节点之间的距离,确定最大距离值在所述初始参考集合中对应的目标位置,包括:
    从所得到的M个距离值中确定初始最大距离值;
    在利用全局搜索方式计算所述初始参考集合中的参考节点与当前节点之间的距离值之后,若所述初始参考集合中存在参考节点与所述当前节点之间的距离大于所述初始最大距离值,则更新所述初始最大距离值;
    根据更新后的所述初始最大距离值确定所述最大距离值,将所述最大距离值在所述初始参考集合中对应的位置作为所述目标位置。
  13. 根据权利要求9所述的方法,其中,所述利用空间关系深度优先搜索方式获取与所述当前节点之间的距离值相对较小的第二数量个参考节点,包括:
    基于节点与节点之间的空间关系,从所述初始参考集合中搜索所述当前节点的上层块内的子节点,得到K1个参考节点;
    计算所述K1个参考节点中每一个参考节点与所述当前节点之间的距离值,从所得到的K1个距离值中选取距离值相对较小的K2个距离值和初始最大距离值,并根据所述K2个距离值确定所述K2个参考节点;
    若所述K2等于所述第二数量,则将所述K2个参考节点作为所述第二数量个参考节点,将所述初始最大距离值作为所述最大距离值;
    若所述K2小于所述第二数量,则继续从所述初始参考集合中搜索与所述当前节点的上层块共面的邻居块内的子节点,得到K3个参考节点;
    计算所述K3个参考节点中每一个参考节点与所述当前节点之间的距离值,并根据所得到的K3个 距离值和所述K2个距离值的比较结果确定距离值相对较小的K4个距离值,根据所述K4个距离值确定K4个参考节点,以及基于所述K3个距离值更新所述初始最大距离值;
    若所述K4等于所述第二数量,则将所述K4个参考节点作为所述第二数量个参考节点,将更新后的所述初始最大距离值作为所述最大距离值;
    若所述K4小于所述第二数量,则继续从所述初始参考集合中搜索与所述当前节点的上层块共线的邻居块内的子节点,得到K5个参考节点;
    计算所述K5个参考节点中每一个参考节点与所述当前节点之间的距离值,并根据所得到的K5个距离值和所述K4个距离值的比较结果确定距离值相对较小的K6个距离值,根据所述K6个距离值确定K6个参考节点,以及基于所述K5个距离值继续更新所述初始最大距离值;
    若所述K6等于所述第二数量,则将所述K6个参考节点作为所述第二数量个参考节点,将更新后的所述初始最大距离值作为所述最大距离值;
    若所述K6小于所述第二数量,则继续从所述初始参考集合中搜索与所述当前节点的上层块共点的邻居块内的子节点,得到K7个参考节点;
    计算所述K7个参考节点中每一个参考节点与所述当前节点之间的距离值,并根据所得到的K7个距离值和所述K6个距离值的比较结果确定距离值相对较小的K8个距离值,根据所述K8个距离值确定K8个参考节点,以及基于所述K7个距离值继续更新所述初始最大距离值;
    若所述K8等于所述第二数量,则将所述K8个参考节点作为所述第二数量个参考节点,将更新后的所述初始最大距离值作为所述最大距离值;
    若所述K8小于所述第二数量,则利用全局搜索方式计算所述初始参考集合中的参考节点与当前节点之间的距离值,并根据所述距离值与所述K8个距离值的比较结果确定距离值相对较小的第二数量个距离值,根据所述第二数量个距离值确定所述第二数量个参考节点;
    相应地,所述基于所述初始参考集合中的参考节点与所述当前节点之间的距离,确定最大距离值在所述初始参考集合中对应的目标位置,包括:
    在利用全局搜索方式计算所述初始参考集合中的参考节点与当前节点之间的距离值之后,若所述初始参考集合中存在参考节点与所述当前节点之间的距离大于所述初始最大距离值,则继续更新所述初始最大距离值;
    根据更新后的所述初始最大距离值确定所述最大距离值,将所述最大距离值在所述初始参考集合中对应的位置作为所述目标位置。
  14. 根据权利要求11至13任一项所述的方法,其中,所述当前节点的上层块至少包括下述其中之一:所述当前节点的父块、所述当前节点的祖父块。
  15. 根据权利要求1所述的方法,其中,所述方法还包括:
    在所述索引序号大于或等于预设常数值的情况下,将所述初始参考集合中的队尾位置确定为目标位置;
    相应地,所述方法还包括:根据所述初始参考集合对所述当前节点进行解码处理之后,删除所述初始参考集合中队首位置处的参考节点,并将所述当前节点放置于所述目标位置,得到所述目标参考集合。
  16. 根据权利要求1所述的方法,其中,所述初始参考集合包括第一初始参考集合和第二初始参考集合;所述方法还包括:
    根据所述第一初始参考集合对所述当前节点进行解码处理之后,得到第一目标参考集合;其中,所述第一目标参考集合是基于所述当前节点替换所述第一初始参考集合中所述目标位置处的参考节点得到的;和/或
    根据所述第二初始参考集合对所述当前节点进行解码处理之后,得到第二目标参考集合;其中,所述第二目标参考集合是基于删除所述第二初始参考集合中所述目标位置处的参考节点、将所述当前节点放置于队尾位置得到的。
  17. 根据权利要求16所述的方法,其中,所述方法还包括:
    若所述当前节点使用全局搜索方式,则根据所述第一初始参考集合对所述当前节点进行解码处理;
    若所述当前节点使用空间关系搜索方式或者空间关系深度优先搜索方式,则根据所述第二初始参考集合对所述当前节点进行解码处理。
  18. 根据权利要求16所述的方法,其中,所述方法还包括:
    若所述当前节点使用空间关系搜索方式或者空间关系深度优先搜索方式,则确定所述第一目标参考集合和所述第二目标参考集合均是基于删除队首位置的参考节点、将所述当前节点放置于队尾位置的方式维持;
    若所述当前节点使用全局搜索方式,则确定所述第一目标参考集合是基于所述当前节点替换所述 目标位置处的参考节点的方式维持,所述第二目标参考集合是基于删除所述目标位置处的参考节点、将所述当前节点放置于队尾位置的方式维持。
  19. 一种编码方法,应用于编码器,所述方法包括:
    确定当前节点对应的索引序号以及初始参考集合;
    基于所述初始参考集合中的参考节点与所述当前节点之间的距离,确定最大距离值在所述初始参考集合中对应的目标位置;
    根据所述初始参考集合对所述当前节点进行编码处理之后,将所述当前节点放置于所述目标位置,得到目标参考集合。
  20. 根据权利要求19所述的方法,其中,所述方法还包括:
    在所述索引序号大于或等于0且小于预设常数值的情况下,按照预设编码顺序确定所述当前节点在所述初始参考集合中对应的目标位置;
    相应地,根据所述初始参考集合对所述当前节点进行编码处理之后,所述将所述当前节点放置于所述目标位置,包括:
    在所述索引序号大于或等于0且小于预设常数值的情况下,直接将所述当前节点放置于所述初始参考集合中的所述目标位置;
    在所述索引序号大于或等于预设常数值的情况下,利用所述当前节点替换所述目标位置处的参考节点。
  21. 根据权利要求20所述的方法,其中,所述预设常数值表示所述初始参考集合包括参考节点个数的最大值,所述目标参考集合表示所述当前节点在预设编码顺序上的下一节点对应的初始参考集合。
  22. 根据权利要求20所述的方法,其中,所述初始参考集合是由N个已编码的参考节点组成;所述方法还包括:
    若所述索引序号大于或等于0且小于预设常数值,则确定N的取值等于所述索引序号;
    若所述索引序号大于或等于预设常数值,则确定N的取值等于所述预设常数值。
  23. 根据权利要求22所述的方法,其中,所述根据所述初始参考集合对所述当前节点进行编码处理,包括:
    获取所述当前节点对应的属性原始值;
    根据所述初始参考集合,确定所述当前节点对应的属性预测值;
    根据所述属性原始值和所述属性预测值,确定所述当前节点对应的属性残差值;
    对所述属性残差值进行编码处理,将得到的编码比特写入码流。
  24. 根据权利要求23所述的方法,其中,所述根据所述属性原始值和所述属性预测值,确定所述当前节点对应的属性残差值,包括:
    对所述属性原始值和所述属性预测值进行减法计算,得到所述当前节点对应的属性残差值。
  25. 根据权利要求23所述的方法,其中,所述根据所述初始参考集合,确定所述当前节点对应的属性预测值,包括:
    若所述索引序号等于0,则确定所述初始参考集合为空集合,将预设属性值直接确定为所述当前节点对应的属性预测值;
    若所述索引序号不等于0,则确定所述初始参考集合为非空集合,从所述初始参考集合中确定至少一个预测节点,根据所述至少一个预测节点确定所述当前节点对应的属性预测值。
  26. 根据权利要求25所述的方法,其中,当所述索引序号不等于0时,所述从所述初始参考集合中确定至少一个预测节点,包括:
    若所述索引序号等于1,则将所述初始参考集合中包括的一个参考节点确定为所述至少一个预测节点;
    若所述索引序号等于2,则将所述初始参考集合中包括的两个参考节点确定为所述至少一个预测节点;
    若所述索引序号大于或等于3且小于或等于预设常数值,则从所述初始参考集合中获取所述当前节点在预设编码顺序上的前第一数量个参考节点,将所述第一数量个参考节点确定为所述至少一个预测节点;
    若所述索引序号大于预设常数值,则从所述初始参考集合中获取与所述当前节点之间的距离值相对较小的第二数量个参考节点,将所述第二数量个参考节点确定为所述至少一个预测节点。
  27. 根据权利要求26所述的方法,其中,所述从所述初始参考集合中获取与所述当前节点之间的距离值相对较小的第二数量个参考节点,包括:
    从所述初始参考集合中,利用全局搜索方式获取与所述当前节点之间的距离值相对较小的第二数 量个参考节点;或者,
    从所述初始参考集合中,利用空间关系搜索方式获取与所述当前节点之间的距离值相对较小的第二数量个参考节点;或者,
    从所述初始参考集合中,利用空间关系深度优先搜索方式获取与所述当前节点之间的距离值相对较小的第二数量个参考节点。
  28. 根据权利要求27所述的方法,其中,所述利用全局搜索方式获取与所述当前节点之间的距离值相对较小的第二数量个参考节点,包括:
    计算所述初始参考集合中每一个参考节点与所述当前节点之间的距离值,从所得到的N个距离值中选取距离值相对较小的第二数量个距离值;
    根据所述第二数量个距离值,确定所述第二数量个参考节点;
    相应地,所述基于所述初始参考集合中的参考节点与所述当前节点之间的距离,确定最大距离值在所述初始参考集合中对应的目标位置,包括:
    从所得到的N个距离值中确定所述最大距离值,将所述最大距离值在所述初始参考集合中对应的位置作为所述目标位置。
  29. 根据权利要求27所述的方法,其中,所述利用空间关系搜索方式获取与所述当前节点之间的距离值相对较小的第二数量个参考节点,包括:
    基于节点与节点之间的空间关系,从所述初始参考集合中搜索符合预设条件的参考节点,得到M个参考节点;
    计算所述M个参考节点中每一个参考节点与所述当前节点之间的距离值,从所得到的M个距离值中选取距离值相对较小的K个距离值,并根据所述K个距离值确定K个参考节点;
    若所述K等于所述第二数量,则将所述K个参考节点作为所述第二数量个参考节点;
    相应地,所述基于所述初始参考集合中的参考节点与所述当前节点之间的距离,确定最大距离值在所述初始参考集合中对应的目标位置,包括:
    从所得到的M个距离值中确定所述最大距离值,将所述最大距离值在所述初始参考集合中对应的位置作为所述目标位置;
    其中,所述符合预设条件的参考节点,至少包括:所述当前节点的上层块内的子节点、与所述当前节点的上层块共面的邻居块内的子节点、与所述当前节点的上层块共线的邻居块内的子节点和与所述当前节点的上层块共点的邻居块内的子节点。
  30. 根据权利要求29所述的方法,其中,所述方法还包括:
    若所述K小于所述第二数量,则利用全局搜索方式计算所述初始参考集合中的参考节点与当前节点之间的距离值,并根据所述距离值与所述K个距离值的比较结果确定距离值相对较小的第二数量个距离值,根据所述第二数量个距离值确定所述第二数量个参考节点;
    相应地,所述基于所述初始参考集合中的参考节点与所述当前节点之间的距离,确定最大距离值在所述初始参考集合中对应的目标位置,包括:
    从所得到的M个距离值中确定初始最大距离值;
    在利用全局搜索方式计算所述初始参考集合中的参考节点与当前节点之间的距离值之后,若所述初始参考集合中存在参考节点与所述当前节点之间的距离大于所述初始最大距离值,则更新所述初始最大距离值;
    根据更新后的所述初始最大距离值确定所述最大距离值,将所述最大距离值在所述初始参考集合中对应的位置作为所述目标位置。
  31. 根据权利要求27所述的方法,其中,所述利用空间关系深度优先搜索方式获取与所述当前节点之间的距离值相对较小的第二数量个参考节点,包括:
    基于节点与节点之间的空间关系,从所述初始参考集合中搜索所述当前节点的上层块内的子节点,得到K1个参考节点;
    计算所述K1个参考节点中每一个参考节点与所述当前节点之间的距离值,从所得到的K1个距离值中选取距离值相对较小的K2个距离值和初始最大距离值,并根据所述K2个距离值确定所述K2个参考节点;
    若所述K2等于所述第二数量,则将所述K2个参考节点作为所述第二数量个参考节点,将所述初始最大距离值作为所述最大距离值;
    若所述K2小于所述第二数量,则继续从所述初始参考集合中搜索与所述当前节点的上层块共面的邻居块内的子节点,得到K3个参考节点;
    计算所述K3个参考节点中每一个参考节点与所述当前节点之间的距离值,并根据所得到的K3个 距离值和所述K2个距离值的比较结果确定距离值相对较小的K4个距离值,根据所述K4个距离值确定K4个参考节点,以及基于所述K3个距离值更新所述初始最大距离值;
    若所述K4等于所述第二数量,则将所述K4个参考节点作为所述第二数量个参考节点,将更新后的所述初始最大距离值作为所述最大距离值;
    若所述K4小于所述第二数量,则继续从所述初始参考集合中搜索与所述当前节点的上层块共线的邻居块内的子节点,得到K5个参考节点;
    计算所述K5个参考节点中每一个参考节点与所述当前节点之间的距离值,并根据所得到的K5个距离值和所述K4个距离值的比较结果确定距离值相对较小的K6个距离值,根据所述K6个距离值确定K6个参考节点,以及基于所述K5个距离值继续更新所述初始最大距离值;
    若所述K6等于所述第二数量,则将所述K6个参考节点作为所述第二数量个参考节点,将更新后的所述初始最大距离值作为所述最大距离值;
    若所述K6小于所述第二数量,则继续从所述初始参考集合中搜索与所述当前节点的上层块共点的邻居块内的子节点,得到K7个参考节点;
    计算所述K7个参考节点中每一个参考节点与所述当前节点之间的距离值,并根据所得到的K7个距离值和所述K6个距离值的比较结果确定距离值相对较小的K8个距离值,根据所述K8个距离值确定K8个参考节点,以及基于所述K7个距离值继续更新所述初始最大距离值;
    若所述K8等于所述第二数量,则将所述K8个参考节点作为所述第二数量个参考节点,将更新后的所述初始最大距离值作为所述最大距离值;
    若所述K8小于所述第二数量,则利用全局搜索方式计算所述初始参考集合中的参考节点与当前节点之间的距离值,并根据所述距离值与所述K8个距离值的比较结果确定距离值相对较小的第二数量个距离值,根据所述第二数量个距离值确定所述第二数量个参考节点;
    相应地,所述基于所述初始参考集合中的参考节点与所述当前节点之间的距离,确定最大距离值在所述初始参考集合中对应的目标位置,包括:
    在利用全局搜索方式计算所述初始参考集合中的参考节点与当前节点之间的距离值之后,若所述初始参考集合中存在参考节点与所述当前节点之间的距离大于所述初始最大距离值,则继续更新所述初始最大距离值;
    根据更新后的所述初始最大距离值确定所述最大距离值,将所述最大距离值在所述初始参考集合中对应的位置作为所述目标位置。
  32. 根据权利要求29至31任一项所述的方法,其中,所述当前节点的上层块至少包括下述其中之一:所述当前节点的父块、所述当前节点的祖父块。
  33. 根据权利要求19所述的方法,其中,所述方法还包括:
    在所述索引序号大于或等于预设常数值的情况下,将所述初始参考集合中的队尾位置确定为目标位置;
    相应地,所述方法还包括:根据所述初始参考集合对所述当前节点进行编码处理之后,删除所述初始参考集合中队首位置处的参考节点,并将所述当前节点放置于所述目标位置,得到所述目标参考集合。
  34. 根据权利要求19所述的方法,其中,所述初始参考集合包括第一初始参考集合和第二初始参考集合;所述方法还包括:
    根据所述第一初始参考集合对所述当前节点进行编码处理之后,得到第一目标参考集合;其中,所述第一目标参考集合是基于所述当前节点替换所述第一初始参考集合中所述目标位置处的参考节点得到的;和/或
    根据所述第二初始参考集合对所述当前节点进行编码处理之后,得到第二目标参考集合;其中,所述第二目标参考集合是基于删除所述第二初始参考集合中所述目标位置处的参考节点、将所述当前节点放置于队尾位置得到的。
  35. 根据权利要求34所述的方法,其中,所述方法还包括:
    若所述当前节点使用全局搜索方式,则根据所述第一初始参考集合对所述当前节点进行编码处理;
    若所述当前节点使用空间关系搜索方式或者空间关系深度优先搜索方式,则根据所述第二初始参考集合对所述当前节点进行编码处理。
  36. 根据权利要求34所述的方法,其中,在根据所述第一初始参考集合和/或所述第二初始参考集合对所述当前节点进行编码处理之后,所述方法还包括:
    若所述当前节点使用空间关系搜索方式或者空间关系深度优先搜索方式,则确定所述第一目标参考集合和所述第二目标参考集合均是基于删除队首位置的参考节点、将所述当前节点放置于队尾位置的方式维持;
    若所述当前节点使用全局搜索方式,则确定所述第一目标参考集合是基于所述当前节点替换所述目标位置处的参考节点的方式维持,所述第二目标参考集合是基于删除所述目标位置处的参考节点、将所述当前节点放置于队尾位置的方式维持。
  37. 一种码流,所述码流是根据待编码信息进行比特编码生成的;其中,所述待编码信息至少包括:当前节点对应的属性残差值。
  38. 一种编码器,所述编码器包括第一确定单元和编码单元;其中,
    所述第一确定单元,配置为确定当前节点对应的索引序号以及初始参考集合;以及基于所述初始参考集合中的参考节点与所述当前节点之间的距离,确定最大距离值在所述初始参考集合中对应的目标位置;
    所述编码单元,配置为根据所述初始参考集合对所述当前节点进行编码处理之后,将所述当前节点放置于所述目标位置,得到目标参考集合。
  39. 一种编码器,所述编码器包括第一存储器和第一处理器;其中,
    所述第一存储器,用于存储能够在所述第一处理器上运行的计算机程序;
    所述第一处理器,用于在运行所述计算机程序时,执行如权利要求19至36任一项所述的方法。
  40. 一种解码器,所述解码器包括第二确定单元和解码单元;其中,
    所述第二确定单元,配置为确定当前节点对应的索引序号以及初始参考集合;以及基于所述初始参考集合中的参考节点与所述当前节点之间的距离,确定最大距离值在所述初始参考集合中对应的目标位置;
    所述解码单元,配置为根据所述初始参考集合对所述当前节点进行解码处理之后,将所述当前节点放置于所述目标位置,得到目标参考集合。
  41. 一种解码器,所述解码器包括第二存储器和第二处理器;其中,
    所述第二存储器,用于存储能够在所述第二处理器上运行的计算机程序;
    所述第二处理器,用于在运行所述计算机程序时,执行如权利要求1至18任一项所述的方法。
  42. 一种计算机可读存储介质,其中,所述计算机可读存储介质存储有计算机程序,所述计算机程序被执行时实现如权利要求1至18任一项所述的方法、或者实现如权利要求19至36任一项所述的方法。
PCT/CN2022/080500 2022-03-12 2022-03-12 编解码方法、码流、编码器、解码器以及存储介质 WO2023173238A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2022/080500 WO2023173238A1 (zh) 2022-03-12 2022-03-12 编解码方法、码流、编码器、解码器以及存储介质

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2022/080500 WO2023173238A1 (zh) 2022-03-12 2022-03-12 编解码方法、码流、编码器、解码器以及存储介质

Publications (1)

Publication Number Publication Date
WO2023173238A1 true WO2023173238A1 (zh) 2023-09-21

Family

ID=88021940

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/080500 WO2023173238A1 (zh) 2022-03-12 2022-03-12 编解码方法、码流、编码器、解码器以及存储介质

Country Status (1)

Country Link
WO (1) WO2023173238A1 (zh)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10402663B1 (en) * 2016-08-29 2019-09-03 Trifo, Inc. Visual-inertial positional awareness for autonomous and non-autonomous mapping
CN111684808A (zh) * 2019-05-31 2020-09-18 深圳市大疆创新科技有限公司 点云数据的编码方法、编码装置、解码方法与解码装置
JP2020165717A (ja) * 2019-03-28 2020-10-08 株式会社トプコン 点群データ処理方法および点群データ処理装置
CN113557552A (zh) * 2019-03-19 2021-10-26 索尼集团公司 信息处理装置和方法
CN113766229A (zh) * 2021-09-30 2021-12-07 咪咕文化科技有限公司 一种编码方法、解码方法、装置、设备及可读存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10402663B1 (en) * 2016-08-29 2019-09-03 Trifo, Inc. Visual-inertial positional awareness for autonomous and non-autonomous mapping
CN113557552A (zh) * 2019-03-19 2021-10-26 索尼集团公司 信息处理装置和方法
JP2020165717A (ja) * 2019-03-28 2020-10-08 株式会社トプコン 点群データ処理方法および点群データ処理装置
CN111684808A (zh) * 2019-05-31 2020-09-18 深圳市大疆创新科技有限公司 点云数据的编码方法、编码装置、解码方法与解码装置
CN113766229A (zh) * 2021-09-30 2021-12-07 咪咕文化科技有限公司 一种编码方法、解码方法、装置、设备及可读存储介质

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
D. MEHLEM (RWTH-AACHEN), C. ROHLFING (RWTH): "Versatile Video Coding for VPCC", 130. MPEG MEETING; 20200420 - 20200424; ALPBACH; (MOTION PICTURE EXPERT GROUP OR ISO/IEC JTC1/SC29/WG11), no. m53508 ; JVET-R0376, 24 April 2020 (2020-04-24), XP030287078 *

Similar Documents

Publication Publication Date Title
CN113994383A (zh) 点云编解码方法和装置
WO2022121648A1 (zh) 点云数据编码方法、解码方法、设备、介质及程序产品
WO2022121650A1 (zh) 点云属性的预测方法、编码器、解码器及存储介质
WO2022131948A1 (en) Devices and methods for sequential coding for point cloud compression
WO2023173238A1 (zh) 编解码方法、码流、编码器、解码器以及存储介质
WO2023173237A1 (zh) 编解码方法、码流、编码器、解码器以及存储介质
CN115086660B (zh) 基于点云属性预测的解码、编码方法、解码器及编码器
WO2023240662A1 (zh) 编解码方法、编码器、解码器以及存储介质
WO2024007144A1 (zh) 编解码方法、码流、编码器、解码器以及存储介质
WO2024060161A1 (zh) 编解码方法、编码器、解码器以及存储介质
WO2022257143A1 (zh) 帧内预测、编解码方法及装置、编解码器、设备、介质
WO2023103565A1 (zh) 点云属性信息的编解码方法、装置、设备及存储介质
WO2023024842A1 (zh) 点云编解码方法、装置、设备及存储介质
WO2024065406A1 (zh) 编解码方法、码流、编码器、解码器以及存储介质
WO2022257145A1 (zh) 点云属性的预测方法、装置及编解码器
WO2023023914A1 (zh) 帧内预测、编解码方法及装置、编解码器、设备、介质
WO2023159428A1 (zh) 编码方法、编码器以及存储介质
WO2023123284A1 (zh) 一种解码方法、编码方法、解码器、编码器及存储介质
WO2022257150A1 (zh) 点云编解码方法、装置、点云编解码器及存储介质
WO2024065269A1 (zh) 点云编解码方法、装置、设备及存储介质
WO2022188582A1 (zh) 点云中邻居点的选择方法、装置及编解码器
WO2024082152A1 (zh) 编解码方法及装置、编解码器、码流、设备、存储介质
WO2022257528A1 (zh) 点云属性的预测方法、装置及相关设备
WO2023024840A1 (zh) 点云编解码方法、编码器、解码器及存储介质
WO2024007253A1 (zh) 点云率失真优化方法及属性压缩方法、装置和存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22931278

Country of ref document: EP

Kind code of ref document: A1