Point cloud coding and decoding method, device, equipment and storage medium

CN119366190APending Publication Date: 2025-01-24GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202280097183.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2022-09-28
Publication Date
2025-01-24

Smart Images

  • Figure CN119366190A_ABST
    Figure CN119366190A_ABST
Patent Text Reader

Abstract

The invention provides a point cloud coding and decoding method, device and equipment and a storage medium, and the method comprises the steps: in the point cloud coding and decoding based on a prediction tree, before coding and decoding a current node, firstly determining a first parameter corresponding to the current node, the first parameter being used for determining whether the current node comprises a repetition point, and then determining whether the current node comprises the repetition point based on the first parameter; and decoding the current node. For example, when it is determined that the current node does not include the repetitive point based on the first parameter, coding and decoding of the repetitive point information of the current node are skipped when the current node is coded and decoded, and if it is determined that the current node includes the repetitive point based on the first parameter, coding and decoding of the repetitive point information of the current node is performed, so that the coding and decoding complexity of the point cloud is reduced, and the coding and decoding efficiency of the point cloud is improved. The coding and decoding time is saved, and the coding and decoding efficiency is further improved.
Need to check novelty before this filing date? Find Prior Art

Description

Point cloud encoding and decoding method, device, equipment and storage medium Technical Field

[0001] The present application relates to the field of point cloud technology, and in particular to a point cloud encoding and decoding method, apparatus, device and storage medium. Background Art

[0002] Capturing the surface of an object using a capture device creates point cloud data, which can contain hundreds of thousands or even more points. During video production, this 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 poses a challenge to transmission, so the point cloud encoding device must compress the point cloud data before transmission.

[0003] Point cloud compression, also known as point cloud encoding, uses various encoding models to map points in the point cloud to nodes and encode these nodes, some of which contain duplicate points. Current encoding and decoding methods, such as prediction tree-based point cloud encoding and decoding, require encoding and decoding duplicate point information for each node in the prediction tree, which reduces point cloud encoding and decoding efficiency.

[0004] Summary of the Invention

[0005] The embodiments of the present application provide a point cloud encoding and decoding method, apparatus, device, and storage medium to reduce the complexity of encoding and decoding, save encoding and decoding time, and thereby improve the encoding and decoding efficiency of point clouds.

[0006] In a first aspect, an embodiment of the present application provides a point cloud decoding method, comprising:

[0007] Determine a first parameter corresponding to a current node, where the first parameter is used to determine whether the current node includes duplicate points, and the current node is a node in a prediction tree of the point cloud;

[0008] The current node is decoded based on the first parameter.

[0009] In a second aspect, the present application provides a point cloud encoding method, comprising:

[0010] Determine the prediction tree corresponding to the point cloud;

[0011] Determine a first parameter corresponding to a current node, where the first parameter is used to determine whether the current node includes a duplicate point, and the current node is a node in the prediction tree;

[0012] The current node is encoded based on the first parameter.

[0013] In a third aspect, the present application provides a point cloud decoding device for executing the method of the first aspect or its respective implementations. Specifically, the device includes a functional unit for executing the method of the first aspect or its respective implementations.

[0014] In a fourth aspect, the present application provides a point cloud encoding device for executing the method of the second aspect or its respective implementations. Specifically, the device includes a functional unit for executing the method of the second aspect or its respective implementations.

[0015] In a fifth aspect, a point cloud decoder is provided, comprising a processor and a memory. The memory is configured to store a computer program, and the processor is configured to call and execute the computer program stored in the memory to perform the method of the first aspect or its respective implementations.

[0016] In a sixth aspect, a point cloud encoder is provided, comprising a processor and a memory. The memory is configured to store a computer program, and the processor is configured to call and execute the computer program stored in the memory to perform the method of the second aspect or its respective implementations.

[0017] 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 configured to execute the method of the first aspect or its respective implementations, and the point cloud encoder is configured to execute the method of the second aspect or its respective implementations.

[0018] In an eighth aspect, a chip is provided for implementing the method described in any one of the first and second aspects above, or their respective implementations. Specifically, the chip includes a processor configured to load and execute a computer program from a memory, causing a device equipped with the chip to perform the method described in any one of the first and second aspects above, or their respective implementations.

[0019] In a ninth aspect, a computer-readable storage medium is provided for storing a computer program, which enables a computer to execute the method of any one of the first to second aspects or their respective implementations.

[0020] In a tenth aspect, a computer program product is provided, comprising computer program instructions, which enable a computer to execute the method of any one of the first to second aspects or their respective implementations.

[0021] 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 their respective implementations.

[0022] In a twelfth aspect, a code stream is provided. The code stream is generated based on the method of the second aspect. Optionally, the code stream includes at least one of a first parameter and a second parameter.

[0023] Based on the above technical solution, in the prediction tree-based point cloud encoding and decoding, before encoding and decoding the current node, a first parameter corresponding to the current node is first determined. The first parameter is used to determine whether the current node includes duplicate points, and then the current node is decoded based on the first parameter. For example, if it is determined based on the first parameter that the current node does not include duplicate points, then when encoding and decoding the current node, encoding and decoding the duplicate point information of the current node is skipped. If it is determined based on the first parameter that the current node includes duplicate points, the duplicate point information of the current node is encoded and decoded, thereby reducing the encoding and decoding complexity of the point cloud, saving encoding and decoding time, and thus improving encoding and decoding efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1A is a schematic diagram of a point cloud;

[0025] Figure 1B is a partial enlarged view of the point cloud;

[0026] FIG2 is a schematic diagram of six viewing angles of a point cloud image;

[0027] FIG3 is a schematic block diagram of a point cloud encoding and decoding system according to an embodiment of the present application;

[0028] FIG4A is a schematic block diagram of a point cloud encoder provided in an embodiment of the present application;

[0029] FIG4B is a schematic block diagram of a point cloud decoder provided in an embodiment of the present application;

[0030] 5A to 5C are schematic diagrams of geometric information encoding based on triangular facets;

[0031] FIG6A is a schematic diagram of the coding framework of the prediction tree;

[0032] FIG6B is a schematic diagram of a decoding framework of a prediction tree;

[0033] FIG7 is a schematic diagram of coordinate transformation of a point cloud acquired by a rotating laser radar;

[0034] FIG8A is a schematic diagram of a prediction tree;

[0035] FIG8B is a schematic diagram of another prediction tree;

[0036] FIG8C is a schematic diagram of a quantization principle;

[0037] FIG9 is a schematic diagram of a point cloud decoding method according to an embodiment of the present application;

[0038] FIG10 is a schematic diagram of a point cloud encoding method according to an embodiment of the present application;

[0039] FIG11 is a schematic block diagram of a point cloud decoding device provided in an embodiment of the present application;

[0040] FIG12 is a schematic block diagram of a point cloud encoding device provided in an embodiment of the present application;

[0041] FIG13 is a schematic block diagram of an electronic device provided in an embodiment of the present application;

[0042] Figure 14 is a schematic block diagram of the point cloud encoding and decoding system provided in an embodiment of the present application. DETAILED DESCRIPTION

[0043] The present application can be applied to the field of point cloud upsampling technology, for example, it can be applied to the field of point cloud compression technology.

[0044] To facilitate understanding of the embodiments of the present application, the following briefly introduces the relevant concepts involved in the embodiments of the present application:

[0045] A point cloud is a set of irregularly distributed discrete points in space that represent the spatial structure and surface properties of a three-dimensional object or scene. Figure 1A is a schematic diagram of a 3D point cloud image, and Figure 1B is a zoomed-in view of Figure 1A. As can be seen from Figures 1A and 1B, the point cloud surface is composed of densely distributed points.

[0046] 2D images contain information at every pixel, and their distribution is regular, so there's no need to record their location. However, the distribution of points in a point cloud in 3D space is random and irregular, so recording the location of every point in space is necessary to fully represent a point cloud. Similar to 2D images, each location in the data collection process has corresponding attribute information.

[0047] Point cloud data is a specific record format for point clouds. Points in a point cloud can include both their location information and attribute information. For example, the location information of a point can be its 3D coordinate information. This information can also be referred to as its geometric information. For example, the attribute information of a point can include color information, reflectance information, normal vector information, and so on. Color information reflects the color of an object, while reflectance information reflects the surface material of the object. The color information can be information in any color space. For example, the color information can be in RGB. Another example is luminance and chrominance (YCbCr, YUV) information. For example, Y represents luminance (Luma), Cb (U) represents blue color difference, Cr (V) represents red, and U and V represent chroma (Chroma) to describe color difference information. For example, a point cloud obtained using laser measurement principles can include both its 3D coordinate information and its laser reflection intensity (reflectance). Another example is a point cloud obtained using photogrammetry principles, which can include both its 3D coordinate information and its color information. For 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. Figure 2 shows a point cloud image, where Figure 2 shows six viewing angles of the point cloud image. Table 1 shows the point cloud data storage format consisting of a file header information part and a data part:

[0048] Table 1

[0049]

[0050] 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. Each point has three-dimensional position information XYZ and three-dimensional color information RGB.

[0051] Point clouds can flexibly and conveniently express the spatial structure and surface properties of three-dimensional objects or scenes. Moreover, since point clouds are obtained by directly sampling real objects, 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.

[0052] The ways to obtain point cloud data may include but are not limited to at least one of the following: (1) generation by computer equipment. 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 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. 3D photography equipment (i.e., a group of cameras or camera equipment with multiple lenses and sensors) is used to collect real-world visual scenes to obtain point cloud data of real-world visual scenes. 3D photography can 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 through medical equipment. In the medical field, point cloud data of biological tissues and organs can be obtained through medical equipment such as magnetic resonance imaging (MRI), computed tomography (CT), and electromagnetic positioning information.

[0053] Point clouds can be divided into dense point clouds and sparse point clouds according to the acquisition method.

[0054] Point clouds are divided into the following types according to the time series of the data:

[0055] The first type of static point cloud: the object is stationary and the device used to obtain the point cloud is also stationary;

[0056] The second type of dynamic point cloud: the object is moving, but the device that obtains the point cloud is stationary;

[0057] The third type of dynamic point cloud acquisition: the device that acquires the point cloud is moving.

[0058] Point clouds are divided into two categories according to their uses:

[0059] Category 1: Machine perception point cloud, which can be used in scenarios such as autonomous navigation systems, real-time inspection systems, geographic information systems, visual sorting robots, and disaster relief robots;

[0060] Category 2: Human eye perception point cloud, which can be used in point cloud application scenarios such as digital cultural heritage, free viewpoint broadcasting, 3D immersive communication, and 3D immersive interaction.

[0061] The aforementioned point cloud acquisition technologies reduce the cost and time required to acquire point cloud data, while improving data accuracy. This evolution in point cloud data acquisition has made it possible to acquire large amounts of point cloud data. However, as application demands grow, the processing of massive amounts of 3D point cloud data is facing bottlenecks due to storage space and transmission bandwidth limitations.

[0062] Taking a point cloud video with a frame rate of 30 fps (frames per second) as an example, each frame contains 700,000 points, each with coordinate information (xyz, float) and color information (RGB, uchar). Therefore, the data volume of a 10-second point cloud video is approximately 0.7 million (4 Byte 3 + 1 Byte 3) 30 fps 10 seconds = 3.15 GB. For a 1280 x 720 2D video with a YUV sampling format of 4:2:0 and a frame rate of 24 fps, the data volume for 10 seconds is approximately 1280 x 720 12-bit 24 frames 10 seconds = 0.33 GB. A 10-second two-view 3D video has a data volume of approximately 0.33 x 2 = 0.66 GB. Therefore, the data volume of a point cloud video far exceeds that of a 2D or 3D video of the same length. Therefore, point cloud compression has become a key issue in promoting the development of the point cloud industry to better manage data, save server storage space, and reduce the transmission traffic and time between the server and client.

[0063] The following introduces the relevant knowledge of point cloud encoding and decoding.

[0064] Figure 3 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 Figure 3 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 Figure 3. As shown in Figure 3, 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.

[0065] 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.

[0066] 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.

[0067] 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 a communication standard and transmit the modulated point cloud data to the decoding device 120. The communication media includes wireless communication media, such as radio frequency spectrum. Optionally, the communication media can also include wired communication media, such as one or more physical transmission lines.

[0068] In another example, channel 130 includes a storage medium that can store the point cloud data encoded by encoding device 110. The storage medium includes various locally accessible data storage media, such as optical disks, DVDs, and flash memory. In this example, decoding device 120 can retrieve the encoded point cloud data from the storage medium.

[0069] 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. Alternatively, 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.

[0070] 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.

[0071] 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 .

[0072] 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.

[0073] 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 on a storage medium or storage server for subsequent reading by the decoding device 120.

[0074] In some embodiments, the decoding device 120 includes an input interface 121 and a point cloud decoder 122 .

[0075] 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 .

[0076] The input interface 121 includes a receiver and / or a modem and can receive the encoded point cloud data via the channel 130 .

[0077] 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.

[0078] 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 external to the decoding device 120. The display device 123 may include various 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.

[0079] 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.

[0080] Current point cloud encoders can use two point cloud compression coding technology routes proposed by the Moving Picture Experts Group (MPEG) of the International Organization for Standardization: Video-based Point Cloud Compression (VPCC) and Geometry-based Point Cloud Compression (GPCC). VPCC projects a 3D point cloud onto a 2D image and uses existing 2D coding tools to encode the projected 2D image. GPCC uses a hierarchical structure to divide the point cloud into multiple units, encoding the entire point cloud by recording the division process.

[0081] The following uses the GPCC encoding and decoding framework as an example to illustrate the point cloud encoder and point cloud decoder applicable to the embodiments of the present application.

[0082] Figure 4A is a schematic block diagram of the point cloud encoder provided in an embodiment of the present application.

[0083] As can be seen from the above, points in a point cloud can include both their location information and their attribute information. Therefore, the encoding of points in a point cloud mainly includes location encoding and attribute encoding. In some examples, the location information of points in a point cloud is also called geometric information, and the corresponding location encoding of points in the point cloud can also be called geometric encoding.

[0084] In the GPCC coding framework, the geometric information of the point cloud and the corresponding attribute information are encoded separately.

[0085] As shown in Figure 4A below, the current geometric coding and decoding of G-PCC can be divided into octree-based geometric coding and decoding and prediction tree-based geometric coding and decoding.

[0086] The position encoding process involves preprocessing the points in the point cloud, such as coordinate transformation, quantization, and duplicate point removal. Next, geometric encoding is performed on the preprocessed point cloud, such as constructing an octree or prediction tree. Based on the constructed octree or prediction tree, geometric encoding is performed to form a geometric bitstream. Simultaneously, the position information of each point in the point cloud data is reconstructed based on the position information output by the constructed octree or prediction tree, resulting in a reconstructed value for each point's position information.

[0087] The attribute encoding process includes: given the reconstruction information of the input point cloud position information and the original value of the attribute information, selecting one of the three prediction modes for point cloud prediction, quantizing the predicted result, and performing arithmetic coding to form an attribute code stream.

[0088] As shown in Figure 4A, position encoding can be achieved through the following units:

[0089] Coordinate conversion (Tanmsform coordinates) unit 201, voxel (Voxelize) unit 202, octree partition (Analyze octree) unit 203, geometry reconstruction (Reconstruct geometry) unit 204, first arithmetic encoding (Arithmetic enconde) unit 205, surface fitting unit (Analyze surface approximation) 206 and prediction tree construction unit 207.

[0090] The coordinate conversion unit 201 can be used to convert the world coordinates of a point in the point cloud into relative coordinates. For example, the geometric coordinates of the point are subtracted from the minimum value of the x, y, and z coordinate axes, which is equivalent to a DC removal operation, to convert the coordinates of the point in the point cloud from world coordinates to relative coordinates.

[0091] Voxelize unit 202, also known as the quantize and remove points unit, reduces the number of coordinates through quantization. After quantization, previously different points may be assigned the same coordinates. Based on this, duplicate points can be removed through deduplication. For example, multiple clouds with the same quantized position but different attribute information can be merged into a single cloud through attribute conversion. In some embodiments of the present application, voxel unit 202 is an optional unit module.

[0092] The octree partitioning unit 203 may encode the quantized point position information using an octree encoding scheme. For example, the point cloud may be partitioned using an octree, so that point positions correspond one-to-one with octree positions. Geometric encoding is performed by counting the point positions in the octree and setting their flags to 1.

[0093] In some embodiments, in the geometric information encoding process based on a triangle soup (trisoup), the point cloud is also octree-partitioned by the octree partitioning unit 203. However, unlike the geometric information encoding based on the octree, the trisoup does not need to divide the point cloud into unit cubes with a side length of 1x1x1 step by step. Instead, the division is stopped when the block (sub-block) has a side length of W. Based on the surface formed by the distribution of the point cloud in each block, at most twelve vertices (intersections) generated by the surface and the twelve edges of the block are obtained. The intersections are surface-fitted by the surface fitting unit 206, and the fitted intersections are geometrically encoded.

[0094] The prediction tree construction unit 207 can encode the quantized point position information using a prediction tree encoding method. For example, the point cloud is divided into a prediction tree, so that the point positions correspond one-to-one with the positions of the nodes in the prediction tree. By counting the positions of the points in the prediction tree, different prediction modes are selected to predict the geometric position information of the nodes to obtain prediction residuals, and the geometric prediction residuals are quantized using quantization parameters. Finally, through continuous iteration, the prediction residuals of the prediction tree node position information, the prediction tree structure, and the quantization parameters are encoded to generate a binary bitstream.

[0095] The geometric reconstruction unit 204 can perform position reconstruction based on the position information output by the octree partitioning unit 203 or the intersection points fitted by the surface fitting unit 206 to obtain a reconstructed value of the position information of each point in the point cloud data. Alternatively, the geometric reconstruction unit 204 can perform position reconstruction based on the position information output by the prediction tree construction unit 207 to obtain a reconstructed value of the position information of each point in the point cloud data.

[0096] The arithmetic coding unit 205 may perform entropy coding on the position information output by the octree analysis unit 203 or the intersection points fitted by the surface fitting unit 206, or the geometric prediction residual values ​​output by the prediction tree construction unit 207 to generate a geometric code stream; the geometric code stream may also be referred to as a geometry bitstream.

[0097] Attribute encoding can be achieved through the following units:

[0098] A color conversion unit 210 , a transfer attributes unit 211 , a region adaptive hierarchical transform (RAHT) unit 212 , a generate LOD unit 213 , a lifting transform unit 214 , a quantize coefficients unit 215 , and an arithmetic coding unit 216 .

[0099] It should be noted that the point cloud encoder 200 may include more, fewer, or different functional components than those shown in FIG. 4A .

[0100] The color conversion unit 210 may be configured to convert the RGB color space of a point in the point cloud into a YCbCr format or other formats.

[0101] The recoloring unit 211 recolors the color information using the reconstructed geometric information so that the uncoded attribute information corresponds to the reconstructed geometric information.

[0102] After the original value of the point attribute information is converted by the recoloring unit 211, any transformation unit can be selected to transform the points in the point cloud. The transformation units may include: RAHT transformation 212 and lifting transformation unit 214. The lifting transformation relies on generating the level of detail (LOD).

[0103] Either the RAHT transform or the lifting transform can be understood as being used to predict the attribute information of a point in a point cloud to obtain a predicted value of the attribute information of the point, and then to obtain a residual value of the attribute information of the point based on the predicted value of the attribute information of the point. For example, the residual value of the attribute information of the point can be the original value of the attribute information of the point minus the predicted value of the attribute information of the point.

[0104] In one embodiment of the present application, the process of generating LOD by the LOD generation unit includes: obtaining the Euclidean distance between points based on the position information of the points in the point cloud; and dividing the points into different detail expression layers based on the Euclidean distance. In one embodiment, the Euclidean distances can be sorted and then Euclidean distances in different ranges can be divided into different detail expression layers. For example, a point can be randomly selected as the first detail expression layer. The Euclidean distances between the remaining points and the point are then calculated, and the points whose Euclidean distances meet the first threshold requirement are classified as the second detail expression layer. The centroid of the points in the second detail expression layer is obtained, and the Euclidean distances between the points other than the first and second detail expression layers and the centroid are calculated, and the points whose Euclidean distances meet the second threshold requirement are classified as the third detail expression layer. And so on, all points are classified into the detail expression layer. By adjusting the threshold of the Euclidean distance, the number of points in each LOD layer can be increased. It should be understood that the LOD division method can also be adopted in other ways, and this application is not limited to this.

[0105] It should be noted that the point cloud can be directly divided into one or more detail expression layers, or the point cloud can be first divided into multiple point cloud slices, and then each point cloud slice can be divided into one or more LOD layers.

[0106] For example, a point cloud can be divided into multiple point cloud tiles, each containing between 550,000 and 1.1 million points. Each point cloud tile can be considered a separate point cloud. Each point cloud tile can be further divided into multiple detail expression layers, each containing multiple points. In one embodiment, the detail expression layers can be divided based on the Euclidean distance between points.

[0107] The quantization unit 215 may be used to quantize the residual value of the attribute information of the point. For example, if the quantization unit 215 is connected to the RAHT transformation unit 212, the quantization unit 215 may be used to quantize the residual value of the attribute information of the point output by the RAHT transformation unit 212.

[0108] The arithmetic coding unit 216 may perform entropy coding on the residual value of the attribute information of the point using zero run length coding to obtain an attribute code stream. The attribute code stream may be bit stream information.

[0109] Figure 4B is a schematic block diagram of the point cloud decoder provided in an embodiment of the present application.

[0110] As shown in Figure 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.

[0111] The position decoding process includes: performing arithmetic decoding on the geometric code stream; constructing an octree and then merging it to reconstruct the point position information to obtain the reconstructed position information of the point; and performing coordinate transformation on the reconstructed position information of the point to obtain the point position information. The point position information can also be called the point's geometric information.

[0112] The attribute decoding process includes: obtaining the residual value of the attribute information of the point in the point cloud by parsing the attribute code stream; obtaining the residual value of the attribute information of the point after dequantization by dequantizing the residual value of the attribute information of the point; based on the reconstruction information of the point position information obtained in the position decoding process, selecting one of the following RAHT inverse transform and lifting inverse transform to perform point cloud prediction to obtain the predicted value, and adding the predicted value to the residual value to obtain the reconstructed value of the attribute information of the point; performing inverse color space conversion on the reconstructed value of the attribute information of the point to obtain the decoded point cloud.

[0113] As shown in Figure 4B, position decoding can be achieved by the following units:

[0114] Arithmetic decoding unit 301, octree synthesis unit 302, surface approximation unit 303, geometry reconstruction unit 304, inverse transform coordinates unit 305 and prediction tree reconstruction unit 306.

[0115] Attribute encoding can be achieved through the following units:

[0116] an arithmetic decoding unit 310 , an inverse quantization unit 311 , a RAHT inverse transform unit 312 , a LOD generation unit 313 , an inverse lifting unit 314 , and an inverse color conversion unit 315 .

[0117] 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 Figure 5.

