WO2024065269A1 - Point cloud encoding and decoding method and apparatus, device, and storage medium - Google Patents

Point cloud encoding and decoding method and apparatus, device, and storage medium Download PDF

Info

Publication number
WO2024065269A1
WO2024065269A1 PCT/CN2022/122113 CN2022122113W WO2024065269A1 WO 2024065269 A1 WO2024065269 A1 WO 2024065269A1 CN 2022122113 W CN2022122113 W CN 2022122113W WO 2024065269 A1 WO2024065269 A1 WO 2024065269A1
Authority
WO
WIPO (PCT)
Prior art keywords
node
zero
points
child node
point cloud
Prior art date
Application number
PCT/CN2022/122113
Other languages
French (fr)
Chinese (zh)
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/122113 priority Critical patent/WO2024065269A1/en
Publication of WO2024065269A1 publication Critical patent/WO2024065269A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L27/00Modulated-carrier systems

Definitions

  • the present application relates to the field of point cloud technology, and in particular to a point cloud encoding and decoding method, device, equipment and storage medium.
  • the surface of the object is collected by the acquisition device to form point cloud data, which includes hundreds of thousands or even more points.
  • the point cloud data is transmitted between the point cloud encoding device and the point cloud decoding device in the form of point cloud media files.
  • the point cloud encoding device needs to compress the point cloud data before transmission.
  • the compression of point clouds is also called the encoding of point clouds.
  • different encoding models are used to correspond the points in the point cloud to nodes and encode the nodes, some of which include duplicate points.
  • the current encoding and decoding methods such as the point cloud encoding and decoding method based on octree, need to encode and decode the duplicate point information of each non-zero leaf node in the leaf node of the octree, thereby reducing the encoding and decoding efficiency of the point cloud.
  • the embodiments of the present application provide a point cloud encoding and decoding method, apparatus, device and storage medium, which reduce the complexity of octree-based point cloud encoding and decoding, save encoding and decoding time, and thus improve the encoding and decoding efficiency of the point cloud.
  • an embodiment of the present application provides a point cloud decoding method, comprising:
  • geometric decoding is performed on the current node.
  • the present application provides a point cloud encoding method, comprising:
  • geometric encoding is performed on the current node.
  • the present application provides a point cloud decoding device for executing the method in the first aspect or its respective implementations.
  • the device includes a functional unit for executing the method in the first aspect or its respective implementations.
  • the present application provides a point cloud encoding device for executing the method in the second aspect or its respective implementations.
  • the device includes a functional unit for executing the method in the second aspect or its respective implementations.
  • a point cloud decoder comprising a processor and a memory.
  • the memory is used to store a computer program, and the processor is used to call and run the computer program stored in the memory to execute the method in the first aspect or its implementation manners.
  • a point cloud encoder comprising a processor and a memory.
  • the memory is used to store a computer program, and the processor is used to call and run the computer program stored in the memory to execute the method in the second aspect or its respective implementations.
  • a point cloud encoding and decoding system comprising a point cloud encoder and a point cloud decoder.
  • the point cloud decoder is used to execute the method in the first aspect or its respective implementations
  • the point cloud encoder is used to execute the method in the second aspect or its respective implementations.
  • a chip for implementing the method in any one of the first to second aspects or their respective implementations.
  • the chip includes: a processor for calling and running a computer program from a memory, so that a device equipped with the chip executes the method in any one of the first to second aspects or their respective implementations.
  • a computer-readable storage medium for storing a computer program, wherein the computer program enables a computer to execute the method of any one of the first to second aspects or any of their implementations.
  • a computer program product comprising computer program instructions, which enable a computer to execute the method in any one of the first to second aspects or their respective implementations.
  • a computer program which, when executed on a computer, enables the computer to execute the method in any one of the first to second aspects or in each of their implementations.
  • a code stream is provided, which is generated based on the method of the second aspect.
  • the code stream includes at least one of the first parameter and the second parameter.
  • the first parameter when decoding the current node of the N-1th layer in the octree, first determine the first parameter corresponding to the current node, the first parameter is used to determine whether at least one non-zero child node of the current node includes duplicate points, the current node is a non-zero node of the N-1th layer in the octree of the point cloud, N is the total number of layers of the octree, and then based on the first parameter, perform geometric decoding on the current node.
  • FIG1A is a schematic diagram of a point cloud
  • Figure 1B is a partial enlarged view of the point cloud
  • FIG2 is a schematic diagram of six viewing angles of a point cloud image
  • FIG3 is a schematic block diagram of a point cloud encoding and decoding system according to an embodiment of the present application.
  • FIG4A is a schematic block diagram of a point cloud encoder provided in an embodiment of the present application.
  • FIG4B is a schematic block diagram of a point cloud decoder provided in an embodiment of the present application.
  • 5A to 5C are schematic diagrams of geometric information encoding based on triangular facets
  • FIG6 is a schematic diagram of a point cloud decoding method flow chart provided in an embodiment of the present application.
  • FIG7 is a schematic diagram of an octree partition
  • FIG8 is a schematic diagram of an octree involved in an embodiment of the present application.
  • FIG9 is a schematic diagram of a point cloud encoding method flow chart provided by an embodiment of the present application.
  • FIG10 is a schematic block diagram of a point cloud decoding device provided in an embodiment of the present application.
  • FIG11 is a schematic block diagram of a point cloud encoding device provided in an embodiment of the present application.
  • FIG12 is a schematic block diagram of an electronic device provided in an embodiment of the present application.
  • FIG. 13 is a schematic block diagram of a point cloud encoding and decoding system provided in an embodiment of the present application.
  • Point cloud refers to a set of irregularly distributed discrete points in space that express the spatial structure and surface properties of a three-dimensional object or three-dimensional scene.
  • Figure 1A is a schematic diagram of a three-dimensional point cloud image
  • Figure 1B is a partial enlarged view of Figure 1A. It can be seen from Figures 1A and 1B that the point cloud surface is composed of densely distributed points.
  • Two-dimensional images have information expressed at each pixel point, and the distribution is regular, so there is no need to record its position information; however, the distribution of points in the point cloud in three-dimensional space is random and irregular, so it is necessary to record the position of each point in space to fully express a point cloud. Similar to two-dimensional images, each position has corresponding attribute information during the acquisition process.
  • Point cloud data is a specific record form of point cloud.
  • Points in the point cloud may include the location information of the point and the attribute information of the point.
  • the location information of the point may be the three-dimensional coordinate information of the point.
  • the location information of the point may also be called the geometric information of the point.
  • the attribute information of the point may include color information, reflectance information, normal vector information, etc.
  • Color information reflects the color of an object, and reflectance information reflects the surface material of an object.
  • the color information may be information in any color space.
  • the color information may be (RGB).
  • the color information may be information about brightness and chromaticity (YcbCr, YUV).
  • Y represents brightness (Luma)
  • Cb (U) represents blue color difference
  • Cr (V) represents red
  • U and V represent chromaticity (Chroma) for describing color difference information.
  • the points in the point cloud may include the three-dimensional coordinate information of the point and the laser reflection intensity (reflectance) of the point.
  • the points in the point cloud may include the three-dimensional coordinate information of the point and the 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 laser reflection intensity (reflectance) of the point, and the color information of the point.
  • FIG2 shows a point cloud image, where FIG2 shows six viewing angles of the point cloud image.
  • Table 1 shows the point cloud data storage format composed of a file header information part and a data part:
  • the header information includes the data format, data representation type, the total number of point cloud points, and the content represented by the point cloud.
  • the point cloud in this example is in the ".ply" format, represented by ASCII code, with a total number of 207242 points, and each point has three-dimensional position information XYZ and three-dimensional color information RGB.
  • Point clouds can flexibly and conveniently express the spatial structure and surface properties of three-dimensional objects or scenes. Point clouds are obtained by directly sampling real objects, so they can provide a strong sense of reality while ensuring accuracy. Therefore, they are widely used, including virtual reality games, computer-aided design, geographic information systems, automatic navigation systems, digital cultural heritage, free viewpoint broadcasting, three-dimensional immersive remote presentation, and three-dimensional reconstruction of biological tissues and organs.
  • Point cloud data can be obtained by at least one of the following ways: (1) computer equipment generation. Computer equipment can generate point cloud data based on virtual three-dimensional objects and virtual three-dimensional scenes. (2) 3D (3-Dimension) laser scanning acquisition. 3D laser scanning can be used to obtain point cloud data of static real-world three-dimensional objects or three-dimensional scenes, and millions of point cloud data can be obtained per second; (3) 3D photogrammetry acquisition. The visual scene of the real world is collected by 3D photography equipment (i.e., a group of cameras or camera equipment with multiple lenses and sensors) to obtain point cloud data of the visual scene of the real world. 3D photography can be used to obtain point cloud data of dynamic real-world three-dimensional objects or three-dimensional scenes. (4) Point cloud data of biological tissues and organs can be obtained by medical equipment. In the medical field, point cloud data of biological tissues and organs can be obtained by medical equipment such as magnetic resonance imaging (MRI), computed tomography (CT), and electromagnetic positioning information.
  • MRI magnetic resonance imaging
  • CT computed tomography
  • Point clouds can be divided into dense point clouds and sparse point clouds according to the way they are acquired.
  • Point clouds are divided into the following types according to the time series of the data:
  • the first type of static point cloud the object is stationary, and the device that obtains the point cloud is also stationary;
  • the second type of dynamic point cloud the object is moving, but the device that obtains the point cloud is stationary;
  • the third type of dynamic point cloud acquisition the device that acquires the point cloud is moving.
  • Point clouds can be divided into two categories according to their uses:
  • Category 1 Machine perception point cloud, which can be used in autonomous navigation systems, real-time inspection systems, geographic information systems, visual sorting robots, emergency rescue robots, etc.
  • Category 2 Point cloud perceived by the human eye, which can be used in point cloud application scenarios such as digital cultural heritage, free viewpoint broadcasting, 3D immersive communication, and 3D immersive interaction.
  • the above point cloud acquisition technology reduces the cost and time of point cloud data acquisition and improves the accuracy of data.
  • the change in the point cloud data acquisition method makes it possible to acquire a large amount of point cloud data.
  • the processing of massive 3D point cloud data encounters bottlenecks of storage space and transmission bandwidth.
  • a point cloud video with a frame rate of 30fps frames per second
  • the number of points in each point cloud frame is 700,000
  • each point has coordinate information xyz (float) and color information RGB (uchar).
  • the YUV sampling format is 4:2:0
  • the frame rate is 24fps.
  • the 10s data volume of a 1280 720 two-dimensional video is approximately 1280 720 12bit 24frames 10s ⁇ 0.33GB
  • point cloud compression has become a key issue in promoting the development of the point cloud industry.
  • FIG3 is a schematic block diagram of a point cloud encoding and decoding system involved in an embodiment of the present application. It should be noted that FIG3 is only an example, and the point cloud encoding and decoding system of the embodiment of the present application includes but is not limited to that shown in FIG3.
  • the point cloud encoding and decoding system 100 includes an encoding device 110 and a decoding device 120.
  • the encoding device is used to encode (which can be understood as compression) the point cloud data to generate a code stream, and transmit the code stream to the decoding device.
  • the decoding device decodes the code stream generated by the encoding device to obtain decoded point cloud data.
  • the encoding device 110 of the embodiment of the present application can be understood as a device with a point cloud encoding function
  • the decoding device 120 can be understood as a device with a point cloud decoding function, that is, the embodiment of the present application includes a wider range of devices for the encoding device 110 and the decoding device 120, such as smartphones, desktop computers, mobile computing devices, notebook (e.g., laptop) computers, tablet computers, set-top boxes, televisions, cameras, display devices, digital media players, point cloud game consoles, vehicle-mounted computers, etc.
  • the encoding device 110 may transmit the encoded point cloud data (such as a code stream) to the decoding device 120 via the channel 130.
  • the channel 130 may include one or more media and/or devices capable of transmitting the encoded point cloud data from the encoding device 110 to the decoding device 120.
  • the channel 130 includes one or more communication media that enable the encoding device 110 to transmit the encoded point cloud data directly to the decoding device 120 in real time.
  • the encoding device 110 can modulate the encoded point cloud data according to the communication standard and transmit the modulated point cloud data to the decoding device 120.
  • the communication medium includes a wireless communication medium, such as a radio frequency spectrum, and optionally, the communication medium may also include a wired communication medium, such as one or more physical transmission lines.
  • the channel 130 includes a storage medium, which can store the point cloud data encoded by the encoding device 110.
  • the storage medium includes a variety of locally accessible data storage media, such as optical disks, DVDs, flash memories, etc.
  • the decoding device 120 can obtain the encoded point cloud data from the storage medium.
  • the channel 130 may include a storage server that can store the point cloud data encoded by the encoding device 110.
  • the decoding device 120 can download the stored encoded point cloud data from the storage server.
  • the storage server can store the encoded point cloud data and transmit the encoded point cloud data to the decoding device 120, such as a web server (e.g., for a website), a file transfer protocol (FTP) server, etc.
  • FTP file transfer protocol
  • the encoding device 110 includes a point cloud encoder 112 and an output interface 113.
  • the output interface 113 may include a modulator/demodulator (modem) and/or a transmitter.
  • the encoding device 110 may further include a point cloud source 111 in addition to the point cloud encoder 112 and the input interface 113 .
  • the point cloud source 111 may include at least one of a point cloud acquisition device (e.g., a scanner), a point cloud archive, a point cloud input interface, and a computer graphics system, wherein the point cloud input interface is used to receive point cloud data from a point cloud content provider, and the computer graphics system is used to generate point cloud data.
  • a point cloud acquisition device e.g., a scanner
  • a point cloud archive e.g., a point cloud archive
  • a point cloud input interface e.g., a point cloud input interface
  • the computer graphics system is used to generate point cloud data.
  • the point cloud encoder 112 encodes the point cloud data from the point cloud source 111 to generate a code stream.
  • the point cloud encoder 112 transmits the encoded point cloud data directly to the decoding device 120 via the output interface 113.
  • the encoded point cloud data can also be stored in a storage medium or a storage server for subsequent reading by the decoding device 120.
  • the decoding device 120 includes an input interface 121 and a point cloud decoder 122 .
  • the decoding device 120 may further include a display device 123 in addition to the input interface 121 and the point cloud decoder 122 .
  • the input interface 121 includes a receiver and/or a modem.
  • the input interface 121 can receive the encoded point cloud data through the channel 130 .
  • the point cloud decoder 122 is used to decode the encoded point cloud data to obtain decoded point cloud data, and transmit the decoded point cloud data to the display device 123.
  • the decoded point cloud data is displayed on the display device 123.
  • the display device 123 may be integrated with the decoding device 120 or may be external to the decoding device 120.
  • the display device 123 may include a variety of display devices, such as a liquid crystal display (LCD), a plasma display, an organic light emitting diode (OLED) display, or other types of display devices.
  • Figure 3 is only an example, and the technical solution of the embodiment of the present application is not limited to Figure 3.
  • the technology of the present application can also be applied to unilateral point cloud encoding or unilateral point cloud decoding.
  • the current point cloud encoder can adopt two point cloud compression coding technology routes proposed by the International Standards Organization Moving Picture Experts Group (MPEG), namely Video-based Point Cloud Compression (VPCC) and Geometry-based Point Cloud Compression (GPCC).
  • MPEG International Standards Organization Moving Picture Experts Group
  • VPCC Video-based Point Cloud Compression
  • GPCC Geometry-based Point Cloud Compression
  • VPCC projects the three-dimensional point cloud into two dimensions and uses the existing two-dimensional coding tools to encode the projected two-dimensional image.
  • GPCC uses a hierarchical structure to divide the point cloud into multiple units step by step, and encodes the entire point cloud by encoding the division process.
  • the following uses the GPCC encoding and decoding framework as an example to explain the point cloud encoder and point cloud decoder applicable to the embodiments of the present application.
  • FIG. 4A is a schematic block diagram of a point cloud encoder provided in an embodiment of the present application.
  • the points in the point cloud can include the location information of the points and the attribute information of the points. Therefore, the encoding of the points in the point cloud mainly includes location encoding and attribute encoding.
  • the location information of the points in the point cloud is also called geometric information, and the corresponding location encoding of the points in the point cloud can also be called geometric encoding.
  • the geometric information of the point cloud and the corresponding attribute information are encoded separately.
  • the current geometric coding and decoding of G-PCC can be divided into octree-based geometric coding and decoding and prediction tree-based geometric coding and decoding.
  • the process of position coding includes: preprocessing the points in the point cloud, such as coordinate transformation, quantization, and removal of duplicate points; then, geometric coding the preprocessed point cloud, such as constructing an octree, or constructing a prediction tree, and geometric coding based on the constructed octree or prediction tree to form a geometric code stream.
  • geometric coding such as constructing an octree, or constructing a prediction tree
  • geometric coding based on the constructed octree or prediction tree to form a geometric code stream.
  • the position information of each point in the point cloud data is reconstructed to obtain the reconstructed value of the position information of each point.
  • the attribute encoding process includes: given the reconstruction information of the input point cloud position information and the original value of the attribute information, selecting one of the three prediction modes for point cloud prediction, quantizing the predicted result, and performing arithmetic coding to form an attribute code stream.
  • position encoding can be achieved by the following units:
  • Coordinate transformation transformation (Tanmsform coordinates) unit 201, voxel (Voxelize) unit 202, octree partition (Analyze octree) unit 203, geometry reconstruction (Reconstruct geometry) unit 204, first arithmetic encoding (Arithmetic enconde) unit 205, surface fitting unit (Analyze surface approximation) 206 and prediction tree construction unit 207.
  • the coordinate conversion unit 201 can be used to convert the world coordinates of the point in the point cloud into relative coordinates. For example, the geometric coordinates of the point are respectively subtracted from the minimum value of the xyz coordinate axis, which is equivalent to a DC removal operation, so as to realize the conversion of the coordinates of the point in the point cloud from the world coordinates to the relative coordinates.
  • the voxel unit 202 is also called a quantize and remove points unit, which can reduce the number of coordinates by quantization; after quantization, originally different points may be assigned the same coordinates, based on which, duplicate points can be deleted by deduplication operation; for example, multiple clouds with the same quantized position and different attribute information can be merged into one cloud by attribute conversion.
  • the voxel unit 202 is an optional unit module.
  • the octree division unit 203 may use an octree encoding method to encode the position information of the quantized points.
  • the point cloud is divided in the form of an octree, so that the position of the point can correspond to the position of the octree one by one, and the position of the point in the octree is counted and its flag is recorded as 1 to perform geometric encoding.
  • the point cloud in the process of geometric information encoding based on triangle soup (trisoup), the point cloud is also divided into octrees by the octree division unit 203.
  • the trisoup does not need to divide the point cloud into unit cubes with a side length of 1x1x1 step by step, but stops dividing when the block (sub-block) has a side length of W.
  • the intersections Based on the surface formed by the distribution of the point cloud in each block, at most twelve vertices (intersections) generated by the surface and the twelve edges of the block are obtained, and the intersections are surface fitted by the surface fitting unit 206, and the fitted intersections are geometrically encoded.
  • the prediction tree construction unit 207 can use the prediction tree encoding method to encode the position information of the quantized points.
  • the point cloud is divided in the form of a prediction tree, so that the position of the point can correspond to the position of the node in the prediction tree one by one.
  • the geometric position information of the node is predicted by selecting different prediction modes to obtain the prediction residual, and the geometric prediction residual is quantized using the quantization parameter.
  • the prediction residual of the prediction tree node position information, the prediction tree structure and the quantization parameter are encoded to generate a binary code stream.
  • the geometric reconstruction unit 204 can perform position reconstruction based on the position information output by the octree division unit 203 or the intersection points fitted by the surface fitting unit 206 to obtain the reconstructed value of the position information of each point in the point cloud data.
  • the position reconstruction can be performed based on the position information output by the prediction tree construction unit 207 to obtain the reconstructed value of the position information of each point in the point cloud data.
  • the arithmetic coding unit 205 can use entropy coding to perform arithmetic coding on the position information output by the octree analysis unit 203 or the intersection points fitted by the surface fitting unit 206, or the geometric prediction residual values output by the prediction tree construction unit 207 to generate a geometric code stream; the geometric code stream can also be called a geometry bitstream.
  • Attribute encoding can be achieved through the following units:
  • Transform colors a color conversion (Transform colors) unit 210
  • a recoloring (Transfer attributes) unit 211 a Region Adaptive Hierarchical Transform (RAHT) unit 212, a Generate LOD (Generate LOD) unit 213, a lifting (lifting transform) unit 214, a Quantize coefficients (Quantize coefficients) unit 215 and an arithmetic coding unit 216.
  • RAHT Region Adaptive Hierarchical Transform
  • point cloud encoder 200 may include more, fewer or different functional components than those shown in FIG. 4A .
  • the color conversion unit 210 may be used to convert the RGB color space of the points in the point cloud into a YCbCr format or other formats.
  • the recoloring unit 211 recolors the color information using the reconstructed geometric information so that the uncoded attribute information corresponds to the reconstructed geometric information.
  • any transformation unit can be selected to transform the points in the point cloud.
  • the transformation unit may include: RAHT transformation 212 and lifting (lifting transform) unit 214. Among them, the lifting transformation depends on generating a level of detail (LOD).
  • LOD level of detail
  • any of the RAHT transformation and the lifting transformation can be understood as being used to predict the attribute information of a point in a point cloud to obtain a predicted value of the attribute information of the point, and then obtain a residual value of the attribute information of the point based on the predicted value of the attribute information of the point.
  • the residual value of the attribute information of the point can be the original value of the attribute information of the point minus the predicted value of the attribute information of the point.
  • the process of generating LOD by the LOD generating unit includes: obtaining the Euclidean distance between points according to the position information of the points in the point cloud; and dividing the points into different detail expression layers according to the Euclidean distance.
  • the Euclidean distances can be sorted and the Euclidean distances in different ranges can be divided into different detail expression layers. For example, a point can be randomly selected as the first detail expression layer. Then the Euclidean distances between the remaining points and the point are calculated, and the points whose Euclidean distances meet the first threshold requirement are classified as the second detail expression layer.
  • the centroid of the points in the second detail expression layer is obtained, and the Euclidean distances between the points other than the first and second detail expression layers and the centroid are calculated, and the points whose Euclidean distances meet the second threshold are classified as the third detail expression layer.
  • all points are classified into the detail expression layer.
  • the threshold of the Euclidean distance By adjusting the threshold of the Euclidean distance, the number of points in each LOD layer can be increased. It should be understood that the LOD division method can also be adopted in other ways, and the present application does not limit this.
  • the point cloud may be directly divided into one or more detail expression layers, or the point cloud may be first divided into a plurality of point cloud slices, and then each point cloud slice may be divided into one or more LOD layers.
  • the point cloud can be divided into multiple point cloud blocks, and the number of points in each point cloud block can be between 550,000 and 1.1 million.
  • Each point cloud block can be regarded as a separate point cloud.
  • Each point cloud block can be divided into multiple detail expression layers, and each detail expression layer includes multiple points.
  • the detail expression layer can be divided according to the Euclidean distance between points.
  • the quantization unit 215 may be used to quantize the residual value of the attribute information of the point. For example, if the quantization unit 215 is connected to the RAHT transformation unit 212, the quantization unit 215 may be used to quantize the residual value of the attribute information of the point output by the RAHT transformation unit 212.
  • the arithmetic coding unit 216 may use zero run length coding to perform entropy coding on the residual value of the attribute information of the point to obtain an attribute code stream.
  • the attribute code stream may be bit stream information.
  • FIG4B is a schematic block diagram of a point cloud decoder provided in an embodiment of the present application.
  • the decoder 300 can obtain the point cloud code stream from the encoding device, and obtain the position information and attribute information of the points in the point cloud by parsing the code.
  • the decoding of the point cloud includes position decoding and attribute decoding.
  • the process of position decoding includes: performing arithmetic decoding on the geometric code stream; merging after building the octree, reconstructing the position information of the point to obtain the reconstructed information of the point position information; performing coordinate transformation on the reconstructed information of the point position information to obtain the point position information.
  • the point position information can also be called the geometric information of the point.
  • the attribute decoding process includes: obtaining the residual value of the attribute information of the point in the point cloud by parsing the attribute code stream; obtaining the residual value of the attribute information of the point after dequantization by dequantizing the residual value of the attribute information of the point; based on the reconstruction information of the point position information obtained in the position decoding process, selecting one of the following RAHT inverse transform and lifting inverse transform to perform point cloud prediction to obtain the predicted value, and adding the predicted value to the residual value to obtain the reconstructed value of the attribute information of the point; performing color space inverse conversion on the reconstructed value of the attribute information of the point to obtain a decoded point cloud.
  • position decoding can be achieved by the following units:
  • Arithmetic decoding unit 301 Arithmetic decoding unit 301, octree synthesis (synthesize octree) unit 302, surface fitting unit (Synthesize suface approximation) 303, geometry reconstruction (Reconstruct geometry) unit 304, inverse transform (inverse transform coordinates) unit 305 and prediction tree reconstruction unit 306.
  • Attribute encoding can be achieved through the following units:
  • each unit in the decoder 300 can refer to the functions of the corresponding units in the encoder 200.
  • the point cloud decoder 300 may include more, fewer or different functional components than those in FIG. 5 .
  • the decoder 300 can divide the point cloud into multiple LODs according to the Euclidean distance between points in the point cloud; then, the attribute information of the points in the LOD is decoded in sequence; for example, the number of zeros (zero_cnt) in the zero-run encoding technology is calculated to decode the residual based on zero_cnt; then, the decoding framework 200 can perform inverse quantization based on the decoded residual value, and add the inverse quantized residual value to the predicted value of the current point to obtain the reconstruction value of the point cloud until all point clouds are decoded.
  • the current point will be used as the nearest point of the subsequent LOD point, and the reconstruction value of the current point will be used to predict the attribute information of the subsequent point.
  • the following introduces octree-based geometric coding and prediction tree-based geometric coding.
  • Octree-based geometric encoding includes: first, coordinate transformation of geometric information so that all point clouds are contained in a bounding box. Then quantization is performed. This step of quantization mainly plays a role of scaling. Due to quantization rounding, the geometric information of some points is the same. Whether to remove duplicate points is determined based on parameters. The process of quantization and removal of duplicate points is also called voxelization. Next, the bounding box is continuously divided into trees (octree/quadtree/binary tree) in the order of breadth-first traversal, and the placeholder code of each node is encoded. In an implicit geometric division method, the bounding box of the point cloud is first calculated.
  • K and M In the process of binary tree/quadtree/octree partitioning, two parameters are introduced: K and M.
  • K indicates the maximum number of binary tree/quadtree partitioning before octree partitioning;
  • parameter M is used to indicate that the minimum block side length corresponding to binary tree/quadtree partitioning is 2M .
  • the current node has only one occupied child node, and the parent node of the current node's parent node has only two occupied child nodes, that is, the current node has at most one neighbor node.
  • the parent node of the current node has only one child node, the current node.
  • the six neighbor nodes that share a face with the current node are also empty nodes.
  • the current node does not have the DCM coding qualification, it will be divided into octrees. If it has the DCM coding qualification, the number of points contained in the node will be further determined. When the number of points is less than the threshold 2, the node will be DCM-encoded, otherwise the octree division will continue.
  • the DCM coding mode is applied, the geometric coordinates X, Y, and Z components of the points contained in the current node will be directly encoded independently.
  • the side length of a node is 2d , d bits are required to encode each component of the geometric coordinates of the node, and the bit information is directly encoded into the bit stream.
  • G-PCC currently introduces a plane coding mode. In the process of geometric division, it will determine whether the child nodes of the current node are in the same plane. If the child nodes of the current node meet the conditions of the same plane, the child nodes of the current node will be represented by the plane.
  • the decoding end obtains the placeholder code of each node by continuously parsing in the order of breadth-first traversal, and continuously divides the nodes in turn until a 1X1X1 unit cube is obtained. The number of points contained in each leaf node is parsed, and finally the geometric reconstructed point cloud information is restored.
  • geometric division In the geometric information coding framework based on trisoup (triangle soup, triangle patch set), geometric division must also be performed first, but different from the geometric information coding based on binary tree/quadtree/octree, this method does not need to divide the point cloud into unit cubes with a side length of 1x1x1 step by step, but stops dividing when the block (sub-block) has a side length of W.
  • this method Based on the surface formed by the distribution of the point cloud in each block, at most twelve vertices (intersection points) generated by the surface and the twelve edges of the block are obtained. The vertex coordinates of each block are encoded in turn to generate a binary code stream.
  • the vertex coordinates are first decoded to complete the reconstruction of the triangle facets at the decoding end.
  • the process is shown in Figures 5A to 5C.
  • the triangle facet set formed by these three vertices in a certain order is called triangle soup, or trisoup, as shown in Figure 5B.
  • sampling is performed on the triangle facet set, and the obtained sampling points are used as the reconstructed point cloud in the block, as shown in Figure 5C.
  • the geometric coding based on the prediction tree includes: first, sorting the input point cloud.
  • the currently used sorting methods include unordered, Morton order, azimuth order and radial distance order.
  • the prediction tree structure is established by using two different methods, including: KD-Tree (high-latency slow mode) and using the laser radar calibration information to divide each point into different Lasers, and establish a prediction structure according to different Lasers (low-latency fast mode).
  • KD-Tree high-latency slow mode
  • Lasers low-latency fast mode
  • traverse each node in the prediction tree predict the geometric position information of the node by selecting different prediction modes to obtain the prediction residual, and quantize the geometric prediction residual using the quantization parameter.
  • the prediction residual of the prediction tree node position information, the prediction tree structure and the quantization parameters are encoded to generate a binary code stream.
  • the decoding end Based on the geometric decoding of the prediction tree, the decoding end reconstructs the prediction tree structure by continuously parsing the bit stream, and then obtains the geometric position prediction residual information and quantization parameters of each prediction node through parsing, and dequantizes the prediction residual to recover the reconstructed geometric position information of each node, and finally completes the geometric reconstruction of the decoding end.
  • the geometric information is reconstructed.
  • attribute encoding is mainly performed on color information.
  • the color information is converted from the RGB color space to the YUV color space.
  • the point cloud is recolored using the reconstructed geometric information so that the unencoded attribute information corresponds to the reconstructed geometric information.
  • RAHT Random Adaptive Hierarchal Transform
  • Morton codes can be used to search for nearest neighbors.
  • the Morton code corresponding to each point in the point cloud can be obtained from the geometric coordinates of the point.
  • the specific method for calculating the Morton code is described as follows. For each component of the three-dimensional coordinate represented by a d-bit binary number, its three components can be expressed as formula (1):
  • the Morton code M is x, y, z starting from the highest bit and arranged in sequence from x l ,y l ,z l to the lowest bit.
  • the calculation formula of M is shown in the following formula (2):
  • Condition 1 The geometric position is limitedly lossy and the attributes are lossy;
  • Condition 3 The geometric position is lossless, and the attributes are limitedly lossy
  • Condition 4 The geometric position and attributes are lossless.
  • GPCC's general test sequences include four categories: Cat1A, Cat1B, Cat3-fused, and Cat3-frame. Among them, Cat2-frame point cloud only contains reflectance attribute information, Cat1A and Cat1B point clouds only contain color attribute information, and Cat3-fused point cloud contains both color and reflectance attribute information.
  • GPCC's technical routes There are 2 types in total, which are distinguished by the algorithm used for geometric compression, namely octree coding branch and prediction tree coding branch.
  • the bounding box is divided into sub-cubes in sequence, and the non-empty sub-cubes (including points in the point cloud) are continued to be divided until the leaf node obtained by division is a 1X1X1 unit cube.
  • the non-empty sub-cubes including points in the point cloud
  • the decoding end obtains the placeholder code of each node by continuously parsing in the order of breadth-first traversal, and continuously divides the nodes in turn until a 1x1x1 unit cube is obtained.
  • geometric lossless decoding it is necessary to parse the number of points contained in each leaf node and finally restore the geometrically reconstructed point cloud information.
  • the first parameter corresponding to the current node is first determined, and the first parameter is used to determine whether at least one non-zero child node of the current node includes duplicate points.
  • the current node is a non-zero node of the N-1th layer in the octree of the point cloud, and N is the total number of layers of the octree. Then, based on the first parameter, the current node is geometrically decoded.
  • the encoding and decoding of the duplicate point information of the i-th non-zero child node is skipped, thereby reducing the encoding and decoding complexity of the point cloud, saving encoding and decoding time, and improving the encoding and decoding efficiency.
  • the point cloud decoding method provided in the embodiment of the present application is introduced.
  • Fig. 6 is a schematic diagram of a point cloud decoding method according to an embodiment of the present application.
  • the point cloud decoding method according to the embodiment of the present application can be implemented by the point cloud decoding device shown in Fig. 3 or Fig. 5 above.
  • the point cloud decoding method of the embodiment of the present application includes:
  • the first parameter is used to determine whether to decode the duplicate point information corresponding to the current node, and the current node is a non-zero node in the octree of the point cloud.
  • the point cloud includes geometric information and attribute information
  • the decoding of the point cloud includes geometric decoding and attribute decoding.
  • the embodiments of the present application relate to geometric decoding of the point cloud. That is, the decoded points involved in the embodiments of the present application refer to points in the point cloud whose geometric information has been decoded, and the undecoded points refer to points in the point cloud whose geometric information has not been decoded.
  • the geometric information of the point cloud is also referred to as the position information of the point cloud. Therefore, the geometric decoding of the point cloud is also referred to as the position decoding of the point cloud.
  • the encoding end constructs the octree structure of the point cloud based on the geometric information of the point cloud. For example, as shown in Figure 7, the point cloud is enclosed by the smallest cuboid.
  • the enclosing box is first divided into octrees to obtain 8 nodes.
  • the occupied nodes among the 8 nodes, that is, the nodes including the points, continue to be divided into octrees, and so on, until the division is to the voxel level, for example, to a 1X1X1 cube.
  • the point cloud octree structure obtained by such division includes multiple layers of nodes, for example, N layers.
  • the placeholder information of each layer is encoded layer by layer until the voxel-level leaf nodes of the last layer are encoded. That is to say, in octree encoding, the point cloud is divided through the octree, and finally the points in the point cloud are divided into the voxel-level leaf nodes of the octree.
  • the encoding of the point cloud is achieved by encoding the entire octree.
  • the decoding end first decodes the geometric code stream of the point cloud to obtain the occupancy information of the root node of the octree of the point cloud, and based on the occupancy information of the root node, determines the child nodes included in the root node, that is, the nodes included in the second layer of the octree. Then, the geometric code stream is decoded to obtain the occupancy information of each node in the second layer, and based on the occupancy information of each node, determines the nodes included in the third layer of the octree, and so on.
  • the embodiment of the present application does not limit the specific position of the current node in the octree.
  • the current node is a non-zero node at the N-1th layer in the octree of the point cloud, N is the total number of layers of the octree, and N is a positive integer greater than 1.
  • the first parameter is used to determine whether at least one non-zero child node of the current node includes a duplicate point.
  • these points with the same coordinates are divided into the same leaf node of the octree, so that the leaf node includes repeated points.
  • the encoder when encoding the node of the N-1th layer of the octree, the encoder not only encodes the placeholder information of the node, but also encodes the repeated point information of the non-zero child nodes (i.e., leaf nodes) of the node.
  • the decoder when decoding the node of the N-1th layer of the octree, the decoder not only decodes the placeholder information of the node, but also decodes the repeated point information of the non-zero child nodes of the node. This will increase the complexity of decoding, waste decoding time, and reduce decoding efficiency.
  • the first parameter corresponding to the current node is first determined.
  • the first parameter is used to determine whether at least one non-zero child node (i.e., leaf node) of the current node includes duplicate points, and then based on the first parameter, the current node is decoded.
  • the decoding of the duplicate point information of the i-th non-zero child node is skipped, thereby reducing the decoding complexity of the point cloud, saving decoding time, and improving decoding efficiency.
  • the embodiments of the present application mainly relate to the decoding process of the nodes in the N-1th layer of the point cloud octree.
  • the N-1th layer can also be understood as the second to last layer of the octree of the point cloud.
  • the non-zero child nodes of the non-zero nodes in the N-1th layer are the voxel-level leaf nodes of the octree, that is, the last layer nodes.
  • the decoding process for each non-zero node in the N-1th layer of the octree is basically the same.
  • the decoding process of the embodiment of the present application is introduced by taking the current node in the N-1th layer of the octree as an example.
  • the current node can be understood as any non-zero node in the N-1th layer of the octree, and the non-zero node is also called a non-empty node, where the non-zero node can be understood as a node including at least one non-zero child node, or a node including at least one point in the point cloud.
  • the current node may be understood as a non-zero node in the N-1th layer of the octree that is currently waiting to be decoded.
  • the first parameter corresponding to the current node is first determined, and then the current node is decoded based on the first parameter.
  • the method for determining the first parameter corresponding to the current node is different, and the corresponding method for decoding the current node based on the first parameter is also different. The following is a detailed introduction to several methods for determining the first parameter corresponding to the current node and the process for decoding the current node based on the first parameter involved in the embodiment of the present application.
  • the above S101 includes the following steps S101-A1 to S101-A2:
  • S101-A1 determine the total number of points in the point cloud and the number of non-zero nodes in the N-1th layer;
  • S101-A2 Determine a first parameter based on the total number of points in the point cloud and the number of non-zero nodes in the N-1th layer.
  • the encoding end encodes the nodes in the octree based on the breadth-first traversal method.
  • the decoding end decodes the nodes in the octree based on the breadth-first traversal method.
  • the first parameter corresponding to the current node is determined based on the total number of points in the point cloud and the number of non-zero nodes in the N-1th layer of the octree of the point cloud.
  • the first parameter can be understood as the number of points in the current point cloud whose geometric information cannot be determined.
  • the current node is decoded. For example, based on the first parameter, it is determined whether the non-zero child nodes of the current node include duplicate points.
  • the duplicate point information of the non-zero child nodes of the current node is skipped to reduce the decoding complexity of the point cloud, save decoding time, and thus improve decoding efficiency.
  • the embodiment of the present application does not limit the specific method in which the decoding end obtains the total number of points in the point cloud.
  • the encoding end writes the total number of points of the point cloud into the geometric code stream, so that the decoding end obtains the total number of points of the point cloud by decoding the geometric code stream.
  • the encoding end writes the total number of points of the point cloud into the geometric data unit of the point cloud. In this way, the decoding end obtains the total number of points of the point cloud by decoding the geometric data unit of the point cloud.
  • the encoder when encoding the total number of points in the point cloud, the encoder subtracts one from the total number of points in the point cloud to obtain a first value, and writes the first value into the geometry data unit, that is, the first value is represented as slice_num_points_minus1.
  • the decoder when decoding, the decoder decodes the geometry data unit to obtain the first value, and then adds 1 to the first value to obtain the total number of points in the point cloud.
  • the script syntax of the geometry data unit (Geometry data unit footer syntax) is shown in Table 2:
  • slice_num_points_minus1 plus 1 is used to specify the total number of points in the point cloud. Bitstream conformance requires that slice_num_points_minus1 plus 1 should be equal to the number of decodable points. Decoders should not rely on bitstream conformance to prevent implementation buffer overflows.
  • the decoding end obtains the first value, namely, slice_num_points_minus1, by decoding the geometric data unit shown in Table 2, and adds 1 to the first value to obtain the total number of points in the point cloud.
  • the decoding end determines the total number of points in the point cloud based on the following formula (3):
  • pointCount is the total number of points in the point cloud.
  • the embodiment of the present application does not limit the method of determining the number of non-zero nodes in the N-1th layer of the octree of the point cloud.
  • the encoder may write the number of non-zero nodes included in the N-1th layer in the octree into the geometry bitstream. In this way, the decoder may obtain the number of non-zero nodes in the N-1th layer by decoding the geometry bitstream.
  • the encoding end encodes the placeholder information of the nodes of each layer of the octree in a breadth-first traversal manner, for example, based on the non-zero child nodes included in each non-zero node in the N-2th layer, determines the placeholder information of each non-zero node in the N-2th layer, and then writes the placeholder information of each non-zero node in the N-2th layer into the geometry code stream.
  • the decoding end decodes the placeholder information of each non-zero node in the N-2th layer and can determine the number of non-zero nodes included in the N-1th layer.
  • the decoding end can determine the number of non-zero nodes in the N-1 layer based on the placeholder information of the N-2 layer of the octree of the point cloud. For example, if the placeholder information of the N-2 layer is 01010101, it means that the N-1 layer includes 4 nodes, and these 4 nodes are occupied nodes, that is, non-zero nodes.
  • the first parameter corresponding to the current node is determined based on the total number of points in the point cloud and the number of non-zero nodes in the N-1th layer.
  • the embodiment of the present application does not limit the specific method of determining the first parameter corresponding to the current node based on the total number of points in the point cloud and the number of non-zero nodes in the N-1th layer.
  • the decoding end determines the difference between the total number of points in the point cloud and the number of non-zero nodes in the N-1th layer as the first parameter.
  • the decoding end determines the difference between the total number of points in the point cloud and the number of non-zero nodes in the N-1th layer as the first parameter.
  • the point cloud includes 10 points
  • the first parameter is determined based on the following formula (4):
  • resPointCount is the first parameter corresponding to the current node
  • (slice_num_points_minus1+1) is the total number of points in the point cloud
  • nodeCount is the number of nodes included in the N-1th layer of the octree of the point cloud.
  • the N-1th layer of the octree can be expressed as occtree_depth_minus1, that is, the octree depth occtree_depth minus 1, where the octree depth occtree_depth is N.
  • step S102 is executed to decode the current node based on the first parameter.
  • the first parameter corresponding to the current node is determined to be 0, for example, the total number of points in the point cloud is a, and the N-1th layer of the octree of the point cloud includes a nodes
  • the first parameter is determined to be 0, which means that each node in the N-1th layer includes a non-zero child node, and the non-zero child node includes a point in the point cloud, and no duplicate points are included.
  • the duplicate point information of the non-zero child nodes of each non-zero node is skipped, thereby reducing the decoding complexity and saving decoding time.
  • the above S102 is as shown in the following situation 1.
  • the above S102 includes the following steps S102-A1 to S102-A2:
  • S102-A2 Determine whether to decode the repeated point information of the i-th non-zero child node based on the first parameter and the second parameter.
  • the current node includes at least one non-zero child node.
  • the specific process of determining whether to decode the repeated point information of each non-zero child node included in the current node is the same.
  • the i-th non-zero child node of the current node is used as an example for explanation.
  • the current node is a non-zero node in the N-1th layer (i.e., the second to last layer) of the octree, and the current node adopts octree encoding, that is, the current node is divided into an octree to obtain at least one voxel-level leaf node, and the i-th non-zero child node is a voxel-level leaf node of the current node.
  • the point cloud is encoded using IDCM, that is, the IDCM encoding method is turned on
  • the current node is a non-zero node in the N-1th layer of the octree
  • IDCM that is, at least one point included in the current node is directly decoded
  • the i-th non-zero child node of the current node can be understood as a point in the current node.
  • the decoding end determines the first parameter corresponding to the current node based on the above steps S102-A1 to S102-A2.
  • the first parameter can be understood as the number of points in the point cloud whose current position information is not determined.
  • the second parameter corresponding to the i-th non-zero child node of the current node is determined.
  • the second parameter is used to indicate the number of points whose geometric positions in the point cloud have been decoded when decoding the i-th non-zero child node.
  • the embodiment of the present application does not limit the specific method of determining the second parameter corresponding to the current i-th non-zero child node.
  • the decoding end records in real time the number of points whose geometric positions have been decoded in the current point cloud, and then when decoding the current node, determines the number of points determined by the geometric position information that has been determined before decoding the repeated point information of the i-th non-zero child node.
  • determining the second parameter corresponding to the i-th non-zero child node in the above S102-A1 includes the following steps S102-A11 and S102-A12:
  • S102-A11 Determine the number of decoded points corresponding to the i-th non-zero child node in the point cloud.
  • the decoding end determines the number of decoded points corresponding to the i-th non-zero child node in the point cloud, and determines the second parameter corresponding to the i-th non-zero child node based on the number of decoded points corresponding to the i-th non-zero child node in the point cloud. For example, the number of decoded points corresponding to the i-th non-zero child node in the point cloud is determined as the second parameter corresponding to the i-th non-zero child node.
  • the implementation methods of the above S102-A11 include but are not limited to the following:
  • Method 1 if the current node is the first non-zero node in the N-1th layer, the above S102-A11 includes the following steps S102-A11-a1 and S102-A11-a2:
  • S102-A11-a determine the number of non-zero child nodes of the current node
  • method 1 if the current node is the first non-zero node in the N-1th layer of the octree, the number of non-zero child nodes included in the current node is determined, and based on the number of non-zero child nodes of the current node, the number of decoded points corresponding to the i-th non-zero child node is determined.
  • the method of determining the number of non-zero child nodes of the current node includes at least the following examples:
  • Example 1 The encoder writes the number of non-zero child nodes of each non-zero node in the N-1th layer of the octree into the geometry bitstream. In this way, the decoder can obtain the number of non-zero child nodes of each non-zero node in the N-1th layer by decoding the geometry bitstream, and further obtain the number of non-zero child nodes of the current node.
  • Example 2 The encoder writes the placeholder information of each non-zero node in the N-1th layer into the decoded code stream.
  • the encoder determines the placeholder information of the current node based on the occupancy of each non-zero child node of the current node in the N-1th layer. Assuming that among the 8 child nodes of the current node, the 2nd child node, the 4th child node, the 6th child node and the 8th child node are occupied, the placeholder information of the current node is determined to be 01010101, and the placeholder information is written into the geometric code stream. In this way, when the decoder decodes the current node in the N-1th layer, the placeholder information of the current node obtained by decoding is 01010101, and it can be determined that the current node includes 4 non-zero child nodes.
  • the number of decoded points corresponding to the i-th non-zero child node is determined based on the number of non-zero child nodes of the current node.
  • the method for determining the number of decoded points corresponding to the i-th non-zero child node based on the number of non-zero child nodes of the current node in S102-A11-a2 includes but is not limited to the following:
  • Method 1 If the i-th non-zero child node is the first non-zero child node of the current node, the number of non-zero child nodes included in the current node is reduced by 1 to determine the number of decoded points corresponding to the i-th non-zero child node.
  • the current node is the first non-zero node in the third layer in FIG8 , and the placeholder information of the current node is 01010101, it can be determined that the current node includes 4 non-zero child nodes.
  • the geometric position information of the 4 non-zero child nodes of the current node can be determined, so the geometric position information of the 4 non-zero child nodes included in the current node has been decoded, that is, the 4 non-zero child nodes included in the current node are decoded points for the first non-zero child node in the current node.
  • Method 2 If the i-th non-zero child node is not the first non-zero child node of the current node, obtain the sum of the first number of repeated points included in the non-zero child nodes before the i-th non-zero child node in the current node; subtract 1 from the number of non-zero child nodes included in the current node, and then add it to the sum of the first number of repeated points to obtain the number of decoded points corresponding to the i-th non-zero child node.
  • the decoded non-zero child nodes may include duplicate points. Therefore, when determining the number of decoded points corresponding to the i-th child node, the number of decoded duplicate points needs to be considered.
  • the current node is the first non-zero node in the N-1th layer, and the i-th non-zero child node of the current node is not the first non-zero child node of the current node, then obtain the sum of the first number of repeated points included in the non-zero child nodes before the i-th non-zero child node in the current node; subtract 1 from the number of non-zero child nodes included in the current node, and then add it to the sum of the first number of repeated points to obtain the number of decoded points corresponding to the i-th non-zero child node.
  • the current node is the first non-zero node in the third layer in Figure 8
  • the placeholder information of the current node is 01010101
  • the first child node of the current node includes 1 repeated point
  • the i-th non-zero child node is the second non-zero child node of the current node.
  • the decoding end records the number of decoded points corresponding to the i-th non-zero child node in the current node through the following instructions:
  • codedCount is the number of decoded points corresponding to the i-th non-zero child node in the current node
  • codedCount is initialized to 0
  • nodeCount is the number of nodes in the N-1th layer of the octree
  • childCount is the number of non-zero child nodes included in the nodes in the N-1th layer
  • dupPointNum is the number of duplicate points included in the non-zero child nodes.
  • Method 2 If the current node is not the first non-zero node in the N-1th layer, the above S102-A11 includes the following steps S102-A11-b1 to S102-A11-b3:
  • S102-A11-b1 determine the number of decoded points corresponding to each non-zero node before the current node in the N-1th layer;
  • S102-A11-b2 determine the number of non-zero child nodes of the current node
  • S102-A11-b3. Determine the number of decoded points corresponding to the i-th non-zero child node based on the number of decoded points corresponding to each non-zero node before the current node in the N-1th layer and the number of non-zero child nodes of the current node.
  • the current node is not the first non-zero node in the N-1th layer of the octree, it means that before decoding the current node, at least one non-zero node in the N-1th layer of the octree has been decoded.
  • the number of decoded points corresponding to the i-th non-zero child node of the current node when determining the number of decoded points corresponding to the i-th non-zero child node of the current node, first determine the number of decoded points corresponding to each non-zero node before the current node in the N-1th layer of the octree, then determine the number of non-zero child nodes of the current node, and then determine the number of decoded points corresponding to the i-th non-zero child node based on the number of decoded points corresponding to each non-zero node before the current node in the N-1th layer and the number of non-zero child nodes of the current node.
  • the number of non-zero child nodes included in each non-zero node before the current node is first determined, and then the number of non-zero child nodes included in each non-zero node is added to obtain a value of 1.
  • the total number of decoded duplicate points corresponding to each non-zero node is determined, and then the value 1 is added to the total number of duplicate points to obtain a value of 2, and the number of non-zero nodes before the current node in the N-1 layer is subtracted from the value 2 to obtain the number of decoded points corresponding to each non-zero node before the current node in the N-1 layer.
  • the decoding end can record the number of non-zero child nodes of each non-zero node in the N-1 layer, and at the same time, separately record the number of decoded duplicate points. Finally, based on the separately recorded number of non-zero child nodes and the number of duplicate points, the number of decoded points corresponding to each non-zero node before the current node in the N-1 layer is determined.
  • the current node is the third non-zero node in the third layer of the octree shown in FIG8 .
  • the first non-zero node and the second non-zero node in the N-1th layer before the third non-zero node have been decoded.
  • the placeholder information of the first non-zero node is 01010101
  • the first non-zero child node of the first non-zero node includes 1 repeated point
  • the placeholder information of the second non-zero node is 01010100.
  • the decoding end obtains the number of non-zero child nodes and the number of repeated points included in the non-zero child node for one non-zero node among the non-zero nodes; subtracts 1 from the number of non-zero child nodes of the non-zero node, and adds the sum of the number of repeated points included in the non-zero child nodes of the non-zero node to obtain the number of decoded points corresponding to the non-zero node.
  • the decoding end determines the number of decoded points corresponding to each non-zero node before the current node in the N-1th layer of the octree in the same manner, that is, the decoding end determines the number of decoded points corresponding to each non-zero node before the current node, and finally sums the number of decoded points corresponding to each non-zero node.
  • the number of decoded points corresponding to each non-zero node located before the current node in the N-1th layer can be determined.
  • the current node is the third non-zero node in the third layer of the octree shown in Figure 8.
  • the first non-zero node and the second non-zero node in the N-1th layer before the third non-zero node have been decoded.
  • the placeholder information of the first non-zero node is 01010101
  • the first non-zero child node of the first non-zero node includes 1 repeated point
  • the placeholder information of the second non-zero node is 01010100.
  • the first non-zero node includes 4 non-zero child nodes
  • the second non-zero node includes 3 non-zero child nodes
  • the number of decoded points corresponding to each non-zero node located before the current node in the N-1th layer is determined, and at the same time, the number of non-zero child nodes of the current node is determined.
  • the method for determining the number of non-zero child nodes of the current node can refer to the description of S102-A11-a1 above, and will not be repeated here.
  • the decoding end determines the number of decoded points corresponding to the i-th non-zero child node based on the number of decoded points corresponding to each non-zero node before the current node in the N-1th layer and the number of non-zero child nodes of the current node.
  • the embodiment of the present application does not limit the specific implementation method of determining the number of decoded points corresponding to the i-th non-zero child node in the above S102-A11-b3 based on the number of decoded points corresponding to each non-zero node located before the current node in the N-1th layer and the number of non-zero child nodes of the current node.
  • the above S102-A11-b3 includes the following steps S102-A11-b31 and S102-A11-b32:
  • S102-A11-b32 Determine the number of decoded points corresponding to the i-th non-zero child node based on the first sum and the number of non-zero child nodes of the current node.
  • the decoding end determines the number of decoded points corresponding to each non-zero node located before the current node in the N-1th layer of the octree based on the above method. Then, the decoding end adds the number of decoded points corresponding to each non-zero node located before the current node in the N-1th layer to obtain a first sum value, and determines the number of decoded points corresponding to the i-th non-zero child node based on the first sum value and the number of non-zero child nodes of the current node, thereby accurately determining the number of decoded points corresponding to the i-th non-zero child node.
  • the implementation method of determining the number of decoded points corresponding to the i-th non-zero child node based on the first sum value and the number of non-zero child nodes of the current node in the above S102-A11-b32 includes at least the following two methods:
  • Method 1 If the i-th non-zero child node is the first non-zero child node of the current node, then add the first sum value to the number of non-zero child nodes included in the current node to obtain the second sum value; subtract 1 from the second sum value to obtain the number of decoded points corresponding to the i-th non-zero child node.
  • the geometric position information of each child node of the current node can be determined, so each child node of the current node is determined as a decoded point, and then the first sum value is added to the number of child nodes of the current node to obtain a second sum value.
  • the determined second sum value is subtracted by 1 to obtain the number of decoded points corresponding to the i-th non-zero child node.
  • the current node is the second non-zero node in the third layer in FIG8 , and the placeholder information of the current node is 01010100, it can be determined that the current node includes 3 non-zero child nodes.
  • the i-th non-zero child node is the first non-zero child node of the current node
  • the placeholder information of the current node since the placeholder information of the current node is known, the geometric position information of the three non-zero child nodes of the current node can be determined, so the geometric position information of the three non-zero child nodes included in the current node has been decoded.
  • each non-zero node before the current node in the third layer is the first non-zero node in the third layer.
  • the placeholder information of the first non-zero node is 01010101
  • the first non-zero child node of the first non-zero node includes a repeated point
  • it can be determined that the number of decoded points corresponding to the first non-zero node is 4-1+1, that is, the first sum is 4.
  • Method 2 If the i-th non-zero child node is not the first non-zero child node of the current node, then add the first sum value to the number of non-zero child nodes included in the current node to obtain a second sum value; subtract 1 from the second sum value to obtain a third sum value; obtain the sum of the first number of repeated points included in the non-zero child nodes before the i-th non-zero child node in the current node, and add the third sum value to the sum of the first number of repeated points to obtain the number of decoded points corresponding to the i-th non-zero child node.
  • the geometric position information of each child node of the current node can be determined, so each child node of the current node is determined as a decoded point, and then the first sum value is added to the number of child nodes of the current node to obtain a second sum value.
  • the determined second sum value is subtracted by 1 to obtain a third sum value.
  • the i-th child node is not the first child node of the current node, and the child node before the i-th child node in the current node may include repeated points, it is necessary to obtain the sum of the first number of repeated points included in the non-zero child nodes before the i-th non-zero child node in the current node, and finally add the third sum value to the sum of the first number of repeated points to obtain the number of decoded points corresponding to the i-th non-zero child node.
  • the current node is the second non-zero node in the third layer in FIG8, and the placeholder information of the current node is 01010100, it can be determined that the current node includes 3 non-zero child nodes.
  • the i-th non-zero child node is the second non-zero child node of the current node
  • the placeholder information of the current node since the placeholder information of the current node is known, the geometric position information of the three non-zero child nodes of the current node can be determined, so the geometric position information of the three non-zero child nodes included in the current node has been decoded.
  • each non-zero node located before the current node in the third layer is the first non-zero node in the third layer.
  • the placeholder information of the first non-zero node is 01010101
  • the first sum value is 3.
  • the repeated point is recorded as the first repeated point.
  • step S102-A11 After the decoding end determines the number of decoded points corresponding to the i-th non-zero child node of the current node based on the above step S102-A11, it executes the following step S102-A12.
  • S102-A12. Determine a second parameter corresponding to the ith non-zero child node based on the number of decoded points corresponding to the ith non-zero child node in the point cloud.
  • the decoding end when decoding the current node, before the decoding end determines whether to decode the repeated point information of the i-th non-zero child node of the current node, it first determines the number of decoded points corresponding to the i-th non-zero child node based on the above steps, and then determines the second parameter corresponding to the i-th non-zero child node based on the number of decoded points corresponding to the i-th non-zero child node, so that the second parameter determined in this way can reflect the number of points decoded at the geometric position in the point cloud when decoding the i-th non-zero child node.
  • DCM Direct Coding Model
  • IDCM Inter Direct Coding Model
  • the method of determining the second parameter corresponding to the i-th non-zero subnode based on the number of decoded points corresponding to the i-th non-zero subnode in the point cloud is different.
  • the following introduces the specific process of determining the second parameter corresponding to the i-th non-zero subnode when the point cloud adopts DCM and does not adopt IDCM.
  • determining the second parameter corresponding to the i-th non-zero sub-node includes at least the following methods:
  • Method 1 If the point cloud does not use IDCM, the number of decoded points corresponding to the i-th non-zero child node is determined as the second parameter corresponding to the i-th non-zero child node.
  • the point cloud does not use IDCM, that is, IDCM is turned off, it means that when encoding the octree, each node in the octree is directly encoded. Therefore, when decoding the current node, in addition to the decoded point corresponding to the i-th non-zero child node determined above, other decoded points are not included. Based on this, the number of decoded points corresponding to the i-th non-zero child node can be directly determined as the second parameter corresponding to the i-th non-zero child node.
  • Method 2 If the point cloud adopts IDCM, the above S102-A12 includes the following steps S102-A121 and S102-A122:
  • S102-A122 Determine a second parameter corresponding to the i-th non-zero child node based on the number of decoded points corresponding to the i-th non-zero child node and the number of points included in the first node.
  • the point cloud uses IDCM, that is, IDCM is turned on, then it means that at least one node in the octree of the point cloud may use direct coding to directly encode the geometric information of the points included in the node.
  • the geometric information of the points included in the node is directly decoded. In this way, when determining the second parameter corresponding to the i-th non-zero child node, it is necessary to add the number of points included in the decoded first node using IDCM in the octree to the number of decoded points corresponding to the i-th non-zero child node determined above.
  • this node is recorded as the first node.
  • this first node includes 1 point.
  • this first node has been decoded. Therefore, it can be determined that the number of points included in the decoded first node in the octree is 1.
  • the second parameter corresponding to the i-th non-zero child node is determined based on the number of decoded points corresponding to the i-th non-zero child node and the number of points included in the first node.
  • the number of points included in the first node includes the number of repeated points in the first node.
  • the above-mentioned first node does not include the current node. That is to say, if the current node adopts IDCM encoding, for the i-th non-zero node in the current node (i.e., the i-th point included in the current node), based on the above steps, the number of decoded points corresponding to the node that does not adopt IDCM encoding in the octree (i.e., the number of decoded points corresponding to the i-th non-zero child node) is determined, and the number of decoded points corresponding to the first node that adopts IDCM encoding in the octree is determined, and then the number of decoded points corresponding to the node that does not adopt IDCM encoding in the octree and the number of decoded points corresponding to the first node that adopts IDCM encoding in the octree
  • the second parameter is equal to the first parameter, it is determined that the i-th non-zero child node does not include duplicate points, and the decoding of the duplicate point information of the i-th non-zero child node is skipped.
  • the second parameter is less than the first parameter, it is determined that the i-th non-zero child node includes a duplicate point, and the duplicate point information of the i-th non-zero child node can be decoded, or further based on whether the i-th non-zero child node is the last node in the octree, it is determined whether to decode the duplicate point information of the i-th non-zero child node.
  • the sum of the number of decoded points corresponding to the i-th non-zero child node and the number of points included in the first node is determined as the second parameter corresponding to the i-th non-zero child node.
  • the number of decoded points corresponding to the ith non-zero child node is related to the number of non-zero nodes included in the N-1th layer in the octree, that is, when determining the number of decoded points corresponding to the ith non-zero child node, it is assumed that each non-zero node in the N-1th layer includes a decoded point.
  • the first node if it is not a node in the N-1th layer, it does not affect the above process of determining the number of decoded points corresponding to the ith non-zero child node, that is, the decoded points corresponding to the ith non-zero child node determined above do not include the points included in the first node. Therefore, in this embodiment, the sum of the number of decoded points corresponding to the ith non-zero child node and the number of points included in the first node can be directly determined as the second parameter corresponding to the ith non-zero child node.
  • the decoding end determines the second parameter corresponding to the i-th non-zero child node through the following instruction:
  • pointCountICM represents the number of points included in the decoded first node using IDCM in the octree.
  • childCount based on the number of non-zero child nodes included in the current node, childCount, and the number of repeated points decoded before the i-th child node in the current node, dupPointNum, after determining the number of decoded points codedCount corresponding to the i-th non-zero child node, the number of points pointCountIDCM included in the decoded first node in the octree is added to codedCount to obtain the second parameter corresponding to the i-th non-zero child node.
  • the value obtained by subtracting 1 from the sum of the number of decoded points corresponding to the i-th non-zero child node and the number of points included in the first node is determined as the second parameter corresponding to the i-th non-zero child node.
  • the number of decoded points corresponding to the ith non-zero child node is related to the number of non-zero nodes included in the N-1th layer in the octree, that is, when determining the number of decoded points corresponding to the ith non-zero child node, it is assumed that each non-zero node in the N-1th layer includes a decoded point.
  • the first node is a node in the N-1th layer, it will affect the above process of determining the number of decoded points corresponding to the ith non-zero child node, that is, the decoded points corresponding to the ith non-zero child node determined above already include a point included in the first node. Therefore, in this embodiment, after adding the number of decoded points corresponding to the ith non-zero child node and the number of points included in the first node, a decoded point that is repeatedly calculated is subtracted to obtain the second parameter corresponding to the ith non-zero child node.
  • the decoding end determines the second parameter corresponding to the i-th non-zero child node through the following instruction:
  • the number of points pointCountIDCM-1 included in the first decoded node in the octree is added to codedCount to obtain the second parameter corresponding to the i-th non-zero child node.
  • the implementation of determining whether to decode the repeated point information of the i-th non-zero child node based on the first parameter and the second parameter in S102-A2 includes but is not limited to the following methods:
  • Method 1 If the first parameter is equal to the second parameter, skip decoding the repeated point information of the i-th non-zero child node.
  • the first parameter corresponding to the current node can be understood as the number of points with uncertain geometric position information in the point cloud when decoding the current node, or it can be understood as the number of undecoded points.
  • the second parameter corresponding to the i-th non-zero child node of the current node can be understood as the number of currently decoded points.
  • method 1 if the first parameter corresponding to the determined current node is equal to the second parameter corresponding to the i-th non-zero child node in the current node, it means that the i-th non-zero child node and subsequent undecoded leaf nodes do not include duplicate points. Therefore, the decoding of the duplicate point information of the i-th non-zero child node is skipped to save decoding time.
  • the placeholder information of the current node is 01010100
  • the current node includes 3 non-zero child nodes.
  • the i-th non-zero child node is the second non-zero child node of the current node
  • the geometric position information of the three non-zero child nodes of the current node can be determined, so the geometric position information of the three non-zero child nodes included in the current node has been decoded.
  • each non-zero node located before the current node in the third layer is the first non-zero node in the third layer.
  • the placeholder information of the first non-zero node is 01010101
  • the first non-zero child node of the current node includes 1 repeated point
  • the point cloud does not use IDCM
  • the number of decoded points corresponding to the i-th non-zero child node, 6, is determined as the second parameter corresponding to the i-th non-zero child node.
  • the first parameter 6 corresponding to the current node is equal to the second parameter 6 corresponding to the i-th non-zero child node, and therefore, decoding of the repeated point information of the i-th non-zero child node is skipped.
  • Method 2 if the first parameter is greater than the second parameter and the i-th non-zero child node is the last voxel node of the octree, then the decoding of the duplicate point information of the i-th non-zero child node is skipped, and the difference between the first parameter and the second parameter is determined as the number of duplicate points included in the i-th non-zero child node.
  • the i-th non-zero child node if the first parameter corresponding to the determined current node is equal to the second parameter corresponding to the i-th non-zero child node in the current node, it means that the i-th non-zero child node and subsequent undecoded leaf nodes may include duplicate points.
  • the i-th non-zero child node since the i-th non-zero child node is the last non-zero voxel node of the octree, it means that the i-th non-zero child node must include duplicate points, and the number of duplicate points included in the i-th non-zero child node is the difference between the first parameter and the second parameter.
  • the current node is the fourth non-zero node in the third layer in Figure 8
  • the current node includes 1 non-zero child node.
  • the i-th non-zero child node is the only non-zero child node of the current node, since the placeholder information of the current node is known, the geometric position information of 1 non-zero child node of the current node can be determined, so the geometric position information of 1 non-zero child node included in the current node has been decoded.
  • the non-zero nodes before the current node in the third layer are the first non-zero node, the second non-zero node, and the third non-zero node in the third layer.
  • the non-zero child nodes of the first three non-zero nodes do not include repeated points.
  • the number of decoded points 5 corresponding to the i-th non-zero child node is determined as the second parameter corresponding to the i-th non-zero child node.
  • the repeated point information of the i-th non-zero child node is skipped for decoding, thereby saving decoding time and improving decoding efficiency.
  • Mode 3 If the first parameter is greater than the second parameter and the i-th non-zero child node is not the last voxel node of the octree, the duplicate point information of the i-th non-zero child node is decoded.
  • the duplicate point information of the i-th non-zero child node is decoded.
  • the point cloud includes 10 points
  • the current node is the second non-zero node in the third layer in Figure 8
  • the N-1th layer of the octree where the current node is located includes 4 non-zero nodes
  • the placeholder information of the current node is 01010100
  • the current node includes 3 non-zero child nodes.
  • the i-th non-zero child node is the second non-zero child node of the current node
  • the geometric position information of the three non-zero child nodes of the current node can be determined, so the geometric position information of the three non-zero child nodes included in the current node has been decoded.
  • each non-zero node located before the current node in the third layer is the first non-zero node in the third layer.
  • the number of decoded points 5 corresponding to the i-th non-zero child node is determined as the second parameter corresponding to the i-th non-zero child node.
  • the duplicate point information of the i-th non-zero child node is decoded.
  • the first parameter corresponding to the current node is determined, and the second parameter corresponding to the i-th non-zero child node of the current node is determined. Based on the first parameter and the second parameter, it is determined whether to decode the duplicate point information of the i-th non-zero child node. For example, if the first parameter is equal to the second parameter, the decoding of the duplicate point information of the i-th non-zero child node is skipped, thereby reducing the decoding complexity of the point cloud, saving decoding time, and improving decoding efficiency.
  • the following introduces the process of determining the first parameter corresponding to the current node in situation 2 and performing geometric decoding of the current node based on the first parameter.
  • the above S101 includes the following steps:
  • S101-B2. Determine the total number of decoded repeated points corresponding to the i-th non-zero child node as the first parameter.
  • the number of decoded repeated points corresponding to the i-th non-zero child node is first determined, where the decoded repeated points corresponding to the i-th non-zero child node can be understood as the repeated points that have been decoded by the decoding end before decoding the repeated point information of the i-th non-zero child node.
  • the decoding end uses dupCount to record the number of duplicate points that have been decoded, where dupCount is initialized to 0.
  • the decoding end uses the following instruction to record the number of decoded repeated points:
  • dupPointNum represents the number of duplicate points included in a leaf node of the octree.
  • the decoding end determines the total number of decoded repeated points corresponding to the i-th non-zero child node, and determines the total number of decoded repeated points corresponding to the i-th non-zero child node as the first parameter, and then performs geometric decoding on the current node based on the first parameter.
  • determining the total number of decoded repeated points corresponding to the i-th non-zero child node in the above S101-B1 includes:
  • S101-B12. Determine the total number of decoded repeated points corresponding to the i-th non-zero child node based on the sum of the first number of decoded repeated points.
  • the i-th non-zero child node is not the first non-zero leaf node in the octree
  • the sum of the number of decoded points included in each non-zero child node located before the i-th non-zero child node in the octree is determined.
  • the decoded point is recorded as the first decoding point.
  • the placeholder information of the current node is 010101010
  • the i-th non-zero child node is the third non-zero child node in the current node
  • the total number of decoded repeated points corresponding to the i-th non-zero child node is determined based on the sum of the first number of decoded repeated points.
  • the implementation methods of determining the total number of decoded repeated points corresponding to the i-th non-zero child node based on the sum of the first number of decoded repeated points in the above S101-B12 include at least the following two methods:
  • Method 1 If the point cloud adopts IDCM, the sum of the second decoded duplicate points included in the first node adopting IDCM in the octree is determined; the sum of the first decoded duplicate points and the sum of the second decoded duplicate points are added to obtain the total number of decoded duplicate points corresponding to the i-th non-zero child node.
  • Method 2 If the point cloud does not use IDCM, the sum of the first number of decoded duplicate points determined above is directly determined as the total number of decoded duplicate points corresponding to the i-th non-zero child node.
  • the above step S102 is executed to perform geometric decoding on the current node based on the first parameter.
  • the geometric decoding of the current node based on the first parameter in S102 includes the following steps S102-B1 and S102-B2:
  • S102-B2 Determine whether to decode the duplicate point information of the i-th non-zero child node based on the total number of duplicate points in the point cloud and the total number of decoded duplicate points corresponding to the i-th non-zero child node.
  • the decoding end determines whether to decode the repeated point information of the i-th non-zero child node of the current node, based on the above steps, the number of decoded repeated points corresponding to the i-th non-zero child node is determined as the first parameter. Then, the total number of repeated points in the point cloud is determined, and the number of decoded repeated points corresponding to the i-th non-zero child node is compared with the number of repeated points in the point cloud to determine whether the i-th non-zero child node includes repeated points, and then determine whether to decode the repeated point information of the i-th non-zero child node.
  • the methods for determining the total number of repeated points in the point cloud in S102-B1 include but are not limited to the following:
  • the encoder writes the total number of repeated points of the point cloud into the geometry stream, so that the decoder obtains the total number of repeated points of the point cloud by decoding the geometry stream.
  • Method 2 The decoding end determines the total number of points in the point cloud and the total number of non-zero voxel nodes in the octree; the difference between the total number of points in the point cloud and the total number of non-zero voxel nodes in the octree is determined as the total number of repeated points in the point cloud.
  • the voxel-level nodes of the octree can be understood as the leaf nodes of the last voxel level of the octree.
  • the non-zero voxel-level nodes of the octree include at least one point in the point cloud. Therefore, in method 2, the difference between the total number of points in the point cloud and the total number of voxel nodes in the octree is determined as the total number of repeated points in the point cloud.
  • the method for the decoding end to determine the total number of points of the point cloud can refer to the description of the above embodiment, and will not be repeated here.
  • the decoding end determines the number of non-zero voxel nodes in the last layer of the octree through the placeholder information of each non-zero node in the N-1th layer of the octree.
  • the decoding end determines the total number of duplicate points in the point cloud based on the above method 1 or method 2, it determines whether to decode the duplicate point information of the i-th non-zero child node based on the total number of duplicate points in the point cloud and the total number of decoded duplicate points corresponding to the i-th non-zero child node.
  • the total number of decoded duplicate points corresponding to the i-th non-zero child node is equal to the total number of duplicate points in the point cloud, it means that the duplicate points in the point cloud have been decoded.
  • the i-th non-zero child node and the leaf nodes after the i-th non-zero child node do not include duplicate points. Therefore, the decoding of the duplicate point information of the i-th non-zero child node is skipped, thereby reducing the decoding complexity of the point cloud, saving decoding time, and improving decoding efficiency.
  • the i-th non-zero child node includes duplicate points.
  • decoding the duplicate point information of the i-th non-zero child node is skipped, and the difference between the total number of duplicate points in the point cloud and the total number of decoded duplicate points corresponding to the i-th non-zero child node is determined as the number of duplicate points included in the i-th non-zero child node.
  • the decoding end decodes the duplicate point information of the i-th non-zero child node.
  • the decoding end determines the first parameter corresponding to the current node in the octree-based point cloud decoding based on the above situation 1 and situation 2, and decodes the current node based on the first parameter.
  • the above embodiment takes the case where the current node is the first non-zero node in the N-1th layer of the octree as an example to introduce the decoding process of the current node.
  • the decoding method provided in the embodiment of the present application can also be used to decode the current node. For example, the difference between the total number of points in the point cloud and the non-zero nodes included in the Nth layer is determined as the first parameter corresponding to the current node. Based on the first parameter, it is determined whether the current node includes duplicate points.
  • the current node includes at least one point in the point cloud, and for the jth point in the current node, the number of decoded points corresponding to the jth point is determined, wherein the method for determining the number of decoded points corresponding to the jth point is substantially the same as the method for determining the number of decoded points corresponding to the i-th non-zero node, and the non-zero subnodes included in the node are replaced with the points included in the node.
  • the decoding end determines the second parameter corresponding to the jth point based on the number of decoded points corresponding to the jth point, and then determines whether the jth point includes duplicate points based on the second parameter corresponding to the jth point and the first parameter corresponding to the current node. For example, if the first parameter is equal to the second parameter, it is determined that the jth point does not include duplicate points, and then the duplicate point information of the jth point is skipped for decoding.
  • the duplicate point information of the jth point is skipped for decoding, and the difference between the first parameter and the second parameter is determined as the number of duplicate points of the jth point.
  • the first parameter is greater than the second parameter, and the j-th point is not the last point in the N-th layer, the repeated point information of the j-th point is decoded.
  • the point cloud decoding method in the point cloud decoding based on octree, when decoding the current node of the N-1th layer in the octree, first determines the first parameter corresponding to the current node, and the first parameter is used to determine whether at least one non-zero child node of the current node includes repeated points.
  • the current node is a non-zero node of the N-1th layer in the octree of the point cloud, and N is the total number of layers of the octree. Then, based on the first parameter, the current node is geometrically decoded.
  • the repeated point information of the i-th non-zero child node is skipped for decoding, thereby reducing the decoding complexity of the point cloud, saving decoding time, and improving decoding efficiency.
  • the above takes the decoding end as an example to introduce in detail the point cloud decoding method provided in the embodiment of the present application.
  • the following takes the encoding end as an example to introduce the point cloud encoding method provided in the embodiment of the present application.
  • Fig. 9 is a schematic diagram of a point cloud coding method according to an embodiment of the present application.
  • the point cloud coding method according to the embodiment of the present application can be implemented by the point cloud coding device shown in Fig. 3 or Fig. 4 above.
  • the point cloud encoding method of the embodiment of the present application includes:
  • the first parameter is used to determine whether to encode the duplicate point information corresponding to the current node, and the current node is a non-zero node in the octree of the point cloud.
  • the point cloud includes geometric information and attribute information
  • the encoding of the point cloud includes geometric encoding and attribute encoding.
  • the embodiments of the present application relate to geometric encoding of point clouds. That is, the encoded points involved in the embodiments of the present application refer to points in the point cloud whose geometric information has been encoded, and the unencoded points refer to points in the point cloud whose geometric information has not been encoded.
  • the geometric information of the point cloud is also referred to as the position information of the point cloud, and therefore, the geometric encoding of the point cloud is also referred to as the position encoding of the point cloud.
  • the encoder constructs an octree structure of the point cloud based on the geometric information of the point cloud. Specifically, the point cloud is enclosed in a bounding box, and the bounding box is divided into sub-cubes in sequence. The non-empty sub-cubes (including points in the point cloud) are continued to be divided until the leaf node obtained by the division is a 1x1x1 unit cube.
  • the number of points contained in the leaf node is encoded, and finally the encoding of the geometric octree is completed to generate a geometric code stream.
  • the geometric information of the point cloud is first transformed, and all the point clouds after the coordinate transformation are contained in a bounding box. Then, the bounding box is continuously divided into octrees in the order of breadth-first traversal, and the placeholder code of each node is encoded. The occupied nodes are continuously divided into octrees until the leaf nodes obtained by the division are 1x1x1 unit cubes, and the division is stopped. The points in the leaf nodes are geometrically encoded to generate a geometric code stream.
  • the bounding box of the point cloud is divided into 8 nodes by an octree, and the occupied nodes among the 8 nodes, that is, the nodes including the points, are further divided into octrees, and so on, until the division is to the voxel level, for example, to a 1X1X1 cube.
  • the point cloud octree structure obtained by such division includes multiple layers of nodes, for example, N layers.
  • the placeholder information of each layer is encoded layer by layer until the voxel-level leaf nodes of the last layer are encoded.
  • the point cloud is divided through the octree, and finally the points in the point cloud are divided into the voxel-level leaf nodes of the octree, and the encoding of the point cloud is achieved by encoding the entire octree.
  • the embodiment of the present application does not limit the specific position of the current node in the octree.
  • the current node is a node at the N-1th layer in the octree of the point cloud, where N is the total number of layers of the octree and N is a positive integer greater than 1.
  • the first parameter is used to determine whether at least one non-zero child node of the current node includes a duplicate point.
  • these points with the same coordinates are divided into the same leaf node of the octree, so that the leaf node includes repeated points.
  • the encoder when encoding the node of the N-1th layer of the octree, the encoder not only encodes the placeholder information of the node, but also encodes the repeated point information of the child nodes (i.e., leaf nodes) of the node.
  • the encoder when encoding the node of the N-1th layer of the octree, the encoder not only encodes the placeholder information of the node, but also encodes the repeated point information of the child nodes of the node. This will increase the complexity of encoding, waste encoding time, and reduce encoding efficiency.
  • the first parameter corresponding to the current node is first determined.
  • the first parameter is used to determine whether at least one child node (i.e., leaf node) of the current node includes duplicate points, and then based on the first parameter, the current node is encoded.
  • the encoding of the duplicate point information of the i-th non-zero child node is skipped, thereby reducing the encoding complexity of the point cloud, saving encoding time, and improving encoding efficiency.
  • the embodiments of the present application mainly relate to the encoding process of the nodes in the N-1th layer of the point cloud octree.
  • the N-1th layer can also be understood as the second to last layer of the octree of the point cloud.
  • the child nodes of the N-1th layer of the node are the voxel-level leaf nodes of the octree, that is, the last layer of nodes.
  • the encoding process for each node in the N-1th layer of the octree is basically the same.
  • the encoding process of the embodiment of the present application is introduced by taking the current node in the N-1th layer of the octree as an example.
  • the current node can be understood as any non-zero node (also called a non-empty node) in the N-1th layer of the octree, where the non-zero node can be understood as a node including at least one child node, or a node including at least one point in the point cloud.
  • non-zero node also called a non-empty node
  • the non-zero node can be understood as a node including at least one child node, or a node including at least one point in the point cloud.
  • the current node may be understood as a non-zero node in the N-1th layer of the octree that is currently waiting to be encoded.
  • the first parameter corresponding to the current node is first determined, and then the current node is encoded based on the first parameter.
  • the method of determining the first parameter corresponding to the current node is different, and the corresponding method of encoding the current node based on the first parameter is also different. The following is a detailed introduction to several methods of determining the first parameter corresponding to the current node and the process of encoding the current node based on the first parameter involved in the embodiment of the present application.
  • the above S201 includes the following steps S201-A1 to S201-A2:
  • S201-A1 determine the total number of points in the point cloud and the number of non-zero nodes in the N-1th layer;
  • S201-A2 Determine a first parameter based on the total number of points in the point cloud and the number of non-zero nodes in the N-1th layer.
  • the encoding end encodes the nodes in the octree based on a breadth-first traversal method.
  • the first parameter corresponding to the current node is determined based on the total number of points in the point cloud and the number of non-zero nodes in the N-1th layer of the octree of the point cloud.
  • the first parameter can be understood as the number of points whose geometric information cannot be determined in the current point cloud.
  • the current node is encoded. For example, based on the first parameter, it is determined whether the child nodes of the current node include duplicate points.
  • the duplicate point information of the child nodes of the current node is skipped to reduce the encoding complexity of the point cloud, save encoding time, and thus improve encoding efficiency.
  • the encoding end writes the total number of points of the point cloud into the geometric code stream, so that the decoding end obtains the total number of points of the point cloud by decoding the geometric code stream.
  • the encoding end writes the total number of points of the point cloud into the geometric data unit of the point cloud. In this way, the decoding end obtains the total number of points of the point cloud by decoding the geometric data unit of the point cloud.
  • the encoder when encoding the total number of points in the point cloud, the encoder subtracts one from the total number of points in the point cloud to obtain a first value, and writes the first value into the geometry data unit, that is, the first value is represented as slice_num_points_minuS2.
  • the decoder when decoding, the decoder decodes the geometry data unit to obtain the first value, and then adds 1 to the first value to obtain the total number of points in the point cloud.
  • the script syntax of the geometry data unit (Geometry data unit footer syntax) is shown in Table 2.
  • the encoder encodes the placeholder information of the nodes at each layer of the octree in a breadth-first traversal manner. For example, based on the child nodes included in each node in the N-2th layer, the placeholder information of each node in the N-2th layer is determined, and then the placeholder information of each node in the N-2th layer is written into the geometry stream. In this way, the decoder decodes the placeholder information of each node in the N-2th layer and can determine the number of nodes included in the N-1th layer.
  • the encoder determines the first parameter corresponding to the current node based on the total number of points in the point cloud and the number of non-zero nodes in the N-1th layer.
  • the embodiment of the present application does not limit the specific method of determining the first parameter corresponding to the current node based on the total number of points in the point cloud and the number of non-zero nodes in the N-1th layer.
  • the encoding end determines the difference between the total number of points in the point cloud and the number of non-zero nodes in the N-1th layer as the first parameter.
  • the occupied nodes include at least one non-zero child node, that is, the occupied nodes in the N-1th layer correspond to at least one point. Therefore, the difference between the total number of points in the point cloud and the number of non-zero nodes in the N-1th layer of the octree is determined as the number of points with uncertain geometric information in the point cloud, that is, the first parameter.
  • the point cloud includes 10 points
  • the first parameter is determined based on the above formula (4).
  • the above step S202 is performed to encode the current node based on the first parameter.
  • the first parameter corresponding to the current node is determined to be 0, for example, the total number of points in the point cloud is a, and the N-1th layer of the octree of the point cloud includes a nodes
  • the first parameter is determined to be 0, which means that each non-zero node in the N-1th layer includes a non-zero child node, and the non-zero child node includes a point in the point cloud, and no duplicate points are included.
  • the encoding of the duplicate point information of the non-zero child nodes of each non-zero node is skipped, thereby reducing the encoding complexity and saving encoding time.
  • the above S202 is as shown in the following situation 1.
  • the above S202 includes the following steps S202-A1 to S202-A2:
  • S202-A2 Determine whether to encode the repeated point information of the i-th non-zero child node based on the first parameter and the second parameter.
  • the current node includes at least one non-zero child node.
  • the specific process of determining whether to encode the repeated point information of each non-zero child node included in the current node is the same.
  • the i-th non-zero child node of the current node is used as an example for explanation.
  • the current node is a non-zero node in the N-1th layer (i.e., the second to last layer) of the octree
  • the current node is encoded by the octree, that is, the current node is divided into an octree to obtain at least one voxel-level leaf node
  • the i-th non-zero child node is a voxel-level leaf node of the current node.
  • the point cloud is encoded using IDCM, that is, the IDCM encoding method is turned on
  • the current node is a non-zero node in the N-1th layer of the octree
  • IDCM that is, at least one point included in the current node is directly encoded
  • the i-th non-zero child node of the current node can be understood as a point in the current node.
  • the encoding end determines the first parameter corresponding to the current node based on the above steps S202-A1 to S202-A2.
  • the first parameter can be understood as the number of points whose current position information is not determined in the point cloud.
  • the second parameter corresponding to the i-th non-zero child node of the current node is determined.
  • the second parameter is used to indicate the number of points whose geometric positions in the point cloud have been encoded when encoding the i-th non-zero child node.
  • the embodiment of the present application does not limit the specific method of determining the second parameter corresponding to the current i-th non-zero child node.
  • the encoding end records in real time the number of points whose geometric positions have been encoded in the current point cloud, and then, when encoding the current node, determines the number of points determined by the geometric position information that has been determined before encoding the repeated point information of the i-th non-zero child node.
  • determining the second parameter corresponding to the i-th non-zero child node in the above S202-A1 includes the following steps S202-A11 and S202-A12:
  • S202-A11 Determine the number of encoded points corresponding to the i-th non-zero child node in the point cloud.
  • the encoder determines the number of encoded points corresponding to the i-th non-zero child node in the point cloud, and determines the second parameter corresponding to the i-th non-zero child node based on the number of encoded points corresponding to the i-th non-zero child node in the point cloud. For example, the number of encoded points corresponding to the i-th non-zero child node in the point cloud is determined as the second parameter corresponding to the i-th non-zero child node.
  • the implementation methods of the above S202-A11 include but are not limited to the following:
  • Method 1 if the current node is the first non-zero node in the N-1th layer, the above S202-A11 includes the following steps S202-A11-a1 and S202-A11-a2:
  • S202-A11-a1 determine the number of non-zero child nodes of the current node
  • the number of non-zero child nodes included in the current node is determined, and based on the number of non-zero child nodes of the current node, the number of encoded points corresponding to the i-th non-zero child node is determined.
  • the encoding end determines the placeholder information of the current node based on the occupancy of each child node of the current node in the N-1th layer. Assuming that among the 8 child nodes of the current node, the 2nd child node, the 4th child node, the 6th child node and the 8th child node are occupied, the placeholder information of the current node is determined to be 01010101. In this way, it can be determined that the current node includes 4 non-zero child nodes.
  • the encoder determines the number of encoded points corresponding to the i-th non-zero child node based on the number of non-zero child nodes of the current node.
  • the methods for determining the number of encoded points corresponding to the i-th non-zero child node based on the number of non-zero child nodes of the current node in S202-A11-a2 include but are not limited to the following:
  • Method 1 If the i-th non-zero child node is the first non-zero child node of the current node, the number of non-zero child nodes included in the current node is reduced by 1 to determine the number of encoded points corresponding to the i-th non-zero child node.
  • the current node is the first non-zero node in the third layer in FIG8 , and the placeholder information of the current node is 01010101, it can be determined that the current node includes 4 non-zero child nodes.
  • the geometric position information of the 4 non-zero child nodes of the current node can be determined, so the geometric position information of the 4 non-zero child nodes included in the current node has been encoded, that is, the 4 non-zero child nodes included in the current node are encoded points for the first non-zero child node in the current node.
  • Method 2 If the i-th non-zero child node is not the first non-zero child node of the current node, obtain the sum of the first number of repeated points included in the non-zero child nodes before the i-th non-zero child node in the current node; subtract 1 from the number of non-zero child nodes included in the current node, and then add it to the sum of the first number of repeated points to obtain the number of encoded points corresponding to the i-th non-zero child node.
  • the encoded non-zero child nodes may include duplicate points. Therefore, when determining the number of encoded points corresponding to the i-th child node, the number of encoded duplicate points needs to be considered.
  • the current node is the first non-zero node in the N-1th layer, and the i-th non-zero child node of the current node is not the first non-zero child node of the current node, then obtain the sum of the first number of repeated points included in the non-zero child nodes before the i-th non-zero child node in the current node; subtract 1 from the number of non-zero child nodes included in the current node, and then add it to the sum of the first number of repeated points to obtain the number of encoded points corresponding to the i-th non-zero child node.
  • the current node is the first non-zero node in the third layer in Figure 8
  • the placeholder information of the current node is 01010101
  • the first child node of the current node includes 1 repeated point
  • the i-th non-zero child node is the second non-zero child node of the current node.
  • Method 2 If the current node is not the first non-zero node in the N-1th layer, the above S202-A11 includes the following steps S202-A11-b1 to S202-A11-b3:
  • S202-A11-b1 determine the number of encoded points corresponding to each non-zero node located before the current node in the N-1th layer;
  • S202-A11-b2 determine the number of non-zero child nodes of the current node
  • S202-A11-b3. Determine the number of encoded points corresponding to the i-th non-zero child node based on the number of encoded points corresponding to each non-zero node before the current node in the N-1th layer and the number of non-zero child nodes of the current node.
  • the current node is not the first non-zero node in the N-1th layer of the octree, it means that before encoding the current node, at least one non-zero node in the N-1th layer of the octree has been encoded.
  • the number of encoded points corresponding to the i-th non-zero child node of the current node when determining the number of encoded points corresponding to the i-th non-zero child node of the current node, first determine the number of encoded points corresponding to each non-zero node located before the current node in the N-1th layer of the octree, then determine the number of non-zero child nodes of the current node, and then determine the number of encoded points corresponding to the i-th non-zero child node based on the number of encoded points corresponding to each non-zero node located before the current node in the N-1th layer and the number of non-zero child nodes of the current node.
  • the number of non-zero child nodes included in each non-zero node before the current node is first determined, and then the number of non-zero child nodes included in each non-zero node is added to obtain a value of 1.
  • the total number of encoded repeated points corresponding to each non-zero node is determined, and then the value 1 is added to the total number of repeated points to obtain a value of 2, and the number of non-zero nodes before the current node in the N-1 layer is subtracted from the value 2 to obtain the number of encoded points corresponding to each non-zero node before the current node in the N-1 layer.
  • the encoding end can record the number of non-zero child nodes of each non-zero node in the N-1 layer, and at the same time, separately record the number of encoded repeated points. Finally, based on the separately recorded number of non-zero child nodes and the number of repeated points, the number of encoded points corresponding to each non-zero node before the current node in the N-1 layer is determined.
  • the current node is the third non-zero node in the third layer of the octree shown in FIG8 .
  • the first non-zero node and the second non-zero node in the N-1th layer before the third non-zero node have been encoded.
  • the placeholder information of the first non-zero node is 01010101
  • the first non-zero child node of the first non-zero node includes 1 repeated point
  • the placeholder information of the second non-zero node is 01010100.
  • the encoder obtains the number of non-zero child nodes and the number of repeated points included in the non-zero child node for one non-zero node among the non-zero nodes; subtracts 1 from the number of non-zero child nodes of the non-zero node, and adds the sum of the number of repeated points included in the non-zero child nodes of the non-zero node to obtain the number of encoded points corresponding to the non-zero node.
  • the encoder determines the number of encoded points corresponding to each non-zero node before the current node in the N-1th layer of the octree in the same manner, that is, the encoder determines the number of encoded points corresponding to each non-zero node before the current node, and finally sums the number of encoded points corresponding to each non-zero node.
  • the number of encoded points corresponding to each non-zero node located before the current node in the N-1th layer can be determined.
  • the current node is the third non-zero node in the third layer of the octree shown in Figure 8.
  • the first non-zero node and the second non-zero node in the N-1th layer before the third non-zero node have been encoded.
  • the placeholder information of the first non-zero node is 01010101
  • the first non-zero child node of the first non-zero node includes 1 repeated point
  • the placeholder information of the second non-zero node is 01010100.
  • the first non-zero node includes 4 non-zero child nodes
  • the second non-zero node includes 3 non-zero child nodes
  • the number of encoded points corresponding to each non-zero node located before the current node in the N-1th layer is determined, and at the same time, the number of non-zero child nodes of the current node is determined.
  • the method for determining the number of non-zero child nodes of the current node can refer to the description of S202-A11-a1 above, and will not be repeated here.
  • the encoder determines the number of coded points corresponding to the i-th non-zero child node based on the number of coded points corresponding to each non-zero node before the current node in the N-1th layer and the number of non-zero child nodes of the current node.
  • the embodiment of the present application does not limit the specific implementation method of determining the number of encoded points corresponding to the i-th non-zero child node in the above S202-A11-b3 based on the number of encoded points corresponding to each non-zero node located before the current node in the N-1th layer and the number of non-zero child nodes of the current node.
  • the above S202-A11-b3 includes the following steps S202-A11-b31 and S202-A11-b32:
  • S202-A11-b32 Determine the number of encoded points corresponding to the i-th non-zero child node based on the first sum value and the number of non-zero child nodes of the current node.
  • the encoding end determines the number of encoded points corresponding to each non-zero node located before the current node in the N-1th layer of the octree based on the above method. Then, the encoding end adds the number of encoded points corresponding to each non-zero node located before the current node in the N-1th layer to obtain a first sum value, and determines the number of encoded points corresponding to the i-th non-zero child node based on the first sum value and the number of non-zero child nodes of the current node, thereby achieving accurate determination of the number of encoded points corresponding to the i-th non-zero child node.
  • the implementation method of determining the number of encoded points corresponding to the i-th non-zero child node based on the first sum value and the number of non-zero child nodes of the current node in the above S202-A11-b32 includes at least the following two methods:
  • Method 1 If the i-th non-zero child node is the first non-zero child node of the current node, then add the first sum value to the number of non-zero child nodes included in the current node to obtain the second sum value; subtract 1 from the second sum value to obtain the number of encoded points corresponding to the i-th non-zero child node.
  • the current node is not the first non-zero node in the N-1th layer, and the i-th non-zero child node of the current node is the first non-zero child node of the current node, then based on the above steps, the number of encoded points of each encoded non-zero node located before the current node in the N-1th layer is added to obtain a first sum value.
  • the placeholder information of the current node since the placeholder information of the current node has been encoded, the geometric position information of each child node of the current node can be determined, so each child node of the current node is determined as an encoded point, and then the first sum value is added to the number of child nodes of the current node to obtain a second sum value.
  • the determined second sum value is subtracted by 1 to obtain the number of encoded points corresponding to the i-th non-zero child node.
  • Method 2 If the i-th non-zero child node is not the first non-zero child node of the current node, then add the first sum value to the number of non-zero child nodes included in the current node to obtain a second sum value; subtract 1 from the second sum value to obtain a third sum value; obtain the sum of the first number of repeated points included in the non-zero child nodes before the i-th non-zero child node in the current node, and add the third sum value to the sum of the first number of repeated points to obtain the number of encoded points corresponding to the i-th non-zero child node.
  • the current node is not the first non-zero node in the N-1th layer, and the i-th non-zero child node of the current node is not the first non-zero child node of the current node, then based on the above steps, the number of encoded points of each encoded non-zero node before the current node in the N-1th layer is added to obtain a first sum.
  • the placeholder information of the current node since the placeholder information of the current node has been encoded, the geometric position information of each child node of the current node can be determined, so each child node of the current node is determined as an encoded point, and then the first sum is added to the number of child nodes of the current node to obtain a second sum.
  • the determined second sum is subtracted by 1 to obtain a third sum.
  • the i-th child node is not the first child node of the current node, and the child node before the i-th child node in the current node may include repeated points, it is necessary to obtain the sum of the first number of repeated points included in the non-zero child nodes before the i-th non-zero child node in the current node, and finally add the third sum value to the sum of the first number of repeated points to obtain the number of encoded points corresponding to the i-th non-zero child node.
  • the encoder After the encoder determines the number of encoded points corresponding to the i-th non-zero child node of the current node based on the above step S202-A11, it executes the following step S202-A12.
  • S202-A12. Determine a second parameter corresponding to the ith non-zero child node based on the number of encoded points corresponding to the ith non-zero child node in the point cloud.
  • the encoding end when encoding the current node, first determines the number of encoded points corresponding to the i-th non-zero child node based on the above steps before determining whether to encode the repeated point information of the i-th non-zero child node of the current node, and then determines the second parameter corresponding to the i-th non-zero child node based on the number of encoded points corresponding to the i-th non-zero child node, so that the second parameter determined in this way can reflect the number of points encoded at the geometric position in the point cloud when encoding the i-th non-zero child node.
  • DCM Direct Coding Model
  • IDCM Inter Direct Coding Model
  • the method of determining the second parameter corresponding to the i-th non-zero subnode based on the number of encoded points corresponding to the i-th non-zero subnode in the point cloud is different.
  • the following introduces the specific process of determining the second parameter corresponding to the i-th non-zero subnode when the point cloud adopts DCM and does not adopt IDCM.
  • determining the second parameter corresponding to the i-th non-zero child node includes at least the following methods:
  • Method 1 If the point cloud does not use IDCM, the number of encoded points corresponding to the i-th non-zero child node is determined as the second parameter corresponding to the i-th non-zero child node.
  • the point cloud does not use IDCM, that is, IDCM is turned off, it means that when encoding the octree, each node in the octree is directly encoded. Therefore, when encoding the current node, in addition to the encoded point corresponding to the i-th non-zero child node determined above, other encoded points are not included. Based on this, the number of encoded points corresponding to the i-th non-zero child node can be directly determined as the second parameter corresponding to the i-th non-zero child node.
  • Method 2 If the point cloud adopts IDCM, the above S202-A12 includes the following steps S202-A121 and S202-A122:
  • S202-A122 Determine a second parameter corresponding to the i-th non-zero child node based on the number of encoded points corresponding to the i-th non-zero child node and the number of points included in the first node.
  • the point cloud uses IDCM, that is, IDCM is turned on, then it means that at least one node in the octree of the point cloud may use direct coding to directly encode the geometric information of the points included in the node.
  • IDCM that is, IDCM is turned on
  • this node is recorded as the first node.
  • this first node includes 1 point.
  • this first node has been encoded before encoding the current node. Therefore, it can be determined that the number of points included in the first node that has been encoded in the octree is 1.
  • the second parameter corresponding to the i-th non-zero child node is determined based on the number of encoded points corresponding to the i-th non-zero child node and the number of points included in the first node.
  • the number of points included in the first node includes the number of repeated points in the first node.
  • the above-mentioned first node does not include the current node. That is to say, if the current node adopts IDCM encoding, for the i-th non-zero node in the current node (i.e., the i-th point included in the current node), based on the above steps, the number of encoded points corresponding to the node that does not adopt IDCM encoding in the octree (i.e., the number of encoded points corresponding to the i-th non-zero child node) is determined, and the number of encoded points corresponding to the first node that adopts IDCM encoding in the octree is determined, and then the number of encoded points corresponding to the node that does not adopt IDCM encoding in the octree and the number of encoded points corresponding to the first node that adopts IDCM encoding in the octree are used to determine the number of encoded points corresponding to the node that does not adopt IDCM en
  • the second parameter is equal to the first parameter, it is determined that the i-th non-zero child node does not include duplicate points, and the encoding of the duplicate point information of the i-th non-zero child node is skipped.
  • the second parameter is less than the first parameter, it is determined that the i-th non-zero child node includes a duplicate point, and the duplicate point information of the i-th non-zero child node can be encoded, or further based on whether the i-th non-zero child node is the last node in the octree, it is determined whether to encode the duplicate point information of the i-th non-zero child node.
  • the sum of the number of encoded points corresponding to the i-th non-zero child node and the number of points included in the first node is determined as the second parameter corresponding to the i-th non-zero child node.
  • the number of encoded points corresponding to the ith non-zero child node is related to the number of non-zero nodes included in the N-1th layer in the octree, that is, when determining the number of encoded points corresponding to the ith non-zero child node, it is assumed that each non-zero node in the N-1th layer includes an encoded point.
  • the first node is not a node in the N-1th layer, it does not affect the above process of determining the number of encoded points corresponding to the ith non-zero child node, that is, the encoded points corresponding to the ith non-zero child node determined above do not include the points included in the first node. Therefore, in this embodiment, the sum of the number of encoded points corresponding to the ith non-zero child node and the number of points included in the first node can be directly determined as the second parameter corresponding to the ith non-zero child node.
  • the value obtained by subtracting 1 from the sum of the number of encoded points corresponding to the i-th non-zero child node and the number of points included in the first node is determined as the second parameter corresponding to the i-th non-zero child node.
  • the number of encoded points corresponding to the ith non-zero child node is related to the number of non-zero nodes included in the N-1th layer in the octree, that is, when determining the number of encoded points corresponding to the ith non-zero child node, it is assumed that each non-zero node in the N-1th layer includes an encoded point.
  • the first node is a node in the N-1th layer, it will affect the above process of determining the number of encoded points corresponding to the ith non-zero child node, that is, the encoded points corresponding to the ith non-zero child node determined above already include a point included in the first node.
  • a repeatedly calculated encoded point is subtracted to obtain the second parameter corresponding to the ith non-zero child node.
  • the implementation of determining whether to encode the repeated point information of the i-th non-zero child node based on the first parameter and the second parameter in S202-A2 includes but is not limited to the following methods:
  • Method 1 If the first parameter is equal to the second parameter, skip encoding the duplicate point information of the i-th non-zero child node.
  • the first parameter corresponding to the current node can be understood as the number of points with uncertain geometric position information in the point cloud when encoding the current node, or it can be understood as the number of unencoded points.
  • the second parameter corresponding to the i-th non-zero child node of the current node can be understood as the number of currently encoded points.
  • method 1 if the first parameter corresponding to the determined current node is equal to the second parameter corresponding to the i-th non-zero child node in the current node, it means that the i-th non-zero child node and subsequent uncoded leaf nodes do not include duplicate points. Therefore, the encoding of the duplicate point information of the i-th non-zero child node is skipped to save encoding time.
  • the point cloud includes 10 points
  • the current node is the second non-zero node in the third layer in Figure 8
  • the N-1th layer of the octree where the current node is located includes 4 non-zero nodes
  • the placeholder information of the current node is 01010100
  • the current node includes 3 non-zero child nodes.
  • the i-th non-zero child node is the second non-zero child node of the current node
  • the geometric position information of the three non-zero child nodes of the current node can be determined, so the geometric position information of the three non-zero child nodes included in the current node has been encoded.
  • each non-zero node located before the current node in the third layer is the first non-zero node in the third layer.
  • the placeholder information of the first non-zero node is 01010101
  • the first non-zero child node of the current node includes 1 repeated point
  • the point cloud does not use IDCM
  • the number of encoded points corresponding to the i-th non-zero child node, 6, is determined as the second parameter corresponding to the i-th non-zero child node.
  • the first parameter 6 corresponding to the current node is equal to the second parameter 6 corresponding to the i-th non-zero child node, and therefore, the encoding of the repeated point information of the i-th non-zero child node is skipped.
  • Method 2 if the first parameter is greater than the second parameter and the i-th non-zero child node is the last voxel node of the octree, then the encoding of the duplicate point information of the i-th non-zero child node is skipped, and the difference between the first parameter and the second parameter is determined as the number of duplicate points included in the i-th non-zero child node.
  • the i-th non-zero child node if the first parameter corresponding to the determined current node is equal to the second parameter corresponding to the i-th non-zero child node in the current node, it means that the i-th non-zero child node and subsequent uncoded leaf nodes may include duplicate points.
  • the i-th non-zero child node since the i-th non-zero child node is the last non-zero voxel node of the octree, it means that the i-th non-zero child node must include duplicate points, and the number of duplicate points included in the i-th non-zero child node is the difference between the first parameter and the second parameter.
  • the current node is the fourth non-zero node in the third layer in Figure 8
  • the current node includes 1 non-zero child node.
  • the i-th non-zero child node is the only non-zero child node of the current node, since the placeholder information of the current node is known, the geometric position information of 1 non-zero child node of the current node can be determined, so the geometric position information of 1 non-zero child node included in the current node has been encoded.
  • the non-zero nodes before the current node in the third layer are the first non-zero node, the second non-zero node, and the third non-zero node in the third layer.
  • the non-zero child nodes of the first three non-zero nodes do not include duplicate points.
  • the number of encoded points corresponding to the i-th non-zero child node, 5 is determined as the second parameter corresponding to the i-th non-zero child node.
  • Mode 3 If the first parameter is greater than the second parameter and the i-th non-zero child node is not the last voxel node of the octree, the duplicate point information of the i-th non-zero child node is encoded.
  • the duplicate point information of the i-th non-zero child node is encoded.
  • the point cloud includes 10 points
  • the current node is the second non-zero node in the third layer in Figure 8
  • the N-1th layer of the octree where the current node is located includes 4 non-zero nodes
  • the placeholder information of the current node is 01010100
  • the current node includes 3 non-zero child nodes.
  • the i-th non-zero child node is the second non-zero child node of the current node
  • the geometric position information of the three non-zero child nodes of the current node can be determined, so the geometric position information of the three non-zero child nodes included in the current node has been encoded.
  • each non-zero node located before the current node in the third layer is the first non-zero node in the third layer.
  • the placeholder information of the first non-zero node is 01010101
  • the third non-zero child node of the current node includes 1 repeated point
  • the point cloud does not use IDCM
  • the number of encoded points corresponding to the i-th non-zero child node, 5 is determined as the second parameter corresponding to the i-th non-zero child node.
  • the duplicate point information of the i-th non-zero child node is encoded.
  • the first parameter corresponding to the current node is determined, and the second parameter corresponding to the i-th non-zero child node of the current node is determined. Based on the first parameter and the second parameter, it is determined whether to encode the repeated point information of the i-th non-zero child node. For example, if the first parameter is equal to the second parameter, the repeated point information of the i-th non-zero child node is skipped, thereby reducing the encoding complexity of the point cloud, saving encoding time, and improving the encoding efficiency.
  • the following introduces the process of determining the first parameter corresponding to the current node in situation 2 and the geometric encoding process of the current node based on the first parameter.
  • the above S201 includes the following steps:
  • the number of encoded repeated points corresponding to the i-th non-zero child node is first determined, where the encoded repeated points corresponding to the i-th non-zero child node can be understood as the repeated points that have been encoded by the encoding end before encoding the repeated point information of the i-th non-zero child node.
  • the encoder uses dupCount to record the number of repeated points that have been encoded, where dupCount is initialized to 0.
  • the encoding end determines the total number of encoded repeated points corresponding to the i-th non-zero child node, and determines the total number of encoded repeated points corresponding to the i-th non-zero child node as the first parameter, and then performs geometric encoding on the current node based on the first parameter.
  • determining the total number of encoded repeated points corresponding to the i-th non-zero child node in the above S201-B1 includes:
  • S201-B12. Determine the total number of encoded repeated points corresponding to the i-th non-zero child node based on the sum of the first number of encoded repeated points.
  • the i-th non-zero child node is not the first non-zero leaf node in the octree
  • the sum of the number of encoded points included in each non-zero child node located before the i-th non-zero child node in the octree is determined.
  • the encoded point is recorded as the first encoded point.
  • the placeholder information of the current node is 010101010
  • the i-th non-zero child node is the third non-zero child node in the current node
  • the total number of encoded repeated points corresponding to the i-th non-zero child node is determined based on the sum of the first number of encoded repeated points.
  • the implementation methods of determining the total number of encoded repeated points corresponding to the i-th non-zero child node based on the sum of the first number of encoded repeated points in the above S201-B12 include at least the following two methods:
  • Method 1 If the point cloud adopts IDCM, the sum of the second number of encoded repeated points included in the first node using IDCM in the octree is determined; the sum of the first number of encoded repeated points and the sum of the second number of encoded repeated points are added to obtain the total number of encoded repeated points corresponding to the i-th non-zero child node.
  • Method 2 If the point cloud does not use IDCM, the sum of the first number of encoded repeated points determined above is directly determined as the total number of encoded repeated points corresponding to the i-th non-zero child node.
  • the above step S202 is executed to perform geometric encoding on the current node based on the first parameter.
  • the geometric encoding of the current node based on the first parameter in S202 includes the following steps S202-B1 and S202-B2:
  • S202-B2 Determine whether to encode the duplicate point information of the i-th non-zero child node based on the total number of duplicate points in the point cloud and the total number of encoded duplicate points corresponding to the i-th non-zero child node.
  • the encoder determines whether to encode the repeated point information of the i-th non-zero child node of the current node, based on the above steps, the number of encoded repeated points corresponding to the i-th non-zero child node is determined as the first parameter. Then, the total number of repeated points in the point cloud is determined, and the number of encoded repeated points corresponding to the i-th non-zero child node is compared with the number of repeated points in the point cloud to determine whether the i-th non-zero child node includes repeated points, and then determine whether to encode the repeated point information of the i-th non-zero child node.
  • the encoder determines the number of non-zero voxel nodes in the last layer of the octree through the placeholder information of each non-zero node in the N-1th layer of the octree.
  • the encoding end determines the total number of duplicate points in the point cloud based on the above method 1 or method 2, it determines whether to encode the duplicate point information of the i-th non-zero child node based on the total number of duplicate points in the point cloud and the total number of encoded duplicate points corresponding to the i-th non-zero child node.
  • the encoding end encodes the duplicate point information of the i-th non-zero child node.
  • the total number of encoded duplicate points corresponding to the i-th non-zero child node is equal to the total number of duplicate points in the point cloud, it means that the duplicate points in the point cloud have been encoded, and the i-th non-zero child node and the leaf nodes after the i-th non-zero child node do not include duplicate points. Therefore, skipping the encoding of the duplicate point information of the i-th non-zero child node reduces the encoding complexity of the point cloud, saves encoding time, and improves encoding efficiency.
  • the encoding end determines the first parameter corresponding to the current node in the octree-based point cloud encoding based on the above situation 1 and situation 2, and encodes the current node based on the first parameter.
  • the above embodiment takes the case where the current node is the first non-zero node in the N-1th layer of the octree as an example to introduce the encoding process of the current node.
  • the encoding method provided in the embodiment of the present application can also be used to encode the current node. For example, the difference between the total number of points in the point cloud and the non-zero nodes included in the Nth layer is determined as the first parameter corresponding to the current node. Based on the first parameter, it is determined whether the current node includes duplicate points.
  • the current node includes at least one point in the point cloud, and for the jth point in the current node, the number of encoded points corresponding to the jth point is determined, wherein the method for determining the number of encoded points corresponding to the jth point is substantially the same as the method for determining the number of encoded points corresponding to the i-th non-zero node, and the non-zero subnodes included in the node are replaced with the points included in the node.
  • the encoding end determines the second parameter corresponding to the jth point based on the number of encoded points corresponding to the jth point, and then determines whether the jth point includes duplicate points based on the second parameter corresponding to the jth point and the first parameter corresponding to the current node. For example, if the first parameter is equal to the second parameter, it is determined that the jth point does not include duplicate points, and then the encoding of the duplicate point information of the jth point is skipped.
  • the encoding of the duplicate point information of the jth point is skipped, and the difference between the first parameter and the second parameter is determined as the number of duplicate points of the jth point.
  • the first parameter is greater than the second parameter, and the j-th point is not the last point in the N-th layer, the repeated point information of the j-th point is encoded.
  • the point cloud geometry encoding method provided by the embodiment of the present application, in the point cloud encoding based on octree, when encoding the current node of the N-1th layer in the octree, first determines the first parameter corresponding to the current node, the first parameter is used to determine whether at least one non-zero child node of the current node includes duplicate points, the current node is a non-zero node of the N-1th layer in the octree of the point cloud, N is the total number of layers of the octree, and then based on the first parameter, the current node is geometrically encoded.
  • the encoding of the duplicate point information of the i-th non-zero child node is skipped, thereby reducing the encoding complexity of the point cloud, saving encoding time, and thus improving the encoding efficiency.
  • FIGS. 6 to 9 are merely examples of the present application and should not be construed as limiting the present application.
  • the size of the sequence number of each process does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application.
  • the term "and/or” is merely a description of the association relationship of associated objects, indicating that three relationships may exist. Specifically, A and/or B can represent: A exists alone, A and B exist at the same time, and B exists alone.
  • the character "/" in this article generally indicates that the associated objects before and after are in an "or" relationship.
  • FIG. 10 is a schematic block diagram of a point cloud decoding device provided in an embodiment of the present application.
  • the point cloud decoding device 10 may include:
  • a determination unit 11 configured to determine a first parameter corresponding to a current node, wherein the first parameter is used to determine whether to decode duplicate point information corresponding to the current node, wherein the current node is a non-zero node in the octree of the point cloud;
  • the decoding unit 12 is used to perform geometric decoding on the current node based on the first parameter.
  • the current node is a non-zero node in the N-1th layer of the octree
  • N is the total number of layers of the octree
  • N is a positive integer greater than 1
  • the determination unit 11 is specifically used to determine the total number of points in the point cloud and the number of non-zero nodes in the N-1th layer; based on the total number of points in the point cloud and the number of non-zero nodes in the N-1th layer, determine the first parameter.
  • the determination unit 11 is specifically configured to determine the difference between the total number of points in the point cloud and the number of non-zero nodes in the N-1th layer as the first parameter.
  • the decoding unit 12 is specifically used to determine, for the i-th non-zero child node of the current node, a second parameter corresponding to the i-th non-zero child node, wherein the second parameter is used to indicate the number of points whose geometric positions in the point cloud have been decoded when decoding the i-th non-zero child node, and i is a positive integer; based on the first parameter and the second parameter, determine whether to decode the duplicate point information of the i-th non-zero child node.
  • the decoding unit 12 is specifically used to determine the number of decoded points corresponding to the i-th non-zero subnode in the point cloud; based on the number of decoded points corresponding to the i-th non-zero subnode in the point cloud, determine the second parameter corresponding to the i-th non-zero subnode.
  • the decoding unit 12 is specifically used to determine the number of non-zero child nodes of the current node if the current node is the first non-zero node in the N-1th layer; based on the number of non-zero child nodes of the current node, determine the number of decoded points corresponding to the i-th non-zero child node.
  • the decoding unit 12 is specifically used to determine the number of decoded points corresponding to the i-th non-zero child node as the value obtained by subtracting 1 from the number of non-zero child nodes included in the current node if the i-th non-zero child node is the first non-zero child node of the current node.
  • the decoding unit 12 is specifically used to obtain the sum of the first number of repeated points included in the non-zero child nodes in the current node that are located before the i-th non-zero child node if the i-th non-zero child node is not the first non-zero child node of the current node; subtract 1 from the number of non-zero child nodes included in the current node, and then add the result to the sum of the first number of repeated points to obtain the number of decoded points corresponding to the i-th non-zero child node.
  • the decoding unit 12 is specifically used to determine the number of decoded points corresponding to each non-zero node in the N-1 layer before the current node if the current node is not the first non-zero node in the N-1 layer; determine the number of non-zero child nodes of the current node; and determine the number of decoded points corresponding to the i-th non-zero child node based on the number of decoded points corresponding to each non-zero node in the N-1 layer before the current node and the number of non-zero child nodes of the current node.
  • the decoding unit 12 is specifically used to obtain, for a non-zero node among the non-zero nodes, the number of non-zero child nodes of the non-zero node and the number of repeated points included in the non-zero child node; subtract 1 from the number of non-zero child nodes of the non-zero node, and add the result to the sum of the number of repeated points included in the non-zero child nodes of the non-zero node to obtain the number of decoded points corresponding to the non-zero node.
  • the decoding unit 12 is specifically used to add the number of decoded points corresponding to each non-zero node located before the current node in the N-1th layer to obtain a first sum; based on the first sum and the number of non-zero child nodes of the current node, determine the number of decoded points corresponding to the i-th non-zero child node.
  • the decoding unit 12 is specifically used to add the first sum value and the number of non-zero child nodes included in the current node to obtain a second sum value if the i-th non-zero child node is the first non-zero child node of the current node; and subtract 1 from the second sum value to obtain the number of decoded points corresponding to the i-th non-zero child node.
  • the decoding unit 12 is specifically used to add the first sum value and the number of non-zero child nodes included in the current node to obtain a second sum value if the i-th non-zero child node is not the first non-zero child node of the current node; subtract 1 from the second sum value to obtain a third sum value; obtain the sum of the first number of repeated points included in the non-zero child nodes in the current node that are located before the i-th non-zero child node, and add the third sum value to the sum of the first number of repeated points to obtain the number of decoded points corresponding to the i-th non-zero child node.
  • the decoding unit 12 is specifically used to determine the number of decoded points corresponding to the i-th non-zero sub-node as the second parameter corresponding to the i-th non-zero sub-node.
  • the decoding unit 12 is specifically used to determine the number of points included in the decoded first node in the octree, where the first node is a node in the octree that adopts IDCM; based on the number of decoded points corresponding to the i-th non-zero child node and the number of points included in the first node, determine the second parameter corresponding to the i-th non-zero child node.
  • the decoding unit 12 is specifically used to determine the sum of the number of decoded points corresponding to the i-th non-zero child node and the number of points included in the first node as the second parameter corresponding to the i-th non-zero child node if the first node is not a node in the N-1th layer.
  • the decoding unit 12 is specifically used to determine, if the first node is a node in the N-1th layer, the value obtained by subtracting 1 from the sum of the number of decoded points corresponding to the i-th non-zero child node and the number of points included in the first node as the second parameter corresponding to the i-th non-zero child node.
  • the decoding unit 12 is specifically configured to skip decoding repeated point information of the i-th non-zero child node if the first parameter is equal to the second parameter.
  • the decoding unit 12 is specifically used to skip decoding the repeated point information of the i-th non-zero child node if the first parameter is greater than the second parameter and the i-th non-zero child node is the last voxel node of the octree, and determine the difference between the first parameter and the second parameter as the number of repeated points included in the i-th non-zero child node.
  • the decoding unit 12 is specifically used to decode the duplicate point information of the i-th non-zero child node if the first parameter is greater than the second parameter and the i-th non-zero child node is not the last voxel node of the octree.
  • the determination unit 11 is specifically used to determine the total number of decoded repeated points corresponding to the i-th non-zero child node in the current node, where i is a positive integer; and determine the total number of decoded repeated points corresponding to the i-th non-zero child node as the first parameter.
  • the determination unit 11 is specifically used to determine the sum of the first number of decoded repeated points included in each non-zero child node located before the i-th non-zero child node in the octree; based on the sum of the first number of decoded repeated points, determine the total number of decoded repeated points corresponding to the i-th non-zero child node.
  • the determination unit 11 is specifically used to determine the sum of the second number of decoded repeated points included in the first node using IDCM in the octree; the sum of the first number of decoded repeated points and the sum of the second number of decoded repeated points are added to obtain the total number of decoded repeated points corresponding to the i-th non-zero child node.
  • the determination unit 11 is specifically used to determine the sum of the first number of decoded repeated points as the total number of decoded repeated points corresponding to the i-th non-zero child node.
  • the decoding unit 12 is specifically used to determine the total number of repeated points in the point cloud; based on the total number of repeated points in the point cloud and the total number of decoded repeated points corresponding to the i-th non-zero child node, determine whether to decode the repeated point information of the i-th non-zero child node.
  • the decoding unit 12 is specifically used to determine the total number of points in the point cloud and the total number of non-zero voxel nodes in the octree; and the difference between the total number of points in the point cloud and the total number of non-zero voxel nodes in the octree is determined as the total number of repeated points in the point cloud.
  • the decoding unit 12 is specifically configured to skip decoding the repeated point information of the i-th non-zero child node if the total number of decoded repeated points corresponding to the i-th non-zero child node is equal to the total number of repeated points of the point cloud.
  • the decoding unit 12 is specifically used to skip decoding the duplicate point information of the i-th non-zero child node if the total number of decoded duplicate points corresponding to the i-th non-zero child node is less than the total number of duplicate points of the point cloud, and the i-th non-zero child node is the last voxel node of the octree, and determine the difference between the total number of duplicate points of the point cloud and the total number of decoded duplicate points corresponding to the i-th non-zero child node as the number of duplicate points included in the i-th non-zero child node.
  • the decoding unit 12 is specifically used to decode the duplicate point information of the i-th non-zero child node if the total number of decoded duplicate points corresponding to the i-th non-zero child node is less than the total number of duplicate points of the point cloud, and the i-th non-zero child node is not the last voxel node of the octree.
  • the repeated point information includes the number of repeated points.
  • the decoding unit 12 is specifically configured to decode the geometric code stream of the point cloud to obtain the total number of points of the point cloud.
  • the decoding unit 12 is specifically configured to decode the geometric data unit of the point cloud to obtain the total number of points of the point cloud.
  • the decoding unit 12 is specifically used to decode the geometric data unit to obtain a first value, where the first value is the total number of points in the point cloud minus one; and add one to the first value to obtain the total number of points in the point cloud.
  • the decoding unit 12 is specifically used to decode the geometric code stream of the point cloud to obtain the placeholder information of the current node; based on the placeholder information, obtain the number of non-zero child nodes included in the current node.
  • the device embodiment and the method embodiment may correspond to each other, and similar descriptions may refer to the method embodiment. To avoid repetition, no further description is given here.
  • the point cloud decoding device 10 shown in FIG. 10 may correspond to the corresponding subject in the point cloud decoding method of the embodiment of the present application, and the aforementioned and other operations and/or functions of each unit in the point cloud decoding device 10 are respectively for implementing the corresponding processes in the point cloud decoding method, and for the sake of brevity, no further description is given here.
  • FIG. 11 is a schematic block diagram of a point cloud encoding device provided in an embodiment of the present application.
  • the point cloud encoding device 20 includes:
  • a determination unit 21 is used to determine a first parameter corresponding to a current node, where the first parameter is used to determine whether to decode repeated point information corresponding to the current node, and the current node is a non-zero node in the octree of the point cloud; an encoding unit 22 is used to geometrically encode the current node based on the first parameter.
  • the current node is a non-zero node in the N-1th layer of the octree
  • N is the total number of layers of the octree
  • N is a positive integer greater than 1
  • the determination unit 21 is specifically used to determine the total number of points in the point cloud and the number of non-zero nodes in the N-1th layer; based on the total number of points in the point cloud and the number of non-zero nodes in the N-1th layer, determine the first parameter.
  • the determination unit 21 is specifically configured to determine the difference between the total number of points in the point cloud and the number of non-zero nodes in the N-1th layer as the first parameter.
  • the encoding unit 22 is specifically used to determine, for the i-th non-zero child node of the current node, a second parameter corresponding to the i-th non-zero child node, wherein the second parameter is used to indicate the number of points whose geometric positions in the point cloud have been encoded when encoding the i-th non-zero child node; based on the first parameter and the second parameter, determine whether to encode the repeated point information of the i-th non-zero child node.
  • the encoding unit 22 is specifically used to determine the number of encoded points corresponding to the i-th non-zero subnode in the point cloud; based on the number of encoded points corresponding to the i-th non-zero subnode in the point cloud, determine the second parameter corresponding to the i-th non-zero subnode.
  • the encoding unit 22 is specifically used to determine the number of non-zero child nodes of the current node if the current node is the first non-zero node in the N-1th layer; based on the number of non-zero child nodes of the current node, determine the number of encoded points corresponding to the i-th non-zero child node.
  • the encoding unit 22 is specifically used to reduce the number of non-zero child nodes included in the current node by 1 if the i-th non-zero child node is the first non-zero child node of the current node, and determine the number of encoded points corresponding to the i-th non-zero child node.
  • the encoding unit 22 is specifically used to obtain the sum of the first number of repeated points included in the child nodes before the i-th non-zero child node in the current node if the i-th non-zero child node is not the first non-zero child node of the current node; subtract 1 from the number of non-zero child nodes included in the current node, and then add the result to the sum of the first number of repeated points to obtain the number of encoded points corresponding to the i-th non-zero child node.
  • the encoding unit 22 is specifically used to determine the number of encoded points corresponding to each non-zero node in the N-1 layer before the current node if the current node is not the first non-zero node in the N-1 layer; determine the number of non-zero child nodes of the current node; based on the number of encoded points corresponding to each non-zero node in the N-1 layer before the current node and the number of non-zero child nodes of the current node, determine the number of encoded points corresponding to the i-th non-zero child node.
  • the encoding unit 22 is specifically used to obtain, for a non-zero node among the non-zero nodes, the number of non-zero child nodes of the non-zero node and the number of repeated points included in the non-zero child node; subtract 1 from the number of non-zero child nodes of the non-zero node, and add the result to the sum of the number of repeated points included in the non-zero child nodes of the non-zero node to obtain the number of encoded points corresponding to the non-zero node.
  • the encoding unit 22 is specifically used to add the number of encoded points corresponding to each non-zero node in the N-1th layer that is located before the current node to obtain a first sum; based on the first sum and the number of non-zero child nodes of the current node, determine the number of encoded points corresponding to the i-th non-zero child node.
  • the encoding unit 22 is specifically used to add the first sum value and the number of non-zero child nodes included in the current node to obtain a second sum value if the i-th non-zero child node is the first non-zero child node of the current node; and subtract 1 from the second sum value to obtain the number of encoded points corresponding to the i-th non-zero child node.
  • the encoding unit 22 is specifically used to add the first sum value and the number of non-zero child nodes included in the current node to obtain a second sum value if the i-th non-zero child node is not the first non-zero child node of the current node; subtract 1 from the second sum value to obtain a third sum value; obtain the sum of the first number of repeated points included in the non-zero child nodes in the current node that are located before the i-th non-zero child node, and add the third sum value to the sum of the first number of repeated points to obtain the number of encoded points corresponding to the i-th non-zero child node.
  • the encoding unit 22 is specifically used to determine the number of encoded points corresponding to the i-th non-zero child node as the second parameter corresponding to the i-th non-zero child node.
  • the encoding unit 22 is specifically used to determine the number of points included in the first encoded node in the octree, where the first node is a node in the octree that adopts IDCM; based on the number of encoded points corresponding to the i-th non-zero child node and the number of points included in the first node, determine the second parameter corresponding to the i-th non-zero child node.
  • the encoding unit 22 is specifically used to determine the sum of the number of encoded points corresponding to the i-th non-zero child node and the number of points included in the first node as the second parameter corresponding to the i-th non-zero child node if the first node is not a node in the N-1th layer.
  • the encoding unit 22 is specifically used to determine, if the first node is a node in the N-1th layer, the value obtained by subtracting 1 from the sum of the number of encoded points corresponding to the i-th non-zero child node and the number of points included in the first node as the second parameter corresponding to the i-th non-zero child node.
  • the encoding unit 22 is specifically configured to encode the repeated point information of the i-th non-zero child node if the first parameter is greater than the second parameter.
  • the encoding unit 22 is specifically configured to skip encoding repeated point information of the i-th non-zero child node if the first parameter is equal to the second parameter.
  • the encoding unit 22 is specifically used to skip encoding the repeated point information of the i-th non-zero child node if the first parameter is greater than the second parameter and the i-th non-zero child node is the last voxel node of the octree, and determine the difference between the first parameter and the second parameter as the number of repeated points included in the i-th non-zero child node.
  • the encoding unit 22 is specifically used to encode the duplicate point information of the i-th non-zero child node if the first parameter is greater than the second parameter and the i-th non-zero child node is not the last voxel node of the octree.
  • the determination unit 21 is specifically used to determine the total number of encoded repeated points corresponding to the i-th non-zero child node in the current node, where i is a positive integer; and determine the total number of encoded repeated points corresponding to the i-th non-zero child node as the first parameter.
  • the determination unit 21 is specifically used to determine the sum of the first number of encoded repeated points included in each non-zero child node located before the i-th non-zero child node in the octree; based on the sum of the first number of encoded repeated points, determine the total number of encoded repeated points corresponding to the i-th non-zero child node.
  • the determination unit 21 is specifically used to determine the sum of the second number of encoded repeated points included in the first node using IDCM in the octree; the sum of the first number of encoded repeated points and the sum of the second number of encoded repeated points are added to obtain the total number of encoded repeated points corresponding to the i-th non-zero child node.
  • the determination unit 21 is specifically used to determine the sum of the first number of encoded repeated points as the total number of encoded repeated points corresponding to the i-th non-zero child node.
  • the encoding unit 22 is specifically used to determine the total number of repeated points in the point cloud; based on the total number of repeated points in the point cloud and the total number of encoded repeated points corresponding to the i-th non-zero child node, determine whether to encode the repeated point information of the i-th non-zero child node.
  • the encoding unit 22 is specifically used to determine the total number of points in the point cloud and the total number of non-zero voxel nodes in the octree; and the difference between the total number of points in the point cloud and the total number of non-zero voxel nodes in the octree is determined as the total number of repeated points in the point cloud.
  • the encoding unit 22 is specifically configured to skip encoding the repeated point information of the i-th non-zero child node if the total number of encoded repeated points corresponding to the i-th non-zero child node is equal to the total number of repeated points of the point cloud.
  • the encoding unit 22 is specifically used to skip encoding the duplicate point information of the i-th non-zero child node if the total number of encoded duplicate points corresponding to the i-th non-zero child node is less than the total number of duplicate points of the point cloud, and the i-th non-zero child node is the last voxel node of the octree, and determine the difference between the total number of duplicate points of the point cloud and the total number of encoded duplicate points corresponding to the i-th non-zero child node as the number of duplicate points included in the i-th non-zero child node.
  • the encoding unit 22 is specifically used to encode the duplicate point information of the i-th non-zero child node if the total number of encoded duplicate points corresponding to the i-th non-zero child node is less than the total number of duplicate points of the point cloud, and the i-th non-zero child node is not the last voxel node of the octree.
  • the repeated point information includes the number of repeated points.
  • the encoding unit 22 is further configured to write the total number of points of the point cloud into the geometric code stream of the point cloud.
  • the encoding unit 22 is specifically configured to write the total number of points of the point cloud into the geometric data unit of the point cloud.
  • the encoding unit 22 is specifically configured to reduce the total number of points of the point cloud by one to obtain a first value; and write the first value into the geometric data unit.
  • the device embodiment and the method embodiment may correspond to each other, and similar descriptions may refer to the method embodiment. To avoid repetition, it will not be repeated here.
  • the point cloud encoding device 20 shown in Figure 11 may correspond to the corresponding subject in the point cloud encoding method of the embodiment of the present application, and the aforementioned and other operations and/or functions of each unit in the point cloud encoding device 20 are respectively for implementing the corresponding processes in the point cloud encoding method. For the sake of brevity, they will not be repeated here.
  • the functional unit can be implemented in hardware form, can be implemented by instructions in software form, and can also be implemented by a combination of hardware and software units.
  • the steps of the method embodiment in the embodiment of the present application can be completed by the hardware integrated logic circuit and/or software form instructions in the processor, and the steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to perform, or a combination of hardware and software units in the decoding processor to perform.
  • the software unit can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, a register, etc.
  • the storage medium is located in a memory, and the processor reads the information in the memory, and completes the steps in the above method embodiment in conjunction with its hardware.
  • FIG. 12 is a schematic block diagram of an electronic device provided in an embodiment of the present application.
  • the electronic device 30 may be a point cloud decoding device or a point cloud encoding device as described in an embodiment of the present application, and the electronic device 30 may include:
  • the memory 33 and the processor 32, the memory 33 is used to store the computer program 34 and transmit the program code 34 to the processor 32.
  • the processor 32 can call and run the computer program 34 from the memory 33 to implement the method in the embodiment of the present application.
  • the processor 32 may be configured to execute the steps in the method 200 according to the instructions in the computer program 34 .
  • the processor 32 may include but is not limited to:
  • DSP digital signal processor
  • ASIC application-specific integrated circuit
  • FPGA field programmable gate array
  • the memory 33 includes but is not limited to:
  • Non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM) or flash memory.
  • the volatile memory can be random access memory (RAM), which is used as an external cache.
  • RAM random access memory
  • SRAM static RAM
  • DRAM dynamic RAM
  • SDRAM synchronous DRAM
  • DDR SDRAM double data rate synchronous dynamic random access memory
  • ESDRAM enhanced synchronous dynamic random access memory
  • SLDRAM synchronous link DRAM
  • Direct Rambus RAM Direct Rambus RAM, DR RAM
  • the computer program 34 may be divided into one or more units, which are stored in the memory 33 and executed by the processor 32 to complete the method provided by the present application.
  • the one or more units may be a series of computer program instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer program 34 in the electronic device 30.
  • the electronic device 30 may further include:
  • the transceiver 33 may be connected to the processor 32 or the memory 33 .
  • the processor 32 may control the transceiver 33 to communicate with other devices, specifically, to send information or data to other devices, or to receive information or data sent by other devices.
  • the transceiver 33 may include a transmitter and a receiver.
  • the transceiver 33 may further include an antenna, and the number of antennas may be one or more.
  • bus system includes not only a data bus but also a power bus, a control bus and a status signal bus.
  • FIG. 13 is a schematic block diagram of a point cloud encoding and decoding system provided in an embodiment of the present application.
  • the point cloud encoding and decoding system 40 may include: a point cloud encoder 41 and a point cloud decoder 42, wherein the point cloud encoder 41 is used to execute the point cloud encoding method involved in the embodiment of the present application, and the point cloud decoder 42 is used to execute the point cloud decoding method involved in the embodiment of the present application.
  • the present application also provides a code stream, which is generated according to the above encoding method.
  • the present application also provides a computer storage medium on which a computer program is stored, and when the computer program is executed by a computer, the computer can perform the method of the above method embodiment.
  • the present application embodiment also provides a computer program product containing instructions, and when the instructions are executed by a computer, the computer can perform the method of the above method embodiment.
  • the computer program product includes one or more computer instructions.
  • the computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.
  • the computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium.
  • the computer instructions can be transmitted from a website, computer, server or data center to another website, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode.
  • the computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated.
  • the available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a digital video disc (digital video disc, DVD)), or a semiconductor medium (e.g., a solid state drive (solid state disk, SSD)), etc.
  • a magnetic medium e.g., a floppy disk, a hard disk, a tape
  • an optical medium e.g., a digital video disc (digital video disc, DVD)
  • a semiconductor medium e.g., a solid state drive (solid state disk, SSD)
  • the disclosed systems, devices and methods can be implemented in other ways.
  • the device embodiments described above are only schematic.
  • the division of the unit is only a logical function division.
  • Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
  • each functional unit in each embodiment of the present application may be integrated into a processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

The present application provides a point cloud encoding and decoding method and apparatus, a device, and a storage medium. The method comprises: in octree-based point cloud decoding, when decoding a current node of an N-1 layer in the octree, first determining a first parameter corresponding to the current node, the first parameter being used for determining whether at least one non-zero sub-node of the current node comprises a repeated point, wherein the current node is a non-zero node of the N-1 layer in the octree of the point cloud and N is the total number of layers of the octree, and then, based on the first parameter, performing geometric decoding on the current node. For example, when it is determined on the basis of the first parameter that an ith non-zero sub-node of the current node does not comprise a repeated point, then skipping the decoding of the repeated point information of the ith non-zero sub-node, thereby reducing point cloud decoding complexity, saving decoding time, and improving decoding efficiency.

Description

点云编解码方法、装置、设备及存储介质Point cloud encoding and decoding method, device, equipment and storage medium 技术领域Technical Field
本申请涉及点云技术领域,尤其涉及一种点云编解码方法、装置、设备及存储介质。The present application relates to the field of point cloud technology, and in particular to a point cloud encoding and decoding method, device, equipment and storage medium.
背景技术Background technique
通过采集设备对物体表面进行采集,形成点云数据,点云数据包括几十万甚至更多的点。在视频制作过程中,将点云数据以点云媒体文件的形式在点云编码设备和点云解码设备之间传输。但是,如此庞大的点给传输带来了挑战,因此,点云编码设备需要对点云数据进行压缩后传输。The surface of the object is collected by the acquisition device to form point cloud data, which includes hundreds of thousands or even more points. In the video production process, the point cloud data is transmitted between the point cloud encoding device and the point cloud decoding device in the form of point cloud media files. However, such a large number of points brings challenges to transmission, so the point cloud encoding device needs to compress the point cloud data before transmission.
点云的压缩也称为点云的编码,在点云编码过程中,采用不同的编码模型,将点云中的点对应到节点中,对节点进行编码,其中有些节点包括重复点。目前的编解码方式,例如在基于八叉树的点云编解码方式中,需要编解码该八叉树的叶子节点中每一个非零叶子节点的重复点信息,进而降低了点云的编解码效率。The compression of point clouds is also called the encoding of point clouds. In the process of point cloud encoding, different encoding models are used to correspond the points in the point cloud to nodes and encode the nodes, some of which include duplicate points. The current encoding and decoding methods, such as the point cloud encoding and decoding method based on octree, need to encode and decode the duplicate point information of each non-zero leaf node in the leaf node of the octree, thereby reducing the encoding and decoding efficiency of the point cloud.
发明内容Summary of the invention
本申请实施例提供了一种点云编解码方法、装置、设备及存储介质,降低基于八叉树的点云编解码的复杂度、节约编解码时间,进而提升点云的编解码效率。The embodiments of the present application provide a point cloud encoding and decoding method, apparatus, device and storage medium, which reduce the complexity of octree-based point cloud encoding and decoding, save encoding and decoding time, and thus improve the encoding and decoding efficiency of the point cloud.
第一方面,本申请实施例提供一种点云解码方法,包括:In a first aspect, an embodiment of the present application provides a point cloud decoding method, comprising:
确定当前节点对应的第一参数,所述第一参数用于确定是否解码所述当前节点对应的重复点信息,所述当前节点为所述点云的八叉树中的一个非零节点;Determine a first parameter corresponding to a current node, where the first parameter is used to determine whether to decode duplicate point information corresponding to the current node, where the current node is a non-zero node in the octree of the point cloud;
基于所述第一参数,对所述当前节点进行几何解码。Based on the first parameter, geometric decoding is performed on the current node.
第二方面,本申请提供了一种点云编码方法,包括:In a second aspect, the present application provides a point cloud encoding method, comprising:
确定当前节点对应的第一参数,所述第一参数用于确定是否编码所述当前节点对应的重复点信息,所述当前节点为所述点云的八叉树中的一个非零节点;Determine a first parameter corresponding to a current node, where the first parameter is used to determine whether to encode duplicate point information corresponding to the current node, where the current node is a non-zero node in the octree of the point cloud;
基于所述第一参数,对所述当前节点进行几何编码。Based on the first parameter, geometric encoding is performed on the current node.
第三方面,本申请提供了一种点云解码装置,用于执行上述第一方面或其各实现方式中的方法。具体地,该装置包括用于执行上述第一方面或其各实现方式中的方法的功能单元。In a third aspect, the present application provides a point cloud decoding device for executing the method in the first aspect or its respective implementations. Specifically, the device includes a functional unit for executing the method in the first aspect or its respective implementations.
第四方面,本申请提供了一种点云编码装置,用于执行上述第二方面或其各实现方式中的方法。具体地,该装置包括用于执行上述第二方面或其各实现方式中的方法的功能单元。In a fourth aspect, the present application provides a point cloud encoding device for executing the method in the second aspect or its respective implementations. Specifically, the device includes a functional unit for executing the method in the second aspect or its respective implementations.
第五方面,提供了一种点云解码器,包括处理器和存储器。该存储器用于存储计算机程序,该处理器用于调用并运行该存储器中存储的计算机程序,以执行上述第一方面或其各实现方式中的方法。In a fifth aspect, a point cloud decoder is provided, comprising a processor and a memory. The memory is used to store a computer program, and the processor is used to call and run the computer program stored in the memory to execute the method in the first aspect or its implementation manners.
第六方面,提供了一种点云编码器,包括处理器和存储器。该存储器用于存储计算机程序,该处理器用于调用并运行该存储器中存储的计算机程序,以执行上述第二方面或其各实现方式中的方法。In a sixth aspect, a point cloud encoder is provided, comprising a processor and a memory. The memory is used to store a computer program, and the processor is used to call and run the computer program stored in the memory to execute the method in the second aspect or its respective implementations.
第七方面,提供了一种点云编解码系统,包括点云编码器和点云解码器。点云解码器用于执行上述第一方面或其各实现方式中的方法,点云编码器用于执行上述第二方面或其各实现方式中的方法。In a seventh aspect, a point cloud encoding and decoding system is provided, comprising a point cloud encoder and a point cloud decoder. The point cloud decoder is used to execute the method in the first aspect or its respective implementations, and the point cloud encoder is used to execute the method in the second aspect or its respective implementations.
第八方面,提供了一种芯片,用于实现上述第一方面至第二方面中的任一方面或其各实现方式中的方法。具体地,该芯片包括:处理器,用于从存储器中调用并运行计算机程序,使得安装有该芯片的设备执行如上述第一方面至第二方面中的任一方面或其各实现方式中的方法。In an eighth aspect, a chip is provided for implementing the method in any one of the first to second aspects or their respective implementations. Specifically, the chip includes: a processor for calling and running a computer program from a memory, so that a device equipped with the chip executes the method in any one of the first to second aspects or their respective implementations.
第九方面,提供了一种计算机可读存储介质,用于存储计算机程序,该计算机程序使得计算机执行上述第一方面至第二方面中的任一方面或其各实现方式中的方法。In a ninth aspect, a computer-readable storage medium is provided for storing a computer program, wherein the computer program enables a computer to execute the method of any one of the first to second aspects or any of their implementations.
第十方面,提供了一种计算机程序产品,包括计算机程序指令,该计算机程序指令使得计算机执行上述第一方面至第二方面中的任一方面或其各实现方式中的方法。In a tenth aspect, a computer program product is provided, comprising computer program instructions, which enable a computer to execute the method in any one of the first to second aspects or their respective implementations.
第十一方面,提供了一种计算机程序,当其在计算机上运行时,使得计算机执行上述第一方面至第二方面中的任一方面或其各实现方式中的方法。In an eleventh aspect, a computer program is provided, which, when executed on a computer, enables the computer to execute the method in any one of the first to second aspects or in each of their implementations.
第十二方面,提供了一种码流,码流是基于上述第二方面的方法生成的,可选的,上述码流包括第一参数和第二参数中的至少一个。In a twelfth aspect, a code stream is provided, which is generated based on the method of the second aspect. Optionally, the code stream includes at least one of the first parameter and the second parameter.
基于以上技术方案,在解码八叉树中第N-1层的当前节点时,首先确定当前节点对应的第一参数,该第一参数用于确定当前节点的至少一个非零子节点是否包括重复点,当前节点为点云的八叉树中第N-1层的一个非零节点,N为所述八叉树的总层数,进而基于该第一参数,对当前节点进行几何解码。例如,基于该第一参数确定当前节点的第i个非零子节点不包括重复点时,则跳过解码该第i个非零子节点的重复点信息,进而降低了点云的解码复杂度,节约了解码时间,进而提升了解码效率。Based on the above technical solution, when decoding the current node of the N-1th layer in the octree, first determine the first parameter corresponding to the current node, the first parameter is used to determine whether at least one non-zero child node of the current node includes duplicate points, the current node is a non-zero node of the N-1th layer in the octree of the point cloud, N is the total number of layers of the octree, and then based on the first parameter, perform geometric decoding on the current node. For example, when it is determined based on the first parameter that the i-th non-zero child node of the current node does not include duplicate points, skip decoding the duplicate point information of the i-th non-zero child node, thereby reducing the decoding complexity of the point cloud, saving decoding time, and improving decoding efficiency.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1A为点云示意图;FIG1A is a schematic diagram of a point cloud;
图1B为点云局部放大图;Figure 1B is a partial enlarged view of the point cloud;
图2为点云图像的六个观看角度示意图;FIG2 is a schematic diagram of six viewing angles of a point cloud image;
图3为本申请实施例涉及的一种点云编解码系统的示意性框图;FIG3 is a schematic block diagram of a point cloud encoding and decoding system according to an embodiment of the present application;
图4A是本申请实施例提供的点云编码器的示意性框图;FIG4A is a schematic block diagram of a point cloud encoder provided in an embodiment of the present application;
图4B是本申请实施例提供的点云解码器的示意性框图;FIG4B is a schematic block diagram of a point cloud decoder provided in an embodiment of the present application;
图5A至图5C为基于三角面片的几何信息编码示意图;5A to 5C are schematic diagrams of geometric information encoding based on triangular facets;
图6为本申请一实施例提供的点云解码方法流程示意图;FIG6 is a schematic diagram of a point cloud decoding method flow chart provided in an embodiment of the present application;
图7为一种八叉树划分示意图;FIG7 is a schematic diagram of an octree partition;
图8为本申请实施例涉及的一种八叉树示意图;FIG8 is a schematic diagram of an octree involved in an embodiment of the present application;
图9为本申请一实施例提供的点云编码方法流程示意图;FIG9 is a schematic diagram of a point cloud encoding method flow chart provided by an embodiment of the present application;
图10是本申请实施例提供的点云解码装置的示意性框图;FIG10 is a schematic block diagram of a point cloud decoding device provided in an embodiment of the present application;
图11是本申请实施例提供的点云编码装置的示意性框图;FIG11 is a schematic block diagram of a point cloud encoding device provided in an embodiment of the present application;
图12是本申请实施例提供的电子设备的示意性框图;FIG12 is a schematic block diagram of an electronic device provided in an embodiment of the present application;
图13是本申请实施例提供的点云编解码系统的示意性框图。FIG. 13 is a schematic block diagram of a point cloud encoding and decoding system provided in an embodiment of the present application.
具体实施方式Detailed ways
本申请可应用于点云上采样技术领域,例如可以应用于点云压缩技术领域。The present application can be applied to the field of point cloud upsampling technology, for example, can be applied to the field of point cloud compression technology.
为了便于理解本申请的实施例,首先对本申请实施例涉及到的相关概念进行如下简单介绍:In order to facilitate understanding of the embodiments of the present application, the relevant concepts involved in the embodiments of the present application are briefly introduced as follows:
点云(Point Cloud)是指空间中一组无规则分布的、表达三维物体或三维场景的空间结构及表面属性的离散点集。图1A为三维点云图像示意图,图1B为图1A的局部放大图,由图1A和图1B可知,点云表面是由分布稠密的点所组成的。Point cloud refers to a set of irregularly distributed discrete points in space that express the spatial structure and surface properties of a three-dimensional object or three-dimensional scene. Figure 1A is a schematic diagram of a three-dimensional point cloud image, and Figure 1B is a partial enlarged view of Figure 1A. It can be seen from Figures 1A and 1B that the point cloud surface is composed of densely distributed points.
二维图像在每一个像素点均有信息表达,分布规则,因此不需要额外记录其位置信息;然而点云中的点在三维空间中的分布具有随机性和不规则性,因此需要记录每一个点在空间中的位置,才能完整地表达一幅点云。与二维图像类似,采集过程中每一个位置均有对应的属性信息。Two-dimensional images have information expressed at each pixel point, and the distribution is regular, so there is no need to record its position information; however, the distribution of points in the point cloud in three-dimensional space is random and irregular, so it is necessary to record the position of each point in space to fully express a point cloud. Similar to two-dimensional images, each position has corresponding attribute information during the acquisition process.
点云数据(Point Cloud Data)是点云的具体记录形式,点云中的点可以包括点的位置信息和点的属性信息。例如,点的位置信息可以是点的三维坐标信息。点的位置信息也可称为点的几何信息。例如,点的属性信息可包括颜色信息、反射率信息、法向量信息等等。颜色信息反映物体的色彩,反射率(reflectance)信息反映物体的表面材质。所述颜色信息可以是任意一种色彩空间上的信息。例如,所述颜色信息可以是(RGB)。再如,所述颜色信息可以是于亮度色度(YcbCr,YUV)信息。例如,Y表示明亮度(Luma),Cb(U)表示蓝色色差,Cr(V)表示红色,U和V表示为色度(Chroma)用于描述色差信息。例如,根据激光测量原理得到的点云,所述点云中的点可以包括点的三维坐标信息和点的激光反射强度(reflectance)。再如,根据摄影测量原理得到的点云,所述点云中的点可以可包括点的三维坐标信息和点的颜色信息。再如,结合激光测量和摄影测量原理得到点云,所述点云中的点可以可包括点的三维坐标信息、点的激光反射强度(reflectance)和点的颜色信息。如图2示出了一幅点云图像,其中,图2示出了点云图像的六个观看角度,表1示出了由文件头信息部分和数据部分组成的点云数据存储格式:Point cloud data is a specific record form of point cloud. Points in the point cloud may include the location information of the point and the attribute information of the point. For example, the location information of the point may be the three-dimensional coordinate information of the point. The location information of the point may also be called the geometric information of the point. For example, the attribute information of the point may include color information, reflectance information, normal vector information, etc. Color information reflects the color of an object, and reflectance information reflects the surface material of an object. The color information may be information in any color space. For example, the color information may be (RGB). For another example, the color information may be information about brightness and chromaticity (YcbCr, YUV). For example, Y represents brightness (Luma), Cb (U) represents blue color difference, Cr (V) represents red, and U and V represent chromaticity (Chroma) for describing color difference information. For example, according to the point cloud obtained by the laser measurement principle, the points in the point cloud may include the three-dimensional coordinate information of the point and the laser reflection intensity (reflectance) of the point. For another example, according to the point cloud obtained by the photogrammetry principle, the points in the point cloud may include the three-dimensional coordinate information of the point and the color information of the point. For another example, 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 laser reflection intensity (reflectance) of the point, and the color information of the point. FIG2 shows a point cloud image, where FIG2 shows six viewing angles of the point cloud image. Table 1 shows the point cloud data storage format composed of a file header information part and a data part:
表1Table 1
Figure PCTCN2022122113-appb-000001
Figure PCTCN2022122113-appb-000001
表1中,头信息包含了数据格式、数据表示类型、点云总点数、以及点云所表示的内容,例如,本例中的点云为“.ply”格式,由ASCII码表示,总点数为207242,每个点具有三维位置信息XYZ和三维颜色信息RGB。In Table 1, the header information includes the data format, data representation type, the total number of point cloud points, and the content represented by the point cloud. For example, the point cloud in this example is in the ".ply" format, represented by ASCII code, with a total number of 207242 points, and each point has three-dimensional position information XYZ and three-dimensional color information RGB.
点云可以灵活方便地表达三维物体或场景的空间结构及表面属性,并且由于点云通过直接对真实物体采样获得,在保证精度的前提下能提供极强的真实感,因而应用广泛,其范围包括虚拟现实游戏、计算机辅助设计、地理信息系统、自动导航系统、数字文化遗产、自由视点广播、三维沉浸远程呈现、生物组织器官三维重建等。Point clouds can flexibly and conveniently express the spatial structure and surface properties of three-dimensional objects or scenes. Point clouds are obtained by directly sampling real objects, so they can provide a strong sense of reality while ensuring accuracy. Therefore, they are widely used, including virtual reality games, computer-aided design, geographic information systems, automatic navigation systems, digital cultural heritage, free viewpoint broadcasting, three-dimensional immersive remote presentation, and three-dimensional reconstruction of biological tissues and organs.
点云数据的获取途径可以包括但不限于以下至少一种:(1)计算机设备生成。计算机设备可以根据虚拟三维物体及虚拟三维场景的生成点云数据。(2)3D(3-Dimension,三维)激光扫描获取。通过3D激光扫描可以获取静态现实世界三维物体或三维场景的点云数据,每秒可以获取百万级点云数据;(3)3D摄影测量获取。通过3D摄影设备(即一组摄像机或具有多个镜头和传感器的摄像机设备)对现实世界的视觉场景进行采集以获取现实世界的视觉场景的点云数据,通过3D摄影可以获得动态现实世界三维物体或三维场景的点云数据。(4)通过医学设备获取生物组织器官的点云数据。在医学领域可以通过磁共振成像(Magnetic Resonance Imaging,MRI)、电子计算机断层扫描(Computed Tomography,CT)、电磁定位信息等医学设备获取生物组织器官的点云数据。Point cloud data can be obtained by at least one of the following ways: (1) computer equipment generation. Computer equipment can generate point cloud data based on virtual three-dimensional objects and virtual three-dimensional scenes. (2) 3D (3-Dimension) laser scanning acquisition. 3D laser scanning can be used to obtain point cloud data of static real-world three-dimensional objects or three-dimensional scenes, and millions of point cloud data can be obtained per second; (3) 3D photogrammetry acquisition. The visual scene of the real world is collected by 3D photography equipment (i.e., a group of cameras or camera equipment with multiple lenses and sensors) to obtain point cloud data of the visual scene of the real world. 3D photography can be used to obtain point cloud data of dynamic real-world three-dimensional objects or three-dimensional scenes. (4) Point cloud data of biological tissues and organs can be obtained by medical equipment. In the medical field, point cloud data of biological tissues and organs can be obtained by medical equipment such as magnetic resonance imaging (MRI), computed tomography (CT), and electromagnetic positioning information.
点云可以按获取的途径分为:密集型点云和稀疏性点云。Point clouds can be divided into dense point clouds and sparse point clouds according to the way they are acquired.
点云按照数据的时序类型划分为:Point clouds are divided into the following types according to the time series of the data:
第一类静态点云:即物体是静止的,获取点云的设备也是静止的;The first type of static point cloud: the object is stationary, and the device that obtains the point cloud is also stationary;
第二类动态点云:物体是运动的,但获取点云的设备是静止的;The second type of dynamic point cloud: the object is moving, but the device that obtains the point cloud is stationary;
第三类动态获取点云:获取点云的设备是运动的。The third type of dynamic point cloud acquisition: the device that acquires the point cloud is moving.
按点云的用途分为两大类:Point clouds can be divided into two categories according to their uses:
类别一:机器感知点云,其可以用于自主导航系统、实时巡检系统、地理信息系统、视觉分拣机器人、抢险救灾机器人等场景;Category 1: Machine perception point cloud, which can be used in autonomous navigation systems, real-time inspection systems, geographic information systems, visual sorting robots, emergency rescue robots, etc.
类别二:人眼感知点云,其可以用于数字文化遗产、自由视点广播、三维沉浸通信、三维沉浸交互等点云应用场景。Category 2: Point cloud perceived by the human eye, which can be used in point cloud application scenarios such as digital cultural heritage, free viewpoint broadcasting, 3D immersive communication, and 3D immersive interaction.
上述点云获取技术降低了点云数据获取成本和时间周期,提高了数据的精度。点云数据获取方式的变革,使大量点云数据的获取成为可能,伴随着应用需求的增长,海量3D点云数据的处理遭遇存储空间和传输带宽限制的瓶颈。The above point cloud acquisition technology reduces the cost and time of point cloud data acquisition and improves the accuracy of data. The change in the point cloud data acquisition method makes it possible to acquire a large amount of point cloud data. With the growth of application demand, the processing of massive 3D point cloud data encounters bottlenecks of storage space and transmission bandwidth.
以帧率为30fps(帧每秒)的点云视频为例,每帧点云的点数为70万,每个点具有坐标信息xyz(float)和颜色信息RGB(uchar),则10s点云视频的数据量大约为0.7million·(4Byte·3+1Byte·3)·30fps·10s=3.15GB,而YUV采样格式为4:2:0,帧率为24fps的1280·720二维视频,其10s的数据量约为1280·720·12bit·24frames·10s≈0.33GB,10s的两视角3D视频的数据量约为0.33X2=0.66GB。由此可见,点云视频的数据量远超过相同时长的二维视频和三维视频的数据量。因此,为更好地实现数据管理,节省服务器存储空间,降低服务器与客户端之间的传输流量及传输时间,点云压缩成为促进点云产业发展的关键问题。Taking a point cloud video with a frame rate of 30fps (frames per second) as an example, the number of points in each point cloud frame is 700,000, and each point has coordinate information xyz (float) and color information RGB (uchar). The data volume of a 10s point cloud video is approximately 0.7 million (4Byte 3 + 1Byte 3) 30fps 10s = 3.15GB, while the YUV sampling format is 4:2:0, and the frame rate is 24fps. The 10s data volume of a 1280 720 two-dimensional video is approximately 1280 720 12bit 24frames 10s ≈ 0.33GB, and the data volume of a 10s two-view 3D video is approximately 0.33X2 = 0.66GB. It can be seen that the data volume of a point cloud video far exceeds that of a two-dimensional video and a three-dimensional video of the same length. Therefore, in order to better realize data management, save server storage space, and reduce the transmission traffic and transmission time between the server and the client, point cloud compression has become a key issue in promoting the development of the point cloud industry.
下面对点云编解码的相关知识进行介绍。The following is an introduction to the relevant knowledge of point cloud encoding and decoding.
图3为本申请实施例涉及的一种点云编解码系统的示意性框图。需要说明的是,图3只是一种示例,本申请实施例的点云编解码系统包括但不限于图3所示。如图3所示,该点云编解码系统100包含编码设备110和解码设备120。其中编码设备用于对点云数据进行编码(可以理解成压缩)产生码流,并将码流传输给解码设备。解码设备对编码设备编码产生的码流进行解码,得到解码后的点云数据。FIG3 is a schematic block diagram of a point cloud encoding and decoding system involved in an embodiment of the present application. It should be noted that FIG3 is only an example, and the point cloud encoding and decoding system of the embodiment of the present application includes but is not limited to that shown in FIG3. As shown in FIG3, the point cloud encoding and decoding system 100 includes an encoding device 110 and a decoding device 120. The encoding device is used to encode (which can be understood as compression) the point cloud data to generate a code stream, and transmit the code stream to the decoding device. The decoding device decodes the code stream generated by the encoding device to obtain decoded point cloud data.
本申请实施例的编码设备110可以理解为具有点云编码功能的设备,解码设备120可以理解为具有点云解码功能的设备,即本申请实施例对编码设备110和解码设备120包括更广泛的装置,例如包含智能手机、台式计算机、移动计算装置、笔记本(例如,膝上型)计算机、平板计算机、机顶盒、电视、相机、显示装置、数字媒体播放器、点云游戏控制台、车载计算机等。The encoding device 110 of the embodiment of the present application can be understood as a device with a point cloud encoding function, and the decoding device 120 can be understood as a device with a point cloud decoding function, that is, the embodiment of the present application includes a wider range of devices for the encoding device 110 and the decoding device 120, such as smartphones, desktop computers, mobile computing devices, notebook (e.g., laptop) computers, tablet computers, set-top boxes, televisions, cameras, display devices, digital media players, point cloud game consoles, vehicle-mounted computers, etc.
在一些实施例中,编码设备110可以经由信道130将编码后的点云数据(如码流)传输给解码设备120。信道130可以包括能够将编码后的点云数据从编码设备110传输到解码设备120的一个或多个媒体和/或装置。In some embodiments, the encoding device 110 may transmit the encoded point cloud data (such as a code stream) to the decoding device 120 via the channel 130. The channel 130 may include one or more media and/or devices capable of transmitting the encoded point cloud data from the encoding device 110 to the decoding device 120.
在一个实例中,信道130包括使编码设备110能够实时地将编码后的点云数据直接发射到解码设备120的一个或多个通信媒体。在此实例中,编码设备110可根据通信标准来调制编码后的点云数据,且将调制后的点云数据发射到解码设备120。其中通信媒体包含无线通信媒体,例如射频频谱,可选的,通信媒体还可以包含有线通信媒体,例如一根或多根物理传输线。In one example, the channel 130 includes one or more communication media that enable the encoding device 110 to transmit the encoded point cloud data directly to the decoding device 120 in real time. In this example, the encoding device 110 can modulate the encoded point cloud data according to the communication standard and transmit the modulated point cloud data to the decoding device 120. The communication medium includes a wireless communication medium, such as a radio frequency spectrum, and optionally, the communication medium may also include a wired communication medium, such as one or more physical transmission lines.
在另一实例中,信道130包括存储介质,该存储介质可以存储编码设备110编码后的点云数据。存储介质包含多种本地存取式数据存储介质,例如光盘、DVD、快闪存储器等。在该实例中,解码设备120可从该存储介质中获取编码后的点云数据。In another example, the channel 130 includes a storage medium, which can store the point cloud data encoded by the encoding device 110. The storage medium includes a variety of locally accessible data storage media, such as optical disks, DVDs, flash memories, etc. In this example, the decoding device 120 can obtain the encoded point cloud data from the storage medium.
在另一实例中,信道130可包含存储服务器,该存储服务器可以存储编码设备110编码后的点云数据。在此实例中,解码设备120可以从该存储服务器中下载存储的编码后的点云数据。可选的,该存储服务器可以存储编码后的点云数据且可以将该编码后的点云数据发射到解码设备120,例如web服务器(例如,用于网站)、文件传送协议(FTP)服务器等。In another example, the channel 130 may include a storage server that can store the point cloud data encoded by the encoding device 110. In this example, the decoding device 120 can download the stored encoded point cloud data from the storage server. Optionally, the storage server can store the encoded point cloud data and transmit the encoded point cloud data to the decoding device 120, such as a web server (e.g., for a website), a file transfer protocol (FTP) server, etc.
一些实施例中,编码设备110包含点云编码器112及输出接口113。其中,输出接口113可以包含调制器/解调器(调制解调器)和/或发射器。In some embodiments, the encoding device 110 includes a point cloud encoder 112 and an output interface 113. The output interface 113 may include a modulator/demodulator (modem) and/or a transmitter.
在一些实施例中,编码设备110除了包括点云编码器112和输入接口113外,还可以包括点云源111。In some embodiments, the encoding device 110 may further include a point cloud source 111 in addition to the point cloud encoder 112 and the input interface 113 .
点云源111可包含点云采集装置(例如,扫描仪)、点云存档、点云输入接口、计算机图形系统中的至少一个,其中,点云输入接口用于从点云内容提供者处接收点云数据,计算机图形系统用于产生点云数据。The point cloud source 111 may include at least one of a point cloud acquisition device (e.g., a scanner), a point cloud archive, a point cloud input interface, and a computer graphics system, wherein the point cloud input interface is used to receive point cloud data from a point cloud content provider, and the computer graphics system is used to generate point cloud data.
点云编码器112对来自点云源111的点云数据进行编码,产生码流。点云编码器112经由输出接口113将编码后的点云数据直接传输到解码设备120。编码后的点云数据还可存储于存储介质或存储服务器上,以供解码设备120后续读取。The point cloud encoder 112 encodes the point cloud data from the point cloud source 111 to generate a code stream. The point cloud encoder 112 transmits the encoded point cloud data directly to the decoding device 120 via the output interface 113. The encoded point cloud data can also be stored in a storage medium or a storage server for subsequent reading by the decoding device 120.
在一些实施例中,解码设备120包含输入接口121和点云解码器122。In some embodiments, the decoding device 120 includes an input interface 121 and a point cloud decoder 122 .
在一些实施例中,解码设备120除包括输入接口121和点云解码器122外,还可以包括显示装置123。In some embodiments, the decoding device 120 may further include a display device 123 in addition to the input interface 121 and the point cloud decoder 122 .
其中,输入接口121包含接收器及/或调制解调器。输入接口121可通过信道130接收编码后的点云数据。The input interface 121 includes a receiver and/or a modem. The input interface 121 can receive the encoded point cloud data through the channel 130 .
点云解码器122用于对编码后的点云数据进行解码,得到解码后的点云数据,并将解码后的点云数据传输至显示装置123。The point cloud decoder 122 is used to decode the encoded point cloud data to obtain decoded point cloud data, and transmit the decoded point cloud data to the display device 123.
显示装置123显示解码后的点云数据。显示装置123可与解码设备120整合或在解码设备120外部。显示装置123可包括多种显示装置,例如液晶显示器(LCD)、等离子体显示器、有机发光二极管(OLED)显示器或其它类型的显示装置。The decoded point cloud data is displayed on the display device 123. The display device 123 may be integrated with the decoding device 120 or may be external to the decoding device 120. The display device 123 may include a variety of display devices, such as a liquid crystal display (LCD), a plasma display, an organic light emitting diode (OLED) display, or other types of display devices.
此外,图3仅为实例,本申请实施例的技术方案不限于图3,例如本申请的技术还可以应用于单侧的点云编码或单侧的点云解码。In addition, Figure 3 is only an example, and the technical solution of the embodiment of the present application is not limited to Figure 3. For example, the technology of the present application can also be applied to unilateral point cloud encoding or unilateral point cloud decoding.
目前的点云编码器可以采用国际标准组织运动图像专家组(Moving Picture Experts Group,MPEG)提出了两种点云压缩编码技术路线,分别是基于投影的点云压缩(Video-based Point Cloud Compression,VPCC)和基于几何的点云压缩(Geometry-based Point Cloud Compression,GPCC)。VPCC通过将三维点云投影到二维,利用现有的二维编码工具对投影后的二维图像进行编码,GPCC利用层级化的结构将点云逐级划分为多个单元,通过编码记录划分过程编码整个点云。The current point cloud encoder can adopt two point cloud compression coding technology routes proposed by the International Standards Organization Moving Picture Experts Group (MPEG), namely Video-based Point Cloud Compression (VPCC) and Geometry-based Point Cloud Compression (GPCC). VPCC projects the three-dimensional point cloud into two dimensions and uses the existing two-dimensional coding tools to encode the projected two-dimensional image. GPCC uses a hierarchical structure to divide the point cloud into multiple units step by step, and encodes the entire point cloud by encoding the division process.
下面以GPCC编解码框架为例,对本申请实施例可适用的点云编码器和点云解码器进行说明。The following uses the GPCC encoding and decoding framework as an example to explain the point cloud encoder and point cloud decoder applicable to the embodiments of the present application.
图4A是本申请实施例提供的点云编码器的示意性框图。FIG. 4A is a schematic block diagram of a point cloud encoder provided in an embodiment of the present application.
由上述可知点云中的点可以包括点的位置信息和点的属性信息,因此,点云中的点的编码主要包括位置编码和属性编码。在一些示例中点云中点的位置信息又称为几何信息,对应的点云中点的位置编码也可以称为几何编码。From the above, we can know that the points in the point cloud can include the location information of the points and the attribute information of the points. Therefore, the encoding of the points in the point cloud mainly includes location encoding and attribute encoding. In some examples, the location information of the points in the point cloud is also called geometric information, and the corresponding location encoding of the points in the point cloud can also be called geometric encoding.
在GPCC编码框架中,点云的几何信息和对应的属性信息是分开编码的。In the GPCC coding framework, the geometric information of the point cloud and the corresponding attribute information are encoded separately.
如下图4A所示,目前G-PCC的几何编解码可分为基于八叉树的几何编解码和基于预测树的几何编解码。As shown in FIG. 4A below, the current geometric coding and decoding of G-PCC can be divided into octree-based geometric coding and decoding and prediction tree-based geometric coding and decoding.
位置编码的过程包括:对点云中的点进行预处理,例如坐标变换、量化和移除重复点等;接着,对预处理后的点云进行几何编码,例如构建八叉树,或构建预测树,基于构建的八叉树或预测树进行几何编码形成几何码流。同时,基于构建的八叉树或预测树输出的位置信息,对点云数据中各点的位置信息进行重建,得到各点的位置信息的重建值。The process of position coding includes: preprocessing the points in the point cloud, such as coordinate transformation, quantization, and removal of duplicate points; then, geometric coding the preprocessed point cloud, such as constructing an octree, or constructing a prediction tree, and geometric coding based on the constructed octree or prediction tree to form a geometric code stream. At the same time, based on the position information output by the constructed octree or prediction tree, the position information of each point in the point cloud data is reconstructed to obtain the reconstructed value of the position information of each point.
属性编码过程包括:通过给定输入点云的位置信息的重建信息和属性信息的原始值,选择三种预测模式的一种进行点云预测,对预测后的结果进行量化,并进行算术编码形成属性码流。The attribute encoding process includes: given the reconstruction information of the input point cloud position information and the original value of the attribute information, selecting one of the three prediction modes for point cloud prediction, quantizing the predicted result, and performing arithmetic coding to form an attribute code stream.
如图4A所示,位置编码可通过以下单元实现:As shown in Figure 4A, position encoding can be achieved by the following units:
坐标转换(Tanmsform coordinates)单元201、体素(Voxelize)单元202、八叉树划分(Analyze octree)单元203、几何重建(Reconstruct geometry)单元204、第一算术编码(Arithmetic enconde)单元205、表面拟合单元(Analyze surface approximation)206和预测树构建单元207。Coordinate transformation (Tanmsform coordinates) unit 201, voxel (Voxelize) unit 202, octree partition (Analyze octree) unit 203, geometry reconstruction (Reconstruct geometry) unit 204, first arithmetic encoding (Arithmetic enconde) unit 205, surface fitting unit (Analyze surface approximation) 206 and prediction tree construction unit 207.
坐标转换单元201可用于将点云中点的世界坐标变换为相对坐标。例如,点的几何坐标分别减去xyz坐标轴的最小值,相当于去直流操作,以实现将点云中的点的坐标从世界坐标转换为相对坐标。The coordinate conversion unit 201 can be used to convert the world coordinates of the point in the point cloud into relative coordinates. For example, the geometric coordinates of the point are respectively subtracted from the minimum value of the xyz coordinate axis, which is equivalent to a DC removal operation, so as to realize the conversion of the coordinates of the point in the point cloud from the world coordinates to the relative coordinates.
体素(Voxelize)单元202也称为量化和移除重复点(Quantize and remove points)单元,可通过量化减少坐标的数目;量化后原先不同的点可能被赋予相同的坐标,基于此,可通过去重操作将重复的点删除;例如,具有相同量化位置和不同属性信息的多个云可通过属性转换合并到一个云中。在本申请的一些实施例中,体素单元202为可选的单元模块。The voxel unit 202 is also called a quantize and remove points unit, which can reduce the number of coordinates by quantization; after quantization, originally different points may be assigned the same coordinates, based on which, duplicate points can be deleted by deduplication operation; for example, multiple clouds with the same quantized position and different attribute information can be merged into one cloud by attribute conversion. In some embodiments of the present application, the voxel unit 202 is an optional unit module.
八叉树划分单元203可利用八叉树(octree)编码方式,编码量化的点的位置信息。例如,将点云按照八叉树的形式进行划分,由此,点的位置可以和八叉树的位置一一对应,通过统计八叉树中有点的位置,并将其标识(flag)记为1,以进行几何编码。The octree division unit 203 may use an octree encoding method to encode the position information of the quantized points. For example, the point cloud is divided in the form of an octree, so that the position of the point can correspond to the position of the octree one by one, and the position of the point in the octree is counted and its flag is recorded as 1 to perform geometric encoding.
在一些实施例中,在基于三角面片集(trianglesoup,trisoup)的几何信息编码过程中,同样也要通过八叉树划分单元203对点云进行八叉树划分,但区别于基于八叉树的几何信息编码,该trisoup不需要将点云逐级划分到边长为1x1x1的单位立方体,而是划分到block(子块)边长为W时停止划分,基于每个block中点云的分布所形成的表面,得到该表面与block的十二条边所产生的至多十二个vertex(交点),通过表面拟合单元206对交点进行表面拟合,对拟合后的交点进行几何编码。In some embodiments, in the process of geometric information encoding based on triangle soup (trisoup), the point cloud is also divided into octrees by the octree division unit 203. However, different from the geometric information encoding based on the octree, the trisoup does not need to divide the point cloud into unit cubes with a side length of 1x1x1 step by step, but stops dividing when the block (sub-block) has a side length of W. Based on the surface formed by the distribution of the point cloud in each block, at most twelve vertices (intersections) generated by the surface and the twelve edges of the block are obtained, and the intersections are surface fitted by the surface fitting unit 206, and the fitted intersections are geometrically encoded.
预测树构建单元207可利用预测树编码方式,编码量化的点的位置信息。例如,将点云按照预测树的形式进行划分,由此,点的位置可以和预测树中节点的位置一一对应,通过统计预测树中有点的位置,通过选取不同的预测模式对节点的几何位置信息进行预测得到预测残差,并且利用量化参数对几何预测残差进行量化。最终通过不断迭代,对预测树节点位置信息的预测残差、预测树结构以及量化参数等进行编码,生成二进制码流。The prediction tree construction unit 207 can use the prediction tree encoding method to encode the position information of the quantized points. For example, the point cloud is divided in the form of a prediction tree, so that the position of the point can correspond to the position of the node in the prediction tree one by one. By counting the positions of the points in the prediction tree, the geometric position information of the node is predicted by selecting different prediction modes to obtain the prediction residual, and the geometric prediction residual is quantized using the quantization parameter. Finally, through continuous iteration, the prediction residual of the prediction tree node position information, the prediction tree structure and the quantization parameter are encoded to generate a binary code stream.
几何重建单元204可以基于八叉树划分单元203输出的位置信息或表面拟合单元206拟合后的交点进行位置重建,得到点云数据中各点的位置信息的重建值。或者,基于预测树构建单元207输出的位置信息进行位置重建,得到点云数据中各点的位置信息的重建值。The geometric reconstruction unit 204 can perform position reconstruction based on the position information output by the octree division unit 203 or the intersection points fitted by the surface fitting unit 206 to obtain the reconstructed value of the position information of each point in the point cloud data. Alternatively, the position reconstruction can be performed based on the position information output by the prediction tree construction unit 207 to obtain the reconstructed value of the position information of each point in the point cloud data.
算术编码单元205可以采用熵编码方式对八叉树分析单元203输出的位置信息或对表面拟合单元206拟合后的交点,或者预测树构建单元207输出的几何预测残差值进行算术编码,生成几何码流;几何码流也可称为几何比特流(geometry bitstream)。The arithmetic coding unit 205 can use entropy coding to perform arithmetic coding on the position information output by the octree analysis unit 203 or the intersection points fitted by the surface fitting unit 206, or the geometric prediction residual values output by the prediction tree construction unit 207 to generate a geometric code stream; the geometric code stream can also be called a geometry bitstream.
属性编码可通过以下单元实现:Attribute encoding can be achieved through the following units:
颜色转换(Transform colors)单元210、重着色(Transfer attributes)单元211、区域自适应分层变换(Region Adaptive Hierarchical Transform,RAHT)单元212、生成LOD(Generate LOD)单元213以及提升(lifting transform)单元214、量化系数(Quantize coefficients)单元215以及算术编码单元216。A color conversion (Transform colors) unit 210, a recoloring (Transfer attributes) unit 211, a Region Adaptive Hierarchical Transform (RAHT) unit 212, a Generate LOD (Generate LOD) unit 213, a lifting (lifting transform) unit 214, a Quantize coefficients (Quantize coefficients) unit 215 and an arithmetic coding unit 216.
需要说明的是,点云编码器200可包含比图4A更多、更少或不同的功能组件。It should be noted that the point cloud encoder 200 may include more, fewer or different functional components than those shown in FIG. 4A .
颜色转换单元210可用于将点云中点的RGB色彩空间变换为YCbCr格式或其他格式。The color conversion unit 210 may be used to convert the RGB color space of the points in the point cloud into a YCbCr format or other formats.
重着色单元211利用重建的几何信息,对颜色信息进行重新着色,使得未编码的属性信息与重建的几何信息对应起来。The recoloring unit 211 recolors the color information using the reconstructed geometric information so that the uncoded attribute information corresponds to the reconstructed geometric information.
经过重着色单元211转换得到点的属性信息的原始值后,可选择任一种变换单元,对点云中的点进行变换。变换单元可包括:RAHT变换212和提升(lifting transform)单元214。其中,提升变化依赖生成细节层(level of detail,LOD)。After the original value of the attribute information of the point is converted by the recoloring unit 211, any transformation unit can be selected to transform the points in the point cloud. The transformation unit may include: RAHT transformation 212 and lifting (lifting transform) unit 214. Among them, the lifting transformation depends on generating a level of detail (LOD).
RAHT变换和提升变换中的任一项可以理解为用于对点云中点的属性信息进行预测,以得到点的属性信息的预测值,进而基于点的属性信息的预测值得到点的属性信息的残差值。例如,点的属性信息的残差值可以是点的属性信息的原始值减去点的属性信息的预测值。Any of the RAHT transformation and the lifting transformation can be understood as being used to predict the attribute information of a point in a point cloud to obtain a predicted value of the attribute information of the point, and then obtain a residual value of the attribute information of the point based on the predicted value of the attribute information of the point. For example, the residual value of the attribute information of the point can be the original value of the attribute information of the point minus the predicted value of the attribute information of the point.
在本申请的一实施例中,生成LOD单元生成LOD的过程包括:根据点云中点的位置信息,获取点与点之间的欧式距离;根据欧式距离,将点分为不同的细节表达层。在一个实施例中,可以将欧式距离进行排序后,将不同范围的欧式距离划分为不同的细节表达层。例如,可以随机挑选一个点,作为第一细节表达层。然后计算剩余点与该点的欧式距离,并将欧式距离符合第一阈值要求的点,归为第二细节表达层。获取第二细节表达层中点的质心,计算除第一、第二细节表达层以外的点与该质心的欧式距离,并将欧式距离符合第二阈值的点,归为第三细节表达层。以此类推,将所有的点都归到细节表达层中。通过调整欧式距离的阈值,可以使得每层LOD层的点的数量是递增的。应理解, LOD划分的方式还可以采用其它方式,本申请对此不进行限制。In one embodiment of the present application, the process of generating LOD by the LOD generating unit includes: obtaining the Euclidean distance between points according to the position information of the points in the point cloud; and dividing the points into different detail expression layers according to the Euclidean distance. In one embodiment, the Euclidean distances can be sorted and the Euclidean distances in different ranges can be divided into different detail expression layers. For example, a point can be randomly selected as the first detail expression layer. Then the Euclidean distances between the remaining points and the point are calculated, and the points whose Euclidean distances meet the first threshold requirement are classified as the second detail expression layer. The centroid of the points in the second detail expression layer is obtained, and the Euclidean distances between the points other than the first and second detail expression layers and the centroid are calculated, and the points whose Euclidean distances meet the second threshold are classified as the third detail expression layer. By analogy, all points are classified into the detail expression layer. By adjusting the threshold of the Euclidean distance, the number of points in each LOD layer can be increased. It should be understood that the LOD division method can also be adopted in other ways, and the present application does not limit this.
需要说明的是,可以直接将点云划分为一个或多个细节表达层,也可以先将点云划分为多个点云切块(slice),再将每一个点云切块划分为一个或多个LOD层。It should be noted that the point cloud may be directly divided into one or more detail expression layers, or the point cloud may be first divided into a plurality of point cloud slices, and then each point cloud slice may be divided into one or more LOD layers.
例如,可将点云划分为多个点云切块,每个点云切块的点的个数可以在55万-110万之间。每个点云切块可看成单独的点云。每个点云切块又可以划分为多个细节表达层,每个细节表达层包括多个点。在一个实施例中,可根据点与点之间的欧式距离,进行细节表达层的划分。For example, the point cloud can be divided into multiple point cloud blocks, and the number of points in each point cloud block can be between 550,000 and 1.1 million. Each point cloud block can be regarded as a separate point cloud. Each point cloud block can be divided into multiple detail expression layers, and each detail expression layer includes multiple points. In one embodiment, the detail expression layer can be divided according to the Euclidean distance between points.
量化单元215可用于量化点的属性信息的残差值。例如,若量化单元215和RAHT变换单元212相连,则量化单元215可用于量化RAHT变换单元212输出的点的属性信息的残差值。The quantization unit 215 may be used to quantize the residual value of the attribute information of the point. For example, if the quantization unit 215 is connected to the RAHT transformation unit 212, the quantization unit 215 may be used to quantize the residual value of the attribute information of the point output by the RAHT transformation unit 212.
算术编码单元216可使用零行程编码(Zero run length coding)对点的属性信息的残差值进行熵编码,以得到属性码流。所述属性码流可以是比特流信息。The arithmetic coding unit 216 may use zero run length coding to perform entropy coding on the residual value of the attribute information of the point to obtain an attribute code stream. The attribute code stream may be bit stream information.
图4B是本申请实施例提供的点云解码器的示意性框图。FIG4B is a schematic block diagram of a point cloud decoder provided in an embodiment of the present application.
如图4B所示,解码器300可以从编码设备获取点云码流,通过解析码得到点云中的点的位置信息和属性信息。点云的解码包括位置解码和属性解码。As shown in Fig. 4B, the decoder 300 can obtain the point cloud code stream from the encoding device, and obtain the position information and attribute information of the points in the point cloud by parsing the code. The decoding of the point cloud includes position decoding and attribute decoding.
位置解码的过程包括:对几何码流进行算术解码;构建八叉树后进行合并,对点的位置信息进行重建,以得到点的位置信息的重建信息;对点的位置信息的重建信息进行坐标变换,得到点的位置信息。点的位置信息也可称为点的几何信息。The process of position decoding includes: performing arithmetic decoding on the geometric code stream; merging after building the octree, reconstructing the position information of the point to obtain the reconstructed information of the point position information; performing coordinate transformation on the reconstructed information of the point position information to obtain the point position information. The point position information can also be called the geometric information of the point.
属性解码过程包括:通过解析属性码流,获取点云中点的属性信息的残差值;通过对点的属性信息的残差值进行反量化,得到反量化后的点的属性信息的残差值;基于位置解码过程中获取的点的位置信息的重建信息,选择如下RAHT逆变换和提升逆变换中的一种进行点云预测,得到预测值,预测值与残差值相加得到点的属性信息的重建值;对点的属性信息的重建值进行颜色空间逆转换,以得到解码点云。The attribute decoding process includes: obtaining the residual value of the attribute information of the point in the point cloud by parsing the attribute code stream; obtaining the residual value of the attribute information of the point after dequantization by dequantizing the residual value of the attribute information of the point; based on the reconstruction information of the point position information obtained in the position decoding process, selecting one of the following RAHT inverse transform and lifting inverse transform to perform point cloud prediction to obtain the predicted value, and adding the predicted value to the residual value to obtain the reconstructed value of the attribute information of the point; performing color space inverse conversion on the reconstructed value of the attribute information of the point to obtain a decoded point cloud.
如图4B所示,位置解码可通过以下单元实现:As shown in FIG4B , position decoding can be achieved by the following units:
算数解码单元301、八叉树合成(synthesize octree)单元302、表面拟合单元(Synthesize suface approximation)303、几何重建(Reconstruct geometry)单元304、逆坐标变换(inverse transform coordinates)单元305和预测树重建单元306。 Arithmetic decoding unit 301, octree synthesis (synthesize octree) unit 302, surface fitting unit (Synthesize suface approximation) 303, geometry reconstruction (Reconstruct geometry) unit 304, inverse transform (inverse transform coordinates) unit 305 and prediction tree reconstruction unit 306.
属性编码可通过以下单元实现:Attribute encoding can be achieved through the following units:
算数解码单元310、反量化(inverse quantize)单元311、RAHT逆变换单元312、生成LOD(Generate LOD)单元313、提升逆变换(Inverse lifting)单元314以及逆颜色转换(inverse trasform colors)单元315。 Arithmetic decoding unit 310, inverse quantize unit 311, RAHT inverse transform unit 312, generate LOD unit 313, inverse lifting unit 314 and inverse trasform colors unit 315.
需要说明的是,解压缩是压缩的逆过程,类似的,解码器300中的各个单元的功能可参见编码器200中相应的单元的功能。另外,点云解码器300可包含比图5更多、更少或不同的功能组件。It should be noted that decompression is the inverse process of compression. Similarly, the functions of each unit in the decoder 300 can refer to the functions of the corresponding units in the encoder 200. In addition, the point cloud decoder 300 may include more, fewer or different functional components than those in FIG. 5 .
例如,解码器300可根据点云中点与点之间的欧式距离将点云划分为多个LOD;然后,依次对LOD中点的属性信息进行解码;例如,计算零行程编码技术中零的数量(zero_cnt),以基于zero_cnt对残差进行解码;接着,解码框架200可基于解码出的残差值进行反量化,并基于反量化后的残差值与当前点的预测值相加得到该点云的重建值,直到解码完所有的点云。当前点将会作为后续LOD中点的最邻近点,并利用当前点的重建值对后续点的属性信息进行预测。For example, the decoder 300 can divide the point cloud into multiple LODs according to the Euclidean distance between points in the point cloud; then, the attribute information of the points in the LOD is decoded in sequence; for example, the number of zeros (zero_cnt) in the zero-run encoding technology is calculated to decode the residual based on zero_cnt; then, the decoding framework 200 can perform inverse quantization based on the decoded residual value, and add the inverse quantized residual value to the predicted value of the current point to obtain the reconstruction value of the point cloud until all point clouds are decoded. The current point will be used as the nearest point of the subsequent LOD point, and the reconstruction value of the current point will be used to predict the attribute information of the subsequent point.
上述是基于GPCC编解码框架下的点云编解码器的基本流程,随着技术的发展,该框架或流程的一些模块或步骤可能会被优化,本申请适用于该基于GPCC编解码框架下的点云编解码器的基本流程,但不限于该框架及流程。The above is the basic process of the point cloud codec based on the GPCC codec framework. With the development of technology, some modules or steps of the framework or process may be optimized. This application is applicable to the basic process of the point cloud codec based on the GPCC codec framework, but is not limited to the framework and process.
下面对基于八叉树的几何编码和基于预测树的几何编码进行介绍。The following introduces octree-based geometric coding and prediction tree-based geometric coding.
基于八叉树的几何编码包括:首先对几何信息进行坐标转换,使点云全都包含在一个bounding box(包围盒)中。然后再进行量化,这一步量化主要起到缩放的作用,由于量化取整,使得一部分点的几何信息相同,根据参数来决定是否移除重复点,量化和移除重复点这一过程又被称为体素化过程。接下来,按照广度优先遍历的顺序不断对bounding box进行树划分(八叉树/四叉树/二叉树),对每个节点的占位码进行编码。在一种隐式几何的划分方式中,首先计算点云的包围盒
Figure PCTCN2022122113-appb-000002
假设,该d x>d y>d z包围盒对应为一个长方体。在几何划分时,首先会基于x轴一直进行二叉树划分,得到两个子节点;直到满足d x=d y>d z条件时,才会基于x和y轴一直进行四叉树划分,得到四个子节点;当最终满足d x=d y=d z条件时,会一直进行八叉树划分,直到划分得到的叶子结点为1x1x1的单位立方体时停止划分,对叶子结点中的点进行编码,生成二进制码流。在基于二叉树/四叉树/八叉树划分的过程中,引入两个参数:K、M。参数K指示在进行八叉树划分之前二叉树/四叉树划分的最多次数;参数M用来指示在进行二叉树/四叉树划分时对应的最小块边长为2 M。同时K和M必须满足条件:假设d max=max(d x,d y,d z),d min=min(d x,d y,d z),参数K满足:K>=d max-d min;参数M满足:M>=d min。参数K与M之所以满足上述的条件,是因为目前G-PCC在几何隐式划分的过程中,划分方式的优先级为二叉树、四叉树和八叉树,当节点块大小不满足二叉树/四叉树的条件时,才会对节点一直进行八叉树的划分,直到划分到叶子节点最小单位1X1X1。但基于八叉树的几何信息编码模式仅对空间中具有相关性的点有高效的压缩速率,而对于在几何空间中处于孤立位置的点来说,使用直接编码模式(Direct Coding Model,简称DCM)编码方式可以大大降低复杂度。对于八叉树中的所有节点,DCM的使用不是通过标志位信息来表示的,而是通过当前节点的父节点和邻居信息来进行推断得到。判断当前节点是否具有DCM编码资格的方式有以下两种:
Octree-based geometric encoding includes: first, coordinate transformation of geometric information so that all point clouds are contained in a bounding box. Then quantization is performed. This step of quantization mainly plays a role of scaling. Due to quantization rounding, the geometric information of some points is the same. Whether to remove duplicate points is determined based on parameters. The process of quantization and removal of duplicate points is also called voxelization. Next, the bounding box is continuously divided into trees (octree/quadtree/binary tree) in the order of breadth-first traversal, and the placeholder code of each node is encoded. In an implicit geometric division method, the bounding box of the point cloud is first calculated.
Figure PCTCN2022122113-appb-000002
Assume that the bounding box of dx > dy > dz corresponds to a cuboid. During geometric partitioning, binary tree partitioning will be performed based on the x-axis to obtain two child nodes. When the condition of dx = dy > dz is met, quadtree partitioning will be performed based on the x-axis and y-axis to obtain four child nodes. When the condition of dx = dy = dz is finally met, octree partitioning will be performed until the leaf node obtained by partitioning is a 1x1x1 unit cube. The partitioning will be stopped, and the points in the leaf node will be encoded to generate a binary code stream. In the process of binary tree/quadtree/octree partitioning, two parameters are introduced: K and M. Parameter K indicates the maximum number of binary tree/quadtree partitioning before octree partitioning; parameter M is used to indicate that the minimum block side length corresponding to binary tree/quadtree partitioning is 2M . At the same time, K and M must meet the following conditions: Assuming d max = max(d x , dy , d z ), d min = min(d x , dy , d z ), parameter K satisfies: K>=d max -d min ; parameter M satisfies: M>=d min . The reason why parameters K and M meet the above conditions is that in the process of geometric implicit partitioning of G-PCC, the priority of partitioning is binary tree, quadtree and octree. When the node block size does not meet the conditions of binary tree/quadtree, the node will be partitioned by octree until it is partitioned to the minimum unit of leaf node 1X1X1. However, the geometric information coding mode based on octree has an efficient compression rate only for points with correlation in space, while for points in isolated positions in geometric space, the use of direct coding mode (Direct Coding Model, referred to as DCM) coding can greatly reduce the complexity. For all nodes in the octree, the use of DCM is not represented by flag information, but is inferred by the parent node and neighbor information of the current node. There are two ways to determine whether the current node is eligible for DCM encoding:
(1)当前节点仅有一个被占据子节点,同时当前节点父节点的父节点仅有两个被占据子节点,即当前节点最多只有一个邻居节点。(1) The current node has only one occupied child node, and the parent node of the current node's parent node has only two occupied child nodes, that is, the current node has at most one neighbor node.
(2)当前节点的父节点仅有当前节点一个占据子节点,同时与当前节点共用一个面的六个邻居节点也都属于空节点。(2) The parent node of the current node has only one child node, the current node. At the same time, the six neighbor nodes that share a face with the current node are also empty nodes.
如果当前节点不具有DCM编码资格将对其进行八叉树划分,若具有DCM编码资格将进一步判断该节点中包含的点数,当点数小于阈值2时,则对该节点进行DCM编码,否则将继续进行八叉树划分。当应用DCM编码模式时,当前节点中包含点的几何坐标X,Y,Z分量将分别独立地被直接编码。当一个节点的边长为2 d时,对该节点几何坐标的每一个分量进行编码时需要d比特,该比特信息直接被编进码流中。 If the current node does not have the DCM coding qualification, it will be divided into octrees. If it has the DCM coding qualification, the number of points contained in the node will be further determined. When the number of points is less than the threshold 2, the node will be DCM-encoded, otherwise the octree division will continue. When the DCM coding mode is applied, the geometric coordinates X, Y, and Z components of the points contained in the current node will be directly encoded independently. When the side length of a node is 2d , d bits are required to encode each component of the geometric coordinates of the node, and the bit information is directly encoded into the bit stream.
需要注意的是,在节点划分到叶子节点时,在几何无损编码的情况下,需要对叶子节点中的重复点数目进行编码。最终对所有节点的占位信息进行编码,生成二进制码流。另外G-PCC目前引入了一种平面编码模式,在对几何进行划分的过程中,会判断当前节点的子节点是否处于同一平面,如果当前节点的子节点满足同一平面的条件,会用该平面对当前节点的子节点进行表示。It should be noted that when nodes are divided into leaf nodes, in the case of geometric lossless coding, the number of repeated points in the leaf nodes needs to be encoded. Finally, the placeholder information of all nodes is encoded to generate a binary code stream. In addition, G-PCC currently introduces a plane coding mode. In the process of geometric division, it will determine whether the child nodes of the current node are in the same plane. If the child nodes of the current node meet the conditions of the same plane, the child nodes of the current node will be represented by the plane.
在基于八叉树的几何解码,解码端按照广度优先遍历的顺序,通过不断解析得到每个节点的占位码,并且依次不断划分节点,直至划分得到1X1X1的单位立方体时停止划分,解析得到每个叶子节点中包含的点数,最终恢复得到几何重构点云信息。In octree-based geometric decoding, the decoding end obtains the placeholder code of each node by continuously parsing in the order of breadth-first traversal, and continuously divides the nodes in turn until a 1X1X1 unit cube is obtained. The number of points contained in each leaf node is parsed, and finally the geometric reconstructed point cloud information is restored.
在基于trisoup(triangle soup,三角面片集)的几何信息编码框架中,同样也要先进行几何划分,但区别于基于二叉树/四叉树/八叉树的几何信息编码,该方法不需要将点云逐级划分到边长为1x1x1的单位立方体,而是划分到block(子块)边长为W时停止划分,基于每个block中点云的分布所形成的表面,得到该表面与block的十二条边所产生的至多十二个vertex(交点)。依次编码每个block的vertex坐标,生成二进制码流。In the geometric information coding framework based on trisoup (triangle soup, triangle patch set), geometric division must also be performed first, but different from the geometric information coding based on binary tree/quadtree/octree, this method does not need to divide the point cloud into unit cubes with a side length of 1x1x1 step by step, but stops dividing when the block (sub-block) has a side length of W. Based on the surface formed by the distribution of the point cloud in each block, at most twelve vertices (intersection points) generated by the surface and the twelve edges of the block are obtained. The vertex coordinates of each block are encoded in turn to generate a binary code stream.
基于trisoup的点云几何信息重建,在解码端进行点云几何信息重建时,首先解码vertex坐标用于完成三角面片重建,该过程如图5A至图5C所示。图5A所示的block中存在3个vertex(v1,v2,v3),利用这3个vertex按照一定顺序所构成的三角面片集被称为triangle soup,即trisoup,如图5B所示。之后,在该三角面片集上进行采样,将得到的采样点作为该block内的重建点云,如图5C所示。When reconstructing the point cloud geometry information based on trisoup, the vertex coordinates are first decoded to complete the reconstruction of the triangle facets at the decoding end. The process is shown in Figures 5A to 5C. There are three vertices (v1, v2, v3) in the block shown in Figure 5A. The triangle facet set formed by these three vertices in a certain order is called triangle soup, or trisoup, as shown in Figure 5B. After that, sampling is performed on the triangle facet set, and the obtained sampling points are used as the reconstructed point cloud in the block, as shown in Figure 5C.
基于预测树的几何编码包括:首先对输入点云进行排序,目前采用的排序方法包括无序、莫顿序、方位角序和径向距离序。在编码端通过利用两种不同的方式建立预测树结构,其中包括:KD-Tree(高时延慢速模式)和利用激光雷达标定信息,将每个点划分到不同的Laser上,按照不同的Laser建立预测结构(低时延快速模式)。接下来基于预测树的结构,遍历预测树中的每个节点,通过选取不同的预测模式对节点的几何位置信息进行预测得到预测残差,并且利用量化参数对几何预测残差进行量化。最终通过不断迭代,对预测树节点位置信息的预测残差、预测树结构以及量化参数等进行编码,生成二进制码流。The geometric coding based on the prediction tree includes: first, sorting the input point cloud. The currently used sorting methods include unordered, Morton order, azimuth order and radial distance order. At the encoding end, the prediction tree structure is established by using two different methods, including: KD-Tree (high-latency slow mode) and using the laser radar calibration information to divide each point into different Lasers, and establish a prediction structure according to different Lasers (low-latency fast mode). Next, based on the structure of the prediction tree, traverse each node in the prediction tree, predict the geometric position information of the node by selecting different prediction modes to obtain the prediction residual, and quantize the geometric prediction residual using the quantization parameter. Finally, through continuous iteration, the prediction residual of the prediction tree node position information, the prediction tree structure and the quantization parameters are encoded to generate a binary code stream.
基于预测树的几何解码,解码端通过不断解析码流,重构预测树结构,其次通过解析得到每个预测节点的几何位置预测残差信息以及量化参数,并且对预测残差进行反量化,恢复得到每个节点的重构几何位置信息,最终完成解码端的几何重构。Based on the geometric decoding of the prediction tree, the decoding end reconstructs the prediction tree structure by continuously parsing the bit stream, and then obtains the geometric position prediction residual information and quantization parameters of each prediction node through parsing, and dequantizes the prediction residual to recover the reconstructed geometric position information of each node, and finally completes the geometric reconstruction of the decoding end.
几何编码完成后,对几何信息进行重建。目前,属性编码主要针对颜色信息进行。首先,将颜色信息从RGB颜色空间转换到YUV颜色空间。然后,利用重建的几何信息对点云重新着色,使得未编码的属性信息与重建的几何信息对应起来。在颜色信息编码中,主要有两种变换方法,一是依赖于LOD(Level of Detail,细节层次)划分的基于距离的提升变换,二是直接进行RAHT(Region Adaptive Hierarchal Transform,区域自适应分层变换)变换,这两种方法都会将颜色信息从空间域转换到频域,通过变换得到高频系数和低频系数,最后对系数进行量化并编码,生成二进制码流。After the geometric encoding is completed, the geometric information is reconstructed. At present, attribute encoding is mainly performed on color information. First, the color information is converted from the RGB color space to the YUV color space. Then, the point cloud is recolored using the reconstructed geometric information so that the unencoded attribute information corresponds to the reconstructed geometric information. In color information encoding, there are two main transformation methods. One is the distance-based lifting transformation that relies on LOD (Level of Detail) division, and the other is to directly perform RAHT (Region Adaptive Hierarchal Transform) transformation. Both methods will convert color information from the spatial domain to the frequency domain, obtain high-frequency coefficients and low-frequency coefficients through transformation, and finally quantize and encode the coefficients to generate a binary code stream.
在利用几何信息来对属性信息进行预测时,可以利用莫顿码进行最近邻居搜索,点云中每点对应的莫顿码可以由该点的几何坐标得到。计算莫顿码的具体方法描述如下所示,对于每一个分量用d比特二进制数表示的三维坐标,其三个分量可以表示为公式(1):When using geometric information to predict attribute information, Morton codes can be used to search for nearest neighbors. The Morton code corresponding to each point in the point cloud can be obtained from the geometric coordinates of the point. The specific method for calculating the Morton code is described as follows. For each component of the three-dimensional coordinate represented by a d-bit binary number, its three components can be expressed as formula (1):
Figure PCTCN2022122113-appb-000003
Figure PCTCN2022122113-appb-000003
其中,x l,y l,z l∈{0,1}分别是x,y,z的最高位(l=1)到最低位(l=d)对应的二进制数值。莫顿码M是对x,y,z从最高位开始,依次交叉排列x l,y l,z l到最低位,M的计算公式如下公式(2)所示: Where x l ,y l ,z l ∈{0,1} are the binary values corresponding to the highest bit (l=1) to the lowest bit (l=d) of x, y, z respectively. The Morton code M is x, y, z starting from the highest bit and arranged in sequence from x l ,y l ,z l to the lowest bit. The calculation formula of M is shown in the following formula (2):
Figure PCTCN2022122113-appb-000004
Figure PCTCN2022122113-appb-000004
其中,m l′∈{0,1}分别是M的最高位(l′=1)到最低位(l′=3d)的值。在得到点云中每个点的莫顿码M后,将点云中的点按莫顿码由小到大的顺序进行排列,并将每个点的权值w设为1。 Among them, m l′ ∈{0,1} are the values of the highest bit (l′=1) to the lowest bit (l′=3d) of M. After obtaining the Morton code M of each point in the point cloud, the points in the point cloud are arranged in order of Morton code from small to large, and the weight w of each point is set to 1.
GPCC的通用测试条件共4种:There are 4 general test conditions for GPCC:
条件1:几何位置有限度有损、属性有损;Condition 1: The geometric position is limitedly lossy and the attributes are lossy;
条件2:几何位置无损、属性有损;Condition 2: The geometric position is lossless, but the attributes are lossy;
条件3:几何位置无损、属性有限度有损;Condition 3: The geometric position is lossless, and the attributes are limitedly lossy;
条件4:几何位置无损、属性无损。Condition 4: The geometric position and attributes are lossless.
GPCC的通用测试序列包括Cat1A,Cat1B,Cat3-fused,Cat3-frame共四类,其中Cat2-frame点云只包含反射率属性信息,Cat1A、Cat1B点云只包含颜色属性信息,Cat3-fused点云同时包含颜色和反射率属性信息。GPCC's general test sequences include four categories: Cat1A, Cat1B, Cat3-fused, and Cat3-frame. Among them, Cat2-frame point cloud only contains reflectance attribute information, Cat1A and Cat1B point clouds only contain color attribute information, and Cat3-fused point cloud contains both color and reflectance attribute information.
GPCC的技术路线:共2种,以几何压缩所采用的算法进行区分,分为八叉树编码分支和预测树编码分支。GPCC's technical routes: There are 2 types in total, which are distinguished by the algorithm used for geometric compression, namely octree coding branch and prediction tree coding branch.
其中,八叉树编码分支中,在编码端,将包围盒依次划分得到子立方体,对非空的(包含点云中的点)的子立方体继续进行划分,直到划分得到的叶子结点为1X1X1的单位立方体时停止划分,在几何无损编码情况下,需要对叶子节点中所包含的点数进行编码,最终完成几何八叉树的编码,生成二进制码流。Among them, in the octree coding branch, at the encoding end, the bounding box is divided into sub-cubes in sequence, and the non-empty sub-cubes (including points in the point cloud) are continued to be divided until the leaf node obtained by division is a 1X1X1 unit cube. In the case of geometric lossless coding, it is necessary to encode the number of points contained in the leaf node, and finally complete the encoding of the geometric octree to generate a binary code stream.
在解码端,解码端按照广度优先遍历的顺序,通过不断解析得到每个节点的占位码,并且依次不断划分节点,直至划分得到1x1x1的单位立方体时停止划分,在几何无损解码的情况下,需要解析得到每个叶子节点中包含的点数,最终恢复得到几何重构点云信息。At the decoding end, the decoding end obtains the placeholder code of each node by continuously parsing in the order of breadth-first traversal, and continuously divides the nodes in turn until a 1x1x1 unit cube is obtained. In the case of geometric lossless decoding, it is necessary to parse the number of points contained in each leaf node and finally restore the geometrically reconstructed point cloud information.
目前在八叉树编解码中,对于八叉树中的每一个体素级的叶子节点,均需要编解码该叶子节点的重复点信息,但是并不是每一个叶子节点上均具有重复点,因此,对每一个叶子节点编解码重复点信息,增加了编解码的复杂度,浪费大量编解码时间,使得编解码效率低。Currently in octree encoding and decoding, for each voxel-level leaf node in the octree, it is necessary to encode and decode the duplicate point information of the leaf node, but not every leaf node has duplicate points. Therefore, encoding and decoding duplicate point information for each leaf node increases the complexity of encoding and decoding, wastes a lot of encoding and decoding time, and makes the encoding and decoding efficiency low.
为了解决上述技术问题,本申请实施例在基于八叉树的点云编解码中,在编解码八叉树中第N-1层的当前节点时,首先确定当前节点对应的第一参数,该第一参数用于确定当前节点的至少一个非零子节点是否包括重复点,当前节点为点云的八叉树中第N-1层的一个非零节点,N为所述八叉树的总层数,进而基于该第一参数,对当前节点进行几何解码。例如,基于该第一参数确定当前节点的第i个非零子节点不包括重复点时,则跳过编解码该第i个非零子节点的重复点信息,进而降低了点云的编解码复杂度,节约了编解码时间,进而提升了编解码效率。In order to solve the above technical problems, in the embodiment of the present application, in the octree-based point cloud encoding and decoding, when encoding and decoding the current node of the N-1th layer in the octree, the first parameter corresponding to the current node is first determined, and the first parameter is used to determine whether at least one non-zero child node of the current node includes duplicate points. The current node is a non-zero node of the N-1th layer in the octree of the point cloud, and N is the total number of layers of the octree. Then, based on the first parameter, the current node is geometrically decoded. For example, when it is determined based on the first parameter that the i-th non-zero child node of the current node does not include duplicate points, the encoding and decoding of the duplicate point information of the i-th non-zero child node is skipped, thereby reducing the encoding and decoding complexity of the point cloud, saving encoding and decoding time, and improving the encoding and decoding efficiency.
下面结合具体的实施例,对本申请实施例涉及的点云编解码方法进行介绍。The point cloud encoding and decoding method involved in the embodiments of the present application is introduced below in conjunction with specific embodiments.
首先,以解码端为例,对本申请实施例提供的点云解码方法进行介绍。First, taking the decoding end as an example, the point cloud decoding method provided in the embodiment of the present application is introduced.
图6为本申请一实施例提供的点云解码方法流程示意图。本申请实施例的点云解码方法可以由上述图3或图5所示的点云解码设备完成。Fig. 6 is a schematic diagram of a point cloud decoding method according to an embodiment of the present application. The point cloud decoding method according to the embodiment of the present application can be implemented by the point cloud decoding device shown in Fig. 3 or Fig. 5 above.
如图6所示,本申请实施例的点云解码方法包括:As shown in FIG6 , the point cloud decoding method of the embodiment of the present application includes:
S101、确定当前节点对应的第一参数;S101, determining a first parameter corresponding to the current node;
S102、基于第一参数,对当前节点进行几何解码。S102. Perform geometric decoding on the current node based on the first parameter.
其中,第一参数用于确定是否解码当前节点对应的重复点信息,当前节点为点云的八叉树中的一个非零节点。The first parameter is used to determine whether to decode the duplicate point information corresponding to the current node, and the current node is a non-zero node in the octree of the point cloud.
由上述可知,点云包括几何信息和属性信息,对点云的解码包括几何解码和属性解码。本申请实施例涉及点云的几何解码。也就是说,本申请实施例中涉及的已解码点指的是点云中几何信息已解码的点,未解码点指点云中几何信息未解码的点。As can be seen from the above, the point cloud includes geometric information and attribute information, and the decoding of the point cloud includes geometric decoding and attribute decoding. The embodiments of the present application relate to geometric decoding of the point cloud. That is, the decoded points involved in the embodiments of the present application refer to points in the point cloud whose geometric information has been decoded, and the undecoded points refer to points in the point cloud whose geometric information has not been decoded.
在一些实施例中,点云的几何信息也称为点云的位置信息,因此,点云的几何解码也称为点云的位置解码。In some embodiments, the geometric information of the point cloud is also referred to as the position information of the point cloud. Therefore, the geometric decoding of the point cloud is also referred to as the position decoding of the point cloud.
在基于八叉树的编码方式中,编码端基于点云的几何信息,构建点云的八叉树结构,例如图7所示,使用最小长方体包围点云,首先对该包围盒进行八叉树划分,得到8个节点,对这8个节点中被占用的节点,即包括点的节点继续进行八叉树划分,以此类推,直到划分到体素级别位置,例如划分到1X1X1的正方体为止。这样划分得到的点云八叉树结构包括多层节点组成,例如包括N层,在编码时,逐层编码每一层的占位信息,直到编码完最后一层的体素级别的叶子节点为止。也就是说,在八叉树编码中,将点云通八叉树划分,最终将点云中的点划分到八叉树的体素级的叶子节点中,通过对整个八叉树进行编码,实现对点云的编码。In the octree-based encoding method, the encoding end constructs the octree structure of the point cloud based on the geometric information of the point cloud. For example, as shown in Figure 7, the point cloud is enclosed by the smallest cuboid. The enclosing box is first divided into octrees to obtain 8 nodes. The occupied nodes among the 8 nodes, that is, the nodes including the points, continue to be divided into octrees, and so on, until the division is to the voxel level, for example, to a 1X1X1 cube. The point cloud octree structure obtained by such division includes multiple layers of nodes, for example, N layers. When encoding, the placeholder information of each layer is encoded layer by layer until the voxel-level leaf nodes of the last layer are encoded. That is to say, in octree encoding, the point cloud is divided through the octree, and finally the points in the point cloud are divided into the voxel-level leaf nodes of the octree. The encoding of the point cloud is achieved by encoding the entire octree.
对应的,解码端,首解码点云的几何码流,得到该点云的八叉树的根节点的占位信息,并基于该根节点的占位信息,确定出该根节点所包括的子节点,即八叉树的第2层包括的节点。接着,解码几何码流,得到第2层中的各节点的占位信息,并基于各节点的占位信息,确定出八叉树的第3层所包括的节点,依次类推。Correspondingly, the decoding end first decodes the geometric code stream of the point cloud to obtain the occupancy information of the root node of the octree of the point cloud, and based on the occupancy information of the root node, determines the child nodes included in the root node, that is, the nodes included in the second layer of the octree. Then, the geometric code stream is decoded to obtain the occupancy information of each node in the second layer, and based on the occupancy information of each node, determines the nodes included in the third layer of the octree, and so on.
本申请实施例对当前节点在八叉树中的具体位置不做限制。The embodiment of the present application does not limit the specific position of the current node in the octree.
在一些实施例中,当前节点为点云的八叉树中第N-1层的一个非零节点,N为八叉树的总层数,N为大于1的正整数。此时第一参数用于确定当前节点的至少一个非零子节点是否包括重复点,In some embodiments, the current node is a non-zero node at the N-1th layer in the octree of the point cloud, N is the total number of layers of the octree, and N is a positive integer greater than 1. In this case, the first parameter is used to determine whether at least one non-zero child node of the current node includes a duplicate point.
在一些实施例中,由于点云中的有些点的坐标信息相同,因此,这些坐标相同的点被划分到八叉树的同一个叶子节点上,使得该叶子节点包括重复点。In some embodiments, since some points in the point cloud have the same coordinate information, these points with the same coordinates are divided into the same leaf node of the octree, so that the leaf node includes repeated points.
目前编码端在对八叉树的第N-1层的节点进行编码时,不仅编码该节点的占位信息,还编码该节点的非零子节点(即叶子节点)的重复点信息。对应的,解码端在解码八叉树的第N-1层的节点时,不仅解码该节点的占位信息,还解码该节点的非零子节点的重复点信息。这样会增加解码的复杂度,浪费解码时间,降低解码效率。At present, when encoding the node of the N-1th layer of the octree, the encoder not only encodes the placeholder information of the node, but also encodes the repeated point information of the non-zero child nodes (i.e., leaf nodes) of the node. Correspondingly, when decoding the node of the N-1th layer of the octree, the decoder not only decodes the placeholder information of the node, but also decodes the repeated point information of the non-zero child nodes of the node. This will increase the complexity of decoding, waste decoding time, and reduce decoding efficiency.
由上述可知,在点云的八叉树中,并不是每一个叶子节点均包括重复点,甚至可以理解的是,点云的八叉树中只有较少的叶子节点包括重复点。基于此,本申请实施例中,在解码点云的八叉树的第N-1层的当前节点时,首先确定当前节点对应的第一参数,该第一参数用于确定当前节点的至少一个非零子节点(即叶子节点)是否包括重复点,进而基于该第一参数,对当前节点进行解码。例如,基于该第一参数确定当前节点的第i个非零子节点不包括重复点时,则跳过解码该第i个非零子节点的重复点信息,进而降低了点云的解码复杂度,节约了解码时间,进而提升了解码效率。From the above, it can be seen that in the octree of the point cloud, not every leaf node includes duplicate points. It can even be understood that only a few leaf nodes in the octree of the point cloud include duplicate points. Based on this, in an embodiment of the present application, when decoding the current node of the N-1th layer of the octree of the point cloud, the first parameter corresponding to the current node is first determined. The first parameter is used to determine whether at least one non-zero child node (i.e., leaf node) of the current node includes duplicate points, and then based on the first parameter, the current node is decoded. For example, when it is determined based on the first parameter that the i-th non-zero child node of the current node does not include duplicate points, the decoding of the duplicate point information of the i-th non-zero child node is skipped, thereby reducing the decoding complexity of the point cloud, saving decoding time, and improving decoding efficiency.
本申请实施例主要涉及点云八叉树的第N-1层中节点的解码过程,第N-1层也可以理解为该点云的八叉树的倒数第二层。The embodiments of the present application mainly relate to the decoding process of the nodes in the N-1th layer of the point cloud octree. The N-1th layer can also be understood as the second to last layer of the octree of the point cloud.
在解码八叉树的第N-1层中的非零节点时,不仅需要解码该非零节点的占位信息,还需要解码该节点的非零子节点所包括的重复点信息。其中,第N-1层的非零节点的非零子节点为八叉树的体素级的叶子节点,即最后一层节点。When decoding the non-zero nodes in the N-1th layer of the octree, it is necessary not only to decode the placeholder information of the non-zero node, but also to decode the repeated point information included in the non-zero child nodes of the node. The non-zero child nodes of the non-zero nodes in the N-1th layer are the voxel-level leaf nodes of the octree, that is, the last layer nodes.
本申请实施例中,对于八叉树的第N-1层中的每一个非零节点的解码过程基本相同,为了便于描述,以八叉树的第N-1层中的当前节点为例,对本申请实施例的解码过程进行介绍。In an embodiment of the present application, the decoding process for each non-zero node in the N-1th layer of the octree is basically the same. For the convenience of description, the decoding process of the embodiment of the present application is introduced by taking the current node in the N-1th layer of the octree as an example.
在一些实施例中,当前节点可以理解为八叉树的第N-1层中的任意一个非零节点,非零节点也称为非空节点,其中非零节点可以理解为包括至少一个非零子节点的节点,或者包括点云中至少一个点的节点。In some embodiments, the current node can be understood as any non-zero node in the N-1th layer of the octree, and the non-zero node is also called a non-empty node, where the non-zero node can be understood as a node including at least one non-zero child node, or a node including at least one point in the point cloud.
在一些实施例中,当前节点可以理解为八叉树的第N-1层中当前正等待解码的一个非零节点。In some embodiments, the current node may be understood as a non-zero node in the N-1th layer of the octree that is currently waiting to be decoded.
本申请实施例,在解码当前节点之前,首先确定当前节点对应的第一参数,进而基于该第一参数,对当前节点进行解码。本申请实施例中,确定当前节点对应的第一参数的方式不同,对应的基于第一参数,对当前节点进行解码的方式也不相同。下面对本申请实施例涉及的几种确定当前节点对应的第一参数,以及基于第一参数,对当前节点进行 解码的过程进行详细介绍。In the embodiment of the present application, before decoding the current node, the first parameter corresponding to the current node is first determined, and then the current node is decoded based on the first parameter. In the embodiment of the present application, the method for determining the first parameter corresponding to the current node is different, and the corresponding method for decoding the current node based on the first parameter is also different. The following is a detailed introduction to several methods for determining the first parameter corresponding to the current node and the process for decoding the current node based on the first parameter involved in the embodiment of the present application.
情况1,上述S101包括如下S101-A1至S101-A2的步骤:In case 1, the above S101 includes the following steps S101-A1 to S101-A2:
S101-A1、确定点云的总点数,以及第N-1层的非零节点数;S101-A1, determine the total number of points in the point cloud and the number of non-zero nodes in the N-1th layer;
S101-A2、基于点云的总点数和第N-1层的非零节点数,确定第一参数。S101-A2: Determine a first parameter based on the total number of points in the point cloud and the number of non-zero nodes in the N-1th layer.
在本申请实施例中,编码端基于广度优先遍历方式,对八叉树中的节点进行编码。对应的,解码端基于广度优先遍历方式,对八叉树中的节点进行解码。In the embodiment of the present application, the encoding end encodes the nodes in the octree based on the breadth-first traversal method. Correspondingly, the decoding end decodes the nodes in the octree based on the breadth-first traversal method.
在该情况1中,基于点云的总点数和点云的八叉树的第N-1层的非零节点数,确定当前节点对应的第一参数,该第一参数可以理解为当前点云中几何信息无法确定的点的个数。进而基于该第一参数,对当前节点进行解码,例如基于该第一参数,确定当前节点的非零子节点是否包括重复点,若基于该第一参数,确定当前节点的非零子节点不包括重复点时,则跳过节点当前节点的非零子节点的重复点信息,以降低点云的解码复杂度,节约解码时间,进而提升解码效率。In this case 1, the first parameter corresponding to the current node is determined based on the total number of points in the point cloud and the number of non-zero nodes in the N-1th layer of the octree of the point cloud. The first parameter can be understood as the number of points in the current point cloud whose geometric information cannot be determined. Then, based on the first parameter, the current node is decoded. For example, based on the first parameter, it is determined whether the non-zero child nodes of the current node include duplicate points. If it is determined based on the first parameter that the non-zero child nodes of the current node do not include duplicate points, the duplicate point information of the non-zero child nodes of the current node is skipped to reduce the decoding complexity of the point cloud, save decoding time, and thus improve decoding efficiency.
本申请实施例对解码端获得点云的总点数的具体方式不做限制。The embodiment of the present application does not limit the specific method in which the decoding end obtains the total number of points in the point cloud.
在一些实施例中,编码端将点云的总点数写入几何码流。这样,解码端通过解码几何码流,得到点云的总点数。In some embodiments, the encoding end writes the total number of points of the point cloud into the geometric code stream, so that the decoding end obtains the total number of points of the point cloud by decoding the geometric code stream.
在一些实施例中,编码端将点云的总点数写入点云的几何数据单元中。这样,解码端通过解码点云的几何数据单元,得到点云的总点数。In some embodiments, the encoding end writes the total number of points of the point cloud into the geometric data unit of the point cloud. In this way, the decoding end obtains the total number of points of the point cloud by decoding the geometric data unit of the point cloud.
在一些实施例中,由于点云至少包括一个点,为了节约码字,则编码端在编码点云的总点数时,对点云的总点数减一,得到第一值,将该第一值写入几何数据单元中,即第一值表示为slice_num_points_minus1。对应的,解码端在解码时,解码几何数据单元,得到第一值,接着对该第一值加1,得到点云的总点数。In some embodiments, since the point cloud includes at least one point, in order to save code words, when encoding the total number of points in the point cloud, the encoder subtracts one from the total number of points in the point cloud to obtain a first value, and writes the first value into the geometry data unit, that is, the first value is represented as slice_num_points_minus1. Correspondingly, when decoding, the decoder decodes the geometry data unit to obtain the first value, and then adds 1 to the first value to obtain the total number of points in the point cloud.
在一种示例中,几何数据单元的脚本语法(Geometry data unit footer syntax)如表2所示:In one example, the script syntax of the geometry data unit (Geometry data unit footer syntax) is shown in Table 2:
表2Table 2
Figure PCTCN2022122113-appb-000005
Figure PCTCN2022122113-appb-000005
表2中,slice_num_points_minus1加1,用于指定点云的总点数。比特流一致性要求slice_num_points_minus1加1应等于可解码点的数量。解码器不应依赖比特流一致性来防止实现缓冲区溢出。In Table 2, slice_num_points_minus1 plus 1 is used to specify the total number of points in the point cloud. Bitstream conformance requires that slice_num_points_minus1 plus 1 should be equal to the number of decodable points. Decoders should not rely on bitstream conformance to prevent implementation buffer overflows.
也就是说,解码端通过解码表2所示的几何数据单元,得到第一值即slice_num_points_minus1,并对第一值加1,得到点云的总点数。That is, the decoding end obtains the first value, namely, slice_num_points_minus1, by decoding the geometric data unit shown in Table 2, and adds 1 to the first value to obtain the total number of points in the point cloud.
示例性的,解码端基于如下公式(3),确定点云的总点数:Exemplarily, the decoding end determines the total number of points in the point cloud based on the following formula (3):
pointCount=(slice_num_points_minus1+1)        (3)pointCount=(slice_num_points_minus1+1)        (3)
其中,pointCount为点云的总点数。Among them, pointCount is the total number of points in the point cloud.
同理,本申请实施例对确定点云的八叉树的第N-1层的非零节点数的方式不做限制。Similarly, the embodiment of the present application does not limit the method of determining the number of non-zero nodes in the N-1th layer of the octree of the point cloud.
在一些实施例中,编码端可以将八叉树中第N-1层所包括的非零节点的个数写入几何码流。这样,解码端通过解码几何码流,可以得到第N-1层中非零节点的个数。In some embodiments, the encoder may write the number of non-zero nodes included in the N-1th layer in the octree into the geometry bitstream. In this way, the decoder may obtain the number of non-zero nodes in the N-1th layer by decoding the geometry bitstream.
在一些实施例中,由上述可知,编码端广度优先遍历方式,对八叉树的各层节点的占位信息进行编码,例如,基于第N-2层中各非零节点所包括的非零子节点,确定第N-2层各非零节点的占位信息,进而将各第N-2层中各非零节点的占位信息写入几何码流。这样,解码端解码第N-2层中各非零节点的占位信息,可以确定出第N-1层所包括的非零节点数。In some embodiments, it can be seen from the above that the encoding end encodes the placeholder information of the nodes of each layer of the octree in a breadth-first traversal manner, for example, based on the non-zero child nodes included in each non-zero node in the N-2th layer, determines the placeholder information of each non-zero node in the N-2th layer, and then writes the placeholder information of each non-zero node in the N-2th layer into the geometry code stream. In this way, the decoding end decodes the placeholder information of each non-zero node in the N-2th layer and can determine the number of non-zero nodes included in the N-1th layer.
举例说明,如图8所示,假设点云的八叉树包括4层,即N=4,第1层的根节点的占位信息为0000010,则说明八叉树的第2层中只有一个节点被占用,即第7个节点被占用。假设第2层中第7个节点的占用信息为01010101,则说明八叉树的第3层中有4个节点被占用。假设,第3层中第2个节点的占位信息为01010101,第3层中第4个节点的占位信息为01010100,第3层中第6个节点的占位信息为00000010,第4层中第8个节点的占位信息也为00000010。因此,在该实施例中,解码端可以基于点云的八叉树的第N-2层的占位信息,确定出第N-1层的非零节点数,例如第N-2层的占位信息为01010101,则说明第N-1层包括4个节点,这4个节点为被占用的节点,即非零节点。For example, as shown in Figure 8, assuming that the octree of the point cloud includes 4 layers, that is, N=4, and the placeholder information of the root node of the first layer is 0000010, it means that only one node in the second layer of the octree is occupied, that is, the 7th node is occupied. Assuming that the occupancy information of the 7th node in the second layer is 01010101, it means that 4 nodes in the third layer of the octree are occupied. Assuming that the placeholder information of the second node in the third layer is 01010101, the placeholder information of the fourth node in the third layer is 01010100, the placeholder information of the sixth node in the third layer is 00000010, and the placeholder information of the eighth node in the fourth layer is also 00000010. Therefore, in this embodiment, the decoding end can determine the number of non-zero nodes in the N-1 layer based on the placeholder information of the N-2 layer of the octree of the point cloud. For example, if the placeholder information of the N-2 layer is 01010101, it means that the N-1 layer includes 4 nodes, and these 4 nodes are occupied nodes, that is, non-zero nodes.
解码端通过上述方法,确定出点云的总点数和第N-1层的非零节点数后,基于该点云的总点数和第N-1层的非零节点数,确定当前节点对应的第一参数。After the decoding end determines the total number of points in the point cloud and the number of non-zero nodes in the N-1th layer through the above method, the first parameter corresponding to the current node is determined based on the total number of points in the point cloud and the number of non-zero nodes in the N-1th layer.
本申请实施例对基于点云的总点数和第N-1层的非零节点数,确定当前节点对应的第一参数的具体方式不做限制。The embodiment of the present application does not limit the specific method of determining the first parameter corresponding to the current node based on the total number of points in the point cloud and the number of non-zero nodes in the N-1th layer.
在一些实施例中,解码端将点云的总点数和第N-1层的非零节点数之间的差值,确定为第一参数。在该实施例中,确定出第N-1层中被占据的节点数,则可以确定被占据的节点至少包括一个非零子节点,也就是说,第N-1层中被占用节点至少对应一个点,因此,将点云的总点数与八叉树的第N-1层的非零节点数的差值,确定为点云中几何信息不确定的点的个数,即第一参数。例如,点云包括10个点,而第N-1层包括4个非零节点,则说明第N-1层的4个非零节点中每一个非零节点至少包括一个非零子节点,而一个非零子节点中至少包括一个点,因此,可以确定出当前点云中位置信息不确定的点的个数为10-4=6,进而确定当前节点对应的第一参数为6。In some embodiments, the decoding end determines the difference between the total number of points in the point cloud and the number of non-zero nodes in the N-1th layer as the first parameter. In this embodiment, by determining the number of occupied nodes in the N-1th layer, it can be determined that the occupied nodes include at least one non-zero child node, that is, the occupied nodes in the N-1th layer correspond to at least one point. Therefore, the difference between the total number of points in the point cloud and the number of non-zero nodes in the N-1th layer of the octree is determined as the number of points with uncertain geometric information in the point cloud, that is, the first parameter. For example, the point cloud includes 10 points, and the N-1th layer includes 4 non-zero nodes, which means that each of the 4 non-zero nodes in the N-1th layer includes at least one non-zero child node, and a non-zero child node includes at least one point. Therefore, it can be determined that the number of points with uncertain position information in the current point cloud is 10-4=6, and then the first parameter corresponding to the current node is determined to be 6.
在一种可能的实现方式中,基于如下公式(4)确定第一参数:In a possible implementation, the first parameter is determined based on the following formula (4):
resPointCount=(slice_num_points_minus1+1)–nodeCount      (4)resPointCount=(slice_num_points_minus1+1)–nodeCount      (4)
其中,resPointCount为当前节点对应的第一参数,(slice_num_points_minus1+1)为点云的总点数,nodeCount为点 云的八叉树的第N-1层包括的节点个数。Among them, resPointCount is the first parameter corresponding to the current node, (slice_num_points_minus1+1) is the total number of points in the point cloud, and nodeCount is the number of nodes included in the N-1th layer of the octree of the point cloud.
在一些实施例中,八叉树的第N-1层可以表示为occtree_depth_minus1,即八叉树深度occtree_depth减1,其中八叉树深度occtree_depth为N。In some embodiments, the N-1th layer of the octree can be expressed as occtree_depth_minus1, that is, the octree depth occtree_depth minus 1, where the octree depth occtree_depth is N.
基于上述方式确定出当前节点对应的第一参数后,执行上述S102的步骤,基于该第一参数,对当前节点进行解码。After the first parameter corresponding to the current node is determined based on the above method, the above step S102 is executed to decode the current node based on the first parameter.
在一些实施例中,若确定当前节点对应的第一参数为0,例如点云的总点数为a,点云的八叉树的第N-1层包括a个节点,此时确定出第一参数为0,则说明第N-1层中各节点包括一个非零子节点,且该非零子节点包括点云中的一个点,均不包括重复点。此时,对第N-1层中的节点进行解码时,跳过解码各非零节点的非零子节点的重复点信息,进而降低解码复杂度,节约解码时间。In some embodiments, if the first parameter corresponding to the current node is determined to be 0, for example, the total number of points in the point cloud is a, and the N-1th layer of the octree of the point cloud includes a nodes, then the first parameter is determined to be 0, which means that each node in the N-1th layer includes a non-zero child node, and the non-zero child node includes a point in the point cloud, and no duplicate points are included. At this time, when decoding the nodes in the N-1th layer, the duplicate point information of the non-zero child nodes of each non-zero node is skipped, thereby reducing the decoding complexity and saving decoding time.
在一些实施例中,若确定当前节点对应的第一参数不为0时,则上述S102如下情况1所示。In some embodiments, if it is determined that the first parameter corresponding to the current node is not 0, the above S102 is as shown in the following situation 1.
在情况1中,上述S102包括如下S102-A1至S102-A2的步骤:In case 1, the above S102 includes the following steps S102-A1 to S102-A2:
S102-A1、针对当前节点的第i个非零子节点,确定第i个非零子节点对应的第二参数,第二参数用于指示在解码第i个非零子节点时,点云中几何位置已解码的点的个数;S102-A1. For the i-th non-zero child node of the current node, determine a second parameter corresponding to the i-th non-zero child node, where the second parameter is used to indicate the number of points whose geometric positions in the point cloud have been decoded when decoding the i-th non-zero child node;
S102-A2、基于第一参数和第二参数,确定是否解码第i个非零子节点的重复点信息。S102-A2: Determine whether to decode the repeated point information of the i-th non-zero child node based on the first parameter and the second parameter.
在一些实施例,由上述可知,当前节点包括至少一个非零子节点,在解码当前节点时,确定是否解码当前节点所包括的每一个非零子节点的重复点信息的具体过程相同,为了便于描述,在此以当前节点的第i个非零子节点为例进行说明。也就是说,在该实施例中,当前节点为八叉树的第N-1层(即倒数第2层)中的非零节点,且当前节点采用八叉树编码,即对当前节点进行八叉树划分,得到至少一个体素级的叶子节点,第i个非零子节点为当前节点的一个体素级的叶子节点。In some embodiments, it can be seen from the above that the current node includes at least one non-zero child node. When decoding the current node, the specific process of determining whether to decode the repeated point information of each non-zero child node included in the current node is the same. For the convenience of description, the i-th non-zero child node of the current node is used as an example for explanation. That is, in this embodiment, the current node is a non-zero node in the N-1th layer (i.e., the second to last layer) of the octree, and the current node adopts octree encoding, that is, the current node is divided into an octree to obtain at least one voxel-level leaf node, and the i-th non-zero child node is a voxel-level leaf node of the current node.
在一些实施例中,若点云采用IDCM编码,即IDCM编码方式开启,若当前节点为八叉树的第N-1层中的一个非零节点,且当前节点采用IDCM编码,即对当前节点所包括的至少一个点直接进行解码,此时,当前节点的第i个非零子节点可以理解为当前节点中的一个点。In some embodiments, if the point cloud is encoded using IDCM, that is, the IDCM encoding method is turned on, if the current node is a non-zero node in the N-1th layer of the octree, and the current node is encoded using IDCM, that is, at least one point included in the current node is directly decoded, at this time, the i-th non-zero child node of the current node can be understood as a point in the current node.
在该情况1中,解码端基于上述S102-A1至S102-A2的步骤,确定出当前节点对应的第一参数,该第一参数可以理解为点云中当前位置信息未确定的点的个数。接着,确定出当前节点的第i个非零子节点对应的第二参数,该第二参数用于指示在解码第i个非零子节点时,点云中几何位置已解码的点的个数。最后,基于当前节点对应的第一参数和第i个非零子节点对应的第二参数,确定该第i个非零子节点是否包括重复点,进而确定是否解码该第i个非零子节点的重复点信息。In this case 1, the decoding end determines the first parameter corresponding to the current node based on the above steps S102-A1 to S102-A2. The first parameter can be understood as the number of points in the point cloud whose current position information is not determined. Next, the second parameter corresponding to the i-th non-zero child node of the current node is determined. The second parameter is used to indicate the number of points whose geometric positions in the point cloud have been decoded when decoding the i-th non-zero child node. Finally, based on the first parameter corresponding to the current node and the second parameter corresponding to the i-th non-zero child node, it is determined whether the i-th non-zero child node includes duplicate points, and then it is determined whether to decode the duplicate point information of the i-th non-zero child node.
下面对确定第i个非零子节点对应的第二参数的具体过程进行介绍。The specific process of determining the second parameter corresponding to the i-th non-zero child node is introduced below.
本申请实施例对确定当前第i个非零子节点对应的第二参数的具体方式不做限制。The embodiment of the present application does not limit the specific method of determining the second parameter corresponding to the current i-th non-zero child node.
在一些实施例中,在解码时,解码端实时记录当前点云中几何位置已解码的点的个数,进而在解码当前节点时,确定在解码第i个非零子节点的重复点信息之前,已经确定出的几何位置信息确定的点的个数。In some embodiments, during decoding, the decoding end records in real time the number of points whose geometric positions have been decoded in the current point cloud, and then when decoding the current node, determines the number of points determined by the geometric position information that has been determined before decoding the repeated point information of the i-th non-zero child node.
在一些实施例中,上述S102-A1中确定第i个非零子节点对应的第二参数包括如下S102-A11和S102-A12步骤:In some embodiments, determining the second parameter corresponding to the i-th non-zero child node in the above S102-A1 includes the following steps S102-A11 and S102-A12:
S102-A11、确定点云中第i个非零子节点对应的已解码点个数。S102-A11. Determine the number of decoded points corresponding to the i-th non-zero child node in the point cloud.
在该实施例中,解码端通过确定点云中第i个非零子节点对应的已解码点个数,并基于点云中该第i个非零子节点对应的已解码点个数,确定该第i个非零子节点对应的第二参数。例如,将点云中该第i个非零子节点对应的已解码点个数,确定为第i个非零子节点对应的第二参数。In this embodiment, the decoding end determines the number of decoded points corresponding to the i-th non-zero child node in the point cloud, and determines the second parameter corresponding to the i-th non-zero child node based on the number of decoded points corresponding to the i-th non-zero child node in the point cloud. For example, the number of decoded points corresponding to the i-th non-zero child node in the point cloud is determined as the second parameter corresponding to the i-th non-zero child node.
上述S102-A11的实现方式包括但不限于如下几种:The implementation methods of the above S102-A11 include but are not limited to the following:
方式一,若当前节点为第N-1层中的第一个非零节点,则上述S102-A11包括如下S102-A11-a1和S102-A11-a2的步骤:Method 1: if the current node is the first non-zero node in the N-1th layer, the above S102-A11 includes the following steps S102-A11-a1 and S102-A11-a2:
S102-A11-a1、确定当前节点的非零子节点个数;S102-A11-a1, determine the number of non-zero child nodes of the current node;
S102-A11-a2、基于当前节点的非零子节点个数,确定第i个非零子节点对应的已解码点个数。S102-A11-a2. Based on the number of non-zero child nodes of the current node, determine the number of decoded points corresponding to the i-th non-zero child node.
在该方式一中,若当前节点为八叉树的第N-1层中的第一个非零节点,则确定当前节点所包括的非零子节点个数,并基于当前节点的非零子节点个数,确定该第i个非零子节点对应的已解码点个数。In method 1, if the current node is the first non-zero node in the N-1th layer of the octree, the number of non-zero child nodes included in the current node is determined, and based on the number of non-zero child nodes of the current node, the number of decoded points corresponding to the i-th non-zero child node is determined.
其中,确定当前节点的非零子节点个数的方式包括至少包括如下几种示例:The method of determining the number of non-zero child nodes of the current node includes at least the following examples:
示例1,编码端将八叉树的第N-1层中每一个非零节点的非零子节点个数写入几何码流。这样,解码端通过解码几何码流,可以得到第N-1层中每一个非零节点的非零子节点个数,进而也可以得到当前节点的非零子节点个数。Example 1: The encoder writes the number of non-zero child nodes of each non-zero node in the N-1th layer of the octree into the geometry bitstream. In this way, the decoder can obtain the number of non-zero child nodes of each non-zero node in the N-1th layer by decoding the geometry bitstream, and further obtain the number of non-zero child nodes of the current node.
示例2,编码端将第N-1层中每一个非零节点的占位信息写入解码码流。示例性的,编码端基于第N-1层中的当前节点的各非零子节点的占用情况,确定该当前节点的占位信息,假设当前节点的8个子节点中,第2个子节点、第4个子节点、第6个子节点和第8个子节点被占用,因此确定当前节点的占位信息为01010101,且将该占位信息写入几何码流。这样,解码端在解码第N-1层中的当前节点时,解码得到该当前节点的占位信息为01010101,则可以确定出当前节点包括4个非零子节点。Example 2: The encoder writes the placeholder information of each non-zero node in the N-1th layer into the decoded code stream. Exemplarily, the encoder determines the placeholder information of the current node based on the occupancy of each non-zero child node of the current node in the N-1th layer. Assuming that among the 8 child nodes of the current node, the 2nd child node, the 4th child node, the 6th child node and the 8th child node are occupied, the placeholder information of the current node is determined to be 01010101, and the placeholder information is written into the geometric code stream. In this way, when the decoder decodes the current node in the N-1th layer, the placeholder information of the current node obtained by decoding is 01010101, and it can be determined that the current node includes 4 non-zero child nodes.
解码端确定出当前节点的非零子节点个数后,基于当前节点的非零子节点个数,确定第i个非零子节点对应的已解码点个数。After the decoding end determines the number of non-zero child nodes of the current node, the number of decoded points corresponding to the i-th non-zero child node is determined based on the number of non-zero child nodes of the current node.
其中,S102-A11-a2中基于当前节点的非零子节点个数,确定第i个非零子节点对应的已解码点个数的方式包括但不限于如下几种:Wherein, the method for determining the number of decoded points corresponding to the i-th non-zero child node based on the number of non-zero child nodes of the current node in S102-A11-a2 includes but is not limited to the following:
方式1,若第i个非零子节点为当前节点的第1个非零子节点,则将当前节点所包括的非零子节点的个数减1,确定为第i个非零子节点对应的已解码点个数。Method 1: If the i-th non-zero child node is the first non-zero child node of the current node, the number of non-zero child nodes included in the current node is reduced by 1 to determine the number of decoded points corresponding to the i-th non-zero child node.
举例说明,如图8所示,假设当前节点为图8中第3层中的第一个非零节点,当前节点的占位信息为01010101, 则可以确定出当前节点包括4个非零子节点。假设第i个非零子节点为当前节点的第1个非零子节点,由于当前节点的占位信息已知,则可以确定出当前节点的4个非零子节点的几何位置信息,因此当前节点所包括的4个非零子节点的几何位置信息已解码,即当前节点所包括的4个非零子节点对于当前节点中的第1个非零子节点为已解码点。需要说明的是,在上述确定第一参数时,已假设当前节点包括一个已解码点,因此,需要将当前节点所包括的非零子节点的个数减1,确定为第i个非零子节点对应的已解码点个数,例如确定的第i个非零子节点对应的已解码点个数为4-1=3。For example, as shown in FIG8 , assuming that the current node is the first non-zero node in the third layer in FIG8 , and the placeholder information of the current node is 01010101, it can be determined that the current node includes 4 non-zero child nodes. Assuming that the i-th non-zero child node is the first non-zero child node of the current node, since the placeholder information of the current node is known, the geometric position information of the 4 non-zero child nodes of the current node can be determined, so the geometric position information of the 4 non-zero child nodes included in the current node has been decoded, that is, the 4 non-zero child nodes included in the current node are decoded points for the first non-zero child node in the current node. It should be noted that when determining the first parameter above, it is assumed that the current node includes a decoded point, therefore, it is necessary to reduce the number of non-zero child nodes included in the current node by 1, and determine it as the number of decoded points corresponding to the i-th non-zero child node, for example, the number of decoded points corresponding to the i-th non-zero child node is determined to be 4-1=3.
方式2,若第i个非零子节点不是当前节点的第1个非零子节点,则获取当前节点中第i个非零子节点之前的非零子节点所包括的第一重复点个数之和;将当前节点所包括的非零子节点的个数减1后,再与第一重复点个数之和相加,得到第i个非零子节点对应的已解码点个数。Method 2: If the i-th non-zero child node is not the first non-zero child node of the current node, obtain the sum of the first number of repeated points included in the non-zero child nodes before the i-th non-zero child node in the current node; subtract 1 from the number of non-zero child nodes included in the current node, and then add it to the sum of the first number of repeated points to obtain the number of decoded points corresponding to the i-th non-zero child node.
在该方式2中,若当前节点的第i个非零子节点不是当前节点的第1个非零子节点,也就是说,在第i个子节点之前,已解码出当前节点的至少一个非零子节点,解码出的非零子节点中可能包括重复点,因此,在确定第i个子节点对应的已解码点个数时,需要考虑已解码的重复点个数。In method 2, if the i-th non-zero child node of the current node is not the first non-zero child node of the current node, that is, before the i-th child node, at least one non-zero child node of the current node has been decoded, the decoded non-zero child nodes may include duplicate points. Therefore, when determining the number of decoded points corresponding to the i-th child node, the number of decoded duplicate points needs to be considered.
具体是,若当前节点为第N-1层中的第1个非零节点,且当前节点的第i个非零子节点不是当前节点的第1个非零子节点,则获取当前节点中第i个非零子节点之前的非零子节点所包括的第一重复点个数之和;将当前节点所包括的非零子节点的个数减1后,再与第一重复点个数之和相加,得到第i个非零子节点对应的已解码点个数。Specifically, if the current node is the first non-zero node in the N-1th layer, and the i-th non-zero child node of the current node is not the first non-zero child node of the current node, then obtain the sum of the first number of repeated points included in the non-zero child nodes before the i-th non-zero child node in the current node; subtract 1 from the number of non-zero child nodes included in the current node, and then add it to the sum of the first number of repeated points to obtain the number of decoded points corresponding to the i-th non-zero child node.
举例说明,假设当前节点为图8中第3层中的第一个非零节点,当前节点的占位信息为01010101,则可以确定出当前节点包括4个非零子节点。假设当前节点的第1个子节点包括1个重复点,且假设第i个非零子节点为当前节点的第2个非零子节点。在确定是否节点当前节点的第2个非零子节点的重复点信息时,首先确定该第2个非零子节点对应的已解码点个数,具体是,第2个非零子节点对应的已解码点个数为当前节点所包括的非零子节点个数减1后,再加上当前节点的第1个子节点的1个重复点,得到第2个非零子节点对应的已解码点个数为4-1+1=4。For example, assuming that the current node is the first non-zero node in the third layer in Figure 8, and the placeholder information of the current node is 01010101, it can be determined that the current node includes 4 non-zero child nodes. Assume that the first child node of the current node includes 1 repeated point, and assume that the i-th non-zero child node is the second non-zero child node of the current node. When determining whether the node has repeated point information of the second non-zero child node of the current node, first determine the number of decoded points corresponding to the second non-zero child node. Specifically, the number of decoded points corresponding to the second non-zero child node is the number of non-zero child nodes included in the current node minus 1, plus 1 repeated point of the first child node of the current node, and the number of decoded points corresponding to the second non-zero child node is 4-1+1=4.
在一种示例中,解码端通过如下指令,记录当前节点中的第i个非零子节点对应的已解码点个数:In one example, the decoding end records the number of decoded points corresponding to the i-th non-zero child node in the current node through the following instructions:
for(index=0;index<nodeCount;index++){for(index=0;index<nodeCount;index++){
codedCount+=childCount-1codedCount+=childCount-1
for(idx=0;idx<childCount;idx++)for(idx=0;idx<childCount;idx++)
codedCount+=dupPointNum}codedCount+=dupPointNum}
其中,codedCount为当前节点中的第i个非零子节点对应的已解码点个数,codedCount初始化为0,nodeCount为八叉树的第N-1层中的节点个数,childCount为第N-1层中的节点所包括的非零子节点个数,dupPointNum为非零子节点所包括的重复点个数。Among them, codedCount is the number of decoded points corresponding to the i-th non-zero child node in the current node, codedCount is initialized to 0, nodeCount is the number of nodes in the N-1th layer of the octree, childCount is the number of non-zero child nodes included in the nodes in the N-1th layer, and dupPointNum is the number of duplicate points included in the non-zero child nodes.
上述方式一,假设当前节点为第N-1层中的第一个非零节点时,确定当前节点的第i个非零子节点对应的已解码点个数的过程进行介绍。In the above-mentioned method 1, assuming that the current node is the first non-zero node in the N-1th layer, the process of determining the number of decoded points corresponding to the i-th non-zero child node of the current node is introduced.
方式二,若当前节点不是第N-1层中的第一个非零节点,则上述S102-A11包括如下S102-A11-b1至S102-A11-b3的步骤:Method 2: If the current node is not the first non-zero node in the N-1th layer, the above S102-A11 includes the following steps S102-A11-b1 to S102-A11-b3:
S102-A11-b1、确定第N-1层中位于当前节点之前的各非零节点对应的已解码点的个数;S102-A11-b1, determine the number of decoded points corresponding to each non-zero node before the current node in the N-1th layer;
S102-A11-b2、确定当前节点的非零子节点个数;S102-A11-b2, determine the number of non-zero child nodes of the current node;
S102-A11-b3、基于第N-1层中位于当前节点之前的各非零节点对应的已解码点的个数,以及当前节点的非零子节点个数,确定第i个非零子节点对应的已解码点个数。S102-A11-b3. Determine the number of decoded points corresponding to the i-th non-zero child node based on the number of decoded points corresponding to each non-zero node before the current node in the N-1th layer and the number of non-zero child nodes of the current node.
在该方式二中,若当前节点不是八叉树的第N-1层中的第一个非零节点,则说明在解码当前节点之前,八叉树的第N-1层中已有至少一个非零节点解码完成,因此,在该实施例中,在确定当前节点的第i个非零子节点对应的已解码点个数时,首先确定八叉树的第N-1层中位于当前节点之前的各非零节点对应的已解码点的个数,接着,确定当前节点的非零子节点个数,进而基于第N-1层中位于当前节点之前的各非零节点对应的已解码点的个数,以及当前节点的非零子节点个数,确定第i个非零子节点对应的已解码点个数。In the second method, if the current node is not the first non-zero node in the N-1th layer of the octree, it means that before decoding the current node, at least one non-zero node in the N-1th layer of the octree has been decoded. Therefore, in this embodiment, when determining the number of decoded points corresponding to the i-th non-zero child node of the current node, first determine the number of decoded points corresponding to each non-zero node before the current node in the N-1th layer of the octree, then determine the number of non-zero child nodes of the current node, and then determine the number of decoded points corresponding to the i-th non-zero child node based on the number of decoded points corresponding to each non-zero node before the current node in the N-1th layer and the number of non-zero child nodes of the current node.
下面对S102-A11-b1中确定第N-1层中位于当前节点之前的各非零节点对应的已解码点的个数进行介绍。The following describes how to determine the number of decoded points corresponding to each non-zero node before the current node in the N-1th layer in S102-A11-b1.
在一种可能的实现方式中,首先确定当前节点之前的各非零节点所包括的非零子节点的个数,进而将该各非零节点所包括的非零子节点的个数进行相加,得到数值1。接着,确定该各非零节点对应的已解码出的重复点的总个数,进而将数值1与重复点的总个数相加,得到数值2,该数值2再减去第N-1层中位于当前节点之前的各非零节点的个数,得到第N-1层中位于当前节点之前的各非零节点对应的已解码点的个数。在该实施例中,解码端可以对N-1层各非零节点的非零子节点个数进行记录,同时,对已解码出的重复点个数进行单独记录,最后,基于单独记录的非零子节点个数和重复点个数,确定第N-1层中位于当前节点之前的各非零节点对应的已解码点的个数。In a possible implementation, the number of non-zero child nodes included in each non-zero node before the current node is first determined, and then the number of non-zero child nodes included in each non-zero node is added to obtain a value of 1. Next, the total number of decoded duplicate points corresponding to each non-zero node is determined, and then the value 1 is added to the total number of duplicate points to obtain a value of 2, and the number of non-zero nodes before the current node in the N-1 layer is subtracted from the value 2 to obtain the number of decoded points corresponding to each non-zero node before the current node in the N-1 layer. In this embodiment, the decoding end can record the number of non-zero child nodes of each non-zero node in the N-1 layer, and at the same time, separately record the number of decoded duplicate points. Finally, based on the separately recorded number of non-zero child nodes and the number of duplicate points, the number of decoded points corresponding to each non-zero node before the current node in the N-1 layer is determined.
举例说明,假设当前节点为图8所示的八叉树中的第3层中的第3个非零节点。在解码第3个非零节点时,第N-1层中位于第3个非零节点之前的第1个非零节点和第2个非零节点已解码完成。假设第1个非零节点的占位信息为01010101,且第1个非零节点的第1个非零子节点包括1个重复点,第2个非零节点的占位信息为01010100。在解码第3个非零节点时,确定第N-1层中位于当前节点之前的各非零节点对应的已解码点的个数。即确定第1个非零节点和第2个非零节点各自的非零子节点个数,由占位信息可知,第1个非零节点包括4个非零子节点,第2个非零节点包括3个非零子节点,因此,第1个非零节点和第2个非零节点共包括7个非零子节点。另外,解码得到第1个非零节点的第1个非零子节点包括1个重复点。由此可知,第3个非零节点之前的第1个非零节点和第2个非零节点对应的已解码点的个数为7+1-2=6。For example, assume that the current node is the third non-zero node in the third layer of the octree shown in FIG8 . When decoding the third non-zero node, the first non-zero node and the second non-zero node in the N-1th layer before the third non-zero node have been decoded. Assume that the placeholder information of the first non-zero node is 01010101, and the first non-zero child node of the first non-zero node includes 1 repeated point, and the placeholder information of the second non-zero node is 01010100. When decoding the third non-zero node, determine the number of decoded points corresponding to each non-zero node in the N-1th layer before the current node. That is, determine the number of non-zero child nodes of the first non-zero node and the second non-zero node respectively. It can be seen from the placeholder information that the first non-zero node includes 4 non-zero child nodes, and the second non-zero node includes 3 non-zero child nodes. Therefore, the first non-zero node and the second non-zero node include 7 non-zero child nodes in total. In addition, the first non-zero child node of the first non-zero node obtained by decoding includes 1 repeated point. Therefore, the number of decoded points corresponding to the first non-zero node and the second non-zero node before the third non-zero node is 7+1-2=6.
在另一种可能的实现方式中,解码端针对各非零节点中的一个非零节点,获取非零节点的非零子节点个数和非零子节点所包括的重复点个数;将非零节点的非零子节点个数减1后,与非零节点的非零子节点所包括的重复点个数之 和相加,得到非零节点对应的已解码点的个数。在该实现方式中,解码端确定八叉树的第N-1层中位于当前节点之前的各非零节点对应的已解码点的个数的方式相同,即解码端确定当前节点之前的各非零节点中每一个非零节点对应的已解码点的个数,最后将各非零节点对应的已解码点的个数进行求和。In another possible implementation, the decoding end obtains the number of non-zero child nodes and the number of repeated points included in the non-zero child node for one non-zero node among the non-zero nodes; subtracts 1 from the number of non-zero child nodes of the non-zero node, and adds the sum of the number of repeated points included in the non-zero child nodes of the non-zero node to obtain the number of decoded points corresponding to the non-zero node. In this implementation, the decoding end determines the number of decoded points corresponding to each non-zero node before the current node in the N-1th layer of the octree in the same manner, that is, the decoding end determines the number of decoded points corresponding to each non-zero node before the current node, and finally sums the number of decoded points corresponding to each non-zero node.
具体的,针对第N-1层中位于当前节点之前的每一个非零节点,首先基于该非零节点的占位信息,确定该非零节点所包括的非零子节点的个数,将非零节点的非零子节点个数减1,得到数值a。接着,确定该非零节点的非零子节点所包括的重复点个数之和,记为数值b。最后将数值a与数值b进行相加,得到该非零节点对应的已解码点的个数。按照该方法,可以确定出第N-1层中位于当前节点之前的每一个非零节点对应的已解码点的个数。Specifically, for each non-zero node located before the current node in the N-1th layer, first determine the number of non-zero child nodes included in the non-zero node based on the placeholder information of the non-zero node, subtract 1 from the number of non-zero child nodes of the non-zero node, and obtain the value a. Next, determine the sum of the number of repeated points included in the non-zero child nodes of the non-zero node, which is recorded as the value b. Finally, add the value a and the value b to obtain the number of decoded points corresponding to the non-zero node. According to this method, the number of decoded points corresponding to each non-zero node located before the current node in the N-1th layer can be determined.
举例说明,假设当前节点为图8所示的八叉树中的第3层中的第3个非零节点。在解码第3个非零节点时,第N-1层中位于第3个非零节点之前的第1个非零节点和第2个非零节点已解码完成。假设第1个非零节点的占位信息为01010101,且第1个非零节点的第1个非零子节点包括1个重复点,第2个非零节点的占位信息为01010100。在解码第3个非零节点时,确定第N-1层中位于当前节点之前的各非零节点对应的已解码点的个数。由占位信息可知,第1个非零节点包括4个非零子节点,第2个非零节点包括3个非零子节点,且第1个非零节点的第1个非零子节点包括1个重复点,则可以确定出第1个非零节点对应的已解码点个数为4-1+1=4,第2个非零节点对应的已解码点的个数为3-1=2。For example, assume that the current node is the third non-zero node in the third layer of the octree shown in Figure 8. When decoding the third non-zero node, the first non-zero node and the second non-zero node in the N-1th layer before the third non-zero node have been decoded. Assume that the placeholder information of the first non-zero node is 01010101, and the first non-zero child node of the first non-zero node includes 1 repeated point, and the placeholder information of the second non-zero node is 01010100. When decoding the third non-zero node, determine the number of decoded points corresponding to each non-zero node in the N-1th layer before the current node. From the placeholder information, we can see that the first non-zero node includes 4 non-zero child nodes, the second non-zero node includes 3 non-zero child nodes, and the first non-zero child node of the first non-zero node includes 1 repeated point. It can be determined that the number of decoded points corresponding to the first non-zero node is 4-1+1=4, and the number of decoded points corresponding to the second non-zero node is 3-1=2.
基于上述方法,确定出第N-1层中位于当前节点之前的各非零节点对应的已解码点的个数,同时,确定当前节点的非零子节点个数,其中确定当前节点的非零子节点个数的方式可以参照上述S102-A11-a1的描述,在此不再赘述。Based on the above method, the number of decoded points corresponding to each non-zero node located before the current node in the N-1th layer is determined, and at the same time, the number of non-zero child nodes of the current node is determined. The method for determining the number of non-zero child nodes of the current node can refer to the description of S102-A11-a1 above, and will not be repeated here.
接着,解码端基于第N-1层中位于当前节点之前的各非零节点对应的已解码点的个数,以及当前节点的非零子节点个数,确定第i个非零子节点对应的已解码点个数。Next, the decoding end determines the number of decoded points corresponding to the i-th non-zero child node based on the number of decoded points corresponding to each non-zero node before the current node in the N-1th layer and the number of non-zero child nodes of the current node.
本申请实施例对上述S102-A11-b3中基于第N-1层中位于当前节点之前的各非零节点对应的已解码点的个数,以及当前节点的非零子节点个数,确定第i个非零子节点对应的已解码点个数的具体实现方式不做限制。The embodiment of the present application does not limit the specific implementation method of determining the number of decoded points corresponding to the i-th non-zero child node in the above S102-A11-b3 based on the number of decoded points corresponding to each non-zero node located before the current node in the N-1th layer and the number of non-zero child nodes of the current node.
在一些实施例中,上述S102-A11-b3包括如下S102-A11-b31和S102-A11-b32的步骤:In some embodiments, the above S102-A11-b3 includes the following steps S102-A11-b31 and S102-A11-b32:
S102-A11-b31、将第N-1层中位于当前节点之前的各非零节点对应的已解码点的个数相加,得到第一和值;S102-A11-b31, adding the numbers of decoded points corresponding to the non-zero nodes before the current node in the N-1th layer to obtain a first sum value;
S102-A11-b32、基于第一和值和当前节点的非零子节点个数,确定第i个非零子节点对应的已解码点个数。S102-A11-b32. Determine the number of decoded points corresponding to the i-th non-zero child node based on the first sum and the number of non-zero child nodes of the current node.
在该实施例中,解码端基于上述方法,确定出八叉树的第N-1层中位于当前节点之前的各非零节点对应的已解码点的个数,接着,解码端将第N-1层中位于当前节点之前的各非零节点对应的已解码点的个数进行相加,得到第一和值,并基于该第一和值和当前节点的非零子节点个数,确定第i个非零子节点对应的已解码点个数,实现对第i个非零子节点对应的已解码点个数的准确确定。In this embodiment, the decoding end determines the number of decoded points corresponding to each non-zero node located before the current node in the N-1th layer of the octree based on the above method. Then, the decoding end adds the number of decoded points corresponding to each non-zero node located before the current node in the N-1th layer to obtain a first sum value, and determines the number of decoded points corresponding to the i-th non-zero child node based on the first sum value and the number of non-zero child nodes of the current node, thereby accurately determining the number of decoded points corresponding to the i-th non-zero child node.
其中,上述S102-A11-b32中基于第一和值和当前节点的非零子节点个数,确定第i个非零子节点对应的已解码点个数的实现方式至少包括如下两种方式:Among them, the implementation method of determining the number of decoded points corresponding to the i-th non-zero child node based on the first sum value and the number of non-zero child nodes of the current node in the above S102-A11-b32 includes at least the following two methods:
方式1,若第i个非零子节点为当前节点的第1个非零子节点,则将第一和值与当前节点所包括的非零子节点的个数进行相加,得到第二和值;对第二和值减1,得到第i个非零子节点对应的已解码点个数。Method 1: If the i-th non-zero child node is the first non-zero child node of the current node, then add the first sum value to the number of non-zero child nodes included in the current node to obtain the second sum value; subtract 1 from the second sum value to obtain the number of decoded points corresponding to the i-th non-zero child node.
在该方式1中,若当前节点不是第N-1层中的第一个非零节点,且当前节点的第i个非零子节点是当前节点的第1个非零子节点,则基于上述步骤,将第N-1层中位于当前节点之前的各已解码的非零节点的已解码点个数相加,得到第一和值。同时,由于当前节点的占位信息已解码出,因此可以确定出当前节点的各子节点的几何位置信息,因此将当前节点的各子节点确定为已解码点,进而将第一和值与当前节点的子节点个数相加,得到第二和值。另外,由于上述确定第一参数时,已经假设当前节点包括一个已解码点,因此,为了避免重复该已解码点重复计数,则将确定出的第二和值减1,得到第i个非零子节点对应的已解码点个数。In this method 1, if the current node is not the first non-zero node in the N-1th layer, and the i-th non-zero child node of the current node is the first non-zero child node of the current node, then based on the above steps, the number of decoded points of each decoded non-zero node located before the current node in the N-1th layer is added to obtain a first sum value. At the same time, since the placeholder information of the current node has been decoded, the geometric position information of each child node of the current node can be determined, so each child node of the current node is determined as a decoded point, and then the first sum value is added to the number of child nodes of the current node to obtain a second sum value. In addition, since it is assumed that the current node includes a decoded point when determining the first parameter above, in order to avoid repeated counting of the decoded point, the determined second sum value is subtracted by 1 to obtain the number of decoded points corresponding to the i-th non-zero child node.
举例说明,如图8所示,假设当前节点为图8中第3层中的第2个非零节点,当前节点的占位信息为01010100,则可以确定出当前节点包括3个非零子节点。假设第i个非零子节点为当前节点的第1个非零子节点,由于当前节点的占位信息已知,则可以确定出当前节点的3个非零子节点的几何位置信息,因此当前节点所包括的3个非零子节点的几何位置信息已解码。如图8所示,在第3层中位于当前节点之前的各非零节点为第3层中的第一个非零节点,假设该第一个非零节点的占位信息为01010101,且该第一个非零节点的第一个非零子节点包括一个重复点,因此,基于上述方法,可以确定出该第一个非零节点对应的已解码点的个数为4-1+1,即第一和值为4。接着,将该第一和值4与当前节点的非零子节点个数3相加,得到第二和值为4+3=7。需要说明的是,在上述确定第一参数时,已假设当前节点包括一个已解码点,因此,需要将上述确定的第二和值减1,得到第1个非零子节点对应的已解码点个数,例如确定的第1个非零子节点对应的已解码点个数为7-1=6。For example, as shown in FIG8 , assuming that the current node is the second non-zero node in the third layer in FIG8 , and the placeholder information of the current node is 01010100, it can be determined that the current node includes 3 non-zero child nodes. Assuming that the i-th non-zero child node is the first non-zero child node of the current node, since the placeholder information of the current node is known, the geometric position information of the three non-zero child nodes of the current node can be determined, so the geometric position information of the three non-zero child nodes included in the current node has been decoded. As shown in FIG8 , each non-zero node before the current node in the third layer is the first non-zero node in the third layer. Assuming that the placeholder information of the first non-zero node is 01010101, and the first non-zero child node of the first non-zero node includes a repeated point, therefore, based on the above method, it can be determined that the number of decoded points corresponding to the first non-zero node is 4-1+1, that is, the first sum is 4. Then, the first sum 4 is added to the number of non-zero child nodes of the current node 3, and the second sum is 4+3=7. It should be noted that when determining the first parameter above, it is assumed that the current node includes a decoded point. Therefore, it is necessary to subtract 1 from the second sum value determined above to obtain the number of decoded points corresponding to the first non-zero child node. For example, the number of decoded points corresponding to the first non-zero child node determined is 7-1=6.
方式2,若第i个非零子节点不是当前节点的第1个非零子节点,则将第一和值与当前节点所包括的非零子节点的个数进行相加,得到第二和值;对第二和值减1,得到第三和值;获取当前节点中位于第i个非零子节点之前的非零子节点所包括的第一重复点个数之和,并将第三和值与所述第一重复点个数之和相加,得到第i个非零子节点对应的已解码点个数。Method 2: If the i-th non-zero child node is not the first non-zero child node of the current node, then add the first sum value to the number of non-zero child nodes included in the current node to obtain a second sum value; subtract 1 from the second sum value to obtain a third sum value; obtain the sum of the first number of repeated points included in the non-zero child nodes before the i-th non-zero child node in the current node, and add the third sum value to the sum of the first number of repeated points to obtain the number of decoded points corresponding to the i-th non-zero child node.
在该方式2中,若当前节点不是第N-1层中的第一个非零节点,且当前节点的第i个非零子节点不是当前节点的第1个非零子节点,则基于上述步骤,将第N-1层中位于当前节点之前的各已解码的非零节点的已解码点个数相加,得到第一和值。同时,由于当前节点的占位信息已解码出,因此可以确定出当前节点的各子节点的几何位置信息,因此将当前节点的各子节点确定为已解码点,进而将第一和值与当前节点的子节点个数相加,得到第二和值。另外,由于上述确定第一参数时,已经假设当前节点包括一个已解码点,因此,为了避免重复该已解码点重复计数,则将确定出的第二和值减1,得到第三和值。在该方式2中,由于第i个子节点不是当前节点的第1个子节点,而当前节点中位于第i个子节点之前的子节点可能包括重复点,因此,需要获取当前节点中位于第i个非零子节点之前的非零子节点所包括的第一重复点个数之和,最后将第三和值与所述第一重复点个数之和相加,得到第i个非零子节点对应的已解码点个数。In this method 2, if the current node is not the first non-zero node in the N-1th layer, and the i-th non-zero child node of the current node is not the first non-zero child node of the current node, then based on the above steps, the number of decoded points of each decoded non-zero node before the current node in the N-1th layer is added to obtain a first sum value. At the same time, since the placeholder information of the current node has been decoded, the geometric position information of each child node of the current node can be determined, so each child node of the current node is determined as a decoded point, and then the first sum value is added to the number of child nodes of the current node to obtain a second sum value. In addition, since it is assumed that the current node includes a decoded point when determining the first parameter above, in order to avoid repeating the count of the decoded point, the determined second sum value is subtracted by 1 to obtain a third sum value. In method 2, since the i-th child node is not the first child node of the current node, and the child node before the i-th child node in the current node may include repeated points, it is necessary to obtain the sum of the first number of repeated points included in the non-zero child nodes before the i-th non-zero child node in the current node, and finally add the third sum value to the sum of the first number of repeated points to obtain the number of decoded points corresponding to the i-th non-zero child node.
举例说明,假设当前节点为图8中第3层中的第2个非零节点,当前节点的占位信息为01010100,则可以确定出当前节点包括3个非零子节点。假设第i个非零子节点为当前节点的第2个非零子节点,由于当前节点的占位信息已知,则可以确定出当前节点的3个非零子节点的几何位置信息,因此当前节点所包括的3个非零子节点的几何位置信息已解码。如图8所示,在第3层中位于当前节点之前的各非零节点为第3层中的第一个非零节点,假设该第一个非零节点的占位信息为01010101,因此,基于上述方法,可以确定出该第一个非零节点对应的已解码点的个数为4-1,即第一和值为3。接着,将该第一和值3与当前节点的非零子节点个数3相加,得到第二和值为3+3=6。需要说明的是,在上述确定第一参数时,已假设当前节点包括一个已解码点,因此,需要将上述确定的第二和值减1,得到第三数值,例如确定第三数值为6-1=5。假设当前节点的第1个非零子节点中包括1个重复点,将该1个重复点记为1个第一个重复点。这样第一重复点个数1与第三数值5进行相加,得到第i个非零子节点对应的已解码点个数为1+5=6。For example, assuming that the current node is the second non-zero node in the third layer in FIG8, and the placeholder information of the current node is 01010100, it can be determined that the current node includes 3 non-zero child nodes. Assuming that the i-th non-zero child node is the second non-zero child node of the current node, since the placeholder information of the current node is known, the geometric position information of the three non-zero child nodes of the current node can be determined, so the geometric position information of the three non-zero child nodes included in the current node has been decoded. As shown in FIG8, each non-zero node located before the current node in the third layer is the first non-zero node in the third layer. Assuming that the placeholder information of the first non-zero node is 01010101, based on the above method, it can be determined that the number of decoded points corresponding to the first non-zero node is 4-1, that is, the first sum value is 3. Then, the first sum value 3 is added to the number of non-zero child nodes of the current node 3, and the second sum value is 3+3=6. It should be noted that when determining the first parameter above, it is assumed that the current node includes a decoded point. Therefore, it is necessary to subtract 1 from the second sum value determined above to obtain the third value, for example, the third value is determined to be 6-1=5. Assuming that the first non-zero child node of the current node includes a repeated point, the repeated point is recorded as the first repeated point. In this way, the number of the first repeated points 1 is added to the third value 5, and the number of decoded points corresponding to the i-th non-zero child node is obtained as 1+5=6.
解码端基于上述S102-A11步骤,确定出当前节点的第i个非零子节点对应的已解码点个数后,执行如下S102-A12的步骤。After the decoding end determines the number of decoded points corresponding to the i-th non-zero child node of the current node based on the above step S102-A11, it executes the following step S102-A12.
S102-A12、基于点云中第i个非零子节点对应的已解码点个数,确定第i个非零子节点对应的第二参数。S102-A12. Determine a second parameter corresponding to the ith non-zero child node based on the number of decoded points corresponding to the ith non-zero child node in the point cloud.
本申请实施例中,解码端在解码当前节点时,确定是否解码当前节点的第i个非零子节点的重复点信息之前,首先基于上述步骤,确定第i个非零子节点对应的已解码点个数,进而基于该第i个非零子节点对应的已解码点个数,确定第i个非零子节点对应的第二参数,这样确定出的第二参数可以反映出解码第i个非零子节点时,点云中几何位置已解码的点的个数。最后,基于当前节点对应的第一参数和第i个非零子节点对应的第二参数,判断该第i个非零子节点是否包括重复点,进而确定是否解码该第i个非零子节点的重复点信息。In the embodiment of the present application, when decoding the current node, before the decoding end determines whether to decode the repeated point information of the i-th non-zero child node of the current node, it first determines the number of decoded points corresponding to the i-th non-zero child node based on the above steps, and then determines the second parameter corresponding to the i-th non-zero child node based on the number of decoded points corresponding to the i-th non-zero child node, so that the second parameter determined in this way can reflect the number of points decoded at the geometric position in the point cloud when decoding the i-th non-zero child node. Finally, based on the first parameter corresponding to the current node and the second parameter corresponding to the i-th non-zero child node, it is determined whether the i-th non-zero child node includes repeated points, and then it is determined whether to decode the repeated point information of the i-th non-zero child node.
针对一孤立点P,直接对其坐标进行压缩与采用八叉树方法压缩相比,具有更高的效率。这种直接对节点中的点的坐标进行编码的过程称为直接编码模式(Direct Coding Model,简称DCM)。当前节点是否使用DCM,可基于邻居节点的信息推断出,将这种方法叫做推断直接编码模式(Inter Direct Coding Model,简称IDCM)。For an isolated point P, directly compressing its coordinates is more efficient than using the octree method. This process of directly encoding the coordinates of the points in the node is called the Direct Coding Model (DCM). Whether the current node uses DCM can be inferred based on the information of neighboring nodes. This method is called the Inter Direct Coding Model (IDCM).
本申请实施例中,点云采用IDCM与不采用IDCM时,基于点云中第i个非零子节点对应的已解码点个数,确定第i个非零子节点对应的第二参数的方式不相同。下面针对点云采用DCM与不采用IDCM时,确定第i个非零子节点对应的第二参数的具体过程进行介绍。In the embodiment of the present application, when the point cloud adopts IDCM and does not adopt IDCM, the method of determining the second parameter corresponding to the i-th non-zero subnode based on the number of decoded points corresponding to the i-th non-zero subnode in the point cloud is different. The following introduces the specific process of determining the second parameter corresponding to the i-th non-zero subnode when the point cloud adopts DCM and does not adopt IDCM.
本申请实施例中,基于点云中第i个非零子节点对应的已解码点个数,确定第i个非零子节点对应的第二参数至少包括如下几种方式:In the embodiment of the present application, based on the number of decoded points corresponding to the i-th non-zero sub-node in the point cloud, determining the second parameter corresponding to the i-th non-zero sub-node includes at least the following methods:
方式1,若点云未采用IDCM,则将第i个非零子节点对应的已解码点个数,确定为第i个非零子节点对应的第二参数。Method 1: If the point cloud does not use IDCM, the number of decoded points corresponding to the i-th non-zero child node is determined as the second parameter corresponding to the i-th non-zero child node.
在该方式1中,若点云未采用IDCM,即IDCM关闭,此时说明在八叉树编码时,八叉树中的每个节点均为采用直接编码方式,因此,在解码当前节点时,除了上述确定的第i个非零子节点对应的已解码点外,不包括其他已解码点。基于此,可以直接将第i个非零子节点对应的已解码点个数,确定为第i个非零子节点对应的第二参数。In this method 1, if the point cloud does not use IDCM, that is, IDCM is turned off, it means that when encoding the octree, each node in the octree is directly encoded. Therefore, when decoding the current node, in addition to the decoded point corresponding to the i-th non-zero child node determined above, other decoded points are not included. Based on this, the number of decoded points corresponding to the i-th non-zero child node can be directly determined as the second parameter corresponding to the i-th non-zero child node.
方式2,若点云采用IDCM,则上述S102-A12包括如下S102-A121和S102-A122的步骤:Method 2: If the point cloud adopts IDCM, the above S102-A12 includes the following steps S102-A121 and S102-A122:
S102-A121、确定八叉树中已解码的第一节点所包括的点个数,第一节点为所述八叉树中采用IDCM的节点;S102-A121, determining the number of points included in the first decoded node in the octree, the first node being a node in the octree that adopts IDCM;
S102-A122、基于第i个非零子节点对应的已解码点个数,以及第一节点所包括的点个数,确定第i个非零子节点对应的第二参数。S102-A122: Determine a second parameter corresponding to the i-th non-zero child node based on the number of decoded points corresponding to the i-th non-zero child node and the number of points included in the first node.
在该方式2中,若点云采用IDCM,即IDCM开启,此时,说明点云的八叉树中可能有至少一个节点采用直接编码方式,将该节点所包括点的几何信息直接进行编码。对应的,解码时,直接解码得到该节点所包括点的几何信息。这样在确定第i个非零子节点对应的第二参数时,需要将八叉树中采用IDCM的已解码的第一节点所包括的点的个数,与上述确定的第i个非零子节点对应的已解码点个数进行相加。In this method 2, if the point cloud uses IDCM, that is, IDCM is turned on, then it means that at least one node in the octree of the point cloud may use direct coding to directly encode the geometric information of the points included in the node. Correspondingly, when decoding, the geometric information of the points included in the node is directly decoded. In this way, when determining the second parameter corresponding to the i-th non-zero child node, it is necessary to add the number of points included in the decoded first node using IDCM in the octree to the number of decoded points corresponding to the i-th non-zero child node determined above.
举例说明,假设点云的八叉树中,有1个节点采用IDCM,为了便于描述,将该节点记为第一节点,假设这第一节点包括1个点,假设在解码当前节点之前,这第一节点均已解码完成。因此,可以确定出八叉树中已解码的第一节点所包括的点个数为1。For example, suppose that in the octree of the point cloud, there is a node that uses IDCM. For the sake of description, this node is recorded as the first node. Suppose that this first node includes 1 point. Suppose that before decoding the current node, this first node has been decoded. Therefore, it can be determined that the number of points included in the decoded first node in the octree is 1.
确定出八叉树中已解码的第一节点所包括的点个数后,基于第i个非零子节点对应的已解码点个数,以及第一节点所包括的点个数,确定第i个非零子节点对应的第二参数。After determining the number of points included in the decoded first node in the octree, the second parameter corresponding to the i-th non-zero child node is determined based on the number of decoded points corresponding to the i-th non-zero child node and the number of points included in the first node.
在一些实施例中,若上述采用IDCM的第一节点包括重复点时,则第一节点所包括的点个数中包括第一节点中的重复点个数。In some embodiments, if the first node using IDCM includes repeated points, the number of points included in the first node includes the number of repeated points in the first node.
在一些实施例中,若当前节点也采用IDCM编码,则上述第一节点不包括当前节点。也就是说,若当前节点采用IDCM编码时,针对当前节点中的第i个非零节点(即当前节点所包括的第i个点),基于上述步骤,确定出八叉树中未采用IDCM编码的节点对应的已解码点个数(即第i个非零子节点对应的已解码点个数),以及确定出八叉树中采用IDCM编码的第一节点对应的已解码点个数,进而将八叉树中未采用IDCM编码的节点对应的已解码点个数和八叉树中采用IDCM编码的第一节点对应的已解码点个数,确定当前节点的第i个非零子节点对应的第二参数,进而基于该第二参数和第一参数,确定第i个非零子节点是否包括重复点。例如,若第二参数等于第一参数,则确定第i个非零子节点不包括重复点,则跳过解码该第i个非零子节点的重复点信息。再例如,若第二参数小于第一参数,则确定第i个非零子节点包括重复点,则可以解码该第i个非零子节点的重复点信息,或者进一步基于第i个非零子节点是否为八叉树中的最后一个节点来判断是否解码第i个非零子节点的重复点信息。In some embodiments, if the current node also adopts IDCM encoding, the above-mentioned first node does not include the current node. That is to say, if the current node adopts IDCM encoding, for the i-th non-zero node in the current node (i.e., the i-th point included in the current node), based on the above steps, the number of decoded points corresponding to the node that does not adopt IDCM encoding in the octree (i.e., the number of decoded points corresponding to the i-th non-zero child node) is determined, and the number of decoded points corresponding to the first node that adopts IDCM encoding in the octree is determined, and then the number of decoded points corresponding to the node that does not adopt IDCM encoding in the octree and the number of decoded points corresponding to the first node that adopts IDCM encoding in the octree are used to determine the second parameter corresponding to the i-th non-zero child node of the current node, and then based on the second parameter and the first parameter, it is determined whether the i-th non-zero child node includes duplicate points. For example, if the second parameter is equal to the first parameter, it is determined that the i-th non-zero child node does not include duplicate points, and the decoding of the duplicate point information of the i-th non-zero child node is skipped. For another example, if the second parameter is less than the first parameter, it is determined that the i-th non-zero child node includes a duplicate point, and the duplicate point information of the i-th non-zero child node can be decoded, or further based on whether the i-th non-zero child node is the last node in the octree, it is determined whether to decode the duplicate point information of the i-th non-zero child node.
在一种可能的实现方式中,若第一节点不是第N-1层中的节点,则将第i个非零子节点对应的已解码点个数和第一节点所包括的点个数之和,确定为第i个非零子节点对应的第二参数。In one possible implementation, if the first node is not a node in the N-1th layer, the sum of the number of decoded points corresponding to the i-th non-zero child node and the number of points included in the first node is determined as the second parameter corresponding to the i-th non-zero child node.
由上述可知,第i个非零子节点对应的已解码点个数与八叉树中第N-1层所包括的非零节点的个数有关,即在确定第i个非零子节点对应的已解码点个数时,假设第N-1层中的每一个非零节点包括一个已解码点。在该实施例中,若第一节点不是第N-1层中的节点,则不影响上述确定第i个非零子节点对应的已解码点个数的过程,即上述确定的 第i个非零子节点对应的已解码点中不包括该第一节点所包括的点,因此,在该实施例中,可以直接将第i个非零子节点对应的已解码点个数和第一节点所包括的点个数之和,确定为第i个非零子节点对应的第二参数。As can be seen from the above, the number of decoded points corresponding to the ith non-zero child node is related to the number of non-zero nodes included in the N-1th layer in the octree, that is, when determining the number of decoded points corresponding to the ith non-zero child node, it is assumed that each non-zero node in the N-1th layer includes a decoded point. In this embodiment, if the first node is not a node in the N-1th layer, it does not affect the above process of determining the number of decoded points corresponding to the ith non-zero child node, that is, the decoded points corresponding to the ith non-zero child node determined above do not include the points included in the first node. Therefore, in this embodiment, the sum of the number of decoded points corresponding to the ith non-zero child node and the number of points included in the first node can be directly determined as the second parameter corresponding to the ith non-zero child node.
在该实施例的一种示例中,解码端通过如下指令,确定为第i个非零子节点对应的第二参数:In an example of this embodiment, the decoding end determines the second parameter corresponding to the i-th non-zero child node through the following instruction:
for(index=0;index<nodeCount;index++){for(index=0;index<nodeCount;index++){
codedCount+=childCount-1codedCount+=childCount-1
for(idx=0;idx<childCount;idx++)for(idx=0;idx<childCount;idx++)
codedCount+=dupPointNum}codedCount+=dupPointNum}
codedCount+=pointCountIDCMcodedCount+=pointCountIDCM
其中,pointCountICM表示八叉树中采用IDCM的已解码的第一节点所包括的点个数。在该实施例中,基于当前节点所包括的非零子节点的个数childCount,以及当前节点中第i个子节点之前已解码的重复点个数dupPointNum,确定出可以第i个非零子节点对应的已解码点个数codedCount后,对codedCount加上八叉树中已解码的第一节点所包括的点个数pointCountIDCM,得到第i个非零子节点对应的第二参数。Wherein, pointCountICM represents the number of points included in the decoded first node using IDCM in the octree. In this embodiment, based on the number of non-zero child nodes included in the current node, childCount, and the number of repeated points decoded before the i-th child node in the current node, dupPointNum, after determining the number of decoded points codedCount corresponding to the i-th non-zero child node, the number of points pointCountIDCM included in the decoded first node in the octree is added to codedCount to obtain the second parameter corresponding to the i-th non-zero child node.
在另一种可能的实现方式中,若第一节点是所述第N-1层中的节点,则将第i个非零子节点对应的已解码点个数和第一节点所包括的点个数之和减1后的值,确定为第i个非零子节点对应的第二参数。In another possible implementation, if the first node is a node in the N-1th layer, the value obtained by subtracting 1 from the sum of the number of decoded points corresponding to the i-th non-zero child node and the number of points included in the first node is determined as the second parameter corresponding to the i-th non-zero child node.
由上述可知,第i个非零子节点对应的已解码点个数与八叉树中第N-1层所包括的非零节点的个数有关,即在确定第i个非零子节点对应的已解码点个数时,假设第N-1层中的每一个非零节点包括一个已解码点。在该实施例中,若第一节点是第N-1层中的节点,则会影响上述确定第i个非零子节点对应的已解码点个数的过程,即上述确定的第i个非零子节点对应的已解码点中已经包括该第一节点所包括的一个点,因此,在该实施例中,将第i个非零子节点对应的已解码点个数和第一节点所包括的点个数进行相加后,减去重复计算的一个已解码点,得到第i个非零子节点对应的第二参数。As can be seen from the above, the number of decoded points corresponding to the ith non-zero child node is related to the number of non-zero nodes included in the N-1th layer in the octree, that is, when determining the number of decoded points corresponding to the ith non-zero child node, it is assumed that each non-zero node in the N-1th layer includes a decoded point. In this embodiment, if the first node is a node in the N-1th layer, it will affect the above process of determining the number of decoded points corresponding to the ith non-zero child node, that is, the decoded points corresponding to the ith non-zero child node determined above already include a point included in the first node. Therefore, in this embodiment, after adding the number of decoded points corresponding to the ith non-zero child node and the number of points included in the first node, a decoded point that is repeatedly calculated is subtracted to obtain the second parameter corresponding to the ith non-zero child node.
在该实施例的一种示例中,解码端通过如下指令,确定为第i个非零子节点对应的第二参数:In an example of this embodiment, the decoding end determines the second parameter corresponding to the i-th non-zero child node through the following instruction:
for(index=0;index<nodeCount;index++){for(index=0;index<nodeCount;index++){
codedCount+=childCount-1codedCount+=childCount-1
for(idx=0;idx<childCount;idx++)for(idx=0;idx<childCount;idx++)
codedCount+=dupPointNum}codedCount+=dupPointNum}
codedCount+=pointCountIDCM-1codedCount+=pointCountIDCM-1
在该实施例中,基于当前节点所包括的非零子节点的个数childCount,以及当前节点中第i个子节点之前已解码的重复点个数dupPointNum,确定出可以第i个非零子节点对应的已解码点个数codedCount后,对codedCount加上八叉树中已解码的第一节点所包括的点个数pointCountIDCM-1,得到第i个非零子节点对应的第二参数。In this embodiment, based on the number childCount of non-zero child nodes included in the current node and the number dupPointNum of repeated points decoded before the i-th child node in the current node, after determining the number of decoded points codedCount corresponding to the i-th non-zero child node, the number of points pointCountIDCM-1 included in the first decoded node in the octree is added to codedCount to obtain the second parameter corresponding to the i-th non-zero child node.
在该情况1中,基于上述步骤,确定出当前节点的第i个非零子节点对应的第二参数后,执行上述S102-A2,以基于第一参数和第二参数,确定是否解码第i个非零子节点的重复点信息。In this case 1, after determining the second parameter corresponding to the i-th non-zero child node of the current node based on the above steps, execute the above S102-A2 to determine whether to decode the repeated point information of the i-th non-zero child node based on the first parameter and the second parameter.
其中S102-A2中基于第一参数和第二参数,确定是否解码第i个非零子节点的重复点信息的实现方式包括但不限于如下几种方式:The implementation of determining whether to decode the repeated point information of the i-th non-zero child node based on the first parameter and the second parameter in S102-A2 includes but is not limited to the following methods:
方式1,若第一参数等于第二参数,则跳过解码第i个非零子节点的重复点信息。Method 1: If the first parameter is equal to the second parameter, skip decoding the repeated point information of the i-th non-zero child node.
由上述可知,当前节点对应的第一参数可以理解为在解码当前节点时,点云中几何位置信息不确定的点的个数,或者可以理解为未解码的点的个数。当前节点的第i个非零子节点对应的第二参数,可以理解为当前已解码的点的个数。From the above, it can be seen that the first parameter corresponding to the current node can be understood as the number of points with uncertain geometric position information in the point cloud when decoding the current node, or it can be understood as the number of undecoded points. The second parameter corresponding to the i-th non-zero child node of the current node can be understood as the number of currently decoded points.
在该方式1中,若确定的当前节点对应的第一参数等于当前节点中第i个非零子节点对应的第二参数,则说明第i个非零子节点以及后续的未解码叶子节点中均不包括重复点,因此,跳过解码第i个非零子节点的重复点信息,以节约解码时间。In method 1, if the first parameter corresponding to the determined current node is equal to the second parameter corresponding to the i-th non-zero child node in the current node, it means that the i-th non-zero child node and subsequent undecoded leaf nodes do not include duplicate points. Therefore, the decoding of the duplicate point information of the i-th non-zero child node is skipped to save decoding time.
举例说明,假设该点云包括10个点,假设当前节点为图8中第3层中的第2个非零节点,当前节点所在的八叉树的第N-1层包括4个非零节点,因此,可以确定出当前节点对应的第一参数为10-4=6。For example, assuming that the point cloud includes 10 points, assuming that the current node is the second non-zero node in the third layer in Figure 8, and the N-1th layer of the octree where the current node is located includes 4 non-zero nodes, therefore, it can be determined that the first parameter corresponding to the current node is 10-4=6.
假设当前节点的占位信息为01010100,则可以确定出当前节点包括3个非零子节点。假设第i个非零子节点为当前节点的第2个非零子节点,由于当前节点的占位信息已知,则可以确定出当前节点的3个非零子节点的几何位置信息,因此当前节点所包括的3个非零子节点的几何位置信息已解码。如图8所示,在第3层中位于当前节点之前的各非零节点为第3层中的第一个非零节点,假设该第一个非零节点的占位信息为01010101,假设当前节点的第1个非零子节点中包括1个重复点,因此,基于上述方法,可以确定出第i个非零子节点对应的已解码点个数为4-1+3-1+1=6。在该实施例中,假设点云不采用IDCM,则将第i个非零子节点对应的已解码点个数6确定为第i个非零子节点对应的第二参数。Assuming that the placeholder information of the current node is 01010100, it can be determined that the current node includes 3 non-zero child nodes. Assuming that the i-th non-zero child node is the second non-zero child node of the current node, since the placeholder information of the current node is known, the geometric position information of the three non-zero child nodes of the current node can be determined, so the geometric position information of the three non-zero child nodes included in the current node has been decoded. As shown in Figure 8, each non-zero node located before the current node in the third layer is the first non-zero node in the third layer. Assuming that the placeholder information of the first non-zero node is 01010101, assuming that the first non-zero child node of the current node includes 1 repeated point, therefore, based on the above method, it can be determined that the number of decoded points corresponding to the i-th non-zero child node is 4-1+3-1+1=6. In this embodiment, assuming that the point cloud does not use IDCM, the number of decoded points corresponding to the i-th non-zero child node, 6, is determined as the second parameter corresponding to the i-th non-zero child node.
在该示例中,当前节点对应的第一参数6等于第i个非零子节点对应的第二参数6,因此,跳过解码第i个非零子节点的重复点信息。In this example, the first parameter 6 corresponding to the current node is equal to the second parameter 6 corresponding to the i-th non-zero child node, and therefore, decoding of the repeated point information of the i-th non-zero child node is skipped.
方式2,第一参数大于第二参数,且第i个非零子节点为八叉树的最后一个体素节点,则跳过解码第i个非零子节点的重复点信息,且将第一参数与所述第二参数的差值,确定为第i个非零子节点所包括的重复点个数。Method 2: if the first parameter is greater than the second parameter and the i-th non-zero child node is the last voxel node of the octree, then the decoding of the duplicate point information of the i-th non-zero child node is skipped, and the difference between the first parameter and the second parameter is determined as the number of duplicate points included in the i-th non-zero child node.
在该方式2中,若确定的当前节点对应的第一参数等于当前节点中第i个非零子节点对应的第二参数,则说明表示第i个非零子节点以及后续的未解码叶子节点中可能包括重复点,同时,由于第i个非零子节点为八叉树的最后一个非零体素节点,则说明,该第i个非零子节点一定包括重复点,且第i个非零子节点包括的重复点的个数为第一参数与所述第二参数的差值。In method 2, if the first parameter corresponding to the determined current node is equal to the second parameter corresponding to the i-th non-zero child node in the current node, it means that the i-th non-zero child node and subsequent undecoded leaf nodes may include duplicate points. At the same time, since the i-th non-zero child node is the last non-zero voxel node of the octree, it means that the i-th non-zero child node must include duplicate points, and the number of duplicate points included in the i-th non-zero child node is the difference between the first parameter and the second parameter.
举例说明,假设该点云包括10个点,假设当前节点为图8中第3层中的第4个非零节点,当前节点所在的八叉树的第N-1层包括4个非零节点,因此,可以确定出当前节点对应的第一参数为10-4=6。For example, assuming that the point cloud includes 10 points, assuming that the current node is the fourth non-zero node in the third layer in Figure 8, and the N-1th layer of the octree where the current node is located includes 4 non-zero nodes, therefore, it can be determined that the first parameter corresponding to the current node is 10-4=6.
假设当前节点的占位信息为00000010,则可以确定出当前节点包括1个非零子节点。假设第i个非零子节点为当前节点的唯一一个非零子节点,由于当前节点的占位信息已知,则可以确定出当前节点的1个非零子节点的几何位置信息,因此当前节点所包括的1个非零子节点的几何位置信息已解码。如图8所示,在第3层中位于当前节点之前的各非零节点为第3层中的第一个非零节点、第二个非零节点、第三个非零节点,假设该第一个非零节点的占位信息为01010101,第一个非零节点的占位信息为01010100,第一个非零节点的占位信息为00000100,前3个非零节点的非零子节点中均不包括重复点。基于上述方法,可以确定出第i个非零子节点对应的已解码点个数为4-1+3-1+1-1+1-1=5。在该实施例中,假设点云不采用IDCM,则将第i个非零子节点对应的已解码点个数5确定为第i个非零子节点对应的第二参数。Assuming that the placeholder information of the current node is 00000010, it can be determined that the current node includes 1 non-zero child node. Assuming that the i-th non-zero child node is the only non-zero child node of the current node, since the placeholder information of the current node is known, the geometric position information of 1 non-zero child node of the current node can be determined, so the geometric position information of 1 non-zero child node included in the current node has been decoded. As shown in Figure 8, the non-zero nodes before the current node in the third layer are the first non-zero node, the second non-zero node, and the third non-zero node in the third layer. Assuming that the placeholder information of the first non-zero node is 01010101, the placeholder information of the first non-zero node is 01010100, and the placeholder information of the first non-zero node is 00000100, the non-zero child nodes of the first three non-zero nodes do not include repeated points. Based on the above method, it can be determined that the number of decoded points corresponding to the i-th non-zero child node is 4-1+3-1+1-1+1-1=5. In this embodiment, assuming that the point cloud does not adopt IDCM, the number of decoded points 5 corresponding to the i-th non-zero child node is determined as the second parameter corresponding to the i-th non-zero child node.
由上述可知,第一参数6大于第二参数5,且第i个非零子节点为八叉树的最后一个非零子节点,因此,可以确定第i个非零子节点一定包括重复点,且包括的重复点的个数为6-5=1,跳过解码第i个非零子节点的重复点信息,进而节约解码时间,提升解码效率。From the above, it can be seen that the first parameter 6 is greater than the second parameter 5, and the i-th non-zero child node is the last non-zero child node of the octree. Therefore, it can be determined that the i-th non-zero child node must include repeated points, and the number of repeated points included is 6-5=1. The repeated point information of the i-th non-zero child node is skipped for decoding, thereby saving decoding time and improving decoding efficiency.
方式3,第一参数大于第二参数,且第i个非零子节点不是八叉树的最后一个体素节点,则解码第i个非零子节点的重复点信息。Mode 3: If the first parameter is greater than the second parameter and the i-th non-zero child node is not the last voxel node of the octree, the duplicate point information of the i-th non-zero child node is decoded.
在该方式3中,若确定的当前节点对应的第一参数等于当前节点中第i个非零子节点对应的第二参数,则说明表示第i个非零子节点以及后续的未解码叶子节点中可能包括重复点,因此,为了保证解码的准确性,则解码第i个非零子节点的重复点信息。In method 3, if the first parameter corresponding to the determined current node is equal to the second parameter corresponding to the i-th non-zero child node in the current node, it means that the i-th non-zero child node and subsequent undecoded leaf nodes may include duplicate points. Therefore, in order to ensure the accuracy of decoding, the duplicate point information of the i-th non-zero child node is decoded.
举例说明,假设该点云包括10个点,假设当前节点为图8中第3层中的第2个非零节点,当前节点所在的八叉树的第N-1层包括4个非零节点,因此,可以确定出当前节点对应的第一参数为10-4=6。For example, assuming that the point cloud includes 10 points, assuming that the current node is the second non-zero node in the third layer in Figure 8, and the N-1th layer of the octree where the current node is located includes 4 non-zero nodes, therefore, it can be determined that the first parameter corresponding to the current node is 10-4=6.
假设当前节点的占位信息为01010100,则可以确定出当前节点包括3个非零子节点。假设第i个非零子节点为当前节点的第2个非零子节点,由于当前节点的占位信息已知,则可以确定出当前节点的3个非零子节点的几何位置信息,因此当前节点所包括的3个非零子节点的几何位置信息已解码。如图8所示,在第3层中位于当前节点之前的各非零节点为第3层中的第一个非零节点,假设该第一个非零节点的占位信息为01010101,假设当前节点的第3个非零子节点中包括1个重复点,因此,基于上述方法,可以确定出第i个非零子节点对应的已解码点个数为4-1+3-1=5。在该实施例中,假设点云不采用IDCM,则将第i个非零子节点对应的已解码点个数5确定为第i个非零子节点对应的第二参数。Assuming that the placeholder information of the current node is 01010100, it can be determined that the current node includes 3 non-zero child nodes. Assuming that the i-th non-zero child node is the second non-zero child node of the current node, since the placeholder information of the current node is known, the geometric position information of the three non-zero child nodes of the current node can be determined, so the geometric position information of the three non-zero child nodes included in the current node has been decoded. As shown in Figure 8, each non-zero node located before the current node in the third layer is the first non-zero node in the third layer. Assuming that the placeholder information of the first non-zero node is 01010101, assuming that the third non-zero child node of the current node includes 1 repeated point, therefore, based on the above method, it can be determined that the number of decoded points corresponding to the i-th non-zero child node is 4-1+3-1=5. In this embodiment, assuming that the point cloud does not use IDCM, the number of decoded points 5 corresponding to the i-th non-zero child node is determined as the second parameter corresponding to the i-th non-zero child node.
在该示例中,若当前节点对应的第一参数6大于第i个非零子节点对应的第二参数5,且第i个非零子节点不是八叉树的最后一个体素节点时,解码第i个非零子节点的重复点信息。In this example, if the first parameter 6 corresponding to the current node is greater than the second parameter 5 corresponding to the i-th non-zero child node, and the i-th non-zero child node is not the last voxel node of the octree, the duplicate point information of the i-th non-zero child node is decoded.
上述情况1,基于点云的总点数和八叉树的第N-1层的非零节点数,确定当前节点对应的第一参数,并确定当前节点的第i个非零子节点对应的第二参数,基于第一参数和第二参数,确定是否解码该第i个非零子节点的重复点信息,例如,若第一参数等于第二参数,则跳过解码该第i个非零子节点的重复点信息,进而降低了点云的解码复杂度,节约了解码时间,进而提升了解码效率。In the above situation 1, based on the total number of points in the point cloud and the number of non-zero nodes in the N-1th layer of the octree, the first parameter corresponding to the current node is determined, and the second parameter corresponding to the i-th non-zero child node of the current node is determined. Based on the first parameter and the second parameter, it is determined whether to decode the duplicate point information of the i-th non-zero child node. For example, if the first parameter is equal to the second parameter, the decoding of the duplicate point information of the i-th non-zero child node is skipped, thereby reducing the decoding complexity of the point cloud, saving decoding time, and improving decoding efficiency.
下面对情况2中,确定当前节点对应的第一参数,以及基于该第一参数对当前节点的几何解码过程进行介绍。The following introduces the process of determining the first parameter corresponding to the current node in situation 2 and performing geometric decoding of the current node based on the first parameter.
情况2,上述S101包括如下步骤:In case 2, the above S101 includes the following steps:
S101-B1、针对当前节点中的第i个非零子节点,确定第i个非零子节点对应的已解码重复点总数;S101-B1, for the i-th non-zero child node in the current node, determine the total number of decoded repeated points corresponding to the i-th non-zero child node;
S101-B2、将第i个非零子节点对应的已解码重复点总数,确定为第一参数。S101-B2. Determine the total number of decoded repeated points corresponding to the i-th non-zero child node as the first parameter.
在该情况2中,在确定当前节点的第i个非零子节点是否包括重复点时,首先确定该第i个非零子节点对应的已解码重复点个数,其中第i个非零子节点对应的已解码重复点可以理解为在解码第i个非零子节点的重复点信息之前,解码端已经解码出的重复点。In this case 2, when determining whether the i-th non-zero child node of the current node includes repeated points, the number of decoded repeated points corresponding to the i-th non-zero child node is first determined, where the decoded repeated points corresponding to the i-th non-zero child node can be understood as the repeated points that have been decoded by the decoding end before decoding the repeated point information of the i-th non-zero child node.
在一些实施例中,解码端使用dupCount记录已解码出的重复点的个数,其中dupCount初始化为0。In some embodiments, the decoding end uses dupCount to record the number of duplicate points that have been decoded, where dupCount is initialized to 0.
在一种示例中,解码端使用如下指令,记录已解码重复点个数:In one example, the decoding end uses the following instruction to record the number of decoded repeated points:
dupCount+=dupPointNumdupCount+=dupPointNum
其中,dupPointNum表示八叉树的一个叶子节点中所包括重复点的个数。Wherein, dupPointNum represents the number of duplicate points included in a leaf node of the octree.
解码端确定出第i个非零子节点对应的已解码重复点总数,并将该第i个非零子节点对应的已解码重复点总数,确定为第一参数,进而基于还第一参数,对当前节点进行几何解码。The decoding end determines the total number of decoded repeated points corresponding to the i-th non-zero child node, and determines the total number of decoded repeated points corresponding to the i-th non-zero child node as the first parameter, and then performs geometric decoding on the current node based on the first parameter.
在一些实施例中,上述S101-B1中确定第i个非零子节点对应的已解码重复点总数包括:In some embodiments, determining the total number of decoded repeated points corresponding to the i-th non-zero child node in the above S101-B1 includes:
S101-B11、确定所述八叉树中位于第i个非零子节点之前的各非零子节点所包括的第一已解码重复点个数之和;S101-B11, determining the sum of the number of first decoded repeated points included in each non-zero child node located before the i-th non-zero child node in the octree;
S101-B12、基于第一已解码重复点个数之和,确定第i个非零子节点对应的已解码重复点总数。S101-B12. Determine the total number of decoded repeated points corresponding to the i-th non-zero child node based on the sum of the first number of decoded repeated points.
在该实施例中,若第i个非零子节点不是八叉树中的第1个非零叶子节点,则确定八叉树中位于第i个非零子节点之前的各非零子节点所包括的已解码点个数之和,为了便于描述,将该已解码点记为第一解码点。In this embodiment, if the i-th non-zero child node is not the first non-zero leaf node in the octree, the sum of the number of decoded points included in each non-zero child node located before the i-th non-zero child node in the octree is determined. For the sake of ease of description, the decoded point is recorded as the first decoding point.
例如,如图8所示,假设当前节点为第N-1层中的第1个非零节点,当前节点的占位信息为010101010,第i个非零子节点为当前节点中的第3个非零子节点,在八叉树中,位于第i个非零子节点之前的非零子节点有2个,假设这2个非零子节点中的一个非零子节点包括2个重复点,另一个非零子节点包括1个重复点,则可以确定出第一已解码重复点个数之和为2+1=3。For example, as shown in Figure 8, assuming that the current node is the first non-zero node in the N-1th layer, the placeholder information of the current node is 010101010, the i-th non-zero child node is the third non-zero child node in the current node, and in the octree, there are 2 non-zero child nodes before the i-th non-zero child node. Assuming that one of the two non-zero child nodes includes 2 repeated points and the other non-zero child node includes 1 repeated point, it can be determined that the sum of the first decoded repeated points is 2+1=3.
基于上述步骤,确定出八叉树中位于第i个非零子节点之前的各非零子节点所包括的第一已解码重复点个数之和后,基于该第一已解码重复点个数之和,确定第i个非零子节点对应的已解码重复点总数。Based on the above steps, after determining the sum of the first number of decoded repeated points included in each non-zero child node located before the i-th non-zero child node in the octree, the total number of decoded repeated points corresponding to the i-th non-zero child node is determined based on the sum of the first number of decoded repeated points.
基于点云是否采用预测树编码,则上述S101-B12中基于第一已解码重复点个数之和,确定第i个非零子节点对应的已解码重复点总数的实现方式至少包括如下两种:Based on whether the point cloud adopts prediction tree coding, the implementation methods of determining the total number of decoded repeated points corresponding to the i-th non-zero child node based on the sum of the first number of decoded repeated points in the above S101-B12 include at least the following two methods:
方式1,若点云采用IDCM时,则确定八叉树中采用IDCM的第一节点所包括的第二已解码重复点个数之和;将 上述第一已解码重复点个数之和、与该第二已解码重复点个数之和进行相加,得到第i个非零子节点对应的已解码重复点总数。Method 1: If the point cloud adopts IDCM, the sum of the second decoded duplicate points included in the first node adopting IDCM in the octree is determined; the sum of the first decoded duplicate points and the sum of the second decoded duplicate points are added to obtain the total number of decoded duplicate points corresponding to the i-th non-zero child node.
方式2,若点云未采用IDCM时,则直接将上述确定的第一已解码重复点个数之和,确定为第i个非零子节点对应的已解码重复点总数。Method 2: If the point cloud does not use IDCM, the sum of the first number of decoded duplicate points determined above is directly determined as the total number of decoded duplicate points corresponding to the i-th non-zero child node.
基于上述步骤,确定出第i个非零子节点对应的已解码重复点总数,并将第i个非零子节点对应的已解码重复点总数,确定为第一参数后,执行上述S102的步骤,基于该第一参数,对当前节点进行几何解码。Based on the above steps, the total number of decoded repeated points corresponding to the i-th non-zero child node is determined, and after the total number of decoded repeated points corresponding to the i-th non-zero child node is determined as the first parameter, the above step S102 is executed to perform geometric decoding on the current node based on the first parameter.
在情况2中,上述S102中基于第一参数对当前节点进行几何解码包括如下S102-B1和S102-B2的步骤:In case 2, the geometric decoding of the current node based on the first parameter in S102 includes the following steps S102-B1 and S102-B2:
S102-B1、确定点云的重复点总数;S102-B1, determining the total number of repeated points in the point cloud;
S102-B2、基于点云的重复点总数和第i个非零子节点对应的已解码重复点总数,确定是否解码第i个非零子节点的重复点信息。S102-B2: Determine whether to decode the duplicate point information of the i-th non-zero child node based on the total number of duplicate points in the point cloud and the total number of decoded duplicate points corresponding to the i-th non-zero child node.
在情况2中,解码端在确定是否解码当前节点的第i个非零子节点的重复点信息时,基于上述步骤,将第i个非零子节点对应的已解码重复点个数确定为第一参数。接着,确定点云的重复点总数,并将第i个非零子节点对应的已解码重复点个数与点云的重复点个数进行比较,以确定第i个非零子节点是否包括重复点,进而确定是否解码第i个非零子节点的重复点信息。In case 2, when the decoding end determines whether to decode the repeated point information of the i-th non-zero child node of the current node, based on the above steps, the number of decoded repeated points corresponding to the i-th non-zero child node is determined as the first parameter. Then, the total number of repeated points in the point cloud is determined, and the number of decoded repeated points corresponding to the i-th non-zero child node is compared with the number of repeated points in the point cloud to determine whether the i-th non-zero child node includes repeated points, and then determine whether to decode the repeated point information of the i-th non-zero child node.
其中,上述S102-B1中确定点云的重复点总数的方式包括但不限于如下几种:The methods for determining the total number of repeated points in the point cloud in S102-B1 include but are not limited to the following:
方式1,编码端将点云的重复点总数写入几何码流,这样解码端通过解码几何码流,得到点云的重复点总数。In method 1, the encoder writes the total number of repeated points of the point cloud into the geometry stream, so that the decoder obtains the total number of repeated points of the point cloud by decoding the geometry stream.
方式2,解码端确定点云的总点数,以及八叉树的非零体素节点总数;将点云的总点数与八叉树的非零体素节点总数的差值,确定为点云的重复点总数。Method 2: The decoding end determines the total number of points in the point cloud and the total number of non-zero voxel nodes in the octree; the difference between the total number of points in the point cloud and the total number of non-zero voxel nodes in the octree is determined as the total number of repeated points in the point cloud.
在该方式2中,八叉树的体素级节点可以理解为八叉树的最后一层体素级的叶子节点。八叉树的非零体素级节点中至少包括点云中的一个点。因此,在方式2中,将点云的总点数与八叉树的体素节点总数的差值,确定为点云的重复点总数。In this method 2, the voxel-level nodes of the octree can be understood as the leaf nodes of the last voxel level of the octree. The non-zero voxel-level nodes of the octree include at least one point in the point cloud. Therefore, in method 2, the difference between the total number of points in the point cloud and the total number of voxel nodes in the octree is determined as the total number of repeated points in the point cloud.
其中,解码端确定点云的总点数的方法可以参照上述实施例的描述,在此不再赘述。Among them, the method for the decoding end to determine the total number of points of the point cloud can refer to the description of the above embodiment, and will not be repeated here.
在一些实施例中,解码端通过八叉树中第N-1层的各非零节点的占位信息,确定出八叉树的最后一层中非零体素节点的个数。In some embodiments, the decoding end determines the number of non-zero voxel nodes in the last layer of the octree through the placeholder information of each non-zero node in the N-1th layer of the octree.
解码端基于上述方式1或方式2确定出点云的重复点总数后,基于点云的重复点总数和第i个非零子节点对应的已解码重复点总数,确定是否解码第i个非零子节点的重复点信息。After the decoding end determines the total number of duplicate points in the point cloud based on the above method 1 or method 2, it determines whether to decode the duplicate point information of the i-th non-zero child node based on the total number of duplicate points in the point cloud and the total number of decoded duplicate points corresponding to the i-th non-zero child node.
例如,若第i个非零子节点对应的已解码重复点总数等于点云的重复总点数,则说明点云中的重复点均已经解码结束,此时第i个非零子节点及第i个非零子节点之后的叶子节点中均不包括重复点。因此,跳过解码第i个非零子节点的重复点信息,进而降低了点云的解码复杂度,节约了解码时间,进而提升了解码效率。For example, if the total number of decoded duplicate points corresponding to the i-th non-zero child node is equal to the total number of duplicate points in the point cloud, it means that the duplicate points in the point cloud have been decoded. At this time, the i-th non-zero child node and the leaf nodes after the i-th non-zero child node do not include duplicate points. Therefore, the decoding of the duplicate point information of the i-th non-zero child node is skipped, thereby reducing the decoding complexity of the point cloud, saving decoding time, and improving decoding efficiency.
再例如,若第i个非零子节点对应的已解码重复点总数小于点云的重复总点数,且第i个非零子节点是八叉树的最后一个体素节点,则说明第i个非零子节点包括重复点,此时跳过解码第i个非零子节点的重复点信息,且将点云的重复总点数与第i个非零子节点对应的已解码重复点总数的差值,确定为第i个非零子节点所包括的重复点个数。For another example, if the total number of decoded duplicate points corresponding to the i-th non-zero child node is less than the total number of duplicate points in the point cloud, and the i-th non-zero child node is the last voxel node of the octree, it means that the i-th non-zero child node includes duplicate points. At this time, decoding the duplicate point information of the i-th non-zero child node is skipped, and the difference between the total number of duplicate points in the point cloud and the total number of decoded duplicate points corresponding to the i-th non-zero child node is determined as the number of duplicate points included in the i-th non-zero child node.
再例如,若第i个非零子节点对应的已解码重复点总数小于点云的重复总点数,且第i个非零子节点是八叉树的最后一个体素节点,则说明第i个非零子节点或者该第i个非零子节点之后的叶子节点中可能包括重复点,因此,为了提高解码准确性,则解码端解码该第i个非零子节点的重复点信息。For another example, if the total number of decoded duplicate points corresponding to the i-th non-zero child node is less than the total number of duplicate points in the point cloud, and the i-th non-zero child node is the last voxel node of the octree, it means that the i-th non-zero child node or the leaf node after the i-th non-zero child node may include duplicate points. Therefore, in order to improve the decoding accuracy, the decoding end decodes the duplicate point information of the i-th non-zero child node.
由上述可知,解码端基于上述情况1和情况2的方式,在基于八叉树的点云解码中,确定当前节点对应的第一参数,并基于该第一参数,对当前节点进行解码。From the above, it can be seen that the decoding end determines the first parameter corresponding to the current node in the octree-based point cloud decoding based on the above situation 1 and situation 2, and decodes the current node based on the first parameter.
上述实施例对当前节点为八叉树的第N-1层中的第一个非零节点为例,对当前节点的解码过程进行介绍。The above embodiment takes the case where the current node is the first non-zero node in the N-1th layer of the octree as an example to introduce the decoding process of the current node.
在一些实施例中,若点云开启IDCM编码模式,在八叉树的划分中,当节点划分到某一层时,该层的所有节点均可以采用IDCM编码方式进行编码,此时,八叉树未划分到体素级的叶子节点层。也就是说,八叉树包括N层,且该第N层中的所有非零节点均采用IDCM编码方式时,若当前节点为八叉树的第N层中的一个非零节点,也可以采用本申请实施例提供的解码方法对当前节点进行解码。例如,将点云的总点数与第N层所包括的非零节点的差值,确定为当前节点对应的第一参数。基于该第一参数确定当前节点是否包括重复点。In some embodiments, if the point cloud turns on the IDCM encoding mode, in the division of the octree, when the node is divided into a certain layer, all nodes of the layer can be encoded using the IDCM encoding method. At this time, the octree is not divided into the leaf node layer at the voxel level. In other words, when the octree includes N layers, and all non-zero nodes in the Nth layer are encoded using the IDCM encoding method, if the current node is a non-zero node in the Nth layer of the octree, the decoding method provided in the embodiment of the present application can also be used to decode the current node. For example, the difference between the total number of points in the point cloud and the non-zero nodes included in the Nth layer is determined as the first parameter corresponding to the current node. Based on the first parameter, it is determined whether the current node includes duplicate points.
示例性的,当前节点包括点云中的至少一个点,针对当前节点中的第j个点,确定该第j个点对应的已解码点个数,其中,确定第j个点对应的已解码点个数的方式与上述确定第i个非零节点对应的已解码点个数的方式基本相同,将节点包括的非零子节点替换为节点所包括的点即可。接着,解码端基于该第j个点对应的已解码点个数,确定第j个点对应的第二参数,进而基于第j个点对应的第二参数和当前节点对应的第一参数,确定第j个点是否包括重复点。例如,若第一参数等于第二参数,则确定第j个点不包括重复点,进而跳过解码该第j个点的重复点信息。再例如,若第一参数大于第二参数,且第j个点为第N层中的最后一个点,进而跳过解码该第j个点的重复点信息,且将第一参数与第二参数的差值,确定为第j个点的重复点个数。再例如,若第一参数大于第二参数,且第j个点不是第N层中的最后一个点,进而解码该第j个点的重复点信息。Exemplarily, the current node includes at least one point in the point cloud, and for the jth point in the current node, the number of decoded points corresponding to the jth point is determined, wherein the method for determining the number of decoded points corresponding to the jth point is substantially the same as the method for determining the number of decoded points corresponding to the i-th non-zero node, and the non-zero subnodes included in the node are replaced with the points included in the node. Then, the decoding end determines the second parameter corresponding to the jth point based on the number of decoded points corresponding to the jth point, and then determines whether the jth point includes duplicate points based on the second parameter corresponding to the jth point and the first parameter corresponding to the current node. For example, if the first parameter is equal to the second parameter, it is determined that the jth point does not include duplicate points, and then the duplicate point information of the jth point is skipped for decoding. For another example, if the first parameter is greater than the second parameter, and the jth point is the last point in the Nth layer, then the duplicate point information of the jth point is skipped for decoding, and the difference between the first parameter and the second parameter is determined as the number of duplicate points of the jth point. For another example, if the first parameter is greater than the second parameter, and the j-th point is not the last point in the N-th layer, the repeated point information of the j-th point is decoded.
本申请实施例提供的点云解码方法,在基于八叉树的点云解码中,在解码八叉树中第N-1层的当前节点时,首先确定当前节点对应的第一参数,该第一参数用于确定当前节点的至少一个非零子节点是否包括重复点,当前节点为点云的八叉树中第N-1层的一个非零节点,N为所述八叉树的总层数,进而基于该第一参数,对当前节点进行几何解码。例如,基于该第一参数确定当前节点的第i个非零子节点不包括重复点时,则跳过解码该第i个非零子节点的重复点信息,进而降低了点云的解码复杂度,节约了解码时间,进而提升了解码效率。The point cloud decoding method provided by the embodiment of the present application, in the point cloud decoding based on octree, when decoding the current node of the N-1th layer in the octree, first determines the first parameter corresponding to the current node, and the first parameter is used to determine whether at least one non-zero child node of the current node includes repeated points. The current node is a non-zero node of the N-1th layer in the octree of the point cloud, and N is the total number of layers of the octree. Then, based on the first parameter, the current node is geometrically decoded. For example, when it is determined based on the first parameter that the i-th non-zero child node of the current node does not include repeated points, the repeated point information of the i-th non-zero child node is skipped for decoding, thereby reducing the decoding complexity of the point cloud, saving decoding time, and improving decoding efficiency.
上文以解码端为例,对本申请实施例提供的点云解码方法进行详细介绍,下面以编码端为例,对本申请实施例提供的点云编码方法进行介绍。The above takes the decoding end as an example to introduce in detail the point cloud decoding method provided in the embodiment of the present application. The following takes the encoding end as an example to introduce the point cloud encoding method provided in the embodiment of the present application.
图9为本申请一实施例提供的点云编码方法流程示意图。本申请实施例的点云编码方法可以由上述图3或图4所示的点云编码设备完成。Fig. 9 is a schematic diagram of a point cloud coding method according to an embodiment of the present application. The point cloud coding method according to the embodiment of the present application can be implemented by the point cloud coding device shown in Fig. 3 or Fig. 4 above.
如图9所示,本申请实施例的点云编码方法包括:As shown in FIG9 , the point cloud encoding method of the embodiment of the present application includes:
S201、确定当前节点对应的第一参数;S201, determining a first parameter corresponding to the current node;
S202、基于第一参数,对当前节点进行几何编码。S202. Perform geometric encoding on the current node based on the first parameter.
其中,第一参数用于确定是否编码当前节点对应的重复点信息,当前节点为点云的八叉树中的一个非零节点。The first parameter is used to determine whether to encode the duplicate point information corresponding to the current node, and the current node is a non-zero node in the octree of the point cloud.
由上述可知,点云包括几何信息和属性信息,对点云的编码包括几何编码和属性编码。本申请实施例涉及点云的几何编码。也就是说,本申请实施例中涉及的已编码点指的是点云中几何信息已编码的点,未编码点指点云中几何信息未编码的点。As can be seen from the above, the point cloud includes geometric information and attribute information, and the encoding of the point cloud includes geometric encoding and attribute encoding. The embodiments of the present application relate to geometric encoding of point clouds. That is, the encoded points involved in the embodiments of the present application refer to points in the point cloud whose geometric information has been encoded, and the unencoded points refer to points in the point cloud whose geometric information has not been encoded.
在一些实施例中,点云的几何信息也称为点云的位置信息,因此,点云的几何编码也称为点云的位置编码。In some embodiments, the geometric information of the point cloud is also referred to as the position information of the point cloud, and therefore, the geometric encoding of the point cloud is also referred to as the position encoding of the point cloud.
在基于八叉树的编码方式中,编码端基于点云的几何信息,构建点云的八叉树结构,具体是,将点云包围在一个包围盒中,将包围盒依次划分得到子立方体,对非空的(包含点云中的点)的子立方体继续进行划分,直到划分得到的叶子结点为1x1x1的单位立方体时停止划分,在几何编码时,对叶子节点中所包含的点数进行编码,最终完成几何八叉树的编码,生成几何码流。In the octree-based encoding method, the encoder constructs an octree structure of the point cloud based on the geometric information of the point cloud. Specifically, the point cloud is enclosed in a bounding box, and the bounding box is divided into sub-cubes in sequence. The non-empty sub-cubes (including points in the point cloud) are continued to be divided until the leaf node obtained by the division is a 1x1x1 unit cube. During geometric encoding, the number of points contained in the leaf node is encoded, and finally the encoding of the geometric octree is completed to generate a geometric code stream.
在一些实施例中,首先对点云的几何信息进行坐标转换,将坐标转换后的点云全都包含在一个bounding box(包围盒)中。接着,按照广度优先遍历的顺序不断对bounding box进行八叉树划分,对每个节点的占位码进行编码。对被占用的节点继续进行八叉树划分,直到划分得到的叶子结点为1x1x1的单位立方体时停止划分,对叶子结点中的点进行几何编码,生成几何码流。In some embodiments, the geometric information of the point cloud is first transformed, and all the point clouds after the coordinate transformation are contained in a bounding box. Then, the bounding box is continuously divided into octrees in the order of breadth-first traversal, and the placeholder code of each node is encoded. The occupied nodes are continuously divided into octrees until the leaf nodes obtained by the division are 1x1x1 unit cubes, and the division is stopped. The points in the leaf nodes are geometrically encoded to generate a geometric code stream.
示例性的,图7所示,对该点云的包围盒进行八叉树划分,得到8个节点,对这8个节点中被占用的节点,即包括点的节点继续进行八叉树划分,以此类推,直到划分到体素级别位置,例如划分到1X1X1的正方体为止。这样划分得到的点云八叉树结构包括多层节点组成,例如包括N层,在编码时,逐层编码每一层的占位信息,直到编码完最后一层的体素级别的叶子节点为止。也就是说,在八叉树编码中,将点云通八叉树划分,最终将点云中的点划分到八叉树的体素级的叶子节点中,通过对整个八叉树进行编码,实现对点云的编码。Exemplarily, as shown in FIG7 , the bounding box of the point cloud is divided into 8 nodes by an octree, and the occupied nodes among the 8 nodes, that is, the nodes including the points, are further divided into octrees, and so on, until the division is to the voxel level, for example, to a 1X1X1 cube. The point cloud octree structure obtained by such division includes multiple layers of nodes, for example, N layers. During encoding, the placeholder information of each layer is encoded layer by layer until the voxel-level leaf nodes of the last layer are encoded. In other words, in octree encoding, the point cloud is divided through the octree, and finally the points in the point cloud are divided into the voxel-level leaf nodes of the octree, and the encoding of the point cloud is achieved by encoding the entire octree.
本申请实施例对当前节点在八叉树中的具体位置不做限制。The embodiment of the present application does not limit the specific position of the current node in the octree.
在一些实施例中,当前节点为点云的八叉树中第N-1层的一个节点,N为八叉树的总层数,N为大于1的正整数。此时第一参数用于确定当前节点的至少一个非零子节点是否包括重复点,In some embodiments, the current node is a node at the N-1th layer in the octree of the point cloud, where N is the total number of layers of the octree and N is a positive integer greater than 1. In this case, the first parameter is used to determine whether at least one non-zero child node of the current node includes a duplicate point.
在一些实施例中,由于点云中的有些点的坐标信息相同,因此,这些坐标相同的点被划分到八叉树的同一个叶子节点上,使得该叶子节点包括重复点。In some embodiments, since some points in the point cloud have the same coordinate information, these points with the same coordinates are divided into the same leaf node of the octree, so that the leaf node includes repeated points.
目前编码端在对八叉树的第N-1层的节点进行编码时,不仅编码该节点的占位信息,还编码该节点的子节点(即叶子节点)的重复点信息。对应的,编码端在编码八叉树的第N-1层的节点时,不仅编码该节点的占位信息,还编码该节点的子节点的重复点信息。这样会增加编码的复杂度,浪费编码时间,降低编码效率。At present, when encoding the node of the N-1th layer of the octree, the encoder not only encodes the placeholder information of the node, but also encodes the repeated point information of the child nodes (i.e., leaf nodes) of the node. Correspondingly, when encoding the node of the N-1th layer of the octree, the encoder not only encodes the placeholder information of the node, but also encodes the repeated point information of the child nodes of the node. This will increase the complexity of encoding, waste encoding time, and reduce encoding efficiency.
由上述可知,在点云的八叉树中,并不是每一个叶子节点均包括重复点,甚至可以理解的是,点云的八叉树中只有较少的叶子节点包括重复点。基于此,本申请实施例中,在编码点云的八叉树的第N-1层的当前节点时,首先确定当前节点对应的第一参数,该第一参数用于确定当前节点的至少一个子节点(即叶子节点)是否包括重复点,进而基于该第一参数,对当前节点进行编码。例如,基于该第一参数确定当前节点的第i个非零子节点不包括重复点时,则跳过编码该第i个非零子节点的重复点信息,进而降低了点云的编码复杂度,节约了编码时间,进而提升了编码效率。From the above, it can be seen that in the octree of the point cloud, not every leaf node includes duplicate points. It can even be understood that only a few leaf nodes in the octree of the point cloud include duplicate points. Based on this, in an embodiment of the present application, when encoding the current node of the N-1th layer of the octree of the point cloud, the first parameter corresponding to the current node is first determined. The first parameter is used to determine whether at least one child node (i.e., leaf node) of the current node includes duplicate points, and then based on the first parameter, the current node is encoded. For example, when it is determined based on the first parameter that the i-th non-zero child node of the current node does not include duplicate points, the encoding of the duplicate point information of the i-th non-zero child node is skipped, thereby reducing the encoding complexity of the point cloud, saving encoding time, and improving encoding efficiency.
本申请实施例主要涉及点云八叉树的第N-1层中节点的编码过程,第N-1层也可以理解为该点云的八叉树的倒数第二层。The embodiments of the present application mainly relate to the encoding process of the nodes in the N-1th layer of the point cloud octree. The N-1th layer can also be understood as the second to last layer of the octree of the point cloud.
在编码八叉树的第N-1层中的节点时,不仅需要编码该节点的占位信息,还需要编码该节点的子节点所包括的重复点信息。其中,第N-1层的节点的子节点为八叉树的体素级的叶子节点,即最后一层节点。When encoding a node in the N-1th layer of the octree, it is necessary not only to encode the placeholder information of the node, but also to encode the repeated point information included in the child nodes of the node. The child nodes of the N-1th layer of the node are the voxel-level leaf nodes of the octree, that is, the last layer of nodes.
本申请实施例中,对于八叉树的第N-1层中的每一个节点的编码过程基本相同,为了便于描述,以八叉树的第N-1层中的当前节点为例,对本申请实施例的编码过程进行介绍。In an embodiment of the present application, the encoding process for each node in the N-1th layer of the octree is basically the same. For the convenience of description, the encoding process of the embodiment of the present application is introduced by taking the current node in the N-1th layer of the octree as an example.
在一些实施例中,当前节点可以理解为八叉树的第N-1层中的任意一个非零节点(也称为非空节点),其中非零节点可以理解为包括至少一个子节点的节点,或者包括点云中至少一个点的节点。In some embodiments, the current node can be understood as any non-zero node (also called a non-empty node) in the N-1th layer of the octree, where the non-zero node can be understood as a node including at least one child node, or a node including at least one point in the point cloud.
在一些实施例中,当前节点可以理解为八叉树的第N-1层中当前正等待编码的一个非零节点。In some embodiments, the current node may be understood as a non-zero node in the N-1th layer of the octree that is currently waiting to be encoded.
本申请实施例,在编码当前节点之前,首先确定当前节点对应的第一参数,进而基于该第一参数,对当前节点进行编码。本申请实施例中,确定当前节点对应的第一参数的方式不同,对应的基于第一参数,对当前节点进行编码的方式也不相同。下面对本申请实施例涉及的几种确定当前节点对应的第一参数,以及基于第一参数,对当前节点进行编码的过程进行详细介绍。In the embodiment of the present application, before encoding the current node, the first parameter corresponding to the current node is first determined, and then the current node is encoded based on the first parameter. In the embodiment of the present application, the method of determining the first parameter corresponding to the current node is different, and the corresponding method of encoding the current node based on the first parameter is also different. The following is a detailed introduction to several methods of determining the first parameter corresponding to the current node and the process of encoding the current node based on the first parameter involved in the embodiment of the present application.
情况1,上述S201包括如下S201-A1至S201-A2的步骤:In case 1, the above S201 includes the following steps S201-A1 to S201-A2:
S201-A1、确定点云的总点数,以及第N-1层的非零节点数;S201-A1, determine the total number of points in the point cloud and the number of non-zero nodes in the N-1th layer;
S201-A2、基于点云的总点数和第N-1层的非零节点数,确定第一参数。S201-A2: Determine a first parameter based on the total number of points in the point cloud and the number of non-zero nodes in the N-1th layer.
在本申请实施例中,编码端基于广度优先遍历方式,对八叉树中的节点进行编码。In an embodiment of the present application, the encoding end encodes the nodes in the octree based on a breadth-first traversal method.
在该情况1中,基于点云的总点数和点云的八叉树的第N-1层的非零节点数,确定当前节点对应的第一参数,该第一参数可以理解为当前点云中几何信息无法确定的点的个数。进而基于该第一参数,对当前节点进行编码,例如基于该第一参数,确定当前节点的子节点是否包括重复点,若基于该第一参数,确定当前节点的子节点不包括重复点时,则跳过节点当前节点的子节点的重复点信息,以降低点云的编码复杂度,节约编码时间,进而提升编码效率。In this case 1, the first parameter corresponding to the current node is determined based on the total number of points in the point cloud and the number of non-zero nodes in the N-1th layer of the octree of the point cloud. The first parameter can be understood as the number of points whose geometric information cannot be determined in the current point cloud. Then, based on the first parameter, the current node is encoded. For example, based on the first parameter, it is determined whether the child nodes of the current node include duplicate points. If it is determined based on the first parameter that the child nodes of the current node do not include duplicate points, the duplicate point information of the child nodes of the current node is skipped to reduce the encoding complexity of the point cloud, save encoding time, and thus improve encoding efficiency.
在一些实施例中,编码端将点云的总点数写入几何码流。这样,解码端通过解码几何码流,得到点云的总点数。In some embodiments, the encoding end writes the total number of points of the point cloud into the geometric code stream, so that the decoding end obtains the total number of points of the point cloud by decoding the geometric code stream.
在一些实施例中,编码端将点云的总点数写入点云的几何数据单元中。这样,解码端通过解码点云的几何数据单 元,得到点云的总点数。In some embodiments, the encoding end writes the total number of points of the point cloud into the geometric data unit of the point cloud. In this way, the decoding end obtains the total number of points of the point cloud by decoding the geometric data unit of the point cloud.
在一些实施例中,由于点云至少包括一个点,为了节约码字,则编码端在编码点云的总点数时,对点云的总点数减一,得到第一值,将该第一值写入几何数据单元中,即第一值表示为slice_num_points_minuS2。对应的,解码端在解码时,解码几何数据单元,得到第一值,接着对该第一值加1,得到点云的总点数。In some embodiments, since the point cloud includes at least one point, in order to save code words, when encoding the total number of points in the point cloud, the encoder subtracts one from the total number of points in the point cloud to obtain a first value, and writes the first value into the geometry data unit, that is, the first value is represented as slice_num_points_minuS2. Correspondingly, when decoding, the decoder decodes the geometry data unit to obtain the first value, and then adds 1 to the first value to obtain the total number of points in the point cloud.
在一种示例中,几何数据单元的脚本语法(Geometry data unit footer syntax)上述如表2所示。In one example, the script syntax of the geometry data unit (Geometry data unit footer syntax) is shown in Table 2.
在一些实施例中,由上述可知,编码端广度优先遍历方式,对八叉树的各层节点的占位信息进行编码,例如,基于第N-2层中各节点所包括的子节点,确定第N-2层各节点的占位信息,进而将各第N-2层中各节点的占位信息写入几何码流。这样,解码端解码第N-2层中各节点的占位信息,可以确定出第N-1层所包括的节点数。In some embodiments, it can be seen from the above that the encoder encodes the placeholder information of the nodes at each layer of the octree in a breadth-first traversal manner. For example, based on the child nodes included in each node in the N-2th layer, the placeholder information of each node in the N-2th layer is determined, and then the placeholder information of each node in the N-2th layer is written into the geometry stream. In this way, the decoder decodes the placeholder information of each node in the N-2th layer and can determine the number of nodes included in the N-1th layer.
编码端确定出点云的总点数和第N-1层的非零节点数后,基于该点云的总点数和第N-1层的非零节点数,确定当前节点对应的第一参数。After the encoder determines the total number of points in the point cloud and the number of non-zero nodes in the N-1th layer, the encoder determines the first parameter corresponding to the current node based on the total number of points in the point cloud and the number of non-zero nodes in the N-1th layer.
本申请实施例对基于点云的总点数和第N-1层的非零节点数,确定当前节点对应的第一参数的具体方式不做限制。The embodiment of the present application does not limit the specific method of determining the first parameter corresponding to the current node based on the total number of points in the point cloud and the number of non-zero nodes in the N-1th layer.
在一些实施例中,编码端将点云的总点数和第N-1层的非零节点数之间的差值,确定为第一参数。在该实施例中,确定出第N-1层中被占据的节点数,则可以确定被占据的节点至少包括一个非零子节点,也就是说,第N-1层中被占用节点至少对应一个点,因此,将点云的总点数与八叉树的第N-1层的非零节点数的差值,确定为点云中几何信息不确定的点的个数,即第一参数。例如,点云包括10个点,而第N-1层包括4个节点,则说明第N-1层的4个节点中每一个节点至少包括一个非零子节点,而一个非零子节点中至少包括一个点,因此,可以确定出当前点云中位置信息不确定的点的个数为10-4=6,进而确定当前节点对应的第一参数为6。In some embodiments, the encoding end determines the difference between the total number of points in the point cloud and the number of non-zero nodes in the N-1th layer as the first parameter. In this embodiment, by determining the number of occupied nodes in the N-1th layer, it can be determined that the occupied nodes include at least one non-zero child node, that is, the occupied nodes in the N-1th layer correspond to at least one point. Therefore, the difference between the total number of points in the point cloud and the number of non-zero nodes in the N-1th layer of the octree is determined as the number of points with uncertain geometric information in the point cloud, that is, the first parameter. For example, the point cloud includes 10 points, and the N-1th layer includes 4 nodes, which means that each of the 4 nodes in the N-1th layer includes at least one non-zero child node, and a non-zero child node includes at least one point. Therefore, it can be determined that the number of points with uncertain position information in the current point cloud is 10-4=6, and then the first parameter corresponding to the current node is determined to be 6.
在一种可能的实现方式中,基于上述公式(4)确定第一参数。In a possible implementation, the first parameter is determined based on the above formula (4).
基于上述方式确定出当前节点对应的第一参数后,执行上述S202的步骤,基于该第一参数,对当前节点进行编码。After the first parameter corresponding to the current node is determined based on the above method, the above step S202 is performed to encode the current node based on the first parameter.
在一些实施例中,若确定当前节点对应的第一参数为0,例如点云的总点数为a,点云的八叉树的第N-1层包括a个节点,此时确定出第一参数为0,则说明第N-1层中各非零节点包括一个非零子节点,且该非零子节点包括点云中的一个点,均不包括重复点。此时,对第N-1层中的节点进行编码时,跳过编码各非零节点的非零子节点的重复点信息,进而降低编码复杂度,节约编码时间。In some embodiments, if the first parameter corresponding to the current node is determined to be 0, for example, the total number of points in the point cloud is a, and the N-1th layer of the octree of the point cloud includes a nodes, then the first parameter is determined to be 0, which means that each non-zero node in the N-1th layer includes a non-zero child node, and the non-zero child node includes a point in the point cloud, and no duplicate points are included. At this time, when encoding the nodes in the N-1th layer, the encoding of the duplicate point information of the non-zero child nodes of each non-zero node is skipped, thereby reducing the encoding complexity and saving encoding time.
在一些实施例中,若确定当前节点对应的第一参数不为0时,则上述S202如下情况1所示。In some embodiments, if it is determined that the first parameter corresponding to the current node is not 0, the above S202 is as shown in the following situation 1.
在情况1中,上述S202包括如下S202-A1至S202-A2的步骤:In case 1, the above S202 includes the following steps S202-A1 to S202-A2:
S202-A1、针对当前节点的第i个非零子节点,确定第i个非零子节点对应的第二参数,第二参数用于指示在编码第i个非零子节点时,点云中几何位置已编码的点的个数;S202-A1. For the i-th non-zero child node of the current node, determine a second parameter corresponding to the i-th non-zero child node, where the second parameter is used to indicate the number of points whose geometric positions in the point cloud have been encoded when encoding the i-th non-zero child node;
S202-A2、基于第一参数和第二参数,确定是否编码第i个非零子节点的重复点信息。S202-A2: Determine whether to encode the repeated point information of the i-th non-zero child node based on the first parameter and the second parameter.
在一些实施例,由上述可知,当前节点包括至少一个非零子节点,在编码当前节点时,确定是否编码当前节点所包括的每一个非零子节点的重复点信息的具体过程相同,为了便于描述,在此以当前节点的第i个非零子节点为例进行说明。也就是说,在该实施例中,当前节点为八叉树的第N-1层(即倒数第2层)中的非零节点,且当前节点采用八叉树编码,即对当前节点进行八叉树划分,得到至少一个体素级的叶子节点,第i个非零子节点为当前节点的一个体素级的叶子节点。In some embodiments, it can be seen from the above that the current node includes at least one non-zero child node. When encoding the current node, the specific process of determining whether to encode the repeated point information of each non-zero child node included in the current node is the same. For the convenience of description, the i-th non-zero child node of the current node is used as an example for explanation. That is, in this embodiment, the current node is a non-zero node in the N-1th layer (i.e., the second to last layer) of the octree, and the current node is encoded by the octree, that is, the current node is divided into an octree to obtain at least one voxel-level leaf node, and the i-th non-zero child node is a voxel-level leaf node of the current node.
在一些实施例中,若点云采用IDCM编码,即IDCM编码方式开启,若当前节点为八叉树的第N-1层中的一个非零节点,且当前节点采用IDCM编码,即对当前节点所包括的至少一个点直接进行编码,此时,当前节点的第i个非零子节点可以理解为当前节点中的一个点。In some embodiments, if the point cloud is encoded using IDCM, that is, the IDCM encoding method is turned on, if the current node is a non-zero node in the N-1th layer of the octree, and the current node is encoded using IDCM, that is, at least one point included in the current node is directly encoded, at this time, the i-th non-zero child node of the current node can be understood as a point in the current node.
在该情况1中,编码端基于上述S202-A1至S202-A2的步骤,确定出当前节点对应的第一参数,该第一参数可以理解为点云中当前位置信息未确定的点的个数。接着,确定出当前节点的第i个非零子节点对应的第二参数,该第二参数用于指示在编码第i个非零子节点时,点云中几何位置已编码的点的个数。最后,基于当前节点对应的第一参数和第i个非零子节点对应的第二参数,确定该第i个非零子节点是否包括重复点,进而确定是否编码该第i个非零子节点的重复点信息。In this case 1, the encoding end determines the first parameter corresponding to the current node based on the above steps S202-A1 to S202-A2. The first parameter can be understood as the number of points whose current position information is not determined in the point cloud. Next, the second parameter corresponding to the i-th non-zero child node of the current node is determined. The second parameter is used to indicate the number of points whose geometric positions in the point cloud have been encoded when encoding the i-th non-zero child node. Finally, based on the first parameter corresponding to the current node and the second parameter corresponding to the i-th non-zero child node, it is determined whether the i-th non-zero child node includes duplicate points, and then it is determined whether to encode the duplicate point information of the i-th non-zero child node.
下面对确定第i个非零子节点对应的第二参数的具体过程进行介绍。The specific process of determining the second parameter corresponding to the i-th non-zero child node is introduced below.
本申请实施例对确定当前第i个非零子节点对应的第二参数的具体方式不做限制。The embodiment of the present application does not limit the specific method of determining the second parameter corresponding to the current i-th non-zero child node.
在一些实施例中,在编码时,编码端实时记录当前点云中几何位置已编码的点的个数,进而在编码当前节点时,确定在编码第i个非零子节点的重复点信息之前,已经确定出的几何位置信息确定的点的个数。In some embodiments, during encoding, the encoding end records in real time the number of points whose geometric positions have been encoded in the current point cloud, and then, when encoding the current node, determines the number of points determined by the geometric position information that has been determined before encoding the repeated point information of the i-th non-zero child node.
在一些实施例中,上述S202-A1中确定第i个非零子节点对应的第二参数包括如下S202-A11和S202-A12步骤:In some embodiments, determining the second parameter corresponding to the i-th non-zero child node in the above S202-A1 includes the following steps S202-A11 and S202-A12:
S202-A11、确定点云中第i个非零子节点对应的已编码点个数。S202-A11. Determine the number of encoded points corresponding to the i-th non-zero child node in the point cloud.
在该实施例中,编码端通过确定点云中第i个非零子节点对应的已编码点个数,并基于点云中该第i个非零子节点对应的已编码点个数,确定该第i个非零子节点对应的第二参数。例如,将点云中该第i个非零子节点对应的已编码点个数,确定为第i个非零子节点对应的第二参数。In this embodiment, the encoder determines the number of encoded points corresponding to the i-th non-zero child node in the point cloud, and determines the second parameter corresponding to the i-th non-zero child node based on the number of encoded points corresponding to the i-th non-zero child node in the point cloud. For example, the number of encoded points corresponding to the i-th non-zero child node in the point cloud is determined as the second parameter corresponding to the i-th non-zero child node.
上述S202-A11的实现方式包括但不限于如下几种:The implementation methods of the above S202-A11 include but are not limited to the following:
方式一,若当前节点为第N-1层中的第一个非零节点,则上述S202-A11包括如下S202-A11-a1和S202-A11-a2的步骤:Method 1: if the current node is the first non-zero node in the N-1th layer, the above S202-A11 includes the following steps S202-A11-a1 and S202-A11-a2:
S202-A11-a1、确定当前节点的非零子节点个数;S202-A11-a1, determine the number of non-zero child nodes of the current node;
S202-A11-a2、基于当前节点的非零子节点个数,确定第i个非零子节点对应的已编码点个数。S202-A11-a2. Based on the number of non-zero child nodes of the current node, determine the number of encoded points corresponding to the i-th non-zero child node.
在该方式一中,若当前节点为八叉树的第N-1层中的第一个非零节点,则确定当前节点所包括的非零子节点个数,并基于当前节点的非零子节点个数,确定该第i个非零子节点对应的已编码点个数。In method 1, if the current node is the first non-zero node in the N-1th layer of the octree, the number of non-zero child nodes included in the current node is determined, and based on the number of non-zero child nodes of the current node, the number of encoded points corresponding to the i-th non-zero child node is determined.
示例性的,编码端基于第N-1层中的当前节点的各子节点的占用情况,确定该当前节点的占位信息,假设当前节点的8个子节点中,第2个子节点、第4个子节点、第6个子节点和第8个子节点被占用,因此确定当前节点的占位信息为01010101,这样可以确定出当前节点包括4个非零子节点。Exemplarily, the encoding end determines the placeholder information of the current node based on the occupancy of each child node of the current node in the N-1th layer. Assuming that among the 8 child nodes of the current node, the 2nd child node, the 4th child node, the 6th child node and the 8th child node are occupied, the placeholder information of the current node is determined to be 01010101. In this way, it can be determined that the current node includes 4 non-zero child nodes.
编码端确定出当前节点的非零子节点个数后,基于当前节点的非零子节点个数,确定第i个非零子节点对应的已编码点个数。After the encoder determines the number of non-zero child nodes of the current node, the encoder determines the number of encoded points corresponding to the i-th non-zero child node based on the number of non-zero child nodes of the current node.
其中,S202-A11-a2中基于当前节点的非零子节点个数,确定第i个非零子节点对应的已编码点个数的方式包括但不限于如下几种:Among them, the methods for determining the number of encoded points corresponding to the i-th non-zero child node based on the number of non-zero child nodes of the current node in S202-A11-a2 include but are not limited to the following:
方式1,若第i个非零子节点为当前节点的第1个非零子节点,则将当前节点所包括的非零子节点的个数减1,确定为第i个非零子节点对应的已编码点个数。Method 1: If the i-th non-zero child node is the first non-zero child node of the current node, the number of non-zero child nodes included in the current node is reduced by 1 to determine the number of encoded points corresponding to the i-th non-zero child node.
举例说明,如图8所示,假设当前节点为图8中第3层中的第一个非零节点,当前节点的占位信息为01010101,则可以确定出当前节点包括4个非零子节点。假设第i个非零子节点为当前节点的第1个非零子节点,由于当前节点的占位信息已知,则可以确定出当前节点的4个非零子节点的几何位置信息,因此当前节点所包括的4个非零子节点的几何位置信息已编码,即当前节点所包括的4个非零子节点对于当前节点中的第1个非零子节点为已编码点。需要说明的是,在上述确定第一参数时,已假设当前节点包括一个已编码点,因此,需要将当前节点所包括的非零子节点的个数减1,确定为第i个非零子节点对应的已编码点个数,例如确定的第i个非零子节点对应的已编码点个数为4-1=3。For example, as shown in FIG8 , assuming that the current node is the first non-zero node in the third layer in FIG8 , and the placeholder information of the current node is 01010101, it can be determined that the current node includes 4 non-zero child nodes. Assuming that the i-th non-zero child node is the first non-zero child node of the current node, since the placeholder information of the current node is known, the geometric position information of the 4 non-zero child nodes of the current node can be determined, so the geometric position information of the 4 non-zero child nodes included in the current node has been encoded, that is, the 4 non-zero child nodes included in the current node are encoded points for the first non-zero child node in the current node. It should be noted that when determining the first parameter above, it is assumed that the current node includes an encoded point, therefore, it is necessary to reduce the number of non-zero child nodes included in the current node by 1, and determine it as the number of encoded points corresponding to the i-th non-zero child node, for example, the number of encoded points corresponding to the i-th non-zero child node is determined to be 4-1=3.
方式2,若第i个非零子节点不是当前节点的第1个非零子节点,则获取当前节点中第i个非零子节点之前的非零子节点所包括的第一重复点个数之和;将当前节点所包括的非零子节点的个数减1后,再与第一重复点个数之和相加,得到第i个非零子节点对应的已编码点个数。Method 2: If the i-th non-zero child node is not the first non-zero child node of the current node, obtain the sum of the first number of repeated points included in the non-zero child nodes before the i-th non-zero child node in the current node; subtract 1 from the number of non-zero child nodes included in the current node, and then add it to the sum of the first number of repeated points to obtain the number of encoded points corresponding to the i-th non-zero child node.
在该方式2中,若当前节点的第i个非零子节点不是当前节点的第1个非零子节点,也就是说,在第i个子节点之前,已编码出当前节点的至少一个非零子节点,编码出的非零子节点中可能包括重复点,因此,在确定第i个子节点对应的已编码点个数时,需要考虑已编码的重复点个数。In method 2, if the i-th non-zero child node of the current node is not the first non-zero child node of the current node, that is, before the i-th child node, at least one non-zero child node of the current node has been encoded, and the encoded non-zero child nodes may include duplicate points. Therefore, when determining the number of encoded points corresponding to the i-th child node, the number of encoded duplicate points needs to be considered.
具体是,若当前节点为第N-1层中的第1个非零节点,且当前节点的第i个非零子节点不是当前节点的第1个非零子节点,则获取当前节点中第i个非零子节点之前的非零子节点所包括的第一重复点个数之和;将当前节点所包括的非零子节点的个数减1后,再与第一重复点个数之和相加,得到第i个非零子节点对应的已编码点个数。Specifically, if the current node is the first non-zero node in the N-1th layer, and the i-th non-zero child node of the current node is not the first non-zero child node of the current node, then obtain the sum of the first number of repeated points included in the non-zero child nodes before the i-th non-zero child node in the current node; subtract 1 from the number of non-zero child nodes included in the current node, and then add it to the sum of the first number of repeated points to obtain the number of encoded points corresponding to the i-th non-zero child node.
举例说明,假设当前节点为图8中第3层中的第一个非零节点,当前节点的占位信息为01010101,则可以确定出当前节点包括4个非零子节点。假设当前节点的第1个子节点包括1个重复点,且假设第i个非零子节点为当前节点的第2个非零子节点。在确定是否节点当前节点的第2个非零子节点的重复点信息时,首先确定该第2个非零子节点对应的已编码点个数,具体是,第2个非零子节点对应的已编码点个数为当前节点所包括的非零子节点个数减1后,再加上当前节点的第1个子节点的1个重复点,得到第2个非零子节点对应的已编码点个数为4-1+1=4。For example, assuming that the current node is the first non-zero node in the third layer in Figure 8, and the placeholder information of the current node is 01010101, it can be determined that the current node includes 4 non-zero child nodes. Assume that the first child node of the current node includes 1 repeated point, and assume that the i-th non-zero child node is the second non-zero child node of the current node. When determining whether the node has repeated point information of the second non-zero child node of the current node, first determine the number of encoded points corresponding to the second non-zero child node. Specifically, the number of encoded points corresponding to the second non-zero child node is the number of non-zero child nodes included in the current node minus 1, plus 1 repeated point of the first child node of the current node, and the number of encoded points corresponding to the second non-zero child node is 4-1+1=4.
上述方式一,假设当前节点为第N-1层中的第一个非零节点时,确定当前节点的第i个非零子节点对应的已编码点个数的过程进行介绍。In the above-mentioned method 1, assuming that the current node is the first non-zero node in the N-1th layer, the process of determining the number of encoded points corresponding to the i-th non-zero child node of the current node is introduced.
方式二,若当前节点不是第N-1层中的第一个非零节点,则上述S202-A11包括如下S202-A11-b1至S202-A11-b3的步骤:Method 2: If the current node is not the first non-zero node in the N-1th layer, the above S202-A11 includes the following steps S202-A11-b1 to S202-A11-b3:
S202-A11-b1、确定第N-1层中位于当前节点之前的各非零节点对应的已编码点的个数;S202-A11-b1, determine the number of encoded points corresponding to each non-zero node located before the current node in the N-1th layer;
S202-A11-b2、确定当前节点的非零子节点个数;S202-A11-b2, determine the number of non-zero child nodes of the current node;
S202-A11-b3、基于第N-1层中位于当前节点之前的各非零节点对应的已编码点的个数,以及当前节点的非零子节点个数,确定第i个非零子节点对应的已编码点个数。S202-A11-b3. Determine the number of encoded points corresponding to the i-th non-zero child node based on the number of encoded points corresponding to each non-zero node before the current node in the N-1th layer and the number of non-zero child nodes of the current node.
在该方式二中,若当前节点不是八叉树的第N-1层中的第一个非零节点,则说明在编码当前节点之前,八叉树的第N-1层中已有至少一个非零节点编码完成,因此,在该实施例中,在确定当前节点的第i个非零子节点对应的已编码点个数时,首先确定八叉树的第N-1层中位于当前节点之前的各非零节点对应的已编码点的个数,接着,确定当前节点的非零子节点个数,进而基于第N-1层中位于当前节点之前的各非零节点对应的已编码点的个数,以及当前节点的非零子节点个数,确定第i个非零子节点对应的已编码点个数。In the second method, if the current node is not the first non-zero node in the N-1th layer of the octree, it means that before encoding the current node, at least one non-zero node in the N-1th layer of the octree has been encoded. Therefore, in this embodiment, when determining the number of encoded points corresponding to the i-th non-zero child node of the current node, first determine the number of encoded points corresponding to each non-zero node located before the current node in the N-1th layer of the octree, then determine the number of non-zero child nodes of the current node, and then determine the number of encoded points corresponding to the i-th non-zero child node based on the number of encoded points corresponding to each non-zero node located before the current node in the N-1th layer and the number of non-zero child nodes of the current node.
下面对S202-A11-b1中确定第N-1层中位于当前节点之前的各非零节点对应的已编码点的个数进行介绍。The following is an introduction to determining the number of encoded points corresponding to each non-zero node located before the current node in the N-1th layer in S202-A11-b1.
在一种可能的实现方式中,首先确定当前节点之前的各非零节点所包括的非零子节点的个数,进而将该各非零节点所包括的非零子节点的个数进行相加,得到数值1。接着,确定该各非零节点对应的已编码出的重复点的总个数,进而将数值1与重复点的总个数相加,得到数值2,该数值2再减去第N-1层中位于当前节点之前的各非零节点的个数,得到第N-1层中位于当前节点之前的各非零节点对应的已编码点的个数。在该实施例中,编码端可以对N-1层各非零节点的非零子节点个数进行记录,同时,对已编码出的重复点个数进行单独记录,最后,基于单独记录的非零子节点个数和重复点个数,确定第N-1层中位于当前节点之前的各非零节点对应的已编码点的个数。In a possible implementation, the number of non-zero child nodes included in each non-zero node before the current node is first determined, and then the number of non-zero child nodes included in each non-zero node is added to obtain a value of 1. Next, the total number of encoded repeated points corresponding to each non-zero node is determined, and then the value 1 is added to the total number of repeated points to obtain a value of 2, and the number of non-zero nodes before the current node in the N-1 layer is subtracted from the value 2 to obtain the number of encoded points corresponding to each non-zero node before the current node in the N-1 layer. In this embodiment, the encoding end can record the number of non-zero child nodes of each non-zero node in the N-1 layer, and at the same time, separately record the number of encoded repeated points. Finally, based on the separately recorded number of non-zero child nodes and the number of repeated points, the number of encoded points corresponding to each non-zero node before the current node in the N-1 layer is determined.
举例说明,假设当前节点为图8所示的八叉树中的第3层中的第3个非零节点。在编码第3个非零节点时,第N-1层中位于第3个非零节点之前的第1个非零节点和第2个非零节点已编码完成。假设第1个非零节点的占位信息为01010101,且第1个非零节点的第1个非零子节点包括1个重复点,第2个非零节点的占位信息为01010100。在编码第3个非零节点时,确定第N-1层中位于当前节点之前的各非零节点对应的已编码点的个数。即确定第1个非零节点和第2个非零节点各自的非零子节点个数,由占位信息可知,第1个非零节点包括4个非零子节点,第2个非零节点包括3个非零子节点,因此,第1个非零节点和第2个非零节点共包括7个非零子节点。另外,编码得到第1个非零节点的第1个非零子节点包括1个重复点。由此可知,第3个非零节点之前的第1个非零节点和第2个非零节点对应的已编码点的个数为7+1-2=6。For example, assume that the current node is the third non-zero node in the third layer of the octree shown in FIG8 . When encoding the third non-zero node, the first non-zero node and the second non-zero node in the N-1th layer before the third non-zero node have been encoded. Assume that the placeholder information of the first non-zero node is 01010101, and the first non-zero child node of the first non-zero node includes 1 repeated point, and the placeholder information of the second non-zero node is 01010100. When encoding the third non-zero node, determine the number of encoded points corresponding to each non-zero node in the N-1th layer before the current node. That is, determine the number of non-zero child nodes of the first non-zero node and the second non-zero node respectively. It can be seen from the placeholder information that the first non-zero node includes 4 non-zero child nodes, and the second non-zero node includes 3 non-zero child nodes. Therefore, the first non-zero node and the second non-zero node include 7 non-zero child nodes in total. In addition, the first non-zero child node of the first non-zero node obtained by encoding includes 1 repeated point. Therefore, the number of encoded points corresponding to the first non-zero node and the second non-zero node before the third non-zero node is 7+1-2=6.
在另一种可能的实现方式中,编码端针对各非零节点中的一个非零节点,获取非零节点的非零子节点个数和非零子节点所包括的重复点个数;将非零节点的非零子节点个数减1后,与非零节点的非零子节点所包括的重复点个数之和相加,得到非零节点对应的已编码点的个数。在该实现方式中,编码端确定八叉树的第N-1层中位于当前节点之前的各非零节点对应的已编码点的个数的方式相同,即编码端确定当前节点之前的各非零节点中每一个非零节点对应的已编码点的个数,最后将各非零节点对应的已编码点的个数进行求和。In another possible implementation, the encoder obtains the number of non-zero child nodes and the number of repeated points included in the non-zero child node for one non-zero node among the non-zero nodes; subtracts 1 from the number of non-zero child nodes of the non-zero node, and adds the sum of the number of repeated points included in the non-zero child nodes of the non-zero node to obtain the number of encoded points corresponding to the non-zero node. In this implementation, the encoder determines the number of encoded points corresponding to each non-zero node before the current node in the N-1th layer of the octree in the same manner, that is, the encoder determines the number of encoded points corresponding to each non-zero node before the current node, and finally sums the number of encoded points corresponding to each non-zero node.
具体的,针对第N-1层中位于当前节点之前的每一个非零节点,首先基于该非零节点的占位信息,确定该非零节点所包括的非零子节点的个数,将非零节点的非零子节点个数减1,得到数值a。接着,确定该非零节点的非零子节点所包括的重复点个数之和,记为数值b。最后将数值a与数值b进行相加,得到该非零节点对应的已编码点的个数。按照该方法,可以确定出第N-1层中位于当前节点之前的每一个非零节点对应的已编码点的个数。Specifically, for each non-zero node located before the current node in the N-1th layer, first determine the number of non-zero child nodes included in the non-zero node based on the placeholder information of the non-zero node, subtract 1 from the number of non-zero child nodes of the non-zero node, and obtain the value a. Next, determine the sum of the number of repeated points included in the non-zero child nodes of the non-zero node, and record it as the value b. Finally, add the value a and the value b to obtain the number of encoded points corresponding to the non-zero node. According to this method, the number of encoded points corresponding to each non-zero node located before the current node in the N-1th layer can be determined.
举例说明,假设当前节点为图8所示的八叉树中的第3层中的第3个非零节点。在编码第3个非零节点时,第N-1层中位于第3个非零节点之前的第1个非零节点和第2个非零节点已编码完成。假设第1个非零节点的占位信息为01010101,且第1个非零节点的第1个非零子节点包括1个重复点,第2个非零节点的占位信息为01010100。在编码第3个非零节点时,确定第N-1层中位于当前节点之前的各非零节点对应的已编码点的个数。由占位信息可知,第1个非零节点包括4个非零子节点,第2个非零节点包括3个非零子节点,且第1个非零节点的第1个非零子节点包括1个重复点,则可以确定出第1个非零节点对应的已编码点个数为4-1+1=4,第2个非零节点对应的已编码点的个数为3-1=2。For example, assume that the current node is the third non-zero node in the third layer of the octree shown in Figure 8. When encoding the third non-zero node, the first non-zero node and the second non-zero node in the N-1th layer before the third non-zero node have been encoded. Assume that the placeholder information of the first non-zero node is 01010101, and the first non-zero child node of the first non-zero node includes 1 repeated point, and the placeholder information of the second non-zero node is 01010100. When encoding the third non-zero node, determine the number of encoded points corresponding to each non-zero node in the N-1th layer before the current node. From the placeholder information, we can see that the first non-zero node includes 4 non-zero child nodes, the second non-zero node includes 3 non-zero child nodes, and the first non-zero child node of the first non-zero node includes 1 repeated point. It can be determined that the number of encoded points corresponding to the first non-zero node is 4-1+1=4, and the number of encoded points corresponding to the second non-zero node is 3-1=2.
基于上述方法,确定出第N-1层中位于当前节点之前的各非零节点对应的已编码点的个数,同时,确定当前节点的非零子节点个数,其中确定当前节点的非零子节点个数的方式可以参照上述S202-A11-a1的描述,在此不再赘述。Based on the above method, the number of encoded points corresponding to each non-zero node located before the current node in the N-1th layer is determined, and at the same time, the number of non-zero child nodes of the current node is determined. The method for determining the number of non-zero child nodes of the current node can refer to the description of S202-A11-a1 above, and will not be repeated here.
接着,编码端基于第N-1层中位于当前节点之前的各非零节点对应的已编码点的个数,以及当前节点的非零子节点个数,确定第i个非零子节点对应的已编码点个数。Next, the encoder determines the number of coded points corresponding to the i-th non-zero child node based on the number of coded points corresponding to each non-zero node before the current node in the N-1th layer and the number of non-zero child nodes of the current node.
本申请实施例对上述S202-A11-b3中基于第N-1层中位于当前节点之前的各非零节点对应的已编码点的个数,以及当前节点的非零子节点个数,确定第i个非零子节点对应的已编码点个数的具体实现方式不做限制。The embodiment of the present application does not limit the specific implementation method of determining the number of encoded points corresponding to the i-th non-zero child node in the above S202-A11-b3 based on the number of encoded points corresponding to each non-zero node located before the current node in the N-1th layer and the number of non-zero child nodes of the current node.
在一些实施例中,上述S202-A11-b3包括如下S202-A11-b31和S202-A11-b32的步骤:In some embodiments, the above S202-A11-b3 includes the following steps S202-A11-b31 and S202-A11-b32:
S202-A11-b31、将第N-1层中位于当前节点之前的各非零节点对应的已编码点的个数相加,得到第一和值;S202-A11-b31, adding the numbers of encoded points corresponding to each non-zero node before the current node in the N-1th layer to obtain a first sum value;
S202-A11-b32、基于第一和值和当前节点的非零子节点个数,确定第i个非零子节点对应的已编码点个数。S202-A11-b32. Determine the number of encoded points corresponding to the i-th non-zero child node based on the first sum value and the number of non-zero child nodes of the current node.
在该实施例中,编码端基于上述方法,确定出八叉树的第N-1层中位于当前节点之前的各非零节点对应的已编码点的个数,接着,编码端将第N-1层中位于当前节点之前的各非零节点对应的已编码点的个数进行相加,得到第一和值,并基于该第一和值和当前节点的非零子节点个数,确定第i个非零子节点对应的已编码点个数,实现对第i个非零子节点对应的已编码点个数的准确确定。In this embodiment, the encoding end determines the number of encoded points corresponding to each non-zero node located before the current node in the N-1th layer of the octree based on the above method. Then, the encoding end adds the number of encoded points corresponding to each non-zero node located before the current node in the N-1th layer to obtain a first sum value, and determines the number of encoded points corresponding to the i-th non-zero child node based on the first sum value and the number of non-zero child nodes of the current node, thereby achieving accurate determination of the number of encoded points corresponding to the i-th non-zero child node.
其中,上述S202-A11-b32中基于第一和值和当前节点的非零子节点个数,确定第i个非零子节点对应的已编码点个数的实现方式至少包括如下两种方式:Among them, the implementation method of determining the number of encoded points corresponding to the i-th non-zero child node based on the first sum value and the number of non-zero child nodes of the current node in the above S202-A11-b32 includes at least the following two methods:
方式1,若第i个非零子节点为当前节点的第1个非零子节点,则将第一和值与当前节点所包括的非零子节点的个数进行相加,得到第二和值;对第二和值减1,得到第i个非零子节点对应的已编码点个数。Method 1: If the i-th non-zero child node is the first non-zero child node of the current node, then add the first sum value to the number of non-zero child nodes included in the current node to obtain the second sum value; subtract 1 from the second sum value to obtain the number of encoded points corresponding to the i-th non-zero child node.
在该方式1中,若当前节点不是第N-1层中的第一个非零节点,且当前节点的第i个非零子节点是当前节点的第1个非零子节点,则基于上述步骤,将第N-1层中位于当前节点之前的各已编码的非零节点的已编码点个数相加,得到第一和值。同时,由于当前节点的占位信息已编码出,因此可以确定出当前节点的各子节点的几何位置信息,因此将当前节点的各子节点确定为已编码点,进而将第一和值与当前节点的子节点个数相加,得到第二和值。另外,由于上述确定第一参数时,已经假设当前节点包括一个已编码点,因此,为了避免重复该已编码点重复计数,则将确定出的第二和值减1,得到第i个非零子节点对应的已编码点个数。In this method 1, if the current node is not the first non-zero node in the N-1th layer, and the i-th non-zero child node of the current node is the first non-zero child node of the current node, then based on the above steps, the number of encoded points of each encoded non-zero node located before the current node in the N-1th layer is added to obtain a first sum value. At the same time, since the placeholder information of the current node has been encoded, the geometric position information of each child node of the current node can be determined, so each child node of the current node is determined as an encoded point, and then the first sum value is added to the number of child nodes of the current node to obtain a second sum value. In addition, since it is assumed that the current node includes an encoded point when determining the first parameter above, in order to avoid repeating the count of the encoded point, the determined second sum value is subtracted by 1 to obtain the number of encoded points corresponding to the i-th non-zero child node.
方式2,若第i个非零子节点不是当前节点的第1个非零子节点,则将第一和值与当前节点所包括的非零子节点的个数进行相加,得到第二和值;对第二和值减1,得到第三和值;获取当前节点中位于第i个非零子节点之前的非零子节点所包括的第一重复点个数之和,并将第三和值与所述第一重复点个数之和相加,得到第i个非零子节点对应的已编码点个数。Method 2: If the i-th non-zero child node is not the first non-zero child node of the current node, then add the first sum value to the number of non-zero child nodes included in the current node to obtain a second sum value; subtract 1 from the second sum value to obtain a third sum value; obtain the sum of the first number of repeated points included in the non-zero child nodes before the i-th non-zero child node in the current node, and add the third sum value to the sum of the first number of repeated points to obtain the number of encoded points corresponding to the i-th non-zero child node.
在该方式2中,若当前节点不是第N-1层中的第一个非零节点,且当前节点的第i个非零子节点不是当前节点的第1个非零子节点,则基于上述步骤,将第N-1层中位于当前节点之前的各已编码的非零节点的已编码点个数相加,得到第一和值。同时,由于当前节点的占位信息已编码出,因此可以确定出当前节点的各子节点的几何位置信息,因此将当前节点的各子节点确定为已编码点,进而将第一和值与当前节点的子节点个数相加,得到第二和值。另外,由于上述确定第一参数时,已经假设当前节点包括一个已编码点,因此,为了避免重复该已编码点重复计数,则将确定出的第二和值减1,得到第三和值。在该方式2中,由于第i个子节点不是当前节点的第1个子节点,而当前节点中位于第i个子节点之前的子节点可能包括重复点,因此,需要获取当前节点中位于第i个非零子节点之前的非零子节点所包括的第一重复点个数之和,最后将第三和值与所述第一重复点个数之和相加,得到第i个非零子节点对应的已编码点个数。In this method 2, if the current node is not the first non-zero node in the N-1th layer, and the i-th non-zero child node of the current node is not the first non-zero child node of the current node, then based on the above steps, the number of encoded points of each encoded non-zero node before the current node in the N-1th layer is added to obtain a first sum. At the same time, since the placeholder information of the current node has been encoded, the geometric position information of each child node of the current node can be determined, so each child node of the current node is determined as an encoded point, and then the first sum is added to the number of child nodes of the current node to obtain a second sum. In addition, since it is assumed that the current node includes an encoded point when determining the first parameter above, in order to avoid repeating the count of the encoded point, the determined second sum is subtracted by 1 to obtain a third sum. In method 2, since the i-th child node is not the first child node of the current node, and the child node before the i-th child node in the current node may include repeated points, it is necessary to obtain the sum of the first number of repeated points included in the non-zero child nodes before the i-th non-zero child node in the current node, and finally add the third sum value to the sum of the first number of repeated points to obtain the number of encoded points corresponding to the i-th non-zero child node.
编码端基于上述S202-A11步骤,确定出当前节点的第i个非零子节点对应的已编码点个数后,执行如下S202-A12的步骤。After the encoder determines the number of encoded points corresponding to the i-th non-zero child node of the current node based on the above step S202-A11, it executes the following step S202-A12.
S202-A12、基于点云中第i个非零子节点对应的已编码点个数,确定第i个非零子节点对应的第二参数。S202-A12. Determine a second parameter corresponding to the ith non-zero child node based on the number of encoded points corresponding to the ith non-zero child node in the point cloud.
本申请实施例中,编码端在编码当前节点时,确定是否编码当前节点的第i个非零子节点的重复点信息之前,首先基于上述步骤,确定第i个非零子节点对应的已编码点个数,进而基于该第i个非零子节点对应的已编码点个数,确定第i个非零子节点对应的第二参数,这样确定出的第二参数可以反映出编码第i个非零子节点时,点云中几何位置已编码的点的个数。最后,基于当前节点对应的第一参数和第i个非零子节点对应的第二参数,判断该第i个非零子节 点是否包括重复点,进而确定是否编码该第i个非零子节点的重复点信息。In the embodiment of the present application, when encoding the current node, the encoding end first determines the number of encoded points corresponding to the i-th non-zero child node based on the above steps before determining whether to encode the repeated point information of the i-th non-zero child node of the current node, and then determines the second parameter corresponding to the i-th non-zero child node based on the number of encoded points corresponding to the i-th non-zero child node, so that the second parameter determined in this way can reflect the number of points encoded at the geometric position in the point cloud when encoding the i-th non-zero child node. Finally, based on the first parameter corresponding to the current node and the second parameter corresponding to the i-th non-zero child node, it is determined whether the i-th non-zero child node includes repeated points, and then it is determined whether to encode the repeated point information of the i-th non-zero child node.
针对一孤立点P,直接对其坐标进行压缩与采用八叉树方法压缩相比,具有更高的效率。这种直接对节点中的点的坐标进行编码的过程称为直接编码模式(Direct Coding Model,简称DCM)。当前节点是否使用DCM,可基于邻居节点的信息推断出,将这种方法叫做推断直接编码模式(Inter Direct Coding Model,简称IDCM)。For an isolated point P, directly compressing its coordinates is more efficient than using the octree method. This process of directly encoding the coordinates of the points in the node is called the Direct Coding Model (DCM). Whether the current node uses DCM can be inferred based on the information of neighboring nodes. This method is called the Inter Direct Coding Model (IDCM).
本申请实施例中,点云采用IDCM与不采用IDCM时,基于点云中第i个非零子节点对应的已编码点个数,确定第i个非零子节点对应的第二参数的方式不相同。下面针对点云采用DCM与不采用IDCM时,确定第i个非零子节点对应的第二参数的具体过程进行介绍。In the embodiment of the present application, when the point cloud adopts IDCM and does not adopt IDCM, the method of determining the second parameter corresponding to the i-th non-zero subnode based on the number of encoded points corresponding to the i-th non-zero subnode in the point cloud is different. The following introduces the specific process of determining the second parameter corresponding to the i-th non-zero subnode when the point cloud adopts DCM and does not adopt IDCM.
本申请实施例中,基于点云中第i个非零子节点对应的已编码点个数,确定第i个非零子节点对应的第二参数至少包括如下几种方式:In the embodiment of the present application, based on the number of encoded points corresponding to the i-th non-zero child node in the point cloud, determining the second parameter corresponding to the i-th non-zero child node includes at least the following methods:
方式1,若点云未采用IDCM,则将第i个非零子节点对应的已编码点个数,确定为第i个非零子节点对应的第二参数。Method 1: If the point cloud does not use IDCM, the number of encoded points corresponding to the i-th non-zero child node is determined as the second parameter corresponding to the i-th non-zero child node.
在该方式1中,若点云未采用IDCM,即IDCM关闭,此时说明在八叉树编码时,八叉树中的每个节点均为采用直接编码方式,因此,在编码当前节点时,除了上述确定的第i个非零子节点对应的已编码点外,不包括其他已编码点。基于此,可以直接将第i个非零子节点对应的已编码点个数,确定为第i个非零子节点对应的第二参数。In this method 1, if the point cloud does not use IDCM, that is, IDCM is turned off, it means that when encoding the octree, each node in the octree is directly encoded. Therefore, when encoding the current node, in addition to the encoded point corresponding to the i-th non-zero child node determined above, other encoded points are not included. Based on this, the number of encoded points corresponding to the i-th non-zero child node can be directly determined as the second parameter corresponding to the i-th non-zero child node.
方式2,若点云采用IDCM,则上述S202-A12包括如下S202-A121和S202-A122的步骤:Method 2: If the point cloud adopts IDCM, the above S202-A12 includes the following steps S202-A121 and S202-A122:
S202-A121、确定八叉树中已编码的第一节点所包括的点个数,第一节点为所述八叉树中采用IDCM的节点;S202-A121, determining the number of points included in the first node that has been encoded in the octree, the first node being a node in the octree that adopts IDCM;
S202-A122、基于第i个非零子节点对应的已编码点个数,以及第一节点所包括的点个数,确定第i个非零子节点对应的第二参数。S202-A122. Determine a second parameter corresponding to the i-th non-zero child node based on the number of encoded points corresponding to the i-th non-zero child node and the number of points included in the first node.
在该方式2中,若点云采用IDCM,即IDCM开启,此时,说明点云的八叉树中可能有至少一个节点采用直接编码方式,将该节点所包括点的几何信息直接进行编码。这样在确定第i个非零子节点对应的第二参数时,需要将八叉树中采用IDCM的已编码的第一节点所包括的点的个数,与上述确定的第i个非零子节点对应的已编码点个数进行相加。In this method 2, if the point cloud uses IDCM, that is, IDCM is turned on, then it means that at least one node in the octree of the point cloud may use direct coding to directly encode the geometric information of the points included in the node. In this way, when determining the second parameter corresponding to the i-th non-zero child node, it is necessary to add the number of points included in the first node encoded using IDCM in the octree to the number of encoded points corresponding to the i-th non-zero child node determined above.
举例说明,假设点云的八叉树中,有1个节点采用IDCM,为了便于描述,将该节点记为第一节点,假设这第一节点包括1个点,假设在编码当前节点之前,这第一节点均已编码完成。因此,可以确定出八叉树中已编码的第一节点所包括的点个数为1。For example, suppose that in the octree of the point cloud, there is a node that uses IDCM. For the sake of description, this node is recorded as the first node. Suppose that this first node includes 1 point. Suppose that this first node has been encoded before encoding the current node. Therefore, it can be determined that the number of points included in the first node that has been encoded in the octree is 1.
确定出八叉树中已编码的第一节点所包括的点个数后,基于第i个非零子节点对应的已编码点个数,以及第一节点所包括的点个数,确定第i个非零子节点对应的第二参数。After determining the number of points included in the first node that has been encoded in the octree, the second parameter corresponding to the i-th non-zero child node is determined based on the number of encoded points corresponding to the i-th non-zero child node and the number of points included in the first node.
在一些实施例中,若上述采用IDCM编码的第一节点包括重复点时,则第一节点所包括的点个数中包括第一节点中的重复点个数。In some embodiments, if the first node encoded using IDCM includes repeated points, the number of points included in the first node includes the number of repeated points in the first node.
在一些实施例中,若当前节点也采用IDCM编码,则上述第一节点不包括当前节点。也就是说,若当前节点采用IDCM编码时,针对当前节点中的第i个非零节点(即当前节点所包括的第i个点),基于上述步骤,确定出八叉树中未采用IDCM编码的节点对应的已编码点个数(即第i个非零子节点对应的已编码点个数),以及确定出八叉树中采用IDCM编码的第一节点对应的已编码点个数,进而将八叉树中未采用IDCM编码的节点对应的已编码点个数和八叉树中采用IDCM编码的第一节点对应的已编码点个数,确定当前节点的第i个非零子节点对应的第二参数,进而基于该第二参数和第一参数,确定第i个非零子节点是否包括重复点。例如,若第二参数等于第一参数,则确定第i个非零子节点不包括重复点,则跳过编码该第i个非零子节点的重复点信息。再例如,若第二参数小于第一参数,则确定第i个非零子节点包括重复点,则可以编码该第i个非零子节点的重复点信息,或者进一步基于第i个非零子节点是否为八叉树中的最后一个节点来判断是否编码第i个非零子节点的重复点信息。In some embodiments, if the current node also adopts IDCM encoding, the above-mentioned first node does not include the current node. That is to say, if the current node adopts IDCM encoding, for the i-th non-zero node in the current node (i.e., the i-th point included in the current node), based on the above steps, the number of encoded points corresponding to the node that does not adopt IDCM encoding in the octree (i.e., the number of encoded points corresponding to the i-th non-zero child node) is determined, and the number of encoded points corresponding to the first node that adopts IDCM encoding in the octree is determined, and then the number of encoded points corresponding to the node that does not adopt IDCM encoding in the octree and the number of encoded points corresponding to the first node that adopts IDCM encoding in the octree are used to determine the second parameter corresponding to the i-th non-zero child node of the current node, and then based on the second parameter and the first parameter, it is determined whether the i-th non-zero child node includes duplicate points. For example, if the second parameter is equal to the first parameter, it is determined that the i-th non-zero child node does not include duplicate points, and the encoding of the duplicate point information of the i-th non-zero child node is skipped. For another example, if the second parameter is less than the first parameter, it is determined that the i-th non-zero child node includes a duplicate point, and the duplicate point information of the i-th non-zero child node can be encoded, or further based on whether the i-th non-zero child node is the last node in the octree, it is determined whether to encode the duplicate point information of the i-th non-zero child node.
在一种可能的实现方式中,若第一节点不是第N-1层中的节点,则将第i个非零子节点对应的已编码点个数和第一节点所包括的点个数之和,确定为第i个非零子节点对应的第二参数。In one possible implementation, if the first node is not a node in the N-1th layer, the sum of the number of encoded points corresponding to the i-th non-zero child node and the number of points included in the first node is determined as the second parameter corresponding to the i-th non-zero child node.
由上述可知,第i个非零子节点对应的已编码点个数与八叉树中第N-1层所包括的非零节点的个数有关,即在确定第i个非零子节点对应的已编码点个数时,假设第N-1层中的每一个非零节点包括一个已编码点。在该实施例中,若第一节点不是第N-1层中的节点,则不影响上述确定第i个非零子节点对应的已编码点个数的过程,即上述确定的第i个非零子节点对应的已编码点中不包括该第一节点所包括的点,因此,在该实施例中,可以直接将第i个非零子节点对应的已编码点个数和第一节点所包括的点个数之和,确定为第i个非零子节点对应的第二参数。From the above, it can be seen that the number of encoded points corresponding to the ith non-zero child node is related to the number of non-zero nodes included in the N-1th layer in the octree, that is, when determining the number of encoded points corresponding to the ith non-zero child node, it is assumed that each non-zero node in the N-1th layer includes an encoded point. In this embodiment, if the first node is not a node in the N-1th layer, it does not affect the above process of determining the number of encoded points corresponding to the ith non-zero child node, that is, the encoded points corresponding to the ith non-zero child node determined above do not include the points included in the first node. Therefore, in this embodiment, the sum of the number of encoded points corresponding to the ith non-zero child node and the number of points included in the first node can be directly determined as the second parameter corresponding to the ith non-zero child node.
在另一种可能的实现方式中,若第一节点是第N-1层中的节点,则将第i个非零子节点对应的已编码点个数和第一节点所包括的点个数之和减1后的值,确定为第i个非零子节点对应的第二参数。In another possible implementation, if the first node is a node in the N-1th layer, the value obtained by subtracting 1 from the sum of the number of encoded points corresponding to the i-th non-zero child node and the number of points included in the first node is determined as the second parameter corresponding to the i-th non-zero child node.
由上述可知,第i个非零子节点对应的已编码点个数与八叉树中第N-1层所包括的非零节点的个数有关,即在确定第i个非零子节点对应的已编码点个数时,假设第N-1层中的每一个非零节点包括一个已编码点。在该实施例中,若第一节点是第N-1层中的节点,则会影响上述确定第i个非零子节点对应的已编码点个数的过程,即上述确定的第i个非零子节点对应的已编码点中已经包括该第一节点所包括的一个点,因此,在该实施例中,将第i个非零子节点对应的已编码点个数和第一节点所包括的点个数进行相加后,减去重复计算的一个已编码点,得到第i个非零子节点对应的第二参数。From the above, it can be seen that the number of encoded points corresponding to the ith non-zero child node is related to the number of non-zero nodes included in the N-1th layer in the octree, that is, when determining the number of encoded points corresponding to the ith non-zero child node, it is assumed that each non-zero node in the N-1th layer includes an encoded point. In this embodiment, if the first node is a node in the N-1th layer, it will affect the above process of determining the number of encoded points corresponding to the ith non-zero child node, that is, the encoded points corresponding to the ith non-zero child node determined above already include a point included in the first node. Therefore, in this embodiment, after adding the number of encoded points corresponding to the ith non-zero child node and the number of points included in the first node, a repeatedly calculated encoded point is subtracted to obtain the second parameter corresponding to the ith non-zero child node.
在该情况1中,基于上述步骤,确定出当前节点的第i个非零子节点对应的第二参数后,执行上述S202-A2,以基于第一参数和第二参数,确定是否编码第i个非零子节点的重复点信息。In this case 1, after determining the second parameter corresponding to the i-th non-zero child node of the current node based on the above steps, execute the above S202-A2 to determine whether to encode the repeated point information of the i-th non-zero child node based on the first parameter and the second parameter.
其中S202-A2中基于第一参数和第二参数,确定是否编码第i个非零子节点的重复点信息的实现方式包括但不限于如下几种方式:The implementation of determining whether to encode the repeated point information of the i-th non-zero child node based on the first parameter and the second parameter in S202-A2 includes but is not limited to the following methods:
方式1,若第一参数等于第二参数,则跳过编码第i个非零子节点的重复点信息。Method 1: If the first parameter is equal to the second parameter, skip encoding the duplicate point information of the i-th non-zero child node.
由上述可知,当前节点对应的第一参数可以理解为在编码当前节点时,点云中几何位置信息不确定的点的个数, 或者可以理解为未编码的点的个数。当前节点的第i个非零子节点对应的第二参数,可以理解为当前已编码的点的个数。From the above, it can be seen that the first parameter corresponding to the current node can be understood as the number of points with uncertain geometric position information in the point cloud when encoding the current node, or it can be understood as the number of unencoded points. The second parameter corresponding to the i-th non-zero child node of the current node can be understood as the number of currently encoded points.
在该方式1中,若确定的当前节点对应的第一参数等于当前节点中第i个非零子节点对应的第二参数,则说明第i个非零子节点以及后续的未编码叶子节点中均不包括重复点,因此,跳过编码第i个非零子节点的重复点信息,以节约编码时间。In method 1, if the first parameter corresponding to the determined current node is equal to the second parameter corresponding to the i-th non-zero child node in the current node, it means that the i-th non-zero child node and subsequent uncoded leaf nodes do not include duplicate points. Therefore, the encoding of the duplicate point information of the i-th non-zero child node is skipped to save encoding time.
举例说明,假设该点云包括10个点,假设当前节点为图8中第3层中的第2个非零节点,当前节点所在的八叉树的第N-1层包括4个非零节点,因此,可以确定出当前节点对应的第一参数为10-4=6。For example, assuming that the point cloud includes 10 points, assuming that the current node is the second non-zero node in the third layer in Figure 8, and the N-1th layer of the octree where the current node is located includes 4 non-zero nodes, therefore, it can be determined that the first parameter corresponding to the current node is 10-4=6.
假设当前节点的占位信息为01010100,则可以确定出当前节点包括3个非零子节点。假设第i个非零子节点为当前节点的第2个非零子节点,由于当前节点的占位信息已知,则可以确定出当前节点的3个非零子节点的几何位置信息,因此当前节点所包括的3个非零子节点的几何位置信息已编码。如图8所示,在第3层中位于当前节点之前的各非零节点为第3层中的第一个非零节点,假设该第一个非零节点的占位信息为01010101,假设当前节点的第1个非零子节点中包括1个重复点,因此,基于上述方法,可以确定出第i个非零子节点对应的已编码点个数为4-1+3-1+1=6。在该实施例中,假设点云不采用IDCM,则将第i个非零子节点对应的已编码点个数6确定为第i个非零子节点对应的第二参数。Assuming that the placeholder information of the current node is 01010100, it can be determined that the current node includes 3 non-zero child nodes. Assuming that the i-th non-zero child node is the second non-zero child node of the current node, since the placeholder information of the current node is known, the geometric position information of the three non-zero child nodes of the current node can be determined, so the geometric position information of the three non-zero child nodes included in the current node has been encoded. As shown in Figure 8, each non-zero node located before the current node in the third layer is the first non-zero node in the third layer. Assuming that the placeholder information of the first non-zero node is 01010101, assuming that the first non-zero child node of the current node includes 1 repeated point, therefore, based on the above method, it can be determined that the number of encoded points corresponding to the i-th non-zero child node is 4-1+3-1+1=6. In this embodiment, assuming that the point cloud does not use IDCM, the number of encoded points corresponding to the i-th non-zero child node, 6, is determined as the second parameter corresponding to the i-th non-zero child node.
在该示例中,当前节点对应的第一参数6等于第i个非零子节点对应的第二参数6,因此,跳过编码第i个非零子节点的重复点信息。In this example, the first parameter 6 corresponding to the current node is equal to the second parameter 6 corresponding to the i-th non-zero child node, and therefore, the encoding of the repeated point information of the i-th non-zero child node is skipped.
方式2,第一参数大于第二参数,且第i个非零子节点为八叉树的最后一个体素节点,则跳过编码第i个非零子节点的重复点信息,且将第一参数与所述第二参数的差值,确定为第i个非零子节点所包括的重复点个数。Method 2: if the first parameter is greater than the second parameter and the i-th non-zero child node is the last voxel node of the octree, then the encoding of the duplicate point information of the i-th non-zero child node is skipped, and the difference between the first parameter and the second parameter is determined as the number of duplicate points included in the i-th non-zero child node.
在该方式2中,若确定的当前节点对应的第一参数等于当前节点中第i个非零子节点对应的第二参数,则说明表示第i个非零子节点以及后续的未编码叶子节点中可能包括重复点,同时,由于第i个非零子节点为八叉树的最后一个非零体素节点,则说明,该第i个非零子节点一定包括重复点,且第i个非零子节点包括的重复点的个数为第一参数与所述第二参数的差值。In method 2, if the first parameter corresponding to the determined current node is equal to the second parameter corresponding to the i-th non-zero child node in the current node, it means that the i-th non-zero child node and subsequent uncoded leaf nodes may include duplicate points. At the same time, since the i-th non-zero child node is the last non-zero voxel node of the octree, it means that the i-th non-zero child node must include duplicate points, and the number of duplicate points included in the i-th non-zero child node is the difference between the first parameter and the second parameter.
举例说明,假设该点云包括10个点,假设当前节点为图8中第3层中的第4个非零节点,当前节点所在的八叉树的第N-1层包括4个非零节点,因此,可以确定出当前节点对应的第一参数为10-4=6。For example, assuming that the point cloud includes 10 points, assuming that the current node is the fourth non-zero node in the third layer in Figure 8, and the N-1th layer of the octree where the current node is located includes 4 non-zero nodes, therefore, it can be determined that the first parameter corresponding to the current node is 10-4=6.
假设当前节点的占位信息为00000010,则可以确定出当前节点包括1个非零子节点。假设第i个非零子节点为当前节点的唯一一个非零子节点,由于当前节点的占位信息已知,则可以确定出当前节点的1个非零子节点的几何位置信息,因此当前节点所包括的1个非零子节点的几何位置信息已编码。如图8所示,在第3层中位于当前节点之前的各非零节点为第3层中的第一个非零节点、第二个非零节点、第三个非零节点,假设该第一个非零节点的占位信息为01010101,第一个非零节点的占位信息为01010100,第一个非零节点的占位信息为00000100,前3个非零节点的非零子节点中均不包括重复点。基于上述方法,可以确定出第i个非零子节点对应的已编码点个数为4-1+3-1+1-1+1-1=5。在该实施例中,假设点云不采用IDCM,则将第i个非零子节点对应的已编码点个数5确定为第i个非零子节点对应的第二参数。Assuming that the placeholder information of the current node is 00000010, it can be determined that the current node includes 1 non-zero child node. Assuming that the i-th non-zero child node is the only non-zero child node of the current node, since the placeholder information of the current node is known, the geometric position information of 1 non-zero child node of the current node can be determined, so the geometric position information of 1 non-zero child node included in the current node has been encoded. As shown in Figure 8, the non-zero nodes before the current node in the third layer are the first non-zero node, the second non-zero node, and the third non-zero node in the third layer. Assuming that the placeholder information of the first non-zero node is 01010101, the placeholder information of the first non-zero node is 01010100, and the placeholder information of the first non-zero node is 00000100, the non-zero child nodes of the first three non-zero nodes do not include duplicate points. Based on the above method, it can be determined that the number of encoded points corresponding to the i-th non-zero child node is 4-1+3-1+1-1+1-1=5. In this embodiment, assuming that the point cloud does not adopt IDCM, the number of encoded points corresponding to the i-th non-zero child node, 5, is determined as the second parameter corresponding to the i-th non-zero child node.
由上述可知,第一参数6大于第二参数5,且第i个非零子节点为八叉树的最后一个非零子节点,因此,可以确定第i个非零子节点一定包括重复点,且包括的重复点的个数为6-5=1,跳过编码第i个非零子节点的重复点信息,进而节约编码时间,提升编码效率。From the above, it can be seen that the first parameter 6 is greater than the second parameter 5, and the i-th non-zero child node is the last non-zero child node of the octree. Therefore, it can be determined that the i-th non-zero child node must include repeated points, and the number of repeated points included is 6-5=1. The repeated point information of the i-th non-zero child node is skipped, thereby saving encoding time and improving encoding efficiency.
方式3,第一参数大于第二参数,且第i个非零子节点不是八叉树的最后一个体素节点,则编码第i个非零子节点的重复点信息。Mode 3: If the first parameter is greater than the second parameter and the i-th non-zero child node is not the last voxel node of the octree, the duplicate point information of the i-th non-zero child node is encoded.
在该方式3中,若确定的当前节点对应的第一参数等于当前节点中第i个非零子节点对应的第二参数,则说明表示第i个非零子节点以及后续的未编码叶子节点中可能包括重复点,因此,为了保证编码的准确性,则编码第i个非零子节点的重复点信息。In method 3, if the first parameter corresponding to the determined current node is equal to the second parameter corresponding to the i-th non-zero child node in the current node, it means that the i-th non-zero child node and subsequent unencoded leaf nodes may include duplicate points. Therefore, in order to ensure the accuracy of the encoding, the duplicate point information of the i-th non-zero child node is encoded.
举例说明,假设该点云包括10个点,假设当前节点为图8中第3层中的第2个非零节点,当前节点所在的八叉树的第N-1层包括4个非零节点,因此,可以确定出当前节点对应的第一参数为10-4=6。For example, assuming that the point cloud includes 10 points, assuming that the current node is the second non-zero node in the third layer in Figure 8, and the N-1th layer of the octree where the current node is located includes 4 non-zero nodes, therefore, it can be determined that the first parameter corresponding to the current node is 10-4=6.
假设当前节点的占位信息为01010100,则可以确定出当前节点包括3个非零子节点。假设第i个非零子节点为当前节点的第2个非零子节点,由于当前节点的占位信息已知,则可以确定出当前节点的3个非零子节点的几何位置信息,因此当前节点所包括的3个非零子节点的几何位置信息已编码。如图8所示,在第3层中位于当前节点之前的各非零节点为第3层中的第一个非零节点,假设该第一个非零节点的占位信息为01010101,假设当前节点的第3个非零子节点中包括1个重复点,因此,基于上述方法,可以确定出第i个非零子节点对应的已编码点个数为4-1+3-1=5。在该实施例中,假设点云不采用IDCM,则将第i个非零子节点对应的已编码点个数5确定为第i个非零子节点对应的第二参数。Assuming that the placeholder information of the current node is 01010100, it can be determined that the current node includes 3 non-zero child nodes. Assuming that the i-th non-zero child node is the second non-zero child node of the current node, since the placeholder information of the current node is known, the geometric position information of the three non-zero child nodes of the current node can be determined, so the geometric position information of the three non-zero child nodes included in the current node has been encoded. As shown in Figure 8, each non-zero node located before the current node in the third layer is the first non-zero node in the third layer. Assuming that the placeholder information of the first non-zero node is 01010101, assuming that the third non-zero child node of the current node includes 1 repeated point, therefore, based on the above method, it can be determined that the number of encoded points corresponding to the i-th non-zero child node is 4-1+3-1=5. In this embodiment, assuming that the point cloud does not use IDCM, the number of encoded points corresponding to the i-th non-zero child node, 5, is determined as the second parameter corresponding to the i-th non-zero child node.
在该示例中,若当前节点对应的第一参数6大于第i个非零子节点对应的第二参数5,且第i个非零子节点不是八叉树的最后一个体素节点时,编码第i个非零子节点的重复点信息。In this example, if the first parameter 6 corresponding to the current node is greater than the second parameter 5 corresponding to the i-th non-zero child node, and the i-th non-zero child node is not the last voxel node of the octree, the duplicate point information of the i-th non-zero child node is encoded.
上述情况1,基于点云的总点数和八叉树的第N-1层的非零节点数,确定当前节点对应的第一参数,并确定当前节点的第i个非零子节点对应的第二参数,基于第一参数和第二参数,确定是否编码该第i个非零子节点的重复点信息,例如,若第一参数等于第二参数,则跳过编码该第i个非零子节点的重复点信息,进而降低了点云的编码复杂度,节约了编码时间,进而提升了编码效率。In the above situation 1, based on the total number of points in the point cloud and the number of non-zero nodes in the N-1th layer of the octree, the first parameter corresponding to the current node is determined, and the second parameter corresponding to the i-th non-zero child node of the current node is determined. Based on the first parameter and the second parameter, it is determined whether to encode the repeated point information of the i-th non-zero child node. For example, if the first parameter is equal to the second parameter, the repeated point information of the i-th non-zero child node is skipped, thereby reducing the encoding complexity of the point cloud, saving encoding time, and improving the encoding efficiency.
下面对情况2中,确定当前节点对应的第一参数,以及基于该第一参数对当前节点的几何编码过程进行介绍。The following introduces the process of determining the first parameter corresponding to the current node in situation 2 and the geometric encoding process of the current node based on the first parameter.
情况2,上述S201包括如下步骤:In case 2, the above S201 includes the following steps:
S201-B1、针对当前节点中的第i个非零子节点,确定第i个非零子节点对应的已编码重复点总数;S201-B1, for the i-th non-zero child node in the current node, determine the total number of encoded repeated points corresponding to the i-th non-zero child node;
S201-B2、将第i个非零子节点对应的已编码重复点总数,确定为第一参数。S201-B2. Determine the total number of encoded repeated points corresponding to the i-th non-zero child node as the first parameter.
在该情况2中,在确定当前节点的第i个非零子节点是否包括重复点时,首先确定该第i个非零子节点对应的已编码重复点个数,其中第i个非零子节点对应的已编码重复点可以理解为在编码第i个非零子节点的重复点信息之前,编码端已经编码出的重复点。In this case 2, when determining whether the i-th non-zero child node of the current node includes repeated points, the number of encoded repeated points corresponding to the i-th non-zero child node is first determined, where the encoded repeated points corresponding to the i-th non-zero child node can be understood as the repeated points that have been encoded by the encoding end before encoding the repeated point information of the i-th non-zero child node.
在一些实施例中,编码端使用dupCount记录已编码出的重复点的个数,其中dupCount初始化为0。In some embodiments, the encoder uses dupCount to record the number of repeated points that have been encoded, where dupCount is initialized to 0.
编码端确定出第i个非零子节点对应的已编码重复点总数,并将该第i个非零子节点对应的已编码重复点总数,确定为第一参数,进而基于还第一参数,对当前节点进行几何编码。The encoding end determines the total number of encoded repeated points corresponding to the i-th non-zero child node, and determines the total number of encoded repeated points corresponding to the i-th non-zero child node as the first parameter, and then performs geometric encoding on the current node based on the first parameter.
在一些实施例中,上述S201-B1中确定第i个非零子节点对应的已编码重复点总数包括:In some embodiments, determining the total number of encoded repeated points corresponding to the i-th non-zero child node in the above S201-B1 includes:
S201-B11、确定所述八叉树中位于第i个非零子节点之前的各非零子节点所包括的第一已编码重复点个数之和;S201-B11, determining the sum of the number of first encoded repeated points included in each non-zero child node located before the i-th non-zero child node in the octree;
S201-B12、基于第一已编码重复点个数之和,确定第i个非零子节点对应的已编码重复点总数。S201-B12. Determine the total number of encoded repeated points corresponding to the i-th non-zero child node based on the sum of the first number of encoded repeated points.
在该实施例中,若第i个非零子节点不是八叉树中的第1个非零叶子节点,则确定八叉树中位于第i个非零子节点之前的各非零子节点所包括的已编码点个数之和,为了便于描述,将该已编码点记为第一编码点。In this embodiment, if the i-th non-zero child node is not the first non-zero leaf node in the octree, the sum of the number of encoded points included in each non-zero child node located before the i-th non-zero child node in the octree is determined. For the sake of ease of description, the encoded point is recorded as the first encoded point.
例如,如图8所示,假设当前节点为第N-1层中的第1个非零节点,当前节点的占位信息为010101010,第i个非零子节点为当前节点中的第3个非零子节点,在八叉树中,位于第i个非零子节点之前的非零子节点有2个,假设这2个非零子节点中的一个非零子节点包括2个重复点,另一个非零子节点包括1个重复点,则可以确定出第一已编码重复点个数之和为2+1=3。For example, as shown in Figure 8, assuming that the current node is the first non-zero node in the N-1th layer, the placeholder information of the current node is 010101010, the i-th non-zero child node is the third non-zero child node in the current node, and in the octree, there are 2 non-zero child nodes before the i-th non-zero child node. Assuming that one of the two non-zero child nodes includes 2 repeated points and the other non-zero child node includes 1 repeated point, it can be determined that the sum of the first encoded repeated points is 2+1=3.
基于上述步骤,确定出八叉树中位于第i个非零子节点之前的各非零子节点所包括的第一已编码重复点个数之和后,基于该第一已编码重复点个数之和,确定第i个非零子节点对应的已编码重复点总数。Based on the above steps, after determining the sum of the first number of encoded repeated points included in each non-zero child node located before the i-th non-zero child node in the octree, the total number of encoded repeated points corresponding to the i-th non-zero child node is determined based on the sum of the first number of encoded repeated points.
基于点云是否采用预测树编码,则上述S201-B12中基于第一已编码重复点个数之和,确定第i个非零子节点对应的已编码重复点总数的实现方式至少包括如下两种:Based on whether the point cloud adopts prediction tree coding, the implementation methods of determining the total number of encoded repeated points corresponding to the i-th non-zero child node based on the sum of the first number of encoded repeated points in the above S201-B12 include at least the following two methods:
方式1,若点云采用IDCM时,则确定八叉树中采用IDCM的第一节点所包括的第二已编码重复点个数之和;将上述第一已编码重复点个数之和、与该第二已编码重复点个数之和进行相加,得到第i个非零子节点对应的已编码重复点总数。Method 1: If the point cloud adopts IDCM, the sum of the second number of encoded repeated points included in the first node using IDCM in the octree is determined; the sum of the first number of encoded repeated points and the sum of the second number of encoded repeated points are added to obtain the total number of encoded repeated points corresponding to the i-th non-zero child node.
方式2,若点云未采用IDCM时,则直接将上述确定的第一已编码重复点个数之和,确定为第i个非零子节点对应的已编码重复点总数。Method 2: If the point cloud does not use IDCM, the sum of the first number of encoded repeated points determined above is directly determined as the total number of encoded repeated points corresponding to the i-th non-zero child node.
基于上述步骤,确定出第i个非零子节点对应的已编码重复点总数,并将第i个非零子节点对应的已编码重复点总数,确定为第一参数后,执行上述S202的步骤,基于该第一参数,对当前节点进行几何编码。Based on the above steps, the total number of encoded repeated points corresponding to the i-th non-zero child node is determined, and after the total number of encoded repeated points corresponding to the i-th non-zero child node is determined as the first parameter, the above step S202 is executed to perform geometric encoding on the current node based on the first parameter.
在情况2中,上述S202中基于第一参数对当前节点进行几何编码包括如下S202-B1和S202-B2的步骤:In case 2, the geometric encoding of the current node based on the first parameter in S202 includes the following steps S202-B1 and S202-B2:
S202-B1、确定点云的重复点总数;S202-B1, determining the total number of repeated points in the point cloud;
S202-B2、基于点云的重复点总数和第i个非零子节点对应的已编码重复点总数,确定是否编码第i个非零子节点的重复点信息。S202-B2: Determine whether to encode the duplicate point information of the i-th non-zero child node based on the total number of duplicate points in the point cloud and the total number of encoded duplicate points corresponding to the i-th non-zero child node.
在情况2中,编码端在确定是否编码当前节点的第i个非零子节点的重复点信息时,基于上述步骤,将第i个非零子节点对应的已编码重复点个数确定为第一参数。接着,确定点云的重复点总数,并将第i个非零子节点对应的已编码重复点个数与点云的重复点个数进行比较,以确定第i个非零子节点是否包括重复点,进而确定是否编码第i个非零子节点的重复点信息。In case 2, when the encoder determines whether to encode the repeated point information of the i-th non-zero child node of the current node, based on the above steps, the number of encoded repeated points corresponding to the i-th non-zero child node is determined as the first parameter. Then, the total number of repeated points in the point cloud is determined, and the number of encoded repeated points corresponding to the i-th non-zero child node is compared with the number of repeated points in the point cloud to determine whether the i-th non-zero child node includes repeated points, and then determine whether to encode the repeated point information of the i-th non-zero child node.
在一些实施例中,编码端通过八叉树中第N-1层的各非零节点的占位信息,确定出八叉树的最后一层中非零体素节点的个数。In some embodiments, the encoder determines the number of non-zero voxel nodes in the last layer of the octree through the placeholder information of each non-zero node in the N-1th layer of the octree.
编码端基于上述方式1或方式2确定出点云的重复点总数后,基于点云的重复点总数和第i个非零子节点对应的已编码重复点总数,确定是否编码第i个非零子节点的重复点信息。After the encoding end determines the total number of duplicate points in the point cloud based on the above method 1 or method 2, it determines whether to encode the duplicate point information of the i-th non-zero child node based on the total number of duplicate points in the point cloud and the total number of encoded duplicate points corresponding to the i-th non-zero child node.
例如,若第i个非零子节点对应的已编码重复点总数小于点云的重复总点数,则说明第i个非零子节点或者该第i个非零子节点之后的叶子节点中可能包括重复点,因此,为了提高编码准确性,则编码端编码该第i个非零子节点的重复点信息。For example, if the total number of encoded duplicate points corresponding to the i-th non-zero child node is less than the total number of duplicate points in the point cloud, it means that the i-th non-zero child node or the leaf node after the i-th non-zero child node may include duplicate points. Therefore, in order to improve the encoding accuracy, the encoding end encodes the duplicate point information of the i-th non-zero child node.
再例如,若第i个非零子节点对应的已编码重复点总数等于点云的重复总点数,则说明点云中的重复点均已经编码结束,此时第i个非零子节点及第i个非零子节点之后的叶子节点中均不包括重复点。因此,跳过编码第i个非零子节点的重复点信息,进而降低了点云的编码复杂度,节约了编码时间,进而提升了编码效率。For another example, if the total number of encoded duplicate points corresponding to the i-th non-zero child node is equal to the total number of duplicate points in the point cloud, it means that the duplicate points in the point cloud have been encoded, and the i-th non-zero child node and the leaf nodes after the i-th non-zero child node do not include duplicate points. Therefore, skipping the encoding of the duplicate point information of the i-th non-zero child node reduces the encoding complexity of the point cloud, saves encoding time, and improves encoding efficiency.
由上述可知,编码端基于上述情况1和情况2的方式,在基于八叉树的点云编码中,确定当前节点对应的第一参数,并基于该第一参数,对当前节点进行编码。From the above, it can be seen that the encoding end determines the first parameter corresponding to the current node in the octree-based point cloud encoding based on the above situation 1 and situation 2, and encodes the current node based on the first parameter.
上述实施例对当前节点为八叉树的第N-1层中的第一个非零节点为例,对当前节点的编码过程进行介绍。The above embodiment takes the case where the current node is the first non-zero node in the N-1th layer of the octree as an example to introduce the encoding process of the current node.
在一些实施例中,若点云开启IDCM编码模式,在八叉树的划分中,当节点划分到某一层时,该层的所有节点均可以采用IDCM编码方式进行编码,此时,八叉树未划分到体素级的叶子节点层。也就是说,八叉树包括N层,且该第N层中的所有非零节点均采用IDCM编码方式时,若当前节点为八叉树的第N层中的一个非零节点,也可以采用本申请实施例提供的编码方法对当前节点进行编码。例如,将点云的总点数与第N层所包括的非零节点的差值,确定为当前节点对应的第一参数。基于该第一参数确定当前节点是否包括重复点。In some embodiments, if the point cloud turns on the IDCM encoding mode, in the division of the octree, when the node is divided into a certain layer, all nodes of the layer can be encoded using the IDCM encoding method. At this time, the octree is not divided into the voxel-level leaf node layer. In other words, when the octree includes N layers, and all non-zero nodes in the Nth layer are encoded using the IDCM encoding method, if the current node is a non-zero node in the Nth layer of the octree, the encoding method provided in the embodiment of the present application can also be used to encode the current node. For example, the difference between the total number of points in the point cloud and the non-zero nodes included in the Nth layer is determined as the first parameter corresponding to the current node. Based on the first parameter, it is determined whether the current node includes duplicate points.
示例性的,当前节点包括点云中的至少一个点,针对当前节点中的第j个点,确定该第j个点对应的已编码点个数,其中,确定第j个点对应的已编码点个数的方式与上述确定第i个非零节点对应的已编码点个数的方式基本相同,将节点包括的非零子节点替换为节点所包括的点即可。接着,编码端基于该第j个点对应的已编码点个数,确定第j个点对应的第二参数,进而基于第j个点对应的第二参数和当前节点对应的第一参数,确定第j个点是否包括重复点。例如,若第一参数等于第二参数,则确定第j个点不包括重复点,进而跳过编码该第j个点的重复点信息。再例如,若第一参数大于第二参数,且第j个点为第N层中的最后一个点,进而跳过编码该第j个点的重复点信息,且将第一参数 与第二参数的差值,确定为第j个点的重复点个数。再例如,若第一参数大于第二参数,且第j个点不是第N层中的最后一个点,进而编码该第j个点的重复点信息。Exemplarily, the current node includes at least one point in the point cloud, and for the jth point in the current node, the number of encoded points corresponding to the jth point is determined, wherein the method for determining the number of encoded points corresponding to the jth point is substantially the same as the method for determining the number of encoded points corresponding to the i-th non-zero node, and the non-zero subnodes included in the node are replaced with the points included in the node. Then, the encoding end determines the second parameter corresponding to the jth point based on the number of encoded points corresponding to the jth point, and then determines whether the jth point includes duplicate points based on the second parameter corresponding to the jth point and the first parameter corresponding to the current node. For example, if the first parameter is equal to the second parameter, it is determined that the jth point does not include duplicate points, and then the encoding of the duplicate point information of the jth point is skipped. For another example, if the first parameter is greater than the second parameter, and the jth point is the last point in the Nth layer, then the encoding of the duplicate point information of the jth point is skipped, and the difference between the first parameter and the second parameter is determined as the number of duplicate points of the jth point. For another example, if the first parameter is greater than the second parameter, and the j-th point is not the last point in the N-th layer, the repeated point information of the j-th point is encoded.
本申请实施例提供的点云几何编码方法,在基于八叉树的点云编码中,在编码八叉树中第N-1层的当前节点时,首先确定当前节点对应的第一参数,该第一参数用于确定当前节点的至少一个非零子节点是否包括重复点,当前节点为点云的八叉树中第N-1层的一个非零节点,N为所述八叉树的总层数,进而基于该第一参数,对当前节点进行几何编码。例如,基于该第一参数确定当前节点的第i个非零子节点不包括重复点时,则跳过编码该第i个非零子节点的重复点信息,进而降低了点云的编码复杂度,节约了编码时间,进而提升了编码效率。The point cloud geometry encoding method provided by the embodiment of the present application, in the point cloud encoding based on octree, when encoding the current node of the N-1th layer in the octree, first determines the first parameter corresponding to the current node, the first parameter is used to determine whether at least one non-zero child node of the current node includes duplicate points, the current node is a non-zero node of the N-1th layer in the octree of the point cloud, N is the total number of layers of the octree, and then based on the first parameter, the current node is geometrically encoded. For example, when it is determined based on the first parameter that the i-th non-zero child node of the current node does not include duplicate points, the encoding of the duplicate point information of the i-th non-zero child node is skipped, thereby reducing the encoding complexity of the point cloud, saving encoding time, and thus improving the encoding efficiency.
应理解,图6至图9仅为本申请的示例,不应理解为对本申请的限制。It should be understood that FIGS. 6 to 9 are merely examples of the present application and should not be construed as limiting the present application.
以上结合附图详细描述了本申请的优选实施方式,但是,本申请并不限于上述实施方式中的具体细节,在本申请的技术构思范围内,可以对本申请的技术方案进行多种简单变型,这些简单变型均属于本申请的保护范围。例如,在上述具体实施方式中所描述的各个具体技术特征,在不矛盾的情况下,可以通过任何合适的方式进行组合,为了避免不必要的重复,本申请对各种可能的组合方式不再另行说明。又例如,本申请的各种不同的实施方式之间也可以进行任意组合,只要其不违背本申请的思想,其同样应当视为本申请所公开的内容。The preferred embodiments of the present application are described in detail above in conjunction with the accompanying drawings. However, the present application is not limited to the specific details in the above embodiments. Within the technical concept of the present application, the technical solution of the present application can be subjected to a variety of simple modifications, and these simple modifications all belong to the protection scope of the present application. For example, the various specific technical features described in the above specific embodiments can be combined in any suitable manner without contradiction. In order to avoid unnecessary repetition, the present application will not further explain various possible combinations. For another example, the various different embodiments of the present application can also be arbitrarily combined, as long as they do not violate the ideas of the present application, they should also be regarded as the contents disclosed in the present application.
还应理解,在本申请的各种方法实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。另外,本申请实施例中,术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系。具体地,A和/或B可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。It should also be understood that in the various method embodiments of the present application, the size of the sequence number of each process does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application. In addition, in the embodiment of the present application, the term "and/or" is merely a description of the association relationship of associated objects, indicating that three relationships may exist. Specifically, A and/or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character "/" in this article generally indicates that the associated objects before and after are in an "or" relationship.
上文结合图6至图9,详细描述了本申请的方法实施例,下文结合图10至图13,详细描述本申请的装置实施例。The method embodiment of the present application is described in detail above in conjunction with Figures 6 to 9 , and the device embodiment of the present application is described in detail below in conjunction with Figures 10 to 13 .
图10是本申请实施例提供的点云解码装置的示意性框图。FIG. 10 is a schematic block diagram of a point cloud decoding device provided in an embodiment of the present application.
如图10所示,该点点云解码装置10可以包括:As shown in FIG10 , the point cloud decoding device 10 may include:
确定单元11,用于确定当前节点对应的第一参数,所述第一参数用于确定是否解码所述当前节点对应的重复点信息,所述当前节点为所述点云的八叉树中一个非零节点;A determination unit 11, configured to determine a first parameter corresponding to a current node, wherein the first parameter is used to determine whether to decode duplicate point information corresponding to the current node, wherein the current node is a non-zero node in the octree of the point cloud;
解码单元12,用于基于所述第一参数,对所述当前节点进行几何解码。The decoding unit 12 is used to perform geometric decoding on the current node based on the first parameter.
在一些实施例中,所述当前节点为所述八叉树的第N-1层中的一个非零节点,所述N为所述八叉树的总层数,所述N为大于1的正整数,确定单元11,具体用于确定所述点云的总点数,以及所述第N-1层的非零节点数;基于所述点云的总点数和所述第N-1层的非零节点数,确定所述第一参数。In some embodiments, the current node is a non-zero node in the N-1th layer of the octree, N is the total number of layers of the octree, N is a positive integer greater than 1, and the determination unit 11 is specifically used to determine the total number of points in the point cloud and the number of non-zero nodes in the N-1th layer; based on the total number of points in the point cloud and the number of non-zero nodes in the N-1th layer, determine the first parameter.
在一些实施例中,确定单元11,具体用于将所述点云的总点数和所述第N-1层的非零节点数之间的差值,确定为所述第一参数。In some embodiments, the determination unit 11 is specifically configured to determine the difference between the total number of points in the point cloud and the number of non-zero nodes in the N-1th layer as the first parameter.
在一些实施例中,解码单元12,具体用于针对所述当前节点的第i个非零子节点,确定所述第i个非零子节点对应的第二参数,所述第二参数用于指示在解码所述第i个非零子节点时,所述点云中几何位置已解码的点的个数,所述i为正整数;基于所述第一参数和所述第二参数,确定是否解码所述第i个非零子节点的重复点信息。In some embodiments, the decoding unit 12 is specifically used to determine, for the i-th non-zero child node of the current node, a second parameter corresponding to the i-th non-zero child node, wherein the second parameter is used to indicate the number of points whose geometric positions in the point cloud have been decoded when decoding the i-th non-zero child node, and i is a positive integer; based on the first parameter and the second parameter, determine whether to decode the duplicate point information of the i-th non-zero child node.
在一些实施例中,解码单元12,具体用于确定所述点云中所述第i个非零子节点对应的已解码点个数;基于所述点云中所述第i个非零子节点对应的已解码点个数,确定所述第i个非零子节点对应的第二参数。In some embodiments, the decoding unit 12 is specifically used to determine the number of decoded points corresponding to the i-th non-zero subnode in the point cloud; based on the number of decoded points corresponding to the i-th non-zero subnode in the point cloud, determine the second parameter corresponding to the i-th non-zero subnode.
在一些实施例中,解码单元12,具体用于若所述当前节点为所述第N-1层中的第一个非零节点,则确定所述当前节点的非零子节点个数;基于所述当前节点的非零子节点个数,确定所述第i个非零子节点对应的已解码点个数。In some embodiments, the decoding unit 12 is specifically used to determine the number of non-zero child nodes of the current node if the current node is the first non-zero node in the N-1th layer; based on the number of non-zero child nodes of the current node, determine the number of decoded points corresponding to the i-th non-zero child node.
在一些实施例中,解码单元12,具体用于若所述第i个非零子节点为所述当前节点的第1个非零子节点,则将所述当前节点所包括的非零子节点的个数减1后的值,确定为所述第i个非零子节点对应的已解码点个数。In some embodiments, the decoding unit 12 is specifically used to determine the number of decoded points corresponding to the i-th non-zero child node as the value obtained by subtracting 1 from the number of non-zero child nodes included in the current node if the i-th non-zero child node is the first non-zero child node of the current node.
在一些实施例中,解码单元12,具体用于若所述第i个非零子节点不是所述当前节点的第1个非零子节点,则获取所述当前节点中位于所述第i个非零子节点之前的非零子节点所包括的第一重复点个数之和;将所述当前节点所包括的非零子节点的个数减1后,再与所述第一重复点个数之和相加,得到所述第i个非零子节点对应的已解码点个数。In some embodiments, the decoding unit 12 is specifically used to obtain the sum of the first number of repeated points included in the non-zero child nodes in the current node that are located before the i-th non-zero child node if the i-th non-zero child node is not the first non-zero child node of the current node; subtract 1 from the number of non-zero child nodes included in the current node, and then add the result to the sum of the first number of repeated points to obtain the number of decoded points corresponding to the i-th non-zero child node.
在一些实施例中,解码单元12,具体用于若所述当前节点不是所述第N-1层中的第一个非零节点,则确定所述第N-1层中位于所述当前节点之前的各非零节点对应的已解码点的个数;确定所述当前节点的非零子节点个数;基于所述第N-1层中位于所述当前节点之前的各非零节点对应的已解码点的个数,以及所述当前节点的非零子节点个数,确定所述第i个非零子节点对应的已解码点个数。In some embodiments, the decoding unit 12 is specifically used to determine the number of decoded points corresponding to each non-zero node in the N-1 layer before the current node if the current node is not the first non-zero node in the N-1 layer; determine the number of non-zero child nodes of the current node; and determine the number of decoded points corresponding to the i-th non-zero child node based on the number of decoded points corresponding to each non-zero node in the N-1 layer before the current node and the number of non-zero child nodes of the current node.
在一些实施例中,解码单元12,具体用于针对所述各非零节点中的一个非零节点,获取所述非零节点的非零子节点个数和所述非零子节点所包括的重复点个数;将所述非零节点的非零子节点个数减1后,与所述非零节点的非零子节点所包括的重复点个数之和相加,得到所述非零节点对应的已解码点的个数。In some embodiments, the decoding unit 12 is specifically used to obtain, for a non-zero node among the non-zero nodes, the number of non-zero child nodes of the non-zero node and the number of repeated points included in the non-zero child node; subtract 1 from the number of non-zero child nodes of the non-zero node, and add the result to the sum of the number of repeated points included in the non-zero child nodes of the non-zero node to obtain the number of decoded points corresponding to the non-zero node.
在一些实施例中,解码单元12,具体用于将所述第N-1层中位于所述当前节点之前的各非零节点对应的已解码点的个数相加,得到第一和值;基于所述第一和值和所述当前节点的非零子节点个数,确定所述第i个非零子节点对应的已解码点个数。In some embodiments, the decoding unit 12 is specifically used to add the number of decoded points corresponding to each non-zero node located before the current node in the N-1th layer to obtain a first sum; based on the first sum and the number of non-zero child nodes of the current node, determine the number of decoded points corresponding to the i-th non-zero child node.
在一些实施例中,解码单元12,具体用于若所述第i个非零子节点为所述当前节点的第1个非零子节点,则将所述第一和值与所述当前节点所包括的非零子节点的个数进行相加,得到第二和值;对所述第二和值减1,得到所述第i个非零子节点对应的已解码点个数。In some embodiments, the decoding unit 12 is specifically used to add the first sum value and the number of non-zero child nodes included in the current node to obtain a second sum value if the i-th non-zero child node is the first non-zero child node of the current node; and subtract 1 from the second sum value to obtain the number of decoded points corresponding to the i-th non-zero child node.
在一些实施例中,解码单元12,具体用于若所述第i个非零子节点不为所述当前节点的第1个非零子节点,则将所述第一和值与所述当前节点所包括的非零子节点的个数进行相加,得到第二和值;对所述第二和值减1,得到第三和值;获取所述当前节点中位于所述第i个非零子节点之前的非零子节点所包括的第一重复点个数之和,并将所述第三和值与所述第一重复点个数之和相加,得到所述第i个非零子节点对应的已解码点个数。In some embodiments, the decoding unit 12 is specifically used to add the first sum value and the number of non-zero child nodes included in the current node to obtain a second sum value if the i-th non-zero child node is not the first non-zero child node of the current node; subtract 1 from the second sum value to obtain a third sum value; obtain the sum of the first number of repeated points included in the non-zero child nodes in the current node that are located before the i-th non-zero child node, and add the third sum value to the sum of the first number of repeated points to obtain the number of decoded points corresponding to the i-th non-zero child node.
在一些实施例中,若所述点云未采用推断直接编码模式IDCM,则解码单元12,具体用于将所述第i个非零子节 点对应的已解码点个数,确定为所述第i个非零子节点对应的第二参数。In some embodiments, if the point cloud does not adopt the inferred direct coding mode IDCM, the decoding unit 12 is specifically used to determine the number of decoded points corresponding to the i-th non-zero sub-node as the second parameter corresponding to the i-th non-zero sub-node.
在一些实施例中,若所述点云采用推断直接编码模式IDCM,则解码单元12,具体用于确定所述八叉树中已解码的第一节点所包括的点个数,所述第一节点为所述八叉树中采用IDCM的节点;基于所述第i个非零子节点对应的已解码点个数,以及所述第一节点所包括的点个数,确定所述第i个非零子节点对应的第二参数。In some embodiments, if the point cloud adopts the inferred direct coding mode IDCM, the decoding unit 12 is specifically used to determine the number of points included in the decoded first node in the octree, where the first node is a node in the octree that adopts IDCM; based on the number of decoded points corresponding to the i-th non-zero child node and the number of points included in the first node, determine the second parameter corresponding to the i-th non-zero child node.
在一些实施例中,解码单元12,具体用于若所述第一节点不是所述第N-1层中的节点,则将所述第i个非零子节点对应的已解码点个数和所述第一节点所包括的点个数之和,确定为所述第i个非零子节点对应的第二参数。In some embodiments, the decoding unit 12 is specifically used to determine the sum of the number of decoded points corresponding to the i-th non-zero child node and the number of points included in the first node as the second parameter corresponding to the i-th non-zero child node if the first node is not a node in the N-1th layer.
在一些实施例中,解码单元12,具体用于若所述第一节点是所述第N-1层中的节点,则将所述第i个非零子节点对应的已解码点个数和所述第一节点所包括的点个数之和减1后的值,确定为所述第i个非零子节点对应的第二参数。In some embodiments, the decoding unit 12 is specifically used to determine, if the first node is a node in the N-1th layer, the value obtained by subtracting 1 from the sum of the number of decoded points corresponding to the i-th non-zero child node and the number of points included in the first node as the second parameter corresponding to the i-th non-zero child node.
在一些实施例中,解码单元12,具体用于若所述第一参数等于所述第二参数,则跳过解码所述第i个非零子节点的重复点信息。In some embodiments, the decoding unit 12 is specifically configured to skip decoding repeated point information of the i-th non-zero child node if the first parameter is equal to the second parameter.
在一些实施例中,解码单元12,具体用于若所述第一参数大于所述第二参数,且所述第i个非零子节点为所述八叉树的最后一个体素节点,则跳过解码所述第i个非零子节点的重复点信息,且将所述第一参数与所述第二参数的差值,确定为所述第i个非零子节点所包括的重复点个数。In some embodiments, the decoding unit 12 is specifically used to skip decoding the repeated point information of the i-th non-zero child node if the first parameter is greater than the second parameter and the i-th non-zero child node is the last voxel node of the octree, and determine the difference between the first parameter and the second parameter as the number of repeated points included in the i-th non-zero child node.
在一些实施例中,解码单元12,具体用于若所述第一参数大于所述第二参数,且所述第i个非零子节点不是所述八叉树的最后一个体素节点,则解码所述第i个非零子节点的重复点信息。In some embodiments, the decoding unit 12 is specifically used to decode the duplicate point information of the i-th non-zero child node if the first parameter is greater than the second parameter and the i-th non-zero child node is not the last voxel node of the octree.
在一些实施例中,确定单元11,具体用于针对所述当前节点中的第i个非零子节点,确定所述第i个非零子节点对应的已解码重复点总数,所述i为正整数;将所述第i个非零子节点对应的已解码重复点总数,确定为所述第一参数。In some embodiments, the determination unit 11 is specifically used to determine the total number of decoded repeated points corresponding to the i-th non-zero child node in the current node, where i is a positive integer; and determine the total number of decoded repeated points corresponding to the i-th non-zero child node as the first parameter.
在一些实施例中,确定单元11,具体用于确定所述八叉树中位于所述第i个非零子节点之前的各非零子节点所包括的第一已解码重复点个数之和;基于所述第一已解码重复点个数之和,确定所述第i个非零子节点对应的已解码重复点总数。In some embodiments, the determination unit 11 is specifically used to determine the sum of the first number of decoded repeated points included in each non-zero child node located before the i-th non-zero child node in the octree; based on the sum of the first number of decoded repeated points, determine the total number of decoded repeated points corresponding to the i-th non-zero child node.
在一些实施例中,若所述点云采用推断直接编码模式IDCM时,则确定单元11,具体用于确定所述八叉树中采用IDCM的第一节点所包括的第二已解码重复点个数之和;将所述第一已解码重复点个数之和、与所述第二已解码重复点个数之和进行相加,得到所述第i个非零子节点对应的已解码重复点总数。In some embodiments, if the point cloud adopts the inferred direct coding mode IDCM, the determination unit 11 is specifically used to determine the sum of the second number of decoded repeated points included in the first node using IDCM in the octree; the sum of the first number of decoded repeated points and the sum of the second number of decoded repeated points are added to obtain the total number of decoded repeated points corresponding to the i-th non-zero child node.
在一些实施例中,若所述点云未采用推断直接编码模式IDCM时,则确定单元11,具体用于将所述第一已解码重复点个数之和,确定为所述第i个非零子节点对应的已解码重复点总数。In some embodiments, if the point cloud does not adopt the inferred direct coding mode IDCM, the determination unit 11 is specifically used to determine the sum of the first number of decoded repeated points as the total number of decoded repeated points corresponding to the i-th non-zero child node.
在一些实施例中,解码单元12,具体用于确定所述点云的重复点总数;基于所述点云的重复点总数和所述第i个非零子节点对应的已解码重复点总数,确定是否解码所述第i个非零子节点的重复点信息。In some embodiments, the decoding unit 12 is specifically used to determine the total number of repeated points in the point cloud; based on the total number of repeated points in the point cloud and the total number of decoded repeated points corresponding to the i-th non-zero child node, determine whether to decode the repeated point information of the i-th non-zero child node.
在一些实施例中,解码单元12,具体用于确定所述点云的总点数,以及所述八叉树的非零体素节点总数;将所述点云的总点数与所述八叉树的非零体素节点总数的差值,确定为所述点云的重复点总数。In some embodiments, the decoding unit 12 is specifically used to determine the total number of points in the point cloud and the total number of non-zero voxel nodes in the octree; and the difference between the total number of points in the point cloud and the total number of non-zero voxel nodes in the octree is determined as the total number of repeated points in the point cloud.
在一些实施例中,解码单元12,具体用于若所述第i个非零子节点对应的已解码重复点总数等于所述点云的重复总点数,则跳过解码所述第i个非零子节点的重复点信息。In some embodiments, the decoding unit 12 is specifically configured to skip decoding the repeated point information of the i-th non-zero child node if the total number of decoded repeated points corresponding to the i-th non-zero child node is equal to the total number of repeated points of the point cloud.
在一些实施例中,解码单元12,具体用于若所述第i个非零子节点对应的已解码重复点总数小于所述点云的重复总点数,且所述第i个非零子节点是所述八叉树的最后一个体素节点,则跳过解码所述第i个非零子节点的重复点信息,且将所述点云的重复总点数与所述第i个非零子节点对应的已解码重复点总数的差值,确定为所述第i个非零子节点所包括的重复点个数。In some embodiments, the decoding unit 12 is specifically used to skip decoding the duplicate point information of the i-th non-zero child node if the total number of decoded duplicate points corresponding to the i-th non-zero child node is less than the total number of duplicate points of the point cloud, and the i-th non-zero child node is the last voxel node of the octree, and determine the difference between the total number of duplicate points of the point cloud and the total number of decoded duplicate points corresponding to the i-th non-zero child node as the number of duplicate points included in the i-th non-zero child node.
在一些实施例中,解码单元12,具体用于若所述第i个非零子节点对应的已解码重复点总数小于所述点云的重复总点数,且所述第i个非零子节点不是所述八叉树的最后一个体素节点,则解码所述第i个非零子节点的重复点信息。In some embodiments, the decoding unit 12 is specifically used to decode the duplicate point information of the i-th non-zero child node if the total number of decoded duplicate points corresponding to the i-th non-zero child node is less than the total number of duplicate points of the point cloud, and the i-th non-zero child node is not the last voxel node of the octree.
在一些实施例中,所述重复点信息包括重复点个数。In some embodiments, the repeated point information includes the number of repeated points.
在一些实施例中,解码单元12,具体用于解码所述点云的几何码流,得到所述点云的总点数。In some embodiments, the decoding unit 12 is specifically configured to decode the geometric code stream of the point cloud to obtain the total number of points of the point cloud.
在一些实施例中,解码单元12,具体用于解码所述点云的几何数据单元,得到所述点云的总点数。In some embodiments, the decoding unit 12 is specifically configured to decode the geometric data unit of the point cloud to obtain the total number of points of the point cloud.
在一些实施例中,解码单元12,具体用于解码所述几何数据单元,得到第一值,所述第一值为所述点云的总点数减一;对所述第一值加一,得到所述点云的总点数。In some embodiments, the decoding unit 12 is specifically used to decode the geometric data unit to obtain a first value, where the first value is the total number of points in the point cloud minus one; and add one to the first value to obtain the total number of points in the point cloud.
在一些实施例中,解码单元12,具体用于解码所述点云的几何码流,得到所述当前节点的占位信息;基于所述占位信息,得到所述当前节点所包括的非零子节点个数。In some embodiments, the decoding unit 12 is specifically used to decode the geometric code stream of the point cloud to obtain the placeholder information of the current node; based on the placeholder information, obtain the number of non-zero child nodes included in the current node.
应理解,装置实施例与方法实施例可以相互对应,类似的描述可以参照方法实施例。为避免重复,此处不再赘述。具体地,图10所示的点云解码装置10可以对应于执行本申请实施例的点云解码方法中的相应主体,并且点云解码装置10中的各个单元的前述和其它操作和/或功能分别为了实现点云解码方法中的相应流程,为了简洁,在此不再赘述。It should be understood that the device embodiment and the method embodiment may correspond to each other, and similar descriptions may refer to the method embodiment. To avoid repetition, no further description is given here. Specifically, the point cloud decoding device 10 shown in FIG. 10 may correspond to the corresponding subject in the point cloud decoding method of the embodiment of the present application, and the aforementioned and other operations and/or functions of each unit in the point cloud decoding device 10 are respectively for implementing the corresponding processes in the point cloud decoding method, and for the sake of brevity, no further description is given here.
图11是本申请实施例提供的点云编码装置的示意性框图。FIG. 11 is a schematic block diagram of a point cloud encoding device provided in an embodiment of the present application.
如图11所示,点云编码装置20包括:As shown in FIG11 , the point cloud encoding device 20 includes:
确定单元21,用于确定当前节点对应的第一参数,所述第一参数用于确定是否解码所述当前节点对应的重复点信息,所述当前节点为所述点云的八叉树中的一个非零节点;编码单元22,用于基于所述第一参数,对所述当前节点进行几何编码。A determination unit 21 is used to determine a first parameter corresponding to a current node, where the first parameter is used to determine whether to decode repeated point information corresponding to the current node, and the current node is a non-zero node in the octree of the point cloud; an encoding unit 22 is used to geometrically encode the current node based on the first parameter.
在一些实施例中,所述当前节点为所述八叉树的第N-1层中的一个非零节点,所述N为所述八叉树的总层数,所述N为大于1的正整数,确定单元21,具体用于确定所述点云的总点数,以及所述第N-1层的非零节点数;基于所述点云的总点数和所述第N-1层的非零节点数,确定所述第一参数。In some embodiments, the current node is a non-zero node in the N-1th layer of the octree, N is the total number of layers of the octree, N is a positive integer greater than 1, and the determination unit 21 is specifically used to determine the total number of points in the point cloud and the number of non-zero nodes in the N-1th layer; based on the total number of points in the point cloud and the number of non-zero nodes in the N-1th layer, determine the first parameter.
在一些实施例中,确定单元21,具体用于将所述点云的总点数和所述第N-1层的非零节点数之间的差值,确定为所述第一参数。In some embodiments, the determination unit 21 is specifically configured to determine the difference between the total number of points in the point cloud and the number of non-zero nodes in the N-1th layer as the first parameter.
在一些实施例中,编码单元22,具体用于针对所述当前节点的第i个非零子节点,确定所述第i个非零子节点对应的第二参数,所述第二参数用于指示在编码所述第i个非零子节点时,所述点云中几何位置已编码的点的个数;基于所述第一参数和所述第二参数,确定是否编码所述第i个非零子节点的重复点信息。In some embodiments, the encoding unit 22 is specifically used to determine, for the i-th non-zero child node of the current node, a second parameter corresponding to the i-th non-zero child node, wherein the second parameter is used to indicate the number of points whose geometric positions in the point cloud have been encoded when encoding the i-th non-zero child node; based on the first parameter and the second parameter, determine whether to encode the repeated point information of the i-th non-zero child node.
在一些实施例中,编码单元22,具体用于确定所述点云中所述第i个非零子节点对应的已编码点个数;基于所述点云中所述第i个非零子节点对应的已编码点个数,确定所述第i个非零子节点对应的第二参数。In some embodiments, the encoding unit 22 is specifically used to determine the number of encoded points corresponding to the i-th non-zero subnode in the point cloud; based on the number of encoded points corresponding to the i-th non-zero subnode in the point cloud, determine the second parameter corresponding to the i-th non-zero subnode.
在一些实施例中,编码单元22,具体用于若所述当前节点为所述第N-1层中的第一个非零节点,则确定所述当前节点的非零子节点个数;基于所述当前节点的非零子节点个数,确定所述第i个非零子节点对应的已编码点个数。In some embodiments, the encoding unit 22 is specifically used to determine the number of non-zero child nodes of the current node if the current node is the first non-zero node in the N-1th layer; based on the number of non-zero child nodes of the current node, determine the number of encoded points corresponding to the i-th non-zero child node.
在一些实施例中,编码单元22,具体用于若所述第i个非零子节点为所述当前节点的第1个非零子节点,则将所述当前节点所包括的非零子节点的个数减1,确定为所述第i个非零子节点对应的已编码点个数。In some embodiments, the encoding unit 22 is specifically used to reduce the number of non-zero child nodes included in the current node by 1 if the i-th non-zero child node is the first non-zero child node of the current node, and determine the number of encoded points corresponding to the i-th non-zero child node.
在一些实施例中,编码单元22,具体用于若所述第i个非零子节点不为所述当前节点的第1个非零子节点,则获取所述当前节点中所述第i个非零子节点之前的子节点所包括的第一重复点个数之和;将所述当前节点所包括的非零子节点的个数减1后,再与所述第一重复点个数之和相加,得到所述第i个非零子节点对应的已编码点个数。In some embodiments, the encoding unit 22 is specifically used to obtain the sum of the first number of repeated points included in the child nodes before the i-th non-zero child node in the current node if the i-th non-zero child node is not the first non-zero child node of the current node; subtract 1 from the number of non-zero child nodes included in the current node, and then add the result to the sum of the first number of repeated points to obtain the number of encoded points corresponding to the i-th non-zero child node.
在一些实施例中,编码单元22,具体用于若所述当前节点不是所述第N-1层中的第一个非零节点,则确定所述第N-1层中位于所述当前节点之前的各非零节点对应的已编码点的个数;确定所述当前节点的非零子节点个数;基于所述第N-1层中位于所述当前节点之前的各非零节点对应的已编码点的个数,以及所述当前节点的非零子节点个数,确定所述第i个非零子节点对应的已编码点个数。In some embodiments, the encoding unit 22 is specifically used to determine the number of encoded points corresponding to each non-zero node in the N-1 layer before the current node if the current node is not the first non-zero node in the N-1 layer; determine the number of non-zero child nodes of the current node; based on the number of encoded points corresponding to each non-zero node in the N-1 layer before the current node and the number of non-zero child nodes of the current node, determine the number of encoded points corresponding to the i-th non-zero child node.
在一些实施例中,编码单元22,具体用于针对所述各非零节点中的一个非零节点,获取所述非零节点的非零子节点个数和所述非零子节点所包括的重复点个数;将所述非零节点的非零子节点个数减1后,与所述非零节点的非零子节点所包括的重复点个数之和相加,得到所述非零节点对应的已编码点的个数。In some embodiments, the encoding unit 22 is specifically used to obtain, for a non-zero node among the non-zero nodes, the number of non-zero child nodes of the non-zero node and the number of repeated points included in the non-zero child node; subtract 1 from the number of non-zero child nodes of the non-zero node, and add the result to the sum of the number of repeated points included in the non-zero child nodes of the non-zero node to obtain the number of encoded points corresponding to the non-zero node.
在一些实施例中,编码单元22,具体用于将所述第N-1层中位于所述当前节点之前的各非零节点对应的已编码点的个数相加,得到第一和值;基于所述第一和值和所述当前节点的非零子节点个数,确定所述第i个非零子节点对应的已编码点个数。In some embodiments, the encoding unit 22 is specifically used to add the number of encoded points corresponding to each non-zero node in the N-1th layer that is located before the current node to obtain a first sum; based on the first sum and the number of non-zero child nodes of the current node, determine the number of encoded points corresponding to the i-th non-zero child node.
在一些实施例中,编码单元22,具体用于若所述第i个非零子节点为所述当前节点的第1个非零子节点,则将所述第一和值与所述当前节点所包括的非零子节点的个数进行相加,得到第二和值;对所述第二和值减1,得到所述第i个非零子节点对应的已编码点个数。In some embodiments, the encoding unit 22 is specifically used to add the first sum value and the number of non-zero child nodes included in the current node to obtain a second sum value if the i-th non-zero child node is the first non-zero child node of the current node; and subtract 1 from the second sum value to obtain the number of encoded points corresponding to the i-th non-zero child node.
在一些实施例中,编码单元22,具体用于若所述第i个非零子节点不为所述当前节点的第1个非零子节点,则将所述第一和值与所述当前节点所包括的非零子节点的个数进行相加,得到第二和值;对所述第二和值减1,得到第三和值;获取所述当前节点中位于所述第i个非零子节点之前的非零子节点所包括的第一重复点个数之和,并将所述第三和值与所述第一重复点个数之和相加,得到所述第i个非零子节点对应的已编码点个数。In some embodiments, the encoding unit 22 is specifically used to add the first sum value and the number of non-zero child nodes included in the current node to obtain a second sum value if the i-th non-zero child node is not the first non-zero child node of the current node; subtract 1 from the second sum value to obtain a third sum value; obtain the sum of the first number of repeated points included in the non-zero child nodes in the current node that are located before the i-th non-zero child node, and add the third sum value to the sum of the first number of repeated points to obtain the number of encoded points corresponding to the i-th non-zero child node.
在一些实施例中,若所述点云未采用推断直接编码模式IDCM,则编码单元22,具体用于将所述第i个非零子节点对应的已编码点个数,确定为所述第i个非零子节点对应的第二参数。In some embodiments, if the point cloud does not adopt the inferred direct coding mode IDCM, the encoding unit 22 is specifically used to determine the number of encoded points corresponding to the i-th non-zero child node as the second parameter corresponding to the i-th non-zero child node.
在一些实施例中,若所述点云采用推断直接编码模式IDCM,则编码单元22,具体用于确定所述八叉树中已编码的第一节点所包括的点个数,所述第一节点为所述八叉树中采用IDCM的节点;基于所述第i个非零子节点对应的已编码点个数,以及所述第一节点所包括的点个数,确定所述第i个非零子节点对应的第二参数。In some embodiments, if the point cloud adopts the inferred direct coding mode IDCM, the encoding unit 22 is specifically used to determine the number of points included in the first encoded node in the octree, where the first node is a node in the octree that adopts IDCM; based on the number of encoded points corresponding to the i-th non-zero child node and the number of points included in the first node, determine the second parameter corresponding to the i-th non-zero child node.
在一些实施例中,编码单元22,具体用于若所述第一节点不是所述第N-1层中的节点,则将所述第i个非零子节点对应的已编码点个数和所述第一节点所包括的点个数之和,确定为所述第i个非零子节点对应的第二参数。In some embodiments, the encoding unit 22 is specifically used to determine the sum of the number of encoded points corresponding to the i-th non-zero child node and the number of points included in the first node as the second parameter corresponding to the i-th non-zero child node if the first node is not a node in the N-1th layer.
在一些实施例中,编码单元22,具体用于若所述第一节点是所述第N-1层中的节点,则将所述第i个非零子节点对应的已编码点个数和所述第一节点所包括的点个数之和减1后的值,确定为所述第i个非零子节点对应的第二参数。In some embodiments, the encoding unit 22 is specifically used to determine, if the first node is a node in the N-1th layer, the value obtained by subtracting 1 from the sum of the number of encoded points corresponding to the i-th non-zero child node and the number of points included in the first node as the second parameter corresponding to the i-th non-zero child node.
在一些实施例中,编码单元22,具体用于若所述第一参数大于所述第二参数,则编码所述第i个非零子节点的重复点信息。In some embodiments, the encoding unit 22 is specifically configured to encode the repeated point information of the i-th non-zero child node if the first parameter is greater than the second parameter.
在一些实施例中,编码单元22,具体用于若所述第一参数等于所述第二参数,则跳过编码所述第i个非零子节点的重复点信息。In some embodiments, the encoding unit 22 is specifically configured to skip encoding repeated point information of the i-th non-zero child node if the first parameter is equal to the second parameter.
在一些实施例中,编码单元22,具体用于若所述第一参数大于所述第二参数,且所述第i个非零子节点为所述八叉树的最后一个体素节点,则跳过编码所述第i个非零子节点的重复点信息,且将所述第一参数与所述第二参数的差值,确定为所述第i个非零子节点所包括的重复点个数。In some embodiments, the encoding unit 22 is specifically used to skip encoding the repeated point information of the i-th non-zero child node if the first parameter is greater than the second parameter and the i-th non-zero child node is the last voxel node of the octree, and determine the difference between the first parameter and the second parameter as the number of repeated points included in the i-th non-zero child node.
在一些实施例中,编码单元22,具体用于若所述第一参数大于所述第二参数,且所述第i个非零子节点不是所述八叉树的最后一个体素节点,则编码所述第i个非零子节点的重复点信息。In some embodiments, the encoding unit 22 is specifically used to encode the duplicate point information of the i-th non-zero child node if the first parameter is greater than the second parameter and the i-th non-zero child node is not the last voxel node of the octree.
在一些实施例中,确定单元21,具体用于针对所述当前节点中的第i个非零子节点,确定所述第i个非零子节点对应的已编码重复点总数,所述i为正整数;将所述第i个非零子节点对应的已编码重复点总数,确定为所述第一参数。In some embodiments, the determination unit 21 is specifically used to determine the total number of encoded repeated points corresponding to the i-th non-zero child node in the current node, where i is a positive integer; and determine the total number of encoded repeated points corresponding to the i-th non-zero child node as the first parameter.
在一些实施例中,确定单元21,具体用于确定所述八叉树中位于所述第i个非零子节点之前的各非零子节点所包括的第一已编码重复点个数之和;基于所述第一已编码重复点个数之和,确定所述第i个非零子节点对应的已编码重复点总数。In some embodiments, the determination unit 21 is specifically used to determine the sum of the first number of encoded repeated points included in each non-zero child node located before the i-th non-zero child node in the octree; based on the sum of the first number of encoded repeated points, determine the total number of encoded repeated points corresponding to the i-th non-zero child node.
在一些实施例中,若所述点云采用推断直接编码模式IDCM时,则确定单元21,具体用于确定所述八叉树中采用IDCM的第一节点所包括的第二已编码重复点个数之和;将所述第一已编码重复点个数之和、与所述第二已编码重复点个数之和进行相加,得到所述第i个非零子节点对应的已编码重复点总数。In some embodiments, if the point cloud adopts the inferred direct coding mode IDCM, the determination unit 21 is specifically used to determine the sum of the second number of encoded repeated points included in the first node using IDCM in the octree; the sum of the first number of encoded repeated points and the sum of the second number of encoded repeated points are added to obtain the total number of encoded repeated points corresponding to the i-th non-zero child node.
在一些实施例中,若所述点云未采用推断直接编码模式IDCM时,则确定单元21,具体用于将所述第一已编码重复点个数之和,确定为所述第i个非零子节点对应的已编码重复点总数。In some embodiments, if the point cloud does not adopt the inferred direct coding mode IDCM, the determination unit 21 is specifically used to determine the sum of the first number of encoded repeated points as the total number of encoded repeated points corresponding to the i-th non-zero child node.
在一些实施例中,编码单元22,具体用于确定所述点云的重复点总数;基于所述点云的重复点总数和所述第i个 非零子节点对应的已编码重复点总数,确定是否编码所述第i个非零子节点的重复点信息。In some embodiments, the encoding unit 22 is specifically used to determine the total number of repeated points in the point cloud; based on the total number of repeated points in the point cloud and the total number of encoded repeated points corresponding to the i-th non-zero child node, determine whether to encode the repeated point information of the i-th non-zero child node.
在一些实施例中,编码单元22,具体用于确定所述点云的总点数,以及所述八叉树的非零体素节点总数;将所述点云的总点数与所述八叉树的非零体素节点总数的差值,确定为所述点云的重复点总数。In some embodiments, the encoding unit 22 is specifically used to determine the total number of points in the point cloud and the total number of non-zero voxel nodes in the octree; and the difference between the total number of points in the point cloud and the total number of non-zero voxel nodes in the octree is determined as the total number of repeated points in the point cloud.
在一些实施例中,编码单元22,具体用于若所述第i个非零子节点对应的已编码重复点总数等于所述点云的重复总点数,则跳过编码所述第i个非零子节点的重复点信息。In some embodiments, the encoding unit 22 is specifically configured to skip encoding the repeated point information of the i-th non-zero child node if the total number of encoded repeated points corresponding to the i-th non-zero child node is equal to the total number of repeated points of the point cloud.
在一些实施例中,编码单元22,具体用于若所述第i个非零子节点对应的已编码重复点总数小于所述点云的重复总点数,且所述第i个非零子节点是所述八叉树的最后一个体素节点,则跳过编码所述第i个非零子节点的重复点信息,且将所述点云的重复总点数与所述第i个非零子节点对应的已编码重复点总数的差值,确定为所述第i个非零子节点所包括的重复点个数。In some embodiments, the encoding unit 22 is specifically used to skip encoding the duplicate point information of the i-th non-zero child node if the total number of encoded duplicate points corresponding to the i-th non-zero child node is less than the total number of duplicate points of the point cloud, and the i-th non-zero child node is the last voxel node of the octree, and determine the difference between the total number of duplicate points of the point cloud and the total number of encoded duplicate points corresponding to the i-th non-zero child node as the number of duplicate points included in the i-th non-zero child node.
在一些实施例中,编码单元22,具体用于若所述第i个非零子节点对应的已编码重复点总数小于所述点云的重复总点数,且所述第i个非零子节点不是所述八叉树的最后一个体素节点,则编码所述第i个非零子节点的重复点信息。In some embodiments, the encoding unit 22 is specifically used to encode the duplicate point information of the i-th non-zero child node if the total number of encoded duplicate points corresponding to the i-th non-zero child node is less than the total number of duplicate points of the point cloud, and the i-th non-zero child node is not the last voxel node of the octree.
在一些实施例中,所述重复点信息包括重复点个数。In some embodiments, the repeated point information includes the number of repeated points.
在一些实施例中,编码单元22,还用于将所述点云的总点数,写入所述点云的几何码流中。In some embodiments, the encoding unit 22 is further configured to write the total number of points of the point cloud into the geometric code stream of the point cloud.
在一些实施例中,编码单元22,具体用于将所述点云的总点数,写入所述点云的几何数据单元中。In some embodiments, the encoding unit 22 is specifically configured to write the total number of points of the point cloud into the geometric data unit of the point cloud.
在一些实施例中,编码单元22,具体用于将所述点云的总点数减一,得到第一值;将所述第一值写入所述几何数据单元中。In some embodiments, the encoding unit 22 is specifically configured to reduce the total number of points of the point cloud by one to obtain a first value; and write the first value into the geometric data unit.
应理解,装置实施例与方法实施例可以相互对应,类似的描述可以参照方法实施例。为避免重复,此处不再赘述。具体地,图11所示的点云编码装置20可以对应于执行本申请实施例的点云编码方法中的相应主体,并且点点云编码装置20中的各个单元的前述和其它操作和/或功能分别为了实现点云编码方法中的相应流程,为了简洁,在此不再赘述。It should be understood that the device embodiment and the method embodiment may correspond to each other, and similar descriptions may refer to the method embodiment. To avoid repetition, it will not be repeated here. Specifically, the point cloud encoding device 20 shown in Figure 11 may correspond to the corresponding subject in the point cloud encoding method of the embodiment of the present application, and the aforementioned and other operations and/or functions of each unit in the point cloud encoding device 20 are respectively for implementing the corresponding processes in the point cloud encoding method. For the sake of brevity, they will not be repeated here.
上文中结合附图从功能单元的角度描述了本申请实施例的装置和系统。应理解,该功能单元可以通过硬件形式实现,也可以通过软件形式的指令实现,还可以通过硬件和软件单元组合实现。具体地,本申请实施例中的方法实施例的各步骤可以通过处理器中的硬件的集成逻辑电路和/或软件形式的指令完成,结合本申请实施例公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件单元组合执行完成。可选地,软件单元可以位于随机存储器,闪存、只读存储器、可编程只读存储器、电可擦写可编程存储器、寄存器等本领域的成熟的存储介质中。该存储介质位于存储器,处理器读取存储器中的信息,结合其硬件完成上述方法实施例中的步骤。The above describes the device and system of the embodiment of the present application from the perspective of the functional unit in conjunction with the accompanying drawings. It should be understood that the functional unit can be implemented in hardware form, can be implemented by instructions in software form, and can also be implemented by a combination of hardware and software units. Specifically, the steps of the method embodiment in the embodiment of the present application can be completed by the hardware integrated logic circuit and/or software form instructions in the processor, and the steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to perform, or a combination of hardware and software units in the decoding processor to perform. Optionally, the software unit can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor reads the information in the memory, and completes the steps in the above method embodiment in conjunction with its hardware.
图12是本申请实施例提供的电子设备的示意性框图。FIG. 12 is a schematic block diagram of an electronic device provided in an embodiment of the present application.
如图12所示,该电子设备30可以为本申请实施例所述的点云解码设备,或者点云编码设备,该电子设备30可包括:As shown in FIG. 12 , the electronic device 30 may be a point cloud decoding device or a point cloud encoding device as described in an embodiment of the present application, and the electronic device 30 may include:
存储器33和处理器32,该存储器33用于存储计算机程序34,并将该程序代码34传输给该处理器32。换言之,该处理器32可以从存储器33中调用并运行计算机程序34,以实现本申请实施例中的方法。The memory 33 and the processor 32, the memory 33 is used to store the computer program 34 and transmit the program code 34 to the processor 32. In other words, the processor 32 can call and run the computer program 34 from the memory 33 to implement the method in the embodiment of the present application.
例如,该处理器32可用于根据该计算机程序34中的指令执行上述方法200中的步骤。For example, the processor 32 may be configured to execute the steps in the method 200 according to the instructions in the computer program 34 .
在本申请的一些实施例中,该处理器32可以包括但不限于:In some embodiments of the present application, the processor 32 may include but is not limited to:
通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等等。General-purpose processor, digital signal processor (DSP), application-specific integrated circuit (ASIC), field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
在本申请的一些实施例中,该存储器33包括但不限于:In some embodiments of the present application, the memory 33 includes but is not limited to:
易失性存储器和/或非易失性存储器。其中,非易失性存储器可以是只读存储器(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,DDR SDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(synch link DRAM,SLDRAM)和直接内存总线随机存取存储器(Direct Rambus RAM,DR RAM)。Volatile memory and/or non-volatile memory. Among them, the non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM) or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM) and direct RAM bus random access memory (Direct Rambus RAM, DR RAM).
在本申请的一些实施例中,该计算机程序34可以被分割成一个或多个单元,该一个或者多个单元被存储在该存储器33中,并由该处理器32执行,以完成本申请提供的方法。该一个或多个单元可以是能够完成特定功能的一系列计算机程序指令段,该指令段用于描述该计算机程序34在该电子设备30中的执行过程。In some embodiments of the present application, the computer program 34 may be divided into one or more units, which are stored in the memory 33 and executed by the processor 32 to complete the method provided by the present application. The one or more units may be a series of computer program instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer program 34 in the electronic device 30.
如图12所示,该电子设备30还可包括:As shown in FIG. 12 , the electronic device 30 may further include:
收发器33,该收发器33可连接至该处理器32或存储器33。The transceiver 33 may be connected to the processor 32 or the memory 33 .
其中,处理器32可以控制该收发器33与其他设备进行通信,具体地,可以向其他设备发送信息或数据,或接收其他设备发送的信息或数据。收发器33可以包括发射机和接收机。收发器33还可以进一步包括天线,天线的数量可以为一个或多个。The processor 32 may control the transceiver 33 to communicate with other devices, specifically, to send information or data to other devices, or to receive information or data sent by other devices. The transceiver 33 may include a transmitter and a receiver. The transceiver 33 may further include an antenna, and the number of antennas may be one or more.
应当理解,该电子设备30中的各个组件通过总线系统相连,其中,总线系统除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。It should be understood that the various components in the electronic device 30 are connected via a bus system, wherein the bus system includes not only a data bus but also a power bus, a control bus and a status signal bus.
图13是本申请实施例提供的点云编解码系统的示意性框图。FIG. 13 is a schematic block diagram of a point cloud encoding and decoding system provided in an embodiment of the present application.
如图13所示,该点云编解码系统40可包括:点云编码器41和点云解码器42,其中点云编码器41用于执行本申请实施例涉及的点云编码方法,点云解码器42用于执行本申请实施例涉及的点云解码方法。As shown in Figure 13, the point cloud encoding and decoding system 40 may include: a point cloud encoder 41 and a point cloud decoder 42, wherein the point cloud encoder 41 is used to execute the point cloud encoding method involved in the embodiment of the present application, and the point cloud decoder 42 is used to execute the point cloud decoding method involved in the embodiment of the present application.
本申请还提供了一种码流,该码流是根据上述编码方法生成的。The present application also provides a code stream, which is generated according to the above encoding method.
本申请还提供了一种计算机存储介质,其上存储有计算机程序,该计算机程序被计算机执行时使得该计算机能够执行上述方法实施例的方法。或者说,本申请实施例还提供一种包含指令的计算机程序产品,该指令被计算机执行时使得计算机执行上述方法实施例的方法。The present application also provides a computer storage medium on which a computer program is stored, and when the computer program is executed by a computer, the computer can perform the method of the above method embodiment. In other words, the present application embodiment also provides a computer program product containing instructions, and when the instructions are executed by a computer, the computer can perform the method of the above method embodiment.
当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。该计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行该计算机程序指令时,全部或部分地产生按照本申请实施例该的流程或功能。该计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。该计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,该计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(digital subscriber line,DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。该计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。该可用介质可以是磁性介质(例如,软盘、硬盘、磁带)、光介质(例如数字点云光盘(digital video disc,DVD))、或者半导体介质(例如固态硬盘(solid state disk,SSD))等。When software is used for implementation, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website, computer, server or data center to another website, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a digital video disc (digital video disc, DVD)), or a semiconductor medium (e.g., a solid state drive (solid state disk, SSD)), etc.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,该单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the unit is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。例如,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. For example, each functional unit in each embodiment of the present application may be integrated into a processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
以上内容,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以该权利要求的保护范围为准。The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims (71)

  1. 一种点云解码方法,其特征在于,包括:A point cloud decoding method, characterized by comprising:
    确定当前节点对应的第一参数,所述第一参数用于确定是否解码所述当前节点对应的重复点信息,所述当前节点为所述点云的八叉树中一个非零节点;Determine a first parameter corresponding to a current node, where the first parameter is used to determine whether to decode duplicate point information corresponding to the current node, where the current node is a non-zero node in the octree of the point cloud;
    基于所述第一参数,对所述当前节点进行几何解码。Based on the first parameter, geometric decoding is performed on the current node.
  2. 根据权利要求1所述的方法,其特征在于,所述当前节点为所述八叉树的第N-1层中的一个非零节点,所述N为所述八叉树的总层数,所述N为大于1的正整数,所述确定当前节点对应的第一参数,包括:The method according to claim 1, characterized in that the current node is a non-zero node in the N-1th layer of the octree, N is the total number of layers of the octree, N is a positive integer greater than 1, and determining the first parameter corresponding to the current node includes:
    确定所述点云的总点数,以及所述第N-1层的非零节点数;Determine the total number of points in the point cloud and the number of non-zero nodes in the N-1th layer;
    基于所述点云的总点数和所述第N-1层的非零节点数,确定所述第一参数。The first parameter is determined based on the total number of points in the point cloud and the number of non-zero nodes in the N-1th layer.
  3. 根据权利要求2所述的方法,其特征在于,所述基于所述点云的总点数和所述第N-1层的非零节点数,确定所述第一参数,包括:The method according to claim 2, characterized in that the determining the first parameter based on the total number of points in the point cloud and the number of non-zero nodes in the N-1th layer comprises:
    将所述点云的总点数和所述第N-1层的非零节点数之间的差值,确定为所述第一参数。The difference between the total number of points in the point cloud and the number of non-zero nodes in the N-1th layer is determined as the first parameter.
  4. 根据权利要求3所述的方法,其特征在于,所述基于所述第一参数,对所述当前节点进行几何解码,包括:The method according to claim 3, characterized in that the geometric decoding of the current node based on the first parameter comprises:
    针对所述当前节点的第i个非零子节点,确定所述第i个非零子节点对应的第二参数,所述第二参数用于指示在解码所述第i个非零子节点时,所述点云中几何位置已解码的点的个数,所述i为正整数;For the i-th non-zero child node of the current node, determine a second parameter corresponding to the i-th non-zero child node, where the second parameter is used to indicate the number of points whose geometric positions in the point cloud have been decoded when decoding the i-th non-zero child node, and i is a positive integer;
    基于所述第一参数和所述第二参数,确定是否解码所述第i个非零子节点的重复点信息。Based on the first parameter and the second parameter, determine whether to decode the repeated point information of the i-th non-zero child node.
  5. 根据权利要求4所述的方法,其特征在于,所述确定所述第i个非零子节点对应的第二参数,包括:The method according to claim 4, characterized in that the determining the second parameter corresponding to the i-th non-zero child node comprises:
    确定所述点云中所述第i个非零子节点对应的已解码点个数;Determine the number of decoded points corresponding to the i-th non-zero child node in the point cloud;
    基于所述点云中所述第i个非零子节点对应的已解码点个数,确定所述第i个非零子节点对应的第二参数。Based on the number of decoded points corresponding to the ith non-zero child node in the point cloud, a second parameter corresponding to the ith non-zero child node is determined.
  6. 根据权利要求5所述的方法,其特征在于,所述确定所述点云中所述第i个非零子节点对应的已解码点个数,包括:The method according to claim 5, characterized in that the determining the number of decoded points corresponding to the i-th non-zero child node in the point cloud comprises:
    若所述当前节点为所述第N-1层中的第一个非零节点,则确定所述当前节点的非零子节点个数;If the current node is the first non-zero node in the N-1th layer, determining the number of non-zero child nodes of the current node;
    基于所述当前节点的非零子节点个数,确定所述第i个非零子节点对应的已解码点个数。Based on the number of non-zero child nodes of the current node, the number of decoded points corresponding to the i-th non-zero child node is determined.
  7. 根据权利要求6所述的方法,其特征在于,所述基于所述当前节点的非零子节点个数,确定所述第i个非零子节点对应的已解码点个数,包括:The method according to claim 6, characterized in that the determining the number of decoded points corresponding to the i-th non-zero child node based on the number of non-zero child nodes of the current node comprises:
    若所述第i个非零子节点为所述当前节点的第1个非零子节点,则将所述当前节点所包括的非零子节点的个数减1后的值,确定为所述第i个非零子节点对应的已解码点个数。If the i-th non-zero child node is the first non-zero child node of the current node, the value obtained by subtracting 1 from the number of non-zero child nodes included in the current node is determined as the number of decoded points corresponding to the i-th non-zero child node.
  8. 根据权利要求6所述的方法,其特征在于,所述基于所述当前节点的非零子节点个数,确定所述第i个非零子节点对应的已解码点个数,包括:The method according to claim 6, characterized in that the determining the number of decoded points corresponding to the i-th non-zero child node based on the number of non-zero child nodes of the current node comprises:
    若所述第i个非零子节点不是所述当前节点的第1个非零子节点,则获取所述当前节点中位于所述第i个非零子节点之前的非零子节点所包括的第一重复点个数之和;If the i-th non-zero child node is not the first non-zero child node of the current node, then obtaining the sum of the first number of repeated points included in the non-zero child nodes before the i-th non-zero child node in the current node;
    将所述当前节点所包括的非零子节点的个数减1后,再与所述第一重复点个数之和相加,得到所述第i个非零子节点对应的已解码点个数。The number of non-zero child nodes included in the current node is subtracted by 1, and then added to the sum of the first number of repeated points to obtain the number of decoded points corresponding to the i-th non-zero child node.
  9. 根据权利要求5所述的方法,其特征在于,所述确定所述点云中所述第i个非零子节点对应的已解码点个数,包括:The method according to claim 5, characterized in that the determining the number of decoded points corresponding to the i-th non-zero child node in the point cloud comprises:
    若所述当前节点不是所述第N-1层中的第一个非零节点,则确定所述第N-1层中位于所述当前节点之前的各非零节点对应的已解码点的个数;If the current node is not the first non-zero node in the N-1th layer, determining the number of decoded points corresponding to each non-zero node before the current node in the N-1th layer;
    确定所述当前节点的非零子节点个数;Determine the number of non-zero child nodes of the current node;
    基于所述第N-1层中位于所述当前节点之前的各非零节点对应的已解码点的个数,以及所述当前节点的非零子节点个数,确定所述第i个非零子节点对应的已解码点个数。The number of decoded points corresponding to the i-th non-zero child node is determined based on the number of decoded points corresponding to each non-zero node before the current node in the N-1th layer and the number of non-zero child nodes of the current node.
  10. 根据权利要求9所述的方法,其特征在于,所述确定所述第N-1层中位于所述当前节点之前的各非零节点对应的已解码点的个数,包括:The method according to claim 9, characterized in that the determining the number of decoded points corresponding to each non-zero node located before the current node in the N-1th layer comprises:
    针对所述各非零节点中的一个非零节点,获取所述非零节点的非零子节点个数和所述非零子节点所包括的重复点个数;For a non-zero node among the non-zero nodes, obtaining the number of non-zero child nodes of the non-zero node and the number of repeated points included in the non-zero child node;
    将所述非零节点的非零子节点个数减1后,与所述非零节点的非零子节点所包括的重复点个数之和相加,得到所述非零节点对应的已解码点的个数。The number of non-zero child nodes of the non-zero node is subtracted by 1, and then added to the sum of the numbers of repeated points included in the non-zero child nodes of the non-zero node to obtain the number of decoded points corresponding to the non-zero node.
  11. 根据权利要求9所述的方法,其特征在于,所述基于所述第N-1层中位于所述当前节点之前的各非零节点对应的已解码点的个数,以及所述当前节点的非零子节点个数,确定所述第i个非零子节点对应的已解码点个数,包括:The method according to claim 9, characterized in that the determining the number of decoded points corresponding to the i-th non-zero child node based on the number of decoded points corresponding to each non-zero node located before the current node in the N-1th layer and the number of non-zero child nodes of the current node comprises:
    将所述第N-1层中位于所述当前节点之前的各非零节点对应的已解码点的个数相加,得到第一和值;Adding the numbers of decoded points corresponding to the non-zero nodes before the current node in the N-1th layer to obtain a first sum;
    基于所述第一和值和所述当前节点的非零子节点个数,确定所述第i个非零子节点对应的已解码点个数。Based on the first sum value and the number of non-zero child nodes of the current node, the number of decoded points corresponding to the i-th non-zero child node is determined.
  12. 根据权利要求11所述的方法,其特征在于,所述基于所述第一和值和所述当前节点的非零子节点个数,确定所述第i个非零子节点对应的已解码点个数,包括:The method according to claim 11, characterized in that the determining the number of decoded points corresponding to the i-th non-zero child node based on the first sum value and the number of non-zero child nodes of the current node comprises:
    若所述第i个非零子节点为所述当前节点的第1个非零子节点,则将所述第一和值与所述当前节点所包括的非零子节点的个数进行相加,得到第二和值;If the i-th non-zero child node is the first non-zero child node of the current node, then the first sum value is added to the number of non-zero child nodes included in the current node to obtain a second sum value;
    对所述第二和值减1,得到所述第i个非零子节点对应的已解码点个数。Subtract 1 from the second sum to obtain the number of decoded points corresponding to the i-th non-zero child node.
  13. 根据权利要求11所述的方法,其特征在于,所述基于所述第一和值和所述当前节点的非零子节点个数,确定所述第i个非零子节点对应的已解码点个数,包括:The method according to claim 11, characterized in that the determining the number of decoded points corresponding to the i-th non-zero child node based on the first sum value and the number of non-zero child nodes of the current node comprises:
    若所述第i个非零子节点不为所述当前节点的第1个非零子节点,则将所述第一和值与所述当前节点所包括的非 零子节点的个数进行相加,得到第二和值;If the i-th non-zero child node is not the first non-zero child node of the current node, then adding the first sum value to the number of non-zero child nodes included in the current node to obtain a second sum value;
    对所述第二和值减1,得到第三和值;Subtract 1 from the second sum to obtain a third sum;
    获取所述当前节点中位于所述第i个非零子节点之前的非零子节点所包括的第一重复点个数之和,并将所述第三和值与所述第一重复点个数之和相加,得到所述第i个非零子节点对应的已解码点个数。Obtain the sum of the first number of repeated points included in the non-zero child nodes in the current node that are located before the i-th non-zero child node, and add the third sum value to the sum of the first number of repeated points to obtain the number of decoded points corresponding to the i-th non-zero child node.
  14. 根据权利要求4-13任一项所述的方法,其特征在于,若所述点云未采用推断直接编码模式IDCM,则所述基于所述点云中所述第i个非零子节点对应的已解码点个数,确定所述第i个非零子节点对应的第二参数,包括:The method according to any one of claims 4 to 13, characterized in that if the point cloud does not adopt an inferred direct coding mode IDCM, then determining the second parameter corresponding to the i-th non-zero child node based on the number of decoded points corresponding to the i-th non-zero child node in the point cloud comprises:
    将所述第i个非零子节点对应的已解码点个数,确定为所述第i个非零子节点对应的第二参数。The number of decoded points corresponding to the i-th non-zero child node is determined as the second parameter corresponding to the i-th non-zero child node.
  15. 根据权利要求4-13任一项所述的方法,其特征在于,若所述点云采用推断直接编码模式IDCM,所述基于所述点云中所述第i个非零子节点对应的已解码点个数,确定所述第i个非零子节点对应的第二参数,包括:The method according to any one of claims 4 to 13, characterized in that if the point cloud adopts an inferred direct coding mode IDCM, the determining the second parameter corresponding to the i-th non-zero child node based on the number of decoded points corresponding to the i-th non-zero child node in the point cloud comprises:
    确定所述八叉树中已解码的第一节点所包括的点个数,所述第一节点为所述八叉树中采用IDCM的节点;Determine the number of points included in the decoded first node in the octree, the first node being a node in the octree that adopts IDCM;
    基于所述第i个非零子节点对应的已解码点个数,以及所述第一节点所包括的点个数,确定所述第i个非零子节点对应的第二参数。Based on the number of decoded points corresponding to the i-th non-zero child node and the number of points included in the first node, a second parameter corresponding to the i-th non-zero child node is determined.
  16. 根据权利要求15所述的方法,其特征在于,所述基于所述点云中所述第i个非零子节点对应的已解码点个数,以及所述第一节点所包括的点个数,确定所述第i个非零子节点对应的第二参数,包括:The method according to claim 15, characterized in that the determining the second parameter corresponding to the i-th non-zero child node based on the number of decoded points corresponding to the i-th non-zero child node in the point cloud and the number of points included in the first node comprises:
    若所述第一节点不是所述第N-1层中的节点,则将所述第i个非零子节点对应的已解码点个数和所述第一节点所包括的点个数之和,确定为所述第i个非零子节点对应的第二参数。If the first node is not a node in the N-1th layer, the sum of the number of decoded points corresponding to the i-th non-zero child node and the number of points included in the first node is determined as the second parameter corresponding to the i-th non-zero child node.
  17. 根据权利要求15所述的方法,其特征在于,所述基于所述点云中所述第i个非零子节点对应的已解码点个数,以及所述第一节点所包括的点个数,确定所述第i个非零子节点对应的第二参数,包括:The method according to claim 15, characterized in that the determining the second parameter corresponding to the i-th non-zero child node based on the number of decoded points corresponding to the i-th non-zero child node in the point cloud and the number of points included in the first node comprises:
    若所述第一节点是所述第N-1层中的节点,则将所述第i个非零子节点对应的已解码点个数和所述第一节点所包括的点个数之和减1后的值,确定为所述第i个非零子节点对应的第二参数。If the first node is a node in the N-1th layer, the value obtained by subtracting 1 from the sum of the number of decoded points corresponding to the i-th non-zero child node and the number of points included in the first node is determined as the second parameter corresponding to the i-th non-zero child node.
  18. 根据权利要求4-13任一项所述的方法,其特征在于,所述基于所述第一参数和所述第二参数,确定是否解码所述第i个非零子节点的重复点信息,包括:The method according to any one of claims 4 to 13, characterized in that the determining whether to decode the repeated point information of the i-th non-zero child node based on the first parameter and the second parameter comprises:
    若所述第一参数等于所述第二参数,则跳过解码所述第i个非零子节点的重复点信息。If the first parameter is equal to the second parameter, skip decoding the repeated point information of the i-th non-zero child node.
  19. 根据权利要求4-13任一项所述的方法,其特征在于,所述基于所述第一参数和所述第二参数,确定是否解码所述第i个非零子节点的重复点信息,包括:The method according to any one of claims 4 to 13, characterized in that the determining whether to decode the repeated point information of the i-th non-zero child node based on the first parameter and the second parameter comprises:
    若所述第一参数大于所述第二参数,且所述第i个非零子节点为所述八叉树的最后一个体素节点,则跳过解码所述第i个非零子节点的重复点信息,且将所述第一参数与所述第二参数的差值,确定为所述第i个非零子节点所包括的重复点个数。If the first parameter is greater than the second parameter, and the i-th non-zero child node is the last voxel node of the octree, skip decoding the repeated point information of the i-th non-zero child node, and determine the difference between the first parameter and the second parameter as the number of repeated points included in the i-th non-zero child node.
  20. 根据权利要求4-13任一项所述的方法,其特征在于,所述基于所述第一参数和所述第二参数,确定是否解码所述第i个非零子节点的重复点信息,包括:The method according to any one of claims 4 to 13, characterized in that the determining whether to decode the repeated point information of the i-th non-zero child node based on the first parameter and the second parameter comprises:
    若所述第一参数大于所述第二参数,且所述第i个非零子节点不是所述八叉树的最后一个体素节点,则解码所述第i个非零子节点的重复点信息。If the first parameter is greater than the second parameter, and the i-th non-zero child node is not the last voxel node of the octree, the repeated point information of the i-th non-zero child node is decoded.
  21. 根据权利要求1所述的方法,其特征在于,所述确定当前节点对应的第一参数,包括:The method according to claim 1, characterized in that the determining the first parameter corresponding to the current node comprises:
    针对所述当前节点中的第i个非零子节点,确定所述第i个非零子节点对应的已解码重复点总数,所述i为正整数;For the i-th non-zero child node in the current node, determine the total number of decoded repeated points corresponding to the i-th non-zero child node, where i is a positive integer;
    将所述第i个非零子节点对应的已解码重复点总数,确定为所述第一参数。The total number of decoded repeated points corresponding to the i-th non-zero child node is determined as the first parameter.
  22. 根据权利要求21所述的方法,其特征在于,所述确定所述第i个非零子节点对应的已解码重复点总数,包括:The method according to claim 21, characterized in that the determining the total number of decoded repeated points corresponding to the i-th non-zero child node comprises:
    确定所述八叉树中位于所述第i个非零子节点之前的各非零子节点所包括的第一已解码重复点个数之和;Determine the sum of the numbers of first decoded repeated points included in each non-zero child node located before the i-th non-zero child node in the octree;
    基于所述第一已解码重复点个数之和,确定所述第i个非零子节点对应的已解码重复点总数。Based on the sum of the first numbers of decoded repeated points, the total number of decoded repeated points corresponding to the i-th non-zero child node is determined.
  23. 根据权利要求22所述的方法,其特征在于,若所述点云采用推断直接编码模式IDCM时,则所述基于所述第一已解码重复点个数之和,确定所述第i个非零子节点对应的已解码重复点总数,包括:The method according to claim 22, characterized in that if the point cloud adopts an inferred direct coding mode IDCM, then determining the total number of decoded repeated points corresponding to the i-th non-zero child node based on the sum of the first number of decoded repeated points comprises:
    确定所述八叉树中采用IDCM的第一节点所包括的第二已解码重复点个数之和;Determine the sum of the number of second decoded repeated points included in the first node using IDCM in the octree;
    将所述第一已解码重复点个数之和、与所述第二已解码重复点个数之和进行相加,得到所述第i个非零子节点对应的已解码重复点总数。The sum of the first number of decoded repeated points and the sum of the second number of decoded repeated points are added to obtain the total number of decoded repeated points corresponding to the i-th non-zero child node.
  24. 根据权利要求22所述的方法,其特征在于,若所述点云未采用推断直接编码模式IDCM时,则所述基于所述第一已解码重复点个数之和,确定所述第i个非零子节点对应的已解码重复点总数,包括:The method according to claim 22, characterized in that, if the point cloud does not adopt the inferred direct coding mode IDCM, then determining the total number of decoded repeated points corresponding to the i-th non-zero child node based on the sum of the first number of decoded repeated points comprises:
    将所述第一已解码重复点个数之和,确定为所述第i个非零子节点对应的已解码重复点总数。The sum of the first numbers of decoded repeated points is determined as the total number of decoded repeated points corresponding to the i-th non-zero child node.
  25. 根据权利要求21所述的方法,其特征在于,所述基于所述第一参数,对所述当前节点进行几何解码,包括:The method according to claim 21, characterized in that the geometric decoding of the current node based on the first parameter comprises:
    确定所述点云的重复点总数;Determining a total number of duplicate points of the point cloud;
    基于所述点云的重复点总数和所述第i个非零子节点对应的已解码重复点总数,确定是否解码所述第i个非零子节点的重复点信息。Based on the total number of repeated points in the point cloud and the total number of decoded repeated points corresponding to the i-th non-zero child node, it is determined whether to decode the repeated point information of the i-th non-zero child node.
  26. 根据权利要求25所述的方法,其特征在于,所述确定所述点云的重复点总数,包括:The method according to claim 25, characterized in that determining the total number of repeated points in the point cloud comprises:
    确定所述点云的总点数,以及所述八叉树的非零体素节点总数;Determine the total number of points in the point cloud and the total number of non-zero voxel nodes in the octree;
    将所述点云的总点数与所述八叉树的非零体素节点总数的差值,确定为所述点云的重复点总数。The difference between the total number of points of the point cloud and the total number of non-zero voxel nodes of the octree is determined as the total number of repeated points of the point cloud.
  27. 根据权利要求25所述的方法,其特征在于,所述基于所述点云的重复点总数和所述第i个非零子节点对应的已解码重复点总数,确定是否解码所述第i个非零子节点的重复点信息,包括:The method according to claim 25, characterized in that the determining whether to decode the duplicate point information of the i-th non-zero child node based on the total number of duplicate points in the point cloud and the total number of decoded duplicate points corresponding to the i-th non-zero child node comprises:
    若所述第i个非零子节点对应的已解码重复点总数等于所述点云的重复总点数,则跳过解码所述第i个非零子节点的重复点信息。If the total number of decoded repeated points corresponding to the i-th non-zero child node is equal to the total number of repeated points of the point cloud, then decoding of the repeated point information of the i-th non-zero child node is skipped.
  28. 根据权利要求25所述的方法,其特征在于,所述基于所述点云的重复点总数和所述第i个非零子节点对应的 已解码重复点总数,确定是否解码所述第i个非零子节点的重复点信息,包括:The method according to claim 25, characterized in that the determining whether to decode the duplicate point information of the i-th non-zero child node based on the total number of duplicate points of the point cloud and the total number of decoded duplicate points corresponding to the i-th non-zero child node comprises:
    若所述第i个非零子节点对应的已解码重复点总数小于所述点云的重复总点数,且所述第i个非零子节点是所述八叉树的最后一个体素节点,则跳过解码所述第i个非零子节点的重复点信息,且将所述点云的重复总点数与所述第i个非零子节点对应的已解码重复点总数的差值,确定为所述第i个非零子节点所包括的重复点个数。If the total number of decoded duplicate points corresponding to the i-th non-zero child node is less than the total number of duplicate points of the point cloud, and the i-th non-zero child node is the last voxel node of the octree, then the decoding of the duplicate point information of the i-th non-zero child node is skipped, and the difference between the total number of duplicate points of the point cloud and the total number of decoded duplicate points corresponding to the i-th non-zero child node is determined as the number of duplicate points included in the i-th non-zero child node.
  29. 根据权利要求25所述的方法,其特征在于,所述基于所述点云的重复点总数和所述第i个非零子节点对应的已解码重复点总数,确定是否解码所述第i个非零子节点的重复点信息,包括:The method according to claim 25, characterized in that the determining whether to decode the duplicate point information of the i-th non-zero child node based on the total number of duplicate points in the point cloud and the total number of decoded duplicate points corresponding to the i-th non-zero child node comprises:
    若所述第i个非零子节点对应的已解码重复点总数小于所述点云的重复总点数,且所述第i个非零子节点不是所述八叉树的最后一个体素节点,则解码所述第i个非零子节点的重复点信息。If the total number of decoded duplicate points corresponding to the i-th non-zero child node is less than the total number of duplicate points in the point cloud, and the i-th non-zero child node is not the last voxel node of the octree, the duplicate point information of the i-th non-zero child node is decoded.
  30. 根据权利要求1-13任一项所述的方法,其特征在于,所述重复点信息包括重复点个数。The method according to any one of claims 1-13 is characterized in that the repeated point information includes the number of repeated points.
  31. 根据权利要求2或25所述的方法,其特征在于,所述确定所述点云的总点数,包括:The method according to claim 2 or 25, characterized in that determining the total number of points in the point cloud comprises:
    解码所述点云的几何码流,得到所述点云的总点数。Decode the geometric code stream of the point cloud to obtain the total number of points of the point cloud.
  32. 根据权利要求31所述的方法,其特征在于,所述解码点云的几何码流,得到所述点云的总点数,包括:The method according to claim 31, characterized in that the decoding of the geometric code stream of the point cloud to obtain the total number of points of the point cloud comprises:
    解码所述点云的几何数据单元,得到所述点云的总点数。Decode the geometric data unit of the point cloud to obtain the total number of points of the point cloud.
  33. 根据权利要求32所述的方法,其特征在于,所述解码所述几何数据单元,得到所述点云的总点数,包括:The method according to claim 32, characterized in that the decoding of the geometric data unit to obtain the total number of points of the point cloud comprises:
    解码所述几何数据单元,得到第一值,所述第一值为所述点云的总点数减一;Decoding the geometric data unit to obtain a first value, where the first value is a total number of points in the point cloud minus one;
    对所述第一值加一,得到所述点云的总点数。The first value is added by one to obtain the total number of points in the point cloud.
  34. 根据权利要求9所述的方法,其特征在于,所述确定所述当前节点的非零子节点个数,包括:The method according to claim 9, characterized in that the determining the number of non-zero child nodes of the current node comprises:
    解码所述点云的几何码流,得到所述当前节点的占位信息;Decoding the geometric code stream of the point cloud to obtain the placeholder information of the current node;
    基于所述占位信息,得到所述当前节点所包括的非零子节点个数。Based on the placeholder information, the number of non-zero child nodes included in the current node is obtained.
  35. 一种点云编码方法,其特征在于,包括:A point cloud encoding method, characterized by comprising:
    确定当前节点对应的第一参数,所述第一参数用于确定是否编码所述当前节点对应的重复点信息,所述当前节点为所述点云的八叉树中的一个非零节点;Determine a first parameter corresponding to a current node, where the first parameter is used to determine whether to encode duplicate point information corresponding to the current node, where the current node is a non-zero node in the octree of the point cloud;
    基于所述第一参数,对所述当前节点进行几何编码。Based on the first parameter, geometric encoding is performed on the current node.
  36. 根据权利要求35所述的方法,其特征在于,所述当前节点为所述八叉树的第N-1层中的一个非零节点,所述N为所述八叉树的总层数,所述N为大于1的正整数,所述确定当前节点对应的第一参数,包括:The method according to claim 35, characterized in that the current node is a non-zero node in the N-1th layer of the octree, N is the total number of layers of the octree, N is a positive integer greater than 1, and determining the first parameter corresponding to the current node includes:
    确定所述点云的总点数,以及所述第N-1层的非零节点数;Determine the total number of points in the point cloud and the number of non-zero nodes in the N-1th layer;
    基于所述点云的总点数和所述第N-1层的非零节点数,确定所述第一参数。The first parameter is determined based on the total number of points in the point cloud and the number of non-zero nodes in the N-1th layer.
  37. 根据权利要求36所述的方法,其特征在于,所述基于所述点云的总点数和所述第N-1层的非零节点数,确定所述第一参数,包括:The method according to claim 36, characterized in that the determining the first parameter based on the total number of points in the point cloud and the number of non-zero nodes in the N-1th layer comprises:
    将所述点云的总点数和所述第N-1层的非零节点数之间的差值,确定为所述第一参数。The difference between the total number of points in the point cloud and the number of non-zero nodes in the N-1th layer is determined as the first parameter.
  38. 根据权利要求37所述的方法,其特征在于,所述基于所述第一参数,对所述当前节点进行几何编码,包括:The method according to claim 37, characterized in that the geometric encoding of the current node based on the first parameter comprises:
    针对所述当前节点的第i个非零子节点,确定所述第i个非零子节点对应的第二参数,所述第二参数用于指示在编码所述第i个非零子节点时,所述点云中几何位置已编码的点的个数;For the i-th non-zero child node of the current node, determine a second parameter corresponding to the i-th non-zero child node, where the second parameter is used to indicate the number of points whose geometric positions in the point cloud have been encoded when encoding the i-th non-zero child node;
    基于所述第一参数和所述第二参数,确定是否编码所述第i个非零子节点的重复点信息。Based on the first parameter and the second parameter, determine whether to encode the repeated point information of the i-th non-zero child node.
  39. 根据权利要求38所述的方法,其特征在于,所述确定所述第i个非零子节点对应的第二参数,包括:The method according to claim 38, characterized in that the determining the second parameter corresponding to the i-th non-zero child node comprises:
    确定所述点云中所述第i个非零子节点对应的已编码点个数;Determine the number of encoded points corresponding to the i-th non-zero child node in the point cloud;
    基于所述点云中所述第i个非零子节点对应的已编码点个数,确定所述第i个非零子节点对应的第二参数。Based on the number of encoded points corresponding to the ith non-zero child node in the point cloud, a second parameter corresponding to the ith non-zero child node is determined.
  40. 根据权利要求39所述的方法,其特征在于,所述确定所述点云中所述第i个非零子节点对应的已编码点个数,包括:The method according to claim 39, characterized in that the determining the number of encoded points corresponding to the i-th non-zero child node in the point cloud comprises:
    若所述当前节点为所述第N-1层中的第一个非零节点,则确定所述当前节点的非零子节点个数;If the current node is the first non-zero node in the N-1th layer, determining the number of non-zero child nodes of the current node;
    基于所述当前节点的非零子节点个数,确定所述第i个非零子节点对应的已编码点个数。Based on the number of non-zero child nodes of the current node, the number of encoded points corresponding to the i-th non-zero child node is determined.
  41. 根据权利要求40所述的方法,其特征在于,所述基于所述当前节点的非零子节点个数,确定所述第i个非零子节点对应的已编码点个数,包括:The method according to claim 40, characterized in that the determining the number of encoded points corresponding to the i-th non-zero child node based on the number of non-zero child nodes of the current node comprises:
    若所述第i个非零子节点为所述当前节点的第1个非零子节点,则将所述当前节点所包括的非零子节点的个数减1,确定为所述第i个非零子节点对应的已编码点个数。If the i-th non-zero child node is the first non-zero child node of the current node, the number of non-zero child nodes included in the current node is reduced by 1 to determine the number of encoded points corresponding to the i-th non-zero child node.
  42. 根据权利要求40所述的方法,其特征在于,所述基于所述当前节点的非零子节点个数,确定所述第i个非零子节点对应的已编码点个数,包括:The method according to claim 40, characterized in that the determining the number of encoded points corresponding to the i-th non-zero child node based on the number of non-zero child nodes of the current node comprises:
    若所述第i个非零子节点不为所述当前节点的第1个非零子节点,则获取所述当前节点中所述第i个非零子节点之前的子节点所包括的第一重复点个数之和;If the i-th non-zero child node is not the first non-zero child node of the current node, then obtaining the sum of the first number of repeated points included in the child nodes before the i-th non-zero child node in the current node;
    将所述当前节点所包括的非零子节点的个数减1后,再与所述第一重复点个数之和相加,得到所述第i个非零子节点对应的已编码点个数。The number of non-zero child nodes included in the current node is subtracted by 1, and then added to the sum of the first number of repeated points to obtain the number of encoded points corresponding to the i-th non-zero child node.
  43. 根据权利要求39所述的方法,其特征在于,所述确定所述点云中所述第i个非零子节点对应的已编码点个数,包括:The method according to claim 39, characterized in that the determining the number of encoded points corresponding to the i-th non-zero child node in the point cloud comprises:
    若所述当前节点不是所述第N-1层中的第一个非零节点,则确定所述第N-1层中位于所述当前节点之前的各非零节点对应的已编码点的个数;If the current node is not the first non-zero node in the N-1th layer, determining the number of encoded points corresponding to each non-zero node in the N-1th layer before the current node;
    确定所述当前节点的非零子节点个数;Determine the number of non-zero child nodes of the current node;
    基于所述第N-1层中位于所述当前节点之前的各非零节点对应的已编码点的个数,以及所述当前节点的非零子节点个数,确定所述第i个非零子节点对应的已编码点个数。The number of encoded points corresponding to the i-th non-zero child node is determined based on the number of encoded points corresponding to each non-zero node before the current node in the N-1th layer and the number of non-zero child nodes of the current node.
  44. 根据权利要求43所述的方法,其特征在于,所述确定所述第N-1层中位于所述当前节点之前的各非零节点对应的已编码点的个数,包括:The method according to claim 43, characterized in that the determining the number of encoded points corresponding to each non-zero node located before the current node in the N-1th layer comprises:
    针对所述各非零节点中的一个非零节点,获取所述非零节点的非零子节点个数和所述非零子节点所包括的重复点个数;For a non-zero node among the non-zero nodes, obtaining the number of non-zero child nodes of the non-zero node and the number of repeated points included in the non-zero child node;
    将所述非零节点的非零子节点个数减1后,与所述非零节点的非零子节点所包括的重复点个数之和相加,得到所述非零节点对应的已编码点的个数。The number of non-zero child nodes of the non-zero node is subtracted by 1, and then added to the sum of the numbers of repeated points included in the non-zero child nodes of the non-zero node to obtain the number of encoded points corresponding to the non-zero node.
  45. 根据权利要求43所述的方法,其特征在于,所述基于所述第N-1层中位于所述当前节点之前的各非零节点对应的已编码点的个数,以及所述当前节点的非零子节点个数,确定所述第i个非零子节点对应的已编码点个数,包括:The method according to claim 43, characterized in that the determining the number of coded points corresponding to the i-th non-zero child node based on the number of coded points corresponding to each non-zero node located before the current node in the N-1th layer and the number of non-zero child nodes of the current node comprises:
    将所述第N-1层中位于所述当前节点之前的各非零节点对应的已编码点的个数相加,得到第一和值;Adding the numbers of encoded points corresponding to the non-zero nodes before the current node in the N-1th layer to obtain a first sum;
    基于所述第一和值和所述当前节点的非零子节点个数,确定所述第i个非零子节点对应的已编码点个数。Based on the first sum value and the number of non-zero child nodes of the current node, the number of encoded points corresponding to the i-th non-zero child node is determined.
  46. 根据权利要求45所述的方法,其特征在于,所述基于所述第一和值和所述当前节点的非零子节点个数,确定所述第i个非零子节点对应的已编码点个数,包括:The method according to claim 45, characterized in that the determining the number of encoded points corresponding to the i-th non-zero child node based on the first sum value and the number of non-zero child nodes of the current node comprises:
    若所述第i个非零子节点为所述当前节点的第1个非零子节点,则将所述第一和值与所述当前节点所包括的非零子节点的个数进行相加,得到第二和值;If the i-th non-zero child node is the first non-zero child node of the current node, then the first sum value is added to the number of non-zero child nodes included in the current node to obtain a second sum value;
    对所述第二和值减1,得到所述第i个非零子节点对应的已编码点个数。Subtract 1 from the second sum to obtain the number of encoded points corresponding to the i-th non-zero child node.
  47. 根据权利要求45所述的方法,其特征在于,所述基于所述第一和值和所述当前节点的非零子节点个数,确定所述第i个非零子节点对应的已编码点个数,包括:The method according to claim 45, characterized in that the determining the number of encoded points corresponding to the i-th non-zero child node based on the first sum value and the number of non-zero child nodes of the current node comprises:
    若所述第i个非零子节点不为所述当前节点的第1个非零子节点,则将所述第一和值与所述当前节点所包括的非零子节点的个数进行相加,得到第二和值;If the i-th non-zero child node is not the first non-zero child node of the current node, then adding the first sum value to the number of non-zero child nodes included in the current node to obtain a second sum value;
    对所述第二和值减1,得到第三和值;Subtract 1 from the second sum to obtain a third sum;
    获取所述当前节点中位于所述第i个非零子节点之前的非零子节点所包括的第一重复点个数之和,并将所述第三和值与所述第一重复点个数之和相加,得到所述第i个非零子节点对应的已编码点个数。Obtain the sum of the first number of repeated points included in the non-zero child nodes in the current node that are located before the i-th non-zero child node, and add the third sum value to the sum of the first number of repeated points to obtain the number of encoded points corresponding to the i-th non-zero child node.
  48. 根据权利要求38-47任一项所述的方法,其特征在于,若所述点云未采用推断直接编码模式IDCM,则所述基于所述点云中所述第i个非零子节点对应的已编码点个数,确定所述第i个非零子节点对应的第二参数,包括:The method according to any one of claims 38 to 47, characterized in that if the point cloud does not adopt an inferred direct coding mode IDCM, then determining the second parameter corresponding to the i-th non-zero child node based on the number of encoded points corresponding to the i-th non-zero child node in the point cloud comprises:
    将所述第i个非零子节点对应的已编码点个数,确定为所述第i个非零子节点对应的第二参数。The number of encoded points corresponding to the i-th non-zero child node is determined as the second parameter corresponding to the i-th non-zero child node.
  49. 根据权利要求38-47任一项所述的方法,其特征在于,若所述点云采用推断直接编码模式IDCM,所述基于所述点云中所述第i个非零子节点对应的已编码点个数,确定所述第i个非零子节点对应的第二参数,包括:The method according to any one of claims 38 to 47, characterized in that if the point cloud adopts an inferred direct coding mode IDCM, the determining the second parameter corresponding to the i-th non-zero child node based on the number of encoded points corresponding to the i-th non-zero child node in the point cloud comprises:
    确定所述八叉树中已编码的第一节点所包括的点个数,所述第一节点为所述八叉树中采用IDCM的节点;Determine the number of points included in the first node that has been encoded in the octree, the first node being a node in the octree that adopts IDCM;
    基于所述第i个非零子节点对应的已编码点个数,以及所述第一节点所包括的点个数,确定所述第i个非零子节点对应的第二参数。Based on the number of encoded points corresponding to the i-th non-zero child node and the number of points included in the first node, a second parameter corresponding to the i-th non-zero child node is determined.
  50. 根据权利要求49所述的方法,其特征在于,所述基于所述点云中所述第i个非零子节点对应的已编码点个数,以及所述第一节点所包括的点个数,确定所述第i个非零子节点对应的第二参数,包括:The method according to claim 49, characterized in that the determining the second parameter corresponding to the i-th non-zero child node based on the number of encoded points corresponding to the i-th non-zero child node in the point cloud and the number of points included in the first node comprises:
    若所述第一节点不是所述第N-1层中的节点,则将所述第i个非零子节点对应的已编码点个数和所述第一节点所包括的点个数之和,确定为所述第i个非零子节点对应的第二参数。If the first node is not a node in the N-1th layer, the sum of the number of encoded points corresponding to the i-th non-zero child node and the number of points included in the first node is determined as the second parameter corresponding to the i-th non-zero child node.
  51. 根据权利要求49所述的方法,其特征在于,所述基于所述点云中所述第i个非零子节点对应的已编码点个数,以及所述第一节点所包括的点个数,确定所述第i个非零子节点对应的第二参数,包括:The method according to claim 49, characterized in that the determining the second parameter corresponding to the i-th non-zero child node based on the number of encoded points corresponding to the i-th non-zero child node in the point cloud and the number of points included in the first node comprises:
    若所述第一节点是所述第N-1层中的节点,则将所述第i个非零子节点对应的已编码点个数和所述第一节点所包括的点个数之和减1后的值,确定为所述第i个非零子节点对应的第二参数。If the first node is a node in the N-1th layer, the value obtained by subtracting 1 from the sum of the number of encoded points corresponding to the i-th non-zero child node and the number of points included in the first node is determined as the second parameter corresponding to the i-th non-zero child node.
  52. 根据权利要求38-47任一项所述的方法,其特征在于,所述基于所述第一参数和所述第二参数,确定是否编码所述第i个非零子节点的重复点信息,包括:The method according to any one of claims 38 to 47, characterized in that the determining whether to encode the repeated point information of the i-th non-zero child node based on the first parameter and the second parameter comprises:
    若所述第一参数等于所述第二参数,则跳过编码所述第i个非零子节点的重复点信息。If the first parameter is equal to the second parameter, skip encoding the repeated point information of the i-th non-zero child node.
  53. 根据权利要求38-47任一项所述的方法,其特征在于,所述基于所述第一参数和所述第二参数,确定是否编码所述第i个非零子节点的重复点信息,包括:The method according to any one of claims 38 to 47, characterized in that the determining whether to encode the repeated point information of the i-th non-zero child node based on the first parameter and the second parameter comprises:
    若所述第一参数大于所述第二参数,且所述第i个非零子节点为所述八叉树的最后一个体素节点,则跳过编码所述第i个非零子节点的重复点信息,且将所述第一参数与所述第二参数的差值,确定为所述第i个非零子节点所包括的重复点个数。If the first parameter is greater than the second parameter, and the i-th non-zero child node is the last voxel node of the octree, skip encoding the repeated point information of the i-th non-zero child node, and determine the difference between the first parameter and the second parameter as the number of repeated points included in the i-th non-zero child node.
  54. 根据权利要求38-47任一项所述的方法,其特征在于,所述基于所述第一参数和所述第二参数,确定是否编码所述第i个非零子节点的重复点信息,包括:The method according to any one of claims 38 to 47, characterized in that the determining whether to encode the repeated point information of the i-th non-zero child node based on the first parameter and the second parameter comprises:
    若所述第一参数大于所述第二参数,且所述第i个非零子节点不是所述八叉树的最后一个体素节点,则编码所述第i个非零子节点的重复点信息。If the first parameter is greater than the second parameter, and the i-th non-zero child node is not the last voxel node of the octree, then the duplicate point information of the i-th non-zero child node is encoded.
  55. 根据权利要求35所述的方法,其特征在于,所述确定当前节点对应的第一参数,包括:The method according to claim 35, characterized in that the determining the first parameter corresponding to the current node comprises:
    针对所述当前节点中的第i个非零子节点,确定所述第i个非零子节点对应的已编码重复点总数,所述i为正整数;For the i-th non-zero child node in the current node, determine the total number of encoded repeated points corresponding to the i-th non-zero child node, where i is a positive integer;
    将所述第i个非零子节点对应的已编码重复点总数,确定为所述第一参数。The total number of encoded repeated points corresponding to the i-th non-zero child node is determined as the first parameter.
  56. 根据权利要求55所述的方法,其特征在于,所述确定所述第i个非零子节点对应的已编码重复点总数,包括:The method according to claim 55, characterized in that the determining the total number of encoded repeated points corresponding to the i-th non-zero child node comprises:
    确定所述八叉树中位于所述第i个非零子节点之前的各非零子节点所包括的第一已编码重复点个数之和;Determine the sum of the numbers of first encoded repeated points included in each non-zero child node located before the i-th non-zero child node in the octree;
    基于所述第一已编码重复点个数之和,确定所述第i个非零子节点对应的已编码重复点总数。Based on the sum of the first numbers of encoded repeated points, the total number of encoded repeated points corresponding to the i-th non-zero child node is determined.
  57. 根据权利要求56所述的方法,其特征在于,若所述点云采用推断直接编码模式IDCM时,则所述基于所述第一已编码重复点个数之和,确定所述第i个非零子节点对应的已编码重复点总数,包括:The method according to claim 56, characterized in that if the point cloud adopts an inferred direct coding mode IDCM, then determining the total number of encoded repeated points corresponding to the i-th non-zero child node based on the sum of the first number of encoded repeated points includes:
    确定所述八叉树中采用IDCM的第一节点所包括的第二已编码重复点个数之和;Determine the sum of the number of second encoded repeated points included in the first node using IDCM in the octree;
    将所述第一已编码重复点个数之和、与所述第二已编码重复点个数之和进行相加,得到所述第i个非零子节点对应的已编码重复点总数。The sum of the first number of encoded repeated points and the sum of the second number of encoded repeated points are added to obtain the total number of encoded repeated points corresponding to the i-th non-zero child node.
  58. 根据权利要求56所述的方法,其特征在于,若所述点云未采用推断直接编码模式IDCM时,则所述基于所述第一已编码重复点个数之和,确定所述第i个非零子节点对应的已编码重复点总数,包括:The method according to claim 56, characterized in that, if the point cloud does not adopt the inferred direct coding mode IDCM, then determining the total number of encoded repeated points corresponding to the i-th non-zero child node based on the sum of the first number of encoded repeated points includes:
    将所述第一已编码重复点个数之和,确定为所述第i个非零子节点对应的已编码重复点总数。The sum of the first numbers of encoded repeated points is determined as the total number of encoded repeated points corresponding to the i-th non-zero child node.
  59. 根据权利要求55-58任一项所述的方法,其特征在于,所述基于所述第一参数,对所述当前节点进行几何编码,包括:The method according to any one of claims 55 to 58, characterized in that the step of geometrically encoding the current node based on the first parameter comprises:
    确定所述点云的重复点总数;Determining a total number of duplicate points of the point cloud;
    基于所述点云的重复点总数和所述第i个非零子节点对应的已编码重复点总数,确定是否编码所述第i个非零子节点的重复点信息。Based on the total number of repeated points in the point cloud and the total number of encoded repeated points corresponding to the i-th non-zero child node, it is determined whether to encode the repeated point information of the i-th non-zero child node.
  60. 根据权利要求59所述的方法,其特征在于,所述确定所述点云的重复点总数,包括:The method of claim 59, wherein determining the total number of duplicate points in the point cloud comprises:
    确定所述点云的总点数,以及所述八叉树的非零体素节点总数;Determine the total number of points in the point cloud and the total number of non-zero voxel nodes in the octree;
    将所述点云的总点数与所述八叉树的非零体素节点总数的差值,确定为所述点云的重复点总数。The difference between the total number of points of the point cloud and the total number of non-zero voxel nodes of the octree is determined as the total number of repeated points of the point cloud.
  61. 根据权利要求59所述的方法,其特征在于,所述基于所述点云的重复点总数和所述第i个非零子节点对应的已编码重复点总数,确定是否编码所述第i个非零子节点的重复点信息,包括:The method according to claim 59, characterized in that the determining whether to encode the duplicate point information of the i-th non-zero child node based on the total number of duplicate points in the point cloud and the total number of encoded duplicate points corresponding to the i-th non-zero child node comprises:
    若所述第i个非零子节点对应的已编码重复点总数等于所述点云的重复总点数,则跳过编码所述第i个非零子节点的重复点信息。If the total number of encoded repeated points corresponding to the i-th non-zero child node is equal to the total number of repeated points in the point cloud, then the encoding of the repeated point information of the i-th non-zero child node is skipped.
  62. 根据权利要求59所述的方法,其特征在于,所述基于所述点云的重复点总数和所述第i个非零子节点对应的已编码重复点总数,确定是否编码所述第i个非零子节点的重复点信息,包括:The method according to claim 59, characterized in that the determining whether to encode the duplicate point information of the i-th non-zero child node based on the total number of duplicate points in the point cloud and the total number of encoded duplicate points corresponding to the i-th non-zero child node comprises:
    若所述第i个非零子节点对应的已编码重复点总数小于所述点云的重复总点数,且所述第i个非零子节点是所述八叉树的最后一个体素节点,则跳过编码所述第i个非零子节点的重复点信息,且将所述点云的重复总点数与所述第i个非零子节点对应的已编码重复点总数的差值,确定为所述第i个非零子节点所包括的重复点个数。If the total number of encoded repeated points corresponding to the i-th non-zero child node is less than the total number of repeated points of the point cloud, and the i-th non-zero child node is the last voxel node of the octree, then the encoding of the repeated point information of the i-th non-zero child node is skipped, and the difference between the total number of repeated points of the point cloud and the total number of encoded repeated points corresponding to the i-th non-zero child node is determined as the number of repeated points included in the i-th non-zero child node.
  63. 根据权利要求59所述的方法,其特征在于,所述基于所述点云的重复点总数和所述第i个非零子节点对应的已编码重复点总数,确定是否编码所述第i个非零子节点的重复点信息,包括:The method according to claim 59, characterized in that the determining whether to encode the duplicate point information of the i-th non-zero child node based on the total number of duplicate points in the point cloud and the total number of encoded duplicate points corresponding to the i-th non-zero child node comprises:
    若所述第i个非零子节点对应的已编码重复点总数小于所述点云的重复总点数,且所述第i个非零子节点不是所述八叉树的最后一个体素节点,则编码所述第i个非零子节点的重复点信息。If the total number of encoded duplicate points corresponding to the i-th non-zero child node is less than the total number of duplicate points in the point cloud, and the i-th non-zero child node is not the last voxel node of the octree, the duplicate point information of the i-th non-zero child node is encoded.
  64. 根据权利要求35-47任一项所述的方法,其特征在于,所述重复点信息包括重复点个数。The method according to any one of claims 35-47 is characterized in that the repeated point information includes the number of repeated points.
  65. 根据权利要求36或60所述的方法,其特征在于,所述方法还包括:The method according to claim 36 or 60, characterized in that the method further comprises:
    将所述点云的总点数,写入所述点云的几何码流中。The total number of points of the point cloud is written into the geometric code stream of the point cloud.
  66. 根据权利要求65所述的方法,其特征在于,所述将所述点云的总点数,写入所述点云的几何码流中,包括:The method according to claim 65, characterized in that writing the total number of points of the point cloud into the geometric code stream of the point cloud comprises:
    将所述点云的总点数,写入所述点云的几何数据单元中。The total number of points of the point cloud is written into the geometric data unit of the point cloud.
  67. 根据权利要求65所述的方法,其特征在于,所述将所述点云的总点数,写入所述点云的几何数据单元中,包括:The method according to claim 65, characterized in that writing the total number of points of the point cloud into the geometric data unit of the point cloud comprises:
    将所述点云的总点数减一,得到第一值;Subtract one from the total number of points in the point cloud to obtain a first value;
    将所述第一值写入所述几何数据单元中。The first value is written into the geometry data unit.
  68. 一种点云解码装置,其特征在于,包括:A point cloud decoding device, characterized by comprising:
    确定单元,用于确定当前节点对应的第一参数,所述第一参数用于确定是否解码所述当前节点对应的重复点信息,所述当前节点为所述点云的八叉树中的一个非零节点;A determination unit, configured to determine a first parameter corresponding to a current node, wherein the first parameter is used to determine whether to decode duplicate point information corresponding to the current node, wherein the current node is a non-zero node in the octree of the point cloud;
    解码单元,用于基于所述第一参数,对所述当前节点进行几何解码。A decoding unit is used to perform geometric decoding on the current node based on the first parameter.
  69. 一种点云编码装置,其特征在于,包括:A point cloud encoding device, characterized in that it comprises:
    确定单元,用于确定当前节点对应的第一参数,所述第一参数用于确定是否编码所述当前节点对应的重复点信息,所述当前节点为所述点云的八叉树中的一个非零节点;A determination unit, configured to determine a first parameter corresponding to a current node, wherein the first parameter is used to determine whether to encode duplicate point information corresponding to the current node, wherein the current node is a non-zero node in the octree of the point cloud;
    编码单元,用于基于所述第一参数,对所述当前节点进行几何编码。A coding unit, configured to perform geometric coding on the current node based on the first parameter.
  70. 一种电子设备,其特征在于,包括:处理器和存储器;An electronic device, characterized in that it comprises: a processor and a memory;
    所述存储器用于存储计算机程序;The memory is used to store computer programs;
    所述处理器用于调用并运行所述存储器中存储的计算机程序,以执行如权利要求1至34或35-67任一项所述的方法。The processor is used to call and run the computer program stored in the memory to execute the method according to any one of claims 1 to 34 or 35-67.
  71. 一种计算机可读存储介质,其特征在于,用于存储计算机程序,所述计算机程序使得计算机执行如权利要求1至34或35-67任一项所述的方法。A computer-readable storage medium, characterized in that it is used to store a computer program, wherein the computer program enables a computer to execute the method according to any one of claims 1 to 34 or 35-67.
PCT/CN2022/122113 2022-09-28 2022-09-28 Point cloud encoding and decoding method and apparatus, device, and storage medium WO2024065269A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2022/122113 WO2024065269A1 (en) 2022-09-28 2022-09-28 Point cloud encoding and decoding method and apparatus, device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2022/122113 WO2024065269A1 (en) 2022-09-28 2022-09-28 Point cloud encoding and decoding method and apparatus, device, and storage medium

Publications (1)

Publication Number Publication Date
WO2024065269A1 true WO2024065269A1 (en) 2024-04-04

Family

ID=90475267

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/122113 WO2024065269A1 (en) 2022-09-28 2022-09-28 Point cloud encoding and decoding method and apparatus, device, and storage medium

Country Status (1)

Country Link
WO (1) WO2024065269A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113632142A (en) * 2019-07-02 2021-11-09 腾讯美国有限责任公司 Method and device for point cloud compression
WO2021243519A1 (en) * 2020-06-01 2021-12-09 深圳市大疆创新科技有限公司 Point cloud encoding and decoding method and apparatus
CN114051730A (en) * 2019-07-01 2022-02-15 Lg 电子株式会社 Apparatus and method for processing point cloud data
CN114402532A (en) * 2019-09-30 2022-04-26 Oppo广东移动通信有限公司 Method for predicting occupancy information, encoder, decoder, and storage medium
CN114913253A (en) * 2021-02-08 2022-08-16 西安电子科技大学 Adaptive point cloud geometric coding and decoding method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114051730A (en) * 2019-07-01 2022-02-15 Lg 电子株式会社 Apparatus and method for processing point cloud data
CN113632142A (en) * 2019-07-02 2021-11-09 腾讯美国有限责任公司 Method and device for point cloud compression
CN114402532A (en) * 2019-09-30 2022-04-26 Oppo广东移动通信有限公司 Method for predicting occupancy information, encoder, decoder, and storage medium
WO2021243519A1 (en) * 2020-06-01 2021-12-09 深圳市大疆创新科技有限公司 Point cloud encoding and decoding method and apparatus
CN114913253A (en) * 2021-02-08 2022-08-16 西安电子科技大学 Adaptive point cloud geometric coding and decoding method and device

Similar Documents

Publication Publication Date Title
CN114930858A (en) High level syntax for geometry-based point cloud compression
CN115769262A (en) Attribute parameter transcoding for geometry-based point cloud compression
US11601488B2 (en) Device and method for transmitting point cloud data, device and method for processing point cloud data
US11657543B2 (en) Trisoup syntax signaling for geometry-based point cloud compression
US11910017B2 (en) Method for predicting point cloud attribute, encoder, decoder, and storage medium
WO2024065269A1 (en) Point cloud encoding and decoding method and apparatus, device, and storage medium
WO2024065272A1 (en) Point cloud coding method and apparatus, point cloud decoding method and apparatus, and device and storage medium
WO2024065271A1 (en) Point cloud encoding/decoding method and apparatus, and device and storage medium
WO2024065270A1 (en) Point cloud encoding method and apparatus, point cloud decoding method and apparatus, devices, and storage medium
WO2023024840A1 (en) Point cloud encoding and decoding methods, encoder, decoder and storage medium
WO2023024842A1 (en) Point cloud encoding/decoding method, apparatus and device, and storage medium
WO2024065406A1 (en) Encoding and decoding methods, bit stream, encoder, decoder, and storage medium
WO2022188582A1 (en) Method and apparatus for selecting neighbor point in point cloud, and codec
WO2022257145A1 (en) Point cloud attribute prediction method and apparatus, and codec
WO2022257150A1 (en) Point cloud encoding and decoding methods and apparatus, point cloud codec, and storage medium
US20240087174A1 (en) Coding and decoding point cloud attribute information
US20230082456A1 (en) Point cloud attribute prediction method and apparatus, and related device
WO2024011381A1 (en) Point cloud encoding method and apparatus, point cloud decoding method and apparatus, device and storage medium
WO2024026712A1 (en) Point cloud coding method and apparatus, point cloud decoding method and apparatus, and device and storage medium
CN117354496A (en) Point cloud encoding and decoding method, device, equipment and storage medium
CN115733990A (en) Point cloud coding and decoding method, device and storage medium
CN116866615A (en) Point cloud coding method and equipment
CN116248893A (en) Point cloud coding method, device, equipment and storage medium based on predictive tree

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: 22959916

Country of ref document: EP

Kind code of ref document: A1