WO2024065272A1 - Point cloud coding method and apparatus, point cloud decoding method and apparatus, and device and storage medium - Google Patents

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

Info

Publication number
WO2024065272A1
WO2024065272A1 PCT/CN2022/122117 CN2022122117W WO2024065272A1 WO 2024065272 A1 WO2024065272 A1 WO 2024065272A1 CN 2022122117 W CN2022122117 W CN 2022122117W WO 2024065272 A1 WO2024065272 A1 WO 2024065272A1
Authority
WO
WIPO (PCT)
Prior art keywords
node
zero
points
point cloud
child node
Prior art date
Application number
PCT/CN2022/122117
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/122117 priority Critical patent/WO2024065272A1/en
Publication of WO2024065272A1 publication Critical patent/WO2024065272A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/136Incoming video signal characteristics or properties

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 Audio Video Standard (AVS) of point clouds, 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.
  • AVS Audio Video Standard
  • the embodiments of the present application provide a point cloud encoding and decoding method, apparatus, device and storage medium, which reduce the complexity of point cloud encoding and decoding, save encoding and decoding time, and thus improve the encoding and decoding efficiency of point cloud.
  • an embodiment of the present application provides a point cloud decoding method, comprising:
  • a first parameter corresponding to a current node where the first parameter is used to determine whether at least one non-zero child node of the current node includes a duplicate point, where the current node is a non-zero node in the N-1th layer of an octree of the point cloud, where the octree is obtained by node division of the point cloud, where N is the total number of layers of the octree, and where N is a positive integer greater than 1;
  • geometric decoding is performed on the current node.
  • the present application provides a point cloud encoding method, comprising:
  • a first parameter corresponding to a current node where the first parameter is used to determine whether at least one child node of the current node includes a duplicate point, where the current node is a node in the N-1th layer of an octree of the point cloud, where the octree is obtained by node division of the point cloud, where N is the total number of layers of the octree, and where N is a positive integer greater than 1;
  • 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.
  • point cloud decoding for example, in point cloud decoding based on AVS
  • 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
  • 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.
  • 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.
  • FIG5 is a schematic diagram of a point cloud decoding method flow chart provided by an embodiment of the present application.
  • FIG6 is a schematic diagram of an octree partition
  • FIG7 is a schematic diagram of an octree and a prediction tree 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.
  • 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.
  • 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 use the geometry point cloud compression (G-PCC) codec framework or the video point cloud compression (V-PCC) codec framework provided by the Moving Picture Experts Group (MPEG) of the International Standards Organization, or the AVS-PCC codec framework provided by the Audio Video Standard (AVS).
  • G-PCC geometry point cloud compression
  • V-PCC video point cloud compression
  • MPEG Moving Picture Experts Group
  • AVS-PCC codec framework provided by the Audio Video Standard (AVS).
  • G-PCC and AVS-PCC are aimed at static sparse point clouds, and their coding frameworks are roughly the same.
  • the following uses the AVS-PCC 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 process of position encoding includes: preprocessing the points in the point cloud, such as coordinate transformation, quantization, and removal of duplicate points; then, geometric encoding the preprocessed point cloud, such as constructing an octree, and geometric encoding based on the constructed octree to form a geometric code stream. At the same time, based on the position information output by the constructed octree, 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 two prediction modes to predict the point cloud attributes, quantizing the predicted results, and performing arithmetic coding to form an attribute code stream.
  • position encoding can be achieved by the following units:
  • the coordinate translation and coordinate quantization unit 201 can be used to transform the world coordinates of points 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 to achieve the conversion of the coordinates of the points in the point cloud from world coordinates to relative coordinates.
  • it will be decided whether to divide the entire point cloud sequence into multiple slices (point cloud slices) based on the parameter configuration, and each divided slice will be treated as a single independent point cloud serial processing. Next, the point cloud is quantized and duplicate points are removed.
  • the number of coordinates can be reduced by quantization; after quantization, originally different points may be assigned the same coordinates, based on which, duplicate points can be deleted by deduplication operations; for example, multiple clouds with the same quantized position and different attribute information can be merged into one cloud through attribute conversion.
  • quantization and removal of duplicate points are optional steps.
  • quantization and removal of duplicate points are also referred to as voxelization.
  • the octree construction unit 202 can use the octree encoding method to encode the position information of the quantized points.
  • the point cloud is contained in a bounding box
  • the bounding box of the point cloud is divided in the form of an octree
  • the placeholder code of each node is encoded.
  • the bounding box is divided into sub-cubes in sequence, and the non-empty (including the points in the point cloud) sub-cubes are continued to be divided until the leaf node obtained by the division is a 1x1x1 unit cube.
  • the division is stopped.
  • 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 for geometric encoding.
  • the octree reconstruction unit 203 can perform position reconstruction based on the position information output by the octree construction unit 202 to obtain the reconstruction value of the position information of each point in the point cloud data.
  • the placeholder code of each node is obtained by continuous parsing in the order of breadth-first traversal, and the nodes are continuously divided in turn until the division is stopped when a 1x1x1 unit cube is obtained, and the number of points contained in each leaf node is obtained by parsing, and finally the geometric reconstruction value of the point cloud is restored.
  • the first entropy coding unit 204 can use entropy coding to perform arithmetical coding on the position information output by the octree analysis unit 203 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:
  • a spatial conversion unit 210 a property difference unit 211 , a property prediction unit 212 , a property transformation unit 213 , a quantization unit 214 and a second entropy coding unit 214 .
  • point cloud encoder 200 may include more, fewer or different functional components than those shown in FIG. 4A .
  • the space conversion unit 210 can be used to convert the RGB color space of the point in the point cloud into a YUV color space or other formats. At present, attribute encoding is mainly performed on color and reflectivity information. First, it is determined whether to perform color space conversion. If color space conversion is performed, the space conversion unit 210 converts the color information from the RGB color space to the YUV color space.
  • the attribute difference unit 211 also called a recoloring unit, uses the reconstructed geometric information to recolor the color information so that the uncoded attribute information corresponds to the reconstructed geometric information.
  • the attribute prediction unit 212 is used to reorder the point cloud and then perform differential prediction.
  • Hilbert reordering is performed for the cat1A sequence and the cat2 sequence; for the cat1B sequence and the cat3 sequence, Morton reordering is performed.
  • the attribute of the sorted point cloud is predicted using a differential method, and the attribute residual of the point is obtained based on the attribute prediction of the point and the original value of the attribute.
  • the quantization unit 214 quantizes the attribute residual of the point to obtain the quantized attribute residual.
  • the second entropy coding unit 215 performs entropy coding on the attribute residual quantized by the quantization unit 214 to obtain a binary attribute code stream.
  • the attribute transformation unit 213 is used to perform wavelet transformation on the point cloud attributes to obtain transformation coefficients.
  • the quantization unit 214 quantizes the transformation coefficients to obtain quantized transformation coefficients.
  • the attribute transformation unit 213 performs inverse quantization and inverse wavelet transformation on the quantized transformation coefficients to obtain attribute reconstruction values.
  • the attribute transformation unit 213 calculates the difference between the original attribute of the point and the attribute reconstruction value of the point to obtain the attribute residual of the point.
  • the quantization unit 214 quantizes the attribute residual of the point to obtain the quantized attribute residual of the point.
  • the second entropy coding unit 215 performs entropy coding on the attribute residual quantized by the quantization unit 214 and the quantized transformation coefficient to obtain a binary attribute code stream.
  • 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's position information; performing coordinate transformation on the reconstructed information of the point's position information to obtain the point's position information.
  • the point's position information can also be called the point's geometric information.
  • 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 attribute prediction compensation and attribute inverse transformation to perform point cloud processing 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:
  • the first entropy decoding unit 301 may decode the geometric code stream by using an entropy decoding method to obtain the placeholder information of each node in the octree.
  • the octree reconstruction unit 301 reconstructs the octree based on the placeholder information of each node in the octree decoded by the first entropy decoding unit 301.
  • the placeholder code of each node is obtained by continuous parsing in the order of breadth-first traversal, and the nodes are continuously divided in turn until a 1x1x1 unit cube is obtained, and the division is stopped when the division obtains the number of points contained in each leaf node, and finally the geometric reconstruction value of the point cloud is restored.
  • the inverse coordinate quantization and inverse coordinate translation unit 303 performs inverse coordinate translation and inverse quantization operations on the geometric reconstruction value of the point cloud reconstructed by the octree reconstruction unit 302 to obtain the geometric reconstruction value of the midpoint of the point cloud in the world coordinate.
  • Attribute encoding can be achieved through the following units:
  • the second entropy decoding unit 310 decodes the attribute code stream to obtain the quantized attribute residual, and the inverse quantization unit 313 inversely quantizes the quantized attribute residual to obtain the attribute residual value.
  • the attribute prediction compensation unit 312 obtains the attribute prediction value of the point in the point cloud based on the reconstructed geometric information of the point cloud, and then adds the attribute prediction value to the attribute residual value to obtain the attribute reconstruction value of the point.
  • the inverse space conversion unit 314 performs color space inverse conversion on the attribute reconstruction value of the point, for example, from the YUV color space to the RGB color space, to obtain the reconstructed attribute information of the point cloud.
  • the second entropy decoding unit 310 decodes the attribute code stream to obtain the quantized attribute residual and the quantized transformation coefficient.
  • the inverse quantization unit 313 inversely quantizes the quantized attribute residual and the quantized transformation coefficient to obtain the attribute residual and the transformation coefficient of the point.
  • the attribute inverse transformation unit 313 performs an inverse wavelet transform on the transformation coefficient of the point in the point cloud based on the reconstructed geometric information of the point cloud to obtain the attribute reconstruction value of the point in the point cloud, and then adds the attribute reconstruction value to the attribute residual value to obtain the reconstructed attribute value of the point.
  • the inverse space conversion unit 314 performs an inverse color space conversion on the reconstructed attribute value of the point, for example, from the YUV color space to the RGB color space, to obtain the reconstructed attribute information of the point cloud.
  • 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. 4B.
  • 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.
  • the universal test sequence includes five categories, namely Cat1A, Cat1B, Cat1C, Cat2-frame and Cat3, wherein Cat1A and Cat2-frame point clouds only contain reflectivity attribute information, Cat1B and Cat3 point clouds only contain color attribute information, and Cat1B point cloud contains both color and reflectivity attribute information.
  • point cloud attribute compression methods include but are not limited to the following:
  • the first one is that attribute compression adopts an intra-frame prediction-based method.
  • the points in the point cloud are processed in a certain order, such as the original acquisition order of the point cloud, the Morton order, the Hilbert order, etc., and the prediction algorithm is first used to obtain the attribute prediction value, and the attribute residual is obtained according to the attribute value and the attribute prediction value. Then, the attribute residual is quantized to generate a quantized residual, and finally the quantized residual is encoded.
  • a certain order such as the original acquisition order of the point cloud, the Morton order, the Hilbert order, etc.
  • the points in the point cloud are processed in a certain order, such as the original acquisition order of the point cloud, the Morton order, the Hilbert order, etc., and the prediction algorithm is first used to obtain the attribute prediction value. Then, the decoding obtains the quantized residual, and then the quantized residual is dequantized. Finally, the attribute reconstruction value is obtained based on the attribute prediction value and the dequantized residual.
  • the second is a resource-constrained attribute compression method based on intra-frame prediction and DCT transform.
  • this method when encoding the quantized transform coefficients, there is a limit of a maximum number of points X (such as 4096), that is, at most every X points are encoded as a group.
  • the points in the point cloud are processed in a certain order, such as the original acquisition order of the point cloud, the Morton order, the Hilbert order, etc., and the entire point cloud is first divided into a number of small groups with a maximum length of Y (such as 2), and then the small groups are combined into a number of large groups (the number of points in each large group does not exceed X, such as 4096). Then, the prediction algorithm is used to obtain the attribute prediction value, and the attribute residual is obtained according to the attribute value and the attribute prediction value. The attribute residual is subjected to DCT transformation in small groups to generate transformation coefficients, and then the transformation coefficients are quantized to generate quantized transformation coefficients, and finally the quantized transformation coefficients are encoded in large groups.
  • the points in the point cloud are processed in a certain order, such as the original acquisition order of the point cloud, the Morton order, the Hilbert order, etc.
  • the entire point cloud is divided into several small groups with a maximum length of Y (such as 2), and then these small groups are combined into several large groups (the number of points in each large group does not exceed X, such as 4096), and the quantized transformation coefficients are decoded in large groups.
  • the prediction algorithm is used to obtain the attribute prediction value, and then the quantized transformation coefficients are dequantized and inversely transformed in small groups.
  • the attribute reconstruction value is obtained based on the attribute prediction value and the dequantized and inversely transformed coefficients.
  • the third is a resource-infinite attribute compression method based on intra-frame prediction and DCT transformation.
  • this method when encoding the quantized transformation coefficients, there is no limit on the maximum number of points X, that is, all coefficients are encoded together.
  • the points in the point cloud are processed in a certain order, such as the original acquisition order of the point cloud, the Morton order, the Hilbert order, etc., and the entire point cloud is first divided into a number of small groups with a maximum length of Y (such as 2). Then, a prediction algorithm is used to obtain attribute prediction values, and attribute residuals are obtained according to the attribute values and the attribute prediction values. The attribute residuals are subjected to DCT transformation in small groups to generate transformation coefficients, and then the transformation coefficients are quantized to generate quantized transformation coefficients. Finally, the quantized transformation coefficients of the entire point cloud are encoded.
  • a prediction algorithm is used to obtain attribute prediction values, and attribute residuals are obtained according to the attribute values and the attribute prediction values.
  • the attribute residuals are subjected to DCT transformation in small groups to generate transformation coefficients, and then the transformation coefficients are quantized to generate quantized transformation coefficients.
  • the quantized transformation coefficients of the entire point cloud are encoded.
  • the points in the point cloud are processed in a certain order, such as the original acquisition order of the point cloud, the Morton order, the Hilbert order, etc.
  • the entire point cloud is first divided into several small groups with a maximum length of Y (such as 2), and the quantized transformation coefficients of the entire point cloud are obtained by decoding.
  • the prediction algorithm is used to obtain the attribute prediction value, and the quantized transformation coefficients are dequantized and inversely transformed in small groups.
  • the attribute reconstruction value is obtained based on the attribute prediction value and the dequantized and inversely transformed coefficients.
  • the fourth one is that attribute compression adopts a method based on multi-layer wavelet transform.
  • a multi-layer wavelet transform is performed on the entire point cloud to generate transform coefficients, and then the transform coefficients are quantized to generate quantized transform coefficients, and finally the quantized transform coefficients of the entire point cloud are encoded.
  • decoding obtains the quantized transform coefficients of the entire point cloud, and then dequantizes and inversely transforms the quantized transform coefficients to obtain attribute reconstruction values.
  • 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.
  • 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.
  • 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. 5 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. 4B.
  • the point cloud decoding method of the embodiment of the present application includes:
  • 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 in the N-1th layer of the octree of the point cloud.
  • the octree is obtained by node division of the point cloud.
  • N is the total number of layers of the octree, and N is a positive integer greater than 1.
  • the point cloud decoding method proposed in the embodiment of the present application can be applied to a variety of point cloud decoding scenarios.
  • the point cloud decoding method of the embodiment of the present application is applied to AVS, the above octree is obtained by dividing the point cloud into nodes based on the AVS method.
  • the point cloud of the embodiment of the present application can be understood as a point cloud block or point cloud slice that can be decoded individually.
  • the point cloud in the embodiment of the present application is the entire point cloud sequence that has not been divided.
  • the point cloud of the embodiment of the present application can be understood as a point cloud slice in at least one slice into which the entire point cloud sequence is divided.
  • 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 octree coding method. For example, as shown in Figure 6, the point cloud is surrounded by the smallest cuboid, and the bounding box is first divided into octrees to obtain 8 nodes. The occupied nodes among these 8 nodes, that is, the nodes including the points, continue to be divided into octrees, and so on, until they are divided into voxel-level positions, for example, into 1X1X1 cubes.
  • the point cloud octree structure obtained by such division includes multiple layers of nodes, for example, including 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 coding, 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 realized.
  • 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 coding end can use prediction tree coding while using octree coding, that is, the prediction tree coding algorithm is turned off.
  • the octree is first used to perform octree division on the bounding box of the point cloud, and the division is divided to a preset depth. For example, after division to 3 layers, for each non-zero node obtained by the division, it is determined whether the node is encoded by prediction tree or octree. If it is determined that the node is encoded by prediction tree, the prediction tree coding method is used to perform prediction tree coding on the geometric information of the points included in the node.
  • the points included in the node are sorted, and the preset prediction tree coding method is used to construct a prediction tree for the sorted points, such as constructing an L3C2 single chain. Then, based on the structure of the prediction tree, each node in the prediction tree is traversed, and 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, prediction tree structure and quantization parameter of the prediction tree node position information are encoded.
  • the octree partitioning method is used to divide the node until it is divided into leaf nodes at the voxel level, and the occupancy information of each node in the octree is encoded to form a geometric code stream.
  • the gray nodes in Figure 7 are non-empty nodes.
  • the encoding end indicates that the node is encoded using the prediction tree encoding method through a parameter.
  • the parameter may be a first flag
  • the encoding end indicates that the node is encoded using the prediction tree encoding method by setting the first flag to true, for example, setting the first flag to 1.
  • the decoding end determines that the node is encoded using the prediction tree encoding method by decoding the first flag, and correspondingly, performs geometric decoding on the node using the prediction tree decoding method to obtain the geometric reconstruction values of the points included in the node.
  • the decoding end decodes the geometric code stream of the point cloud, obtains the placeholder information of the nodes in the octree, and reconstructs the octree based on the placeholder information.
  • the decoding end uses the prediction tree decoding method to perform geometric decoding on the node and obtains the geometric reconstruction value of the point included in the node. If it is determined that the node adopts octree coding, the octree is reconstructed on the node based on the placeholder information of the node until the leaf node at the voxel level.
  • 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 (i.e., the second to last 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, or an occupied node.
  • 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 encoder writes the total number of points of the point cloud into the geometry brick header (gbh) of the point cloud. In this way, the decoder obtains the total number of points of the point cloud by decoding the geometry brick header of the point cloud.
  • the encoder divides the number of points in the point cloud into the low-order part num_points_lower of the number of points contained in the slice and the high-order part num_points_upper of the number of points contained in the slice, and writes num_points_lower and num_points_upper into the geometry unit header.
  • the decoder decodes the geometry unit header to obtain num_points_lower and num_points_upper, and then adds num_points_upper and um_points_lower to obtain the total number of points in the point cloud.
  • the parameters of the geometry unit head are specifically shown in Table 2:
  • num_points_upper and num_points_lower are used to specify the total number of points in the point cloud.
  • the decoding end obtains the total number of points of the point cloud by decoding num_points_upper and num_points_lower shown in Table 2.
  • num_points_upper an unsigned integer
  • num_points_lower an unsigned integer
  • the decoder determines the total number of points in the point cloud based on the following formula (1):
  • num_points ((num_points_upper ⁇ 16)+num_points_lower) (1)
  • num_points is the total number of points in the point cloud.
  • the embodiment of the present application does not limit the method for 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
  • num_points 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 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 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 taken as an example for explanation.
  • 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 first decoded points corresponding to the i-th non-zero child node in the point cloud.
  • the decoding end determines the second parameter corresponding to the i-th non-zero subnode by determining the first number of decoded points corresponding to the i-th non-zero subnode in the point cloud and based on the first number of decoded points corresponding to the i-th non-zero subnode in the point cloud. For example, the first number of decoded points corresponding to the i-th non-zero subnode in the point cloud is determined as the second parameter corresponding to the i-th non-zero subnode.
  • the first number of decoded points corresponding to the i-th non-zero child node can be understood as the total number of points currently decoded by the decoding end when determining whether to decode the repeated point information of the i-th non-zero child node of the current node.
  • the decoding end starts a counter during decoding, and the counter is used to record the number of decoded points in real time, so that when decoding the i-th non-zero child node, the first decoded point number corresponding to the i-th non-zero child node can be obtained from the counter.
  • the decoding end when decoding the i-th non-zero child node, determines the number of first decoded points corresponding to the i-th non-zero child node through the following steps:
  • S102-A11-2 Determine the number of first decoded points based on the number of third decoded points.
  • the third decoded point can be understood as a decoded point in the leaf node of the octree.
  • the decoding end determines the number of first decoded points corresponding to the i-th non-zero child node by determining the number of points included in the decoded leaf node before the i-th non-zero child node.
  • the implementation methods for determining the number of the third decoded points corresponding to the i-th non-zero child node in the above S102-A11-1 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-1 includes the following steps S102-A11-1-a1 and S102-A11-1-a2:
  • S102-A11-1-a determine the number of non-zero child nodes of the current node
  • S102-A11-1-a2 Determine the number of third decoded points corresponding to the i-th non-zero child node based on 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 third 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 third 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 methods for determining the number of third 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-1-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 third 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 of the current node that are located before the i-th non-zero child 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 third 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 third 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 of the current node that are located before the i-th non-zero child 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 third 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 the third decoded points corresponding to the i-th non-zero child node in the current node through the following instructions:
  • codedCount is the number of the third 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-1 includes the following steps S102-A11-1-b1 to S102-A11-1-b3:
  • S102-A11-1-b1 determine the number of decoded points corresponding to each non-zero node before the current node in the N-1th layer;
  • S102-A11-1-b2 determine 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 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 of a non-zero node and the number of second repeated points included in the non-zero child nodes of the non-zero node for a 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 second 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 third 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 third 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-1-b3 includes the following steps S102-A11-1-b31 and S102-A11-1-b32:
  • S102-A11-1-b32 Determine the number of third 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 third 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 third number of decoded points corresponding to the i-th non-zero child node.
  • the implementation method of determining the number of third 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 in the above S102-A11-1-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 third 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 third 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 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 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 value 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 third 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 third 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-2 After determining the third number of decoded points corresponding to the i-th non-zero child node based on the above steps, execute step S102-A11-2 to determine the first number of decoded points based on the third number of decoded points.
  • DCM Direct Coding Model
  • IDCM Inter Direct Coding Model
  • the point cloud when the point cloud adopts IDCM and does not adopt IDCM, it has an impact on the number of first decoded points corresponding to the i-th non-zero child node in the point cloud.
  • the following describes the impact process of the number of first decoded points corresponding to the i-th non-zero child node when the point cloud adopts DCM and does not adopt IDCM.
  • the third number of decoded points corresponding to the i-th non-zero child node is determined as the first number of decoded points 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 does not use direct encoding. Therefore, when decoding the current node, the octree does not include other first decoded points except the third decoded point corresponding to the i-th non-zero child node determined above.
  • the first decoded point can be understood as a point whose geometric position has been decoded in the leaf node of the octree. At this time, the number of the third decoded points corresponding to the i-th non-zero child node determined above is directly determined as the number of the first decoded points corresponding to the i-th non-zero child node.
  • the point cloud adopts IDCM
  • the number of points included in the second node using IDCM that has been decoded in the octree is determined; the number of points included in the second node using IDCM and the third number of decoded points corresponding to the i-th non-zero child node determined above are added to obtain a new first number of decoded points corresponding to the i-th non-zero child node.
  • the point cloud adopts IDCM, that is, IDCM is turned on, then it means that at least one node in the octree of the point cloud may adopt 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.
  • it is necessary to add the number of points included in the decoded node (i.e., the second node) using IDCM in the octree to the number of the third decoded points corresponding to the i-th non-zero child node determined above.
  • the decoding end determines the second parameter corresponding to the i-th non-zero child node through the following instruction:
  • pointCountIDCM represents the number of points included in the decoded 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 third number of decoded points codedCount corresponding to the i-th non-zero child node, the number of points pointCountIDCM included in the decoded node using IDCM in the octree is added to codedCount to obtain the first number of decoded points corresponding to the i-th non-zero child node.
  • step S102-A12 After the decoding end determines the number of first 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 first 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 first 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 first 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 that have been decoded at the geometric position in the point cloud when decoding the i-th non-zero child node.
  • octree in AVS geometric coding, octree can be used for coding, and octree and prediction tree can be combined for coding.
  • the method of determining the second parameter corresponding to the i-th non-zero subnode based on the number of first decoded points corresponding to the i-th non-zero subnode in the point cloud is different.
  • the specific process of determining the second parameter corresponding to the i-th non-zero subnode when the point cloud adopts prediction tree coding and when the prediction tree coding is not adopted is introduced below.
  • determining the second parameter corresponding to the i-th non-zero sub-node includes at least the following methods:
  • Method 1 The number of first decoded points is determined as the second parameter.
  • the point cloud adopts the prediction tree coding method, that is, the prediction tree coding method is turned off, then, among the decoded points corresponding to the i-th non-zero child node in the point cloud, except for the first decoded point corresponding to the i-th non-zero child node determined in the above embodiment, no other decoded points are included.
  • the number of the first decoded points corresponding to the i-th non-zero child node is determined, and the number of the first 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 above S102-A12 includes the following steps S102-A121 and S102-A122:
  • S102-A122 Determine the sum of the first number of decoded points and the second number of decoded points as a second parameter.
  • the point cloud adopts the prediction tree coding method, that is, the prediction tree coding method is turned on, at this time, it means that there may be at least one node in the octree of the point cloud that adopts the prediction tree coding method, and the points included in the node are encoded using the prediction tree coding method.
  • the prediction tree coding method is adopted for the first node of the third layer in the point cloud octree, for example, the points included in the node are sorted, and the preset prediction tree coding method is adopted to construct a prediction tree for the sorted points, for example, an L3C2 single chain is constructed.
  • each node in the prediction tree is traversed, and 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 and encoded using the quantization parameter to form a geometric code stream.
  • the decoding end uses the prediction tree decoding method to geometrically decode the node to obtain the geometric reconstruction value of the point included in the node. That is to say, in the embodiment of the present application, since the octree is traversed by the breadth-first principle, the position of the node encoded by the prediction tree in the octree is before the current node, that is, when decoding the current node, the node encoded by the prediction tree has been decoded.
  • the second parameter corresponding to the i-th non-zero child node of the current node it is necessary not only to determine the first number of decoded points corresponding to the above-mentioned i-th non-zero child node, but also to determine the number of decoded points included in the first node encoded by the prediction tree in the octree.
  • the number of decoded points included in the first node encoded by the prediction tree is recorded as the second number of decoded points.
  • the first number of decoded points corresponding to the i-th non-zero child node is added to the second number of decoded points included in the first node encoded by the prediction tree in the octree, and the result of the addition is determined as the second parameter corresponding to the i-th non-zero child node.
  • the decoder determines the second parameter corresponding to the i-th non-zero child node through the following instruction:
  • pointCountPred represents the number of points included in the decoded first node encoded by the prediction tree in the octree, that is, the second number of decoded points.
  • the second number of decoded points pointCountIDCM 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 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 point cloud does not use prediction tree encoding
  • the first 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 first 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 point cloud does not use prediction tree encoding
  • the first number of decoded 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 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 third number of decoded repeated points.
  • the decoded point is recorded as the third 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 third 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 third number of decoded repeated points in the above S101-B12 include at least the following two methods:
  • Method 1 If the point cloud adopts the prediction tree encoding method, the sum of the fourth number of decoded repeated points included in the first node in the octree that adopts the prediction tree encoding method is determined; based on the sum of the third number of decoded repeated points and the sum of the fourth number of decoded repeated points, the total number of decoded repeated points corresponding to the i-th non-zero child node is determined.
  • the decoding end completes the node in the octree that adopts the predictive tree coding method before decoding the current node.
  • the sum of the fourth number of decoded repeated points included in the first node in the octree that adopts the predictive tree coding method can be obtained, and then based on the sum of the third number of decoded repeated points and the sum of the fourth number of decoded repeated points, the total number of decoded repeated points corresponding to the i-th non-zero child node is determined.
  • the sum of the third number of decoded duplicate points and the sum of the fourth number of decoded duplicate points are used to determine 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 determined based on the sum of the third number of decoded duplicate points and the sum of the fourth number of decoded duplicate points, including: determining the sum of the fifth number of decoded duplicate points included in the second node using IDCM in the octree; and determining the total number of decoded duplicate points corresponding to the i-th non-zero child node by adding the sum of the third number of decoded duplicate points, the sum of the fourth number of decoded duplicate points, and the sum of the fifth number of decoded duplicate points.
  • Method 2 If the point cloud does not adopt the prediction tree encoding method, the total number of decoded repeated points corresponding to the i-th non-zero child node is determined based on the sum of the third number of decoded repeated points.
  • the total number of decoded repeated points corresponding to the i-th non-zero child node is determined based on the sum of the third number of decoded repeated points.
  • method 2 if the point cloud does not use the prediction tree encoding method and uses the IDCM encoding method, then the sum of the fifth decoded duplicate points included in the second node using IDCM in the octree is determined, and the sum of the fifth decoded duplicate points is added to the sum of the third decoded duplicate points to obtain the total number of decoded duplicate points corresponding to the i-th non-zero child node.
  • the total number of decoded repeated points corresponding to the i-th non-zero child node is determined, the total number of decoded repeated points corresponding to the i-th non-zero child node is determined as 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, 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, 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 point cloud decoding method provided by the embodiment of the present application, in point cloud decoding, for example, in point cloud decoding based on AVS, 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, the current node is geometrically 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 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 at least one non-zero child node of the current node includes duplicate points.
  • the current node is a non-zero node in the N-1th layer of the octree of the point cloud.
  • the octree is obtained based on node division of the point cloud.
  • N is the total number of layers of the octree, and N is a positive integer greater than 1.
  • the point cloud coding method proposed in the embodiment of the present application can be applied to a variety of point cloud coding scenarios.
  • the above octree is obtained by dividing the point cloud into nodes based on the AVS method.
  • the point cloud of the embodiment of the present application can be understood as a point cloud block or point cloud slice that can be encoded individually.
  • the point cloud in the embodiment of the present application is the entire point cloud sequence that has not been divided.
  • the point cloud of the embodiment of the present application can be understood as a point cloud slice in at least one slice into which the entire point cloud sequence is divided.
  • 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 encoding end constructs the octree structure of the point cloud based on the octree coding method. For example, as shown in Figure 6, the point cloud is surrounded by the smallest cuboid, and the bounding box is first divided into octrees to obtain 8 nodes. The occupied nodes among these 8 nodes, that is, the nodes including the points, continue to be divided into octrees, and so on, until they are divided into voxel-level positions, for example, into 1X1X1 cubes.
  • the point cloud octree structure obtained by such division includes multiple layers of nodes, for example, including 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 coding, 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 realized.
  • the coding end can use prediction tree coding while using octree coding, that is, the prediction tree coding algorithm is turned off.
  • the octree is first used to perform octree division on the bounding box of the point cloud, and the division is divided to a preset depth. For example, after division to 3 layers, for each non-zero node obtained by the division, it is determined whether the node is encoded by prediction tree or octree. If it is determined that the node is encoded by prediction tree, the prediction tree coding method is used to perform prediction tree coding on the geometric information of the points included in the node.
  • the points included in the node are sorted, and the preset prediction tree coding method is used to construct a prediction tree for the sorted points, such as constructing an L3C2 single chain. Then, based on the structure of the prediction tree, each node in the prediction tree is traversed, and 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, prediction tree structure and quantization parameter of the prediction tree node position information are encoded.
  • the octree division method is used to divide the node until it is divided into leaf nodes at the voxel level, and the placeholder information of each node in the octree is encoded to form a geometric code stream.
  • the encoding end indicates that the node is encoded using the prediction tree encoding method through a parameter.
  • the parameter may be a first flag
  • the encoding end indicates that the node is encoded using the prediction tree encoding method by setting the first flag to true, for example, setting the first flag to 1.
  • the decoding end determines that the node is encoded using the prediction tree encoding method by decoding the first flag, and correspondingly, performs geometric decoding on the node using the prediction tree decoding method to obtain the geometric reconstruction values of the points included in the node.
  • 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 encoder writes the total number of points of the point cloud into the geometry brick header (gbh) of the point cloud. In this way, the decoder obtains the total number of points of the point cloud by decoding the geometry brick header (gbh) of the point cloud.
  • the encoding end divides the number of points of the point cloud into the low-order part num_points_lower of the points contained in the slice and the high-order part num_points_upper of the points contained in the slice when encoding the total number of points in the point cloud, and writes num_points_lower and num_points_upper into the geometry unit header.
  • the parameters of the geometry unit head are specifically as shown in Table 2 above.
  • 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 taken as an example for explanation.
  • 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 first encoded points corresponding to the i-th non-zero child node in the point cloud.
  • the encoder determines the number of first 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 first encoded points corresponding to the i-th non-zero child node in the point cloud. For example, the number of first 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 number of first encoded points corresponding to the i-th non-zero child node can be understood as the total number of points currently encoded by the encoding end when determining whether to encode repeated point information of the i-th non-zero child node of the current node.
  • the encoding end starts a counter during encoding, and the counter is used to record the number of encoded points in real time, so that when encoding the i-th non-zero child node, the first number of encoded points corresponding to the i-th non-zero child node can be obtained from the counter.
  • the encoder determines the number of first encoded points corresponding to the i-th non-zero child node through the following steps:
  • S202-A11-1 Determine the number of first encoded points based on the number of third encoded points.
  • the third encoded point can be understood as an encoded point in the leaf node of the octree.
  • the encoder determines the number of first encoded points corresponding to the i-th non-zero child node by determining the number of points included in the encoded leaf node before the i-th non-zero child node.
  • the implementation methods of determining the number of third encoded points corresponding to the i-th non-zero child node in the above S202-A11-1 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-1 includes the following steps S202-A11-1-a1 and S202-A11-1-a2:
  • S202-A11-1-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 third 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 After determining the number of non-zero child nodes of the current node, the encoder determines the number of third 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 manner of determining the number of third 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 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 third 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 of the current node that are located before the i-th non-zero child 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 third number of encoded points corresponding to the i-th non-zero child node.
  • the encoded non-zero child nodes may include repeated points. Therefore, when determining the third number of encoded points corresponding to the i-th child node, the number of encoded repeated 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 of the current node that are located before the i-th non-zero child 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 third 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-1 includes the following steps S202-A11-1-b1 to S202-A11-1-b3:
  • S202-A11-1-b1 determine the number of encoded points corresponding to each non-zero node before the current node in the N-1th layer;
  • S202-A11-1-b2 determine 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 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-1th 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-1th layer.
  • the encoding end can record the number of non-zero child nodes of each non-zero node in the N-1th 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-1th 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 encoding end obtains the number of non-zero child nodes of a non-zero node and the number of second repeated points included in the non-zero child nodes of the non-zero node for a non-zero node among the non-zero nodes; subtracts 1 from the number of non-zero child nodes of the non-zero node, and then adds the sum of the number of second 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 end 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 encoding end 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 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.
  • determine the sum of the number of second repeated points included in the non-zero child nodes of the non-zero node and record it as the value b.
  • add the value a and the value b to obtain the number of encoded points corresponding to the 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 third 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 embodiment of the present application does not limit the specific implementation method of determining the third number of encoded points corresponding to the i-th non-zero child node in the above S202-A11-1-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-1-b31 and S202-A11-1-b32:
  • S202-A11-1-b32 Determine the number of third encoded 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 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 third 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 accurately determining the third number of encoded points corresponding to the i-th non-zero child node.
  • the implementation method of determining the first 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-1-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 third 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 third 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 third 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 third number of encoded points corresponding to the i-th non-zero child node.
  • step S202-A11-2 After determining the third number of decoded points corresponding to the i-th non-zero child node based on the above steps, execute step S202-A11-2 to determine the first number of decoded points based on the third number of decoded points.
  • directly compressing its coordinates is more efficient than using an octree method to compress.
  • This process of directly encoding the coordinates of a point in a node is called a direct coding model (DCM). Whether the current node uses DCM can be inferred based on the information of neighboring nodes. This method is called an inferred direct coding model (IDCM).
  • DCM direct coding model
  • the number of first encoded points corresponding to the i-th non-zero child node in the point cloud is affected.
  • the following describes the process of affecting the number of first encoded points corresponding to the i-th non-zero child node when the point cloud adopts DCM and does not adopt IDCM.
  • the third number of encoded points corresponding to the i-th non-zero child node is determined as the first number of encoded points 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 does not use direct encoding. Therefore, when encoding the current node, the octree does not include other first encoded points except the third encoded point corresponding to the i-th non-zero child node determined above.
  • the first encoded point can be understood as a point whose geometric position has been encoded in the leaf node of the octree. At this time, the number of the third encoded points corresponding to the i-th non-zero child node determined above is directly determined as the number of the first encoded points corresponding to the i-th non-zero child node.
  • the point cloud adopts IDCM
  • the number of points included in the second node encoded using IDCM in the octree is determined; the number of points included in the second node using IDCM and the third number of encoded points corresponding to the i-th non-zero child node determined above are added to obtain a new first number of encoded points corresponding to the i-th non-zero child node.
  • the point cloud adopts IDCM, that is, IDCM is turned on, then it means that at least one node in the octree of the point cloud may adopt 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 encoded.
  • the encoder After the encoder determines the number of first 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 first 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 first 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 first 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.
  • octree in AVS geometric coding, octree can be used for coding, and octree and prediction tree can be combined for coding.
  • the method of determining the second parameter corresponding to the i-th non-zero child node based on the number of first encoded points corresponding to the i-th non-zero child node in the point cloud is different.
  • the following introduces the specific process of determining the second parameter corresponding to the i-th non-zero child node when the point cloud adopts prediction tree coding and when the prediction tree coding is not adopted.
  • determining the second parameter corresponding to the i-th non-zero child node includes at least the following methods:
  • Method 1 The number of first encoded points is determined as the second parameter.
  • the point cloud adopts the prediction tree coding method, that is, the prediction tree coding method is turned off, then, among the encoded points corresponding to the i-th non-zero child node in the point cloud, except for the first encoded point corresponding to the i-th non-zero child node determined in the above embodiment, no other encoded points are included.
  • the number of first encoded points corresponding to the i-th non-zero child node is determined, and the number of first 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 above S202-A12 includes the following steps S202-A121 and S202-A122:
  • S202-A122 Determine the sum of the first number of encoded points and the second number of encoded points as the second parameter.
  • the point cloud adopts the prediction tree coding method, that is, the prediction tree coding method is turned on, at this time, it means that there may be at least one node in the octree of the point cloud that adopts the prediction tree coding method, and the points included in the node are encoded using the prediction tree coding method.
  • the prediction tree coding method is adopted for the first node of the third layer in the point cloud octree, for example, the points included in the node are sorted, and the preset prediction tree coding method is adopted to construct a prediction tree for the sorted points, for example, an L3C2 single chain is constructed.
  • each node in the prediction tree is traversed, and 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 and encoded using the quantization parameter to form a geometric code stream.
  • the encoding end uses the prediction tree encoding method to geometrically encode the node to obtain the geometric reconstruction value of the point included in the node. That is to say, in the embodiment of the present application, since the octree is traversed by the breadth-first principle, the position of the node encoded by the prediction tree in the octree is before the current node, that is, when encoding the current node, the node encoded by the prediction tree has been encoded.
  • the second parameter corresponding to the i-th non-zero child node of the current node it is necessary not only to determine the first number of encoded points corresponding to the above-mentioned i-th non-zero child node, but also to determine the number of encoded points included in the first node encoded by the prediction tree in the octree.
  • the number of encoded points included in the first node encoded by the prediction tree is recorded as the second number of encoded points.
  • the first number of encoded points corresponding to the i-th non-zero child node is added to the second number of encoded points included in the first node encoded by the prediction tree in the octree, and the result of the addition is determined as the second parameter corresponding to the i-th 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 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 encoding the current node, or 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 point cloud does not use prediction tree encoding
  • the first 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 unencoded 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 first encoded 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.
  • 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 point cloud does not use prediction tree encoding
  • the first 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 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 third number of encoded repeated points.
  • the encoded point is recorded as the third 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
  • one of the two non-zero child nodes includes two repeated points and the other non-zero child node includes one repeated point
  • the total number of encoded repeated points corresponding to the i-th non-zero child node is determined based on the sum of the third 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 third number of encoded repeated points in the above S201-B12 include at least the following two methods:
  • Method 1 If the point cloud adopts the prediction tree coding method, the sum of the fourth number of encoded repeated points included in the first node in the octree using the prediction tree coding method is determined; based on the sum of the third number of encoded repeated points and the sum of the fourth number of encoded repeated points, the total number of encoded repeated points corresponding to the i-th non-zero child node is determined.
  • the encoder completes the node in the octree that adopts the predictive tree coding before encoding the current node.
  • the sum of the fourth number of encoded repeated points included in the first node in the octree that adopts the predictive tree coding method can be obtained, and then based on the sum of the third number of encoded repeated points and the sum of the fourth number of encoded repeated points, the total number of encoded repeated points corresponding to the i-th non-zero child node is determined.
  • the sum of the third number of encoded duplicate points and the sum of the fourth number of encoded duplicate points are used to determine the total number of encoded duplicate points corresponding to the i-th non-zero child 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 third number of encoded repeated points and the sum of the fourth number of encoded repeated points, including: determining the sum of the fifth number of encoded repeated points included in the second node using IDCM in the octree; adding the sum of the third number of encoded repeated points, the sum of the fourth number of encoded repeated points, and the sum of the fifth number of encoded repeated points 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 adopt the prediction tree encoding method, the total number of encoded repeated points corresponding to the i-th non-zero child node is determined based on the sum of the third number of encoded repeated points.
  • the total number of encoded repeated points corresponding to the i-th non-zero child node is determined based on the sum of the third number of encoded repeated points.
  • method 2 if the point cloud does not adopt the prediction tree encoding method and adopts the IDCM encoding method, then the sum of the fifth number of encoded repeated points included in the second node using IDCM in the octree is determined, and the sum of the fifth number of encoded repeated points is added to the sum of the third number of encoded repeated points to obtain the total number of encoded repeated points corresponding to the i-th non-zero child node.
  • the total number of encoded repeated points corresponding to the i-th non-zero child node is determined, the total number of encoded repeated points corresponding to the i-th non-zero child node is determined as 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 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 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 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 i-th non-zero child node includes duplicate points.
  • the encoding 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 in the point cloud and the total number of encoded 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 encoding end encodes the duplicate point information of the i-th non-zero child node.
  • 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 point cloud geometry encoding method provided by the embodiment of the present application, in point cloud encoding, for example, in point cloud encoding based on AVS, when encoding 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, 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 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 objects associated 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 is used to determine a first parameter corresponding to a current node, where the first parameter is used to determine whether at least one non-zero child node of the current node includes a duplicate point, where the current node is a non-zero node in the N-1th layer of an octree of the point cloud, where the octree is obtained by node division of the point cloud, where N is a total number of layers of the octree, and where N is a positive integer greater than 1;
  • the decoding unit 12 is used to perform geometric decoding on the current node based on the first parameter.
  • 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, the first parameter is determined.
  • 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 first number of decoded points corresponding to the i-th non-zero subnode in the point cloud; based on the first 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 first number of decoded points as the second parameter.
  • the decoding unit 12 is specifically used to determine the number of second decoded points included in the first node in the octree that adopts the prediction tree encoding method; and the sum of the first number of decoded points and the second number of decoded points is determined as the second parameter.
  • the decoding unit 12 is specifically configured to determine the third number of decoded points corresponding to the i-th non-zero child node; and determine the first number of decoded points based on the third number of decoded points.
  • 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 third 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 of 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 third number of decoded points.
  • 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 third 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 any non-zero node among the non-zero nodes, the number of non-zero child nodes of the non-zero node and the sum of the second number of repeated points included in the non-zero child nodes of the non-zero 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 second number of repeated points 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 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 third 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 third 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 third number of decoded points corresponding to the i-th non-zero child node.
  • the decoding unit 12 is specifically configured to determine the third number of decoded points as the first number of decoded points.
  • the decoding unit 12 is specifically used to determine the number of points included in the second node of the octree adopting IDCM; and the sum of the third number of decoded points and the number of points included in the second node is determined as the first number of decoded points.
  • the decoding unit 12 is specifically configured to skip decoding the 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 third 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 third 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 fourth number of decoded repeated points included in the first node in the octree that adopts the prediction tree encoding method; based on the sum of the third number of decoded repeated points and the sum of the fourth 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 fifth number of decoded repeated points included in the second node using IDCM in the octree; the sum of the third number of decoded repeated points, the sum of the fourth number of decoded repeated points, and the sum of the fifth 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 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 a geometric unit header of the point cloud to obtain a total number of points of the point cloud.
  • the decoding unit 12 is specifically used to decode the geometric unit header to obtain the low-order part of the number of points contained in the slice corresponding to the point cloud and the high-order part of the number of points contained in the slice; based on the low-order part of the number of points contained in the slice and the high-order part of the number of points contained in the slice, the total number of points in the point cloud is obtained.
  • 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 at least one non-zero child node of the current node includes a duplicate point, where the current node is a non-zero node in the N-1th layer of the octree of the point cloud, where the octree is obtained by node division of the point cloud, where N is the total number of layers of the octree, and where N is a positive integer greater than 1;
  • the encoding unit 22 is used to perform geometric encoding on the current node based on the first parameter.
  • 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 first encoded points corresponding to the i-th non-zero child node in the point cloud as the second parameter.
  • the encoding unit 22 is specifically used to obtain the second number of encoded points included in the first encoding unit using the prediction tree encoding in the encoding unit of the point cloud, and the encoding unit is a non-zero node obtained by dividing the bounding box of the point cloud by a preset number of times; the sum of the first number of encoded points and the second number of encoded points is determined as the second parameter.
  • the encoding unit 22 is specifically configured to determine the number of third encoded points corresponding to the i-th non-zero child node; and determine the number of first encoded points based on the third number of encoded points.
  • 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 third encoded points corresponding to the i-th non-zero child node.
  • the encoding unit 22 is specifically used to, if the i-th non-zero child node is the first non-zero child node of the current node, reduce the number of non-zero child nodes included in the current node by 1, and determine the third 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 third 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; and determine the third number of encoded points 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.
  • the encoding unit 22 is specifically used to obtain, for any non-zero node among the non-zero nodes, the number of non-zero child nodes of the non-zero node and the sum of the second number of repeated points included in the non-zero child nodes of the non-zero 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 second number of repeated points 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; and determine the third number of encoded points based on the first sum and the number of non-zero child nodes of the current 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 third number of encoded points.
  • 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 third number of encoded points.
  • the encoding unit 22 is specifically configured to determine the third number of encoded points as the first number of encoded points.
  • the encoding unit 22 is specifically used to determine the number of points included in the second node of the octree adopting IDCM; 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 second node is determined as the first number of encoded points.
  • 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 third 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 third 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 fourth number of encoded repeated points included in the first node in the octree that adopts the prediction tree encoding method; based on the sum of the third number of encoded repeated points and the sum of the fourth 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 fifth number of encoded repeated points included in the second node using IDCM in the octree; the sum of the third number of encoded repeated points, the sum of the fourth number of encoded repeated points, and the sum of the fifth 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 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 a geometric unit header of the point cloud.
  • the encoding unit 22 is specifically used to determine the low-order part of the number of points contained in the slice corresponding to the point cloud and the high-order part of the number of points contained in the slice based on the total number of points in the point cloud; and write the low-order part of the number of points contained in the slice and the high-order part of the number of points contained in the slice into the header of the geometric 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.

Abstract

Provided in the present application are a point cloud coding method and apparatus, a point cloud decoding method and apparatus, and a device and a storage medium. The method comprises: in point cloud decoding, for example, in AVS-based point cloud decoding, when the current node of an (N-1)th layer in an octree is decoded, first, determining a first parameter corresponding to the current node, wherein the first parameter is used for determining whether at least one non-zero sub-node of the current node comprises a repeated point, the current node being a non-zero node of the (N-1)th layer in the octree of a point cloud, and N being the total number of layers of the octree; and then, performing geometric decoding on the current node on the basis of the first parameter. For example, when it is determined, on the basis of a first parameter, that an ith non-zero sub-node of the current node does not comprise a repeated point, the decoding of repeated point information of the ith non-zero sub-node is skipped, so as to reduce the decoding complexity of a point cloud and save on the decoding time, and thus improving the 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.
点云的压缩也称为点云的编码,在点云编码过程中,采用不同的编码模型,将点云中的点对应到节点中,对节点进行编码,其中有些节点包括重复点。目前的编解码方式,例如在点云的音视频编码标准(Audio Video Standard,AVS)中,需要编解码八叉树的叶子节点中每一个非零叶子节点的重复点信息,进而降低了点云的编解码效率。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 Audio Video Standard (AVS) of point clouds, 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 point cloud encoding and decoding, save encoding and decoding time, and thus improve the encoding and decoding efficiency of point cloud.
第一方面,本申请实施例提供一种点云解码方法,包括:In a first aspect, an embodiment of the present application provides a point cloud decoding method, comprising:
确定当前节点对应的第一参数,所述第一参数用于确定所述当前节点的至少一个非零子节点是否包括重复点,所述当前节点为所述点云的八叉树的第N-1层中的一个非零节点,所述八叉树是对所述点云进行节点划分得到,所述N为所述八叉树的总层数,所述N为大于1的正整数;Determine a first parameter corresponding to a current node, where the first parameter is used to determine whether at least one non-zero child node of the current node includes a duplicate point, where the current node is a non-zero node in the N-1th layer of an octree of the point cloud, where the octree is obtained by node division of the point cloud, where N is the total number of layers of the octree, and where N is a positive integer greater than 1;
基于所述第一参数,对所述当前节点进行几何解码。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:
确定当前节点对应的第一参数,所述第一参数用于确定所述当前节点的至少一个子节点是否包括重复点,所述当前节点为所述点云的八叉树的第N-1层中的一个节点,所述八叉树是对所述点云进行节点划分得到,所述N为所述八叉树的总层数,所述N为大于1的正整数;Determine a first parameter corresponding to a current node, where the first parameter is used to determine whether at least one child node of the current node includes a duplicate point, where the current node is a node in the N-1th layer of an octree of the point cloud, where the octree is obtained by node division of the point cloud, where N is the total number of layers of the octree, and where N is a positive integer greater than 1;
基于所述第一参数,对所述当前节点进行几何编码。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.
基于以上技术方案,在点云解码中,例如在基于AVS的点云解码中,在解码八叉树中第N-1层的当前节点时,首先确定当前节点对应的第一参数,该第一参数用于确定当前节点的至少一个非零子节点是否包括重复点,当前节点为点云的八叉树中第N-1层的一个非零节点,N为所述八叉树的总层数,进而基于该第一参数,对当前节点进行几何解码。例如,基于该第一参数确定当前节点的第i个非零子节点不包括重复点时,则跳过解码该第i个非零子节点的重复点信息,进而降低了点云的解码复杂度,节约了解码时间,进而提升了解码效率。Based on the above technical solution, in point cloud decoding, for example, in point cloud decoding based on AVS, 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, 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 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.
附图说明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;
图5为本申请一实施例提供的点云解码方法流程示意图;FIG5 is a schematic diagram of a point cloud decoding method flow chart provided by an embodiment of the present application;
图6为一种八叉树划分示意图;FIG6 is a schematic diagram of an octree partition;
图7为一种八叉树和预测树划分示意图;FIG7 is a schematic diagram of an octree and a prediction tree 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 PCTCN2022122117-appb-000001
Figure PCTCN2022122117-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)提供的基于几何的点云压缩(Geometry Point Cloud Compression,G-PCC)编解码框架或基于视频的点云压缩(Video Point Cloud Compression,V-PCC)编解码框架,也可以采用音视频编码标准(Audio Video Standard,AVS)提供的AVS-PCC编解 码框架。G-PCC及AVS-PCC均针对静态的稀疏型点云,其编码框架大致相同。The current point cloud encoder can use the geometry point cloud compression (G-PCC) codec framework or the video point cloud compression (V-PCC) codec framework provided by the Moving Picture Experts Group (MPEG) of the International Standards Organization, or the AVS-PCC codec framework provided by the Audio Video Standard (AVS). Both G-PCC and AVS-PCC are aimed at static sparse point clouds, and their coding frameworks are roughly the same.
下面以AVS-PCC编解码框架为例,对本申请实施例可适用的点云编码器和点云解码器进行说明。The following uses the AVS-PCC 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.
在AVS-PCC编码框架中,点云的几何信息和对应的属性信息是分开编码的。In the AVS-PCC coding framework, the geometric information of the point cloud and the corresponding attribute information are encoded separately.
位置编码的过程包括:对点云中的点进行预处理,例如坐标变换、量化和移除重复点等;接着,对预处理后的点云进行几何编码,例如构建八叉树,基于构建的八叉树进行几何编码形成几何码流。同时,基于构建的八叉树输出的位置信息,对点云数据中各点的位置信息进行重建,得到各点的位置信息的重建值。The process of position encoding includes: preprocessing the points in the point cloud, such as coordinate transformation, quantization, and removal of duplicate points; then, geometric encoding the preprocessed point cloud, such as constructing an octree, and geometric encoding based on the constructed octree to form a geometric code stream. At the same time, based on the position information output by the constructed octree, 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.
属性编码过程包括:通过给定输入点云的位置信息的重建信息和属性信息的原始值,选择2种预测模式的一种进行点云属性预测,对预测后的结果进行量化,并进行算术编码形成属性码流。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 two prediction modes to predict the point cloud attributes, quantizing the predicted results, 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:
坐标平移、坐标量化单元201、八叉树构建(Analyze octree)单元202、八叉树重建(Reconstruct geometry)单元203、第一熵编码(Arithmetic enconde)单元204。Coordinate translation, coordinate quantization unit 201, octree construction (Analyze octree) unit 202, octree reconstruction (Reconstruct geometry) unit 203, first entropy coding (Arithmetic enconde) unit 204.
坐标平移、坐标量化单元201可用于将点云中点的世界坐标变换为相对坐标。例如,点的几何坐标分别减去xyz坐标轴的最小值,相当于去直流操作,以实现将点云中的点的坐标从世界坐标转换为相对坐标。可选的,会根据参数配置来决定是否要将整个点云序列划分成多个slice(点云片),对于每个划分的slice将其视为单个独立点云串行处理。接着,对点云进行量化和移除重复点。可通过量化减少坐标的数目;量化后原先不同的点可能被赋予相同的坐标,基于此,可通过去重操作将重复的点删除;例如,具有相同量化位置和不同属性信息的多个云可通过属性转换合并到一个云中。在本申请的一些实施例中,量化和移除重复点为可选步骤。在一些实施例中,量化和移除重复点也称为体素化。The coordinate translation and coordinate quantization unit 201 can be used to transform the world coordinates of points 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 to achieve the conversion of the coordinates of the points in the point cloud from world coordinates to relative coordinates. Optionally, it will be decided whether to divide the entire point cloud sequence into multiple slices (point cloud slices) based on the parameter configuration, and each divided slice will be treated as a single independent point cloud serial processing. Next, the point cloud is quantized and duplicate points are removed. The number of coordinates can be reduced by quantization; after quantization, originally different points may be assigned the same coordinates, based on which, duplicate points can be deleted by deduplication operations; for example, multiple clouds with the same quantized position and different attribute information can be merged into one cloud through attribute conversion. In some embodiments of the present application, quantization and removal of duplicate points are optional steps. In some embodiments, quantization and removal of duplicate points are also referred to as voxelization.
八叉树构建单元202可利用八叉树(octree)编码方式,编码量化的点的位置信息。例如,将点云包含在一个bounding box(包围盒)中,按照八叉树的形式对点云的包围盒进行划分,对每个节点的占位码进行编码。在基于八叉树的几何码框架中,将包围盒依次划分得到子立方体,对非空的(包含点云中的点)的子立方体继续进行划分,直到划分得到的叶子结点为1x1x1的单位立方体时停止划分。由此,点的位置可以和八叉树的位置一一对应,通过统计八叉树中有点的位置,并将其标识(flag)记为1,以进行几何编码。The octree construction unit 202 can use the octree encoding method to encode the position information of the quantized points. For example, the point cloud is contained in a bounding box, the bounding box of the point cloud is divided in the form of an octree, and the placeholder code of each node is encoded. In the octree-based geometric code framework, the bounding box is divided into sub-cubes in sequence, and the non-empty (including the points in the point cloud) sub-cubes are continued to be divided until the leaf node obtained by the division is a 1x1x1 unit cube. The division is stopped. Thus, 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 for geometric encoding.
八叉树重建单元203可以基于八叉树构建单元202输出的位置信息进行位置重建,得到点云数据中各点的位置信息的重建值。在基于八叉树的几何重建过程中,按照广度优先遍历的顺序,通过不断解析得到每个节点的占位码,并且依次不断划分节点,直至划分得到1x1x1的单位立方体时停止划分,解析得到每个叶子节点中包含的点数,最终恢复得到点云的几何重建值。The octree reconstruction unit 203 can perform position reconstruction based on the position information output by the octree construction unit 202 to obtain the reconstruction value of the position information of each point in the point cloud data. In the geometric reconstruction process based on the octree, the placeholder code of each node is obtained by continuous parsing in the order of breadth-first traversal, and the nodes are continuously divided in turn until the division is stopped when a 1x1x1 unit cube is obtained, and the number of points contained in each leaf node is obtained by parsing, and finally the geometric reconstruction value of the point cloud is restored.
第一熵编码单元204可以采用熵编码方式对八叉树分析单元203输出的位置信息进行算术编码,生成几何码流;几何码流也可称为几何比特流(geometry bitstream)。The first entropy coding unit 204 can use entropy coding to perform arithmetical coding on the position information output by the octree analysis unit 203 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:
空间转换单元210、属性差值单元211、属性预测单元212、属性变换单元213、量化单元214以及第二熵编码单元214。A spatial conversion unit 210 , a property difference unit 211 , a property prediction unit 212 , a property transformation unit 213 , a quantization unit 214 and a second entropy coding unit 214 .
需要说明的是,点云编码器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颜色空间变换为YUV颜色空间或其他格式。目前,属性编码主要针对颜色、反射率信息进行。首先判断是否进行颜色空间的转换,若进行颜色空间转换,则空间转换单元210将颜色信息从RGB颜色空间转换到YUV颜色空间。The space conversion unit 210 can be used to convert the RGB color space of the point in the point cloud into a YUV color space or other formats. At present, attribute encoding is mainly performed on color and reflectivity information. First, it is determined whether to perform color space conversion. If color space conversion is performed, the space conversion unit 210 converts the color information from the RGB color space to the YUV color space.
属性差值单元211,也称为重着色单元,利用重建的几何信息,对颜色信息进行重新着色,使得未编码的属性信息与重建的几何信息对应起来。The attribute difference unit 211, also called a recoloring unit, uses the reconstructed geometric information to recolor the color information so that the uncoded attribute information corresponds to the reconstructed geometric information.
经过重着色得到点的属性信息的原始值后,可选择属性预测或属性变换任意一种方式,对点云中的点进行处理。After recoloring to obtain the original value of the point attribute information, you can choose either attribute prediction or attribute transformation to process the points in the point cloud.
在一些实施例中,若编码端选择属性预测方式对点的属性进行编码时,则属性预测单元212,用于对点云进行重排序,然后进行差分预测。其中重排序的方法有两种:莫顿重排序和希尔伯特Hilbert重排序。对于cat1A序列与cat2序列,对其进行Hilbert重排序;对于cat1B序列与cat3序列,对其进行莫顿重排序。对排序之后的点云使用差分方式进行属性预测,基于点的属性预测和属性原始值,得到点的属性残差。量化单元214对点的属性残差进行量化,得到量化后的属性残差。第二熵编码单元215,对量化单元214量化后的属性残差进行熵编码,得到二进制的属性码流。In some embodiments, if the encoding end selects an attribute prediction method to encode the attributes of the points, the attribute prediction unit 212 is used to reorder the point cloud and then perform differential prediction. There are two methods of reordering: Morton reordering and Hilbert reordering. For the cat1A sequence and the cat2 sequence, Hilbert reordering is performed; for the cat1B sequence and the cat3 sequence, Morton reordering is performed. The attribute of the sorted point cloud is predicted using a differential method, and the attribute residual of the point is obtained based on the attribute prediction of the point and the original value of the attribute. The quantization unit 214 quantizes the attribute residual of the point to obtain the quantized attribute residual. The second entropy coding unit 215 performs entropy coding on the attribute residual quantized by the quantization unit 214 to obtain a binary attribute code stream.
属性变换单元213,用于对点云属性做小波变换,得到变换系数。量化单元214对变换系数做量化,得到量化后的变换系数。另外,属性变换单元213对量化后的变换系数进行逆量化、逆小波变换得到属性重建值,接着,属性变换单元213计算点的原始属性和点的属性重建值的差值,得到点的属性残差。量化单元214对点的点的属性残差进行量化,得到点的量化后的属性残差。第二熵编码单元215,对量化单元214量化后的属性残差和量化后的变换系数进行熵编码,得到二进制的属性码流。The attribute transformation unit 213 is used to perform wavelet transformation on the point cloud attributes to obtain transformation coefficients. The quantization unit 214 quantizes the transformation coefficients to obtain quantized transformation coefficients. In addition, the attribute transformation unit 213 performs inverse quantization and inverse wavelet transformation on the quantized transformation coefficients to obtain attribute reconstruction values. Then, the attribute transformation unit 213 calculates the difference between the original attribute of the point and the attribute reconstruction value of the point to obtain the attribute residual of the point. The quantization unit 214 quantizes the attribute residual of the point to obtain the quantized attribute residual of the point. The second entropy coding unit 215 performs entropy coding on the attribute residual quantized by the quantization unit 214 and the quantized transformation coefficient to obtain a binary attribute code stream.
图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's position information; performing coordinate transformation on the reconstructed information of the point's position information to obtain the point's position information. The point's position information can also be called the point's geometric information.
属性解码过程包括:通过解析属性码流,获取点云中点的属性信息的残差值;通过对点的属性信息的残差值进行反量化,得到反量化后的点的属性信息的残差值;基于位置解码过程中获取的点的位置信息的重建信息,选择属性预测补偿和属性逆变换中的一种进行点云处理,得到点的属性信息的重建值;对点的属性信息的重建值进行颜色空间逆转换,以得到解码点云。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 attribute prediction compensation and attribute inverse transformation to perform point cloud processing 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、逆坐标量化、逆坐标平移单元303。The first entropy decoding unit 301, the octree reconstruction (synthesize octree) unit 302, the inverse coordinate quantization and inverse coordinate translation unit 303.
其中,第一熵解码单元301可以采用熵解码方式,对几何码流进行解码,得到八叉树中各节点的占位信息。The first entropy decoding unit 301 may decode the geometric code stream by using an entropy decoding method to obtain the placeholder information of each node in the octree.
八叉树重建单元301基于第一熵解码单元301解码的八叉树中各节点的占位信息,重建构建八叉树。在基于八叉树的几何重建过程中,按照广度优先遍历的顺序,通过不断解析得到每个节点的占位码,并且依次不断划分节点,直至划分得到1x1x1的单位立方体时停止划分,解析得到每个叶子节点中包含的点数,最终恢复得到点云的几何重建值。The octree reconstruction unit 301 reconstructs the octree based on the placeholder information of each node in the octree decoded by the first entropy decoding unit 301. In the geometric reconstruction process based on the octree, the placeholder code of each node is obtained by continuous parsing in the order of breadth-first traversal, and the nodes are continuously divided in turn until a 1x1x1 unit cube is obtained, and the division is stopped when the division obtains the number of points contained in each leaf node, and finally the geometric reconstruction value of the point cloud is restored.
逆坐标量化、逆坐标平移单元303对八叉树重建单元302重建的点云的几何重建值进行逆坐标平移和逆量化操作,得到点云中点在世界坐标下的几何重建值。The inverse coordinate quantization and inverse coordinate translation unit 303 performs inverse coordinate translation and inverse quantization operations on the geometric reconstruction value of the point cloud reconstructed by the octree reconstruction unit 302 to obtain the geometric reconstruction value of the midpoint of the point cloud in the world coordinate.
属性编码可通过以下单元实现:Attribute encoding can be achieved through the following units:
第二熵解码单元310、逆量化(inverse quantize)单元311、属性预测补偿单元312、属性逆变换单元313以及逆空间转换(inverse trasform colors)单元314。A second entropy decoding unit 310, an inverse quantization unit 311, an attribute prediction compensation unit 312, an attribute inverse transformation unit 313 and an inverse spatial transformation (inverse trasform colors) unit 314.
在一些实施例中,若编码端采用属性预测方式对点云的属性信息进行编码,则第二熵解码单元310解码属性码流,得到量化后的属性残差,逆量化单元313对量化后的属性残差进行逆量化,得到属性残差值。属性预测补偿单元312基于点云的重建几何信息,采用差分等方式,得到点云中点的属性预测值,进而将属性预测值与属性残差值进行相加,得到点的属性重建值。接着,通过逆空间转换单元314对点的属性重建值进行颜色空间逆转换,例如从YUV颜色空间逆转换到RGB颜色空间,得到点云的重建属性信息。In some embodiments, if the encoding end uses attribute prediction to encode the attribute information of the point cloud, the second entropy decoding unit 310 decodes the attribute code stream to obtain the quantized attribute residual, and the inverse quantization unit 313 inversely quantizes the quantized attribute residual to obtain the attribute residual value. The attribute prediction compensation unit 312 obtains the attribute prediction value of the point in the point cloud based on the reconstructed geometric information of the point cloud, and then adds the attribute prediction value to the attribute residual value to obtain the attribute reconstruction value of the point. Then, the inverse space conversion unit 314 performs color space inverse conversion on the attribute reconstruction value of the point, for example, from the YUV color space to the RGB color space, to obtain the reconstructed attribute information of the point cloud.
在一些实施例中,若编码端采用属性编码方式对点云的属性信息进行编码,则第二熵解码单元310解码属性码流,得到量化后的属性残差和量化后的变换系数。逆量化单元313对量化后的属性残差和量化后的变换系数进行逆量化,得到点的属性残差和变换系数。属性逆变换单元313基于点云的重建几何信息,对点云中点的变换系数进行逆小波变换,得到点云中点的属性重建值,进而将属性重建值与属性残差值进行相加,得到点的重建属性值。接着,通过逆空间转换单元314对点的重建属性值进行颜色空间逆转换,例如从YUV颜色空间逆转换到RGB颜色空间,得到点云的重建属性信息。In some embodiments, if the encoding end uses attribute coding to encode the attribute information of the point cloud, the second entropy decoding unit 310 decodes the attribute code stream to obtain the quantized attribute residual and the quantized transformation coefficient. The inverse quantization unit 313 inversely quantizes the quantized attribute residual and the quantized transformation coefficient to obtain the attribute residual and the transformation coefficient of the point. The attribute inverse transformation unit 313 performs an inverse wavelet transform on the transformation coefficient of the point in the point cloud based on the reconstructed geometric information of the point cloud to obtain the attribute reconstruction value of the point in the point cloud, and then adds the attribute reconstruction value to the attribute residual value to obtain the reconstructed attribute value of the point. Then, the inverse space conversion unit 314 performs an inverse color space conversion on the reconstructed attribute value of the point, for example, from the YUV color space to the RGB color space, to obtain the reconstructed attribute information of the point cloud.
需要说明的是,解压缩是压缩的逆过程,类似的,解码器300中的各个单元的功能可参见编码器200中相应的单元的功能。另外,点云解码器300可包含比图4B更多、更少或不同的功能组件。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. 4B.
在一些实施例中,AVS PCC的通用测试条件共4种:In some embodiments, there are 4 general test conditions for AVS PCC:
条件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.
示例性的,通用测试序列包括Cat1A,Cat1B,Cat1C,Cat2-frame和Cat3共五类,其中Cat1A、Cat2-frame点云只包含反射率属性信息,Cat1B、Cat3点云只包含颜色属性信息,Cat1B点云同时包含颜色和反射率属性信息。Exemplarily, the universal test sequence includes five categories, namely Cat1A, Cat1B, Cat1C, Cat2-frame and Cat3, wherein Cat1A and Cat2-frame point clouds only contain reflectivity attribute information, Cat1B and Cat3 point clouds only contain color attribute information, and Cat1B point cloud contains both color and reflectivity attribute information.
以属性压缩所采用的算法进行区分,点云属性压缩的方法包括但不限于如下几种:Based on the algorithm used for attribute compression, point cloud attribute compression methods include but are not limited to the following:
第一种是,属性压缩采用基于帧内预测的方法。The first one is that attribute compression adopts an intra-frame prediction-based method.
示例性的,在编码端,按照一定的顺序,例如点云原始采集顺序、莫顿顺序、希尔伯特顺序等处理点云中的点,先采用预测算法得到属性预测值,根据属性值和属性预测值得到属性残差。然后,对属性残差进行量化,生成量化残差,最后对量化残差进行编码。For example, at the encoding end, the points in the point cloud are processed in a certain order, such as the original acquisition order of the point cloud, the Morton order, the Hilbert order, etc., and the prediction algorithm is first used to obtain the attribute prediction value, and the attribute residual is obtained according to the attribute value and the attribute prediction value. Then, the attribute residual is quantized to generate a quantized residual, and finally the quantized residual is encoded.
在解码端,按照一定的顺序,例如点云原始采集顺序、莫顿顺序、希尔伯特顺序等处理点云中的点,先采用预测算法得到属性预测值。然后,解码获取量化残差,再对量化残差进行反量化,最后根据属性预测值和反量化后的残差,获得属性重建值。At the decoding end, the points in the point cloud are processed in a certain order, such as the original acquisition order of the point cloud, the Morton order, the Hilbert order, etc., and the prediction algorithm is first used to obtain the attribute prediction value. Then, the decoding obtains the quantized residual, and then the quantized residual is dequantized. Finally, the attribute reconstruction value is obtained based on the attribute prediction value and the dequantized residual.
第二种是,基于帧内预测和DCT变换的,资源受限属性压缩方法,在该方法中,在编码量化后的变换系数时,有最大点数X(如4096)的限制,即最多每X点为一组进行编码。The second is a resource-constrained attribute compression method based on intra-frame prediction and DCT transform. In this method, when encoding the quantized transform coefficients, there is a limit of a maximum number of points X (such as 4096), that is, at most every X points are encoded as a group.
示例性的,在编码端,按照一定的顺序,例如点云原始采集顺序、莫顿顺序、希尔伯特顺序等处理点云中的点,先将整个点云分成长度最大为Y(如2)的若干小组,然后将这若干个小组组合成若干个大组(每个大组中的点数不超过X,如4096)。然后,采用预测算法得到属性预测值,根据属性值和属性预测值得到属性残差,以小组为单位对属性残差进行DCT变换,生成变换系数,再对变换系数进行量化,生成量化后的变换系数,最后以大组为单位对量化后的变换系数进行编码。Exemplarily, at the encoding end, the points in the point cloud are processed in a certain order, such as the original acquisition order of the point cloud, the Morton order, the Hilbert order, etc., and the entire point cloud is first divided into a number of small groups with a maximum length of Y (such as 2), and then the small groups are combined into a number of large groups (the number of points in each large group does not exceed X, such as 4096). Then, the prediction algorithm is used to obtain the attribute prediction value, and the attribute residual is obtained according to the attribute value and the attribute prediction value. The attribute residual is subjected to DCT transformation in small groups to generate transformation coefficients, and then the transformation coefficients are quantized to generate quantized transformation coefficients, and finally the quantized transformation coefficients are encoded in large groups.
在解码端,按照一定的顺序,例如点云原始采集顺序、莫顿顺序、希尔伯特顺序等处理点云中的点,先将整个点云分成长度最大为Y(如2)的若干小组,再将这若干个小组组合成若干个大组(每个大组中的点数不超过X,如4096),以大组为单位解码获取量化后的变换系数。接着,采用预测算法得到属性预测值,再以小组为单位对量化后的变换系数进行反量化、反变换,最后根据属性预测值和反量化、反变换后的系数,获得属性重建值。At the decoding end, the points in the point cloud are processed in a certain order, such as the original acquisition order of the point cloud, the Morton order, the Hilbert order, etc. First, the entire point cloud is divided into several small groups with a maximum length of Y (such as 2), and then these small groups are combined into several large groups (the number of points in each large group does not exceed X, such as 4096), and the quantized transformation coefficients are decoded in large groups. Next, the prediction algorithm is used to obtain the attribute prediction value, and then the quantized transformation coefficients are dequantized and inversely transformed in small groups. Finally, the attribute reconstruction value is obtained based on the attribute prediction value and the dequantized and inversely transformed coefficients.
第三种是,基于帧内预测和DCT变换的,资源不受限属性压缩方法,在该方法中,在编码量化后的变换系数时,没有最大点数X的限制,即所有系数一起进行编码。The third is a resource-infinite attribute compression method based on intra-frame prediction and DCT transformation. In this method, when encoding the quantized transformation coefficients, there is no limit on the maximum number of points X, that is, all coefficients are encoded together.
示例性的,在编码端,按照一定的顺序,例如点云原始采集顺序、莫顿顺序、希尔伯特顺序等处理点云中的点,先将整个点云分成长度最大为Y(如2)的若干小组。然后,采用预测算法得到属性预测值,根据属性值和属性预测 值得到属性残差,以小组为单位对属性残差进行DCT变换,生成变换系数,再对变换系数进行量化,生成量化后的变换系数,最后对整个点云的量化后的变换系数进行编码。For example, at the encoding end, the points in the point cloud are processed in a certain order, such as the original acquisition order of the point cloud, the Morton order, the Hilbert order, etc., and the entire point cloud is first divided into a number of small groups with a maximum length of Y (such as 2). Then, a prediction algorithm is used to obtain attribute prediction values, and attribute residuals are obtained according to the attribute values and the attribute prediction values. The attribute residuals are subjected to DCT transformation in small groups to generate transformation coefficients, and then the transformation coefficients are quantized to generate quantized transformation coefficients. Finally, the quantized transformation coefficients of the entire point cloud are encoded.
在解码端,按照一定的顺序,例如点云原始采集顺序、莫顿顺序、希尔伯特顺序等处理点云中的点,先将整个点云分成长度最大为Y(如2)的若干小组,解码获取整个点云的量化后的变换系数。然后,采用预测算法得到属性预测值,再以小组为单位对量化后的变换系数进行反量化、反变换,最后根据属性预测值和反量化、反变换后的系数,获得属性重建值。At the decoding end, the points in the point cloud are processed in a certain order, such as the original acquisition order of the point cloud, the Morton order, the Hilbert order, etc. The entire point cloud is first divided into several small groups with a maximum length of Y (such as 2), and the quantized transformation coefficients of the entire point cloud are obtained by decoding. Then, the prediction algorithm is used to obtain the attribute prediction value, and the quantized transformation coefficients are dequantized and inversely transformed in small groups. Finally, the attribute reconstruction value is obtained based on the attribute prediction value and the dequantized and inversely transformed coefficients.
第四种是,属性压缩采用基于多层小波变换的方法。The fourth one is that attribute compression adopts a method based on multi-layer wavelet transform.
示例性的,在编码端,对整个点云进行多层小波变换,生成变换系数,然后对变换系数进行量化,生成量化后的变换系数,最后对整个点云的量化后的变换系数进行编码。Exemplarily, at the encoding end, a multi-layer wavelet transform is performed on the entire point cloud to generate transform coefficients, and then the transform coefficients are quantized to generate quantized transform coefficients, and finally the quantized transform coefficients of the entire point cloud are encoded.
在解码端,解码获取整个点云的量化后的变换系数,然后对量化后的变换系数进行反量化、反变换,获得属性重建值。At the decoding end, decoding obtains the quantized transform coefficients of the entire point cloud, and then dequantizes and inversely transforms the quantized transform coefficients to obtain attribute reconstruction values.
上文是基于AVS编解码框架下的点云编解码器的基本流程,随着技术的发展,该框架或流程的一些模块或步骤可能会被优化,本申请适用于该基于AVS编解码框架下的点云编解码器的基本流程,但不限于该框架及流程。The above is the basic process of the point cloud codec based on the AVS 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 AVS codec framework, but is not limited to this framework and process.
下面对基于八叉树的几何编码和基于预测树的几何编码进行介绍。The following introduces octree-based geometric coding and prediction tree-based geometric coding.
基于八叉树的几何编码包括:首先对几何信息进行坐标转换,使点云全都包含在一个bounding box(包围盒)中。然后再进行量化,这一步量化主要起到缩放的作用,由于量化取整,使得一部分点的几何信息相同,根据参数来决定是否移除重复点,量化和移除重复点这一过程又被称为体素化过程。接下来,按照广度优先遍历的顺序不断对bounding box进行树划分(八叉树/四叉树/二叉树),对每个节点的占位码进行编码。在一种隐式几何的划分方式中,首先计算点云的包围盒
Figure PCTCN2022122117-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 PCTCN2022122117-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.
基于预测树的几何编码包括:首先对输入点云进行排序,目前采用的排序方法包括无序、莫顿序、方位角序和径向距离序。在编码端通过利用两种不同的方式建立预测树结构,其中包括: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颜色空间。然后,利用重建的几何信息对点云重新着色,使得未编码的属性信息与重建的几何信息对应起来。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.
目前在AVS的点云编解码中,对于八叉树中的每一个体素级的叶子节点,均需要编解码该叶子节点的重复点信息,但是并不是每一个叶子节点上均具有重复点,因此,对每一个叶子节点编解码重复点信息,增加了编解码的复杂度,浪费大量编解码时间,使得编解码效率低。Currently in the point cloud encoding and decoding of AVS, 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.
为了解决上述技术问题,本申请实施例在点云编解码中,例如在基于AVS的点云编解码中,在编解码点云的八叉树中第N-1层的当前节点时,首先确定当前节点对应的第一参数,该第一参数用于确定当前节点的至少一个非零子节点是否包括重复点,当前节点为点云的八叉树中第N-1层的一个非零节点,N为所述八叉树的总层数,进而基于该第一参数,对当前节点进行几何解码。例如,基于该第一参数确定当前节点的第i个非零子节点不包括重复点时,则跳过编解码该第i个非零子节点的重复点信息,进而降低了点云的编解码复杂度,节约了编解码时间,进而提升了编解码效率。In order to solve the above technical problems, in the embodiment of the present application, in point cloud encoding and decoding, for example, in point cloud encoding and decoding based on AVS, when encoding and decoding the current node of the N-1th layer in the octree of the point cloud, 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.
图5为本申请一实施例提供的点云解码方法流程示意图。本申请实施例的点云解码方法可以由上述图3或图4B所示的点云解码设备完成。Fig. 5 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. 4B.
如图5所示,本申请实施例的点云解码方法包括:As shown in FIG5 , 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.
其中,第一参数用于确定当前节点的至少一个非零子节点是否包括重复点,当前节点为点云的八叉树的第N-1层中的一个非零节点,八叉树是对点云进行节点划分得到,N为八叉树的总层数,N为大于1的正整数。Among them, 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 in the N-1th layer of the octree of the point cloud. The octree is obtained by node division of the point cloud. N is the total number of layers of the octree, and N is a positive integer greater than 1.
本申请实施例提出的点云解码方法可以应用于多种点云解码场景中。在一些实施例中,若本申请实施例的点云解码方法应用于AVS中时,则上述八叉树是基于AVS方式对点云进行节点划分得到。The point cloud decoding method proposed in the embodiment of the present application can be applied to a variety of point cloud decoding scenarios. In some embodiments, if the point cloud decoding method of the embodiment of the present application is applied to AVS, the above octree is obtained by dividing the point cloud into nodes based on the AVS method.
本申请实施例的点云可以理解为可以单独进行解码的点云块,或点云片。The point cloud of the embodiment of the present application can be understood as a point cloud block or point cloud slice that can be decoded individually.
例如,本申请实施例的点云为未进行划分的整个点云序列。For example, the point cloud in the embodiment of the present application is the entire point cloud sequence that has not been divided.
再例如,若本申请实施例基于参数配置来决定对点云序列进行划分时,则本申请实施例的点云可以理解为对整个点云序列划分成的至少一个slice(点云片)中的一个点云片。For another example, if the embodiment of the present application decides to divide the point cloud sequence based on parameter configuration, the point cloud of the embodiment of the present application can be understood as a point cloud slice in at least one slice into which the entire point cloud sequence is divided.
由上述可知,点云包括几何信息和属性信息,对点云的解码包括几何解码和属性解码。本申请实施例涉及点云的几何解码。也就是说,本申请实施例中涉及的已解码点指的是点云中几何信息已解码的点,未解码点指点云中几何信息未解码的点。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.
在一些实施例中,若当前点云在AVS几何编码中,只采用八叉树编码,未采用预测树编码,即预测树编码算法关闭。此时,编码端基于八叉树的编码方式,构建点云的八叉树结构。例如图6所示,使用最小长方体包围点云,首先对该包围盒进行八叉树划分,得到8个节点,对这8个节点中被占用的节点,即包括点的节点继续进行八叉树划分,以此类推,直到划分到体素级别位置,例如划分到1X1X1的正方体为止。这样划分得到的点云八叉树结构包括多层节点组成,例如包括N层,在编码时,逐层编码编码每一层的占位信息,直到编码完最后一层的体素级别的叶子节点为止。也就是说,在八叉树编码中,将点云通八叉树划分,最终将点云中的点划分到八叉树的体素级的叶子节点中,通过对整个八叉树进行编码,实现对点云的编码。In some embodiments, if the current point cloud only uses octree coding in AVS geometric coding, and does not use prediction tree coding, that is, the prediction tree coding algorithm is closed. At this time, the encoding end constructs the octree structure of the point cloud based on the octree coding method. For example, as shown in Figure 6, the point cloud is surrounded by the smallest cuboid, and the bounding box is first divided into octrees to obtain 8 nodes. The occupied nodes among these 8 nodes, that is, the nodes including the points, continue to be divided into octrees, and so on, until they are divided into voxel-level positions, for example, into 1X1X1 cubes. The point cloud octree structure obtained by such division includes multiple layers of nodes, for example, including 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 coding, 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. By encoding the entire octree, the encoding of the point cloud is realized.
对应的,解码端,首解码点云的几何码流,得到该点云的八叉树的根节点的占位信息,并基于该根节点的占位信息,确定出该根节点所包括的子节点,即八叉树的第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.
在一些实施例中,在当前点云的AVS几何编码中,编码端在采用八叉树编码的同时,可以采用预测树编码,即预测树编码算法关闭。此时,如图7所示,首先使用八叉树对点云的包围盒进行八叉树划分,划分到预设深度,例如划分到3层后,对于划分得到的每一个非零节点,确定该节点是采用预测树编码,还是采用八叉树编码。若确定该节点采用预测树编码时,则采用预测树编码方式对该节点所包括的点的几何信息进行预测树编码,例如确定第3层中的第一个节点采用预测树编码方式,则对该节点所包括的点进行排序,采用预设的预测树编码方法,对排序后的点构建预测树,例如构建L3C2单链。接着,基于预测树的结构,遍历预测树中的每个节点,通过选取不同的预测模式对节点的几何位置信息进行预测得到预测残差,并且利用量化参数对几何预测残差进行量化。最终通过不断迭代,对预测树节点位置信息的预测残差、预测树结构以及量化参数等进行编码。若确定该节点采用八叉树划分时,则采用八叉树划分方式,对该节点进行划分,直到划分到体素级别的叶子节点为止,并对八叉树中各节点的占位信息进行编码,形成几何码流。图7中灰色节点为非空节点。In some embodiments, in the AVS geometric coding of the current point cloud, the coding end can use prediction tree coding while using octree coding, that is, the prediction tree coding algorithm is turned off. At this time, as shown in Figure 7, the octree is first used to perform octree division on the bounding box of the point cloud, and the division is divided to a preset depth. For example, after division to 3 layers, for each non-zero node obtained by the division, it is determined whether the node is encoded by prediction tree or octree. If it is determined that the node is encoded by prediction tree, the prediction tree coding method is used to perform prediction tree coding on the geometric information of the points included in the node. For example, it is determined that the first node in the third layer uses the prediction tree coding method, then the points included in the node are sorted, and the preset prediction tree coding method is used to construct a prediction tree for the sorted points, such as constructing an L3C2 single chain. Then, based on the structure of the prediction tree, each node in the prediction tree is traversed, and 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, prediction tree structure and quantization parameter of the prediction tree node position information are encoded. If it is determined that the node is divided by octree, the octree partitioning method is used to divide the node until it is divided into leaf nodes at the voxel level, and the occupancy information of each node in the octree is encoded to form a geometric code stream. The gray nodes in Figure 7 are non-empty nodes.
可选的,若节点采用预测树编码方式进行编码时,则编码端通过一参数来指示该节点采用预测树编码方式进行编码。例如,在该参数可以为第一标志,编码端通过将该第一标志置为真来指示该节点采用预测树编码方式进行编码,例如将该第一标志置为1。这样,解码端通过解码该第一标志,确定该节点采用预测树编码方式进行编码,对应的,采用预测树解码方式对该节点进行几何解码,得到该节点所包括的点的几何重建值。Optionally, if the node is encoded using a prediction tree encoding method, the encoding end indicates that the node is encoded using the prediction tree encoding method through a parameter. For example, the parameter may be a first flag, and the encoding end indicates that the node is encoded using the prediction tree encoding method by setting the first flag to true, for example, setting the first flag to 1. In this way, the decoding end determines that the node is encoded using the prediction tree encoding method by decoding the first flag, and correspondingly, performs geometric decoding on the node using the prediction tree decoding method to obtain the geometric reconstruction values of the points included in the node.
在该实施例中,解码端解码点云的几何码流,得到八叉树中节点的占位信息,并基于占位信息重建八叉树,如图8所示,在构建到第3层后,在八叉树的重建过程中,若确定某一个节点采用预测树编码时,例如解码得到该节点对应的第一标志的值置为真,则确定该节点采用预测树编码。这样解码端采用预测树解码方式对该节点进行几何解码,得到该节点所包括的点的几何重建值。若确定节点采用八叉树编码时,则基于该节点的占位信息,对该节点进行八叉树重建,直到体素级的叶子节点为止。In this embodiment, the decoding end decodes the geometric code stream of the point cloud, obtains the placeholder information of the nodes in the octree, and reconstructs the octree based on the placeholder information. As shown in FIG8 , after the third layer is constructed, in the process of reconstructing the octree, if it is determined that a certain node adopts prediction tree coding, for example, the value of the first flag corresponding to the node obtained by decoding is set to true, then it is determined that the node adopts prediction tree coding. In this way, the decoding end uses the prediction tree decoding method to perform geometric decoding on the node and obtains the geometric reconstruction value of the point included in the node. If it is determined that the node adopts octree coding, the octree is reconstructed on the node based on the placeholder information of the node until the leaf node at the voxel level.
由上述图6和图7可知,在AVS的点云几何编码中,无论是否开启预测树编码,则点云中至少部分点采用了八叉树划分,最终划分到体素级的叶子节点中。It can be seen from the above Figures 6 and 7 that in the point cloud geometry coding of AVS, regardless of whether the prediction tree coding is turned on, at least some points in the point cloud are divided into octrees and finally divided into leaf nodes at the voxel level.
在一些实施例中,由于点云中的有些点的坐标信息相同,因此,这些坐标相同的点被划分到八叉树的同一个叶子节点上,使得该叶子节点包括重复点。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层的节点时,不仅解码该节点的占位信息,还解码该节点的非零子节点的重复点信息。这样会增加解码的复杂度,浪费解码时间,降低解码效率。Currently, when encoding the node of the N-1th layer of the octree (i.e., the second to last 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, or an occupied node. 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.
在一些实施例中,编码端将点云的总点数写入点云的几何单元头部(geometry brick header,简称gbh)中。这样,解码端通过解码点云的几何单元头部,得到点云的总点数。In some embodiments, the encoder writes the total number of points of the point cloud into the geometry brick header (gbh) of the point cloud. In this way, the decoder obtains the total number of points of the point cloud by decoding the geometry brick header of the point cloud.
在一些实施例中,由于点云至少包括一个点,为了节约码字,则编码端在编码点云的总点数时,将点云的点数划分为片所含点数低位部分num_points_lower和片所含点数高位部分num_points_upper,将num_points_lower和num_points_upper写入几何单元头部中。对应的,解码端在解码时,解码几何单元头部,得到num_points_lower和num_points_upper,接着将num_points_upper和um_points_lower相加,得到点云的总点数。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 divides the number of points in the point cloud into the low-order part num_points_lower of the number of points contained in the slice and the high-order part num_points_upper of the number of points contained in the slice, and writes num_points_lower and num_points_upper into the geometry unit header. Correspondingly, when decoding, the decoder decodes the geometry unit header to obtain num_points_lower and num_points_upper, and then adds num_points_upper and um_points_lower to obtain the total number of points in the point cloud.
在一种示例中,几何单元头部的参数具体如表2所示:In one example, the parameters of the geometry unit head are specifically shown in Table 2:
表2Table 2
Figure PCTCN2022122117-appb-000003
Figure PCTCN2022122117-appb-000003
表2中,num_points_upper和num_points_lower,用于指定点云的总点数。In Table 2, num_points_upper and num_points_lower are used to specify the total number of points in the point cloud.
也就是说,解码端通过解码表2所示的num_points_upper和num_points_lower,得到点云的总点数。That is to say, the decoding end obtains the total number of points of the point cloud by decoding num_points_upper and num_points_lower shown in Table 2.
在一些实施例中,num_points_upper,无符号整数。表示片所含点数高于16位的位数。num_points_lower,无符号整数。表示片所含点数低16位。此时,解码端基于如下公式(1),确定点云的总点数:In some embodiments, num_points_upper, an unsigned integer, indicates the number of bits of points in the slice that are higher than 16 bits. num_points_lower, an unsigned integer, indicates the lower 16 bits of points in the slice. At this time, the decoder determines the total number of points in the point cloud based on the following formula (1):
num_points=((num_points_upper<<16)+num_points_lower)  (1)num_points=((num_points_upper<<16)+num_points_lower)  (1)
其中,num_points为点云的总点数。Among them, num_points is the total number of points in the point cloud.
同理,本申请实施例对确定点云的八叉树的第N-1层的非零节点数的方式不做限制。Similarly, the embodiment of the present application does not limit the method for 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=num_points–nodeCount   (4)resPointCount=num_points–nodeCount   (4)
其中,resPointCount为当前节点对应的第一参数,num_points为点云的总点数,nodeCount为点云的八叉树的第N-1层包括的节点个数。Among them, resPointCount is the first parameter corresponding to the current node, num_points 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 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 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个非零子节点为例进行说明。From the above, it can be seen 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 sake of ease of description, the i-th non-zero child node of the current node is taken as an example for explanation.
在该情况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 first 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 second parameter corresponding to the i-th non-zero subnode by determining the first number of decoded points corresponding to the i-th non-zero subnode in the point cloud and based on the first number of decoded points corresponding to the i-th non-zero subnode in the point cloud. For example, the first number of decoded points corresponding to the i-th non-zero subnode in the point cloud is determined as the second parameter corresponding to the i-th non-zero subnode.
在该实施例中,第i个非零子节点对应的第一已解码点个数可以理解为在确定是否解码当前节点的第i个非零子节点的重复点信息时,解码端当前已解码出的点的个数总和。In this embodiment, the first number of decoded points corresponding to the i-th non-zero child node can be understood as the total number of points currently decoded by the decoding end when determining whether to decode the repeated point information of the i-th non-zero child node of the current node.
在一些实施例中,解码端在解码时启动一计数器,该计数器用于实时记录已解码点的个数,这样在解码第i个非零子节点时,可以从该计数器处得到第i个非零子节点对应的第一已解码点个数。In some embodiments, the decoding end starts a counter during decoding, and the counter is used to record the number of decoded points in real time, so that when decoding the i-th non-zero child node, the first decoded point number corresponding to the i-th non-zero child node can be obtained from the counter.
在一些实施例中,在解码第i个非零子节点时,则解码端通过如下步骤,确定第i个非零子节点对应的第一已解码点个数:In some embodiments, when decoding the i-th non-zero child node, the decoding end determines the number of first decoded points corresponding to the i-th non-zero child node through the following steps:
S102-A11-1、确定第i个非零子节点对应的第三已解码点个数;S102-A11-1. Determine the number of third decoded points corresponding to the i-th non-zero child node;
S102-A11-2、基于第三已解码点个数,确定第一已解码点个数。S102-A11-2. Determine the number of first decoded points based on the number of third decoded points.
其中,上述第三已解码点可以理解为该八叉树的叶子节点中的已解码点。解码端通过确定第i个非零子节点之前的已解码叶子节点所包括的点的个数,确定该第i个非零子节点对应的第一已解码点个数。The third decoded point can be understood as a decoded point in the leaf node of the octree. The decoding end determines the number of first decoded points corresponding to the i-th non-zero child node by determining the number of points included in the decoded leaf node before the i-th non-zero child node.
上述S102-A11-1中确定第i个非零子节点对应的第三已解码点个数的实现方式包括但不限于如下几种:The implementation methods for determining the number of the third decoded points corresponding to the i-th non-zero child node in the above S102-A11-1 include but are not limited to the following:
方式一,若当前节点为第N-1层中的第一个非零节点,则上述S102-A11-1包括如下S102-A11-1-a1和S102-A11-1-a2的步骤:Method 1: if the current node is the first non-zero node in the N-1th layer, the above S102-A11-1 includes the following steps S102-A11-1-a1 and S102-A11-1-a2:
S102-A11-1-a1、确定当前节点的非零子节点个数;S102-A11-1-a1, determine the number of non-zero child nodes of the current node;
S102-A11-1-a2、基于当前节点的非零子节点个数,确定第i个非零子节点对应的第三已解码点个数。S102-A11-1-a2. Determine the number of third decoded points corresponding to the i-th non-zero child node based on the number of non-zero child nodes of the current 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 third 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 third 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-1-a2中基于当前节点的非零子节点个数,确定第i个非零子节点对应的第三已解码点个数的方式包括但不限于如下几种:Among them, the methods for determining the number of third 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-1-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 third 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 third number of decoded points corresponding to the i-th non-zero child node, for example, the third 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 of the current node that are located before the i-th non-zero child 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 third 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 i-th 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 third 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 of the current node that are located before the i-th non-zero child 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 third 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 the third decoded points corresponding to the i-th non-zero child node in the current node through the following instructions:
Figure PCTCN2022122117-appb-000004
Figure PCTCN2022122117-appb-000004
其中,codedCount为当前节点中的第i个非零子节点对应的第三已解码点个数,codedCount初始化为0,nodeCount为八叉树的第N-1层中的节点个数,childCount为第N-1层中的节点所包括的非零子节点个数,dupPointNum为非零子节点所包括的重复点个数。Among them, codedCount is the number of the third 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 the third decoded points corresponding to the i-th non-zero child node of the current node is introduced.
方式二,若当前节点不是第N-1层中的第一个非零节点,则上述S102-A11-1包括如下S102-A11-1-b1至S102-A11-1-b3的步骤:Method 2: If the current node is not the first non-zero node in the N-1th layer, the above S102-A11-1 includes the following steps S102-A11-1-b1 to S102-A11-1-b3:
S102-A11-1-b1、确定第N-1层中位于当前节点之前的各非零节点对应的已解码点的个数;S102-A11-1-b1, determine the number of decoded points corresponding to each non-zero node before the current node in the N-1th layer;
S102-A11-1-b2、确定当前节点的非零子节点个数;S102-A11-1-b2, determine the number of non-zero child nodes of the current node;
S102-A11-1-b3、基于第N-1层中位于当前节点之前的各非零节点对应的已解码点的个数,以及当前节点的非零子节点个数,确定第i个非零子节点对应的第三已解码点个数。S102-A11-1-b3. 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, determine the third number of decoded points corresponding to the i-th non-zero child 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 third 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 third 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-1-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-1-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 of a non-zero node and the number of second repeated points included in the non-zero child nodes of the non-zero node for a 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 second 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 second 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 third 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 third 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-1-b3包括如下S102-A11-1-b31和S102-A11-1-b32的步骤:In some embodiments, the above S102-A11-1-b3 includes the following steps S102-A11-1-b31 and S102-A11-1-b32:
S102-A11-1-b31、将第N-1层中位于当前节点之前的各非零节点对应的已解码点的个数进行相加,得到第一和值;S102-A11-1-b31, adding the numbers of decoded points corresponding to each non-zero node before the current node in the N-1th layer to obtain a first sum value;
S102-A11-1-b32、基于第一和值和当前节点的非零子节点个数,确定第i个非零子节点对应的第三已解码点个数。S102-A11-1-b32. Determine the number of third 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 third 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 third number of decoded points corresponding to the i-th non-zero child node.
其中,上述S102-A11-1-b32中基于第一和值和当前节点的非零子节点个数,确定第i个非零子节点对应的第三已解码点个数的实现方式至少包括如下两种方式:Among them, the implementation method of determining the number of third 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 in the above S102-A11-1-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 third 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 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 third 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 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, 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 value is 4. Then, the first sum value 4 is added to the number of non-zero child nodes of the current node 3, and the second sum value 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 third 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 third 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, 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 the third decoded points corresponding to the i-th non-zero child node is 1+5=6.
基于上述步骤,确定出第i个非零子节点对应的第三已解码点个数后,执行S102-A11-2的步骤,基于第三已解码点个数,确定第一已解码点个数。After determining the third number of decoded points corresponding to the i-th non-zero child node based on the above steps, execute step S102-A11-2 to determine the first number of decoded points based on the third number of decoded points.
针对一孤立点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个非零子节点对应的第一已解码点个数有影响。下面针对点云采用DCM与不采用IDCM时,对第i个非零子节点对应的第一已解码点个数的影响过程进行介绍。In the embodiment of the present application, when the point cloud adopts IDCM and does not adopt IDCM, it has an impact on the number of first decoded points corresponding to the i-th non-zero child node in the point cloud. The following describes the impact process of the number of first decoded points corresponding to the i-th non-zero child node when the point cloud adopts DCM and does not adopt IDCM.
在一些实施例中,若点云未采用IDCM,则对第i个非零子节点对应的第三已解码点个数,确定为第i个非零子节点对应的第一已解码点个数。In some embodiments, if the point cloud does not use IDCM, the third number of decoded points corresponding to the i-th non-zero child node is determined as the first number of decoded points corresponding to the i-th non-zero child node.
在该实施例中,若点云未采用IDCM,即IDCM关闭,此时说明在八叉树编码时,八叉树中的每个节点均未采用直接编码方式,因此,在解码当前节点时,八叉树中除了上述确定的第i个非零子节点对应的第三已解码点外,不包括其他第一已解码点。其中,第一已解码点可以理解为八叉树的叶子节点中几何位置已解码出的点。此时,直接将上述确定的第i个非零子节点对应的第三已解码点个数,确定为第i个非零子节点对应的第一已解码点个数。In this embodiment, 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 does not use direct encoding. Therefore, when decoding the current node, the octree does not include other first decoded points except the third decoded point corresponding to the i-th non-zero child node determined above. Among them, the first decoded point can be understood as a point whose geometric position has been decoded in the leaf node of the octree. At this time, the number of the third decoded points corresponding to the i-th non-zero child node determined above is directly determined as the number of the first decoded points corresponding to the i-th non-zero child node.
在一些实施例中,若点云采用IDCM,则确定八叉树中已解码的采用IDCM的第二节点所包括的点个数;将采用IDCM的第二节点所包括的点个数和上述确定的第i个非零子节点对应的第三已解码点个数进行相加,得到第i个非零子节点对应的新的第一已解码点个数。In some embodiments, if the point cloud adopts IDCM, the number of points included in the second node using IDCM that has been decoded in the octree is determined; the number of points included in the second node using IDCM and the third number of decoded points corresponding to the i-th non-zero child node determined above are added to obtain a new first number of decoded points corresponding to the i-th non-zero child node.
在该实施例中,若点云采用IDCM,即IDCM开启,此时,说明点云的八叉树中可能有至少一个节点采用直接编码方式,将该节点所包括点的几何信息直接进行编码。对应的,解码时,直接解码得到该节点所包括点的几何信息。这样在确定第i个非零子节点对应的第二已解码点时,需要将八叉树中采用IDCM的已解码节点(即第二节点)所包括的点的个数,与上述确定的第i个非零子节点对应的第三已解码点个数进行相加。In this embodiment, if the point cloud adopts IDCM, that is, IDCM is turned on, then it means that at least one node in the octree of the point cloud may adopt 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 decoded point corresponding to the i-th non-zero child node, it is necessary to add the number of points included in the decoded node (i.e., the second node) using IDCM in the octree to the number of the third decoded points corresponding to the i-th non-zero child node determined above.
举例说明,假设点云的八叉树中,有1个节点采用IDCM,假设这采用IDCM的节点包括1个点,假设在解码当前节点之前,采用IDCM的节点均已解码完成。因此,可以确定出八叉树中采用IDCM的节点所包括的点个数为1。将这一个已解码点加到上述确定的第i个非零子节点对应的第三已解码点中。For example, suppose that in the octree of the point cloud, there is a node using IDCM, suppose that this node using IDCM includes 1 point, and suppose that before decoding the current node, all nodes using IDCM have been decoded. Therefore, it can be determined that the number of points included in the node using IDCM in the octree is 1. This decoded point is added to the third decoded point corresponding to the i-th non-zero child node determined above.
在该实施例的一种示例中,解码端通过如下指令,确定为第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:
Figure PCTCN2022122117-appb-000005
Figure PCTCN2022122117-appb-000005
其中,pointCountIDCM表示八叉树中采用IDCM的已解码节点所包括的点个数。在该实施例中,基于当前节点所包括的非零子节点的个数childCount,以及当前节点中第i个子节点之前已解码的重复点个数dupPointNum,确定 出可以第i个非零子节点对应的第三已解码点个数codedCount后,对codedCount加上八叉树中采用IDCM的已解码节点所包括的点个数pointCountIDCM,得到第i个非零子节点对应的第一已解码点个数。Wherein, pointCountIDCM represents the number of points included in the decoded 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 third number of decoded points codedCount corresponding to the i-th non-zero child node, the number of points pointCountIDCM included in the decoded node using IDCM in the octree is added to codedCount to obtain the first number of decoded points corresponding to the i-th non-zero child node.
解码端基于上述S102-A11步骤,确定出当前节点的第i个非零子节点对应的第一已解码点个数后,执行如下S102-A12的步骤。After the decoding end determines the number of first 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 first 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 first 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 first 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 that have been 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.
由上述可知,在AVS几何编码中,可以采用八叉树进行编码,以及采用八叉树和预测树结合的方式进行编码。From the above, it can be seen that in AVS geometric coding, octree can be used for coding, and octree and prediction tree can be combined for coding.
本申请实施例中,点云采用预测树编码与不采用预测树编码时,基于点云中第i个非零子节点对应的第一已解码点个数,确定第i个非零子节点对应的第二参数的方式不相同。下面针对点云采用预测树编码与不采用预测树编码时,确定第i个非零子节点对应的第二参数的具体过程进行介绍。In the embodiment of the present application, when the point cloud adopts prediction tree coding and when the prediction tree coding is not adopted, the method of determining the second parameter corresponding to the i-th non-zero subnode based on the number of first decoded points corresponding to the i-th non-zero subnode in the point cloud is different. The specific process of determining the second parameter corresponding to the i-th non-zero subnode when the point cloud adopts prediction tree coding and when the prediction tree coding is not adopted is introduced below.
本申请实施例中,基于点云中第i个非零子节点对应的第一已解码点个数,确定第i个非零子节点对应的第二参数至少包括如下几种方式:In the embodiment of the present application, based on the number of first 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,将第一已解码点个数,确定为第二参数。Method 1: The number of first decoded points is determined as the second parameter.
在AVS的几何编码中,若点云采用预测树编码方式,即预测树编码方式关闭,此时,点云中第i个非零子节点对应的已解码点中,除了上述实施例确定的第i个非零子节点对应的第一已解码点外,不包括其他的已解码点。在该情况下,在解码当前节点的第i个非零子节点时,基于上述步骤,确定出第i个非零子节点对应的第一已解码点个数,并将该第i个非零子节点对应的第一已解码点个数,确定为第i个非零子节点对应的第二参数。In the geometric coding of AVS, if the point cloud adopts the prediction tree coding method, that is, the prediction tree coding method is turned off, then, among the decoded points corresponding to the i-th non-zero child node in the point cloud, except for the first decoded point corresponding to the i-th non-zero child node determined in the above embodiment, no other decoded points are included. In this case, when decoding the i-th non-zero child node of the current node, based on the above steps, the number of the first decoded points corresponding to the i-th non-zero child node is determined, and the number of the first 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.
方式2,若点云采用预测树编码方式,则上述S102-A12包括如下S102-A121和S102-A122的步骤:Mode 2: If the point cloud adopts the prediction tree encoding method, the above S102-A12 includes the following steps S102-A121 and S102-A122:
S102-A121、确定八叉树中采用预测树编码方式的第一节点所包括的第二已解码点个数;S102-A121, determining the number of second decoded points included in the first node of the octree using the prediction tree coding method;
S102-A122、将第一已解码点个数和第二已解码点个数之和,确定为第二参数。S102-A122. Determine the sum of the first number of decoded points and the second number of decoded points as a second parameter.
在该方式2中,若点云采用预测树编码方式,即预测树编码方式开启,此时,说明点云的八叉树中可能有至少一个节点采用预测树编码方式,将该节点所包括点采用预测树编码方式进行编码。例如图7所示,对点云八叉树中第3层的第一个节点采用预测树编码方式,例如对该节点所包括的点进行排序,采用预设的预测树编码方法,对排序后的点构建预测树,例如构建L3C2单链。接着,基于预测树的结构,遍历预测树中的每个节点,通过选取不同的预测模式对节点的几何位置信息进行预测得到预测残差,并且利用量化参数对几何预测残差进行量化后编码,形成几何码流。In this method 2, if the point cloud adopts the prediction tree coding method, that is, the prediction tree coding method is turned on, at this time, it means that there may be at least one node in the octree of the point cloud that adopts the prediction tree coding method, and the points included in the node are encoded using the prediction tree coding method. For example, as shown in Figure 7, the prediction tree coding method is adopted for the first node of the third layer in the point cloud octree, for example, the points included in the node are sorted, and the preset prediction tree coding method is adopted to construct a prediction tree for the sorted points, for example, an L3C2 single chain is constructed. Then, based on the structure of the prediction tree, each node in the prediction tree is traversed, and 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 and encoded using the quantization parameter to form a geometric code stream.
对应的,解码端在解码该节点时,采用预测树解码方式对该节点进行几何解码,得到该节点所包括的点的几何重建值。也就是说,本申请实施例中,由于通过广度优先原则对八叉树进行遍历,采用预测树编码的节点在八叉树中的位置,在当前节点之前,即在解码当前节点时,该采用预测树编码的节点已解码完成。因此,在确定当前节点的第i个非零子节点对应的第二参数时,不仅需要确定上述第i个非零子节点对应的第一已解码点个数,还需要确定八叉树中采用预测树编码的第一节点所包括的已解码点个数,为了便于描述,将采用预测树编码的第一节点所包括的已解码点个数记为第二已解码点个数。进而,将第i个非零子节点对应的第一已解码点个数,与八叉树中采用预测树编码方式的第一节点所包括的第二已解码点个数进行相加,将相加后的结果确定为第i个非零子节点对应的第二参数。Correspondingly, when decoding the node, the decoding end uses the prediction tree decoding method to geometrically decode the node to obtain the geometric reconstruction value of the point included in the node. That is to say, in the embodiment of the present application, since the octree is traversed by the breadth-first principle, the position of the node encoded by the prediction tree in the octree is before the current node, that is, when decoding the current node, the node encoded by the prediction tree has been decoded. Therefore, when determining the second parameter corresponding to the i-th non-zero child node of the current node, it is necessary not only to determine the first number of decoded points corresponding to the above-mentioned i-th non-zero child node, but also to determine the number of decoded points included in the first node encoded by the prediction tree in the octree. For the convenience of description, the number of decoded points included in the first node encoded by the prediction tree is recorded as the second number of decoded points. Furthermore, the first number of decoded points corresponding to the i-th non-zero child node is added to the second number of decoded points included in the first node encoded by the prediction tree in the octree, and the result of the addition is determined as the second parameter corresponding to the i-th non-zero child node.
在该方式2的一种示例中,解码端通过如下指令,确定为第i个非零子节点对应的第二参数:In an example of the second method, the decoder determines the second parameter corresponding to the i-th non-zero child node through the following instruction:
Figure PCTCN2022122117-appb-000006
Figure PCTCN2022122117-appb-000006
其中,pointCountPred表示八叉树中采用预测树编码的已解码的第一节点所包括的点个数,即第二已解码点个数。在该实施例中,基于当前节点所包括的非零子节点的个数childCount,以及当前节点中第i个子节点之前已解码的重复点个数dupPointNum,确定出可以第i个非零子节点对应的第一已解码点个数codedCount后,对codedCount加上八叉树中第二已解码点个数pointCountIDCM,得到第i个非零子节点对应的第二参数。Wherein, pointCountPred represents the number of points included in the decoded first node encoded by the prediction tree in the octree, that is, the second number of decoded points. In this embodiment, based on the number of non-zero child nodes childCount included in the current node and the number of repeated points dupPointNum decoded before the i-th child node in the current node, after determining the first number of decoded points codedCount corresponding to the i-th non-zero child node, the second number of decoded points pointCountIDCM 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。在该实施例中,假设点云不采用预测树编码,则将第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 first 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 prediction tree encoding, the first 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。在该实施例中,假设点云不采用预测树编码,则将第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 the first 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 prediction tree encoding, the first 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。在该实施例中,假设点云不采用预测树编码,则将第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 first 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 prediction tree encoding, the first number of decoded 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 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 third 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 third 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 third 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 two non-zero child nodes before the i-th non-zero child node. Assuming that one of the two non-zero child nodes includes two repeated points and the other non-zero child node includes one repeated point, it can be determined that the sum of the third decoded repeated points is 2+1=3.
基于上述步骤,确定出八叉树中位于第i个非零子节点之前的各非零子节点所包括的第三已解码重复点个数之和后,基于该第三已解码重复点个数之和,确定第i个非零子节点对应的已解码重复点总数。Based on the above steps, after determining the sum of the third 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 third 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 third number of decoded repeated points in the above S101-B12 include at least the following two methods:
方式1,若点云采用预测树编码方式,则确定八叉树中采用预测树编码方式的第一节点所包括的第四已解码重复点个数之和;基于第三已解码重复点个数之和,以及第四已解码重复点个数之和,确定第i个非零子节点对应的已解码重复点总数。Method 1: If the point cloud adopts the prediction tree encoding method, the sum of the fourth number of decoded repeated points included in the first node in the octree that adopts the prediction tree encoding method is determined; based on the sum of the third number of decoded repeated points and the sum of the fourth number of decoded repeated points, the total number of decoded repeated points corresponding to the i-th non-zero child node is determined.
在该方式1中,若点云采用预测编码方式,由上述可知,解码端在解码当前节点之前,完成对八叉树中采用预测树编码的节点。这样可以获取八叉树中采用预测树编码方式的第一节点所包括的第四已解码重复点个数之和,进而基于第三已解码重复点个数之和,以及第四已解码重复点个数之和,确定第i个非零子节点对应的已解码重复点总数。In this method 1, if the point cloud adopts the predictive coding method, it can be known from the above that the decoding end completes the node in the octree that adopts the predictive tree coding method before decoding the current node. In this way, the sum of the fourth number of decoded repeated points included in the first node in the octree that adopts the predictive tree coding method can be obtained, and then based on the sum of the third number of decoded repeated points and the sum of the fourth number of decoded repeated points, the total number of decoded repeated points corresponding to the i-th non-zero child node is determined.
在一些实施例中,若点云未采用IDCM编码,则将第三已解码重复点个数之和,以及第四已解码重复点个数之和,确定第i个非零子节点对应的已解码重复点总数。In some embodiments, if the point cloud is not encoded using IDCM, the sum of the third number of decoded duplicate points and the sum of the fourth number of decoded duplicate points are used to determine the total number of decoded duplicate points corresponding to the i-th non-zero child node.
在一些实施例中,若点云采用推断直接编码模式IDCM时,基于所述第三已解码重复点个数之和、以及所述第四已解码重复点个数之和,确定所述第i个非零子节点对应的已解码重复点总数,包括:确定八叉树中采用IDCM的第二节点所包括的第五已解码重复点个数之和;将第三已解码重复点个数之和、第四已解码重复点个数之和、以及第五已解码重复点个数之和,确定第i个非零子节点对应的已解码重复点总数。In some embodiments, if the point cloud adopts the inferred direct coding mode IDCM, the total number of decoded duplicate points corresponding to the i-th non-zero child node is determined based on the sum of the third number of decoded duplicate points and the sum of the fourth number of decoded duplicate points, including: determining the sum of the fifth number of decoded duplicate points included in the second node using IDCM in the octree; and determining the total number of decoded duplicate points corresponding to the i-th non-zero child node by adding the sum of the third number of decoded duplicate points, the sum of the fourth number of decoded duplicate points, and the sum of the fifth number of decoded duplicate points.
方式2,若点云未采用预测树编码方式,则基于第三已解码重复点个数之和,确定第i个非零子节点对应的已解码重复点总数。Method 2: If the point cloud does not adopt the prediction tree encoding method, the total number of decoded repeated points corresponding to the i-th non-zero child node is determined based on the sum of the third number of decoded repeated points.
在方式2的一种实现方式中,若点云未采用预测树编码方式,且未采用IDCM编码方式,则将上述确定的基于第三已解码重复点个数之和,确定第i个非零子节点对应的已解码重复点总数。In one implementation of method 2, if the point cloud does not use the prediction tree encoding method and does not use the IDCM encoding method, the total number of decoded repeated points corresponding to the i-th non-zero child node is determined based on the sum of the third number of decoded repeated points.
在方式2的另一种实现方式中,若点云未采用预测树编码方式,且采用IDCM编码方式,则确定八叉树中采用IDCM的第二节点所包括的第五已解码重复点个数之和,将第五已解码重复点个数之和与第三已解码重复点个数之和进行相加,得到第i个非零子节点对应的已解码重复点总数。In another implementation of method 2, if the point cloud does not use the prediction tree encoding method and uses the IDCM encoding method, then the sum of the fifth decoded duplicate points included in the second node using IDCM in the octree is determined, and the sum of the fifth decoded duplicate points is added to the sum of the third decoded duplicate points to obtain the total number of decoded duplicate points corresponding to the i-th non-zero child node.
基于上述方法,确定出第i个非零子节点对应的已解码重复点总数后,将第i个非零子节点对应的已解码重复点总数,确定为第一参数。Based on the above method, after the total number of decoded repeated points corresponding to the i-th non-zero child node is determined, the total number of decoded repeated points corresponding to the i-th non-zero child node is determined as 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个非零子节点的重复点信息,进而降低了点云的解码复杂度,节约了解码时间,进而提升了解码效率。In some embodiments, 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, 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, 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个非零子节点所包括的重复点个数。In some embodiments, 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个非零子节点的重复点信息。In some embodiments, 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.
本申请实施例提供的点云解码方法,在点云解码中,例如在基于AVS的点云解码中,在解码八叉树中第N-1层的当前节点时,首先确定当前节点对应的第一参数,该第一参数用于确定当前节点的至少一个非零子节点是否包括重复点,当前节点为点云的八叉树中第N-1层的一个非零节点,N为所述八叉树的总层数,进而基于该第一参数,对当前节点进行几何解码。例如,基于该第一参数确定当前节点的第i个非零子节点不包括重复点时,则跳过解码该第i个非零子节点的重复点信息,进而降低了点云的解码复杂度,节约了解码时间,进而提升了解码效率。The point cloud decoding method provided by the embodiment of the present application, in point cloud decoding, for example, in point cloud decoding based on AVS, 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, 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 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 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.
其中,第一参数用于确定当前节点的至少一个非零子节点是否包括重复点,当前节点为点云的八叉树的第N-1层中的一个非零节点,八叉树是基于对点云进行节点划分得到,N为八叉树的总层数,N为大于1的正整数。Among them, 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 in the N-1th layer of the octree of the point cloud. The octree is obtained based on node division of the point cloud. N is the total number of layers of the octree, and N is a positive integer greater than 1.
本申请实施例提出的点云编码方法可以应用于多种点云编码场景中。在一些实施例中,若本申请实施例的点云编码方法应用于AVS中时,则上述八叉树是基于AVS方式对点云进行节点划分得到。The point cloud coding method proposed in the embodiment of the present application can be applied to a variety of point cloud coding scenarios. In some embodiments, if the point cloud coding method of the embodiment of the present application is applied to AVS, the above octree is obtained by dividing the point cloud into nodes based on the AVS method.
本申请实施例的点云可以理解为可以单独进行编码的点云块,或点云片。The point cloud of the embodiment of the present application can be understood as a point cloud block or point cloud slice that can be encoded individually.
例如,本申请实施例的点云为未进行划分的整个点云序列。For example, the point cloud in the embodiment of the present application is the entire point cloud sequence that has not been divided.
再例如,若本申请实施例基于参数配置来决定对点云序列进行划分时,则本申请实施例的点云可以理解为对整个点云序列划分成的至少一个slice(点云片)中的一个点云片。For another example, if the embodiment of the present application decides to divide the point cloud sequence based on parameter configuration, the point cloud of the embodiment of the present application can be understood as a point cloud slice in at least one slice into which the entire point cloud sequence is divided.
由上述可知,点云包括几何信息和属性信息,对点云的编码包括几何编码和属性编码。本申请实施例涉及点云的几何编码。也就是说,本申请实施例中涉及的已编码点指的是点云中几何信息已编码的点,未编码点指点云中几何信息未编码的点。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.
在一些实施例中,若当前点云在AVS几何编码中,只采用八叉树编码,未采用预测树编码,即预测树编码算法关闭。此时,编码端基于八叉树的编码方式,构建点云的八叉树结构。例如图6所示,使用最小长方体包围点云,首先对该包围盒进行八叉树划分,得到8个节点,对这8个节点中被占用的节点,即包括点的节点继续进行八叉树划分,以此类推,直到划分到体素级别位置,例如划分到1X1X1的正方体为止。这样划分得到的点云八叉树结构包括多层节点组成,例如包括N层,在编码时,逐层编码编码每一层的占位信息,直到编码完最后一层的体素级别的叶子节点为止。也就是说,在八叉树编码中,将点云通八叉树划分,最终将点云中的点划分到八叉树的体素级的叶子节点中,通过对整个八叉树进行编码,实现对点云的编码。In some embodiments, if the current point cloud only uses octree coding in AVS geometric coding, and does not use prediction tree coding, that is, the prediction tree coding algorithm is closed. At this time, the encoding end constructs the octree structure of the point cloud based on the octree coding method. For example, as shown in Figure 6, the point cloud is surrounded by the smallest cuboid, and the bounding box is first divided into octrees to obtain 8 nodes. The occupied nodes among these 8 nodes, that is, the nodes including the points, continue to be divided into octrees, and so on, until they are divided into voxel-level positions, for example, into 1X1X1 cubes. The point cloud octree structure obtained by such division includes multiple layers of nodes, for example, including 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 coding, 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. By encoding the entire octree, the encoding of the point cloud is realized.
在一些实施例中,在当前点云的AVS几何编码中,编码端在采用八叉树编码的同时,可以采用预测树编码,即预测树编码算法关闭。此时,如图7所示,首先使用八叉树对点云的包围盒进行八叉树划分,划分到预设深度,例如划分到3层后,对于划分得到的每一个非零节点,确定该节点是采用预测树编码,还是采用八叉树编码。若确定该节点采用预测树编码时,则采用预测树编码方式对该节点所包括的点的几何信息进行预测树编码,例如确定第3层中的第一个节点采用预测树编码方式,则对该节点所包括的点进行排序,采用预设的预测树编码方法,对排序后的点构建预测树,例如构建L3C2单链。接着,基于预测树的结构,遍历预测树中的每个节点,通过选取不同的预测模式对节点的几何位置信息进行预测得到预测残差,并且利用量化参数对几何预测残差进行量化。最终通过不断迭代,对预测树节点位置信息的预测残差、预测树结构以及量化参数等进行编码。若确定该节点采用八叉树划分时,则采用八叉树划分方式,对该节点进行划分,直到划分到体素级别的叶子节点为止,并对八叉树中各节点的占位信息进行编码,形成几何码流。In some embodiments, in the AVS geometric coding of the current point cloud, the coding end can use prediction tree coding while using octree coding, that is, the prediction tree coding algorithm is turned off. At this time, as shown in Figure 7, the octree is first used to perform octree division on the bounding box of the point cloud, and the division is divided to a preset depth. For example, after division to 3 layers, for each non-zero node obtained by the division, it is determined whether the node is encoded by prediction tree or octree. If it is determined that the node is encoded by prediction tree, the prediction tree coding method is used to perform prediction tree coding on the geometric information of the points included in the node. For example, it is determined that the first node in the third layer uses the prediction tree coding method, then the points included in the node are sorted, and the preset prediction tree coding method is used to construct a prediction tree for the sorted points, such as constructing an L3C2 single chain. Then, based on the structure of the prediction tree, each node in the prediction tree is traversed, and 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, prediction tree structure and quantization parameter of the prediction tree node position information are encoded. If it is determined that the node is divided by octree, the octree division method is used to divide the node until it is divided into leaf nodes at the voxel level, and the placeholder information of each node in the octree is encoded to form a geometric code stream.
可选的,若节点采用预测树编码方式进行编码时,则编码端通过一参数来指示该节点采用预测树编码方式进行编码。例如,在该参数可以为第一标志,编码端通过将该第一标志置为真来指示该节点采用预测树编码方式进行编码,例如将该第一标志置为1。这样,解码端通过解码该第一标志,确定该节点采用预测树编码方式进行编码,对应的,采用预测树解码方式对该节点进行几何解码,得到该节点所包括的点的几何重建值。Optionally, if the node is encoded using a prediction tree encoding method, the encoding end indicates that the node is encoded using the prediction tree encoding method through a parameter. For example, the parameter may be a first flag, and the encoding end indicates that the node is encoded using the prediction tree encoding method by setting the first flag to true, for example, setting the first flag to 1. In this way, the decoding end determines that the node is encoded using the prediction tree encoding method by decoding the first flag, and correspondingly, performs geometric decoding on the node using the prediction tree decoding method to obtain the geometric reconstruction values of the points included in the node.
由上述图6和图7可知,在AVS的点云几何编码中,无论是否开启预测树编码,则点云中至少部分点采用了八叉 树划分,最终划分到体素级的叶子节点中。It can be seen from Figures 6 and 7 above that in the AVS point cloud geometry coding, regardless of whether the prediction tree coding is turned on, at least some points in the point cloud are divided into octrees and finally divided into voxel-level leaf nodes.
在一些实施例中,由于点云中的有些点的坐标信息相同,因此,这些坐标相同的点被划分到八叉树的同一个叶子节点上,使得该叶子节点包括重复点。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.
在一些实施例中,编码端将点云的总点数写入点云的几何单元头部(geometry brick header,简称gbh)中。这样,解码端通过解码点云的几何单元头部(geometry brick header,简称gbh),得到点云的总点数。In some embodiments, the encoder writes the total number of points of the point cloud into the geometry brick header (gbh) of the point cloud. In this way, the decoder obtains the total number of points of the point cloud by decoding the geometry brick header (gbh) of the point cloud.
在一些实施例中,由于点云至少包括一个点,为了节约码字,则编码端在编码点云的总点数时,将点云的点数划分为片所含点数低位部分num_points_lower和片所含点数高位部分num_points_upper,将num_points_lower和num_points_upper写入几何单元头部中。In some embodiments, since the point cloud includes at least one point, in order to save code words, the encoding end divides the number of points of the point cloud into the low-order part num_points_lower of the points contained in the slice and the high-order part num_points_upper of the points contained in the slice when encoding the total number of points in the point cloud, and writes num_points_lower and num_points_upper into the geometry unit header.
在一种示例中,几何单元头部的参数具体如上述表2所示。In one example, the parameters of the geometry unit head are specifically as shown in Table 2 above.
在一些实施例中,由上述可知,编码端广度优先遍历方式,对八叉树的各层节点的占位信息进行编码,例如,基于第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个非零子节点为例进行说明。From the above, it can be seen 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 sake of ease of description, the i-th non-zero child node of the current node is taken as an example for explanation.
在该情况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 first 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 first 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 first encoded points corresponding to the i-th non-zero child node in the point cloud. For example, the number of first 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.
在该实施例中,第i个非零子节点对应的第一已编码点个数可以理解为在确定是否编码当前节点的第i个非零子节点的重复点信息时,编码端当前已编码出的点的个数总和。In this embodiment, the number of first encoded points corresponding to the i-th non-zero child node can be understood as the total number of points currently encoded by the encoding end when determining whether to encode repeated point information of the i-th non-zero child node of the current node.
在一些实施例中,编码端在编码时启动一计数器,该计数器用于实时记录已编码点的个数,这样在编码第i个非零子节点时,可以从该计数器处得到第i个非零子节点对应的第一已编码点个数。In some embodiments, the encoding end starts a counter during encoding, and the counter is used to record the number of encoded points in real time, so that when encoding the i-th non-zero child node, the first number of encoded points corresponding to the i-th non-zero child node can be obtained from the counter.
在一些实施例中,在编码第i个非零子节点时,则编码端通过如下步骤,确定第i个非零子节点对应的第一已编码点个数:In some embodiments, when encoding the i-th non-zero child node, the encoder determines the number of first encoded points corresponding to the i-th non-zero child node through the following steps:
S202-A11-1、确定第i个非零子节点对应的第三已编码点个数;S202-A11-1. Determine the number of third encoded points corresponding to the i-th non-zero child node;
S202-A11-1、基于第三已编码点个数,确定第一已编码点个数。S202-A11-1. Determine the number of first encoded points based on the number of third encoded points.
其中,上述第三已编码点可以理解为该八叉树的叶子节点中的已编码点。编码端通过确定第i个非零子节点之前的已编码叶子节点所包括的点的个数,确定该第i个非零子节点对应的第一已编码点个数。The third encoded point can be understood as an encoded point in the leaf node of the octree. The encoder determines the number of first encoded points corresponding to the i-th non-zero child node by determining the number of points included in the encoded leaf node before the i-th non-zero child node.
上述S202-A11-1中确定第i个非零子节点对应的第三已编码点个数的实现方式包括但不限于如下几种:The implementation methods of determining the number of third encoded points corresponding to the i-th non-zero child node in the above S202-A11-1 include but are not limited to the following:
方式一,若当前节点为第N-1层中的第一个非零节点,则上述S202-A11-1包括如下S202-A11-1-a1和S202-A11-1-a2的步骤:Method 1: if the current node is the first non-zero node in the N-1th layer, the above S202-A11-1 includes the following steps S202-A11-1-a1 and S202-A11-1-a2:
S202-A11-1-a1、确定当前节点的非零子节点个数;S202-A11-1-a1, determine the number of non-zero child nodes of the current node;
S202-A11-1-a2、基于当前节点的非零子节点个数,确定第i个非零子节点对应的第三已编码点个数。S202-A11-1-a2. Based on the number of non-zero child nodes of the current node, determine the number of third 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 third 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 determining the number of non-zero child nodes of the current node, the encoder determines the number of third 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个非零子节点对应的第三已编码点个数的方式包括但不限于如下几种:Wherein, the manner of determining the number of third 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 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 third 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 third 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 of the current node that are located before the i-th non-zero child 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 third 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 repeated points. Therefore, when determining the third number of encoded points corresponding to the i-th child node, the number of encoded repeated 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 of the current node that are located before the i-th non-zero child 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 third 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 the third encoded points corresponding to the i-th non-zero child node of the current node is introduced.
方式二,若当前节点不是第N-1层中的第一个非零节点,则上述S202-A11-1包括如下S202-A11-1-b1至S202-A11-1-b3的步骤:Method 2: If the current node is not the first non-zero node in the N-1th layer, the above S202-A11-1 includes the following steps S202-A11-1-b1 to S202-A11-1-b3:
S202-A11-1-b1、确定第N-1层中位于当前节点之前的各非零节点对应的已编码点的个数;S202-A11-1-b1, determine the number of encoded points corresponding to each non-zero node before the current node in the N-1th layer;
S202-A11-1-b2、确定当前节点的非零子节点个数;S202-A11-1-b2, determine the number of non-zero child nodes of the current node;
S202-A11-1-b3、基于第N-1层中位于当前节点之前的各非零节点对应的已编码点的个数,以及当前节点的非零子节点个数,确定第i个非零子节点对应的第三已编码点个数。S202-A11-1-b3. 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, determine the third number of encoded points corresponding to the i-th non-zero child 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 third 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 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 third 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.
下面对S202-A11-1-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-1-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-1th 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-1th layer. In this embodiment, the encoding end can record the number of non-zero child nodes of each non-zero node in the N-1th 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-1th 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 encoding end obtains the number of non-zero child nodes of a non-zero node and the number of second repeated points included in the non-zero child nodes of the non-zero node for a non-zero node among the non-zero nodes; subtracts 1 from the number of non-zero child nodes of the non-zero node, and then adds the sum of the number of second 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 encoding end 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 encoding end 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 second 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 third 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.
本申请实施例对上述S202-A11-1-b3中基于第N-1层中位于当前节点之前的各非零节点对应的已编码点的个数,以及当前节点的非零子节点个数,确定第i个非零子节点对应的第三已编码点个数的具体实现方式不做限制。The embodiment of the present application does not limit the specific implementation method of determining the third number of encoded points corresponding to the i-th non-zero child node in the above S202-A11-1-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-1-b31和S202-A11-1-b32的步骤:In some embodiments, the above S202-A11-b3 includes the following steps S202-A11-1-b31 and S202-A11-1-b32:
S202-A11-1-b31、将第N-1层中位于当前节点之前的各非零节点对应的已编码点的个数相加,得到第一和值;S202-A11-1-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-1-b32、基于第一和值和当前节点的非零子节点个数,确定第i个非零子节点对应的第三已编码点个数。S202-A11-1-b32. Determine the number of third encoded 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 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 third 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 accurately determining the third number of encoded points corresponding to the i-th non-zero child node.
其中,上述S202-A11-1-b32中基于第一和值和当前节点的非零子节点个数,确定第i个非零子节点对应的第一已编码点个数的实现方式至少包括如下两种方式:Among them, the implementation method of determining the first 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-1-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 third 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 third 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 third 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 third number of encoded points corresponding to the i-th non-zero child node.
基于上述步骤,确定出第i个非零子节点对应的第三已解码点个数后,执行S202-A11-2的步骤,基于第三已解码点个数,确定第一已解码点个数。After determining the third number of decoded points corresponding to the i-th non-zero child node based on the above steps, execute step S202-A11-2 to determine the first number of decoded points based on the third number of decoded points.
在一些实施例中,针对一孤立点P,直接对其坐标进行压缩与采用八叉树方法压缩相比,具有更高的效率。这种直接对节点中的点的坐标进行编码的过程称为直接编码模式(Direct Coding Model,简称DCM)。当前节点是否使用DCM,可基于邻居节点的信息推断出,将这种方法叫做推断直接编码模式(Inter Direct Coding Model,简称IDCM)。In some embodiments, for an isolated point P, directly compressing its coordinates is more efficient than using an octree method to compress. This process of directly encoding the coordinates of a point in a node is called a direct coding model (DCM). Whether the current node uses DCM can be inferred based on the information of neighboring nodes. This method is called an inferred direct coding model (IDCM).
本申请实施例中,点云采用IDCM与不采用IDCM时,对点云中第i个非零子节点对应的第一已编码点个数有影响。下面针对点云采用DCM与不采用IDCM时,对第i个非零子节点对应的第一已编码点个数的影响过程进行介绍。In the embodiment of the present application, when the point cloud adopts IDCM and does not adopt IDCM, the number of first encoded points corresponding to the i-th non-zero child node in the point cloud is affected. The following describes the process of affecting the number of first encoded points corresponding to the i-th non-zero child node when the point cloud adopts DCM and does not adopt IDCM.
在一些实施例中,若点云未采用IDCM,则对第i个非零子节点对应的第三已编码点个数,确定为第i个非零子节点对应的第一已编码点个数。In some embodiments, if the point cloud does not adopt IDCM, the third number of encoded points corresponding to the i-th non-zero child node is determined as the first number of encoded points corresponding to the i-th non-zero child node.
在该实施例中,若点云未采用IDCM,即IDCM关闭,此时说明在八叉树编码时,八叉树中的每个节点均未采用直接编码方式,因此,在编码当前节点时,八叉树中除了上述确定的第i个非零子节点对应的第三已编码点外,不包括其他第一已编码点。其中,第一已编码点可以理解为八叉树的叶子节点中几何位置已编码出的点。此时,直接将上述确定的第i个非零子节点对应的第三已编码点个数,确定为第i个非零子节点对应的第一已编码点个数。In this embodiment, 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 does not use direct encoding. Therefore, when encoding the current node, the octree does not include other first encoded points except the third encoded point corresponding to the i-th non-zero child node determined above. Among them, the first encoded point can be understood as a point whose geometric position has been encoded in the leaf node of the octree. At this time, the number of the third encoded points corresponding to the i-th non-zero child node determined above is directly determined as the number of the first encoded points corresponding to the i-th non-zero child node.
在一些实施例中,若点云采用IDCM,则确定八叉树中已编码的采用IDCM的第二节点所包括的点个数;将采用IDCM的第二节点所包括的点个数和上述确定的第i个非零子节点对应的第三已编码点个数进行相加,得到第i个非零子节点对应的新的第一已编码点个数。In some embodiments, if the point cloud adopts IDCM, the number of points included in the second node encoded using IDCM in the octree is determined; the number of points included in the second node using IDCM and the third number of encoded points corresponding to the i-th non-zero child node determined above are added to obtain a new first number of encoded points corresponding to the i-th non-zero child node.
在该实施例中,若点云采用IDCM,即IDCM开启,此时,说明点云的八叉树中可能有至少一个节点采用直接编码方式,将该节点所包括点的几何信息直接进行编码。对应的,编码时,直接编码得到该节点所包括点的几何信息。这样在确定第i个非零子节点对应的第一已编码点时,需要将八叉树中采用IDCM的已编码节点(即第二节点)所包括的点的个数,与上述确定的第i个非零子节点对应的第三已编码点个数进行相加。In this embodiment, if the point cloud adopts IDCM, that is, IDCM is turned on, then it means that at least one node in the octree of the point cloud may adopt direct coding to directly encode the geometric information of the points included in the node. Correspondingly, when encoding, the geometric information of the points included in the node is directly encoded. In this way, when determining the first encoded point corresponding to the i-th non-zero child node, it is necessary to add the number of points included in the encoded node (i.e., the second node) using IDCM in the octree to the number of the third encoded points corresponding to the i-th non-zero child node determined above.
举例说明,假设点云的八叉树中,有1个节点采用IDCM,假设这采用IDCM的节点包括1个点,假设在编码当前节点之前,采用IDCM的节点均已编码完成。因此,可以确定出八叉树中采用IDCM的节点所包括的点个数为1。将这一个已编码点加到上述确定的第i个非零子节点对应的第三已编码点中。For example, suppose that in the octree of the point cloud, there is a node using IDCM, suppose that this node using IDCM includes 1 point, and suppose that before encoding the current node, all nodes using IDCM have been encoded. Therefore, it can be determined that the number of points included in the node using IDCM in the octree is 1. This encoded point is added to the third encoded point corresponding to the i-th non-zero child node determined above.
编码端基于上述S202-A11步骤,确定出当前节点的第i个非零子节点对应的第一已编码点个数后,执行如下S202-A12的步骤。After the encoder determines the number of first 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 first 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 first 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 first 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.
由上述可知,在AVS几何编码中,可以采用八叉树进行编码,以及采用八叉树和预测树结合的方式进行编码。From the above, it can be seen that in AVS geometric coding, octree can be used for coding, and octree and prediction tree can be combined for coding.
本申请实施例中,点云采用预测树编码与不采用预测树编码时,基于点云中第i个非零子节点对应的第一已编码点个数,确定第i个非零子节点对应的第二参数的方式不相同。下面针对点云采用预测树编码与不采用预测树编码时,确定第i个非零子节点对应的第二参数的具体过程进行介绍。In the embodiment of the present application, when the point cloud adopts prediction tree coding and when the prediction tree coding is not adopted, the method of determining the second parameter corresponding to the i-th non-zero child node based on the number of first encoded points corresponding to the i-th non-zero child node in the point cloud is different. The following introduces the specific process of determining the second parameter corresponding to the i-th non-zero child node when the point cloud adopts prediction tree coding and when the prediction tree coding is not adopted.
本申请实施例中,基于点云中第i个非零子节点对应的第一已编码点个数,确定第i个非零子节点对应的第二参数至少包括如下几种方式:In the embodiment of the present application, based on the number of first 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,将第一已编码点个数,确定为第二参数。Method 1: The number of first encoded points is determined as the second parameter.
在AVS的几何编码中,若点云采用预测树编码方式,即预测树编码方式关闭,此时,点云中第i个非零子节点对应的已编码点中,除了上述实施例确定的第i个非零子节点对应的第一已编码点外,不包括其他的已编码点。在该情况下,在编码当前节点的第i个非零子节点时,基于上述步骤,确定出第i个非零子节点对应的第一已编码点个数,并将该第i个非零子节点对应的第一已编码点个数,确定为第i个非零子节点对应的第二参数。In the geometric coding of AVS, if the point cloud adopts the prediction tree coding method, that is, the prediction tree coding method is turned off, then, among the encoded points corresponding to the i-th non-zero child node in the point cloud, except for the first encoded point corresponding to the i-th non-zero child node determined in the above embodiment, no other encoded points are included. In this case, when encoding the i-th non-zero child node of the current node, based on the above steps, the number of first encoded points corresponding to the i-th non-zero child node is determined, and the number of first 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.
方式2,若点云采用预测树编码方式,则上述S202-A12包括如下S202-A121和S202-A122的步骤:Mode 2: If the point cloud adopts the prediction tree encoding method, the above S202-A12 includes the following steps S202-A121 and S202-A122:
S202-A121、确定八叉树中采用预测树编码方式的第一节点所包括的第二已编码点个数;S202-A121, determining the number of second encoded points included in the first node of the octree using the prediction tree encoding method;
S202-A122、将第一已编码点个数和第二已编码点个数之和,确定为第二参数。S202-A122. Determine the sum of the first number of encoded points and the second number of encoded points as the second parameter.
在该方式2中,若点云采用预测树编码方式,即预测树编码方式开启,此时,说明点云的八叉树中可能有至少一个节点采用预测树编码方式,将该节点所包括点采用预测树编码方式进行编码。例如图7所示,对点云八叉树中第3层的第一个节点采用预测树编码方式,例如对该节点所包括的点进行排序,采用预设的预测树编码方法,对排序后的点构建预测树,例如构建L3C2单链。接着,基于预测树的结构,遍历预测树中的每个节点,通过选取不同的预测模式对节点的几何位置信息进行预测得到预测残差,并且利用量化参数对几何预测残差进行量化后编码,形成几何码流。In this method 2, if the point cloud adopts the prediction tree coding method, that is, the prediction tree coding method is turned on, at this time, it means that there may be at least one node in the octree of the point cloud that adopts the prediction tree coding method, and the points included in the node are encoded using the prediction tree coding method. For example, as shown in Figure 7, the prediction tree coding method is adopted for the first node of the third layer in the point cloud octree, for example, the points included in the node are sorted, and the preset prediction tree coding method is adopted to construct a prediction tree for the sorted points, for example, an L3C2 single chain is constructed. Then, based on the structure of the prediction tree, each node in the prediction tree is traversed, and 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 and encoded using the quantization parameter to form a geometric code stream.
对应的,编码端在编码该节点时,采用预测树编码方式对该节点进行几何编码,得到该节点所包括的点的几何重建值。也就是说,本申请实施例中,由于通过广度优先原则对八叉树进行遍历,采用预测树编码的节点在八叉树中的位置,在当前节点之前,即在编码当前节点时,该采用预测树编码的节点已编码完成。因此,在确定当前节点的第i个非零子节点对应的第二参数时,不仅需要确定上述第i个非零子节点对应的第一已编码点个数,还需要确定八叉树中采用预测树编码的第一节点所包括的已编码点个数,为了便于描述,将采用预测树编码的第一节点所包括的已编码点个数记为第二已编码点个数。进而,将第i个非零子节点对应的第一已编码点个数,与八叉树中采用预测树编码方式的第一节点所包括的第二已编码点个数进行相加,将相加后的结果确定为第i个非零子节点对应的第二参数。Correspondingly, when encoding the node, the encoding end uses the prediction tree encoding method to geometrically encode the node to obtain the geometric reconstruction value of the point included in the node. That is to say, in the embodiment of the present application, since the octree is traversed by the breadth-first principle, the position of the node encoded by the prediction tree in the octree is before the current node, that is, when encoding the current node, the node encoded by the prediction tree has been encoded. Therefore, when determining the second parameter corresponding to the i-th non-zero child node of the current node, it is necessary not only to determine the first number of encoded points corresponding to the above-mentioned i-th non-zero child node, but also to determine the number of encoded points included in the first node encoded by the prediction tree in the octree. For the convenience of description, the number of encoded points included in the first node encoded by the prediction tree is recorded as the second number of encoded points. Furthermore, the first number of encoded points corresponding to the i-th non-zero child node is added to the second number of encoded points included in the first node encoded by the prediction tree in the octree, and the result of the addition is determined as the second parameter corresponding to the i-th 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 decoding the repeated point information of the i-th non-zero child node.
由上述可知,当前节点对应的第一参数可以理解为在编码当前节点时,点云中几何位置信息不确定的点的个数,或者可以理解为未编码的点的个数。当前节点的第i个非零子节点对应的第二参数,可以理解为当前已编码的点的个数。From the above, we can know 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 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。在该实施例中,假设点云不采用预测树编码,则将第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 first 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 prediction tree encoding, the first 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 unencoded 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。在该实施例中,假设点云不采用预测树编码,则将第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 the first 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 prediction tree encoding, the number of first encoded 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, 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。在该实施例中,假设点云不采用预测树编码,则将第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 first 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 prediction tree encoding, the first 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 S201-B1 includes:
S201-B11、确定八叉树中位于第i个非零子节点之前的各非零子节点所包括的第三已编码重复点个数之和;S201-B11, determining the sum of the number of third 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 third 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 third 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 there are two non-zero child nodes before the i-th non-zero child node in the octree. Assuming that one of the two non-zero child nodes includes two repeated points and the other non-zero child node includes one repeated point, it can be determined that the sum of the third number of encoded repeated points is 2+1=3.
基于上述步骤,确定出八叉树中位于第i个非零子节点之前的各非零子节点所包括的第三已编码重复点个数之和后,基于该第三已编码重复点个数之和,确定第i个非零子节点对应的已编码重复点总数。Based on the above steps, after determining the sum of the third 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 third 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 third number of encoded repeated points in the above S201-B12 include at least the following two methods:
方式1,若点云采用预测树编码方式,则确定八叉树中采用预测树编码方式的第一节点所包括的第四已编码重复点个数之和;基于第三已编码重复点个数之和,以及第四已编码重复点个数之和,确定第i个非零子节点对应的已编 码重复点总数。Method 1: If the point cloud adopts the prediction tree coding method, the sum of the fourth number of encoded repeated points included in the first node in the octree using the prediction tree coding method is determined; based on the sum of the third number of encoded repeated points and the sum of the fourth number of encoded repeated points, the total number of encoded repeated points corresponding to the i-th non-zero child node is determined.
在该方式1中,若点云采用预测编码方式,由上述可知,编码端在编码当前节点之前,完成对八叉树中采用预测树编码的节点。这样可以获取八叉树中采用预测树编码方式的第一节点所包括的第四已编码重复点个数之和,进而基于第三已编码重复点个数之和,以及第四已编码重复点个数之和,确定第i个非零子节点对应的已编码重复点总数。In this method 1, if the point cloud adopts the predictive coding method, it can be known from the above that the encoder completes the node in the octree that adopts the predictive tree coding before encoding the current node. In this way, the sum of the fourth number of encoded repeated points included in the first node in the octree that adopts the predictive tree coding method can be obtained, and then based on the sum of the third number of encoded repeated points and the sum of the fourth number of encoded repeated points, the total number of encoded repeated points corresponding to the i-th non-zero child node is determined.
在一些实施例中,若点云未采用IDCM编码,则将第三已编码重复点个数之和,以及第四已编码重复点个数之和,确定第i个非零子节点对应的已编码重复点总数。In some embodiments, if the point cloud is not encoded using IDCM, the sum of the third number of encoded duplicate points and the sum of the fourth number of encoded duplicate points are used to determine the total number of encoded duplicate points corresponding to the i-th non-zero child node.
在一些实施例中,若点云采用推断直接编码模式IDCM时,基于所述第三已编码重复点个数之和、以及所述第四已编码重复点个数之和,确定所述第i个非零子节点对应的已编码重复点总数,包括:确定八叉树中采用IDCM的第二节点所包括的第五已编码重复点个数之和;将第三已编码重复点个数之和、第四已编码重复点个数之和、以及第五已编码重复点个数之和进行相加,得到第i个非零子节点对应的已编码重复点总数。In some embodiments, if the point cloud adopts the inferred direct coding mode IDCM, the total number of encoded repeated points corresponding to the i-th non-zero child node is determined based on the sum of the third number of encoded repeated points and the sum of the fourth number of encoded repeated points, including: determining the sum of the fifth number of encoded repeated points included in the second node using IDCM in the octree; adding the sum of the third number of encoded repeated points, the sum of the fourth number of encoded repeated points, and the sum of the fifth number of encoded repeated points to obtain the total number of encoded repeated points corresponding to the i-th non-zero child node.
方式2,若点云未采用预测树编码方式,则基于第三已编码重复点个数之和,确定第i个非零子节点对应的已编码重复点总数。Method 2: If the point cloud does not adopt the prediction tree encoding method, the total number of encoded repeated points corresponding to the i-th non-zero child node is determined based on the sum of the third number of encoded repeated points.
在方式2的一种实现方式中,若点云未采用预测树编码方式,且未采用IDCM编码方式,则将上述确定的基于第三已编码重复点个数之和,确定第i个非零子节点对应的已编码重复点总数。In one implementation of method 2, if the point cloud does not use the prediction tree encoding method and does not use the IDCM encoding method, the total number of encoded repeated points corresponding to the i-th non-zero child node is determined based on the sum of the third number of encoded repeated points.
在方式2的另一种实现方式中,若点云未采用预测树编码方式,且采用IDCM编码方式,则确定八叉树中采用IDCM的第二节点所包括的第五已编码重复点个数之和,将第五已编码重复点个数之和与第三已编码重复点个数之和进行相加,得到第i个非零子节点对应的已编码重复点总数。In another implementation of method 2, if the point cloud does not adopt the prediction tree encoding method and adopts the IDCM encoding method, then the sum of the fifth number of encoded repeated points included in the second node using IDCM in the octree is determined, and the sum of the fifth number of encoded repeated points is added to the sum of the third number of encoded repeated points to obtain the total number of encoded repeated points corresponding to the i-th non-zero child node.
基于上述方法,确定出第i个非零子节点对应的已编码重复点总数后,将第i个非零子节点对应的已编码重复点总数,确定为第一参数。Based on the above method, after the total number of encoded repeated points corresponding to the i-th non-zero child node is determined, the total number of encoded repeated points corresponding to the i-th non-zero child node is determined as 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个非零子节点的重复点信息,进而降低了点云的编码复杂度,节约了编码时间,进而提升了编码效率。In some embodiments, 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 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 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.
在一些实施例中,若第i个非零子节点对应的已编码重复点总数小于点云的重复总点数,且第i个非零子节点是八叉树的最后一个体素节点,则说明第i个非零子节点包括重复点,此时跳过编码第i个非零子节点的重复点信息,且将点云的重复总点数与第i个非零子节点对应的已编码重复点总数的差值,确定为第i个非零子节点所包括的重复点个数。In some embodiments, 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 the last voxel node of the octree, it means that the i-th non-zero child node includes duplicate points. At this time, the encoding 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 in the point cloud and the total number of encoded 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个非零子节点的重复点信息。In some embodiments, 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 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 encoding accuracy, the encoding end encodes the duplicate point information of the i-th non-zero child node.
由上述可知,编码端基于上述情况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.
本申请实施例提供的点云几何编码方法,在点云编码中,例如在基于AVS的点云编码中,在编码八叉树中第N-1层的当前节点时,首先确定当前节点对应的第一参数,该第一参数用于确定当前节点的至少一个非零子节点是否包括重复点,当前节点为点云的八叉树中第N-1层的一个非零节点,N为所述八叉树的总层数,进而基于该第一参数,对当前节点进行几何编码。例如,基于该第一参数确定当前节点的第i个非零子节点不包括重复点时,则跳过编码该第i个非零子节点的重复点信息,进而降低了点云的编码复杂度,节约了编码时间,进而提升了编码效率。The point cloud geometry encoding method provided by the embodiment of the present application, in point cloud encoding, for example, in point cloud encoding based on AVS, when encoding 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, 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 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 objects associated 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,用于确定当前节点对应的第一参数,所述第一参数用于确定所述当前节点的至少一个非零子节点是否包括重复点,所述当前节点为所述点云的八叉树的第N-1层中的一个非零节点,所述八叉树是对所述点云进行节点划分得到,所述N为所述八叉树的总层数,所述N为大于1的正整数;A determination unit 11 is used to determine a first parameter corresponding to a current node, where the first parameter is used to determine whether at least one non-zero child node of the current node includes a duplicate point, where the current node is a non-zero node in the N-1th layer of an octree of the point cloud, where the octree is obtained by node division of the point cloud, where N is a total number of layers of the octree, and where N is a positive integer greater than 1;
解码单元12,用于基于所述第一参数,对所述当前节点进行几何解码。The decoding unit 12 is used to perform geometric decoding on the current node based on the first parameter.
在一些实施例中,确定单元11,具体用于确定所述点云的总点数,以及所述第N-1层的非零节点数;基于所述点云的总点数和所述第N-1层的非零节点数,确定所述第一参数。In some embodiments, 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, the first parameter is determined.
在一些实施例中,确定单元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 first number of decoded points corresponding to the i-th non-zero subnode in the point cloud; based on the first 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,具体用于将所述第一已解码点个数,确定为所述第二参数。In some embodiments, if the point cloud does not adopt the prediction tree encoding method, the decoding unit 12 is specifically used to determine the first number of decoded points as the second parameter.
在一些实施例中,若所述点云采用预测树编码方式,解码单元12,具体用于确定所述八叉树中采用所述预测树编码方式的第一节点所包括的第二已解码点个数;将所述第一已解码点个数和所述第二已解码点个数之和,确定为所述第二参数。In some embodiments, if the point cloud adopts the prediction tree encoding method, the decoding unit 12 is specifically used to determine the number of second decoded points included in the first node in the octree that adopts the prediction tree encoding method; and the sum of the first number of decoded points and the second number of decoded points is determined as the second parameter.
在一些实施例中,解码单元12,具体用于确定所述第i个非零子节点对应的第三已解码点个数;基于所述第三已解码点个数,确定所述第一已解码点个数。In some embodiments, the decoding unit 12 is specifically configured to determine the third number of decoded points corresponding to the i-th non-zero child node; and determine the first number of decoded points based on the third number of decoded points.
在一些实施例中,解码单元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 third 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后,再与所述第一重复点个数之和进行相加,得到所述第三已解码点个数。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 of 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 third number of decoded points.
在一些实施例中,解码单元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 third 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 any non-zero node among the non-zero nodes, the number of non-zero child nodes of the non-zero node and the sum of the second number of repeated points included in the non-zero child nodes of the non-zero 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 second number of repeated points 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 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 third 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 third 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 third number of decoded points corresponding to the i-th non-zero child node.
在一些实施例中,若所述点云未采用推断直接编码模式IDCM,解码单元12,具体用于将所述第三已解码点个数,确定为所述第一已解码点个数。In some embodiments, if the point cloud does not adopt the inferred direct coding mode IDCM, the decoding unit 12 is specifically configured to determine the third number of decoded points as the first number of decoded points.
在一些实施例中,若所述点云采用推断直接编码模式IDCM,则解码单元12,具体用于确定所述八叉树采用IDCM的第二节点所包括的点个数;将所述第三已解码点个数,与所述第二节点所包括的点个数之和,确定为所述第一已解码点个数。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 second node of the octree adopting IDCM; and the sum of the third number of decoded points and the number of points included in the second node is determined as the first number of decoded points.
在一些实施例中,解码单元12,具体用于若所述第一参数等于所述第二参数,则跳过解码所述第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 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 third 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 third number of decoded repeated points, determine the total number of decoded repeated points corresponding to the i-th non-zero child node.
在一些示例中,若所述点云采用预测树编码方式,则确定单元11,具体用于确定所述八叉树中采用所述预测树编码方式的第一节点所包括的第四已解码重复点个数之和;基于所述第三已解码重复点个数之和,以及所述第四已解码重复点个数之和,确定所述第i个非零子节点对应的已解码重复点总数。In some examples, if the point cloud adopts the prediction tree encoding method, the determination unit 11 is specifically used to determine the sum of the fourth number of decoded repeated points included in the first node in the octree that adopts the prediction tree encoding method; based on the sum of the third number of decoded repeated points and the sum of the fourth 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 fifth number of decoded repeated points included in the second node using IDCM in the octree; the sum of the third number of decoded repeated points, the sum of the fourth number of decoded repeated points, and the sum of the fifth 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.
在一些实施例中,解码单元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 a geometric unit header of the point cloud to obtain a total number of points of the point cloud.
在一些实施例中,解码单元12,具体用于解码所述几何单元头部,得到所述点云对应的片所含点数低位部分和片所含点数高位部分;基于所述片所含点数低位部分和所述片所含点数高位部分,得到所述点云的总点数。In some embodiments, the decoding unit 12 is specifically used to decode the geometric unit header to obtain the low-order part of the number of points contained in the slice corresponding to the point cloud and the high-order part of the number of points contained in the slice; based on the low-order part of the number of points contained in the slice and the high-order part of the number of points contained in the slice, the total number of points in the point cloud is obtained.
在一些实施例中,解码单元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,用于确定当前节点对应的第一参数,所述第一参数用于确定所述当前节点的至少一个非零子节点是否包括重复点,所述当前节点为所述点云的八叉树的第N-1层中的一个非零节点,所述八叉树是对所述点云进行节点划分得到,所述N为所述八叉树的总层数,所述N为大于1的正整数;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 at least one non-zero child node of the current node includes a duplicate point, where the current node is a non-zero node in the N-1th layer of the octree of the point cloud, where the octree is obtained by node division of the point cloud, where N is the total number of layers of the octree, and where N is a positive integer greater than 1;
编码单元22,用于基于所述第一参数,对所述当前节点进行几何编码。The encoding unit 22 is used to perform geometric encoding on the current node based on the first parameter.
在一些实施例中,确定单元21,具体用于确定所述点云的总点数,以及所述第N-1层的非零节点数;基于所述点云的总点数和所述第N-1层的非零节点数,确定所述第一参数。In some embodiments, 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个非零子节点对应的第一已编码点个数,确定为所述第二参数。In some embodiments, if the point cloud does not adopt the prediction tree encoding method, the encoding unit 22 is specifically used to determine the number of first encoded points corresponding to the i-th non-zero child node in the point cloud as the second parameter.
在一些实施例中,若点云采用预测树编码方式,在一些实施例中,编码单元22,具体用于获取所述点云的编码单元中采用预测树编码的第一编码单元所包括的第二已编码点个数,所述编码单元为对所述点云的包围盒进行预设次划分得到的非零节点;将所述第一已编码点个数和所述第二已编码点个数之和,确定为所述第二参数。In some embodiments, if the point cloud adopts the prediction tree encoding method, in some embodiments, the encoding unit 22 is specifically used to obtain the second number of encoded points included in the first encoding unit using the prediction tree encoding in the encoding unit of the point cloud, and the encoding unit is a non-zero node obtained by dividing the bounding box of the point cloud by a preset number of times; the sum of the first number of encoded points and the second number of encoded points is determined as the second parameter.
在一些实施例中,编码单元22,具体用于确定所述第i个非零子节点对应的第三已编码点个数;基于所述第三已编码点个数,确定所述第一已编码点个数。In some embodiments, the encoding unit 22 is specifically configured to determine the number of third encoded points corresponding to the i-th non-zero child node; and determine the number of first encoded points based on the third number of encoded points.
在一些实施例中,编码单元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 third 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, if the i-th non-zero child node is the first non-zero child node of the current node, reduce the number of non-zero child nodes included in the current node by 1, and determine the third 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 third number of encoded points corresponding to the i-th non-zero child node.
在一些实施例中,编码单元22,具体用于若所述当前节点不是所述第N-1层中的第一个非零节点,则确定所述第N-1层中位于所述当前节点之前的各非零节点对应的已编码点的个数;确定所述当前节点的非零子节点个数;基于所述第N-1层中位于所述当前节点之前的各非零节点对应的已编码点的个数,以及所述当前节点的非零子节点个数,确定所述第三已编码点个数。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; and determine the third number of encoded points 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.
在一些实施例中,编码单元22,具体用于针对所述各非零节点中的任一非零节点,获取所述非零节点的非零子节点个数,以及所述非零节点的非零子节点所包括的第二重复点个数之和;将所述非零节点的非零子节点个数减1后,与所述第二重复点个数之和进行相加,得到所述非零节点对应的已编码点的个数。In some embodiments, the encoding unit 22 is specifically used to obtain, for any non-zero node among the non-zero nodes, the number of non-zero child nodes of the non-zero node and the sum of the second number of repeated points included in the non-zero child nodes of the non-zero 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 second number of repeated points to obtain the number of encoded points corresponding to the non-zero node.
在一些实施例中,编码单元22,具体用于将所述第N-1层中位于所述当前节点之前的各非零节点对应的已编码点的个数进行相加,得到第一和值;基于所述第一和值和所述当前节点的非零子节点个数,确定所述第三已编码点个数。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; and determine the third number of encoded points based on the first sum and the number of non-zero child nodes of the current node.
在一些实施例中,编码单元22,具体用于若所述第i个非零子节点为所述当前节点的第1个非零子节点,则将所述第一和值与所述当前节点所包括的非零子节点的个数进行相加,得到第二和值;对所述第二和值减1,得到所述第三已编码点个数。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 third number of encoded points.
在一些实施例中,编码单元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 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 third number of encoded points.
在一些实施例中,若所述点云未采用推断直接编码模式IDCM,则编码单元22,具体用于将所述第三已编码点个数,确定为所述第一已编码点个数。In some embodiments, if the point cloud does not adopt the inferred direct coding mode IDCM, the encoding unit 22 is specifically configured to determine the third number of encoded points as the first number of encoded points.
在一些实施例中,若所述点云采用推断直接编码模式IDCM,则编码单元22,具体用于确定所述八叉树采用IDCM的第二节点所包括的点个数;将所述第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 second node of the octree adopting IDCM; 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 second node is determined as the first number of encoded points.
在一些实施例中,编码单元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 third 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 third number of encoded repeated points, determine the total number of encoded repeated points corresponding to the i-th non-zero child node.
在一些实施例中,若所述点云采用预测树编码方式,确定单元21,具体用于确定所述八叉树中采用所述预测树编码方式的第一节点所包括的第四已编码重复点个数之和;基于所述第三已编码重复点个数之和、以及所述第四已编码重复点个数之和,确定所述第i个非零子节点对应的已编码重复点总数。In some embodiments, if the point cloud adopts the prediction tree encoding method, the determination unit 21 is specifically used to determine the sum of the fourth number of encoded repeated points included in the first node in the octree that adopts the prediction tree encoding method; based on the sum of the third number of encoded repeated points and the sum of the fourth 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 fifth number of encoded repeated points included in the second node using IDCM in the octree; the sum of the third number of encoded repeated points, the sum of the fourth number of encoded repeated points, and the sum of the fifth 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.
在一些实施例中,编码单元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 a geometric unit header of the point cloud.
在一些实施例中,编码单元22,具体用于基于所述点云的总点数,确定所述点云对应的片所含点数低位部分和片所含点数高位部分;将所述片所含点数低位部分和所述片所含点数高位部分,写入所述几何单元头部中。In some embodiments, the encoding unit 22 is specifically used to determine the low-order part of the number of points contained in the slice corresponding to the point cloud and the high-order part of the number of points contained in the slice based on the total number of points in the point cloud; and write the low-order part of the number of points contained in the slice and the high-order part of the number of points contained in the slice into the header of the geometric 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 skilled 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 (73)

  1. 一种点云解码方法,其特征在于,包括:A point cloud decoding method, characterized by comprising:
    确定当前节点对应的第一参数,所述第一参数用于确定所述当前节点的至少一个非零子节点是否包括重复点,所述当前节点为所述点云的八叉树的第N-1层中的一个非零节点,所述八叉树是对所述点云进行节点划分得到,所述N为所述八叉树的总层数,所述N为大于1的正整数;Determine a first parameter corresponding to a current node, where the first parameter is used to determine whether at least one non-zero child node of the current node includes a duplicate point, where the current node is a non-zero node in the N-1th layer of an octree of the point cloud, where the octree is obtained by node division of the point cloud, where N is the total number of layers of the octree, and where N is a positive integer greater than 1;
    基于所述第一参数,对所述当前节点进行几何解码。Based on the first parameter, geometric decoding is performed on the current node.
  2. 根据权利要求1所述的方法,其特征在于,所述确定当前节点对应的第一参数,包括:The method according to claim 1, characterized in that the determining the first parameter corresponding to the current node comprises:
    确定所述点云的总点数,以及所述第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 first decoded points corresponding to the i-th non-zero child node;
    基于所述第一已解码点个数,确定所述第i个非零子节点对应的第二参数。Based on the first number of decoded points, a second parameter corresponding to the i-th non-zero child node is determined.
  6. 根据权利要求5所述的方法,其特征在于,若所述点云未采用预测树编码方式,所述基于所述第一已解码点个数,确定所述第i个非零子节点对应的第二参数,包括:The method according to claim 5, characterized in that, if the point cloud does not adopt a prediction tree encoding method, determining the second parameter corresponding to the i-th non-zero child node based on the first number of decoded points comprises:
    将所述第一已解码点个数,确定为所述第二参数。The number of the first decoded points is determined as the second parameter.
  7. 根据权利要求5所述的方法,其特征在于,若所述点云采用预测树编码方式,所述基于所述第一已解码点个数,确定所述第i个非零子节点对应的第二参数,包括:The method according to claim 5, characterized in that if the point cloud adopts a prediction tree encoding method, the determining the second parameter corresponding to the i-th non-zero child node based on the first number of decoded points includes:
    确定所述八叉树中采用所述预测树编码方式的第一节点所包括的第二已解码点个数;Determine the number of second decoded points included in the first node of the octree using the prediction tree encoding method;
    将所述第一已解码点个数和所述第二已解码点个数之和,确定为所述第二参数。The sum of the first number of decoded points and the second number of decoded points is determined as the second parameter.
  8. 根据权利要求5所述的方法,其特征在于,所述确定所述第i个非零子节点对应的第一已解码点个数,包括:The method according to claim 5, characterized in that the determining the number of first decoded points corresponding to the i-th non-zero child node comprises:
    确定所述第i个非零子节点对应的第三已解码点个数;Determine the number of third decoded points corresponding to the i-th non-zero child node;
    基于所述第三已解码点个数,确定所述第一已解码点个数。Based on the third number of decoded points, the first number of decoded points is determined.
  9. 根据权利要求8所述的方法,其特征在于,所述确定所述第i个非零子节点对应的第三已解码点个数,包括:The method according to claim 8, characterized in that the determining the number of third decoded points corresponding to the i-th non-zero child node 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;
    基于所述当前节点的非零子节点个数,确定所述第三已解码点个数。The third number of decoded points is determined based on the number of non-zero child nodes of the current node.
  10. 根据权利要求9所述的方法,其特征在于,所述基于所述当前节点的非零子节点个数,确定所述第三已解码点个数,包括:The method according to claim 9, characterized in that the determining the third number of decoded points based on the number of non-zero child nodes of the current node comprises:
    若所述第i个非零子节点为所述当前节点的第1个非零子节点,则将所述当前节点所包括的非零子节点的个数减1后的值,确定为所述第三已解码点个数。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 third number of decoded points.
  11. 根据权利要求9所述的方法,其特征在于,所述基于所述当前节点的非零子节点个数,确定所述第三已解码点个数,包括:The method according to claim 9, characterized in that the determining the third number of decoded points 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 of the current node that are located before the i-th non-zero child node;
    将所述当前节点所包括的非零子节点的个数减1后,再与所述第一重复点个数之和进行相加,得到所述第三已解码点个数。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 third number of decoded points.
  12. 根据权利要求8所述的方法,其特征在于,所述确定所述第i个非零子节点对应的第三已解码点个数,包括:The method according to claim 8, characterized in that the determining the number of third decoded points corresponding to the i-th non-zero child node 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 in the N-1th layer before the current node;
    确定所述当前节点的非零子节点个数;Determine the number of non-zero child nodes of the current node;
    基于所述第N-1层中位于所述当前节点之前的各非零节点对应的已解码点的个数,以及所述当前节点的非零子节点个数,确定所述第三已解码点个数。The third number of decoded points is determined 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.
  13. 根据权利要求12所述的方法,其特征在于,所述确定所述第N-1层中位于所述当前节点之前的各非零节点对应的已解码点的个数,包括:The method according to claim 12, 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 any non-zero node among the non-zero nodes, obtain the number of non-zero child nodes of the non-zero node and the sum of the number of second repeated points included in the non-zero child nodes of the non-zero 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 second number of repeated points to obtain the number of decoded points corresponding to the non-zero node.
  14. 根据权利要求12所述的方法,其特征在于,所述基于所述第N-1层中位于所述当前节点之前的各非零节点对应的已解码点的个数,以及所述当前节点的非零子节点个数,确定所述第三已解码点个数,包括:The method according to claim 12, characterized in that the determining the third number of decoded points 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;
    基于所述第一和值和所述当前节点的非零子节点个数,确定所述第三已解码点个数。The third number of decoded points is determined based on the first sum value and the number of non-zero child nodes of the current node.
  15. 根据权利要求14所述的方法,其特征在于,所述基于所述第一和值和所述当前节点的非零子节点个数,确定所述第三已解码点个数,包括:The method according to claim 14, characterized in that the determining the third number of decoded points 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,得到所述第三已解码点个数。Subtract 1 from the second sum to obtain the third number of decoded points.
  16. 根据权利要求14所述的方法,其特征在于,所述基于所述第一和值和所述当前节点的非零子节点个数,确定所述第三已解码点个数,包括:The method according to claim 14, characterized in that the determining the third number of decoded points 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个非零子节点之前的非零子节点所包括的第一重复点个数之和,并将所述第三和值与所述第一重复点个数之和进行相加,得到所述第三已解码点个数。The sum of the first number of repeated points included in the non-zero child nodes located before the i-th non-zero child node in the current node is obtained, and the third sum value is added to the sum of the first number of repeated points to obtain the third number of decoded points.
  17. 根据权利要求8所述的方法,其特征在于,若所述点云未采用推断直接编码模式IDCM,则所述基于所述第三已解码点个数,确定所述第一已解码点个数,包括:The method according to claim 8, characterized in that if the point cloud does not adopt an inferred direct coding mode IDCM, then determining the first number of decoded points based on the third number of decoded points comprises:
    将所述第三已解码点个数,确定为所述第一已解码点个数。The third number of decoded points is determined as the first number of decoded points.
  18. 根据权利要求8所述的方法,其特征在于,若所述点云采用推断直接编码模式IDCM,则所述基于所述第三已解码点个数,确定所述第一已解码点个数,包括:The method according to claim 8, characterized in that if the point cloud adopts an inferred direct coding mode IDCM, then determining the first number of decoded points based on the third number of decoded points comprises:
    确定所述八叉树采用IDCM的第二节点所包括的点个数;Determine the number of points included in the second node of the octree using IDCM;
    将所述第三已解码点个数,与所述第二节点所包括的点个数之和,确定为所述第一已解码点个数。The sum of the third number of decoded points and the number of points included in the second node is determined as the first number of decoded points.
  19. 根据权利要求4-18任一项所述的方法,其特征在于,所述基于所述第一参数和所述第二参数,确定是否解码所述第i个非零子节点的重复点信息,包括:The method according to any one of claims 4 to 18, 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.
  20. 根据权利要求4-18任一项所述的方法,其特征在于,所述基于所述第一参数和所述第二参数,确定是否解码所述第i个非零子节点的重复点信息,包括:The method according to any one of claims 4 to 18, 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.
  21. 根据权利要求4-18任一项所述的方法,其特征在于,所述基于所述第一参数和所述第二参数,确定是否解码所述第i个非零子节点的重复点信息,包括:The method according to any one of claims 4 to 18, 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.
  22. 根据权利要求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.
  23. 根据权利要求22所述的方法,其特征在于,所述确定所述第i个非零子节点对应的已解码重复点总数,包括:The method according to claim 22, 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 third 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 third number of decoded repeated points, the total number of decoded repeated points corresponding to the i-th non-zero child node is determined.
  24. 根据权利要求23所述的方法,其特征在于,若所述点云采用预测树编码方式,则所述基于所述第三已解码重复点个数之和,确定所述第i个非零子节点对应的已解码重复点总数,包括:The method according to claim 23, characterized in that if the point cloud adopts a prediction tree encoding method, then determining the total number of decoded repeated points corresponding to the i-th non-zero child node based on the sum of the third number of decoded repeated points includes:
    确定所述八叉树中采用所述预测树编码方式的第一节点所包括的第四已解码重复点个数之和;Determine the sum of the number of fourth decoded repeated points included in the first node of the octree using the prediction tree encoding method;
    基于所述第三已解码重复点个数之和,以及所述第四已解码重复点个数之和,确定所述第i个非零子节点对应的已解码重复点总数。Based on the sum of the third number of decoded repeated points and the sum of the fourth number of decoded repeated points, the total number of decoded repeated points corresponding to the i-th non-zero child node is determined.
  25. 根据权利要求24所述的方法,其特征在于,若所述点云采用推断直接编码模式IDCM时,则所述基于所述第三已解码重复点个数之和、以及所述第四已解码重复点个数之和,确定所述第i个非零子节点对应的已解码重复点总数,包括:The method according to claim 24, characterized in that if the point cloud adopts 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 third number of decoded repeated points and the sum of the fourth number of decoded repeated points comprises:
    确定所述八叉树中采用IDCM的第二节点所包括的第五已解码重复点个数之和;Determine the sum of the number of fifth decoded repeated points included in the second node using IDCM in the octree;
    将所述第三已解码重复点个数之和、所述第四已解码重复点个数之和、以及第五已解码重复点个数之和进行相加,得到所述第i个非零子节点对应的已解码重复点总数。The sum of the third number of decoded repeated points, the sum of the fourth number of decoded repeated points, and the sum of the fifth number of decoded repeated points are added together to obtain the total number of decoded repeated points corresponding to the i-th non-zero child node.
  26. 根据权利要求22-25任一项所述的方法,其特征在于,所述基于所述第一参数,对所述当前节点进行几何解码,包括:The method according to any one of claims 22 to 25, characterized in that the step of geometrically decoding 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.
  27. 根据权利要求26所述的方法,其特征在于,所述确定所述点云的重复点总数,包括:The method according to claim 26, 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.
  28. 根据权利要求27所述的方法,其特征在于,所述基于所述点云的重复点总数和所述第i个非零子节点对应的已解码重复点总数,确定是否解码所述第i个非零子节点的重复点信息,包括:The method according to claim 27, 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.
  29. 根据权利要求27所述的方法,其特征在于,所述基于所述点云的重复点总数和所述第i个非零子节点对应的已解码重复点总数,确定是否解码所述第i个非零子节点的重复点信息,包括:The method according to claim 27, 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个非零子节点的重复点信息,且将所述点云的重复总点数与所述第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.
  30. 根据权利要求27所述的方法,其特征在于,所述基于所述点云的重复点总数和所述第i个非零子节点对应的已解码重复点总数,确定是否解码所述第i个非零子节点的重复点信息,包括:The method according to claim 27, 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.
  31. 根据权利要求1-18任一项所述的方法,其特征在于,所述重复点信息包括重复点个数。The method according to any one of claims 1-18 is characterized in that the repeated point information includes the number of repeated points.
  32. 根据权利要求2或27所述的方法,其特征在于,所述确定所述点云的总点数,包括:The method according to claim 2 or 27, 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.
  33. 根据权利要求32所述的方法,其特征在于,所述解码点云的几何码流,得到所述点云的总点数,包括:The method according to claim 32, 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 unit header of the point cloud to obtain the total number of points of the point cloud.
  34. 根据权利要求33所述的方法,其特征在于,所述解码所述几何单元头部,得到所述点云的总点数,包括:The method according to claim 33, characterized in that decoding the geometric unit header to obtain the total number of points in the point cloud comprises:
    解码所述几何单元头部,得到所述点云对应的片所含点数低位部分和片所含点数高位部分;Decoding the geometry unit header to obtain a low-order portion of points contained in a slice corresponding to the point cloud and a high-order portion of points contained in the slice;
    基于所述片所含点数低位部分和所述片所含点数高位部分,得到所述点云的总点数。The total number of points in the point cloud is obtained based on the low-order part of the number of points in the slice and the high-order part of the number of points in the slice.
  35. 根据权利要求12所述的方法,其特征在于,所述确定所述当前节点的非零子节点个数,包括:The method according to claim 12, 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.
  36. 一种点云编码方法,其特征在于,包括:A point cloud encoding method, characterized by comprising:
    确定当前节点对应的第一参数,所述第一参数用于确定所述当前节点的至少一个子节点是否包括重复点,所述当前节点为所述点云的八叉树的第N-1层中的一个非零节点,所述八叉树是对所述点云进行节点划分得到,所述N为所述八叉树的总层数,所述N为大于1的正整数;Determine a first parameter corresponding to a current node, where the first parameter is used to determine whether at least one child node of the current node includes a duplicate point, where the current node is a non-zero node in the N-1th layer of an octree of the point cloud, where the octree is obtained by node division of the point cloud, where N is the total number of layers of the octree, and where N is a positive integer greater than 1;
    基于所述第一参数,对所述当前节点进行几何编码。Based on the first parameter, geometric encoding is performed on the current node.
  37. 根据权利要求36所述的方法,其特征在于,所述确定当前节点对应的第一参数,包括:The method according to claim 36, characterized in that the determining the first parameter corresponding to the current node comprises:
    确定所述点云的总点数,以及所述第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.
  38. 根据权利要求37所述的方法,其特征在于,所述基于所述点云的总点数和所述第N-1层的非零节点数,确定所述第一参数,包括:The method according to claim 37, 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.
  39. 根据权利要求38所述的方法,其特征在于,所述基于所述第一参数,对所述当前节点进行几何编码,包括:The method according to claim 38, 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.
  40. 根据权利要求39所述的方法,其特征在于,所述确定所述第i个非零子节点对应的第二参数,包括:The method according to claim 39, characterized in that the determining the second parameter corresponding to the i-th non-zero child node comprises:
    确定所述点云中所述第i个非零子节点对应的第一已编码点个数;Determine the number of first encoded points corresponding to the i-th non-zero child node in the point cloud;
    基于所述点云中所述第i个非零子节点对应的第一已编码点个数,确定所述第i个非零子节点对应的第二参数。Based on the number of first 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.
  41. 根据权利要求40所述的方法,其特征在于,若所述点云采用预测树编码方式,所述基于所述点云中所述第i个非零子节点对应的第一已编码点个数,确定所述第i个非零子节点对应的第二参数,包括:The method according to claim 40, characterized in that if the point cloud adopts a prediction tree encoding method, the determining the second parameter corresponding to the i-th non-zero child node based on the number of first encoded points corresponding to the i-th non-zero child node in the point cloud comprises:
    将所述点云中所述第i个非零子节点对应的第一已编码点个数,确定为所述第二参数。The number of first encoded points corresponding to the i-th non-zero child node in the point cloud is determined as the second parameter.
  42. 根据权利要求40所述的方法,其特征在于,若所述点云未采用预测树编码方式,所述基于所述点云中所述第i个非零子节点对应的第一已编码点个数,确定所述第i个非零子节点对应的第二参数,包括:The method according to claim 40, characterized in that, if the point cloud does not adopt the prediction tree encoding method, the determining the second parameter corresponding to the i-th non-zero child node based on the number of first encoded points corresponding to the i-th non-zero child node in the point cloud comprises:
    获取所述点云的编码单元中采用预测树编码的第一编码单元所包括的第二已编码点个数,所述编码单元为对所述点云的包围盒进行预设次划分得到的非零节点;Obtaining the number of second encoded points included in a first encoding unit encoded by a prediction tree in an encoding unit of the point cloud, wherein the encoding unit is a non-zero node obtained by dividing a bounding box of the point cloud by a preset number of times;
    将所述第一已编码点个数和所述第二已编码点个数之和,确定为所述第二参数。The sum of the first number of encoded points and the second number of encoded points is determined as the second parameter.
  43. 根据权利要求40所述的方法,其特征在于,所述确定所述点云中所述第i个非零子节点对应的第一已编码点个数,包括:The method according to claim 40, characterized in that the determining the number of first encoded points corresponding to the i-th non-zero child node in the point cloud comprises:
    确定所述第i个非零子节点对应的第三已编码点个数;Determine the number of third encoded points corresponding to the i-th non-zero child node;
    基于所述第三已编码点个数,确定所述第一已编码点个数。Based on the third number of encoded points, the first number of encoded points is determined.
  44. 根据权利要求43所述的方法,其特征在于,所述确定所述第i个非零子节点对应的第三已编码点个数,包括:The method according to claim 43, characterized in that determining the number of third encoded points corresponding to the i-th non-zero child node 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;
    基于所述当前节点的非零子节点个数,确定所述第三已编码点个数。The third number of encoded points is determined based on the number of non-zero child nodes of the current node.
  45. 根据权利要求43所述的方法,其特征在于,所述基于所述当前节点的非零子节点个数,确定所述第三已编码点个数,包括:The method according to claim 43, characterized in that the determining the third number of encoded points based on the number of non-zero child nodes of the current node comprises:
    若所述第i个非零子节点为所述当前节点的第1个非零子节点,则将所述当前节点所包括的非零子节点的个数减 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 third number of encoded points.
  46. 根据权利要求43所述的方法,其特征在于,所述基于所述当前节点的非零子节点个数,确定所述第三已编码点个数,包括:The method according to claim 43, characterized in that the determining the third number of encoded points 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 among the non-zero child nodes of the current node;
    将所述当前节点所包括的非零子节点的个数减1后,再与所述第一重复点个数之和相加,得到所述第三已编码点个数。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 third number of encoded points.
  47. 根据权利要求43所述的方法,其特征在于,所述确定所述点云中所述第i个非零子节点对应的第三已编码点个数,包括:The method according to claim 43, characterized in that the determining the number of third 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层中位于所述当前节点之前的各非零节点对应的已编码点的个数,以及所述当前节点的非零子节点个数,确定所述第三已编码点个数。The third number of encoded points is determined 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.
  48. 根据权利要求47所述的方法,其特征在于,所述确定所述第N-1层中位于所述当前节点之前的各非零节点对应的已编码点的个数,包括:The method according to claim 47, 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 any non-zero node among the non-zero nodes, obtain the number of non-zero child nodes of the non-zero node and the sum of the number of second repeated points included in the non-zero child nodes of the non-zero 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 second number of repeated points to obtain the number of encoded points corresponding to the non-zero node.
  49. 根据权利要求47所述的方法,其特征在于,所述基于所述第N-1层中位于所述当前节点之前的各非零节点对应的已编码点的个数,以及所述当前节点的非零子节点个数,确定所述第三已编码点个数,包括:The method according to claim 47, characterized in that the determining the third number of coded points 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;
    基于所述第一和值和所述当前的非零子节点个数,确定所述第三已编码点个数。The third number of encoded points is determined based on the first sum value and the current number of non-zero child nodes.
  50. 根据权利要求49所述的方法,其特征在于,所述基于所述第一和值和所述当前节点的非零子节点个数,确定所述第三已编码点个数,包括:The method according to claim 49, characterized in that the determining the third number of encoded points 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,得到所述第三已编码点个数。Subtract 1 from the second sum to obtain the third number of encoded points.
  51. 根据权利要求49所述的方法,其特征在于,所述基于所述第一和值和所述当前节点的非零子节点个数,确定所述第i个非零子节点对应的第三已编码点个数,包括:The method according to claim 49, characterized in that the determining the number of third 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个非零子节点之前的非零子节点所包括的第一重复点个数之和,并将所述第三和值与所述第一重复点个数之和进行相加,得到所述第三已编码点个数。Obtain the sum of the first number of repeated points included in the non-zero child nodes located 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 third number of encoded points.
  52. 根据权利要求43所述的方法,其特征在于,若所述点云未采用推断直接编码模式IDCM,则所述基于所述第三已编码点个数,确定所述第一已编码点个数,包括:The method according to claim 43, characterized in that if the point cloud does not adopt an inferred direct coding mode IDCM, then determining the first number of encoded points based on the third number of encoded points comprises:
    将所述第三已编码点个数,确定为所述第一已编码点个数。The third number of encoded points is determined as the first number of encoded points.
  53. 根据权利要求43所述的方法,其特征在于,若所述点云采用推断直接编码模式IDCM,则所述基于所述第三已编码点个数,确定所述第一已编码点个数,包括:The method according to claim 43, characterized in that if the point cloud adopts an inferred direct coding mode IDCM, then determining the first number of encoded points based on the third number of encoded points comprises:
    确定所述八叉树采用IDCM的第二节点所包括的点个数;Determine the number of points included in the second node of the octree using IDCM;
    将所述第i个非零子节点对应的已编码点个数,与所述第二节点所包括的点个数之和,确定为所述第一已编码点个数。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 second node is determined as the first number of encoded points.
  54. 根据权利要求39-53任一项所述的方法,其特征在于,所述基于所述第一参数和所述第二参数,确定是否编码所述第i个非零子节点的重复点信息,包括:The method according to any one of claims 39 to 53, 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.
  55. 根据权利要求39-53任一项所述的方法,其特征在于,所述基于所述第一参数和所述第二参数,确定是否编码所述第i个非零子节点的重复点信息,包括:The method according to any one of claims 39 to 53, 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.
  56. 根据权利要求39-53任一项所述的方法,其特征在于,所述基于所述第一参数和所述第二参数,确定是否编码所述第i个非零子节点的重复点信息,包括:The method according to any one of claims 39 to 53, 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.
  57. 根据权利要求36所述的方法,其特征在于,所述确定当前节点对应的第一参数,包括:The method according to claim 36, 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.
  58. 根据权利要求57所述的方法,其特征在于,所述确定所述第i个非零子节点对应的已编码重复点总数,包括:The method according to claim 57, 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 third 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 third number of encoded repeated points, the total number of encoded repeated points corresponding to the i-th non-zero child node is determined.
  59. 根据权利要求58所述的方法,其特征在于,若所述点云采用预测树编码方式,则所述基于所述第三已编码重复点个数之和,确定所述第i个非零子节点对应的已编码重复点总数,包括:The method according to claim 58, characterized in that if the point cloud adopts a prediction tree encoding method, then determining the total number of encoded repeated points corresponding to the i-th non-zero child node based on the sum of the third number of encoded repeated points includes:
    确定所述八叉树中采用所述预测树编码方式的第一节点所包括的第四已编码重复点个数之和;Determine the sum of the number of fourth encoded repeated points included in the first node of the octree using the prediction tree encoding method;
    基于所述第三已编码重复点个数之和、以及所述第四已编码重复点个数之和,确定所述第i个非零子节点对应的已编码重复点总数。Based on the sum of the third number of encoded repeated points and the sum of the fourth number of encoded repeated points, the total number of encoded repeated points corresponding to the i-th non-zero child node is determined.
  60. 根据权利要求59所述的方法,其特征在于,若所述点云采用推断直接编码模式IDCM时,则基于所述第三已编码重复点个数之和、以及所述第四已编码重复点个数之和,确定所述第i个非零子节点对应的已编码重复点总数,包括:The method according to claim 59, characterized in that if the point cloud adopts the inferred direct coding mode IDCM, then based on the sum of the third number of encoded repeated points and the sum of the fourth number of encoded repeated points, determining the total number of encoded repeated points corresponding to the i-th non-zero child node comprises:
    确定所述八叉树中采用IDCM的第二节点所包括的第五已编码重复点个数之和;Determine the sum of the number of fifth coded repeated points included in the second node using IDCM in the octree;
    将所述第三已编码重复点个数之和、所述第四已编码重复点个数之和、以及第五已编码重复点个数之和进行相加,得到所述第i个非零子节点对应的已编码重复点总数。The sum of the third number of encoded repeated points, the sum of the fourth number of encoded repeated points, and the sum of the fifth 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.
  61. 根据权利要求57-60任一项所述的方法,其特征在于,所述基于所述第一参数,对所述当前节点进行几何编码,包括:The method according to any one of claims 57 to 60, 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.
  62. 根据权利要求61所述的方法,其特征在于,所述确定所述点云的重复点总数,包括:The method of claim 61, 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.
  63. 根据权利要求61所述的方法,其特征在于,所述基于所述点云的重复点总数和所述第i个非零子节点对应的已编码重复点总数,确定是否编码所述第i个非零子节点的重复点信息,包括:The method according to claim 61, 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.
  64. 根据权利要求61所述的方法,其特征在于,所述基于所述点云的重复点总数和所述第i个非零子节点对应的已编码重复点总数,确定是否编码所述第i个非零子节点的重复点信息,包括:The method according to claim 61, 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.
  65. 根据权利要求61所述的方法,其特征在于,所述基于所述点云的重复点总数和所述第i个非零子节点对应的已编码重复点总数,确定是否编码所述第i个非零子节点的重复点信息,包括:The method according to claim 61, 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.
  66. 根据权利要求36-53任一项所述的方法,其特征在于,所述重复点信息包括重复点个数。The method according to any one of claims 36-53 is characterized in that the repeated point information includes the number of repeated points.
  67. 根据权利要求37或62所述的方法,其特征在于,所述方法还包括:The method according to claim 37 or 62, 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.
  68. 根据权利要求67所述的方法,其特征在于,所述将所述点云的总点数,写入所述点云的几何码流中,包括:The method according to claim 67, 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 unit header of the point cloud.
  69. 根据权利要求68所述的方法,其特征在于,所述将所述点云的总点数,写入所述点云的几何单元头部中,包括:The method according to claim 68, characterized in that the step of writing the total number of points of the point cloud into a geometric unit header of the point cloud comprises:
    基于所述点云的总点数,确定所述点云对应的片所含点数低位部分和片所含点数高位部分;Based on the total number of points in the point cloud, determine the low-order part of the points contained in the slice corresponding to the point cloud and the high-order part of the points contained in the slice;
    将所述片所含点数低位部分和所述片所含点数高位部分,写入所述几何单元头部中。The low-order part of the number of points contained in the slice and the high-order part of the number of points contained in the slice are written into the geometry unit header.
  70. 一种点云解码装置,其特征在于,包括:A point cloud decoding device, characterized by comprising:
    确定单元,用于确定当前节点对应的第一参数,所述第一参数用于确定所述当前节点的至少一个非零子节点是否包括重复点,所述当前节点为所述点云的八叉树的第N-1层中的一个非零节点,所述八叉树是对所述点云进行节点划分得到,所述N为所述八叉树的总层数,所述N为大于1的正整数;a determining unit, configured to determine a first parameter corresponding to a current node, wherein the first parameter is used to determine whether at least one non-zero child node of the current node includes a duplicate point, wherein the current node is a non-zero node in the N-1th layer of the octree of the point cloud, wherein the octree is obtained by node division of the point cloud, and N is a total number of layers of the octree, and N is a positive integer greater than 1;
    解码单元,用于基于所述第一参数,对所述当前节点进行几何解码。A decoding unit is used to perform geometric decoding on the current node based on the first parameter.
  71. 一种点云编码装置,其特征在于,包括:A point cloud encoding device, characterized in that it comprises:
    确定单元,用于确定当前节点对应的第一参数,所述第一参数用于确定所述当前节点的至少一个非零子节点是否包括重复点,所述当前节点为所述点云的八叉树的第N-1层中的一个非零节点,所述八叉树是对所述点云进行节点划分得到,所述N为所述八叉树的总层数,所述N为大于1的正整数;a determining unit, configured to determine a first parameter corresponding to a current node, wherein the first parameter is used to determine whether at least one non-zero child node of the current node includes a duplicate point, wherein the current node is a non-zero node in the N-1th layer of the octree of the point cloud, wherein the octree is obtained by node division of the point cloud, and N is a total number of layers of the octree, and N is a positive integer greater than 1;
    编码单元,用于基于所述第一参数,对所述当前节点进行几何编码。A coding unit, configured to perform geometric coding on the current node based on the first parameter.
  72. 一种电子设备,其特征在于,包括:处理器和存储器;An electronic device, characterized in that it comprises: a processor and a memory;
    所述存储器用于存储计算机程序;The memory is used to store computer programs;
    所述处理器用于调用并运行所述存储器中存储的计算机程序,以执行如权利要求1至35或36至69任一项所述的方法。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 35 or 36 to 69.
  73. 一种计算机可读存储介质,其特征在于,用于存储计算机程序,所述计算机程序使得计算机执行如权利要求1至35或36至69任一项所述的方法。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 35 or 36 to 69.
PCT/CN2022/122117 2022-09-28 2022-09-28 Point cloud coding method and apparatus, point cloud decoding method and apparatus, and device and storage medium WO2024065272A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2022/122117 WO2024065272A1 (en) 2022-09-28 2022-09-28 Point cloud coding method and apparatus, point cloud decoding method and apparatus, and device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2022/122117 WO2024065272A1 (en) 2022-09-28 2022-09-28 Point cloud coding method and apparatus, point cloud decoding method and apparatus, and device and storage medium

Publications (1)

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

Family

ID=90475235

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/122117 WO2024065272A1 (en) 2022-09-28 2022-09-28 Point cloud coding method and apparatus, point cloud decoding method and apparatus, and device and storage medium

Country Status (1)

Country Link
WO (1) WO2024065272A1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112997498A (en) * 2018-11-13 2021-06-18 松下电器(美国)知识产权公司 Three-dimensional data encoding method, three-dimensional data decoding method, three-dimensional data encoding device, and three-dimensional data decoding device
US20210218994A1 (en) * 2020-01-09 2021-07-15 Apple Inc. Geometry Encoding of Duplicate Points
WO2021196392A1 (en) * 2020-03-30 2021-10-07 鹏城实验室 Point cloud geometry encoding method, decoding method, encoding apparatus, and decoding apparatus

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112997498A (en) * 2018-11-13 2021-06-18 松下电器(美国)知识产权公司 Three-dimensional data encoding method, three-dimensional data decoding method, three-dimensional data encoding device, and three-dimensional data decoding device
US20210218994A1 (en) * 2020-01-09 2021-07-15 Apple Inc. Geometry Encoding of Duplicate Points
WO2021196392A1 (en) * 2020-03-30 2021-10-07 鹏城实验室 Point cloud geometry encoding method, decoding method, encoding apparatus, and decoding apparatus

Similar Documents

Publication Publication Date Title
US11803989B2 (en) Quantization for geometry-based point cloud compression
US11910017B2 (en) Method for predicting point cloud attribute, encoder, decoder, and storage medium
WO2022133753A1 (en) Point cloud encoding and decoding methods and systems, point cloud encoder, and point cloud decoder
KR20220164700A (en) Trisoup syntax signaling for geometry-based point cloud compression
WO2024065272A1 (en) Point cloud coding method and apparatus, point cloud decoding method and apparatus, and device and storage medium
WO2024065269A1 (en) Point cloud encoding and decoding method and apparatus, 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
WO2022188582A1 (en) Method and apparatus for selecting neighbor point in point cloud, and codec
WO2023024840A1 (en) Point cloud encoding and decoding methods, encoder, decoder and storage medium
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
WO2023024842A1 (en) Point cloud encoding/decoding method, apparatus and device, and storage medium
WO2023197337A1 (en) Index determining method and apparatus, decoder, and encoder
WO2022140937A1 (en) Point cloud encoding method and system, point cloud decoding method and system, point cloud encoder, and point cloud decoder
US20240087174A1 (en) Coding and decoding point cloud attribute information
WO2024065406A1 (en) Encoding and decoding methods, bit stream, encoder, decoder, and storage medium
WO2023197338A1 (en) Index determination method and apparatus, decoder, and encoder
WO2023240455A1 (en) Point cloud encoding method and apparatus, encoding device, and storage medium
WO2023240662A1 (en) Encoding method, decoding method, encoder, decoder, and storage medium
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
US20230377208A1 (en) Geometry coordinate scaling for ai-based dynamic point cloud coding
WO2023123284A1 (en) Decoding method, encoding method, decoder, encoder, and storage medium
WO2024082152A1 (en) Encoding and decoding methods and apparatuses, encoder and decoder, code stream, device, and storage medium