[0118] For example, the decoder 300 can divide the point cloud into multiple LODs based on the Euclidean distance between points in the point cloud. The decoder 300 then decodes the attribute information of the points in the LODs in sequence. For example, the number of zeros (zero_cnt) in the zero-run encoding technique is calculated to decode the residual based on zero_cnt. The decoding framework 200 then dequantizes the decoded residual value and adds the dequantized residual value to the predicted value of the current point to obtain the reconstructed value of the point cloud until all point clouds are decoded. The current point will be used as the nearest neighbor of the subsequent LOD point, and the reconstructed value of the current point will be used to predict the attribute information of the subsequent point.

[0119] The above is the basic process of the point cloud codec based on the GPCC codec framework. With the development of technology, some modules or steps of the framework or process may be optimized. This application is applicable to the basic process of the point cloud codec based on the GPCC codec framework, but is not limited to this framework and process.

[0120] The following introduces octree-based geometric coding and prediction tree-based geometric coding.

[0121] The geometric encoding based on octree includes: first, coordinate transformation of the 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 the quantization rounding, the geometric information of some points is the same. The parameters are used to decide whether to remove duplicate points. 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. Assume that the d x >d y >d z The bounding box corresponds to a cuboid. When geometrically partitioning, the binary tree partitioning is first performed based on the x-axis to obtain two child nodes; until d is satisfied x =d y >d z When the conditions are met, the quadtree partitioning will be performed based on the x and y axes to obtain four child nodes; when d is finally satisfied x =d y =d zWhen the conditions are met, the octree partitioning will continue until the leaf node obtained by the partitioning is a 1x1x1 unit cube. The partitioning will stop 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 partitions before octree partitioning; parameter M is used to indicate that the minimum block side length corresponding to binary tree / quadtree partitioning is 2 M . At the same time, K and M must meet the following conditions: Assume d max =max(d x ,d y ,d z ),d min =min(d x ,d y ,d z ), parameter K satisfies: K>=d max -d min ; Parameter M satisfies: M>=d min . The reason why the parameters K and M meet the above conditions is that in the process of geometric implicit partitioning of G-PCC, the priority of the partitioning method is binary tree, quadtree and octree. When the node block size does not meet the conditions of binary tree / quadtree, the node will be divided into octree until it is divided into the minimum unit of leaf node 1X1X1. However, the geometric information coding mode based on octree only has an efficient compression rate for points with correlation in space, and for points in isolated positions in geometric space, the use of direct coding mode (Direct Coding Model, DCM for short) 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 through 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:

[0122] (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.

[0123] (2) The parent node of the current node has only one child node, the current node, and the six neighbor nodes that share a face with the current node are also empty nodes.

[0124] 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. If 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 in the current node will be directly encoded independently. When the side length of a node is 2 d When , d bits are required to encode each component of the geometric coordinates of the node, and this bit information is directly encoded into the bit stream.

[0125] It is important to note that when partitioning nodes into leaf nodes, the number of duplicate points in the leaf nodes must be encoded in the case of lossless geometric coding. Ultimately, the placeholder information for all nodes is encoded to generate a binary bitstream. Furthermore, G-PCC currently introduces a plane coding mode. During the geometric partitioning process, it determines whether the child nodes of the current node are in the same plane. If the child nodes of the current node meet the condition of being in the same plane, the child nodes of the current node are represented by that plane.

[0126] 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 sequence until a 1X1X1 unit cube is obtained. The division stops and the number of points contained in each leaf node is parsed, and finally the geometric reconstructed point cloud information is restored.

[0127] In the trisoup (triangle soup)-based geometric information coding framework, geometric partitioning is also performed first. However, unlike geometric information coding based on binary trees, quad trees, and octrees, this method does not need to gradually partition the point cloud into unit cubes with side lengths of 1x1x1. Instead, the partitioning stops when the block (sub-block) has a side length of W. Based on the surface formed by the distribution of the point cloud in each block, the surface and the twelve edges of the block are obtained. The vertex coordinates of each block are encoded in sequence to generate a binary code stream.

[0128] When reconstructing point cloud geometry based on trisoup, the decoding end first decodes vertex coordinates to complete triangle reconstruction. This process is shown in Figures 5A to 5C. The block shown in Figure 5A contains three vertices (v1, v2, v3). The set of triangles formed by these three vertices in a certain order is called triangle soup, or trisoup, as shown in Figure 5B. Afterwards, sampling is performed on this set of triangles, and the resulting sampling points are used as the reconstructed point cloud within the block, as shown in Figure 5C.

[0129] 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 lidar 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, 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 of the prediction tree node position information, the prediction tree structure, and the quantization parameters are encoded to generate a binary code stream.

[0130] Based on the geometric decoding of the prediction tree, the decoding end reconstructs the prediction tree structure by continuously parsing the bit stream. Secondly, the geometric position prediction residual information and quantization parameters of each prediction node are obtained through parsing, and the prediction residual is dequantized to restore the reconstructed geometric position information of each node, finally completing the geometric reconstruction at the decoding end.

[0131] After the geometric encoding is completed, the geometric information is reconstructed. At present, attribute encoding is mainly performed on color information. First, the color information is converted from the RGB color space to the YUV color space. Then, the point cloud is recolored using the reconstructed geometric information so that the unencoded attribute information corresponds to the reconstructed geometric information. In color information encoding, there are two main transformation methods. One is the distance-based lifting transformation that relies on LOD (Level of Detail) division, and the other is to directly perform RAHT (Region Adaptive Hierarchal Transform) transformation. Both methods will convert the color information from the spatial domain to the frequency domain, and obtain high-frequency coefficients and low-frequency coefficients through transformation. Finally, the coefficients are quantized and encoded to generate a binary code stream.

[0132] When using geometric information to predict attribute information, Morton codes can be used to perform nearest neighbor search. The Morton code corresponding to each point in the point cloud can be obtained from the geometric coordinates of the point. The specific method for calculating the Morton code is described as follows. For each component of the three-dimensional coordinate represented by a d-bit binary number, its three components can be expressed as formula (1):

[0133]

[0134] Among them, x l ,y l ,z l ∈{0,1} are the binary values ​​corresponding to the highest bit (l=1) to the lowest bit (l=d) of x, y, and z respectively. The Morton code M is to cross-arrange x, y, and z starting from the highest bit. l ,y l ,z l To the lowest bit, the calculation formula of M is shown in the following formula (2):

[0135]

[0136] Among them, m l′ ∈{0,1} are the values ​​of the highest bit (l′=1) to the lowest bit (l′=3d) of M. After obtaining the Morton code M of each point in the point cloud, the points in the point cloud are arranged in ascending order of the Morton code, and the weight w of each point is set to 1.

[0137] There are 4 general test conditions for GPCC:

[0138] Condition 1: The geometric position is limited and the attributes are lost;

[0139] Condition 2: Geometric position lossless, attribute lossy;

[0140] Condition 3: Geometric position lossless, attribute loss limited;

[0141] Condition 4: Geometric position and attributes are lossless.

[0142] GPCC's general test sequences include four categories: Cat1A, Cat1B, Cat3-fused, and Cat3-frame. Among them, Cat2-frame point clouds only contain reflectance attribute information, Cat1A and Cat1B point clouds only contain color attribute information, and Cat3-fused point clouds contain both color and reflectance attribute information.

[0143] GPCC's technical routes: There are two types in total, distinguished by the algorithm used for geometric compression.

[0144] Technical Route 1: Octree Encoding Branch:

[0145] At the encoding end, the bounding box is divided into sub-cubes in sequence, and the non-empty sub-cubes (containing points in the point cloud) are continued to be divided until the leaf node obtained is a 1X1X1 unit cube. In the case of geometric lossless coding, the number of points contained in the leaf node needs to be encoded, and finally the encoding of the geometric octree is completed to generate a binary code stream.

[0146] At the decoding end, the decoding end obtains the placeholder code of each node by continuously parsing in the order of breadth-first traversal, and continuously divides the nodes in turn until a 1x1x1 unit cube is obtained. In the case of geometric lossless decoding, it is necessary to parse the number of points contained in each leaf node and finally recover the geometric reconstructed point cloud information.

[0147] Technical Route 2: Prediction Tree Encoding Branch:

[0148] On the encoding side, the prediction tree structure is established using two different methods: KD-Tree (high-latency slow mode) and using lidar calibration information to divide each point into different lasers and establish a prediction structure based on different lasers (low-latency fast mode). Next, 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 of the prediction tree node position information, the prediction tree structure, and the quantization parameters are encoded to generate a binary code stream.

[0149] At the decoding end, the decoding end reconstructs the prediction tree structure by continuously parsing the bit stream. Secondly, the geometric position prediction residual information and quantization parameters of each prediction node are obtained through parsing, and the prediction residual is dequantized to restore the reconstructed geometric position information of each node, finally completing the geometric reconstruction at the decoding end.

[0150] The embodiments of the present application mainly relate to prediction tree encoding and decoding, and the prediction tree encoding and decoding framework is introduced below.

[0151] FIG6A is a schematic diagram of an encoding framework based on a prediction tree, and FIG6B is a schematic diagram of a decoding framework based on a prediction tree.

[0152] The encoding side constructs the prediction tree including:

[0153] Input for building prediction trees: voxelized point clouds;

[0154] The output of the prediction tree is constructed: the geometric prediction value and prediction residual of the current point, the prediction mode adopted by the current point, the quantization parameter of the current point, the number of repeated points and the number of child nodes.

[0155] The decoding end reconstructs the prediction tree including:

[0156] Input for reconstructing the prediction tree: decoded data (including the prediction mode used at the current point, the prediction residual at the current point, the quantization parameter at the current point, the number of repeated points, and the number of child nodes);

[0157] Output of the reconstruction prediction tree: reconstructed voxelized point cloud.

[0158] Currently, there are at least two ways to build a prediction tree. The first is to build a prediction tree based on KD-Tree, and the other is to build a prediction tree based on lidar calibration information. The following introduces these two prediction tree construction methods.

[0159] First, the process of establishing a prediction tree based on KD-Tree is introduced.

[0160] The process of building a prediction tree based on KD-Tree is mainly divided into five steps: reordering, building a prediction tree, selecting a prediction model, and generating predicted values. The following are the five steps:

[0161] 1) Reorder

[0162] Reorder the voxelized point cloud to build a more efficient prediction tree. Optional sorting methods include random, Morton, azimuth, and radial distance. Currently, the default sorting method is azimuth.

[0163] 2) Build a prediction tree

[0164] For example, a KD-Tree can be used to perform nearest neighbor search. Initially, the KD-Tree is empty. Each node is visited in sequence according to the selected order. The K nearest neighbors of the current node are found in the KD-Tree using the current node's position. The nearest neighbors found are used as child nodes of the current node for prediction according to certain criteria. During the prediction process, the following information is determined:

[0165] The size of the geometric prediction residual of the current node;

[0166] The number of child nodes of the current node;

[0167] The frequency with which each prediction mode is selected.

[0168] Next, a new prediction mode is created based on the current node, and the position corresponding to each prediction mode is added to the KD-Tree. This process is repeated until all nodes are traversed and the entire prediction tree encoding structure is established.

[0169] 3) Select prediction mode

[0170] Alternatively, a prediction tree is built using depth-first traversal, where each node in the tree can only be predicted by its ancestors. Based on this, various prediction strategies are possible. Therefore, the prior art provides the following four prediction modes:

[0171] Mode0: no prediction;

[0172] Mode 1: Delta prediction (i.e. p0);

[0173] Mode2: Linear prediction (i.e. 2p0-p1);

[0174] Mode3: Parallelogram prediction (i.e. p0+p1-p2).

[0175] Where p0, p1, and p2 are the positions of the parent, grandparent, and great-grandparent of the current node, respectively. Prediction is performed by selecting the optimal prediction mode for the current node. For example, the prediction mode with the lowest rate-distortion cost is determined as the optimal prediction mode for the current node.

[0176] 4) Generate predicted values

[0177] The geometric position of each node in the tree is predicted according to the selected prediction mode, and the corresponding prediction value and prediction residual are generated. The current geometric prediction of the point includes Cartesian coordinate prediction, and the specific process is as follows:

[0178] If the current node is the root node of the prediction tree, the prediction mode selects Mode0, that is, the cylindrical coordinates of the current node are not predicted, and the corresponding Cartesian coordinate prediction value is (0,0,0).

[0179] If the current node is not the root node and the prediction mode is Mode 1, the Cartesian coordinates of the current point are reconstructed by the geometry of its parent node. Make predictions;

[0180] If the current node is not the root node and the prediction mode is Mode2 or Mode3, the Cartesian coordinates of the current point are predicted using the corresponding prediction method. The predicted value of the Cartesian coordinates of the current node is

[0181] Using the best prediction mode of the current node, the Cartesian coordinates (x, y, z) of the current point are predicted, and the Cartesian coordinates (x, y, z) of the current point are predicted. Perform differential prediction and obtain the prediction residual (r x ,r y ,r z ).

[0182] at this time, That is the geometric prediction value of the current point, (r x ,r y ,r z ) is the geometric prediction residual of the current point. When performing geometric prediction coding based on the KD-Tree structure, each node first needs to encode the number of child nodes of the current node, and then encode the prediction mode of the current node, as well as the corresponding (r x ,r y ,r z ) prediction residual. Currently G_PCC is for (r x ,r y ,r z ) uses lossless arithmetic coding.

[0183] The following introduces the process of reconstructing the prediction tree based on KD-Tree.

[0184] Reconstructing the prediction tree based on KD-Tree mainly includes four steps: parsing the prediction model, generating prediction values, rebuilding the prediction tree, and reconstructing the geometric point cloud. The following are introduced respectively:

[0185] 1) Generate predicted values

[0186] The geometric coordinates of the current point are predicted based on the prediction mode adopted by the decoded current point and the reconstructed geometric coordinates of its ancestors, and the corresponding prediction values ​​are generated. The specific process is as follows:

[0187] If the current node is the root node of the prediction tree, the prediction mode selects Mode0, that is, the cylindrical coordinates of the current node are not predicted, and the corresponding Cartesian coordinate prediction value is (0,0,0).

[0188] If the current node is not the root node and the prediction mode is Mode 1, the Cartesian coordinates of the current point are reconstructed by the geometry of its parent node. Make predictions;

[0189] If the current node is not the root node and the prediction mode is Mode2 or Mode3, the Cartesian coordinates of the current point are predicted using the corresponding prediction method. The predicted value of the Cartesian coordinates of the current node is

[0190] 2) Reconstructing geometric point cloud

[0191] According to the following formula (3), the Cartesian coordinate residual (r x ,r y ,r z ) and the predicted Cartesian coordinates of the current point Compute the reconstructed Cartesian coordinates (x,y,z) of the current point.

[0192]

[0193] Finally, the reconstructed voxelized point cloud is obtained.

[0194] The following describes the process of establishing a prediction tree based on lidar calibration information.

[0195] The process of building a prediction tree based on lidar calibration information is divided into five steps: reordering, coordinate transformation, building a prediction tree, selecting a prediction mode, and generating predicted values. The following are introduced separately:

[0196] 1) Reorder

[0197] The voxelized point cloud is reordered to build a more efficient prediction tree. The available sorting methods are unordered, Morton order, azimuth order, and radial distance order. Currently, the default sorting method is azimuth order. To do this, the Cartesian coordinates (x, y, z) of each point are converted to polar coordinates (r, φ, tanθ), and the points are sorted according to azimuth φ, radius r, and elevation tangent tanθ.

[0198] 2) Coordinate transformation

[0199] According to the sorted results, the point cloud is traversed and the points are converted from Cartesian coordinates (x, y, z) to cylindrical coordinates (r, φ, i) according to the following formula (4) and stored, as shown in Figure 7.

[0200]

[0201]

[0202]

[0203] Here, i is the Laser ID corresponding to the point (a typical lidar system may have 16, 32, or 64 laser scanners, and the prior information of each laser is different, that is, the elevation angle θ and the vertical height zlaser are different). i is determined by looping through the prior information of different lasers. In each loop, the z component of the point is calculated using the point r, the prior information, and the above conversion formula. The deviation between the converted z component and the original z component of the point is calculated, and the point with the smallest deviation is selected from different Laser IDs as the i of the point. This process processes the non-uniform distribution of the point cloud in the vertical direction in space and regularizes it.

[0204] 3) Build a prediction tree

[0205] Based on the cylindrical coordinates (r, φ, i) determined in the previous step, when building the prediction tree, if a point with LaserID i appears for the first time, that point is treated as the root node for all points corresponding to LaserID i. If not, that point is treated as a child node of the previously processed point with LaserID i. This process is repeated until all points have been traversed. Finally, the root nodes of all LaserIDs are connected to complete the prediction tree. Figure 8A or Figure 8B shows the prediction tree structure corresponding to four lasers.

[0206] 4) Select prediction mode

[0207] For example, a prediction tree is built by traversing in depth-first order, and each node in the tree can only be predicted by its ancestors. Based on this, various prediction strategies are possible. Currently, the following four prediction modes are set:

[0208] Mode0: no prediction;

[0209] Mode 1: Delta prediction (i.e. p0);

[0210] Mode2: Linear prediction (i.e. 2p0-p1);

[0211] Mode3: Parallelogram prediction (i.e. p0+p1-p2)

[0212] Where p0, p1, and p2 are the positions of the parent node, grandfather node, and great-grandfather node of the current node, respectively. The prediction is performed by selecting the best prediction coding mode for the current node.

[0213] 5) Generate predicted values

[0214] According to the selected prediction mode, the geometric position of each node in the tree is predicted and the corresponding prediction value and prediction residual are generated. The geometric prediction of the midpoint in the existing technology includes cylindrical coordinate prediction and Cartesian coordinate prediction. The specific process is as follows:

[0215] If the current node is the root node of the prediction tree, the prediction mode selects Mode0, that is, the cylindrical coordinates of the current node are not predicted, and the corresponding cylindrical coordinate prediction value is where r min The minimum value of the r component after the coordinate transformation of the entire point cloud. If the current node has no parent node, then i prev Set to 0, otherwise it is the cylindrical coordinate component of the parent node. The Cartesian coordinate prediction value is the original cylindrical coordinate of the point The inverse transformation

[0216] If the current node is not the root node and the prediction mode is Mode1, the cylindrical coordinates of the current point are obtained by multiplying the cylindrical coordinates of its parent node. The prediction value of the cylindrical coordinates of the current point can be obtained by making a prediction The predicted Cartesian coordinates are the original cylindrical coordinates The inverse transformation

[0217] If the current node is not the root node and the prediction mode is Mode2 or Mode3, the cylindrical coordinates of the current point are predicted using the corresponding prediction method. The predicted value of the cylindrical coordinates of the current point is Similarly, the Cartesian coordinates predicted values ​​are the original cylindrical coordinates The inverse transformation

[0218] Using the best prediction mode of the current node, the cylindrical coordinates of the current point Make a prediction and get the corresponding prediction residual (r r ,r φ ,r i ), predict the Cartesian coordinates (x, y, z) of the current point and get the prediction residual (r x ,r y ,r z ).

[0219] For example, the predicted value of the azimuth of the current point is Calculate according to the following formula (5):

[0220]

[0221] in, Indicates the predicted azimuth of the current point; n indicates the number of points that need to be skipped between the parent node and the current point according to the scanning speed, and this parameter also needs to be compressed into the code stream; δ φ Indicates the scanning speed of the lidar.

[0222] at this time, and is the geometric prediction value of the current point, (r r ,r φ ,r i ) and (r x ,r y ,r z ) is the geometric prediction residual of the current point. Therefore, when performing geometric prediction coding on Cat3_framed point clouds, each node first needs to encode the number of child nodes of the current node, then encode the prediction mode of the current node, and the corresponding (r r,r φ ,r i ) and (r x ,r y ,r z ) prediction residual, and encode the number of repeated points of the current node. r ,r φ ,r i ) uses lossless coding and will perform The component encodes the number of points n that should be skipped. In addition, for the component (r x ,r y ,r z ) is quantized when the geometry is lossy, and the quantized prediction residual is arithmetically coded.

[0223] In some embodiments, the horizontal azimuth angle is adaptively quantized using the depth information R of the cylindrical coordinate system, which can adaptively change the accuracy of the horizontal azimuth angle and further improve the coding efficiency of the geometric information. This coding scheme is described in detail below.

[0224] As can be seen from FIG8C, as the depth information R increases, the horizontal azimuth angle Same quantization Will Different errors are generated. Based on this, it is proposed to use the depth information R to adaptively quantize the horizontal azimuth angle. The specific quantization formula (6) is as follows:

[0225]

[0226] Among them, Δφarc is fixed to 0.79, then 2*π / Δφarc is 8, that is, right shifted by 3 bits, r2Drec is the reconstructed value of the depth information, and N is the fixed precision.

[0227] Calculated using formula (6) And based on the following formula (7) use Come to Quantify, assume quantification Recorded as

[0228]

[0229] Using formula (8) Dequantize to get for:

[0230]

[0231] Finally, after dequantization, we get Come to Reconstruct (r,φ,i).

[0232] The following introduces the process of reconstructing the prediction tree based on lidar calibration information.

[0233] The process of reconstructing the prediction tree based on LiDAR calibration information mainly includes the following four steps: generating prediction values, reconstructing the prediction tree, inverse coordinate transformation, and reconstructing the geometric point cloud. The following are introduced respectively:

[0234] 1) Generate predicted values

[0235] According to the prediction mode used by the current point obtained by decoding and the reconstructed cylindrical coordinates of its ancestors, the cylindrical coordinates of the current point are predicted and the corresponding predicted values ​​are generated. The specific process is as follows:

[0236] If the current node is the root node of the prediction tree, the prediction mode selects Mode0, that is, the cylindrical coordinates of the current node are not predicted, and the corresponding cylindrical coordinate prediction value is where r min The minimum value of the r component after the coordinate transformation of the entire point cloud. If the current node has no parent node, then i prev Set to 0, otherwise it is the cylindrical coordinate component of the parent node. The Cartesian coordinate prediction value is the original cylindrical coordinate of the point The inverse transformation

[0237] If the current node is not the root node and the prediction mode is Mode1, the cylindrical coordinates of the current point are obtained by multiplying the cylindrical coordinates of its parent node. The prediction value of the cylindrical coordinates of the current point can be obtained by making a prediction The predicted Cartesian coordinates are the original cylindrical coordinates The inverse transformation

[0238] If the current node is not the root node and the prediction mode is Mode2 or Mode3, the cylindrical coordinates of the current point are predicted using the corresponding prediction method. The predicted value of the cylindrical coordinates of the current point is Similarly, the Cartesian coordinates predicted values ​​are the original cylindrical coordinates The inverse transformation

[0239] Using the best prediction mode of the current node, the cylindrical coordinates of the current point Make a prediction and get the corresponding prediction residual (r r ,r φ ,ri ), using the Cartesian coordinates (x, y, z) of the current point and the predicted Cartesian coordinates Perform differential prediction to obtain the prediction residual (r x ,r y ,r z ).

[0240] Note that the predicted value of the azimuth of the current point Calculate according to the following formula (9):

[0241]

[0242] in, Indicates the predicted azimuth of the current point; n indicates the number of points that need to be skipped between the parent node and the current point according to the scanning speed, and this parameter also needs to be compressed into the code stream; δ φ Indicates the scanning speed of the lidar.

[0243] 2) Reconstruct the prediction tree

[0244] The predicted value of the cylindrical coordinates of the current point can be obtained through the previous step Next, according to the following formula (10), the cylindrical coordinate residual (r r ,r φ ,r i ) and the predicted cylindrical coordinates of the current point Calculate the reconstructed cylindrical coordinates (r, φ, i) of the current point.

[0245]

[0246] Based on the above steps, after obtaining the reconstructed cylindrical coordinates of the current point, the position of the current point in the prediction tree can be further determined according to the reconstructed cylindrical coordinates (r, φ, i), thereby reconstructing the prediction tree.

[0247] 3) Inverse coordinate transformation

[0248] Convert the reconstructed cylindrical coordinates (r, φ, i) of the current point into Cartesian coordinates according to the following formula (11): This is the predicted Cartesian coordinate of the current point.

[0249]

[0250]

[0251]

[0252] Here, i is the LaserID corresponding to the point. The prior information of each laser is different, that is, the elevation angle θ and the height zLaser in the vertical direction are different. Therefore, the elevation angle corresponding to the i-th Laser is θ(i), and the height in the vertical direction is zLaser(i).

[0253] 4) Reconstruct geometric point cloud

[0254] According to the following formula (12), the Cartesian coordinate residual (r x ,r y ,r z ) and the predicted Cartesian coordinates of the current point Compute the reconstructed Cartesian coordinates (x,y,z) of the current point.

[0255]

[0256] At the same time, determine the number of repeated points included in the current node.

[0257] Finally, the reconstructed voxelized point cloud is obtained.

[0258] The above introduces the coding and decoding method based on the prediction tree. It can be seen from the above that in the coding and decoding based on the prediction tree, for each node in the prediction tree, the repeated point information of the node needs to be encoded and decoded, but not every node has repeated points. Therefore, encoding and decoding the repeated point information for each node increases the complexity of coding and decoding, and wastes a lot of coding and decoding time, making the coding and decoding efficiency low.

[0259] To address the above technical issues, in the prediction tree-based point cloud encoding and decoding, an embodiment of the present application first determines a first parameter corresponding to the current node before encoding and decoding the current node. The first parameter is used to determine whether the current node includes duplicate points, and then the current node is decoded based on the first parameter. For example, if it is determined based on the first parameter that the current node does not include duplicate points, then when encoding and decoding the current node, encoding and decoding the duplicate point information of the current node is skipped. If it is determined based on the first parameter that the current node includes duplicate points, then the duplicate point information of the current node is encoded and decoded, thereby reducing the encoding and decoding complexity of the point cloud, saving encoding and decoding time, and thus improving encoding and decoding efficiency.

[0260] The following describes the point cloud encoding and decoding method involved in the embodiments of the present application in conjunction with specific embodiments.

[0261] First, taking the decoding end as an example, the point cloud decoding method provided in the embodiment of the present application is introduced.

[0262] Figure 9 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 an embodiment of the present application can be implemented by the point cloud decoding device shown in Figure 3 or Figure 5 above.

[0263] As shown in FIG9 , the point cloud decoding method of the embodiment of the present application includes:

[0264] S101, determining a first parameter corresponding to the current node;

[0265] S102: Decode the current node based on the first parameter.

[0266] The first parameter is used to determine whether the current node includes duplicate points, and the current node is a node in the prediction tree of the point cloud.

[0267] As can be seen from the above, a point cloud includes geometric information and attribute information, and decoding of a point cloud includes geometric decoding and attribute decoding. The embodiments of the present application relate to geometric decoding of a point cloud.

[0268] 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.

[0269] In prediction tree-based encoding, the encoder constructs a prediction tree structure based on the geometric information of the point cloud. The prediction tree consists of multiple nodes, each of which contains at least one point in the point cloud. In other words, in prediction tree encoding, points in the point cloud are divided into nodes in the prediction tree, and decoding of the nodes in the prediction tree is achieved to decode the points in the point cloud.

[0270] 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 node of the prediction tree, so that the node includes repeated points.

[0271] Currently, when encoding each node in the prediction tree, the encoder needs to encode the repeated point information for each node. Correspondingly, when decoding, the decoder needs to decode the repeated point information for each node. This increases decoding complexity, wastes decoding time, and reduces decoding efficiency.

[0272] From the above, it can be seen that in the prediction tree of the point cloud, not every node includes duplicate points. It can even be understood that only a few nodes in the prediction tree of the point cloud include duplicate points. Based on this, in an embodiment of the present application, during decoding, the first parameter corresponding to the current node is first determined. The first parameter is used to determine whether the current node includes duplicate points, and then the current node is decoded based on the first parameter. For example, when it is determined based on the first parameter that the current node does not include duplicate points, the duplicate point information of the current node is skipped when decoding the current node. If it is determined based on the first parameter that the current node may include duplicate points, the duplicate point information of the current node is decoded, thereby reducing the decoding complexity of the point cloud, saving decoding time, and improving decoding efficiency.

[0273] In the embodiment of the present application, the decoding process for each point in the prediction tree 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 prediction tree as an example.

[0274] In some embodiments, the current node can be understood as any node in the prediction tree.

[0275] In some embodiments, the current node may be understood as a node in the prediction tree that is currently waiting to be decoded.

[0276] In an embodiment of the present application, before decoding the current node, a first parameter corresponding to the current node is first determined, and then the current node is decoded based on the first parameter. In an embodiment of the present application, different methods for determining the first parameter corresponding to the current node are used, and corresponding methods for decoding the current node based on the first parameter are also different. The following describes in detail 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 an embodiment of the present application.

[0277] In case 1, the above S101 includes the following steps S101-A1 to S101-A2:

[0278] S101-A1, determining the number of nodes in the to-be-decoded cache queue after taking the current node out from the to-be-decoded cache queue and placing the child nodes of the current node in the prediction tree into the to-be-decoded cache queue;

[0279] S101-A2: Determine the number of nodes in the to-be-decoded cache queue as a first parameter.

[0280] In the embodiment of the present application, the encoding end encodes the nodes in the prediction tree based on a depth-first traversal method, and correspondingly, the decoding end decodes the prediction tree based on a depth-first traversal method.

[0281] Exemplarily, the decoding end includes a pending decoding cache queue, which is used to store pending nodes, which may also be referred to as undecoded nodes. When decoding begins, the decoding end first decodes the point cloud's geometric codestream to obtain relevant data for the first node of the prediction tree. This data includes the number of child nodes included in the first node. Next, based on the number of child nodes included in the first node, the decoding end retrieves the child nodes of the first node from the geometric codestream and places the child nodes of the first node in the pending decoding cache queue. It should be noted that placing the child node in the pending decoding cache queue herein can be understood as placing the relevant pending decoding information of the child node in the pending decoding cache queue. Optionally, the relevant pending decoding information of the child node includes the coordinate residual of the child node, the number of child nodes included in the child node, the prediction mode of the child node, and so on. After decoding the first node, a node is taken from the pending decoding cache queue and its child nodes are placed in the pending decoding cache queue. This process continues in this manner until the pending decoding cache queue is empty.

[0282] For example, assume that the prediction tree includes five nodes, denoted as node 0, node 1, node 2, node 3, and node 4, where node 0 is the root node, nodes 1 and 2 are the two child nodes of node 0, and nodes 3 and 4 are the two child nodes of node 1. During decoding, the geometry code stream is first decoded to obtain the number of child nodes included in root node 0, which is 2. Then, two nodes are taken from the geometry code stream and placed in the queue for decoding. At this time, the queue for decoding includes nodes 1 and 2, and both nodes 1 and 2 are undecoded nodes. After node 0 is decoded, node 1 is taken from the queue for decoding to decode, and it is obtained that node 1 includes two child nodes. Then, two nodes are taken from the geometry code stream and placed in the queue for decoding. At this time, the queue for decoding includes nodes 2, 3, and 4, which are undecoded nodes. After decoding node 1, node 3 is removed from the queue for decoding and decoded. Node 3 does not contain any child nodes. At this point, the queue for decoding contains only nodes 2 and 4. After decoding node 3, node 4 is removed from the queue for decoding and decoded. Node 4 does not contain any child nodes. At this point, the queue for decoding contains only one undecoded node, node 2. Finally, node 2 in the queue for decoding is decoded and decoded. Node 2 does not contain any child nodes. At this point, decoding of all nodes in the queue for decoding is complete, and the queue for decoding is empty, indicating that decoding of the prediction tree is complete.

[0283] In this scenario 1, when decoding the current node, it can be determined whether the current node includes duplicate points based on the number of nodes included in the to-be-decoded cache queue and the number of undecoded points in the point cloud. For example, when decoding the current node, the current node is removed from the decoding cache queue and the child nodes of the current node are placed in the to-be-decoded cache queue. At this time, the nodes included in the to-be-decoded cache queue are all undecoded nodes. At the same time, when decoding the current node, it can be guaranteed that at least one point is decoded from the current node. Therefore, in this embodiment of the application, it is assumed that the current node includes one decoded point, and the number of undecoded points in the point cloud is determined. If the number of undecoded nodes included in the to-be-decoded cache queue is the same as the number of undecoded points in the point cloud, it means that when assuming that the current node includes one point, each node in the to-be-decoded cache queue includes one point and does not include duplicate points. Therefore, the assumption that the current node includes one point is established, that is, the current node includes one point and does not include duplicate points. Therefore, when decoding the current node, the duplicate point information of the current node is not decoded.

[0284] If, after assuming that the current node includes a decoded point, the number of nodes in the pending decoding cache queue is less than the number of undecoded points in the point cloud, then at least one of the nodes in the pending decoding cache queue or the current node contains a duplicate point. This means that the assumption that the current node includes a point may not hold, meaning that the current node may contain a duplicate point. In this case, for accurate decoding, the duplicate point information of the current node must be decoded when decoding the current node.

[0285] Based on the above description, in an embodiment of the present application, when decoding the current node, it is determined that after the current node is taken out from the cache queue to be decoded and the child nodes of the current node in the prediction tree are placed in the cache queue to be decoded, the number of nodes in the cache queue to be decoded is determined as the first parameter corresponding to the current node.

[0286] Continuing with the above example, assume that the prediction tree includes five nodes, denoted as node 0, node 1, node 2, node 3, and node 4, where node 0 is the root node, node 1 and node 2 are two child nodes of node 0, and node 3 and node 4 are two child nodes of node 1. Assuming the current node is node 1, node 1 is removed from the pending decoding cache queue that includes nodes 1 and 2, and node 1's child nodes, namely nodes 3 and node 4, are placed in the pending decoding cache queue. At this time, the pending decoding cache queue includes nodes 2, 3, and 4, three undecoded nodes. Therefore, the first parameter corresponding to the current node is determined to be 3. Assuming the current node is node 3, node 3 is removed from the pending decoding cache queue that includes nodes 2, 3, and 4. However, node 3 has no child nodes. At this time, after node 3 is removed, the pending decoding cache queue includes nodes 2 and 4, two undecoded nodes. Therefore, the first parameter corresponding to the current node is determined to be 2.

[0287] 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.

[0288] In case 1, the above S102 includes the following steps S102-A1 to S102-A3:

[0289] S102-A1, decoding the geometric code stream of the point cloud to obtain the total number of points in the point cloud;

[0290] S102-A2, determining the number of undecoded first points in the point cloud based on the total number of points in the point cloud and the number of currently decoded points, wherein the decoded points include a point in the current node;

[0291] S102-A3: Decode the current node based on the number of nodes in the to-be-decoded cache queue and the number of first points.

[0292] In this scenario 1, the decoder determines a first parameter corresponding to the current node based on steps S101-A1 to S101-A2 above. This first parameter is the number of undecoded nodes in the pending decoding cache queue when decoding the current node. Next, based on steps S102-A1 to S102-A3 above, the decoder determines the number of undecoded points in the point cloud. Furthermore, based on the number of undecoded nodes in the pending decoding cache queue and the number of undecoded points in the point cloud, the decoder determines whether the current node includes duplicate points, thereby accurately decoding the current node.

[0293] It should be noted that in Case 1, the currently decoded points include a point in the current node. That is, in Case 1, after the current node is removed from the pending decoding cache, it is assumed that the current node can decode a point. Therefore, when determining the number of undecoded points in the point cloud, the point included in the current node is excluded. Therefore, for ease of description, the undecoded point in the point cloud in Case 1 is recorded as the first point.

[0294] The following describes the specific process of determining the number of undecoded first points in the point cloud.

[0295] In this scenario 1, the decoder determines the first parameter corresponding to the current node based on steps S101-A1 to S101-A2 above, then decodes the point cloud's geometry stream to obtain the total number of points in the point cloud. Next, the decoder determines the number of currently decoded points, which includes a point in the current node. In other words, the number of currently decoded points is equal to the sum of the number of points in the currently decoded node plus 1.

[0296] In one example, the decoding end records the number of currently decoded points through the following instructions:

[0297] for(index=0;index <nodeCount;index++)

[0298] codedPointCount+=pointNum

[0299] Among them, codedPointCount is initialized to 0, codedPointCount+1 is the number of currently decoded points, nodeCount is the number of nodes, and pointNum is the number of points included in the node.

[0300] Then, based on the total number of points in the point cloud and the number of currently decoded points, the number of undecoded first points in the point cloud is determined.

[0301] In one example, the difference between the total number of points in the point cloud and the number of currently decoded points is determined as the number of the first undecoded points in the point cloud.

[0302] Finally, the current node is decoded based on the number of nodes in the to-be-decoded buffer queue and the number of undecoded first points in the point cloud.

[0303] The embodiment of the present application does not limit the specific method for the decoding end to obtain the total number of points in the point cloud.

[0304] In some embodiments, the encoder writes the total number of points in the point cloud into the geometry stream, so that the decoder obtains the total number of points in the point cloud by decoding the geometry stream.

[0305] In some embodiments, the encoding end writes the total number of points in the point cloud into the geometric data unit of the point cloud. In this way, the decoding end obtains the total number of points in the point cloud by decoding the geometric data unit of the point cloud.

[0306] In some embodiments, since a point cloud includes at least one point, to conserve codewords, the encoder, when encoding the total number of points in the point cloud, subtracts one from the total number of points in the point cloud to obtain a first value, which is then written into the geometry data unit (i.e., the first value is represented as slice_num_points_minus1). Correspondingly, the decoder, when decoding, decodes the geometry data unit to obtain the first value, then adds 1 to the first value to obtain the total number of points in the point cloud.

[0307] In one example, the script syntax of the geometry data unit (Geometry data unit footer syntax) is shown in Table 2:

[0308] Table 2

[0309]

[0310] In Table 2, slice_num_points_minus1 plus 1 specifies the total number of points in the point cloud. Bitstream conformance requires that slice_num_points_minus1 plus 1 should be equal to the number of decodable points. Decoders should not rely on bitstream conformance to prevent implementation buffer overflows.

[0311] That is, the decoding end obtains the first value, namely, slice_num_points_minus1, by decoding the geometric data unit shown in Table 2, and adds 1 to the first value to obtain the total number of points in the point cloud.

[0312] Exemplarily, the decoding end determines the total number of points in the point cloud based on the following formula (13):

[0313] pointCount=(slice_num_points_minus1+1) (13)

[0314] Among them, pointCount is the total number of points in the point cloud.

[0315] The following describes a specific process of decoding the current node based on the number of nodes in the to-be-decoded cache queue and the number of first points in the above S102-A3.

[0316] The implementation methods of S102-A3 include but are not limited to the following:

[0317] Mode 1: If the number of nodes in the to-be-decoded cache queue is equal to the number of the first points, then the above S102-A3 includes the following steps S102-A3-11 and S102-A3-12:

[0318] S102-A3-11, skip decoding repeated point information of the current node;

[0319] S102-A3-12. Determine a geometric reconstruction value of a point included in the current node.

[0320] In this method 1, if the decoding end determines that the number of nodes in the to-be-decoded cache queue is the same as the number of the first undecoded points in the point cloud, then when assuming that the current node includes one point, each node in the to-be-decoded cache queue includes one point, and no duplicate points are included. Therefore, the assumption that the current node includes one point is established, that is, the current node includes one point and no duplicate points, and thus, when decoding the current node, the duplicate point information of the current node is not decoded. Furthermore, when decoding other nodes after the current node, the duplicate point information is not decoded, thereby reducing decoding complexity, saving decoding time, and improving decoding efficiency.

[0321] At this point, it can be determined that the current node includes only one point. Next, the geometric reconstruction value of this point is determined. For example, the geometry code stream is decoded to obtain the coordinate residual of the point, and the geometric reconstruction value of the point is determined based on the coordinate residual. The specific process of determining the geometric reconstruction value of the point can be found in the description of steps 11 and 12 below and will not be repeated here.

[0322] Mode 2: If the number of nodes in the to-be-decoded cache queue is less than the number of the first point, then the above S102-A3 includes the following steps S102-A3-21 and S102-A3-22:

[0323] S102-A3-21, decoding the repeated point information of the current node;

[0324] S102-A3-22. Determine the geometric reconstruction values ​​of the points included in the current node based on the duplicate point information.

[0325] In this second approach, if the decoder determines that the number of nodes in the to-be-decoded cache queue is less than the number of undecoded first points in the point cloud, this indicates that at least one of the nodes in the to-be-decoded cache queue or the current node includes duplicate points. This means that the assumption that the current node includes a point may not be true, and the current node may include duplicate points. In this case, for accurate decoding, the duplicate point information of the current node needs to be decoded when decoding the current node. For example, the number of duplicate points included in the current node is obtained through decoding. Next, based on the duplicate point information, the geometric reconstruction values ​​of the points included in the current node are determined.

[0326] For example, if it is determined based on the duplicate point information that the current node does not include duplicate points, the same method as the above method 1 is used to determine the geometric reconstruction value of a point included in the current node.

[0327] For another example, if it is determined based on the repeated point information that the current node includes repeated points, the geometric reconstruction value of the first point included in the current node and the geometric reconstruction value of the repeated points included in the current node are determined.

[0328] In some embodiments, if it is determined that the current node includes N repeated points, where N is a positive integer, then the above S102-A3-22 includes the following steps S102-A3-221 and S102-A3-222:

[0329] S102-A3-221, determine the geometric reconstruction value of the first point in the current node;

[0330] S102-A3-222. Determine the geometric reconstruction value of the first point as the geometric reconstruction values ​​of the N repeated points included in the current node.

[0331] In this embodiment, repeated points refer to points with the same coordinates in a second coordinate system, for example, the second coordinate system is a Cartesian coordinate system. Optionally, the second coordinates can also be understood as the original coordinates of the point cloud.

[0332] When encoding the current node, the encoder determines that the current node includes N+1 points, where N points are repeated with the first point, thereby determining that the current node includes N repeated points. During encoding, the encoder first encodes the first point in the current node, for example, by encoding the coordinate residual value of the first point in a first coordinate system, the coordinate residual value of the first point in a second coordinate system, and the prediction mode corresponding to the first point. Simultaneously, the encoder determines the repeated point information corresponding to the current node, for example, the repeated point information includes the number N of repeated points included in the current node, and encodes the repeated point information into the bitstream.

[0333] Based on this, when the decoder decodes the current node, it determines, based on the aforementioned judgment conditions, that the repeated point information for the current node needs to be decoded. The decoder then decodes the repeated point information for the current node and, using this repeated point information, determines that the current node includes N repeated points. Next, the decoder determines the geometric reconstruction value of the first point in the current node. The process of determining the geometric reconstruction value of the first point in the current node by the decoder can be found in the detailed description of steps 11 and 12 below and is not further elaborated here.

[0334] After the decoding end determines the geometric reconstruction value of the first point in the current node, it determines the geometric reconstruction value of each of the N repeated points based on the repeated point information of the current node and the geometric reconstruction value of the first point.

[0335] As can be seen from the above, in this embodiment, duplicate points are points with the same coordinates in the second coordinate system. In other words, each duplicate point in the current node has the same coordinates as the first point in the second coordinate system. Therefore, the geometric reconstruction value of the first point in the second coordinate system can be directly determined as the geometric reconstruction value of the N duplicate points in the second coordinate system.

[0336] In the above, for case 1, when decoding the current node, the number of undecoded nodes in the cache queue to be decoded is determined as the first parameter of the current node, and the specific process of decoding the current node is introduced based on the number of nodes in the cache queue to be decoded and the number of undecoded first points in the point cloud.

[0337] The following describes a process of determining the first parameter corresponding to the current node in situation 2 and decoding the current node based on the first parameter.

[0338] Case 2: The above S101 includes the following steps S101-B1 to S101-B3:

[0339] S101-B1, decoding the geometric code stream of the point cloud to obtain the total number of points in the point cloud;

[0340] S101-B2, determining the number of decoded points in the point cloud before decoding the current node;

[0341] S101-B3. Based on the total number of points in the point cloud and the number of decoded points, obtain the number of undecoded second points in the point cloud.

[0342] S101-B4. Determine the number of the second points as the first parameter corresponding to the current node.

[0343] In this case 2, the number of undecoded second points in the point cloud is used as the first parameter corresponding to the current node to determine whether the current node includes duplicate points, thereby achieving accurate decoding of the current node.

[0344] It should be noted that the undecoded second point in the point cloud in case 2 is different from the undecoded first point in the point cloud in case 1 above. The undecoded first point in the point cloud in case 1 above includes the midpoint of the current node, while in case 2, the undecoded second point in the point cloud includes the undecoded point in the current node.

[0345] In this case 2, the decoding end first decodes the geometric code stream of the point cloud to obtain the total number of points in the point cloud. The method for determining the total number of points in the point cloud can refer to the description in the above case 1 and will not be repeated here. Determine the number of decoded points in the point cloud before decoding the current node. The decoded points here refer to the decoded points included in the decoded node, and the current node is an undecoded node. Therefore, the decoded points here do not include the points in the current node. Then, based on the total number of points in the point cloud and the number of decoded points, the number of undecoded second points in the point cloud is obtained. In order to distinguish it from the above case 1, the undecoded points of the point cloud in case 2 are recorded as the second point. Then, the number of undecoded second points in the point cloud is determined as the first parameter corresponding to the current node.

[0346] In one example, the difference between the total number of points in the point cloud and the number of decoded points is determined as the number of undecoded second points in the point cloud.

[0347] That is to say, in this case 2, the decoding end records the number of decoded points in the point cloud in real time. In this way, when decoding the current node, the number of decoded points in the point cloud at this time is determined, and then the difference between the total number of points in the point cloud and the number of currently decoded points is determined as the number of undecoded second points in the point cloud. Based on the number of undecoded second points in the point cloud at this time, it is determined whether the current node includes duplicate points to achieve accurate decoding of the current node. For example, if the number of undecoded second points in the point cloud at this time is the same as the number of undecoded nodes in the prediction tree at this time, it means that the current node and all nodes after the current node do not include duplicate points. Then, when decoding these nodes, the decoding of duplicate information can be skipped, thereby improving the decoding speed.

[0348] After the decoding end determines the first parameter corresponding to the current node based on the above method, it executes the above step S102 to decode the current node based on the first parameter.

[0349] In case 2, the above S102 includes the following steps S102-B1 and S102-B2:

[0350] S102-B1, determining the number of undecoded nodes in the prediction tree before decoding the current node;

[0351] S102-B2: Decode the current node based on the number of second points and the number of undecoded nodes.

[0352] In this scenario 2, the decoder determines the first parameter corresponding to the current node based on steps S101-B1 to S101-B4. This first parameter is the number of undecoded second points in the point cloud. Next, based on steps S102-B1 and S102-B2, the decoder determines the number of unsolved nodes in the prediction tree. Furthermore, based on the number of undecoded second points in the point cloud and the number of unsolved nodes in the prediction tree, the decoder determines whether the current node contains duplicate points, thereby accurately decoding the current node.

[0353] It should be noted that, in case 2, the current node is an undecoded node, so the undecoded nodes in the prediction tree include the current node.

[0354] The following describes a specific method for determining the number of undecoded nodes in the prediction tree before decoding the current node in S102-B1.

[0355] In this case 2, the decoding end records the number of decoded nodes in the prediction tree in real time. When decoding the current node, it determines the number of currently undecoded nodes based on the number of decoded nodes. For example, the difference between the total number of nodes in the prediction tree and the number of currently decoded nodes is determined as the number of currently undecoded nodes.

[0356] The embodiment of the present application does not limit the method for obtaining the total number of nodes of the prediction tree.

[0357] In some embodiments, the total number of nodes in the prediction tree is determined based on the total number of points in the point cloud. For example, different total number of nodes in the prediction tree are set for different intervals of the total number of points in the point cloud. For example, when the total number of points in the point cloud is between a1 and a2, the total number of nodes in the corresponding prediction tree is b1, and when the total number of points in the point cloud is between a2 and a3, the total number of nodes in the corresponding prediction tree is b2. Based on this, the decoding end can determine the total number of nodes in the prediction tree based on the total number of points in the point cloud, and then determine the number of undecoded nodes in the prediction tree based on the total number of nodes in the prediction tree and the number of decoded nodes.

[0358] In some embodiments, the above S102-B1 includes the following steps S102-B11 to S102-B13:

[0359] S102-B11, decoding the geometric code stream to obtain the total number of nodes in the prediction tree;

[0360] S102-B12, determining the number of decoded nodes in the prediction tree before decoding the current node;

[0361] S102-B13. Based on the total number of nodes and the number of decoded nodes, obtain the number of undecoded nodes.

[0362] In this embodiment, the encoder constructs a prediction tree corresponding to the point cloud and writes the total number of nodes in the prediction tree into the geometry stream. The decoder then decodes the geometry stream to obtain the total number of nodes in the prediction tree. When decoding the current node, the decoder determines the number of decoded nodes in the prediction tree before decoding the current node, thereby determining the number of undecoded nodes in the prediction tree. For example, the difference between the total number of nodes in the prediction tree and the number of decoded nodes in the current prediction tree is used as the number of undecoded nodes in the current prediction tree.

[0363] Next, the decoding end decodes the current node based on the number of undecoded second points in the current point cloud determined by steps S101-B1 to S101-B4 and the number of undecoded nodes in the prediction tree determined by the above steps.

[0364] The implementation of decoding the current node based on the number of second points and the number of undecoded nodes in S102-B2 includes but is not limited to the following:

[0365] Mode 1: If the number of second points is equal to the number of undecoded nodes, then the above S102-B2 includes the following steps S102-B2-11 and S102-B2-12:

[0366] S102-B2-11, skip decoding repeated point information of the current node;

[0367] S102-B2-12. Determine a geometric reconstruction value of a point included in the current node.

[0368] In this method 1, if the decoding end determines that the number of undecoded second points in the current point cloud is the same as the number of undecoded nodes in the prediction tree, it means that each of the undecoded nodes in the prediction tree includes a point and no duplicate points. In this method 2, the undecoded nodes in the prediction tree include the current node. Therefore, it can be determined that the current node includes a point and no duplicate points. Therefore, when decoding the current node and the nodes after the current node, the decoding of duplicate point information is skipped, for example, the number of duplicate points included in the current node is skipped, thereby reducing decoding complexity, saving decoding time, and improving decoding efficiency.

[0369] That is to say, in method 1, if it is determined that the current node includes one point but does not include duplicate points based on the number of undecoded second points in the current point cloud and the number of undecoded nodes in the prediction tree, the decoding of the duplicate point information is skipped, and only the geometric reconstruction value of the point included in the current node needs to be determined.

[0370] For example, the geometry code stream is decoded to obtain the coordinate residual of the point, and the geometric reconstruction value of the point is determined based on the coordinate residual. The process of determining the geometric reconstruction value of the point can be specifically described in the following steps 11 and 12, which will not be repeated here.

[0371] Mode 2: If the number of the second points is less than the number of undecoded nodes, then the above S102-B2 includes the following steps S102-B2-21 and S102-B2-22:

[0372] S102-B2-21, decoding the repeated point information of the current node;

[0373] S102-B2-22. Based on the duplicate point information, determine the geometric reconstruction values ​​of the points included in the current node.

[0374] In this method 2, when decoding the current node, if the decoding end determines that the number of undecoded second points in the current point cloud is greater than the number of undecoded nodes in the prediction tree, it means that at least one of the undecoded nodes in the prediction tree includes multiple points, that is, at least one of the undecoded nodes in the prediction tree includes duplicate points. In this case 2, the undecoded nodes in the prediction tree include the current node, and the current node may include duplicate points. In this case, to improve decoding accuracy, when decoding the current node, the duplicate point information of the current node is decoded, for example, the number of duplicate points included in the current node is decoded. Then, based on the duplicate point information, the geometric reconstruction value of the points included in the current node is determined.

[0375] For example, if it is determined based on the duplicate point information that the current node does not include duplicate points, the same method as the above method 1 is used to determine the geometric reconstruction value of a point included in the current node.

[0376] For another example, if it is determined based on the repeated point information that the current node includes repeated points, the geometric reconstruction value of the first point included in the current node and the geometric reconstruction value of the repeated points included in the current node are determined.

[0377] In some embodiments, if it is determined that the current node includes N repeated points, where N is a positive integer, then the above S102-B2-22 includes the following steps:

[0378] S102-B2-221, determine the geometric reconstruction value of the first point in the current node;

[0379] S102-B2-222. Determine the geometric reconstruction value of the first point as the geometric reconstruction values ​​of the N repeated points included in the current node.

[0380] In this embodiment, repeated points refer to points with the same coordinates in a second coordinate system, for example, the second coordinate system is a Cartesian coordinate system. Optionally, the second coordinates can also be understood as the original coordinates of the point cloud.

[0381] When encoding the current node, the encoder determines that the current node includes N+1 points, where N points are repeated with the first point, thereby determining that the current node includes N repeated points. During encoding, the encoder first encodes the first point in the current node, for example, by encoding the coordinate residual value of the first point in a first coordinate system, the coordinate residual value of the first point in a second coordinate system, and the prediction mode corresponding to the first point. Simultaneously, the encoder determines the repeated point information corresponding to the current node, for example, the repeated point information includes the number N of repeated points included in the current node, and encodes the repeated point information into the bitstream.

[0382] Based on this, when the decoder decodes the current node, it determines, based on the aforementioned judgment conditions, that the repeated point information for the current node needs to be decoded. The decoder then decodes the repeated point information for the current node and, using this repeated point information, determines that the current node includes N repeated points. Next, the decoder determines the geometric reconstruction value of the first point in the current node. The process of determining the geometric reconstruction value of the first point in the current node by the decoder can be found in the detailed description of steps 11 and 12 below and is not further elaborated here.

[0383] After the decoding end determines the geometric reconstruction value of the first point in the current node, it determines the geometric reconstruction value of each of the N repeated points based on the repeated point information of the current node and the geometric reconstruction value of the first point.

[0384] As can be seen from the above, in this embodiment, duplicate points are points with the same coordinates in the second coordinate system. In other words, each duplicate point in the current node has the same coordinates as the first point in the second coordinate system. Therefore, the geometric reconstruction value of the first point in the second coordinate system can be directly determined as the geometric reconstruction value of the N duplicate points in the second coordinate system.

[0385] In the above, for case 2, when decoding the current node, the number of undecoded points in the point cloud is determined as the first parameter of the current node, and the specific process of decoding the current node based on the number of undecoded points in the point cloud and the number of undecoded nodes in the prediction tree is introduced.

[0386] The following describes a process of determining the first parameter corresponding to the current node in situation 3 and decoding the current node based on the first parameter.

[0387] Case 3: The above S101 includes the following steps S101-C1 to S101-C3:

[0388] S101-C1, determining the number of decoded duplicate points in the point cloud before decoding the current node;

[0389] S101-C2. Determine the number of decoded repeated points as a first parameter.

[0390] In this case 3, the decoded duplicate points in the point cloud can be understood as the number of duplicate points decoded before decoding the current node. That is, in the embodiment of the present application, the decoding end counts the number of decoded duplicate points in real time during decoding. In this way, when decoding the current node, the number of currently decoded duplicate points in the point cloud is determined as the first parameter corresponding to the current node. Based on this first parameter, it is determined whether the current node includes duplicate points, thereby achieving accurate decoding of the current node.

[0391] In one example, dupCount represents the number of duplicate points currently decoded. dupCount is initialized to 0. When decoding the first node in the prediction tree, dupCount = 0, and the duplicate point information for the first node is decoded. Optionally, the duplicate point information for the first node includes the number of duplicate points included in the first node. Assuming the number of duplicate points included in the first node is a, dupCount is updated to a. Next, the second node in L3C2 is decoded, and the current dupCount is updated using the number of duplicate points included in the second node, and so on.

[0392] As can be seen from the above, when the decoding end decodes the current node in the prediction tree, it first determines the number of duplicate points decoded before decoding the current node, that is, the number of decoded duplicate points dupCount, and then determines whether to decode the duplicate point information of the current node based on the number of decoded duplicate points dupCount.

[0393] In one example, the decoding end records the number of decoded duplicate points through the following instructions:

[0394] for(index=0;index <nodeCount;index++)

[0395] dupCount+=dupPointNum

[0396] Wherein, dupPointNum represents the number of duplicate points included in the node.

[0397] In this scenario 3, the decoding end records the number of decoded duplicate points in the point cloud in real time. This allows the decoding end to determine the number of decoded duplicate points in the point cloud at that time when decoding the current node. Based on this number of decoded duplicate points, the decoding end determines whether the current node contains duplicate points, thereby achieving accurate decoding of the current node. For example, if the number of decoded duplicate points in the point cloud at that time is the same as the total number of duplicate points in the point cloud, then the current node and all subsequent nodes do not contain duplicate points. Therefore, when decoding these nodes, the decoding of duplicate information can be skipped, thereby improving decoding speed.

[0398] After the decoding end determines the first parameter corresponding to the current node based on the above method, it executes the above step S102 to decode the current node based on the first parameter.

[0399] In case 3, the above S102 includes the following steps S102-C1 and S102-C2:

[0400] S102-C1, determining the total number of duplicate points in the point cloud;

[0401] S102-C2: Decode the current node based on the number of decoded duplicate points and the total number of duplicate points in the point cloud.

[0402] In this scenario 3, the decoder determines the first parameter corresponding to the current node based on steps S101-C1 and S101-C2 above. This first parameter is the number of decoded duplicate points in the point cloud. Next, based on steps S102-C1 and S102-C2 above, the decoder determines the total number of duplicate points in the point cloud. Furthermore, based on the number of decoded duplicate points in the point cloud and the total number of duplicate points in the point cloud, the decoder determines whether the current node contains duplicate points, thereby accurately decoding the current node.

[0403] Methods for determining the total number of duplicate points in the point cloud in S102-B1 include but are not limited to the following:

[0404] In method 1, the encoder writes the total number of repeated points in the point cloud into the geometry stream, so that the decoder can obtain the total number of repeated points in the point cloud by decoding the geometry stream.

[0405] In method 2, the encoder writes the total number of nodes in the prediction tree and the total number of points in the point cloud into the geometry stream. The decoder then decodes the geometry stream to obtain the total number of points in the point cloud and the total number of nodes in the prediction tree. The difference between the total number of points in the point cloud and the total number of nodes in the prediction tree is used as the total number of duplicate points in the point cloud.

[0406] In a possible implementation, the decoding end determines the difference between the total number of points in the point cloud and the total number of nodes in the prediction tree as the total number of repeated points in the point cloud.

[0407] For example, the decoding end determines the total number of repeated points in the point cloud by the following formula (14):

[0408] dupSumNum=(slice_num_points_minus1+1)-nodeCount (14)

[0409] Among them, dupSumNum is the total number of duplicate points in the point cloud, slice_num_points_minus1+1 is the total number of points in the point cloud, and nodeCount is the total number of nodes in the prediction tree.

[0410] In this scenario 3, the decoding end determines the number of decoded duplicate points in the point cloud before decoding the current node based on steps S101-C1 and S101-C2, and determines the total number of duplicate points in the point cloud based on steps S102-C1 and S102-C2. Next, step S102-C2 is executed to decode the current node based on the number of decoded duplicate points and the total number of duplicate points in the point cloud.

[0411] The implementation methods for decoding the current node based on the number of decoded duplicate points and the total number of duplicate points in the point cloud in S102-C2 include but are not limited to the following:

[0412] Method 1: If the number of decoded duplicate points is equal to the total number of duplicate points in the point cloud, then the above S102-C2 includes the following steps S102-C2-11 and S102-C2-12:

[0413] S102-C2-11, skip decoding repeated point information of the current node;

[0414] S102-C2-12. Determine a geometric reconstruction value of a point included in the current node.

[0415] In this method 1, when decoding the current node, if the decoder determines that the number of decoded duplicate points in the current point cloud is the same as the total number of duplicate points in the point cloud, then each of the undecoded nodes in the prediction tree includes a point and does not include duplicate points. In this case 3, the undecoded nodes in the prediction tree include the current node. Therefore, it can be determined that the current node includes a point and does not include duplicate points. Therefore, when decoding the current node and the nodes after the current node, the decoding of duplicate point information is skipped, for example, the number of duplicate points included in the current node is skipped, thereby reducing decoding complexity, saving decoding time, and improving decoding efficiency.

[0416] That is to say, in method 1, if it is determined that the current node includes one point but does not include duplicate points based on the number of decoded duplicate points in the current point cloud and the total number of duplicate points in the point cloud, the decoding of the duplicate point information is skipped, and only the geometric reconstruction value of the point included in the current node needs to be determined.

[0417] For example, the geometry code stream is decoded to obtain the coordinate residual of the point, and the geometric reconstruction value of the point is determined based on the coordinate residual. The process of determining the geometric reconstruction value of the point can be specifically described in the following steps 11 and 12, which will not be repeated here.

[0418] Mode 2: If the number of decoded duplicate points is less than the total number of duplicate points in the point cloud, then the above S102-C2 includes the following steps S102-C2-21 and S102-C2-22:

[0419] S102-C2-21, decoding the repeated point information of the current node;

[0420] S102-C2-22. Based on the duplicate point information, determine the geometric reconstruction values ​​of the points included in the current node.

[0421] In this method 2, when decoding the current node, if the decoding end determines that the number of decoded duplicate points in the current point cloud is less than the total number of duplicate points in the point cloud, it means that at least one of the undecoded nodes in the prediction tree includes multiple points, that is, at least one of the undecoded nodes in the prediction tree includes duplicate points. In this case 3, the undecoded nodes in the prediction tree include the current node, that is, the current node may include duplicate points. In this case, in order to improve the accuracy of decoding, when decoding the current node, it is necessary to decode the duplicate point information of the current node, for example, to decode and obtain the number of duplicate points included in the current node. Then, based on the duplicate point information, the geometric reconstruction value of the points included in the current node is determined.

[0422] For example, if it is determined based on the duplicate point information that the current node does not include duplicate points, the same method as the above method 1 is used to determine the geometric reconstruction value of a point included in the current node.

[0423] For another example, if it is determined based on the repeated point information that the current node includes repeated points, the geometric reconstruction value of the first point included in the current node and the geometric reconstruction value of the repeated points included in the current node are determined.

[0424] In some embodiments, if it is determined that the current node includes N repeated points, where N is a positive integer, then the above S102-C2-22 includes the following steps:

[0425] S102-C2-221, determine the geometric reconstruction value of the first point in the current node;

[0426] S102-C2-222. Determine the geometric reconstruction value of the first point as the geometric reconstruction values ​​of the N repeated points included in the current node.

[0427] In this embodiment, repeated points refer to points with the same coordinates in a second coordinate system, for example, the second coordinate system is a Cartesian coordinate system. Optionally, the second coordinates can also be understood as the original coordinates of the point cloud.

[0428] When encoding the current node, the encoder determines that the current node includes N+1 points, where N points are repeated with the first point, thereby determining that the current node includes N repeated points. During encoding, the encoder first encodes the first point in the current node, for example, by encoding the coordinate residual value of the first point in a first coordinate system, the coordinate residual value of the first point in a second coordinate system, and the prediction mode corresponding to the first point. Simultaneously, the encoder determines the repeated point information corresponding to the current node, for example, the repeated point information includes the number N of repeated points included in the current node, and encodes the repeated point information into the bitstream.

[0429] Based on this, when the decoder decodes the current node, it determines, based on the aforementioned judgment conditions, that the repeated point information for the current node needs to be decoded. The decoder then decodes the repeated point information for the current node and, using this repeated point information, determines that the current node includes N repeated points. Next, the decoder determines the geometric reconstruction value of the first point in the current node. The process of determining the geometric reconstruction value of the first point in the current node by the decoder can be found in the detailed description of steps 11 and 12 below and is not further elaborated here.

[0430] After the decoding end determines the geometric reconstruction value of the first point in the current node, it determines the geometric reconstruction value of each of the N repeated points based on the repeated point information of the current node and the geometric reconstruction value of the first point.

[0431] As can be seen from the above, in this embodiment, duplicate points are points with the same coordinates in the second coordinate system. In other words, each duplicate point in the current node has the same coordinates as the first point in the second coordinate system. Therefore, the geometric reconstruction value of the first point in the second coordinate system can be directly determined as the geometric reconstruction value of the N duplicate points in the second coordinate system.

[0432] In this case 3, in addition to determining the geometric reconstruction values ​​of the first node and N repeated points included in the current node through the above steps, the number of decoded repeated points is also updated based on the number of repeated points N included in the current node. For example, the sum of the number of repeated points included in the current node and the number of decoded repeated points is determined as the new number of decoded repeated points. Based on this new number of decoded repeated points, the next node is decoded.

[0433] In the above, for case 3, when decoding the current node, the number of decoded duplicate points in the point cloud is determined as the first parameter of the current node, and the specific process of decoding the current node is introduced based on the number of decoded duplicate points in the point cloud and the total number of duplicate points in the point cloud.

[0434] The following describes the specific process of determining the geometric reconstruction value of a point or the first point included in the current node in Cases 1 to 3 above. Specifically, the following describes the specific process of determining the geometric reconstruction value of a point included in the current node in S102-A3-12, S102-B2-12, and S102-C2-12, as well as the specific process of determining the geometric reconstruction value of the first point in the current node in S102-A3-221, S102-B2-221, and S102-C2-221.

[0435] In the embodiment of the present application, the decoding end determines the geometric reconstruction value of a point included in the current node, which is the same as the process of determining the geometric reconstruction value of the first point in the current node. For ease of description, the target point is used to replace a point in S102-A3-12, S102-B2-12, S102-C2-12, and the first point in S102-A3-221, S102-B2-221, and S102-C2-221. In other words, the target point in steps 11 to 12 below can be understood as a point in S102-A3-12, S102-B2-12, and S102-C2-12, or as the first point in S102-A3-221, S102-B2-221, and S102-C2-221.

[0436] The specific process of determining the geometric reconstruction value of the target point is introduced below, which specifically includes the following steps 11 and 12.

[0437] Step 11: Determine the predicted coordinate value of the target point.

[0438] In an embodiment of the present application, when geometrically reconstructing a target point, a coordinate prediction value of the target point is first determined, and then a coordinate reconstruction value of the target point is determined based on the coordinate prediction value.

[0439] The embodiment of the present application does not limit the specific method of determining the coordinate prediction value of the target point.

[0440] In a possible implementation, the arithmetic mean or weighted mean of the coordinate reconstructed values ​​of one or several decoded points before the target point is determined as the coordinate prediction value of the target point.

[0441] In another possible implementation, step 11 includes the following steps 11-1 and 11-2:

[0442] Step 11-1, determine the prediction mode corresponding to the target point;

[0443] Step 11-2: Determine the coordinate prediction value of the target point based on the prediction model.

[0444] It should be noted that the target point here is used to refer to a point or the first point in the current node. Therefore, the prediction mode corresponding to the current node is the prediction mode corresponding to the target point.

[0445] In an example, the prediction mode corresponding to the target point may be a default mode.

[0446] In another example, the prediction mode corresponding to the target point is obtained by decoding the geometry bitstream. Specifically, when encoding the current node, the encoder writes the prediction mode corresponding to the current node into the geometry bitstream. For example, the encoder writes the index of the prediction mode corresponding to the current node into the bitstream. In this way, the decoder obtains the prediction mode corresponding to the current node by decoding the geometry bitstream.

[0447] For example, if the current node is the root node of the prediction tree, the encoder determines that the prediction mode corresponding to the current node is Mode0, and writes Mode0 into the geometry code stream.

[0448] For another example, if the current node is not the root node, and the encoder determines that the prediction mode corresponding to the current node is Mode1, the encoder writes Mode1 into the geometry stream.

[0449] For another example, if the current node is not the root node, and the encoder determines that the prediction mode corresponding to the current node is Mode 2 or Mode 3, the encoder writes Mode 2 or Mode 3 into the geometry stream.

[0450] In some embodiments, the first node in the prediction tree typically uses Mode 0 for each parent node, and Mode 1 is typically selected for the child nodes of the first node in the prediction tree, which have a parent node. Therefore, to further save codewords, the prediction modes of the first node in the prediction tree and its child nodes are not encoded. The decoding end defaults to Mode 0 for the prediction mode corresponding to the first node in the prediction tree, and Mode 1 for the prediction mode corresponding to the child nodes of the first node in the prediction tree.

[0451] In the embodiments of the present application, the methods of generating the prediction tree are different, and the methods of determining the prediction value under the same corresponding prediction mode are also different.

[0452] In some embodiments, if a prediction tree is established based on a KD-Tree, the coordinate prediction value of the target point determined based on the prediction mode is the coordinate value of the target point in a second coordinate system (e.g., a Cartesian coordinate system). In this case, in step 11-2, the coordinate prediction value of the target point determined based on the prediction mode includes the following examples:

[0453] Example 11: If the prediction mode corresponding to the current node is Mode 0, that is, no prediction, the predicted value of the target point in the second coordinate system is (0, 0, 0).

[0454] Example 12: If the prediction mode corresponding to the current node is Mode 1, that is, Delta prediction, the geometric reconstruction value of the parent node of the current node in the second coordinate system is determined as the predicted value of the target point in the second coordinate system.

[0455] Example 13: If the prediction mode corresponding to the current node is Mode 2, that is, Linear prediction, then the predicted value of the target point in the second coordinate system is determined based on the geometric reconstruction value of the parent node of the current node in the second coordinate system and the geometric reconstruction value of the grandparent node of the current node in the second coordinate system.

[0456] For example, based on the following formula (15), the predicted value of the target point in the second coordinate system is determined:

[0457] p=2p0-p1 (15)

[0458] in, is the predicted value of the target point in the second coordinate system, p0 is the geometric reconstruction value of the parent node of the current node in the second coordinate system, and p1 is the geometric reconstruction value of the grandparent node of the current node in the second coordinate system.

[0459] Example 14: If the prediction mode corresponding to the current node is Mode 3, that is, Parallelogram prediction, then the predicted value of the target point in the second coordinate system is determined based on the geometric reconstruction value of the parent node of the current node in the second coordinate system, the geometric reconstruction value of the grandparent node of the current node in the second coordinate system, and the geometric reconstruction value of the great-grandfather of the current node in the second coordinate system.

[0460] For example, based on the following formula (16), the predicted value of the target point in the second coordinate system is determined:

[0461] p=p0+p1-p2 (16)

[0462] in, is the predicted value of the target point in the second coordinate system, p0 is the geometric reconstruction value of the parent node of the current node in the second coordinate system, p1 is the geometric reconstruction value of the grandparent node of the current node in the second coordinate system, and p2 is the geometric reconstruction value of the great-grandparent node of the current node in the second coordinate system.

[0463] In some embodiments, if a prediction tree is established based on lidar calibration information, the coordinate prediction value of the target point determined based on the prediction model is the coordinate value of the target point in a first coordinate system (e.g., a cylindrical coordinate system). In this case, the coordinate prediction value of the target point determined based on the prediction model in step 11-2 includes the following examples:

[0464] Example 21: If the prediction mode corresponding to the current node is Mode0, that is, no prediction, the predicted value of the target point in the first coordinate system is where r min The minimum value of the r component after the coordinate transformation of the entire point cloud. If the current node has no parent node, then i prev Set to 0, otherwise it is the cylindrical coordinate component of the parent node.

[0465] Example 22: If the prediction mode corresponding to the current node is Mode 1, that is, Delta prediction, the geometric reconstruction value of the parent node of the current node in the first coordinate system is determined as the predicted value of the target point in the first coordinate system.

[0466] Example 23: If the prediction mode corresponding to the current node is Mode 2, that is, Linear prediction, then the predicted value of the target point in the first coordinate system is determined based on the geometric reconstruction value of the parent node of the current node in the first coordinate system and the geometric reconstruction value of the grandparent node of the current node in the first coordinate system.

[0467] Example 14: If the prediction mode corresponding to the current node is Mode 3, that is, Parallelogram prediction, then the predicted value of the target point in the first coordinate system is determined based on the geometric reconstruction value of the parent node of the current node in the first coordinate system, the geometric reconstruction value of the grandparent node of the current node in the first coordinate system, and the geometric reconstruction value of the great-grandfather of the current node in the first coordinate system.

[0468] Based on the above steps, after the coordinate prediction value of the target point is determined, the following step 12 is executed.

[0469] Step 12: Determine the geometric reconstruction value of the target point based on the coordinate prediction value of the target point.

[0470] From the above, we can see that due to the different ways of constructing the prediction tree, the coordinate prediction values ​​of the determined target points are also different.

[0471] In some embodiments, if the predicted coordinate value of the target point is the predicted coordinate value of the target point in the second coordinate system Then the above step 12 includes the following steps:

[0472] Step 12-11: Decode the geometric code stream of the point cloud to obtain the coordinate residual value of the target point in the second coordinate system.

[0473] The encoder determines a coordinate residual value of the target point in the second coordinate system based on the predicted coordinate value and the coordinate value of the target point in the second coordinate system, and writes the coordinate residual value into the decoded bitstream.

[0474] In some embodiments, the encoder does not quantize the coordinate residual value of the target point in the second coordinate system and directly writes it into the geometry stream. In this case, the decoder obtains the coordinate residual value of the target point in the second coordinate system by decoding the geometry stream, without the need for inverse quantization.

[0475] In some embodiments, to facilitate encoding, the encoder quantizes the coordinate residual value of the target point in the second coordinate system and writes the quantized coordinate residual value of the target point in the second coordinate system into the geometry bitstream. Thus, the decoder decodes the geometry bitstream to obtain the quantized coordinate residual value of the target point in the second coordinate system and dequantizes the quantized coordinate residual value of the target point in the second coordinate system to obtain the coordinate residual value of the target point in the second coordinate system.

[0476] Optionally, the coordinate residual value of the target point in the second coordinate system is also called the coordinate residual value of the current node in the second coordinate system, which is recorded as (r x ,r y ,r z ).

[0477] Step 12-12: Determine the coordinate reconstruction value of the target point in the second coordinate system based on the coordinate prediction value and the coordinate residual value of the target point in the second coordinate system.

[0478] For example, the sum of the predicted coordinate value and the coordinate residual value of the target point in the second coordinate system is determined as the reconstructed coordinate value of the target point in the second coordinate system.

[0479] Exemplarily, based on the following formula (17), the coordinate reconstruction value of the target point in the second coordinate system is determined:

[0480]

[0481] Among them, (x, y, z) is the coordinate reconstruction value of the target point in the second coordinate system.

[0482] Steps 12-13: reconstruct the coordinate value of the target point in the second coordinate system to determine the geometric reconstruction value of the target point.

[0483] Finally, the coordinate reconstruction value of the target point determined above in the second coordinate system is determined as the geometric reconstruction value of the target point.

[0484] In some embodiments, if the predicted coordinate value of the target point is the predicted coordinate value of the target point in the first coordinate system Then the above step 12 includes the following steps:

[0485] Step 12-21: Determine the coordinate reconstruction value of the target point in the first coordinate system based on the coordinate prediction value of the target point in the first coordinate system.

[0486] In one example, the predicted coordinate value of the target point in the first coordinate system is determined as the reconstructed coordinate value of the target point in the first coordinate system.

[0487] In another example, the above steps 12-21 include the following steps:

[0488] Step 12-211: Decode the geometry code stream to obtain a coordinate residual value of the target point in the first coordinate system;

[0489] Step 12-212: Obtain a coordinate reconstruction value of the target point in the first coordinate system based on the coordinate prediction value and the coordinate residual value of the target point in the first coordinate system.

[0490] The encoder determines the coordinate residual value of the target point in the first coordinate system based on the predicted coordinate value and the coordinate value of the target point in the first coordinate system. This coordinate residual value is written into the decoded bitstream. Correspondingly, the decoder decodes the geometry bitstream to obtain the coordinate residual value of the target point in the first coordinate system.

[0491] In some embodiments, the encoder does not quantize the coordinate residual value of the target point in the first coordinate system and directly writes it into the geometry stream. In this case, the decoder obtains the coordinate residual value of the target point in the first coordinate system by decoding the geometry stream, without the need for inverse quantization.

[0492] In some embodiments, to facilitate encoding, the encoder quantizes the coordinate residual value of the target point in the first coordinate system and writes the quantized coordinate residual value of the target point in the first coordinate system into the geometry bitstream. Thus, the decoder decodes the geometry bitstream to obtain the quantized coordinate residual value of the target point in the first coordinate system and dequantizes the quantized coordinate residual value of the target point in the first coordinate system to obtain the coordinate residual value of the target point in the first coordinate system.

[0493] Optionally, the coordinate residual value of the target point in the first coordinate system is also called the coordinate residual value of the current node in the first coordinate system, which is recorded as (r r ,r φ ,r i ).

[0494] Next, based on the coordinate prediction value and the coordinate residual value of the target point in the first coordinate system, the coordinate reconstruction value of the target point in the first coordinate system is obtained.

[0495] For example, the sum of the predicted coordinate value and the coordinate residual value of the target point in the first coordinate system is determined as the reconstructed coordinate value of the target point in the first coordinate system.

[0496] Exemplarily, based on the following formula (18), the coordinate reconstruction value of the target point in the first coordinate system is determined:

[0497]

[0498] Among them, (r, φ, i) is the coordinate reconstruction value of the target point in the first coordinate system.

[0499] Step 12-22: Determine the coordinate reconstruction value of the target point in the second coordinate system based on the coordinate reconstruction value of the target point in the first coordinate system.

[0500] The embodiment of the present application does not limit the specific types of the first coordinate system and the second coordinate system.

[0501] The embodiment of the present application does not limit the specific method of determining the coordinate reconstruction value of the target point in the second coordinate system based on the coordinate reconstruction value of the target point in the first coordinate system.

[0502] In mode 1, the decoding end converts the coordinate reconstruction value of the target point in the first coordinate system into the coordinate reconstruction value of the target point in the second coordinate system based on the conversion relationship between the first coordinate system and the second coordinate system.

[0503] In the second method, the decoding end determines the coordinate reconstruction value of the target point in the second coordinate system through the following steps 12-221 to 12-223:

[0504] Step 12-221: Perform coordinate transformation on the coordinate reconstruction value of the target point in the first coordinate system to obtain the coordinate value of the target point in the second coordinate system.

[0505] Specifically, based on the conversion relationship between the first coordinate system and the second coordinate system, coordinate conversion is performed on the coordinate reconstruction value of the target point in the first coordinate system to obtain the coordinate value of the target point in the second coordinate system.

[0506] For example, assuming that the first coordinate system is a Cartesian coordinate system and the second coordinate system is a cylindrical coordinate system, the coordinate value of the target point in the second coordinate system is determined based on the following formula (19):

[0507]

[0508]

[0509]

[0510] Where i is the LaserID corresponding to the target point, θ is the elevation angle of the laser corresponding to i, and zLaser is the height of the laser corresponding to i in the vertical direction.

[0511] Step 12-222: Decode the geometric code stream to obtain the coordinate residual value of the target point in the second coordinate system.

[0512] In an embodiment of the present application, when encoding a target point, the encoding point determines the coordinate reconstruction value of the target point in the first coordinate system based on the coordinate prediction value of the target point in the first coordinate system, transforms the coordinate reconstruction value of the target point in the first coordinate system, and obtains the coordinate reconstruction value of the target point in the second coordinate system. Next, the encoding end determines the coordinate residual value of the target point in the second coordinate system based on the coordinate value of the target point in the second coordinate system and the coordinate reconstruction value. The encoding end writes the coordinate residual value based on the target point in the second coordinate system into the geometry code stream.

[0513] Based on this, the decoding end decodes the geometric code stream to obtain the coordinate residual value of the target point in the second coordinate system.

[0514] In some embodiments, if the encoder quantizes the coordinate residual value of the target point in the second coordinate system and writes it into the geometry bitstream, the decoder parses the quantized coordinate residual value of the target point in the second coordinate system from the geometry bitstream and then dequantizes the quantized coordinate residual value of the target point in the second coordinate system to obtain the coordinate residual value of the target point in the second coordinate system.

[0515] Step 12-223: Obtain a coordinate reconstruction value of the target point in the second coordinate system based on the coordinate value and the coordinate residual value of the target point in the second coordinate system.

[0516] For example, the sum of the coordinate value of the target point in the second coordinate system and the coordinate residual value is determined as the coordinate reconstruction value of the target point in the second coordinate system.

[0517] Exemplarily, based on the following formula (20), the coordinate reconstruction value (x, y, z) of the target point in the second coordinate system is determined:

[0518]

[0519] Among them, (r x ,r y ,r z ) is the coordinate residual value of the target point in the second coordinate system.

[0520] Step 12-23: Determine the coordinate reconstruction value of the target point in the second coordinate system as the geometric reconstruction value of the target point.

[0521] Finally, the coordinate reconstruction value of the target point determined above in the second coordinate system is determined as the geometric reconstruction value of the target point.

[0522] The above embodiment is described by taking the geometric decoding process of the current node in the prediction tree as an example. The decoding process of other nodes in the prediction tree can refer to the decoding process of the current node, and the reconstructed point cloud geometric information can be obtained.

[0523] In the point cloud decoding method provided by an embodiment of the present application, in prediction tree-based point cloud decoding, before decoding the current node, a first parameter corresponding to the current node is first determined. This first parameter is used to determine whether the current node includes duplicate points, and then the current node is decoded based on the first parameter. For example, if the current node is determined not to include duplicate points based on the first parameter, then when decoding the current node, decoding of the duplicate point information of the current node is skipped. If the current node is determined to include duplicate points based on the first parameter, then the duplicate point information of the current node is decoded. This reduces the decoding complexity of the point cloud, saves decoding time, and improves decoding efficiency.

[0524] 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.

[0525] Figure 10 is a schematic diagram of a point cloud encoding method according to an embodiment of the present application. The point cloud encoding method according to the embodiment of the present application can be implemented by the point cloud encoding device shown in Figure 3 or Figure 4 above.

[0526] As shown in FIG10 , the point cloud encoding method of the embodiment of the present application includes:

[0527] S201: Determine the prediction tree corresponding to the point cloud.

[0528] Specifically, the encoder reorders the points in the point cloud based on the coordinate information of the points in the point cloud, and constructs a prediction tree for the point cloud based on the coordinate information of the reordered points.

[0529] The embodiment of the present application does not limit the specific method of determining the prediction tree corresponding to the point cloud.

[0530] In some embodiments, a prediction tree is established based on a KD-Tree. For example, the voxelized point cloud is reordered to construct a more efficient prediction tree. Available sorting methods include unordered, Morton order, azimuth order, and radial distance order. Currently, the default sorting method is sorting by azimuth. The KD-Tree is used to perform nearest neighbor searches. At the beginning, the KD-Tree is empty. Each node is visited in sequence according to the selected order, and the K nearest neighbors of the current node are searched in the KD-Tree using the current node's position. The nearest neighbors found are then used as child nodes of the current point according to certain criteria. Finally, a prediction tree for the point cloud is constructed.

[0531] In some embodiments, a prediction tree is established based on the lidar calibration information, for example, the voxelized point cloud is reordered to build a more efficient prediction tree. The available sorting methods are unordered, Morton order, azimuth order, and radial distance order. Currently, the default sorting method is sorting by azimuth. To this end, the Cartesian coordinates (x, y, z) of each point are converted into polar coordinates (r, φ, tanθ), and the points are sorted in turn according to the azimuth φ, radius r, and elevation tangent tanθ. According to the sorted results, the point cloud is traversed and the points are converted from Cartesian coordinates (x, y, z) to cylindrical coordinates (r, φ, i) according to the following formula and stored. Then, a prediction tree is established based on the cylindrical coordinates (r, φ, i) of the point. For example, if a point with LaserID i appears for the first time, the point is used as the root node of all points corresponding to LaserID i; if not, the point is regarded as a child node of the previously processed point with LaserID i, and this process is repeated until all points are traversed. Finally, the prediction tree is built by connecting the root nodes of all LaserIDs, for example, obtaining the prediction tree shown in FIG8A or FIG8B .

[0532] S202: Determine a first parameter corresponding to the current node.

[0533] S203: Encode the current node based on the first parameter.

[0534] The first parameter is used to determine whether the current node includes duplicate points, and the current node is a node in the prediction tree of the point cloud.

[0535] As can be seen from the above, a point cloud includes geometric information and attribute information, and encoding of a point cloud includes geometric encoding and attribute encoding. The embodiments of the present application relate to geometric encoding of a point cloud.

[0536] 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 encoding of the point cloud is also referred to as the position encoding of the point cloud.

[0537] In prediction tree-based encoding, the encoder constructs a prediction tree structure based on the geometric information of the point cloud. The prediction tree consists of multiple nodes, each of which contains at least one point in the point cloud. In other words, in prediction tree encoding, points in the point cloud are divided into nodes in the prediction tree, and the encoding of the nodes in the prediction tree is achieved by encoding the points in the point cloud.

[0538] 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 node of the prediction tree, so that the node includes repeated points.

[0539] Currently, when encoding each node in the prediction tree, the encoder needs to encode the repeated point information of each node, which increases the encoding complexity, wastes encoding time, and reduces encoding efficiency.

[0540] From the above, it can be seen that in the prediction tree of the point cloud, not every node includes duplicate points. It can even be understood that only a few nodes in the prediction tree of the point cloud include duplicate points. Based on this, in an embodiment of the present application, when encoding, the first parameter corresponding to the current node is first determined. The first parameter is used to determine whether the current node includes duplicate points, and then the current node is encoded based on the first parameter. For example, when it is determined based on the first parameter that the current node does not include duplicate points, when encoding the current node, the encoding of the duplicate point information of the current node is skipped. If it is determined based on the first parameter that the current node may include duplicate points, the duplicate point information of the current node is encoded, thereby reducing the encoding complexity of the point cloud, saving decoding time, and improving decoding efficiency.

[0541] In the embodiment of the present application, the encoding process for each point in the prediction tree 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 prediction tree as an example.

[0542] In some embodiments, the current node can be understood as any node in the prediction tree.

[0543] In some embodiments, the current node can be understood as a node in the prediction tree that is currently waiting to be encoded.

[0544] In an embodiment of the present application, before encoding the current node, a first parameter corresponding to the current node is first determined, and then the current node is encoded based on the first parameter. In an embodiment of the present application, different methods for determining the first parameter corresponding to the current node are used, and corresponding methods for encoding the current node based on the first parameter are also different. The following describes in detail several methods for determining the first parameter corresponding to the current node and the process for encoding the current node based on the first parameter involved in an embodiment of the present application.

[0545] In case 1, the above S201 includes the following steps S201-A1 to S201-A2:

[0546] S201-A1, determining the number of nodes in the to-be-encoded cache queue after taking the current node from the to-be-encoded cache queue and placing the child nodes of the current node in the prediction tree into the to-be-encoded cache queue;

[0547] S201-A2: Determine the number of nodes in the to-be-encoded cache queue as a first parameter.

[0548] In an embodiment of the present application, the encoding end encodes the nodes in the prediction tree based on a depth-first traversal method.

[0549] Exemplarily, the encoding end includes a cache queue to be encoded, which is used to place nodes to be encoded, which can also be called unencoded nodes. When encoding begins, the encoding end first encodes the geometric code stream of the point cloud to obtain the relevant data of the first node of the prediction tree, and the relevant data of the first node includes the number of child nodes included in the first node. Then, based on the number of child nodes included in the first node, the encoding end obtains the child nodes of the first node from the prediction tree and places the child nodes of the first node in the cache queue to be encoded. It should be noted that placing the child node in the cache queue to be encoded mentioned here can be understood as placing the relevant information to be encoded of the child node in the cache queue to be encoded. Optionally, the relevant information to be encoded of the child node includes the coordinate residual of the child node, the number of child nodes included in the child node, the prediction mode of the child node, etc. After the encoding of the first node is completed, a node is taken from the cache queue to be encoded and the child nodes of the node are placed in the cache queue to be encoded, and so on, until the cache queue to be encoded is empty.

[0550] For example, assume the prediction tree includes five nodes, designated as node 0, node 1, node 2, node 3, and node 4, where node 0 is the root node, nodes 1 and 2 are its two child nodes, and nodes 3 and 4 are its two child nodes. During encoding, the prediction tree first determines that root node 0 has two child nodes. Two nodes are then removed from the prediction tree and placed in the cache queue to be encoded. At this point, the cache queue to be encoded includes nodes 1 and 2, both of which are unencoded. After encoding node 0, node 1 is removed from the cache queue to be encoded for encoding, resulting in a result that node 1 has two child nodes. Two nodes are then removed from the prediction tree and placed in the cache queue to be encoded. At this point, the cache queue to be encoded includes nodes 2, 3, and 4, which are unencoded nodes. After encoding node 1, node 3 is extracted from the cache queue for encoding. This results in node 3 not including any child nodes. At this point, the remaining unencoded nodes in the cache queue are nodes 2 and 4. After encoding node 3, node 4 is extracted from the cache queue for encoding. This results in node 4 not including any child nodes. At this point, the cache queue contains one unencoded node, node 2. Finally, node 2 in the cache queue is encoded. This results in node 2 not including any child nodes. At this point, encoding of all nodes in the cache queue is complete, and the cache queue is empty, indicating that the prediction tree is encoded.

[0551] In this case 1, when encoding the current node, it is possible to determine whether the current node includes duplicate points based on the number of nodes included in the to-be-encoded cache queue and the number of unencoded points in the point cloud. For example, when encoding the current node, the current node is taken out of the encoding cache queue, and the child nodes of the current node are placed in the to-be-encoded cache queue. At this time, the nodes included in the to-be-encoded cache queue are all unencoded nodes. At the same time, when encoding the current node, it can be guaranteed that at least one point is included from the current node. Therefore, in this embodiment of the application, it is assumed that the current node includes one encoded point, and the number of unencoded points in the point cloud is determined. If the number of unencoded nodes included in the to-be-encoded cache queue is the same as the number of unencoded points in the point cloud, it means that when assuming that the current node includes one point, each node in the to-be-encoded cache queue includes one point, and no duplicate points are included. Therefore, it is assumed that the assumption that the current node includes one point is established, that is, the current node includes one point and no duplicate points are included. Therefore, when encoding the current node, the duplicate point information of the current node is not encoded.

[0552] If, after assuming that the current node includes an encoded point, the number of nodes in the pending encoding cache queue is less than the number of unencoded points in the point cloud, then at least one of the nodes in the pending encoding cache queue or the current node contains a duplicate point. This means that the assumption that the current node includes a point may not hold true, meaning that the current node may contain a duplicate point. In this case, for accurate encoding, the duplicate point information of the current node needs to be encoded when encoding the current node.

[0553] Based on the above description, in an embodiment of the present application, when encoding the current node, it is determined that after the current node is taken out from the cache queue to be encoded and the child nodes of the current node in the prediction tree are placed in the cache queue to be encoded, the number of nodes in the cache queue to be encoded is determined as the first parameter corresponding to the current node.

[0554] After the first parameter corresponding to the current node is determined based on the above method, the above step S202 is executed to encode the current node based on the first parameter.

[0555] In case 1, the above S202 includes the following steps S202-A1 to S202-A3:

[0556] S202-A1, determining the total number of points in the point cloud;

[0557] S202-A2, determining the number of uncoded first points in the point cloud based on the total number of points in the point cloud and the number of currently coded points, wherein the coded points include a point in the current node;

[0558] S202-A3: Encode the current node based on the number of nodes in the to-be-encoded cache queue and the number of first points.

[0559] In this scenario 1, the encoder determines a first parameter corresponding to the current node based on steps S201-A1 to S201-A2 above. This first parameter is the number of unencoded nodes included in the queue of unencoded points in the queue of unencoded points. Next, based on steps S202-A1 to S202-A3 above, the encoder determines the number of unencoded points in the point cloud. Furthermore, based on the number of unencoded nodes in the queue of unencoded points in the queue of unencoded points and the number of unencoded points in the point cloud, the encoder determines whether the current node includes duplicate points, thereby accurately encoding the current node.

[0560] It should be noted that in Case 1, the currently encoded point includes a point in the current node. That is, in Case 1, after the current node is removed from the pending encoding cache, it is assumed that the current node includes a point. Therefore, when determining the number of unencoded points in the point cloud, the point included in the current node is removed. Therefore, for ease of description, the unencoded point in the point cloud in Case 1 is recorded as the first point.

[0561] The following describes the specific process of determining the number of uncoded first points in the point cloud.

[0562] In this case 1, the encoding end determines the first parameter corresponding to the current node based on the above steps S201-A1 to S201-A2, and then determines the number of currently encoded points. The currently encoded points include a point included in the current node, that is, the number of currently encoded points is equal to the sum of the number of points included in the current encoded node plus 1.

[0563] Then, based on the total number of points in the point cloud and the number of currently encoded points, the number of unencoded first points in the point cloud is determined.

[0564] In one example, the difference between the total number of points in the point cloud and the number of currently encoded points is determined as the number of the first unencoded points in the point cloud.

[0565] Finally, the current node is encoded based on the number of nodes in the to-be-encoded buffer queue and the number of unencoded first points in the point cloud.

[0566] In some embodiments, the encoder writes the total number of points in the point cloud into the geometry stream. In this way, the encoder obtains the total number of points in the point cloud by encoding the geometry stream.

[0567] In some embodiments, the encoding end writes the total number of points in the point cloud into the geometric data unit of the point cloud. In this way, the encoding end obtains the total number of points in the point cloud by encoding the geometric data unit of the point cloud.

[0568] In some embodiments, since the point cloud includes at least one point, in order to save code words, the encoding end subtracts one from the total number of points in the point cloud when encoding the total number of points in the point cloud to obtain a first value, and writes the first value into the geometric data unit, that is, the first value is represented as slice_num_points_minuS1.

[0569] The following describes a specific process of encoding the current node based on the number of nodes in the to-be-encoded buffer queue and the number of first points in the above S202 - A3 .

[0570] The implementation methods of S202-A3 include but are not limited to the following:

[0571] Mode 1: If the number of nodes in the to-be-encoded cache queue is equal to the number of the first points, then the above S202-A3 includes the following steps S202-A3-11 and S202-A3-12:

[0572] S202-A3-11, skip encoding repeated point information of the current node;

[0573] S202-A3-12. Determine a coordinate residual value of a point included in the current node, and write the coordinate residual value of the point into the geometric code stream of the point cloud.

[0574] In this method 1, if the encoder determines that the number of nodes in the to-be-encoded cache queue is the same as the number of the first unencoded points in the point cloud, it means that when assuming that the current node includes one point, each node in the to-be-encoded cache queue includes one point, and no duplicate points are included. Therefore, it is shown that the assumption that the current node includes one point is established, that is, the current node includes one point and no duplicate points are included. Therefore, when encoding the current node, the duplicate point information of the current node is not encoded. Furthermore, when encoding other nodes after the current node, the duplicate point information is not encoded, which reduces the encoding complexity, saves encoding time, and improves encoding efficiency.

[0575] At this point, it can be determined that the current node includes only one point. Next, the coordinate residual value of the single point is determined. For example, the coordinate prediction value of the point is determined, and the coordinate residual of the point is obtained based on the coordinate prediction value. The specific process of determining the coordinate residual value of the point can be referred to the description of steps 21 and 22 below, and will not be repeated here.

[0576] Mode 2: If the number of nodes in the to-be-encoded cache queue is less than the number of the first point, then the above S202-A3 includes the following steps S202-A3-21 to S202-A3-23:

[0577] S202-A3-21, encode the repeated point information of the current node;

[0578] S202-A3-22, determine the coordinate residual value of the first point in the current node;

[0579] S202-A3-23. Write the coordinate residual value of the first point and the duplicate point information of the current node into the geometry code stream.

[0580] In this method 2, if the encoding end determines that the number of nodes in the to-be-encoded cache queue is less than the number of unencoded first points in the point cloud, it means that at least one of the nodes in the to-be-encoded cache queue or the current node includes duplicate points, that is, the assumption that the current node includes a point may not be true, and the current node may include duplicate points. At this time, in order to encode accurately, it is necessary to encode the duplicate point information of the current node when encoding the current node. For example, the number of duplicate points included in the current node is obtained by encoding. Next, the coordinate residual value of the first point in the current node is determined, wherein the process of determining the coordinate residual value of the point can be specifically referred to the description of steps 21 to 22 below, which will not be repeated here. Finally, the coordinate residual value of the first point and the duplicate point information of the current node are written into the geometric code stream.

[0581] When the encoder encodes the current node, the current node includes N+1 points, of which N points are repeated with the first point, thereby determining that the current node includes N repeated points. During encoding, the encoder first encodes the first point in the current node, for example, determining the coordinate residual value of the first point in the first coordinate system, the coordinate residual value of the first point in the second coordinate system, and encoding the prediction mode corresponding to the first point. At the same time, the encoder determines the repeated point information corresponding to the current node, for example, the repeated point information includes the number N of repeated points included in the current node, and encodes the repeated point information into the bitstream.

[0582] In the above, for case 1, when encoding the current node, the number of unencoded nodes in the cache queue to be encoded is determined as the first parameter of the current node, and the specific process of encoding the current node is introduced based on the number of nodes in the cache queue to be encoded and the number of unencoded first points in the point cloud.

[0583] The following describes a process of determining the first parameter corresponding to the current node in situation 2 and encoding the current node based on the first parameter.

[0584] Case 2: The above S201 includes the following steps S201-B1 to S201-B3:

[0585] S201-B1, determine the total number of points in the point cloud;

[0586] S201-B2, determining the number of encoded points in the point cloud before encoding the current node;

[0587] S201-B3: Based on the total number of points in the point cloud and the number of encoded points, obtain the number of unencoded second points in the point cloud.

[0588] S201-B4. Determine the number of the second points as the first parameter corresponding to the current node.

[0589] In this case 2, the number of uncoded second points in the point cloud is used as the first parameter corresponding to the current node to determine whether the current node includes duplicate points, thereby achieving accurate coding of the current node.

[0590] It should be noted that the uncoded second point in the point cloud in case 2 is different from the uncoded first point in the point cloud in case 1 above. The uncoded first point in the point cloud in case 1 above includes the midpoint of the current node, while in case 2, the uncoded second point in the point cloud includes the uncoded point in the current node.

[0591] In this case 2, the encoder first determines the total number of points in the point cloud, for example, by obtaining the total number of points in the point cloud from a point cloud file. Next, the encoder determines the number of encoded points in the point cloud before encoding the current node. The encoded points here refer to the encoded points included in the encoded node, and the current node is an unencoded node. Therefore, the encoded points here do not include the points in the current node. Then, based on the total number of points in the point cloud and the number of encoded points, the number of unencoded points in the point cloud is obtained. To distinguish it from the above case 1, the unencoded points in the point cloud in case 2 are recorded as the second point. The number of unencoded second points in the point cloud is then determined as the first parameter corresponding to the current node.

[0592] In one example, the difference between the total number of points in the point cloud and the number of encoded points is determined as the number of unencoded second points in the point cloud.

[0593] That is to say, in this case 2, the encoding end records the number of encoded points in the point cloud in real time, so that when encoding the current node, the number of encoded points in the point cloud at this time is determined, and then the difference between the total number of points in the point cloud and the number of currently encoded points is determined as the number of unencoded second points in the point cloud. Then, based on the number of unencoded second points in the point cloud at this time, it is determined whether the current node includes duplicate points, so as to achieve accurate encoding of the current node. For example, if the number of unencoded second points in the point cloud at this time is the same as the number of unencoded nodes in the prediction tree at this time, it means that the current node and all nodes after the current node do not include duplicate points, and then when encoding these nodes, the encoding of duplicate information can be skipped, thereby improving the encoding speed.

[0594] After the encoding end determines the first parameter corresponding to the current node based on the above method, it executes the above step S202 to encode the current node based on the first parameter.

[0595] In case 2, the above S202 includes the following steps S202-B1 and S202-B2:

[0596] S202-B1, determining the number of uncoded nodes in the prediction tree before coding the current node;

[0597] S202-B2: Encode the current node based on the number of second points and the number of unencoded nodes.

[0598] In this scenario 2, the encoder determines a first parameter corresponding to the current node based on steps S201-B1 to S201-B4. This first parameter is the number of unencoded second points in the point cloud. Next, based on steps S202-B1 and S202-B2, the encoder determines the number of unresolved nodes in the prediction tree. Furthermore, based on the number of unencoded second points in the point cloud and the number of unresolved nodes in the prediction tree, the encoder determines whether the current node contains duplicate points, thereby accurately encoding the current node.

[0599] It should be noted that, in case 2, the current node is an uncoded node, so the uncoded nodes in the prediction tree include the current node.

[0600] In some embodiments, the above S202-B1 includes the following steps S202-B11 to S202-B13:

[0601] S202-B11, determining the total number of nodes in the prediction tree;

[0602] S202-B12, determining the number of nodes that have been encoded in the prediction tree before encoding the current node;

[0603] S202-B13. Based on the total number of nodes and the number of encoded nodes, obtain the number of unencoded nodes.

[0604] In this embodiment, the encoding end constructs a prediction tree corresponding to the point cloud, and then obtains the total number of nodes in the prediction tree. When encoding the current node, the number of encoded nodes in the prediction tree before encoding the current node is determined, and then the number of unencoded nodes in the prediction tree is obtained. For example, the difference between the total number of nodes in the prediction tree and the number of encoded nodes in the current prediction tree is determined as the number of unencoded nodes in the current prediction tree.

[0605] Next, the encoder encodes the current node based on the number of uncoded second points in the current point cloud determined by steps S201-B1 to S201-B4 and the number of uncoded nodes in the prediction tree determined by the above steps.

[0606] The implementation of encoding the current node based on the number of second points and the number of uncoded nodes in S202-B2 includes but is not limited to the following:

[0607] Mode 1: If the number of second points is equal to the number of uncoded nodes, then the above S202-B2 includes the following steps S202-B2-11 and S202-B2-12:

[0608] S202-B2-11, skip encoding repeated point information of the current node;

[0609] S202-B2-12. Determine a coordinate residual value of a point included in the current node, and write the coordinate residual value of the point into the geometric code stream of the point cloud.

[0610] In this method 1, if the encoder determines that the number of uncoded second points in the current point cloud is the same as the number of uncoded nodes in the prediction tree, it means that each of the uncoded nodes in the prediction tree includes a point and no duplicate points. In this case 2, the uncoded nodes in the prediction tree include the current node. Therefore, it can be determined that the current node includes a point and no duplicate points. Therefore, when encoding the current node and the nodes after the current node, the encoding of duplicate point information is skipped, for example, the encoding of the number of duplicate points included in the current node is skipped, thereby reducing encoding complexity, saving encoding time, and improving encoding efficiency.

[0611] That is, in this method 1, if it is determined that the current node includes one point and does not include duplicate points based on the number of unencoded second points in the current point cloud and the number of unencoded nodes in the prediction tree, encoding of the duplicate point information is skipped. Only the coordinate residual value of the one point included in the current node needs to be determined, and the coordinate residual value of the one point needs to be written into the geometry code stream of the point cloud. The specific process of determining the coordinate residual value of the one point included in the current node can be referred to the description of steps 21 and 22 below and will not be repeated here.

[0612] Mode 2: If the number of the second points is greater than the number of uncoded nodes, then the above S202-B2 includes the following steps S202-B2-21 and S202-B2-22:

[0613] S202-B2-21, encode the repeated point information of the current node;

[0614] S202-B2-22, determine the coordinate residual value of the first point in the current node;

[0615] S202-B2-23. Write the coordinate residual value of the first point and the duplicate point information of the current node into the geometry code stream.

[0616] In this mode 2, when the encoding end encodes the current node, if it is determined that the number of unencoded second points in the current point cloud is greater than the number of unencoded nodes in the prediction tree, it means that at least one of the unencoded nodes in the prediction tree includes multiple points, that is, at least one of the unencoded nodes in the prediction tree includes duplicate points. In this case 2, the unencoded nodes in the prediction tree include the current node, and the current node may include duplicate points. At this time, in order to improve the accuracy of the encoding, when encoding the current node, the duplicate point information of the current node is encoded, for example, the number of duplicate points included in the current node is obtained by encoding. Next, the coordinate residual value of the first point in the current node is determined, wherein the specific process of determining the coordinate residual value of the first point in the current node refers to the description of the following steps 11 and 12, which will not be repeated here. Finally, the coordinate residual value of the first point and the duplicate point information of the current node are written into the geometric code stream.

[0617] When encoding the current node, the encoder determines that the current node includes N+1 points, where N points are repeated with the first point. The encoder then determines that the current node includes N repeated points. During encoding, the encoder first encodes the first point in the current node, for example, encoding the coordinate residual value of the first point in a first coordinate system, the coordinate residual value of the first point in a second coordinate system, and the prediction mode corresponding to the first point. Simultaneously, the encoder determines the repeated point information corresponding to the current node, for example, the repeated point information includes the number N of repeated points included in the current node, and encodes the repeated point information into the bitstream.

[0618] In some embodiments of case 2, the total number of nodes in the prediction tree is written into the geometry code stream.

[0619] In the above, for case 2, when encoding the current node, the number of uncoded points in the point cloud is determined as the first parameter of the current node, and the specific process of encoding the current node based on the number of uncoded points in the point cloud and the number of uncoded nodes in the prediction tree is introduced.

[0620] The following describes a process of determining the first parameter corresponding to the current node in case 3 and encoding the current node based on the first parameter.

[0621] Case 3: The above S201 includes the following steps S201-C1 to S201-C3:

[0622] S201-C1, determining the number of duplicate points that have been encoded in the point cloud before encoding the current node;

[0623] S201-C2: Determine the number of encoded repeated points as the first parameter.

[0624] In this case 3, the number of encoded duplicate points in the point cloud can be understood as the number of duplicate points that have been encoded before the current node is encoded. That is, in the embodiment of the present application, the encoder performs real-time statistics on the number of encoded duplicate points during encoding. In this way, when encoding the current node, the number of currently encoded duplicate points in the point cloud is determined as the first parameter corresponding to the current node. Based on this first parameter, it is determined whether the current node includes duplicate points, thereby achieving accurate encoding of the current node.

[0625] In one example, dupCount represents the number of duplicate points currently encoded. dupCount is initialized to 0. When encoding the first node in the prediction tree, dupCount = 0, and the duplicate point information of the first node is encoded. Optionally, the duplicate point information of the first node includes the number of duplicate points included in the first node. Assuming that the number of duplicate points included in the first node is a, dupCount is updated to a. Next, the second node in L3C2 is encoded, and the current dupCount is updated using the number of duplicate points included in the second node, and so on.

[0626] As can be seen from the above, when the encoding end encodes the current node in the prediction tree, it first determines the number of duplicate points that have been encoded before encoding the current node, that is, the number of duplicate points that have been encoded dupCount, and then determines whether to encode the duplicate point information of the current node based on the number of duplicate points that have been encoded dupCount.

[0627] In this scenario 3, the encoder records the number of encoded duplicate points in the point cloud in real time. This allows the encoder to determine the number of encoded duplicate points in the point cloud at that time when encoding the current node. Based on this number of encoded duplicate points, the encoder determines whether the current node contains duplicate points, thereby achieving accurate encoding of the current node. For example, if the number of encoded duplicate points in the point cloud at that time is the same as the total number of duplicate points in the point cloud, then the current node and all subsequent nodes do not contain duplicate points. Therefore, when encoding these nodes, the encoding of duplicate information can be skipped, thereby improving encoding speed.

[0628] After the encoding end determines the first parameter corresponding to the current node based on the above method, it executes the above step S202 to encode the current node based on the first parameter.

[0629] In case 3, the above S202 includes the following steps S202-C1 and S202-C2:

[0630] S202-C1, determining the total number of duplicate points in the point cloud;

[0631] S202-C2: Encode the current node based on the number of encoded duplicate points and the total number of duplicate points in the point cloud.

[0632] In this scenario 3, the encoder determines a first parameter corresponding to the current node based on steps S201-C1 and S201-C2. This first parameter is the number of encoded duplicate points in the point cloud. Next, based on steps S202-C1 and S202-C2, the encoder determines the total number of duplicate points in the point cloud. Furthermore, based on the number of encoded duplicate points in the point cloud and the total number of duplicate points in the point cloud, the encoder determines whether the current node contains duplicate points, thereby accurately encoding the current node.

[0633] Methods for determining the total number of duplicate points in the point cloud in S202-B1 include but are not limited to the following:

[0634] Method 1: When obtaining a point cloud, the encoder determines the total number of repeated points included in the point cloud based on the coordinates of the points in the point cloud.

[0635] In method 2, the encoder determines the total number of points in the point cloud and the total number of nodes in the prediction tree, and determines the difference between the total number of points in the point cloud and the total number of nodes in the prediction tree as the total number of repeated points in the point cloud.

[0636] In this scenario 3, the encoder determines the number of already encoded duplicate points in the point cloud before encoding the current node based on steps S201-C1 and S201-C2, and determines the total number of duplicate points in the point cloud based on step S202-C1. Then, step S202-C2 is executed to encode the current node based on the number of already encoded duplicate points and the total number of duplicate points in the point cloud.

[0637] The implementation methods for encoding the current node based on the number of encoded duplicate points and the total number of duplicate points in the point cloud in S202-C2 include but are not limited to the following:

[0638] Method 1: If the number of encoded duplicate points is equal to the total number of duplicate points in the point cloud, then the above S202-C2 includes the following steps S202-C2-11 and S202-C2-12:

[0639] S202-C2-11, skip encoding repeated point information of the current node;

[0640] S202-C2-12. Determine a coordinate residual value of a point included in the current node, and write the coordinate residual value of the point into the geometric code stream of the point cloud.

[0641] In this method 1, when encoding the current node, if the encoder determines that the number of encoded duplicate points in the current point cloud is the same as the total number of duplicate points in the point cloud, then it means that each of the unencoded nodes in the prediction tree includes a point and does not include duplicate points. In this case 3, the unencoded nodes in the prediction tree include the current node. Therefore, it can be determined that the current node includes a point and does not include duplicate points. Therefore, when encoding the current node and the nodes after the current node, the encoding of duplicate point information is skipped, for example, the encoding of the number of duplicate points included in the current node is skipped, thereby reducing encoding complexity, saving encoding time, and improving encoding efficiency.

[0642] That is, in Method 1, if the current node is determined to include a single point and no duplicate points based on the number of encoded duplicate points in the current point cloud and the total number of duplicate points in the point cloud, encoding of the duplicate point information is skipped. Instead, the coordinate residual value of the single point included in the current node needs only to be determined and written into the point cloud geometry stream. The specific process of determining the coordinate residual value of the single point included in the current node can be found in the description of steps 21 and 22 below and will not be repeated here.

[0643] Mode 2: If the number of encoded duplicate points is less than the total number of duplicate points in the point cloud, then the above S202-C2 includes the following steps S202-C2-21 to S202-C2-23:

[0644] S202-C2-21, encode the repeated point information of the current node;

[0645] S202-C2-22, determine the coordinate residual value of the first point in the current node;

[0646] S202-C2-23. Write the coordinate residual value of the first point and the duplicate point information of the current node into the geometry code stream.

[0647] In this mode 2, when the encoding end is encoding the current node, if it is determined that the number of encoded duplicate points in the current point cloud is less than the total number of duplicate points in the point cloud, it means that at least one of the unencoded nodes in the prediction tree includes multiple points, that is, at least one of the unencoded nodes in the prediction tree includes duplicate points. In this case 3, the unencoded nodes in the prediction tree include the current node, that is, the current node may include duplicate points. At this time, in order to improve the accuracy of the encoding, when encoding the current node, it is necessary to encode the duplicate point information of the current node, for example, to encode the number of duplicate points included in the current node. Next, determine the coordinate residual value of the first point in the current node, wherein the process of determining the coordinate residual value of the first point in the current node can be specifically referred to the description of steps 21 to 22 below, which will not be repeated here. Finally, write the coordinate residual value of the first point and the duplicate point information of the current node into the geometric code stream.

[0648] When encoding the current node, the encoder determines that the current node includes N+1 points, where N points are repeated with the first point. The encoder then determines that the current node includes N repeated points. During encoding, the encoder first encodes the first point in the current node, for example, encoding the coordinate residual value of the first point in a first coordinate system, the coordinate residual value of the first point in a second coordinate system, and the prediction mode corresponding to the first point. Simultaneously, the encoder determines the repeated point information corresponding to the current node, for example, the repeated point information includes the number N of repeated points included in the current node, and encodes the repeated point information into the bitstream.

[0649] As can be seen from the above, the repeated point information in the embodiment of the present application includes the number of repeated points included in the current node.

[0650] In this case 3, in addition to determining the geometric reconstruction values ​​of the first node and N repeated points included in the current node through the above steps, the number of encoded repeated points is also updated based on the number of repeated points N included in the current node. For example, the sum of the number of repeated points included in the current node and the number of encoded repeated points is determined as the new number of encoded repeated points. Based on this new number of encoded repeated points, the next node is encoded.

[0651] In some embodiments of Case 3, the total number of repeated points in the point cloud is written into the geometry code stream.

[0652] In the above, for case 3, when encoding the current node, the number of encoded duplicate points in the point cloud is determined as the first parameter of the current node, and the specific process of encoding the current node is introduced based on the number of encoded duplicate points in the point cloud and the total number of duplicate points in the point cloud.

[0653] The following describes the specific process of determining the geometric reconstruction value of a point or the first point included in the current node in Cases 1 to 3 above. Specifically, the following describes the specific process of determining the geometric reconstruction value of a point included in the current node in S202-A3-12, S202-B2-12, and S202-C2-12, as well as the specific process of determining the geometric reconstruction value of the first point in the current node in S202-A3-221, S202-B2-221, and S202-C2-221.

[0654] In the embodiment of the present application, the process of determining the geometric reconstruction value of a point included in the current node by the encoding end is the same as the process of determining the geometric reconstruction value of the first point in the current node. For ease of description, the target point is used to replace a point in S202-A3-12, S202-B2-12, S202-C2-12, and the first point in S202-A3-221, S202-B2-221, and S202-C2-221. In other words, the target point in steps 21 to 22 below can be understood as a point in S202-A3-12, S202-B2-12, and S202-C2-12, or as the first point in S202-A3-221, S202-B2-221, and S202-C2-221.

[0655] The specific process of determining the geometric reconstruction value of the target point is introduced below, which specifically includes the following steps 21 and 22.

[0656] Step 21: Determine the predicted coordinate value of the target point.

[0657] In an embodiment of the present application, when determining the coordinate residual value of the target point, the coordinate prediction value of the target point is first determined, and based on the coordinate prediction value, the coordinate residual value of the target point is determined.

[0658] The embodiment of the present application does not limit the specific method of determining the coordinate prediction value of the target point.

[0659] In a possible implementation, the arithmetic mean or weighted mean of the coordinate reconstructed values ​​of one or several encoded points before the target point is determined as the coordinate prediction value of the target point.

[0660] In another possible implementation, step 21 includes the following steps 21-1 and 21-2:

[0661] Step 21-1, determining the prediction mode corresponding to the target point;

[0662] Step 21-2: Determine the coordinate prediction value of the target point based on the prediction model.

[0663] It should be noted that the target point here is used to refer to a point or the first point in the current node. Therefore, the prediction mode corresponding to the current node is the prediction mode corresponding to the target point.

[0664] In an example, the prediction mode corresponding to the target point may be a default mode.

[0665] In another example, the prediction mode corresponding to the target point is determined based on a rate-distortion proxy.

[0666] For example, if the current node is the root node of the prediction tree, the encoder determines that the prediction mode corresponding to the current node is Mode0, and writes Mode0 into the geometry code stream.

[0667] For another example, if the current node is not the root node, and the encoder determines that the prediction mode corresponding to the current node is Mode1, the encoder writes Mode1 into the geometry stream.

[0668] For another example, if the current node is not the root node, and the encoding end determines that the prediction mode corresponding to the current node is Mode2 or Mode3, specifically, the rate-distortion cost is used to determine a prediction mode from Mode2 and Mode3 as the prediction mode of the current node, and the determined prediction mode is written into the geometric code stream.

[0669] In the embodiments of the present application, the methods of generating the prediction tree are different, and the methods of determining the prediction value under the same corresponding prediction mode are also different.

[0670] In some embodiments, if a prediction tree is established based on a KD-Tree, the coordinate prediction value of the target point determined based on the prediction mode is the coordinate value of the target point in a second coordinate system (e.g., a Cartesian coordinate system). In this case, the coordinate prediction value of the target point determined based on the prediction mode in step 21-2 includes the following examples:

[0671] Example 11: If the prediction mode corresponding to the current node is Mode 0, that is, no prediction, the predicted value of the target point in the second coordinate system is (0, 0, 0).

[0672] Example 12: If the prediction mode corresponding to the current node is Mode 1, that is, Delta prediction, the geometric reconstruction value of the parent node of the current node in the second coordinate system is determined as the predicted value of the target point in the second coordinate system.

[0673] Example 13: If the prediction mode corresponding to the current node is Mode 2, that is, Linear prediction, then the predicted value of the target point in the second coordinate system is determined based on the geometric reconstruction value of the parent node of the current node in the second coordinate system and the geometric reconstruction value of the grandparent node of the current node in the second coordinate system.

[0674] Example 14: If the prediction mode corresponding to the current node is Mode 3, that is, Parallelogram prediction, then the predicted value of the target point in the second coordinate system is determined based on the geometric reconstruction value of the parent node of the current node in the second coordinate system, the geometric reconstruction value of the grandparent node of the current node in the second coordinate system, and the geometric reconstruction value of the great-grandfather of the current node in the second coordinate system.

[0675] In some embodiments, if a prediction tree is established based on lidar calibration information, the coordinate prediction value of the target point determined based on the prediction model is the coordinate value of the target point in the first coordinate system (e.g., a cylindrical coordinate system). In this case, the coordinate prediction value of the target point determined based on the prediction model in step 21-2 includes the following examples:

[0676] Example 21: If the prediction mode corresponding to the current node is Mode0, that is, no prediction, the predicted value of the target point in the first coordinate system is where r min The minimum value of the r component after the coordinate transformation of the entire point cloud. If the current node has no parent node, then i prev Set to 0, otherwise it is the cylindrical coordinate component of the parent node.

[0677] Example 22: If the prediction mode corresponding to the current node is Mode 1, that is, Delta prediction, the geometric reconstruction value of the parent node of the current node in the first coordinate system is determined as the predicted value of the target point in the first coordinate system.

[0678] Example 23: If the prediction mode corresponding to the current node is Mode 2, that is, Linear prediction, then the predicted value of the target point in the first coordinate system is determined based on the geometric reconstruction value of the parent node of the current node in the first coordinate system and the geometric reconstruction value of the grandparent node of the current node in the first coordinate system.

[0679] Example 14: If the prediction mode corresponding to the current node is Mode 3, that is, Parallelogram prediction, then the predicted value of the target point in the first coordinate system is determined based on the geometric reconstruction value of the parent node of the current node in the first coordinate system, the geometric reconstruction value of the grandparent node of the current node in the first coordinate system, and the geometric reconstruction value of the great-grandfather of the current node in the first coordinate system.

[0680] Based on the above steps, after the coordinate prediction value of the target point is determined, the following step 22 is executed.

[0681] Step 22: Determine the coordinate residual value of the target point based on the coordinate prediction value of the target point.

[0682] From the above, we can see that due to the different ways of constructing the prediction tree, the coordinate residual values ​​of the determined target points are also different.

[0683] In some embodiments, if the predicted coordinate value of the target point is the predicted coordinate value of the target point in the second coordinate system Then the above step 22 includes the following steps 22-11 and 22-12:

[0684] Step 22-11: Determine the coordinate residual value of the target point in the second coordinate system based on the coordinate prediction value of the target point in the second coordinate system.

[0685] For example, the encoding end determines the coordinate residual value of the target point in the second coordinate system by taking the difference between the coordinate value of the target point in the second coordinate system and the coordinate prediction value.

[0686] In some embodiments, the encoder quantizes the coordinate residual value of the target point in the second coordinate system, and writes the quantized coordinate residual value of the target point in the second coordinate system into the geometry code stream.

[0687] Optionally, the coordinate residual value of the target point in the second coordinate system is also called the coordinate residual value of the current node in the second coordinate system, which is recorded as (r x ,r y ,r z ).

[0688] Step 22-12: Determine the coordinate residual value of the target point in the second coordinate system as the coordinate residual value of the target point.

[0689] Finally, the coordinate residual value of the target point determined above in the second coordinate system is determined as the coordinate residual value of the target point.

[0690] In some embodiments, if the predicted coordinate value of the target point is the predicted coordinate value of the target point in the first coordinate system Then the above step 22 includes the following steps 22-21 to 22-25:

[0691] Step 22-21: Determine a residual value of the target point in the first coordinate system based on the predicted coordinate value of the target point in the first coordinate system and the coordinate value of the target point in the first coordinate system.

[0692] Specifically, first, coordinate transformation is performed based on the coordinate value of the target point in the second coordinate system to obtain the coordinate value of the target point in the first coordinate system. Then, the difference between the coordinate value of the target point in the first coordinate system and the predicted coordinate value of the target point in the first coordinate system is determined as the residual value of the target point in the first coordinate system, for example (r r ,r φ ,r i ).

[0693] Step 22-22: Obtain a coordinate reconstruction value of the target point in the first coordinate system based on the predicted coordinate value of the target point in the first coordinate system.

[0694] In some embodiments, the predicted coordinate value of the target point in the first coordinate system is determined as the reconstructed coordinate value of the target point in the first coordinate system.

[0695] In some embodiments, if the encoding end does not quantize the residual value of the target point in the first coordinate system, the sum of the coordinate prediction value of the target point in the first coordinate system and the unquantized residual value is determined as the coordinate reconstruction value of the target point in the first coordinate system.

[0696] In some embodiments, if the encoding end quantizes the residual value of the target point in the first coordinate system, step 22-22 includes: dequantizing the quantized coordinate residual value of the target point in the first coordinate system to obtain the coordinate residual value of the target point in the first coordinate system; based on the coordinate prediction value and the coordinate residual value of the target point in the first coordinate system, obtaining the coordinate reconstruction value of the target point in the first coordinate system, for example, the sum of the coordinate prediction value and the coordinate residual value of the target point in the first coordinate system is determined as the coordinate reconstruction value of the target point in the first coordinate system.

[0697] Steps 22-23: performing coordinate transformation on the coordinate reconstruction value of the target point in the first coordinate system to obtain the coordinate reconstruction value of the target point in the second coordinate system.

[0698] Steps 22-24: Determine the coordinate residual value of the target point in the second coordinate system based on the coordinate reconstruction value and the coordinate value of the target point in the second coordinate system.

[0699] For example, the difference between the coordinate value of the target point in the second coordinate system and the coordinate reconstruction value is determined as the coordinate residual value of the target point in the second coordinate system, that is, (r x ,r y ,r z ).

[0700] Steps 22-25: Determine the residual value of the target point in the first coordinate system and the coordinate residual value of the target point in the second coordinate system as the coordinate residual value of the target point.

[0701] The above embodiment is described by taking the geometric coding process of the current node in the prediction tree as an example. The coding process of other nodes in the prediction tree may refer to the coding process of the current node.

[0702] In the point cloud encoding method provided in the embodiment of the present application, in the prediction tree-based point cloud encoding, before encoding the current node, a first parameter corresponding to the current node is first determined. This first parameter is used to determine whether the current node includes duplicate points, and then the current node is encoded based on the first parameter. For example, if it is determined based on the first parameter that the current node does not include duplicate points, then when encoding the current node, encoding of the duplicate point information of the current node is skipped. If it is determined based on the first parameter that the current node includes duplicate points, then the duplicate point information of the current node is encoded. This reduces the encoding complexity of the point cloud, saves encoding time, and thus improves encoding efficiency.

[0703] It should be understood that Figures 9 to 10 are merely examples of the present application and should not be construed as limiting the present application.

[0704] 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, a variety of simple modifications can be made to the technical solution of the present application, and these simple modifications all fall within the scope of protection of the present application. For example, the various specific technical features described in the above specific embodiments can be combined in any suitable manner unless there is any 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, and 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.

[0705] It should also be understood that in the various method embodiments of the present application, the size of the sequence numbers of the above-mentioned processes 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 embodiments of the present application. In addition, in the embodiments of the present application, the term "and / or" is merely a description of the association relationship of associated objects, indicating that three types of relationships can 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 related objects before and after are in an "or" relationship.

[0706] The above describes in detail the method embodiment of the present application in conjunction with Figures 9 to 10 , and the following describes in detail the device embodiment of the present application in conjunction with Figures 11 to 14 .

[0707] FIG11 is a schematic block diagram of a point cloud decoding device according to an embodiment of the present application.

[0708] As shown in FIG11 , the point cloud decoding device 10 may include:

[0709] a parameter determination unit 11, configured to determine a first parameter corresponding to a current node, wherein the first parameter is used to determine whether the current node includes a duplicate point, and the current node is a node in a prediction tree of the point cloud;

[0710] The decoding unit 12 is configured to decode the current node based on the first parameter.

[0711] In some embodiments, the parameter determination unit 11 is specifically used to determine the number of nodes in the cache queue to be decoded after the current node is taken out from the cache queue to be decoded and the child nodes of the current node in the prediction tree are placed into the cache queue to be decoded; and the number of nodes in the cache queue to be decoded is determined as the first parameter.

[0712] In some embodiments, the decoding unit 12 is specifically used to decode the geometric code stream of the point cloud to obtain the total number of points in the point cloud; based on the total number of points in the point cloud and the number of currently decoded points, determine the number of undecoded first points in the point cloud, and the decoded points include a point in the current node; based on the number of nodes in the to-be-decoded cache queue and the number of the first points, decode the current node.

[0713] In some embodiments, the decoding unit 12 is specifically used to skip decoding the repeated point information of the current node if the number of nodes in the to-be-decoded cache queue is equal to the number of the first points, and determine the geometric reconstruction value of a point included in the current node.

[0714] In some embodiments, the decoding unit 12 is specifically used to decode the duplicate point information of the current node if the number of nodes in the to-be-decoded cache queue is less than the number of the first points; and determine the geometric reconstruction values ​​of the points included in the current node based on the duplicate point information.

[0715] In some embodiments, the parameter determination unit 11 is specifically used to decode the geometric code stream of the point cloud to obtain the total number of points in the point cloud; determine the number of decoded points in the point cloud before decoding the current node; based on the total number of points in the point cloud and the number of decoded points, obtain the number of undecoded second points in the point cloud; and determine the number of the second points as the first parameter corresponding to the current node.

[0716] In some embodiments, the decoding unit 12 is specifically configured to determine the number of undecoded nodes in the prediction tree before decoding the current node; and decode the current node based on the number of the second points and the number of the undecoded nodes.

[0717] In some embodiments, the decoding unit 12 is specifically used to decode the geometric code stream to obtain the total number of nodes of the prediction tree; determine the number of decoded nodes of the prediction tree before decoding the current node; and obtain the number of undecoded nodes based on the total number of nodes and the number of decoded nodes.

[0718] In some embodiments, the decoding unit 12 is specifically configured to skip decoding the repeated point information of the current node if the number of the second points is equal to the number of the undecoded nodes, and determine the geometric reconstruction value of a point included in the current node.

[0719] In some embodiments, the decoding unit 12 is specifically used to decode the repeated point information of the current node if the number of the second points is greater than the number of the undecoded nodes; and determine the geometric reconstruction values ​​of the points included in the current node based on the repeated point information.

[0720] In some embodiments, the parameter determination unit 11 is specifically configured to determine the number of decoded duplicate points in the point cloud before decoding the current node; and determine the number of decoded duplicate points as the first parameter.

[0721] In some embodiments, the decoding unit 12 is specifically configured to determine the total number of repeated points in the point cloud; and decode the current node based on the number of decoded repeated points and the total number of repeated points in the point cloud.

[0722] 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 repeated points in the point cloud.

[0723] In some embodiments, the decoding unit 12 is specifically used to decode the geometric code stream of the point cloud to obtain the total number of points of the point cloud; decode the geometric code stream to obtain the total number of nodes of the prediction tree; and determine the difference between the total number of points of the point cloud and the total number of nodes of the prediction tree as the total number of repeated points of the point cloud.

[0724] In some embodiments, the decoding unit 12 is specifically used to skip decoding the duplicate point information of the current node if the number of decoded duplicate points is equal to the total number of duplicate points in the point cloud, and determine the geometric reconstruction value of a point included in the current node.

[0725] In some embodiments, the decoding unit 12 is specifically used to decode the duplicate point information of the current node if the number of the decoded duplicate points is less than the total number of duplicate points in the point cloud; and determine the geometric reconstruction value of the points included in the current node based on the duplicate point information.

[0726] In some embodiments, the repeated point information includes the number of repeated points included in the current node, and the decoding unit 12 is specifically used to determine the geometric reconstruction value of the first point in the current node; the geometric reconstruction value of the first point is determined as the geometric reconstruction values ​​of N repeated points included in the current node, where N is a positive integer.

[0727] In some embodiments, the decoding unit 12 is further configured to determine the sum of the number of repeated points included in the current node and the number of decoded repeated points as the new number of decoded repeated points.

[0728] In some embodiments, the decoding unit 12 is also used to determine a coordinate prediction value of a target point, where the target point is a point included in the current node or the first point in the current node; and based on the coordinate prediction value of the target point, determine a geometric reconstruction value of the target point.

[0729] In some embodiments, the decoding unit 12 is specifically configured to determine a prediction mode corresponding to the target point; and determine a coordinate prediction value of the target point based on the prediction mode.

[0730] In some embodiments, the decoding unit 12 is specifically configured to decode the geometric code stream to obtain a prediction mode corresponding to the target point.

[0731] In some embodiments, if the coordinate prediction value of the target point is the coordinate prediction value of the target point in the second coordinate system, the decoding unit 12 is specifically used to decode the geometric code stream of the point cloud to obtain the coordinate residual value of the target point in the second coordinate system; based on the coordinate prediction value and the coordinate residual value of the target point in the second coordinate system, determine the coordinate reconstruction value of the target point in the second coordinate system; and use the coordinate reconstruction value of the target point in the second coordinate system to determine the geometric reconstruction value of the target point.

[0732] In some embodiments, if the coordinate prediction value of the target point is the coordinate prediction value of the target point in the first coordinate system, the decoding unit 12 is specifically used to determine the coordinate reconstruction value of the target point in the first coordinate system based on the coordinate prediction value of the target point in the first coordinate system; determine the coordinate reconstruction value of the target point in the second coordinate system based on the coordinate reconstruction value of the target point in the first coordinate system; and determine the coordinate reconstruction value of the target point in the second coordinate system as the geometric reconstruction value of the target point.

[0733] In some embodiments, the decoding unit 12 is specifically used to decode the geometric code stream to obtain the coordinate residual value of the target point in the first coordinate system; based on the coordinate prediction value and coordinate residual value of the target point in the first coordinate system, obtain the coordinate reconstruction value of the target point in the first coordinate system.

[0734] In some embodiments, the decoding unit 12 is specifically used to perform coordinate conversion on the coordinate reconstruction value of the target point in the first coordinate system to obtain the coordinate value of the target point in the second coordinate system; decode the geometric code stream to obtain the coordinate residual value of the target point in the second coordinate system; and obtain the coordinate reconstruction value of the target point in the second coordinate system based on the coordinate value and coordinate residual value of the target point in the second coordinate system.

[0735] In some embodiments, the decoding unit 12 is specifically configured to decode the geometric data unit of the point cloud to obtain the total number of points in the point cloud.

[0736] In some embodiments, the decoding unit 12 is specifically configured to decode the geometric data unit to obtain a first value, where the first value is the total number of points in the point cloud minus one; and add one to the first value to obtain the total number of points in the point cloud.

[0737] It should be understood that the device embodiments and method embodiments may correspond to each other, and similar descriptions may refer to the method embodiments. To avoid repetition, they will not be described here in detail. Specifically, the point cloud decoding device 10 shown in FIG11 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 the various units in the point cloud decoding device 10 are respectively for implementing the corresponding processes in the point cloud decoding method. For the sake of brevity, they will not be described here in detail.

[0738] Figure 12 is a schematic block diagram of the point cloud encoding device provided in an embodiment of the present application.

[0739] As shown in FIG12 , the point cloud encoding device 20 includes:

[0740] A construction unit 21 is used to determine a prediction tree corresponding to the point cloud;

[0741] a parameter determination unit 22, configured to determine a first parameter corresponding to a current node, wherein the first parameter is used to determine whether the current node includes a duplicate point, and the current node is a node in the prediction tree;

[0742] The encoding unit 23 is configured to encode the current node based on the first parameter.

[0743] In some embodiments, the parameter determination unit 22 is specifically used to determine the number of nodes in the cache queue to be encoded after the current node is taken out from the cache queue to be encoded and the child nodes of the current node in the prediction tree are placed in the cache queue to be encoded; and the number of nodes in the cache queue to be encoded is determined as the first parameter.

[0744] In some embodiments, the encoding unit 23 is specifically used to determine the total number of points in the point cloud; based on the total number of points in the point cloud and the number of currently encoded points, determine the number of unencoded first points in the point cloud, and the encoded points include a point in the current node; based on the number of nodes in the to-be-encoded cache queue and the number of the first points, encode the current node.

[0745] In some embodiments, the encoding unit 23 is specifically used to skip encoding the repeated point information of the current node if the number of nodes in the to-be-encoded cache queue is equal to the number of the first points; determine the coordinate residual value of a point included in the current node, and write the coordinate residual value of the point into the geometric code stream of the point cloud.

[0746] In some embodiments, the encoding unit 23 is specifically used to determine the duplicate point information of the current node if the number of nodes in the to-be-encoded cache queue is less than the number of the first points; determine the coordinate residual value of the first point in the current node; and write the coordinate residual value of the first point and the duplicate point information of the current node into the geometric code stream.

[0747] In some embodiments, the parameter determination unit 22 is specifically used to determine the total number of points in the point cloud; determine the number of encoded points in the point cloud before encoding the current node; obtain the number of unencoded second points in the point cloud based on the total number of points in the point cloud and the number of encoded points; and determine the number of the second points as the first parameter corresponding to the current node.

[0748] In some embodiments, the encoding unit 23 is specifically configured to determine the number of unencoded nodes in the prediction tree before encoding the current node; and encode the current node based on the number of the second points and the number of the unencoded nodes.

[0749] In some embodiments, the encoding unit 23 is specifically used to determine the total number of nodes in the prediction tree; determine the number of encoded nodes in the prediction tree before encoding the current node; and obtain the number of unencoded nodes based on the total number of nodes and the number of encoded nodes.

[0750] In some embodiments, the encoding unit 23 is specifically used to skip encoding the repeated point information of the current node if the number of the second points is equal to the number of the unencoded nodes; determine the coordinate residual value of a point included in the current node, and write the coordinate residual value of the point into the geometric code stream of the point cloud.

[0751] In some embodiments, the encoding unit 23 is specifically used to determine the duplicate point information of the current node if the number of the second points is greater than the number of the unencoded nodes; determine the coordinate residual value of the first point in the current node; and write the coordinate residual value of the first point and the duplicate point information of the current node into the geometric code stream.

[0752] In some embodiments, the encoding unit 23 is further configured to write the total number of nodes of the prediction tree into the geometry code stream.

[0753] In some embodiments, the parameter determination unit 22 is specifically configured to determine the number of encoded repeated points in the point cloud before encoding the current node; and determine the number of encoded repeated points as the first parameter.

[0754] In some embodiments, the encoding unit 23 is specifically configured to determine the total number of repeated points in the point cloud; and encode the current node based on the number of encoded repeated points and the total number of repeated points in the point cloud.

[0755] In some embodiments, the encoding unit 23 is specifically used to determine the total number of points in the point cloud; determine the total number of nodes in the prediction tree; and determine the difference between the total number of points in the point cloud and the total number of nodes in the prediction tree as the total number of repeated points in the point cloud.

[0756] In some embodiments, the encoding unit 23 is specifically used to skip encoding the duplicate point information of the current node if the number of the encoded duplicate points is equal to the total number of duplicate points in the point cloud; determine the coordinate residual value of a point included in the current node, and write the coordinate residual value of the point into the geometric code stream of the point cloud.

[0757] In some embodiments, the encoding unit 23 is specifically used to determine the duplicate point information of the current node if the number of the encoded duplicate points is less than the total number of duplicate points in the point cloud; determine the coordinate residual value of the first point in the current node; and write the coordinate residual value of the first point and the duplicate point information of the current node into the geometric code stream.

[0758] In some embodiments, the encoding unit 23 is further configured to write the total number of repeated points of the point cloud into the geometry code stream.

[0759] In some embodiments, the repeated point information includes the number of repeated points included in the current node.

[0760] In some embodiments, the encoding unit 23 is further configured to determine the sum of the number of repeated points included in the current node and the number of encoded repeated points as the new number of encoded repeated points.

[0761] In some embodiments, the encoding unit 23 is also used to determine a coordinate prediction value of a target point, where the target point is a point included in the current node or the first point in the current node; and based on the coordinate prediction value of the target point, determine a coordinate residual value of the target point.

[0762] In some embodiments, the encoding unit 23 is specifically configured to determine a prediction mode corresponding to the target point; and determine a coordinate prediction value of the target point based on the prediction mode.

[0763] In some embodiments, the encoding unit 23 is further configured to write the prediction mode corresponding to the target point into the geometric code stream.

[0764] In some embodiments, if the coordinate prediction value of the target point is the coordinate prediction value of the target point in the second coordinate system, the encoding unit 23 is specifically used to determine the coordinate residual value of the target point in the second coordinate system based on the coordinate prediction value of the target point in the second coordinate system; and determine the coordinate residual value of the target point in the second coordinate system as the coordinate residual value of the target point.

[0765] In some embodiments, if the coordinate prediction value of the target point is the coordinate prediction value of the target point in the first coordinate system, the encoding unit 23 is specifically used to determine the residual value of the target point in the first coordinate system based on the coordinate prediction value of the target point in the first coordinate system and the coordinate value of the target point in the first coordinate system; obtain the coordinate reconstruction value of the target point in the first coordinate system based on the coordinate prediction value of the target point in the first coordinate system; perform coordinate conversion on the coordinate reconstruction value of the target point in the first coordinate system to obtain the coordinate reconstruction value of the target point in the second coordinate system; determine the coordinate residual value of the target point in the second coordinate system based on the coordinate reconstruction value and coordinate value of the target point in the second coordinate system; and determine the residual value of the target point in the first coordinate system and the coordinate residual value of the target point in the second coordinate system as the coordinate residual value of the target point.

[0766] In some embodiments, the encoding unit 23 is specifically used to dequantize the quantized coordinate residual value of the target point in the first coordinate system to obtain the coordinate residual value of the target point in the first coordinate system; based on the coordinate prediction value and coordinate residual value of the target point in the first coordinate system, obtain the coordinate reconstruction value of the target point in the first coordinate system.

[0767] In some embodiments, the encoding unit 23 is further configured to write the total number of points of the point cloud into the geometric code stream of the point cloud.

[0768] In some embodiments, the encoding unit 23 is specifically configured to write the total number of points in the point cloud into the geometry data unit.

[0769] In some embodiments, the encoding unit 23 is specifically configured to subtract 1 from the total number of points in the point cloud to obtain a first value; and write the first value into the geometric data unit.

[0770] 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 coding device 20 shown in FIG12 may correspond to the corresponding subject in the point cloud coding method of the embodiment of the present application, and the aforementioned and other operations and / or functions of each unit in the point cloud coding device 20 are respectively for implementing the corresponding processes in the point cloud coding method. For the sake of brevity, no further description is given here.

[0771] The above describes the apparatus and system of the embodiment of the present application from the perspective of functional units in conjunction with the accompanying drawings. It should be understood that the functional unit can be implemented in the form of hardware, can be implemented by instructions in the form of software, or can 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 instructions in the processor, and the steps of the method disclosed in the embodiment of the present application can be directly embodied as being executed by a hardware decoding processor, or can be executed by a combination of hardware and software units in the decoding processor. Optionally, the software unit can be located in a mature storage medium in the art 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 the memory, and the processor reads the information in the memory and completes the steps in the above method embodiment in conjunction with its hardware.

[0772] FIG13 is a schematic block diagram of an electronic device provided in an embodiment of the present application.

[0773] As shown in FIG13 , 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. The electronic device 30 may include:

[0774] The memory 33 and the processor 32 are configured to store a 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.

[0775] For example, the processor 32 may be configured to execute the steps of the method 200 according to the instructions in the computer program 34 .

[0776] In some embodiments of the present application, the processor 32 may include but is not limited to:

[0777] General-purpose processor, Digital Signal Processor (DSP), Application Specific Integrated Circuit (ASIC), Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, etc.

[0778] In some embodiments of the present application, the memory 33 includes but is not limited to:

[0779] Volatile memory and / or non-volatile memory. 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. 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 random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (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 (DR RAM).

[0780] 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 implement the method provided by the present application. The one or more units may be a series of computer program instruction segments capable of implementing specific functions, and the instruction segments are used to describe the execution process of the computer program 34 in the electronic device 30.

[0781] As shown in FIG13 , the electronic device 30 may further include:

[0782] The transceiver 33 may be connected to the processor 32 or the memory 33 .

[0783] The processor 32 can control the transceiver 33 to communicate with other devices. Specifically, it can send information or data to other devices or 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.

[0784] 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.

[0785] Figure 14 is a schematic block diagram of the point cloud encoding and decoding system provided in an embodiment of the present application.

[0786] As shown in Figure 14, 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.

[0787] The present application also provides a code stream, which is generated according to the above encoding method.

[0788] The present application also provides a computer storage medium having a computer program stored thereon, which, when executed by a computer, enables the computer to perform the method of the above-mentioned method embodiment. In other words, the present application also provides a computer program product containing instructions, which, when executed by a computer, enables the computer to perform the method of the above-mentioned method embodiment.

[0789] When implemented using software, 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 device. 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 one website, computer, server or data center to another website, computer, server or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. 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 (DVD)), or a semiconductor medium (e.g., a solid state drive (SSD)).

[0790] 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 beyond the scope of this application.

[0791] In the several embodiments provided in this 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 merely schematic. For example, the division of the unit is only a logical function division. In actual implementation, there may be other division methods, 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.

[0792] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment. For example, the functional units in the various embodiments 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.

[0793] The above content is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.

Claims

1. A point cloud decoding method, characterized in that: include: Determine a first parameter corresponding to a current node, where the first parameter is used to determine whether the current node includes duplicate points, and the current node is a node in a prediction tree of the point cloud; The current node is decoded based on the first parameter.

2. The method according to claim 1, characterized in that The determining of the first parameter corresponding to the current node includes: Determining the number of nodes in the to-be-decoded cache queue after taking the current node from the to-be-decoded cache queue and placing the child nodes of the current node in the prediction tree into the to-be-decoded cache queue; The number of nodes in the to-be-decoded cache queue is determined as the first parameter.

3. The method according to claim 2, characterized in that The decoding of the current node based on the first parameter includes: Decoding the geometric code stream of the point cloud to obtain the total number of points in the point cloud; determining the number of undecoded first points in the point cloud based on the total number of points in the point cloud and the number of currently decoded points, the decoded points including a point in the current node; The current node is decoded based on the number of nodes in the to-be-decoded cache queue and the number of the first points.

4. The method according to claim 3, characterized in that The decoding of the current node based on the number of nodes in the to-be-decoded cache queue and the number of the first points includes: If the number of nodes in the to-be-decoded cache queue is equal to the number of the first points, skip decoding the repeated point information of the current node and determine a geometric reconstruction value of a point included in the current node.

5. The method according to claim 3, characterized in that The decoding of the current node based on the number of nodes in the to-be-decoded cache queue and the number of the first points includes: If the number of nodes in the to-be-decoded cache queue is less than the number of the first points, decoding the repeated point information of the current node; Based on the repeated point information, a geometric reconstruction value of the point included in the current node is determined.

6. The method according to claim 1, wherein The determining of the first parameter corresponding to the current node includes: Decoding the geometric code stream of the point cloud to obtain the total number of points in the point cloud; Determining the number of decoded points in the point cloud before decoding the current node; Obtaining a number of undecoded second points in the point cloud based on a total number of points in the point cloud and the number of decoded points; The number of the second points is determined as the first parameter corresponding to the current node.

7. The method according to claim 6, characterized in that The decoding of the current node based on the first parameter includes: Determining the number of undecoded nodes in the prediction tree before decoding the current node; The current node is decoded based on the number of the second points and the number of the undecoded nodes.

8. The method according to claim 7, characterized in that Determining the number of undecoded nodes in the prediction tree includes: Decoding the geometric code stream to obtain the total number of nodes in the prediction tree; Determining the number of nodes decoded by the prediction tree before decoding the current node; The number of undecoded nodes is obtained based on the total number of nodes and the number of decoded nodes.

9. The method according to claim 7, characterized in that The decoding of the current node based on the number of the second points and the number of the undecoded nodes includes: If the number of the second points is equal to the number of the undecoded nodes, decoding of the repeated point information of the current node is skipped, and a geometric reconstruction value of a point included in the current node is determined.

10. The method according to claim 7, characterized in that The decoding of the current node based on the number of the second points and the number of the undecoded nodes includes: If the number of the second points is greater than the number of the undecoded nodes, decoding the repeated point information of the current node; Based on the repeated point information, a geometric reconstruction value of the point included in the current node is determined.

11. The method according to claim 1, wherein The determining of the first parameter corresponding to the current node includes: Determining the number of decoded duplicate points in the point cloud before decoding the current node; The number of the decoded repeated points is determined as the first parameter.

12. The method according to claim 11, characterized in that The decoding of the current node based on the first parameter includes: determining a total number of duplicate points in the point cloud; The current node is decoded based on the number of the decoded duplicate points and the total number of duplicate points in the point cloud.

13. The method according to claim 12, characterized in that Determining the total number of repeated points in the point cloud includes: Decode the geometric code stream of the point cloud to obtain the total number of repeated points in the point cloud.

14. The method according to claim 12, characterized in that Determining the total number of repeated points in the point cloud includes: Decoding the geometric code stream of the point cloud to obtain the total number of points in the point cloud; Decoding the geometric code stream to obtain the total number of nodes in the prediction tree; The difference between the total number of points in the point cloud and the total number of nodes in the prediction tree is determined as the total number of repeated points in the point cloud.

15. The method according to claim 12, characterized in that The decoding of the current node based on the number of the decoded repeated points and the total number of repeated points in the point cloud includes: If the number of the decoded duplicate points is equal to the total number of duplicate points in the point cloud, then decoding of the duplicate point information of the current node is skipped, and a geometric reconstruction value of a point included in the current node is determined.

16. The method according to claim 12, characterized in that The decoding of the current node based on the number of the decoded repeated points and the total number of repeated points in the point cloud includes: If the number of the decoded duplicate points is less than the total number of duplicate points in the point cloud, decoding the duplicate point information of the current node; Based on the repeated point information, a geometric reconstruction value of the point included in the current node is determined.

17. The method according to claim 5, 10 or 16, characterized in that The repeated point information includes the number of repeated points included in the current node, and determining the geometric reconstruction value of the point included in the current node based on the repeated point information includes: Determine the geometric reconstruction value of the first point in the current node; The geometric reconstruction value of the first point is determined as the geometric reconstruction values ​​of N repeated points included in the current node, where N is a positive integer.

18. The method according to claim 17, characterized in that The method further comprises: The sum of the number of repeated points included in the current node and the number of decoded repeated points is determined as the new number of decoded repeated points.

19. The method according to any one of claims 4, 5, 9, 15 or 17, wherein: The method further comprises: Determine a coordinate prediction value of a target point, where the target point is a point included in the current node or the first point in the current node; Based on the predicted coordinate value of the target point, a geometric reconstruction value of the target point is determined.

20. The method according to claim 19, wherein Determining the predicted coordinate value of the target point includes: Determining a prediction mode corresponding to the target point; Based on the prediction mode, a coordinate prediction value of the target point is determined.

21. The method according to claim 20, characterized in that Determining the prediction mode corresponding to the target point includes: The geometric code stream is decoded to obtain a prediction mode corresponding to the target point.

22. The method according to claim 19, wherein If the predicted coordinate value of the target point is a predicted coordinate value of the target point in the second coordinate system, determining the geometric reconstruction value of the target point based on the predicted coordinate value of the target point includes: Decoding the geometric code stream of the point cloud to obtain a coordinate residual value of the target point in the second coordinate system; Determining a coordinate reconstruction value of the target point in the second coordinate system based on a coordinate prediction value and a coordinate residual value of the target point in the second coordinate system; The coordinates of the target point in the second coordinate system are reconstructed to determine the geometric reconstruction value of the target point.

23. The method according to claim 19, wherein If the predicted coordinate value of the target point is a predicted coordinate value of the target point in the first coordinate system, determining the geometric reconstruction value of the target point based on the predicted coordinate value of the target point includes: Determining a coordinate reconstruction value of the target point in the first coordinate system based on the predicted coordinate value of the target point in the first coordinate system; Determining a coordinate reconstruction value of the target point in a second coordinate system based on the coordinate reconstruction value of the target point in the first coordinate system; The coordinate reconstruction value of the target point in the second coordinate system is determined as the geometric reconstruction value of the target point.

24. The method according to claim 23, wherein The determining, based on the predicted coordinate value of the target point in the first coordinate system, a coordinate reconstruction value of the target point in the first coordinate system includes: Decoding the geometric code stream to obtain a coordinate residual value of the target point in the first coordinate system; Based on the coordinate prediction value and the coordinate residual value of the target point in the first coordinate system, a coordinate reconstruction value of the target point in the first coordinate system is obtained.

25. The method according to claim 23, characterized in that The determining, based on the coordinate reconstruction value of the target point in the first coordinate system, the coordinate reconstruction value of the target point in the second coordinate system includes: Performing coordinate transformation on the coordinate reconstruction value of the target point in the first coordinate system to obtain the coordinate value of the target point in the second coordinate system; Decoding the geometric code stream to obtain a coordinate residual value of the target point in the second coordinate system; Based on the coordinate value and the coordinate residual value of the target point in the second coordinate system, a coordinate reconstruction value of the target point in the second coordinate system is obtained.

26. The method according to any one of claims 3, 6 or 14, characterized in that: Decoding the geometric code stream of the point cloud to obtain the total number of points in the point cloud includes: Decode the geometric data unit of the point cloud to obtain the total number of points in the point cloud.

27. The method according to claim 26, characterized in that The decoding of the geometric data unit to obtain the total number of points in the point cloud includes: Decoding the geometric data unit to obtain a first value, where the first value is a total number of points in the point cloud minus one; Add one to the first value to obtain the total number of points in the point cloud.

28. A point cloud coding method, characterized in that: include: Determine the prediction tree corresponding to the point cloud; Determine a first parameter corresponding to a current node, where the first parameter is used to determine whether the current node includes a duplicate point, and the current node is a node in the prediction tree; The current node is encoded based on the first parameter.

29. The method according to claim 28, characterized in that The determining of the first parameter corresponding to the current node includes: Determining the number of nodes in the to-be-encoded cache queue after taking the current node from the to-be-encoded cache queue and placing the child nodes of the current node in the prediction tree into the to-be-encoded cache queue; The number of nodes in the to-be-encoded cache queue is determined as the first parameter.

30. The method according to claim 29, wherein The encoding of the current node based on the first parameter includes: Determining the total number of points in the point cloud; Determining the number of uncoded first points in the point cloud based on the total number of points in the point cloud and the number of currently coded points, wherein the coded points include a point in the current node; The current node is encoded based on the number of nodes in the to-be-encoded cache queue and the number of the first points.

31. The method according to claim 30, wherein The encoding of the current node based on the number of nodes in the to-be-encoded cache queue and the number of the first points includes: If the number of nodes in the to-be-encoded cache queue is equal to the number of the first points, skip encoding the repeated point information of the current node; A coordinate residual value of a point included in the current node is determined, and the coordinate residual value of the point is written into a geometric code stream of the point cloud.

32. The method according to claim 30, wherein The encoding of the current node based on the number of nodes in the to-be-encoded cache queue and the number of the first points includes: If the number of nodes in the to-be-encoded cache queue is less than the number of the first points, determining duplicate point information of the current node; Determine the coordinate residual value of the first point in the current node; The coordinate residual value of the first point and the repeated point information of the current node are written into the geometry code stream.

33. The method according to claim 28, wherein The determining of the first parameter corresponding to the current node includes: Determining the total number of points in the point cloud; Determining the number of encoded points in the point cloud before encoding the current node; Determining the number of uncoded second points in the point cloud based on the total number of points in the point cloud and the number of coded points; The number of the second points is determined as the first parameter corresponding to the current node.

34. The method according to claim 33, wherein The encoding of the current node based on the first parameter includes: Determining the number of uncoded nodes in the prediction tree before coding the current node; The current node is encoded based on the number of the second points and the number of the unencoded nodes.

35. The method according to claim 34, wherein Determining the number of uncoded nodes in the prediction tree includes: Determining the total number of nodes in the prediction tree; Determining the number of nodes that have been encoded in the prediction tree before encoding the current node; The number of the uncoded nodes is obtained based on the total number of nodes and the number of the coded nodes.

36. The method according to claim 34, wherein The encoding of the current node based on the number of the second points and the number of the unencoded nodes includes: If the number of the second points is equal to the number of the uncoded nodes, skip encoding the repeated point information of the current node; A coordinate residual value of a point included in the current node is determined, and the coordinate residual value of the point is written into a geometric code stream of the point cloud.

37. The method according to claim 34, wherein The encoding of the current node based on the number of the second points and the number of the unencoded nodes includes: If the number of the second points is greater than the number of the uncoded nodes, determining the duplicate point information of the current node; Determine the coordinate residual value of the first point in the current node; The coordinate residual value of the first point and the repeated point information of the current node are written into the geometry code stream.

38. The method according to claim 35, characterized in that The method further comprises: The total number of nodes of the prediction tree is written into the geometry code stream.

39. The method according to claim 28, wherein The determining of the first parameter corresponding to the current node includes: Determining the number of duplicate points that have been encoded in the point cloud before encoding the current node; The number of the encoded repeated points is determined as the first parameter.

40. The method according to claim 39, wherein The encoding of the current node based on the first parameter includes: determining a total number of duplicate points in the point cloud; The current node is encoded based on the number of the encoded repeated points and the total number of repeated points in the point cloud.

41. The method according to claim 40, wherein Determining the total number of repeated points in the point cloud includes: Determining the total number of points in the point cloud; Determining the total number of nodes in the prediction tree; The difference between the total number of points in the point cloud and the total number of nodes in the prediction tree is determined as the total number of repeated points in the point cloud.

42. The method according to claim 40, wherein The encoding of the current node based on the number of the encoded repeated points and the total number of repeated points in the point cloud includes: If the number of the encoded duplicate points is equal to the total number of duplicate points in the point cloud, then skip encoding the duplicate point information of the current node; A coordinate residual value of a point included in the current node is determined, and the coordinate residual value of the point is written into a geometric code stream of the point cloud.

43. The method according to claim 40, wherein The encoding of the current node based on the number of the encoded repeated points and the total number of repeated points in the point cloud includes: If the number of the encoded duplicate points is less than the total number of duplicate points in the point cloud, determining duplicate point information of the current node; Determine the coordinate residual value of the first point in the current node; The coordinate residual value of the first point and the repeated point information of the current node are written into the geometry code stream.

44. The method according to claim 40, wherein The method further comprises: The total number of repeated points of the point cloud is written into the geometry code stream.

45. The method according to claim 32, 37 or 43, wherein: The repeated point information includes the number of repeated points included in the current node.

46. ​​The method according to claim 45, characterized in that The method further comprises: The sum of the number of repeated points included in the current node and the number of encoded repeated points is determined as the new number of encoded repeated points.

47. The method of any one of claims 31, 32, 38, 37, 42 or 43, wherein: The method further comprises: Determine a coordinate prediction value of a target point, where the target point is a point included in the current node or the first point in the current node; Based on the predicted coordinate value of the target point, a coordinate residual value of the target point is determined.

48. The method according to claim 47, wherein Determining the predicted coordinate value of the target point includes: Determining a prediction mode corresponding to the target point; Based on the prediction mode, a coordinate prediction value of the target point is determined.

49. The method according to claim 48, characterized in that The method further comprises: The prediction mode corresponding to the target point is written into the geometric code stream.

50. The method according to claim 47, wherein If the coordinate prediction value of the target point is the coordinate prediction value of the target point in the second coordinate system, determining the coordinate residual value of the target point based on the coordinate prediction value of the target point includes: Determining a coordinate residual value of the target point in the second coordinate system based on a predicted coordinate value of the target point in the second coordinate system; The coordinate residual value of the target point in the second coordinate system is determined as the coordinate residual value of the target point.

51. The method according to claim 47, wherein If the predicted coordinate value of the target point is the predicted coordinate value of the target point in the first coordinate system, determining the coordinate residual value of the target point based on the predicted coordinate value of the target point includes: Determining a residual value of the target point in the first coordinate system based on a predicted coordinate value of the target point in the first coordinate system and a coordinate value of the target point in the first coordinate system; Obtaining a coordinate reconstruction value of the target point in the first coordinate system based on the predicted coordinate value of the target point in the first coordinate system; Performing coordinate transformation on the coordinate reconstruction value of the target point in the first coordinate system to obtain the coordinate reconstruction value of the target point in the second coordinate system; Determining a coordinate residual value of the target point in the second coordinate system based on a coordinate reconstruction value and a coordinate value of the target point in the second coordinate system; The residual value of the target point in the first coordinate system and the coordinate residual value of the target point in the second coordinate system are determined as the coordinate residual value of the target point.

52. The method according to claim 51, characterized in that The determining, based on the predicted coordinate value of the target point in the first coordinate system, a coordinate reconstruction value of the target point in the first coordinate system includes: Dequantizing the quantized coordinate residual value of the target point in the first coordinate system to obtain the coordinate residual value of the target point in the first coordinate system; Based on the coordinate prediction value and the coordinate residual value of the target point in the first coordinate system, a coordinate reconstruction value of the target point in the first coordinate system is obtained.

53. The method according to any one of claims 30, 33 or 41, 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.

54. The method according to claim 53, wherein Writing the total number of points of the point cloud into the geometric code stream of the point cloud includes: The total number of points in the point cloud is written into the geometric data unit.

55. The method according to claim 54, characterized in that Writing the total number of points of the point cloud into the geometric data unit includes: Subtract 1 from the total number of points in the point cloud to obtain a first value; The first value is written into the geometry data element.

56. A point cloud encoding device, characterized in that include: a parameter determination unit, configured to determine a first parameter corresponding to a current node, the first parameter being used to determine whether the current node includes a duplicate point, the current node being a node in a prediction tree of the point cloud; A decoding unit is used to decode the current node based on the first parameter.

57. A point cloud encoding device, characterized in that include: Construction unit, used to determine the prediction tree corresponding to the point cloud; a parameter determination unit, configured to determine a first parameter corresponding to a current node, wherein the first parameter is used to determine whether the current node includes a duplicate point, and the current node is a node in the prediction tree; An encoding unit, configured to encode the current node based on the first parameter.

58. An electronic device, characterized in that: include: processor and memory; The memory is used to store computer programs; The processor is configured to call and run the computer program stored in the memory to execute the method according to any one of claims 1 to 27 or 28 to 55.

59. A computer-readable storage medium, characterized in that Used to store a computer program, wherein the computer program causes a computer to execute the method according to any one of claims 1 to 27 or 28 to 55.