Point cloud attribute encoding method and apparatus, point cloud attribute decoding method and apparatus, device, storage medium, and program product
Patent Information
- Application Number
- PCT/CN2025/080517
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-03-04
- Filing Date
- 2025-03-04
- Publication Date
- 2025-10-02
AI Technical Summary
In the existing technology, there is a problem of attribute prediction of duplicate points in point cloud data, which leads to low coding efficiency.
By determining the attribute prediction mode of the current point, including the attribute prediction mode based on the previous point and K neighboring points, the attribute information of the current point is predicted and encoded, thereby achieving accurate prediction and encoding of repeated points.
The encoding and decoding performance of point cloud data is improved, and the prediction accuracy and encoding efficiency of attribute information of repeated points are improved.
Smart Images

Figure CN2025080517_02102025_PF_FP_ABST
Abstract
Description
Point cloud attribute encoding and decoding method, device, equipment, storage medium and program product
[0001] Priority information
[0002] This application claims priority to the Chinese patent application filed with the China Patent Office on March 4, 2024, with application number 2024102472509 and invention name “Point cloud attribute encoding and decoding method, device, and apparatus”, the entire contents of which are incorporated by reference into this application. Technical Field
[0003] The embodiments of the present application relate to the field of point cloud encoding and decoding technology, and in particular to a point cloud attribute encoding and decoding method, apparatus, device, storage medium, and program product. Background Art
[0004] The surface of an object is captured by a collection device to form point cloud data, which includes hundreds of thousands or even more points. Such a large amount of data poses a challenge to the transmission of point cloud data, so the point cloud data needs to be compressed before transmission.
[0005] Point cloud data compression, also known as encoding, mainly includes the encoding of location information and attribute information. When encoding attribute information, prediction is used to reduce or eliminate redundant information in the point cloud data.
[0006] There are duplicate points in point cloud data. How to predict the attributes of duplicate points has become a technical problem that needs to be solved urgently by technicians in this field. Summary of the Invention
[0007] The present application provides a point cloud attribute encoding and decoding method, apparatus, device, storage medium and program product, which can predict and encode the attribute information of repeated points in point cloud data.
[0008] In a first aspect, the present application provides a point cloud attribute decoding method, applied to a processor device, the method comprising:
[0009] If the current point whose attribute is to be decoded is a repeated point in the current point cloud, an attribute prediction mode of the current point is determined, where the attribute prediction mode includes at least one of an attribute prediction mode based on a previous point and an attribute prediction mode based on K neighboring points. The previous point is an attribute-decoded point that precedes the current point in the attribute decoding order of the current point cloud, and the K neighboring points are the K attribute-decoded points that are the nearest neighbors of the current point, where K is a positive integer.
[0010] Predicting the attribute information of the current point based on the attribute prediction mode of the current point to obtain the attribute prediction value of the current point;
[0011] Based on the attribute prediction value of the current point, a reconstructed attribute value of the current point is determined.
[0012] In a second aspect, the present application provides a point cloud attribute encoding method, applied to a processor device, the method comprising:
[0013] If a current point in a current point cloud whose attribute information is to be encoded is a repeated point in the current point cloud, determining an attribute prediction mode for the current point, the attribute prediction mode including at least one of an attribute prediction mode based on a preceding point and an attribute prediction mode based on K neighboring points, the preceding point being an attribute-encoded point preceding the current point in the attribute encoding order of the current point cloud, the K neighboring points being K attribute-encoded points nearest to the current point, where K is a positive integer;
[0014] Predicting the attribute information of the current point based on the attribute prediction mode of the current point to obtain the attribute prediction value of the current point;
[0015] Based on the attribute prediction value of the current point, the attribute information of the current point is encoded to obtain a code stream.
[0016] In a third aspect, a point cloud attribute decoding device is provided, which is applied to a processor device, and the method includes:
[0017] a prediction mode determination unit, configured to determine an attribute prediction mode for the current point if the current point whose attributes are to be decoded is a repeated point in the current point cloud, the attribute prediction mode comprising at least one of an attribute prediction mode based on a preceding point and an attribute prediction mode based on K neighboring points, the preceding point being an attribute-decoded point preceding the current point in the attribute decoding order of the current point cloud, the K neighboring points being K attribute-decoded points nearest to the current point, where K is a positive integer;
[0018] A prediction unit, configured to predict attribute information of the current point based on an attribute prediction mode of the current point to obtain an attribute prediction value of the current point;
[0019] The reconstruction unit is configured to determine a property reconstruction value of the current point based on the property prediction value of the current point.
[0020] In a fourth aspect, a point cloud attribute encoding device is provided, which is applied to a processor device, and the method includes:
[0021] a prediction mode determining unit, configured to determine, if a current point in a current point cloud whose attribute information is to be encoded is a repeated point in the current point cloud, an attribute prediction mode for the current point, the attribute prediction mode comprising at least one of an attribute prediction mode based on a preceding point and an attribute prediction mode based on K neighboring points, the preceding point being an attribute-encoded point preceding the current point in an attribute encoding order of the current point cloud, the K neighboring points being K attribute-decoded points nearest to the current point, where K is a positive integer;
[0022] A prediction unit, configured to predict attribute information of the current point based on an attribute prediction mode of the current point to obtain an attribute prediction value of the current point;
[0023] The encoding unit is configured to encode the attribute information of the current point based on the attribute prediction value of the current point to obtain a code stream.
[0024] In a fifth aspect, an encoding device is provided, comprising a processor and a memory, wherein 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 execute the method of each implementation of the first aspect.
[0025] In a sixth aspect, a decoding device is provided, comprising a processor and a memory, wherein 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 execute the method of the second aspect or its respective implementations.
[0026] In a seventh 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.
[0027] In an eighth aspect, a computer-readable storage medium is provided for storing a computer program, wherein the computer program enables a computer to execute the decoding method of the first aspect or the encoding method of the second aspect to generate and store a code stream.
[0028] In a ninth aspect, a computer program product is provided, comprising computer program instructions, wherein the computer program instructions enable a computer to execute the method of any one of the first to second aspects or their respective implementations.
[0029] In a tenth 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.
[0030] In summary, in the present application, if the current point is a repeated point in the current point cloud, the processor device determines the attribute prediction mode of the current point, wherein the attribute prediction mode includes at least one of the attribute prediction mode based on the previous point and the attribute prediction mode based on K neighboring points, wherein the previous point is the attribute decoded point that precedes the current point in the attribute decoding order of the current point cloud, and the K neighboring points are the K attribute decoded points of the nearest neighbors of the current point, and K is a positive integer; then, the processor device predicts the attribute information of the current point based on the attribute prediction mode of the current point to obtain the attribute prediction value of the current point; and then determines the attribute reconstruction value of the current point based on the attribute prediction value of the current point. It can be seen from this that if the current point is a repeated point, the embodiment of the present application determines the attribute prediction mode of the current point based on the attribute prediction mode of the previous point of the current point and the attribute prediction mode based on the K neighboring points of the current point, which can achieve accurate prediction of the attribute prediction mode of the current point, and then accurately predict the attribute information of the current point based on the accurately determined attribute prediction mode, and then achieve prediction and encoding and decoding of the attribute information of the repeated point, thereby improving the attribute encoding and decoding performance of the point cloud. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0032] FIG1 is a schematic block diagram of a point cloud video encoding and decoding system according to an embodiment of the present application;
[0033] FIG2 is a schematic block diagram of a coding framework provided in an embodiment of the present application;
[0034] FIG3 is a schematic block diagram of a decoding framework provided in an embodiment of the present application;
[0035] FIG4 is a schematic diagram showing the principle of a prediction transformation tree;
[0036] FIG5 is a flowchart of a point cloud attribute decoding method according to an embodiment of the present application;
[0037] FIG6 is a flowchart of a point cloud attribute encoding method according to an embodiment of the present application;
[0038] FIG7 is a schematic block diagram of a device for predicting a point cloud attribute according to an embodiment of the present application;
[0039] FIG8 is a schematic block diagram of a device for predicting a point cloud attribute according to an embodiment of the present application;
[0040] FIG9 is a schematic block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0041] The following will be combined with the accompanying drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0042] It should be noted that the terms "first," "second," and the like in the specification and claims of this application and the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In an embodiment of the present invention, "B corresponding to A" means that B is associated with A. In one implementation, B can be determined based on A. However, it should also be understood that determining B based on A does not mean determining B solely based on A; B can also be determined based on A and / or other information. In addition, the terms "including" and "having," and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or server that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units that are not explicitly listed or that are inherent to these processes, methods, products, or devices. In the description of this application, unless otherwise specified, "plurality" means two or more than two.
[0043] The point cloud data encoding and decoding method provided in the embodiment of the present application can be applied to various fields such as point cloud transmission, video playback, point cloud encoding and decoding, etc., and can accurately predict and encode the attribute information of repeated points in point cloud data, thereby improving the encoding and decoding effect of point cloud data.
[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] Point Cloud refers to a set of irregularly distributed discrete points in space that express the spatial structure and surface properties of a three-dimensional object or three-dimensional scene.
[0046] Point cloud data is a specific record format of a point cloud. Points in a point cloud can include both their location information and their attribute information. For example, the location information of a point can be its three-dimensional coordinate information. The location information of a point can also be referred to as its geometric information. For example, the attribute information of a point can include color information and / or reflectivity, among others. For example, the color information can be information in any color space. For example, the color information can be (RGB). For another example, the color information can be 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, in a point cloud obtained using laser measurement principles, the points in the point cloud can include their three-dimensional coordinate information and the laser reflection intensity (reflectance) of the points. For another example, in a point cloud obtained using photogrammetry principles, the points in the point cloud can include their three-dimensional coordinate information and their color information. For another example, a point cloud is obtained by combining the principles of laser measurement and photogrammetry. A point in the point cloud may include three-dimensional coordinate information of the point, laser reflection intensity (reflectance) of the point, and color information of the point.
[0047] 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.
[0048] Point clouds can be divided into dense point clouds and sparse point clouds according to the acquisition method.
[0049] Point clouds are divided into the following types according to the time series of the data:
[0050] First, static point cloud: the object is stationary and the device that obtains the point cloud is also stationary;
[0051] The second type of dynamic point cloud: the object is moving, but the device that obtains the point cloud is stationary;
[0052] The third type of dynamic point cloud acquisition: the device that acquires the point cloud is moving.
[0053] Point clouds are divided into two categories according to their uses:
[0054] 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;
[0055] 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.
[0056] Figure 1 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 1 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 1. As shown in Figure 1, the point cloud encoding and decoding system 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.
[0057] 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.
[0058] 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.
[0059] 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.
[0060] 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.
[0061] 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.
[0062] In some embodiments, the encoding device 110 includes a point cloud encoding device 112 and an output interface 113. The output interface 113 may include a modulator / demodulator (modem) and / or a transmitter.
[0063] In some embodiments, the encoding device 110 may include, in addition to the point cloud encoding device 112 and the input interface 113 , a point cloud source 111 . The point cloud source 111 may be understood as a source for obtaining point cloud data.
[0064] 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. 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.
[0065] The point cloud encoding device 112 encodes the point cloud data from the point cloud source 111 to generate a code stream. The point cloud encoding device 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.
[0066] In some embodiments, the decoding device 120 includes an input interface 121 and a point cloud decoding device 122 .
[0067] 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 decoding device 122 .
[0068] The input interface 121 includes a receiver and / or a modem and can receive the encoded point cloud data via the channel 130 .
[0069] The point cloud decoding device 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.
[0070] 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.
[0071] In addition, Figure 1 is only an example, and the technical solution of the embodiment of the present application is not limited to Figure 1. For example, the technology of the present application can also be applied to unilateral point cloud encoding or unilateral point cloud decoding.
[0072] Since point clouds are a collection of massive points, storing point clouds not only consumes a lot of memory, but is also not conducive to transmission. There is also not enough bandwidth to support direct transmission of point clouds at the network layer without compression. Therefore, it is necessary to compress point clouds.
[0073] As of now, point clouds can be compressed through the point cloud coding framework.
[0074] The point cloud coding framework can be the geometry-based point cloud compression (G-PCC) coding and decoding framework or the video-based point cloud compression (V-PCC) coding and decoding framework provided by the Moving Picture Experts Group (MPEG), or the AVS-PCC coding and decoding framework provided by the Audio Video Standard (AVS) organization. G-PCC and AVS-PCC are both aimed at static sparse point clouds, and their coding frameworks are roughly the same. The G-PCC coding and decoding framework can be used to compress the first static point cloud and the third type of dynamically acquired point cloud, and the V-PCC coding and decoding framework can be used to compress the second type of dynamic point cloud. The G-PCC coding and decoding framework is also called the point cloud coding and decoding device TMC13, and the V-PCC coding and decoding framework is also called the point cloud coding and decoding device TMC2.
[0075] The following describes the G-PCC codec framework to which the codec device applicable to the embodiments of the present application is applied.
[0076] FIG2 is a schematic block diagram of a point cloud encoding device according to an embodiment of the present application.
[0077] As shown in Figure 2, the point cloud encoding device 200 can obtain the position information (also called geometric information or geometric position) and attribute information of the point cloud from the acquisition device. The encoding of the point cloud includes position encoding and attribute encoding.
[0078] 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.
[0079] 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.
[0080] As shown in Figure 2, position encoding can be achieved through the following units:
[0081] Coordinate transformation (Tanmsform coordinates) unit 201, voxel (Voxelize) unit 202, octree partition (Analyze octree) unit 203, geometry reconstruction (Reconstruct geometry) unit 204, arithmetic encoding (Arithmetic enconde) unit 205, surface fitting (Analyze surface approximation) unit 206.
[0082] The coordinate conversion unit 201 can be used to convert the world coordinates of each point in the point cloud into relative coordinates. For example, the geometric coordinates of the point are subtracted from the minimum values 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.
[0083] 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.
[0084] 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.
[0085] 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.
[0086] 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.
[0087] The arithmetic coding unit 205 may perform arithmetic coding on the position information output by the octree analysis unit 203 or the intersection points fitted by the surface fitting unit 206 using an entropy coding method to generate a geometry bitstream. The geometry bitstream may also be referred to as a geometry bitstream.
[0088] Attribute encoding can be achieved through the following units:
[0089] 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 .
[0090] It should be noted that the point cloud encoding device 200 may include more, fewer, or different functional components than those shown in FIG. 2 .
[0091] 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.
[0092] 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.
[0093] 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: a RAHT transformation unit 212 and a lifting transform unit 214. The lifting transformation relies on generating a level of detail (LOD).
[0094] 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.
[0095] 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.
[0096] 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.
[0097] 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.
[0098] In conjunction with FIG2 , the main operations and processing for geometric structure encoding in this application are as follows:
[0099] (1) Pre-processing: including coordinate transformation and voxelization. Through scaling and translation operations, the point cloud data in 3D space is converted into integer form and its minimum geometric position is moved to the coordinate origin.
[0100] (2) Geometry encoding: Geometry encoding includes two modes, which can be used under different conditions:
[0101] (a) Octree-based Geometric Coding: An octree is a tree-like data structure that evenly divides a predefined bounding box in 3D space. Each node has eight children. By indicating whether each child node is occupied using '1' or '0', an occupancy code is generated as the bitstream of the point cloud geometry information.
[0102] (b) Trisoup-based geometric encoding: Divide the point cloud into blocks of a certain size, locate the intersection points of the point cloud surfaces at the edges of the blocks, and construct triangles. By encoding the intersection points, geometric information is compressed.
[0103] (3) Geometry quantization: The degree of quantization fineness is usually determined by the quantization parameter (QP). A larger QP value means that coefficients with a larger value range will be quantized to the same output, which usually results in greater distortion and a lower bitrate. Conversely, a smaller QP value means that coefficients with a smaller value range will be quantized to the same output, which usually results in less distortion and a higher bitrate. In point cloud coding, quantization is performed directly on the coordinate information of the points.
[0104] (4) Geometry entropy encoding: Statistical compression encoding is performed on the octet code information, and the final output is a binary (0 or 1) compressed code stream. Statistical coding is a lossless coding method that can effectively reduce the bit rate required to express the same signal. A commonly used statistical coding method is context-based binary arithmetic coding (CABAC, Content Adaptive Binary Arithmetic Coding).
[0105] For attribute information encoding, the main operations and processing are as follows:
[0106] (1) Attribute Recoloring: In the case of lossy coding, after the geometric information is encoded, the encoding device needs to decode and reconstruct the geometric information, that is, restore the coordinate information of each point in the 3D point cloud. The attribute information corresponding to one or more neighboring points in the original point cloud is found as the attribute information of the reconstructed point.
[0107] (2) Attribute prediction coding (Predition): When predicting attributes, one or more points are selected as prediction values based on the proximity relationship of geometric information or attribute information, and the weighted average is calculated to obtain the final attribute prediction value, and the difference between the true value and the predicted value is encoded.
[0108] (3) Attribute Transform Coding (Transform): Attribute transform coding includes three modes that can be used under different conditions.
[0109] (a) Predictive Transform Coding: This method selects subsets of points based on distance and divides the point cloud into multiple levels of detail (LoDs), achieving a coarse-to-fine point cloud representation. Adjacent layers can achieve bottom-up prediction, where neighboring points in the coarse layer predict the attributes of points introduced in the fine layer to obtain the corresponding residual signal. Points in the lowest layer are encoded as reference information.
[0110] (b) Lifting Transform: Based on the prediction of adjacent layers of LoD, a weight update strategy for neighborhood points is introduced to finally obtain the predicted attribute value of each point and the corresponding residual signal.
[0111] (c) Region Adaptive Hierarchical Transform (RAHT): The attribute information is transformed into the transform domain through RAHT, which is called transform coefficients.
[0112] (4) Attribute quantization: The degree of quantization is usually determined by the quantization parameter (QP). In predictive transform coding and lifting transform coding, the residual value is quantized and then entropy coded; in RAHT, the transform coefficients are quantized and then entropy coded.
[0113] (5) Attribute entropy coding: Quantized attribute residual signals or transform coefficients are typically compressed using run-length coding and arithmetic coding. The corresponding coding mode, quantization parameters, and other information are also encoded using entropy coding devices.
[0114] FIG3 is a schematic block diagram of a point cloud decoding device according to an embodiment of the present application.
[0115] As shown in Figure 3, the point cloud decoding device 300 can obtain the code stream of the point cloud 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.
[0116] 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.
[0117] 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 three prediction modes to perform point cloud prediction to obtain the reconstructed value of the attribute information of the point; and performing color space deconversion on the reconstructed value of the attribute information of the point to obtain the decoded point cloud.
[0118] As shown in Figure 3, position decoding can be achieved through the following units:
[0119] Arithmetic decoding unit 301 , octree reconstruction unit 302 , surface reconstruction unit 303 , geometry reconstruction unit 304 , and inverse transform coordinates unit 305 .
[0120] Attribute encoding can be achieved through the following units:
[0121] an arithmetic decoding unit 310 , an inverse quantization unit 311 , an inverse RAHT transform unit 312 , a LOD generation unit 313 , an inverse lifting transform unit 314 , and an inverse color transform unit 315 .
[0122] It should be noted that decompression is the inverse process of compression. Similarly, the functions of the various units in the decoding device 300 can refer to the functions of the corresponding units in the encoding device 200. In addition, the point cloud decoding device 300 may include more, fewer, or different functional components than those in Figure 3.
[0123] Decompression is the inverse process of compression. Similarly, the functions of each unit in the point cloud decoding device 300 can refer to the functions of the corresponding units in the encoding framework 200.
[0124] After receiving the compressed bitstream, the decoding device first performs entropy decoding to obtain various pattern information, quantized geometric information, and attribute information. First, the geometric information is inversely quantized to obtain reconstructed 3D point position information. Conversely, the attribute information is inversely quantized to obtain residual information. This information is then used to confirm the reference signal based on the adopted transform mode to obtain reconstructed attribute information. This information is then sequentially mapped to the geometric information to produce the reconstructed point cloud data.
[0125] For example, the point cloud decoding device 300 can divide the point cloud into multiple LoDs based on the Euclidean distance between points in the point cloud. The device then sequentially decodes the attribute information of the points in the LoDs. 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 300 then performs inverse quantization based on the decoded residual value and adds the inverse quantized residual value to the predicted value of the current point to obtain a reconstructed value for the point cloud until all point clouds are decoded. The current point will serve 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.
[0126] As can be seen from Figure 2 above, the point cloud coding device 200 mainly includes two parts in terms of function: a position coding module and an attribute coding module, wherein the position coding module is used to realize the encoding of the position information of the point cloud to form a geometric code stream, and the attribute coding module is used to realize the encoding of the attribute information of the point cloud to form an attribute code stream. This application mainly involves the encoding of attribute information.
[0127] It should be noted that the prediction, quantization, coding, filtering, and other mode information or parameter information determined when encoding the attribute information of the encoding device is carried in the attribute bitstream when necessary. The decoding device parses the attribute bitstream and determines the same prediction, quantization, coding, filtering, and other mode information or parameter information as the encoding device by analyzing the existing information, thereby ensuring that the reconstructed value of the attribute information obtained by the encoding device is the same as the reconstructed value of the attribute information obtained by the decoding device.
[0128] The above is the basic process of the point cloud encoding and decoding device based on the G-PCC encoding and decoding 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 encoding and decoding device based on the G-PCC encoding and decoding framework, but is not limited to the framework and process.
[0129] The following is an introduction to the relevant technologies involved in the embodiments of this application:
[0130] In some prediction methods based on repeated points, let the current point to be decoded be Pj, and its coordinates are (x Pj ,y Pj ,z Pj ), the previous decoded point is Pj-1, and its coordinates are (x Pj-1 ,y Pj-1 ,z Pj-1 ). If (x Pj ,y Pj ,z Pj ) and (x Pj-1 ,y Pj-1 ,z Pj-1 ), define the duplicate point flag isDuplicatePoint=1, and use point Pj-1 as the prediction point of the point to be decoded Pj.
[0131] When the current point to be decoded is a repeated point, for the reflectivity attribute, the attribute prediction value of the repeated point is the reconstructed attribute value of the previous point, and there is no need to parse its sign bit, that is, it defaults to a non-negative number.
[0132] For color attributes, the predicted value of the Y or R component attribute of the repeated point is the attribute reconstruction value of the previous point. There is no need to parse its sign bit, that is, it defaults to a non-negative number.
[0133] The color residual encoding order switch orderSwitch is a binary variable. A value of '0' indicates that the color residual encoding order is YUV / RGB order; a value of '1' indicates that the color residual encoding order is UYV / GRB order.
[0134] The prediction value scheme based on duplicate points is disabled in the case of multiple attributes (such as color and reflectance).
[0135] The following is an introduction to the attribute prediction process of point clouds.
[0136] The attribute encoding of point clouds mainly includes the following steps:
[0137] Step 1: Reorder the point cloud.
[0138] Get the coordinates (x, y, z) of the point cloud, generate the Morton code or Hilbert code of each point based on the space-filling curve, and sort them from small to large to obtain the Morton order or Hilbert order;
[0139] Taking the Morton code of geometric coordinates as an example, the geometric position of a point in a point cloud is represented by three-dimensional Cartesian coordinates (X, Y, Z). Using N bits to represent each coordinate value, the coordinates of the k-th point (Xk, Yk, Zk) can be expressed as:
[0140] The Morton code corresponding to the k-th point can be expressed as follows:
[0141] Represent every three bits as an octal number Then the Morton code corresponding to the k-th point can be expressed as:
[0142] Step 2: Select neighbor points based on the sorted point cloud.
[0143] The neighbor point selection methods include at least the following:
[0144] The first method is to select neighbor points based on distance. The specific steps are as follows:
[0145] Among the first maxNumOfNeighbours neighbor candidate points in the Morton order or Hilbert order, calculate the Manhattan distance d = |x-x1| + |y-y1| + |z-z1| from each point (x1, y1, z1) to the current point to be decoded (x, y, z).
[0146] In one example, the k points closest to each other are determined as neighbors of the current point to be decoded.
[0147] In one example, the maximum distance value among the k points with the smallest distances is determined, and all neighbor candidate points with distances less than or equal to the maximum distance value are taken as neighbors of the current point, and finally the m points with the closest distances are determined as the nearest neighbors of the current point to be decoded.
[0148] The second method is to select neighbor points based on spatial relationships and distances. The specific steps are as follows:
[0149] Step 1: Determine the initial block size, that is, determine the initial right shift number N of the codeword corresponding to each point. On this basis, N + 3 is the corresponding parent block range.
[0150] Step 2: The point cloud is traversed in a certain order. For example, the currently decoded point P searches for the nearest neighbor among the decoded points (limited within the range of the first K points) within the parent block of the B block where it is located and its neighbor blocks that are coplanar, collinear, and concurrent with it.
[0151] Step 3: If the required number of neighbor points is not found, neighbor points are selected according to the distance-based method.
[0152] The following is an example of a distance-based neighbor point selection method, which is different for the processing of point cloud data with color, reflectivity, or both color and reflectivity.
[0153] Case 1: For color attributes, perform a full search for predicted points by replacing the farthest point.
[0154] First, let the currently decoded group have L points. The currently decoded point Pi is the i-th point after geometric decoding point reordering. The 0-th point Ps in the group is the s-th point (0 ≤ i, s < N, N is the total number of decoded points) after reordering according to the order determined by colorReorderMode (original order or Morton or Hilbert). Pi is the n-th point in the group (0 ≤ n < L). For the first decoding process based on the prediction algorithm, the currently decoded group has only 1 point, i = s, and Pi and Ps are the same point.
[0155] Next, determine the neighbor prediction points.
[0156] Let the prediction reference point set be Sp, with a length upper limit of maxNumOfNeighbours in aps. Sp contains the coordinate reconstruction values and color reconstruction values of at most maxNumOfNeighbours decoded points before the current point index. For the currently decoded point Pi, the calculation method of the neighbor prediction point is as follows:
[0157] If s = 0, there is no need to search, and {128, 128, 128} is used as the predicted value;
[0158] If s = 1, then P0 is the neighbor prediction point;
[0159] If s = 2, then P0 and P! are the neighbor prediction points;
[0160] If 3 <= s < maxNumOfNeighbours, then Pi-1, Pi-2, Pi-3 are the neighbor prediction points;
[0161] If i >= maxNumOfNeighbours, search Sp for the three closest points and up to 13 equally distant points to the current point Pi (xi, yi, zi) to be decoded, and use them as predicted neighbor points. For any point Pj (xj, yj, zj) in Sp, the distance d is calculated using the Manhattan distance, defined as: d = |xi - xj| + |yi - yj| + |zi - zj|. If two points have the same distance, the vertex traversed first is prioritized.
[0162] The search method for the three closest points and up to 13 equally distant points as prediction points for the current point is as follows:
[0163] (1) The nearest point set is initialized to an empty set. When the number of points in the neighbor prediction point set is less than 3, that is, when processing the first 3 points Pi-1, Pi-2, and Pi-3 in the current point Sp, these 3 points are inserted into the nearest point set in descending order of index. After each point is inserted, the points in the nearest point set are sorted in ascending order based on the distance between the point in the nearest point set and the current point to be decoded, so that the distance between the three points after sorting satisfies d1 <= d2 <= d3. Here, dk represents the distance between the kth point in the nearest point set and the current decoding point, k = 1, 2, 3.
[0164] (2) Continue to search for the jth point in Sp in descending order of index. When the number of points in the closest point set is equal to 3, if the distance dj between the jth point and the current point to be decoded is equal to d3, then add the nth point to the equidistant point set; if the distance dj between the jth point and the current point to be decoded is less than d3, then move the point corresponding to d3 out of the closest point set and set dtemp = d3, and add the jth point to the closest point set. After adding the new point, sort the points in the closest point set in ascending order according to the distance between the point in the closest point set and the current point to be decoded, and then compare the re-sorted d3 with the distance dtemp of the removed point. If dtemp = d3, then add the removed point to the equidistant point set, otherwise clear the equidistant point set.
[0165] (3) Until all points in Sp are searched, the three closest points and up to 13 equidistant points are finally obtained as the prediction points of the current point.
[0166] Then, determine the farthest point.
[0167] If s > maxNumOfNeighbours, find the point in Sp within [n, maxNumOfNeighbours - 1] that is farthest from Pi. Assume the distance to the farthest point from Pi is Dmax. If there are multiple points at a distance Dmax from Pi, sort them in ascending order of the index in Sp and determine the first one as the farthest point for swapping. Swap the coordinate reconstruction value and color reconstruction value of this farthest point with those of the n-th point in Sp.
[0168] Finally, update the prediction reference point set.
[0169] After all L points in the current group are predicted and reconstructed, update the prediction reference point set.
[0170] If 0 <= s < maxNumOfNeighbours, put the coordinate reconstruction value and color reconstruction value of the L points in the current group to be decoded into Sp. Taking the current point Pi as an example, put it into the m-th point in Sp, where m is equal to i % maxNumOfNeighbours.
[0171] If s > maxNumOfNeighbours, replace the information of the first L points in Sp with the coordinate reconstruction value and color reconstruction value of the L points in the current group to be decoded. Taking the current point Pi as an example, replace the n-th point in Sp with it.
[0172] Case 2, for the reflectance attribute, perform a full search of the predicted points based on replacing the farthest point and spatial bias.
[0173] First, multiply the z-axis coordinate in the three-dimensional Cartesian coordinates of the geometrically decoded points by the spatial bias coefficient axisBias in aps, keep the x-axis and y-axis coordinates unchanged, and then reorder the geometrically decoded points.
[0174] Let the current group to be decoded have L points, the current point to be decoded Pi be the i-th point after reordering the geometrically decoded points, the first point Ps in the group be the s-th point (0 ≤ i, s < N, N is the total number of points to be decoded) after reordering according to the order determined by reflReorderMode (original order or Morton or Morton or Hilbert), and Pi be the n-th point in the group (per 0 ≤ n < L). For the prediction algorithm, when there is only 1 point in the current group to be decoded, i = s, and Pi and Ps are the same point.
[0175] Next, determine the neighbor prediction points.
[0176] Let the prediction reference point set be Sp, with an upper limit of maxNumOfNeighbours in aps. Sp contains the coordinate reconstruction values and reflectance reconstruction values of the most maxNumOfNeighbours decoded points before the current point index. For the current point to be decoded Pi, the neighbor prediction points are calculated as follows:
[0177] If s = 0, no neighbor prediction point search is performed, and {0} is used as the predicted value;
[0178] If s = 1, then P0 is the prediction point;
[0179] If s = 2, then P0 and P1 are the prediction points;
[0180] If 3 <= s < maxNumOfNeighbours, then Pi-1, Pi-2, and Pi-3 are the neighbor prediction points;
[0181] If i > maxNumOfNeighbours, traverse and search in Sp to find the 3 points closest to the current point to be decoded Pi(xi, yi, zi) as the neighbor prediction points Pj(xj, yj, zj) of the current point to be decoded. For any point Pj(xj, yj, zj) in Sp, the Manhattan distance is used to calculate the distance d, which is defined as: d = |xi - xj| + |yi - yj| + |zi - zj|.
[0182] Then, determine the farthest point.
[0183] If s >= maxNumOfNeighbours, search in Sp within [n, maxNumOfNeighbours - 1] to find the point farthest from Pi. Assume the distance from the point farthest from Pi is Dmax. If there are multiple points with a distance of Dmax from Pi, sort them in ascending order according to the index in Sp, and determine the first one as the farthest point for swapping. Swap the coordinate reconstruction value and reflectivity reconstruction value of the farthest point with the nth point in Sp.
[0184] Finally, update the prediction reference point set.
[0185] After all L points in the current group are predicted and reconstructed, update the prediction reference point set:
[0186] If 0 <= s < maxNumOfNeighbours, put the coordinate reconstruction values and reflectivity reconstruction values of the L points in the current group to be decoded into Sp. Taking the current point Pi as an example, put it into the mth point in Sp, where m is equal to i % maxNumOfNeighbours.
[0187] If s >= maxNumOfNeighbours, replace the information of the first L points in Sp with the coordinate reconstruction values and reflectivity reconstruction values of the L points in the current group to be decoded. Taking the current point Pi as an example, replace the nth point in Sp with it.
[0188] Case 3, Prediction point search for multi-attribute point clouds.
[0189] First, for a point cloud containing multiple attribute types, maintain a prediction reference point set Sp with a length upper limit of maxNumOfNeighbours. Sp contains the coordinates, colors, and reflectivities of the vertices. Let the current group to be decoded have L points, and the current point to be decoded Pi be the i-th point after geometric decoding reordering. The 0-th point Ps in the group is the s-th point after Hilbert reordering (0 ≤ i, s < N, where N is the total number of points to be decoded), and Pi is the n-th point in the group (0 ≤ n < L). For the prediction algorithm, when the current group to be decoded has only 1 point, i = s, and Pi and Ps are the same point.
[0190] When crossAttrTypePred = 0, the methods of Case 1 and Case 2 are respectively used to predict the color attribute and the reflectivity attribute.
[0191] When crossAttrTypePred = 1, during attribute prediction, for the prior-predicted attribute, the corresponding methods of Case 1 and Case 2 are used to find the prediction points for the color attribute and the reflectivity attribute. For the post-predicted attribute, the corresponding methods of Case 1 and Case 2 are used to find the prediction points for the color attribute and the reflectivity attribute. The distance used to find the nearest point is changed to the comprehensive distance dis. And the corresponding methods of Case 1 and Case 2 are used to determine the farthest point. After the prediction of the post-predicted attribute is completed, the farthest point exchange and update are performed uniformly.
[0192] During attribute prediction transformation, for the prior-predicted attribute, the corresponding methods of Case 1 and Case 2 are used to find the prediction points for the reflectivity attribute and the color attribute. For the post-predicted attribute, the corresponding methods of Case 1 and Case 2 are used to find the prediction points for the color attribute and the reflectivity attribute. The distance used to find the nearest point is changed to the comprehensive distance dis.
[0193] After the search for the prediction points of the post-predicted attribute is completed, if s >= maxNumOfNeighbours, search for the point in Sp within [n, maxNumOfNeighbours - 1] that is farthest from Pi in terms of geometric information distance disGeom. Assume the distance from the point farthest from Pi is Dmax. If there are multiple points with a distance of Dmax from Pi, sort them in ascending order according to the index in Sp, and determine the first one as the farthest point for exchange, and exchange the coordinates of this farthest point with the reconstructed reflectivity value, the reconstructed color value, and the n-th point in Sp.
[0194] After all L points in the current group are predicted and reconstructed, update the prediction reference point set:
[0195] If \(0\leq s\lt maxNumOfNeighbours\), put the coordinates of the \(L\) points of the current group to be decoded, the reflectance reconstruction value, and the color reconstruction value into \(Sp\). Taking the current point \(P_i\) as an example, put it into the \(m\)-th point of \(Sp\), where \(m\) is the remainder of \(i\) divided by \(maxNumOfNeighbours\).
[0196] If \(s\geq maxNumOfNeighbours\), replace the information of the first \(L\) points of \(Sp\) with the coordinates of the \(L\) points of the current group to be decoded, the reflectance reconstruction value, and the color reconstruction value. Taking the current point \(P_i\) as an example, replace it with the \(n\)-th point of \(Sp\).
[0197] Step 3: Determine the attribute prediction value of the current point to be decoded based on the attribute reconstruction value of the predicted point.
[0198] In some embodiments, weighted calculation based on distance:
[0199] Use the reciprocal of the Manhattan distance between the neighbor point and the current point as the weight, and finally calculate the weighted average of the attribute reconstruction values of the \(k\) neighbors to obtain the attribute prediction value.
[0200] Among them, the geometric coordinates of the current point are \(P_j=(x_j,y_j,z_j)\), and the coordinates of the \(k\) predicted points found are: \((x\) jn ,y\) jn ,z\) jn ) \(n = 1,2,\cdots,k\).
[0201] For the \(k\) color attribute prediction points, define: \(w\) jn =\(\vert x\) j -x\) jn \vert+\vert y\) j -y\) jn \vert+\vert z\) j -z\) jn \vert\), where \(n = 1,2,\cdots,k\).
[0202] For the \(k\) reflectance attribute prediction points, define: \(w\) jn =\(\vert x\) j -x\) jn \vert+\vert y\) j -y\) jn \vert+\theta\vert z\) j -z\) jn \vert\), where \(n = 1,2,\cdots,k\), and the spatial bias coefficient \(\theta = aps.axisBias\).
[0203] The attribute reconstruction values of the \(k\) predicted points are:
[0204] In one example, the weight calculation of the \(k\) predicted points is shown in the following formula (1):
[0205] In one example, the attribute prediction value A′ of the current point j It can be calculated by the following formula (2):
[0206] In some embodiments, based on a weighted calculation of distance and other parameters:
[0207] Assume that the geometric coordinates of the current point are Pj = (xj, yj, zj).
[0208] Among the p predicted points found, there are k neighbor candidate points whose distance is less than the maximum distance value, and their coordinates are: (x jn ,y jn ,z jn ) n=1,2,,k , the attribute reconstruction value is
[0209] The weights of k prediction points are: Where n = 1, 2,…, k.
[0210] Among the p predicted points found, there are r points with the same distance equal to the maximum distance value, and their coordinates are: (x jm ,y jm ,z jm )m=1,2,...,k, the attribute reconstruction value is
[0211] The calculation method of the optimization coefficient dwm is as follows:
[0212] When attrQuantParam=0, dwm=1 / r;
[0213] When attrQuantParam>0, dwm=1.
[0214] The optimization weights of r points with the same distance are: Where m = 1, 2, ..., r. When k = 0, the attribute prediction value of the current point is calculated as shown in formula (3):
[0215] Where m = 1, 2,…, r.
[0216] When k>0, the attribute prediction value of the current point is calculated as shown in formula (4):
[0217] Among them, n=1,2,…,k; m=1,2,…,r.
[0218] In some embodiments, attribute information of the point cloud may also be encoded based on attribute encoding of wavelet transform. Specifically, the encoding includes the following steps:
[0219] First, the prediction transformation tree is constructed.
[0220] As shown in FIG4 , the process of constructing a multi-layer prediction transformation tree structure based on sorted point cloud data and the distance between sorted point cloud data includes:
[0221] For a point cloud with N geometric points, an M-layer prediction transformation structure is constructed. N points are used as nodes of the lowest layer (M layer), and the distance d between the current point i and the next point i+1 is calculated. i If d i 2 Less than the distance threshold th m , point i and point i+1 are transformation modes, and the two points are merged to form their parent nodes in the M-1 layer. These parent nodes constitute the nodes of the M-1 layer and are arranged in the order of merging. The geometric coordinates of the parent node are the midpoint position of its two child nodes. If d i 2 Greater than the distance threshold th m , point i is in prediction mode, and continues to process the next point.
[0222] Merge all nodes in layer M-1 according to the above steps to form the nodes in layer M-2. Repeat this process for each layer. When the number of nodes in layer m is less than 128 or the number of nodes in layer m is greater than or equal to half the number of nodes in layer m+1, merge all nodes pairwise without determining distance relationships. Stop when no nodes in a layer can be merged.
[0223] The initial value of the distance threshold, that is, the bottom distance threshold th M The calculation method is to divide the square of the side length of the average spatial bounding box of the point cloud meanBB by the number of point cloud points numPoints, then divide it by the preset ratio ratio, and finally take an integer not less than 1. For example, as shown in formula (5):
[0224] The preset ratio ratio is calculated by colorInitPredTransRatio or reflInitPredTransRatio in aps. For example, it can be calculated according to the following formula (6): ratio = 2colorInitPredTransRatio ratio = 2reflInitPredTransRatio (6)
[0225] Among them, the mth layer distance threshold th mThe update method is to multiply the (m+1)th layer distance threshold by the (m+1)th layer node number N m+1 , then divided by the number of nodes N in the mth layer m , and finally take an integer not less than 1. For example, as shown in formula (7):
[0226] In the process of constructing the prediction transformation tree, the distance threshold th at the same layer m During the construction of the mth layer, the number of consecutive prediction coding mode nodes and transform coding mode nodes is counted and recorded as N p and N t For point i, if N p Greater than the threshold T p , update the distance threshold th m =th m *2; if N t Greater than the threshold T t And the distance threshold th m Not 1, update the distance threshold th m =max(1,th m / 2). Use the updated distance threshold th m Compare the distances between subsequent points.
[0227] After the division is completed, an M-layer prediction transformation tree structure is obtained, based on which hierarchical transformation and prediction are performed.
[0228] Next, the attribute transform coefficients are inversely transformed and predicted.
[0229] Based on the M-layer prediction transform tree structure and the corresponding decoding method, the point cloud attributes of each node are decoded. The dequantized attribute transform coefficients (reconstructed DC coefficients of the first layer and reconstructed AC coefficients of other layers) and the dequantized DC residual coefficients (reconstructed DC residual coefficients) are obtained and decoded layer by layer from top to bottom.
[0230] (1) Layer-based correction is performed on the attribute transform coefficients (reconstructed DC coefficients of the first layer and reconstructed AC coefficients of other layers) and the DC residual coefficients (reconstructed DC residual coefficients).
[0231] Multiply the reconstructed DC coefficient of the first layer nodes by (C) M-1 , multiply the reconstructed AC coefficient of the m-th layer node by (C) M-m , multiply the reconstructed DC residual coefficient of the m+1th layer node by (C) M-m-1 , (m=1,2,…M-1).
[0232] (2) Perform inverse transformation and prediction on the corrected attribute transformation coefficients.
[0233] Inverse transformation of attribute transformation coefficients: For the jth node in the mth layer, the input is the attribute transformation coefficient of the jth node (reconstructed DC coefficient b1, reconstructed AC coefficient b2), and the inverse transformation outputs the reconstructed DC coefficients a1 and a2 of the corresponding two child nodes as shown in formula (8): a1=(b1+b2) / 2 a2=(b1-b2) / 2 (8)
[0234] In this way, all nodes in layer m are traversed.
[0235] (3) Prediction compensation of DC residual coefficients.
[0236] For the jth node in the m+1th layer, if it has no parent node, search within the layer for the K (K=3) nearest nodes whose reconstructed DC coefficients have been calculated. The search range is 128 points forward and 128 points backward, and the DC prediction value of node j is calculated. The DC prediction value is added to the reconstructed DC residual coefficient to obtain the reconstructed DC coefficient of node j. This process is repeated for all nodes in the m+1th layer.
[0237] If the number of nodes with reconstructed DC coefficients is m, the steps are as follows:
[0238] 1. When m = 0, the measured value of the color attribute is {128, 128, 128}, and the predicted value of the reflectance attribute is 0;
[0239] 2. When m<=K, the m nodes are neighbor prediction points;
[0240] 3. When m>K, the color attribute uses the K (K=3) closest points and up to 13 equidistant points as the neighbor prediction points of the current point; the reflectivity attribute uses the K (K=3) closest points as the neighbor prediction points of the current point;
[0241] Based on m=1, 2, ..., M-2, M-1, traverse each layer of the M-layer structure from top to bottom and loop through steps (2) and (3) to perform relevant calculations. Finally, the Mth layer of the prediction transform tree is predicted, and the reconstructed DC coefficient of each node is the attribute decoding value of that point.
[0242] In some embodiments, attribute information of a point cloud may be encoded based on attribute encoding that combines prediction with transformation.
[0243] First, the point cloud to be encoded after color space conversion and recoloring is reordered from small to large according to the Hilbert code, and then adaptive grouping and corresponding K-ary transformation are used. The specific process is as follows:
[0244] (1) Point cloud grouping
[0245] i) The point cloud is grouped based on the order of the space-filling curve, and the points with the same first L bits of the Hilbert code are grouped together.
[0246] ii) Sub-grouping: When the number of points in the same group exceeds the preset limit, the group will be sub-grouped.
[0247] iii) It can be adjusted according to the number of grouping points of the previous group.
[0248] (2) Intra-group prediction
[0249] The prediction point selection range is the maxNumOfNeighbours points preceding the first point of the current group.
[0250] i) Perform point-by-point prediction based on existing prediction methods.
[0251] ii) Select or calculate a unified prediction value for each group, such as using the prediction value of the first point in the current group as the prediction value for the current group.
[0252] (3) Based on residual value transformation
[0253] The predicted attribute residual values of each group of points are transformed with K_i elements (K_i = 2…8), and the transform coefficients are quantized and entropy coded. When K_i = 1, no transform calculation is performed, and the attribute residual values are directly quantized and entropy coded. The resulting transform coefficients are quantized.
[0254] The above describes the process of encoding point cloud attributes. Current point cloud attribute encoding methods do not clearly define the encoding process for duplicate points in point cloud data. For example, when duplicate points are present and ordinary prediction values are used for calculation, no specific rules are provided, resulting in poor performance in point cloud attribute encoding.
[0255] In order to solve this technical problem, the embodiment of the present application proposes a method for encoding and decoding point cloud attributes, which can achieve reliable encoding and decoding of attribute information of repeated points in the point cloud. Specifically, if the current point is a repeated point in the current point cloud, the attribute prediction mode of the current point is determined, wherein the attribute prediction mode includes at least one of an attribute prediction mode based on a previous point and an attribute prediction mode based on K neighboring points, wherein the previous point is an attribute-decoded point that precedes the current point in the attribute decoding order of the current point cloud, and the K neighboring points are the K attribute-decoded points of the nearest neighbors of the current point, where K is a positive integer; then, based on the attribute prediction mode of the current point, the attribute information of the current point is predicted to obtain the attribute prediction value of the current point; and then, based on the attribute prediction value of the current point, the attribute reconstruction value of the current point is determined. It can be seen from this that if the current point is a duplicate point, the embodiment of the present application determines the attribute prediction mode of the current point based on the attribute prediction mode of the previous point of the current point and the attribute prediction mode of the K neighboring points based on the current point, which can achieve accurate prediction of the attribute prediction mode of the current point, and then accurately predict the attribute information of the current point based on the accurately determined attribute prediction mode, and then achieve prediction and encoding and decoding of the attribute information of the duplicate point, thereby improving the attribute encoding and decoding performance of the point cloud.
[0256] The following describes the point cloud encoding and decoding method involved in the embodiments of the present application in conjunction with specific embodiments.
[0257] First, taking the decoding end as an example, the point cloud decoding method provided in the embodiment of the present application is introduced.
[0258] Figure 5 is a schematic flow chart 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 performed by a processor device, which can be the decoding device shown in Figures 1 or 3 above, or a portion of a decoding device. For convenience, the following description will be based on the decoding device as an example.
[0259] As shown in FIG5 , the point cloud decoding method of the embodiment of the present application includes:
[0260] S101: If the current point whose attribute is to be decoded is a repeated point in the current point cloud, the decoding device determines an attribute prediction mode for the current point.
[0261] Among them, the attribute prediction mode includes at least one of an attribute prediction mode based on a previous point and an attribute prediction mode based on K neighbor points, the previous point is an attribute decoded point that is located before the current point in the attribute decoding order of the current point cloud, and the K neighbor points are the K attribute decoded points that are the nearest neighbors of the current point, and K is a positive integer.
[0262] It should be noted that this embodiment involves the decoding process of the attribute information of the point cloud, and the decoding of the attribute information of the point cloud is performed after the decoding of the position information of the point cloud. The position information of the point cloud is also called the geometric information of the point cloud.
[0263] In the embodiment of the present application, the current point is the point whose attribute information is to be decoded in the current point cloud. In some examples, the current point is also referred to as the current point to be decoded, the point whose current attribute is to be decoded, etc. The decoded point can be understood as the point whose geometric information has been decoded and the point whose attribute information has been decoded. Specifically, the point cloud code stream includes a geometric code stream and an attribute code stream. The decoding device first decodes the geometric code stream of the point cloud to obtain the reconstructed value of the geometric information of the point in the point cloud. After receiving, the attribute code stream of the point cloud is decoded to obtain the reconstructed value of the attribute information of the point in the point cloud. The geometric information and attribute information of the point in the point cloud are combined to obtain a decoded point cloud. The embodiment of the present application relates to the decoding process of the point cloud attribute code stream.
[0264] In the process of decoding the attribute code stream of the point cloud, the decoding process of each point in the point cloud is the same. Taking the current point to be decoded in the point cloud as an example, it is first determined whether the current point is a repeated point.
[0265] If the current point is not a duplicate, the decoded points in the point cloud are obtained and at least one neighboring point of the current point is selected from these decoded points. Based on the reconstructed attribute values of the at least one neighboring point, the predicted attribute values of the current point are obtained. The residual value of the attribute information of the current point is then parsed from the attribute code stream of the point cloud to obtain the reconstructed attribute value of the current point.
[0266] If the current point is a repeated point, an attribute prediction method for the current point is determined, wherein the attribute prediction method for the current point includes the repeated point attribute prediction method proposed in this application and other prediction methods.
[0267] In one example, the decoding device determines the default prediction method at both ends of encoding and decoding as the attribute prediction method of the current point.
[0268] In some examples, a decoding device decodes a code stream to obtain a flag of the attribute prediction method, and then determines the attribute prediction method of the current point based on the flag.
[0269] In one example, the decoding device determines an attribute prediction method for the current point based on the data type of the current point cloud.
[0270] Based on the above steps, if the decoding device determines that the attribute prediction method of the current point is the repeated point attribute prediction method proposed in the embodiment of the present application, it adopts the method of the embodiment of the present application to perform attribute prediction.
[0271] The following describes the process of determining whether the current point is a duplicate point.
[0272] In the embodiment of the present application, the decoding device can determine whether the current point is a repeated point in at least the following ways:
[0273] Method 1: Obtain the decoded points of the current point cloud, determine the distance between the current point and each decoded point, and then determine whether the current point is a duplicate point based on the distance between the current point and each decoded point.
[0274] A decoded point is a point whose geometric and attribute information has been decoded. Based on the coordinates of the current point and the decoded points, the distance between the current point and each decoded point is determined. Based on these distances, the current point is then determined to be a duplicate. For example, if the distance between the current point and one or more decoded points is zero, the current point is determined to be a duplicate.
[0275] In some embodiments, if the current point cloud includes multiple attribute information, determining the distance between the current point and the decoded point includes the following steps 11 to 14:
[0276] Step 11: Determine the geometric distance between the current point and the decoded point based on the geometric information of the current point and the geometric information of the decoded point;
[0277] Step 12: Determine the attribute distance between the current point and the decoded point based on the attribute information of the current point and the attribute information of the decoded point;
[0278] Step 13: Determine the comprehensive distance between the current point and the decoded point based on the geometric distance and attribute information;
[0279] Step 14: Based on the comprehensive distance, determine the distance between the current point and the decoded point.
[0280] In this embodiment, the current point cloud includes multiple attribute information including the following examples:
[0281] Example 1: The current point cloud includes multiple single-component attribute information. For example, reflectivity attribute information is a single-component attribute information. The current point cloud in this embodiment of the present application includes multiple single-component attribute information such as reflectivity.
[0282] Example 2: The current point cloud includes multiple types of multi-component attribute information. For example, color attribute information is a type of multi-component attribute information, such as including a Y component, a U component, and a V component, or including an R component, a G component, and a B component. The current point cloud in this embodiment of the present application includes multiple types of multi-component attribute information such as color.
[0283] Example 3: The current point cloud includes at least one single-component attribute information and at least one multi-component attribute information. For example, the current point cloud includes single-component attribute information such as reflectivity and multi-component attribute information such as color.
[0284] In an embodiment of the present application, if the current point cloud includes multiple attribute information, the comprehensive distance between the current point and the decoded point can be determined as the distance between the current point and the decoded point.
[0285] The following describes the specific calculation process of the comprehensive distance between the current point and the decoded point:
[0286] First, the geometric distance disGeom between the current point and the candidate point is calculated.
[0287] For example, the Manhattan distance between the current point and the candidate point is determined as the geometric distance between the current point and the decoded point.
[0288] Next, the attribute distance disGeom between the current point and the candidate point is calculated, where the attribute distance is the absolute value of the residual of the decoded attribute information between the current point and the decoded point.
[0289] In one example, the distance between the reflectivity attribute information of the current point and the decoded point is determined according to the following formula (9): disAttr1 = |curRefl-neighRefl| (9)
[0290] Where curRefl represents the reflectivity of the current point, and neighRefl represents the reflectivity of the decoded point.
[0291] In one example, the color attribute information distance between the current point and the decoded point is determined according to the following formula (10): disAttr2 = |curColor[0]-neighColor[0]| + |curColor[1]-neighColor[1]| + |curColor[2]-neighColor[2]| (10)
[0292] Among them, curColor represents the color of the current point, neighColor represents the color of the decoded point, and 0, 1, and 3 represent the three components of the color, namely YUV or RGB.
[0293] Then, the comprehensive distance dis between the current point and the decoded point is calculated based on the geometric distance disGeom and the attribute distance disAttr between the current point and the decoded point.
[0294] In one example, the integrated distance dis between the current point and the decoded point is determined according to the following formula (11):
[0295] The maxGeom in the above formula (11) represents the maximum value of the geometric information, and its calculation formula is shown in formula (12): maxGeom = sps.geomBoundingBoxSize[0] + sps.geomBoundingBoxSize[1] + sps.geomBoundingBoxSize[2] (12)
[0296] The maxAttr in the above formula (11) represents the maximum value of the encoded attribute information, and its calculation formula is as follows:
[0297] For reflectivity attribute information: maxAttr=(1< <reflOutputDepth)-1
[0298] For color attribute information: maxAttr=3·((1< <colorOutputDepth)-1)
[0299] Where reflOutputDepth and colorOutputDepth represent the bit depth of reflectivity and color respectively.
[0300] The λ in the above formula (11) represents the weight of the attribute information distance in the comprehensive distance calculation process.
[0301] In one example, the calculation formula of λ is shown in formula (13): λ = -crossAttrTypePredParam1·attrQuantParm +crossAttrTypePredParam2 (13)
[0302] Among them, attrQuantParm represents the post-prediction attribute quantization parameter, crossAttrTypePredParam1 and crossAttrTypePredParam2 respectively represent the parameters in the weight calculation process.
[0303] Exemplarily, when the decoded attribute type is reflectivity: crossAttrTypePredParam1=6554, crossAttrTypePredParam2=1258291.
[0304] Exemplarily, when the decoded attribute type is color: crossAttrTypePredParam1=1311, crossAttrTypePredParam2=157286.
[0305] Based on the above steps, for each decoded point, the decoding device can determine the comprehensive distance between the current point and the decoded point. Based on the comprehensive distance, the distance between the current point and the decoded point can be determined. For example, the comprehensive distance between the current point and the decoded point can be used as the distance between the current point and the decoded point, or the comprehensive distance between the current point and the decoded point can be adjusted to use as the distance between the current point and the decoded point.
[0306] In this way, when determining whether the current point is a duplicate point based on the comprehensive distance between the current point and the decoded points, the accuracy of the determination can be improved.
[0307] In addition to using method 1 to determine whether the current point is a repeated point, the decoding device can also use the following method 2 to determine whether the current point is a repeated point.
[0308] Mode 2: The decoding device decodes the code stream to obtain the repeated point flag of the current point, and determines whether the current point is a repeated point based on the repeated point flag, wherein the repeated point flag is used to indicate whether the current point is a repeated point.
[0309] In the embodiment of the present application, after determining whether the current point is a duplicate point, the encoding device sets the duplicate point flag of the current point and then writes it into the bitstream. For example, if the encoding device determines that the current point is a duplicate point, the duplicate point flag of the current point is set to a first value (e.g., 1) and then written into the bitstream. If the encoding device determines that the current point is a duplicate point, the duplicate point flag of the current point is set to a second value (e.g., 0) and then written into the bitstream.
[0310] In this way, the decoding device can obtain the duplicate point flag of the current point by decoding the code stream, and then determine whether the current point is a duplicate point based on the duplicate point flag. For example, if the value of the duplicate point flag is a first value (e.g., 1), it indicates that the current point is a duplicate point. If the value of the duplicate point flag is a second value (e.g., 0), it indicates that the current point is not a duplicate point.
[0311] Method 3: Determine whether the current point is a duplicate point based on the geometric coordinates of the current point and the geometric coordinates of the decoded points in the current point cloud.
[0312] For example, the geometric coordinates of the current point are compared with the geometric coordinates of each decoded point. If the geometric coordinates of the current point are consistent with the geometric coordinates of one or more decoded points, the current point is determined to be a duplicate point.
[0313] Method 4: Determine whether the current point is a duplicate point based on the sorting code of the current point and the sorting codes of the decoded points in the current point cloud. The sorting code is the codeword obtained by converting the geometric coordinates of the points in the point cloud during point cloud sorting.
[0314] As can be seen from the above description, when attribute encoding is performed on a point cloud, the coordinates of the points in the point cloud are converted, for example, into Morton codes, and then the point cloud is sorted based on the Morton codes of the points in the point cloud, and then the attribute encoding is performed on the sorted point cloud. In the embodiment of the present application, the above-mentioned Morton code is recorded as a sorting code. In this way, when detecting duplicate points, the sorting code of the current point (for example, the Morton code) can be compared with the sorting code of each decoded point. If the Morton code of the current point is consistent with the Morton code of one or more decoded points, the current point is determined to be a duplicate point.
[0315] In this embodiment of the present application, when decoding the attribute information of the current point, the decoding device first determines whether the current point is a duplicate point based on the above steps. If the current point is determined to be a duplicate point, the decoding device determines the attribute prediction mode for the current point from the attribute prediction mode based on the previous point and the attribute prediction modes based on the K neighboring points.
[0316] The preceding point of the current point is an attribute-decoded point that precedes the current point in the attribute decoding order of the current point cloud.
[0317] In one example, the preceding point of the current point is an attribute-decoded point that precedes the current point in the attribute decoding order of the current point cloud.
[0318] In one example, the preceding points of the current point are a plurality of attribute-decoded points that precede the current point in the attribute decoding order of the current point cloud.
[0319] In one example, the preceding point of the current point may be a repeated point of the current point, that is, the coordinate information of the preceding point of the current point is the same as or similar to the coordinate information of the current point.
[0320] In one example, the preceding point of the current point may not be a repeated point of the current point, that is, the coordinate information of the preceding point of the current point may be different from the coordinate information of the current point.
[0321] In an embodiment of the present application, if the current point is a repeated point, the attribute prediction mode of the current point includes at least one of an attribute prediction mode based on a previous point and an attribute prediction mode based on K neighboring points.
[0322] The attribute prediction mode based on the previous point refers to a mode in which the attribute prediction value of the current point is determined based on the attribute reconstruction value of the previous point of the current point. For example, the attribute prediction mode of the current point is a mode in which the attribute reconstruction value of the previous point is determined as the attribute prediction value of the current point.
[0323] The attribute prediction mode based on K neighboring points refers to a mode for determining the attribute prediction value of the current point based on the attribute reconstructed values of the K neighboring points of the current point. For example, the attribute prediction value mode of the current point is determined as the weighted average of the attribute reconstructed values of the K neighboring points of the current point. In other words, the attribute prediction value mode of the current point is a mode in which the attribute prediction value of the current point is determined as the weighted average of the attribute reconstructed values of the K neighboring points of the current point.
[0324] The embodiment of the present application does not limit the specific manner in which the decoding device determines the attribute preset mode of the current point.
[0325] In one possible implementation, the encoding device and the decoding device default to one of the attribute prediction modes based on the previous point and the attribute prediction mode based on K neighboring points as the attribute prediction mode for the current point. For example, the encoding device and the decoding device default to the attribute prediction mode based on the previous point as the attribute prediction mode for the current point (or current point cloud).
[0326] In one possible implementation, the encoding device selects an attribute prediction mode from among the attribute prediction mode based on the previous point and the attribute prediction mode based on K neighboring points as the attribute prediction mode for the current point. For example, the encoding device randomly selects an attribute prediction mode from among the attribute prediction mode based on the previous point and the attribute prediction mode based on K neighboring points as the attribute prediction mode for the current point. Alternatively, the encoding device selects the attribute prediction mode with the lowest cost from among the attribute prediction mode based on the previous point and the attribute prediction mode based on K neighboring points as the attribute prediction mode for the current point. The encoding device then writes indication information of the selected attribute prediction mode for the current point into the bitstream. In this way, the decoding device obtains indication information of the attribute prediction mode for the current point by decoding the bitstream and, based on this indication information, obtains the attribute prediction mode for the current point. For example, if the attribute prediction mode for the current point is based on the attribute prediction mode based on the previous point, a flag bit in the indication information is set to 0; if the attribute prediction mode for the current point is based on the attribute prediction mode based on K neighboring points, a flag bit in the indication information is set to 1. The decoding device can obtain the attribute prediction mode for the current point based on the value of the flag bit in the indication information.
[0327] In one possible implementation, the decoding device can also determine the attribute prediction mode for the current point based on the type of the current point cloud. For example, the encoding device and the decoding device may agree to use an attribute prediction mode based on previous points for some types of point clouds, and to use an attribute prediction mode based on K neighboring points for other types of point clouds. In this way, the decoding device can determine the attribute prediction mode for the current point based on the type of the current point cloud.
[0328] In the embodiment of the present application, if the current point is a repeated point, the decoding device determines the attribute prediction mode of the current point based on the above steps. Then, the following step S102 is executed.
[0329] S102: The decoding device predicts the attribute information of the current point based on the attribute prediction mode of the current point to obtain the attribute prediction value of the current point.
[0330] In this embodiment of the present application, if the current point is a duplicate point, the decoding device determines the attribute prediction mode for the current point from the attribute prediction mode based on the previous point and the attribute prediction modes based on the K neighboring points. The decoding device then uses the attribute prediction mode for the current point to predict the attribute information of the current point and obtain the attribute prediction value for the current point.
[0331] The following introduces how the decoding device predicts the attribute information of the current point based on the attribute prediction mode of the current point.
[0332] In the embodiment of the present application, the decoding device predicts the attribute information of the current point based on the attribute prediction mode of the current point, mainly including the following situations:
[0333] Case 1: If the attribute prediction mode of the current point is based on the attribute prediction mode of the previous point, then the above S102 includes the following steps S102-A1 to S102-A2:
[0334] S102-A1: The decoding device determines an attribute prediction sub-mode for a current point, where the attribute prediction sub-mode includes at least one of a single-component attribute prediction mode and a multi-component attribute prediction mode.
[0335] S102-A2: The decoding device performs attribute prediction on the current point based on the attribute prediction sub-mode of the current point to obtain an attribute prediction value of the current point.
[0336] In case 1, if the attribute prediction mode of the current point is an attribute prediction mode based on a previous point, the attribute prediction mode based on the previous point includes multiple attribute prediction sub-modes, such as a single-component attribute prediction mode and a multi-component attribute prediction mode. The decoding device determines the attribute prediction sub-mode of the current point from the single-component attribute prediction mode and the multi-component attribute prediction mode.
[0337] The embodiment of the present application does not limit the specific method of determining the attribute prediction sub-mode of the current point.
[0338] In a possible implementation, the encoding device and the decoding device determine one of the single-component attribute prediction mode and the multi-component attribute prediction mode as the attribute prediction sub-mode of the current point by default. For example, the single-component attribute prediction mode is determined as the attribute prediction sub-mode of the current point by default.
[0339] In one possible implementation, the decoding device obtains the indication information of the attribute prediction sub-mode of the current point by decoding the bitstream, and then obtains the attribute prediction sub-mode of the current point based on the indication information. For example, the encoding device selects an attribute prediction mode from the single-component attribute prediction mode and the multi-component attribute prediction mode as the attribute prediction sub-mode of the current point. For example, the encoding device randomly selects an attribute prediction mode from the single-component attribute prediction mode and the multi-component attribute prediction mode as the attribute prediction sub-mode of the current point. Alternatively, the encoding device selects an attribute prediction mode with the lowest cost from the single-component attribute prediction mode and the multi-component attribute prediction mode as the attribute prediction sub-mode of the current point. Then, the encoding device writes the indication information of the selected attribute prediction sub-mode of the current point into the bitstream. In this way, the decoding device can decode the indication information in the bitstream and obtain the attribute prediction sub-mode of the current point.
[0340] In a possible implementation, the decoding device may also determine the attribute prediction sub-mode of the current point based on the type of attribute information of the current point cloud. In this case, the above S102-A1 includes the following steps S102-A11 to S102-A12:
[0341] S102-A11. The decoding device determines a type of attribute information of the current point cloud, where the type of attribute information includes at least one of single-component attribute information, multi-component attribute information, and multiple attribute information, and the multiple attribute information includes at least one of the following: N1 types of single-component attribute information, N2 types of multi-component attribute information, N3 types of single-component attribute information, and N4 types of multi-component attribute information, where N1 and N2 are both positive integers greater than 1, and N3 and N4 are positive integers.
[0342] S102-A12: The decoding device determines an attribute prediction sub-mode of the current point based on the type of attribute information of the current point cloud.
[0343] In this embodiment of the present application, point clouds with different attribute types may use different attribute prediction sub-modes. Therefore, in this embodiment of the present application, if the attribute prediction mode of the current point is based on the attribute prediction mode of the previous point, the decoding device also needs to determine the type of attribute information of the current point cloud, and then determine the attribute prediction sub-mode of the current point based on the attribute information type of the current point cloud.
[0344] In an embodiment of the present application, the type of attribute information of the point cloud includes at least one of single-component attribute information, multi-component attribute information, and multiple types of attribute information.
[0345] The single-component attribute information refers to attribute information including only one component, such as reflectivity attribute.
[0346] Multi-component attribute information refers to attribute information including multiple components, such as color attributes, including three color components, namely Y, U, and V, or R, G, and B.
[0347] Multiple attribute information refers to at least one of N1 types of single-component attribute information (i.e., multiple single-component attribute information), N2 types of multi-component attribute information (i.e., multiple multi-component attribute information), or N3 types of single-component attribute information and N4 types of multi-component attribute information (i.e., at least one single-component attribute information and at least one multi-component attribute information). For example, multiple attribute information includes the following examples:
[0348] Example 1: The multiple attribute information of the current point cloud includes multiple single-component attribute information. For example, the current point cloud includes multiple single-component attribute information such as reflectivity.
[0349] Example 2: The multiple attribute information of the current point cloud includes multiple multi-component attribute information. For example, the current point cloud includes multiple multi-component attribute information such as color.
[0350] Example 3: The multiple attribute information of the current point cloud includes at least one single-component attribute information and at least one multi-component attribute information. For example, the current point cloud includes single-component attribute information such as reflectivity and multi-component attribute information such as color.
[0351] The following describes the specific process of determining the attribute prediction sub-mode of the current point based on the type of attribute information of the current point cloud in the above S102-A2.
[0352] In the embodiment of the present application, the decoding device determines an attribute prediction sub-mode for the current point from at least one of a single-component attribute prediction mode and a multi-component attribute prediction mode based on the type of attribute information of the current point cloud.
[0353] The embodiment of the present application does not limit the specific methods of the single-component attribute prediction mode and the multi-component attribute prediction mode.
[0354] In some examples, the single-component attribute prediction mode may refer to a mode in which a reconstructed value of single-component attribute information of a preceding point of a current point is determined as the predicted value of the single-component attribute information of the current point. For example, the decoding device determines the reconstructed value of the reflectivity of the preceding point as the predicted value of the reflectivity of the current point.
[0355] In one example, the single-component attribute prediction mode includes at least one of the following modes:
[0356] Mode 1: The attribute reconstruction value of the first attribute information of the previous point is determined as the attribute prediction value of the first attribute information of the current point, and the default symbol is determined as the residual symbol of the first attribute information of the current point, or the residual symbol of the decoded first attribute information, where the first attribute information is any single-component attribute information mode. That is, in Mode 1, the predicted value of the single-component attribute information (such as reflectivity) of the current point is the attribute reconstruction value of the single-component attribute information of the previous point, and the residual symbol of the single-component attribute information of the current point can be the default symbol, or the residual symbol of the single-component attribute information of the current point obtained by decoding the bitstream.
[0357] Mode 2 sets the default value to the attribute prediction value of the first attribute information of the current point, and sets the default symbol to the residual symbol of the first attribute information of the current point, or the residual symbol of the decoded first attribute information. That is, in Mode 2, the prediction value of the single-component attribute information of the current point is the default value, and the residual symbol of the single-component attribute information of the current point can be the default symbol, or the residual symbol of the single-component attribute information of the current point obtained by decoding the bitstream.
[0358] In some examples, the multi-component attribute prediction mode may refer to a mode in which the attribute reconstruction value of one or more components of the M components of the second attribute information of the previous point is determined as the attribute prediction value of one or more components of the second attribute information of the current point, wherein the second attribute information is any type of multi-component attribute information including M components, and M is a positive integer greater than 1. For example, the multi-component attribute information is the three components YUV. In this case, the attribute reconstruction value of the Y component of the previous point can be determined as the attribute prediction value of the Y component of the current point. Alternatively, the attribute reconstruction value of the Y component of the previous point is determined as the attribute prediction value of the Y component of the current point, the attribute reconstruction value of the U component of the forward point is determined as the attribute prediction value of the U component of the current point, and the attribute reconstruction value of the V component of the forward point is determined as the attribute prediction value of the V component of the current point.
[0359] In one example, the multi-component attribute prediction mode includes at least one of the following modes:
[0360] Mode 1: The attribute reconstruction values of the M components of the second attribute information of the previous point are determined as the attribute prediction values of the M components of the second attribute information of the current point, and the default symbol is determined as the residual symbol of the M components of the second attribute information of the current point. Alternatively, the default symbol is determined as the residual symbol of the M1 component of the second attribute information of the current point, and the residual symbols of the M2 components of the M components of the second attribute information of the current point, excluding the M1 component, are decoded. Alternatively, the residual symbols of the M components of the second attribute information of the current point are decoded, where M1 and M2 are both positive integers, and the sum of M1 and M2 is equal to M. That is, in Mode 1, the attribute prediction values of the M components of the second attribute information of the current point are the attribute reconstruction values of the M components of the second attribute information of the previous point. The residual symbols of the M components of the second attribute information of the current point are the default symbols. Alternatively, the residual symbols of the M1 component of the second attribute information of the current point are the default symbols, and the residual symbols of the M2 component are decoded. Alternatively, the residual symbols of the M components of the second attribute information of the current point are all decoded.
[0361] Mode 2: The attribute reconstruction values of P components of the M components of the second attribute information of the previous point are determined as the attribute prediction values of the P components of the second attribute information of the current point, the default value is determined as the attribute prediction value of the MP components of the second attribute information of the current point, and the default symbol is determined as the residual symbol of the M components of the second attribute information of the current point. Alternatively, the default symbol is determined as the residual symbol of the P components of the second attribute information of the current point, and the residual symbols of the MP components of the second attribute information of the current point are decoded, or the residual symbols of the M components of the second attribute information of the current point are decoded, where P is a positive integer less than M. That is, in Mode 2, the attribute prediction values of P components of the M components of the second attribute information of the current point are the attribute reconstruction values of the P components of the second attribute information of the previous point. The residual symbols of the M components of the second attribute information of the current point are the default symbols. Alternatively, the residual symbols of the P components of the second attribute information of the current point are the default symbols, and the residual symbols of the MP components are decoded. Alternatively, the residual symbols of the M components of the second attribute information of the current point are all decoded.
[0362] Mode 3: The attribute reconstructed values of R components of the M components of the second attribute information of the previous point are determined as the attribute prediction values of the R components of the second attribute information of the current point. The attribute prediction values of the MR components of the second attribute information of the current point are determined using an attribute prediction method based on K neighboring points. The default symbol is determined as the residual symbol of the M components of the second attribute information of the current point. Alternatively, the default symbol is determined as the residual symbol of the R components of the second attribute information of the current point, and the residual symbols of the MR components of the second attribute information of the current point are decoded. Alternatively, the residual symbols of the M components of the second attribute information of the current point are decoded, where R is a positive integer less than M. That is, in Mode 3, the attribute prediction values of R components of the M components of the second attribute information of the current point are the attribute reconstructed values of the R components of the second attribute information of the previous point, and the attribute prediction values of the MR components of the second attribute information of the current point are determined based on the attribute prediction method of K neighboring points. The residual symbols of the M components of the second attribute information of the current point are the default symbols. Alternatively, the residual symbols of the R components of the second attribute information of the current point are the default symbols, and the residual symbols of the MR components are decoded. Alternatively, the residual symbols of the M components of the second attribute information of the current point are all decoded.
[0363] The embodiment of the present application does not limit the specific manner in which the decoding device determines the attribute prediction sub-mode of the current point based on the type of attribute information of the current point cloud.
[0364] In a possible implementation, if the type of the attribute information of the current point cloud is single-component attribute information, the decoding device determines the single-component attribute prediction mode as the attribute prediction sub-mode of the current point.
[0365] For example, the decoding device determines the attribute reconstruction value of the first attribute information of the previous point as the attribute prediction value of the first attribute information of the current point, and skips decoding the residual sign bit of the first attribute information of the current point, but instead determines the default symbol as the residual symbol of the first attribute information of the current point, where the first attribute information is any single-component attribute information.
[0366] For another example, the decoding device determines the default value as the attribute prediction value of the first attribute information of the current point, and skips decoding the residual sign bit of the first attribute information of the current point, but instead determines the default symbol as the residual sign of the first attribute information of the current point.
[0367] In a possible implementation, if the type of the attribute information of the current point cloud is multi-component attribute information, the decoding device determines the multi-component attribute prediction mode as the attribute prediction sub-mode of the current point.
[0368] For example, the decoding device determines the attribute reconstruction values of the M components of the second attribute information of the previous point as the attribute prediction values of the M components of the second attribute information of the current point, and determines the default symbol as the residual symbol of the M components of the second attribute information of the current point, or determines the default symbol as the residual symbol of the M1 components in the second attribute information of the current point, and decodes the residual symbols of the M2 components of the M components of the second attribute information of the current point except the M1 component, or decodes the pattern of the residual symbols of the M components of the second attribute information of the current point as the attribute prediction sub-pattern of the current point.
[0369] For another example, the decoding device determines the attribute reconstruction values of P components out of the M components of the second attribute information of the previous point as the attribute prediction values of the P components of the second attribute information of the current point, determines the default value as the attribute prediction value of the MP components of the second attribute information of the current point, and determines the default symbol as the residual symbol of the M components of the second attribute information of the current point, or determines the default symbol as the residual symbol of the P components of the second attribute information of the current point and decodes the residual symbols of the MP components of the second attribute information of the current point, or decodes the pattern of the residual symbols of the M components of the second attribute information of the current point as the attribute prediction sub-pattern of the current point.
[0370] For another example, the decoding device determines the attribute reconstruction values of R components out of the M components of the second attribute information of the previous point as the attribute prediction values of the R components of the second attribute information of the current point, and uses the attribute prediction method based on K neighboring points to determine them as the attribute prediction values of the MR components of the second attribute information of the current point, and determines the default symbol as the residual symbol of the M components of the second attribute information of the current point, or determines the default symbol as the residual symbol of the R components of the second attribute information of the current point, and decodes the residual symbols of the MR components of the second attribute information of the current point, or decodes the pattern of the residual symbols of the M components of the second attribute information of the current point as the attribute prediction sub-pattern of the current point.
[0371] It should be noted that the above examples illustrate several possible attribute prediction sub-patterns for the current point when the attribute information of the current point cloud is multi-component attribute information. The attribute prediction sub-patterns derived from the above possible attribute prediction sub-patterns can also be used as possible attribute prediction sub-patterns for the current point.
[0372] In one possible implementation, if the attribute information of the current point cloud is of multiple attribute information type, the decoding device determines an attribute prediction sub-mode for the current point from a single-component attribute prediction mode and a multi-component attribute prediction mode based on the multiple attribute information included in the current point cloud. For example, the decoding device may use the single-component attribute prediction mode to predict the single-component attribute information of the current point, and use the multi-component attribute prediction mode to predict the multi-component attribute information of the current point.
[0373] In some embodiments, the decoding device determines an attribute prediction sub-mode for the current point from a single-component attribute prediction mode and a multi-component attribute prediction mode based on the multiple attribute information included in the current point cloud, including at least the following example methods:
[0374] Example 1: If the current point cloud includes N1 types of single-component attribute information, the single-component attribute prediction mode is determined to be an attribute prediction sub-mode of at least one type of single-component attribute information among the N1 types of single-component attribute information of the current point.
[0375] For example, the current point cloud includes a first type of single-component attribute information and a second type of single-component attribute information. At this time, in one example, the single-component attribute prediction mode can be determined as the attribute prediction sub-mode of the first type of single-component attribute information of the current point. For example, the decoding device determines the reconstructed value of the first type of single-component attribute information of the predecessor point of the current point as the predicted value of the first type of single-component attribute information of the current point. In one example, the decoding device can determine the single-component attribute prediction mode as the attribute prediction sub-mode of the first type of single-component attribute information of the current point and the second type of single-component attribute information of the current point. For example, the decoding device determines the reconstructed value of the first type of single-component attribute information of the predecessor point of the current point as the predicted value of the first type of single-component attribute information of the current point, and determines the reconstructed value of the second type of single-component attribute information of the predecessor point of the current point as the predicted value of the second type of single-component attribute information of the current point.
[0376] Example 2: If the current point cloud includes N2 types of multi-component attribute information, the decoding device determines the multi-component attribute prediction mode as an attribute prediction sub-mode of at least one multi-component attribute information among the N2 types of multi-component attribute information of the current point.
[0377] For example, the current point cloud includes a first type of multi-component attribute information and a second type of multi-component attribute information. At this time, in one example, the decoding device may determine the multi-component attribute prediction mode as the attribute prediction sub-mode of the first type of multi-component attribute information of the current point. For example, the decoding device determines the reconstructed values of one or more components of the first type of multi-component attribute information (such as the second attribute information) of the predecessor point of the current point as the predicted values of one or more components of the first type of multi-component attribute information of the current point. In one example, the decoding device may determine the multi-component attribute prediction mode as the attribute prediction sub-mode of the first type of multi-component attribute information and the second type of multi-component attribute information of the current point. For example, the decoding device determines the reconstructed values of one or more components of the first type of multi-component attribute information of the predecessor point of the current point as the predicted values of one or more components of the first type of multi-component attribute information of the current point, and determines the reconstructed values of one or more components of the second type of multi-component attribute information of the predecessor point of the current point as the predicted values of one or more components of the second type of multi-component attribute information of the current point.
[0378] Example 3: If the current point cloud includes N3 types of single-component attribute information and N4 types of multi-component attribute information, the decoding device determines the single-component attribute prediction mode as an attribute prediction sub-mode of at least one single-component attribute information among the N3 types of single-component attribute information, and / or determines the multi-component attribute prediction mode as an attribute prediction sub-mode of at least one multi-component attribute information among the N4 types of multi-component attribute information.
[0379] For example, assume that the current point cloud includes single-component attribute information A and multi-component attribute information B. In one example, the decoding device determines the single-component attribute prediction mode as the attribute prediction sub-mode of the single-component attribute information A. For example, the reconstructed value of the single-component attribute information A of the predecessor point of the current point is determined as the predicted value of the single-component attribute information A of the current point. In one example, the multi-component attribute prediction mode is determined as the attribute prediction sub-mode of the multi-component attribute information B. For example, the reconstructed values of one or more components of the multi-component attribute information B of the predecessor point of the current point are determined as the predicted values of one or more components of the multi-component attribute information B of the current point.
[0380] After the decoding device determines the attribute prediction sub-mode of the current point based on the above steps, it executes the above step S102-A2 to perform attribute prediction on the current point based on the attribute prediction sub-mode of the current point to obtain the attribute prediction value of the current point.
[0381] For example, if the attribute prediction sub-mode for the current point is a single-component attribute prediction mode, the decoding device determines the attribute reconstructed value of the first attribute information of the previous point as the attribute prediction value of the first attribute information of the current point, where the first attribute information is any single-component attribute information. For example, the decoding device determines the reconstructed value of the reflectivity of the previous point as the predicted value of the reflectivity of the current point.
[0382] For another example, if the attribute prediction sub-mode of the current point is a single-component attribute prediction mode, the decoding device determines the attribute prediction value of the first attribute information of the current point as a default value. For example, the decoding device determines the default value as the predicted value of the reflectivity of the current point.
[0383] For another example, if the attribute prediction sub-mode of the current point is a multi-component attribute prediction mode, the decoding device determines the attribute reconstruction values of the M components of the second attribute information of the previous point as the attribute prediction values of the M components of the second attribute information of the current point. Alternatively, the decoding device determines the attribute reconstruction values of P components of the M components of the second attribute information of the previous point as the attribute prediction values of the P components of the second attribute information of the current point, and determines the default value of the decoding device as the attribute prediction values of the MP components of the second attribute information of the current point. Alternatively, the decoding device determines the attribute reconstruction values of Q components of the M components of the second attribute information of the previous point as the attribute prediction values of the Q components of the second attribute information of the current point, and determines the default value as the attribute prediction values of the MQ components of the second attribute information of the current point. Alternatively, the decoding device determines the attribute reconstruction values of R components of the M components of the second attribute information of the previous point as the attribute prediction values of the R components of the second attribute information of the current point, and uses the first attribute prediction method to determine them as the attribute prediction values of the MR components of the second attribute information of the current point.
[0384] For another example, if the attribute prediction sub-mode of the first attribute information of the current point is a single-component attribute prediction mode, and the attribute prediction mode of the second attribute information of the current point is a multi-component attribute prediction mode, the decoding device uses the single-component attribute prediction mode to predict the first attribute information of the current point to obtain a predicted value of the first attribute information of the current point. Furthermore, the decoding device uses the multi-component attribute prediction mode to predict the second attribute information of the current point to obtain a predicted value of the second attribute information of the current point.
[0385] The above describes the process of predicting the current point's attributes when the current point's attribute prediction mode is based on the previous point's attributes. Next, we will describe the current point's attribute prediction process when the current point's attribute prediction mode is based on the attributes of its K neighboring points, in conjunction with Case 2.
[0386] Case 2: If the attribute prediction mode of the current point is the attribute prediction mode based on K neighboring points, then the above S102 includes the following steps S102-B1 and S102-B2:
[0387] S102-B1. The decoding device selects K neighboring points from a set of candidate points for the current point.
[0388] S102-B2. The decoding device determines an attribute prediction value of the current point based on an attribute reconstruction value of at least one neighbor point among the K neighbor points.
[0389] In this second scenario, if the attribute prediction mode for the current point is based on K neighboring points, the decoding device selects K neighboring points from the candidate point set for the current point. The selection of these K neighboring points can be based on the above-described embodiments, such as selecting neighboring points based on distance or based on a spatial relationship and distance. The decoding device then determines the attribute prediction value for the current point based on the reconstructed attribute value of at least one of the K neighboring points.
[0390] The embodiment of the present application does not limit the specific manner in which the decoding device determines the attribute prediction value of the current point based on the attribute reconstruction value of at least one neighboring point among the K neighboring points.
[0391] In some embodiments, the decoding device directly determines the average value of the attribute reconstruction values of the K1 neighboring points as the attribute prediction value of the current point.
[0392] In some embodiments, the decoding device selects K1 neighbor points from the K neighbor points whose distance to the current point is less than or equal to a preset value, and determines the attribute prediction value of the current point based on the attribute reconstruction values of the K1 neighbor points, where K1 is a positive integer less than or equal to K.
[0393] The present embodiment does not limit the specific value of the preset value. For example, it can be a positive number infinitely close to 0, or 0. The K1 neighboring points can be understood as repeated points of the current point. In this way, the decoding device can determine the attribute prediction value of the current point based on the attribute reconstruction values of the K1 neighboring points.
[0394] In one example, the decoding device may determine the attribute reconstruction value of any one of the K1 neighboring points as the attribute prediction value of the current point.
[0395] In one example, the decoding device may determine the average value of the attribute reconstruction values of K1 neighboring points as the attribute prediction value of the current point.
[0396] In one example, the decoding device determines the weights of K1 neighboring points, and then determines the attribute prediction value of the current point based on the weights of the K1 neighboring points and the attribute reconstruction values of the K1 neighboring points.
[0397] The embodiment of the present application does not limit the specific manner in which the decoding device determines the weights of the K1 neighboring points.
[0398] Since these K1 neighbor points are duplicates of the current point and their distance from the current point is 0, the weights of these K1 neighbor points cannot be determined based on the inverse of the distance.
[0399] In a possible implementation, the decoding device in the embodiment of the present application may set the weights of the K1 neighbor points to a preset value (eg, preset value = 1).
[0400] In one possible implementation, the decoding device of the embodiment of the present application may further set different weights for the K1 neighboring points. For example, the decoding device may set completely different weights for the K1 neighboring points, or set different weights for some of the K1 neighboring points and the same weights for some of the neighboring points.
[0401] In one possible implementation, the decoding device may determine the weights of the K1 neighboring points based on the magnitudes of the attribute reconstruction values of the K1 neighboring points. For example, a larger attribute reconstruction value of a neighboring point corresponds to a larger weight, and a smaller attribute reconstruction value of a neighboring point corresponds to a smaller weight.
[0402] Based on the above steps, after the decoding device determines the weight of each of the K1 neighbor points, it determines the attribute prediction value of the current point based on the weights of the K1 neighbor points and the attribute reconstruction values of the K1 neighbor points.
[0403] For example, the decoding device performs weighted summing and averaging of the attribute reconstruction values of the K1 neighbor points based on the weight of each of the K1 neighbor points, that is, the weighted average of the attribute reconstruction values of the K1 neighbor points is determined as the attribute prediction value of the current point.
[0404] In one possible implementation, the decoding device determines the weights of K1 neighbor points and the weights of K-K1 neighbor points among the K neighbor points, and based on the weights of each neighbor point among the K neighbor points, determines the weighted average of the attribute reconstruction values of the K neighbor points as the attribute prediction value of the current point.
[0405] The weights of the K1 neighboring points are determined in the same manner as described above. The weights of the K-K1 neighboring points can be determined in the same manner as described in the above embodiment. For example, for neighbor point 1 among the K-K1 neighboring points, the decoding device determines the weight of neighbor point 1 as the inverse of the distance between neighbor point 1 and the current point. After determining the weight of each of the K neighboring points, the average of the attribute reconstructed values of these K neighboring points is determined as the attribute prediction value of the current point.
[0406] The above embodiment describes the process of determining the attribute prediction value of the current point when the attribute prediction mode of the current point is based on the attribute prediction mode of the previous point, and also describes the process of determining the attribute prediction value of the current point when the attribute prediction mode of the current point is based on the attribute prediction mode of K neighboring points. Next, the following step S103 is executed.
[0407] S103: The decoding device determines the attribute reconstruction value of the current point based on the attribute prediction value of the current point.
[0408] In an embodiment of the present application, if the current point is a repeated point, the decoding device determines the attribute prediction value of the current point based on the above steps, and then determines the attribute residual value of the current point, and determines the attribute reconstruction value of the current point based on the attribute prediction value and the attribute residual value of the current point.
[0409] In some embodiments, the encoding device writes the absolute value and residual sign of the attribute residual value of the current point into the bitstream. In this way, the decoding device can obtain the absolute value and residual sign of the attribute residual value of the current point by decoding the bitstream, and then obtain the attribute residual value of the current point based on the absolute value and residual sign of the attribute residual value of the current point.
[0410] In some embodiments, if the attribute prediction mode of the current point is an attribute prediction mode based on the previous point, then the above S103 may include the following steps S103-A to S103-D:
[0411] S103-A: The decoding device decodes the code stream and determines the absolute value of the attribute residual value of the current point;
[0412] S103-B, the decoding device determines the residual sign of the attribute residual value of the current point based on the attribute prediction sub-mode of the current point;
[0413] S103-C: The decoding device obtains the attribute residual value of the current point based on the absolute value and the residual sign of the attribute residual value;
[0414] S103-D: The decoding device obtains an attribute reconstruction value of the current point based on the attribute residual value and the attribute prediction value of the current point.
[0415] In this embodiment, if the attribute prediction mode of the current point is an attribute prediction mode based on the previous point, the decoding device decodes the code stream to obtain the absolute value of the attribute residual value of the current point, and at the same time, based on the attribute prediction sub-mode of the current point, determines the residual sign of the attribute residual value of the current point.
[0416] For example, if the attribute prediction sub-mode of the current point includes a single-component attribute prediction mode, the decoding device determines the default symbol as the residual symbol of the single-component attribute information (e.g., the first attribute information) of the current point, thereby skipping decoding the residual symbol of the single-component attribute information of the current point, or decoding the residual symbol of the single-component attribute information of the current point.
[0417] For another example, if the attribute prediction sub-mode of the current point includes mode 1 in the multi-component attribute prediction mode, the decoding device determines the default symbol as the residual symbol of the M1 components in the multi-component attribute information of the current point (e.g., the second attribute information), and decodes the residual symbols of the M2 components of the M components of the second attribute information of the current point, excluding the M1 component. Alternatively, the decoding device determines the default symbol as the residual symbol of the M components of the second attribute information of the current point. Alternatively, the decoding device decodes the residual symbols of the M components of the second attribute information of the current point.
[0418] For another example, if the attribute prediction sub-mode of the current point includes mode 2 of the multi-component attribute prediction mode, the decoding device determines the default symbol as the residual symbol of the P components of the second attribute information of the current point, and decodes the residual symbol of the MP components of the second attribute information of the current point. Alternatively, the decoding device determines the default symbol as the residual symbol of the M components of the second attribute information of the current point. Alternatively, the decoding device decodes the residual symbol of the M components of the second attribute information of the current point.
[0419] For another example, if the attribute prediction sub-mode of the current point includes mode 3 in the multi-component attribute prediction mode, the decoding device determines the default symbol as the residual symbol of the R components of the second attribute information of the current point, and decodes the residual symbol of the MR components of the second attribute information of the current point. Alternatively, the decoding device determines the default symbol as the residual symbol of the M components of the second attribute information of the current point. Alternatively, the decoding device decodes the residual symbol of the M components of the second attribute information of the current point.
[0420] That is to say, in an embodiment of the present application, if the current point includes single-component attribute information and / or multi-component attribute information, and at least one component in the single-component attribute information and / or multi-component attribute information is predicted using a preceding point, the decoding device may not decode the residual symbols of these components at all (i.e., use the default value), or partially decode and partially not decode, or decode them all.
[0421] In one example, if the current point includes one type of single-component attribute information and / or one type of multi-component attribute information, it is assumed that the single-component attribute information is predicted using a preceding point, and / or all components in the multi-component attribute information are predicted using a preceding point. In this case, the decoding device does not decode the residual symbol of the single-component attribute and / or the residual symbols of each component of the multi-component attribute information, and determines the default symbol as the residual symbol of the single-component attribute and / or the residual symbol of each component of the multi-component attribute information.
[0422] In one example, if the current point includes one type of single-component attribute information and / or one type of multi-component attribute information, assuming that the single-component attribute information is predicted using a preceding point and / or all components of the multi-component attribute information are predicted using a preceding point, the decoding device decodes the residual symbol of the single-component attribute and / or the residual symbol of each component of the multi-component attribute information.
[0423] In one example, if the current point includes one type of single-component attribute information and / or one type of multi-component attribute information, assuming that the single-component attribute information is predicted using a preceding point, and / or all components of the multi-component attribute information are predicted using a preceding point, the decoding device does not decode the residual symbol of the single-component attribute and / or the residual symbols of some components of the multi-component attribute information, but decodes the residual symbols of the remaining components.
[0424] After determining the residual sign for the current point based on the above steps, the decoding device combines the absolute value of the attribute residual value for the current point with the residual sign to obtain the attribute residual value for the current point. For example, if the absolute value of the attribute residual value for the current point is a and the attribute residual sign is "-", the attribute residual value for the current point can be determined to be -a.
[0425] Finally, the decoding device determines the attribute reconstruction value of the current point based on the attribute prediction value and the attribute residual value of the current point. For example, the decoding device adds the attribute prediction value and the attribute residual value of the current point to obtain the attribute reconstruction value of the current point.
[0426] The point cloud attribute decoding method provided in the embodiment of the present application can realize the rapid and effective prediction and decoding of the attribute information of repeated points in the point cloud. Specifically, if the current point is a repeated point in the current point cloud, the decoding device determines the attribute prediction mode of the current point, wherein the attribute prediction mode includes at least one of an attribute prediction mode based on a previous point and an attribute prediction mode based on K neighboring points, wherein the previous point is an attribute-decoded point that precedes the current point in the attribute decoding order of the current point cloud, and the K neighboring points are the K attribute-decoded points that are the nearest neighbors of the current point, where K is a positive integer; then, the decoding device predicts the attribute information of the current point based on the attribute prediction mode of the current point to obtain the attribute prediction value of the current point; and then, based on the attribute prediction value of the current point, determines the attribute reconstruction value of the current point. It can be seen from this that if the current point is a duplicate point, the embodiment of the present application determines the attribute prediction mode of the current point based on the attribute prediction mode of the previous point of the current point and the attribute prediction mode of the K neighboring points based on the current point, which can achieve accurate prediction of the attribute prediction mode of the current point, and then accurately predict the attribute information of the current point based on the accurately determined attribute prediction mode, and then achieve prediction and encoding and decoding of the attribute information of the duplicate point, thereby improving the attribute encoding and decoding performance of the point cloud.
[0427] The above describes the point cloud attribute decoding method of the decoding device in conjunction with FIG5 . The following describes the technical solution of the present application by taking the encoding end as an example in conjunction with FIG6 .
[0428] Figure 6 is a flowchart of a point cloud attribute decoding method according to an embodiment of the present application. The point cloud attribute encoding method according to the present embodiment can be performed by a processor device, which can be the encoding device shown in Figures 1 or 2 above, or a portion of the encoding device. For ease of description, the following description uses the processor device as an example encoding device.
[0429] As shown in FIG6 , the point cloud attribute encoding method of the embodiment of the present application includes:
[0430] S201: If the current point whose attributes are to be encoded is a repeated point in the current point cloud, the encoding device determines an attribute prediction mode for the current point.
[0431] Among them, the attribute prediction mode includes at least one of an attribute prediction mode based on a previous point and an attribute prediction mode based on K neighbor points, the previous point is an attribute-encoded point that is located before the current point in the attribute encoding order of the current point cloud, and the K neighbor points are the K attribute-encoded points that are the nearest neighbors of the current point, and K is a positive integer.
[0432] It should be noted that this embodiment involves the encoding process of the attribute information of the point cloud, and the encoding of the attribute information of the point cloud is performed after the encoding of the position information of the point cloud, wherein the position information of the point cloud is also called the geometric information of the point cloud.
[0433] Before encoding the current point cloud, the encoding device first sorts the current point cloud.
[0434] In some embodiments, the encoding device may sort the current point cloud through the following steps 1 and 2:
[0435] Step 1: The encoding device sorts the points in the current point cloud based on the geometric information of the points in the current point cloud to obtain a first sorting;
[0436] Step 2: For the repeated points in the first sorting, the encoding device sorts the repeated points in the first sorting based on the attribute information of the repeated points to obtain the attribute encoding order of the current point cloud.
[0437] In an embodiment of the present application, the current point cloud may include both duplicate and non-duplicate points. During sorting, the encoding device first sorts the points in the current point cloud based on the geometric information of the points in the current point cloud to obtain a first sorting order. For example, the encoding device obtains the coordinates (x, y, z) of the points in the current point cloud, generates a Morton code or Hilbert code for each point based on a space-filling curve, and sorts the points from smallest to largest to obtain a Morton order or Hilbert order. This Morton order or Hilbert order is referred to as the first sorting order of the current point cloud.
[0438] Since the coordinates of the duplicate points are the same, the duplicate points in the first sort cannot be accurately sorted. At this time, for the duplicate points in the first sort, the encoding device can sort the duplicate points in the first sort based on the attribute information of the duplicate points to obtain the attribute coding order of the current point.
[0439] In the embodiment of the present application, the encoding device sorts the duplicate points in the first sort based on the attribute information of the duplicate points to obtain the attribute encoding order of the current point cloud in the following ways:
[0440] Method 1: If the attribute information of the repeated points includes single-component attribute information, the encoding device sorts the repeated points in the first sorting according to the size of the single-component attribute information to obtain the attribute encoding order of the current point cloud.
[0441] For example, the current point cloud includes duplicate point 1, duplicate point 2, and duplicate point 3, each of which includes single-component attribute information, such as a reflectivity attribute. The encoding device sorts the points in the current point cloud based on the geometric information. After obtaining a first sort, the encoding device sorts duplicate point 1, duplicate point 2, and duplicate point 3 in the first sort from small to large or from large to small according to the magnitude of their reflectivity to obtain the attribute encoding order of the current point cloud.
[0442] Method 2: If the attribute information of the duplicate points includes multi-component attribute information, the encoding device sorts the duplicate points in the first sorting according to the size of the attribute information under one component in the multi-component attribute information to obtain the attribute encoding order of the current point cloud.
[0443] For example, the current point cloud includes duplicate points 1, 2, and 3, and these three duplicate points include multi-component attribute information, such as color attributes. The encoding device sorts the points in the current point cloud based on the geometric information. After obtaining a first sort, the encoding device sorts the duplicate points 1, 2, and 3 in the first sort from small to large or from large to small according to the size of the Y component (which may also be the U component or the V component) of the color attribute of these three duplicate points to obtain the attribute encoding order of the current point cloud.
[0444] Method 3: If the attribute information of the duplicate points includes multi-component attribute information, the encoding device sorts the duplicate points in the first sorting according to the size of the attribute information under each component in the multiple component attribute information to obtain the attribute encoding order of the current point cloud.
[0445] For example, the current point cloud includes duplicate point 1, duplicate point 2, and duplicate point 3. These three duplicate points include multi-component attribute information, such as color attributes. The encoding device sorts the points in the current point cloud based on the geometric information. After obtaining the first sorting, for duplicate point 1, duplicate point 2, and duplicate point 3 in the first sorting, the three duplicate points are sorted from small to large or from large to small according to the size of the Y component in the color attribute of the three duplicate points, and the attribute coding order of the current point cloud under the Y component is obtained. According to the size of the U component in the color attribute of the three duplicate points, the three duplicate points are sorted from small to large or from large to small to obtain the attribute coding order of the current point cloud under the U component. According to the size of the V component in the color attribute of the three duplicate points, the three duplicate points are sorted from small to large or from large to small to obtain the attribute coding order of the current point cloud under the V component. That is, in method 3, for the color attribute, the encoding device can obtain the attribute coding order under each of the three YUV components.
[0446] Mode 4: If the duplicate point attribute information includes N1 types of single-component attribute information, the encoding device sorts the duplicate points in the first sorting according to the size of one type of single-component attribute information in the N1 types of single-component attribute information to obtain the attribute coding order for the current point cloud. Alternatively, the encoding device sorts the duplicate points in the first sorting according to the size of the attribute information under each single component of the N1 types of single-component attribute information to obtain the attribute coding order corresponding to the N1 types of single-component attribute information for the current point cloud, where N1 is a positive integer greater than 1.
[0447] For example, if the duplicate points include single-component attribute information 1 and single-component attribute information 2, the encoding device sorts the duplicate points in the first sorting according to the single-component attribute information 1 (or single-component attribute information 2) of the duplicate points to obtain the attribute coding order of the current point cloud. Alternatively, the encoding device sorts the duplicate points in the first sorting according to the single-component attribute information 1 of the duplicate points to obtain the attribute coding order corresponding to the single-component attribute information 1, and the encoding device sorts the duplicate points in the first sorting according to the single-component attribute information 2 of the duplicate points to obtain the attribute coding order corresponding to the single-component attribute information 2.
[0448] Method 5: If the attribute information of the duplicate points includes N2 types of multi-component attribute information, the encoding device sorts the duplicate points in the first sorting according to the size of the attribute information under one component of the i-th multi-component attribute information in the N2 types of multi-component attribute information, and obtains the attribute coding order of the current point cloud; or, the encoding device sorts the duplicate points in the first sorting according to the size of the attribute information under one component of each multi-component in the N2 types of multi-component attribute information, and obtains the attribute coding order corresponding to the N2 types of attribute information of the current point cloud, where N2 is a positive integer greater than 1, and i is a positive integer less than or equal to N2; or, the encoding device sorts the duplicate points in the first sorting according to the size of the attribute information under each component of each multi-component in the N2 types of multi-component attribute information, and obtains the attribute coding order corresponding to each component of the N2 types of attribute information of the current point cloud, where N2 is a positive integer greater than 1, and i is a positive integer less than or equal to N2.
[0449] For example, the duplicate points include multi-component attribute information 1 and multi-component attribute information 2, where multi-component attribute information 1 includes 2 components and multi-component attribute information 2 includes 3 components. In this case, the sorting methods include at least the following:
[0450] The first type is that the encoding device sorts the repeated points in the first sorting according to the size of one component in the multi-component attribute information 1 (or multi-component attribute information 2) to obtain the attribute encoding order of the current point cloud.
[0451] Second, the encoding device sorts the duplicate points in the first sorting according to the size of one component in the multi-component attribute information 1 to obtain the attribute coding order corresponding to the multi-component attribute information 1 of the current point cloud. The encoding device sorts the duplicate points in the first sorting according to the size of one component in the multi-component attribute information 2 to obtain the attribute coding order corresponding to the multi-component attribute information 2 of the current point cloud.
[0452] The third type: the encoding device sorts the duplicate points in the first sort according to the size of the first component in the multi-component attribute information 1, and obtains the attribute coding order corresponding to the first component in the multi-component attribute information 1 of the current point cloud. The encoding device sorts the duplicate points in the first sort according to the size of the second component in the multi-component attribute information 1, and obtains the attribute coding order corresponding to the second component in the multi-component attribute information 1 of the current point cloud. The encoding device sorts the duplicate points in the first sort according to the size of the first component in the multi-component attribute information 2, and obtains the attribute coding order corresponding to the first component in the multi-component attribute information 2 of the current point cloud. The encoding device sorts the duplicate points in the first sort according to the size of the second component in the multi-component attribute information 2, and obtains the attribute coding order corresponding to the second component in the multi-component attribute information 2 of the current point cloud. The encoding device sorts the duplicate points in the first sort according to the size of the third component in the multi-component attribute information 2, and obtains the attribute coding order corresponding to the third component in the multi-component attribute information 2 of the current point cloud.
[0453] Method 6: If the attribute information of the duplicate points includes N3 types of single-component attribute information and N4 types of multi-component attribute information, the encoding device sorts the duplicate points in the first sorting according to the size of one or each type of single-component attribute information in the N3 types of single-component attribute information, and / or according to the size of the attribute information under one component or each component of one or each type of multi-component attribute information in the N4 types of multi-component attribute information, to obtain the attribute encoding order of the current point cloud, and N3 and N4 are positive integers.
[0454] This method 6 can be obtained based on any one or a combination of the above methods 1 to 5.
[0455] For example, assume that the duplicate points include one single-component attribute information 1 and one multi-component attribute information 2, where the multi-component attribute information 2 includes three components. In this case, the sorting methods include at least the following:
[0456] Type 1: The encoding device sorts the repeated points in the first sorting according to the size of the single-component attribute information 1 to obtain the attribute encoding order of the current point cloud.
[0457] The second method: the encoding device sorts the repeated points in the first sorting according to the size of one component in the multi-component attribute information 1 to obtain the attribute encoding order of the current point cloud.
[0458] Type 3: The encoding device sorts the duplicate points in the first sorting according to the size of the first component in the multi-component attribute information 1, and obtains the attribute coding order corresponding to the first component in the multi-component attribute information 1 of the current point cloud. The encoding device sorts the duplicate points in the first sorting according to the size of the second component in the multi-component attribute information 1, and obtains the attribute coding order corresponding to the second component in the multi-component attribute information 1 of the current point cloud. The encoding device sorts the duplicate points in the first sorting according to the size of the third component in the multi-component attribute information 1, and obtains the attribute coding order corresponding to the third component in the multi-component attribute information 1 of the current point cloud.
[0459] Method 4: The encoding device sorts the duplicate points in the first sorting according to the size of the single-component attribute information 1 to obtain the attribute coding order corresponding to the single-component attribute information 1 of the current point cloud. The encoding device sorts the duplicate points in the first sorting according to the size of one component in the multi-component attribute information 1 to obtain the attribute coding order corresponding to the multi-component attribute information 1 of the current point cloud.
[0460] Type 5: The encoding device sorts the duplicate points in the first sort according to the size of the single-component attribute information 1, and obtains the attribute coding order corresponding to the single-component attribute information 1 of the current point cloud. The encoding device sorts the duplicate points in the first sort according to the size of the first component in the multi-component attribute information 1, and obtains the attribute coding order corresponding to the first component in the multi-component attribute information 1 of the current point cloud. The encoding device sorts the duplicate points in the first sort according to the size of the second component in the multi-component attribute information 1, and obtains the attribute coding order corresponding to the second component in the multi-component attribute information 1 of the current point cloud. The encoding device sorts the duplicate points in the first sort according to the size of the third component in the multi-component attribute information 1, and obtains the attribute coding order corresponding to the third component in the multi-component attribute information 1 of the current point cloud.
[0461] Based on the above steps, the encoding device sorts the current point cloud and then encodes the attribute information of the points in the current point cloud.
[0462] In the embodiments of the present application, the current point is a point in the current point cloud whose attribute information is to be encoded. In some examples, the current point is also referred to as the current point to be encoded, the point whose current attribute is to be encoded, etc. An encoded point can be understood as a point whose geometric information and attribute information are both encoded.
[0463] When encoding the current point cloud, the encoding device performs the same encoding process for each point in the current point cloud. For example, the current point to be encoded in the point cloud is used as an example. When encoding the attributes of the current point, the encoding device first determines whether the current point is a duplicate point. This determination process can be referred to the description of the above embodiment and will not be repeated here.
[0464] If the current point is not a duplicate point, the encoding device obtains the encoded points in the current point cloud and selects at least one neighbor point of the current point from these encoded points. The encoding device obtains a predicted value of the attribute information of the current point based on the attribute information of the at least one neighbor point of the current point.
[0465] If the current point is a repeated point, the encoding device determines an attribute prediction method for the current point, where the attribute prediction method for the current point includes the repeated point attribute prediction method proposed in this application and other prediction methods.
[0466] In one example, the encoding device determines the default prediction method of the encoding and decoding device as the attribute prediction method of the current point.
[0467] In some examples, the encoding device selects one of multiple preset attribute prediction methods (e.g., randomly or based on encoding cost) as the attribute prediction method for the current point. In this case, the encoding device also needs to indicate the selected attribute prediction method for the current point to the decoding device, for example, by writing a flag indicating the attribute prediction method for the current point into the bitstream.
[0468] In one example, the encoding device determines an attribute prediction method for the current point based on the data type of the current point cloud.
[0469] When the encoding device determines that the attribute prediction method of the current point is the repeated point attribute prediction method proposed in the embodiment of the present application, the method of the embodiment of the present application can be used to perform attribute prediction.
[0470] If the current point is determined to be a repeated point and the repeated point attribute prediction method proposed in the embodiment of the present application is used for prediction, the encoding device determines the attribute prediction mode of the current point from the attribute prediction mode based on the previous point and the attribute prediction mode based on K neighboring points.
[0471] The preceding point of the current point is an attribute-encoded point that precedes the current point in the attribute encoding order of the current point cloud.
[0472] In an embodiment of the present application, if the current point is a repeated point, the attribute prediction mode of the current point includes at least one of an attribute prediction mode based on a previous point and an attribute prediction mode based on K neighboring points.
[0473] The attribute prediction mode based on the previous point refers to a mode in which the attribute prediction value of the current point is determined based on the attribute reconstruction value of the previous point of the current point. For example, the attribute reconstruction value of the previous point is determined as the attribute prediction value of the current point.
[0474] The K-neighborhood-based attribute prediction mode is a mode that determines the attribute prediction value of the current point based on the attribute reconstruction values of the current point's K neighboring points. For example, the weighted average of the attribute reconstruction values of the current point's K neighboring points is used as the attribute prediction value of the current point.
[0475] The embodiment of the present application does not limit the specific manner in which the encoding device determines the preset attribute mode of the current point.
[0476] In one possible implementation, the encoding device and the decoding device default to one of the attribute prediction mode based on the previous point and the attribute prediction mode based on K neighboring points as the attribute prediction mode for the current point. For example, the encoding device and the decoding device default to the attribute prediction mode based on the previous point as the attribute prediction mode for the current point (or current point cloud).
[0477] In one possible implementation, the encoding device randomly selects an attribute prediction mode from the attribute prediction mode based on the previous point and the attribute prediction mode based on K neighboring points as the attribute prediction mode of the current point. Alternatively, the encoding device selects an attribute prediction mode with the lowest cost from the attribute prediction mode based on the previous point and the attribute prediction mode based on K neighboring points as the attribute prediction mode of the current point. Then, the encoding device writes the indication information of the selected attribute prediction mode of the current point into the bitstream. For example, if the attribute prediction mode of the current point is the attribute prediction mode based on the previous point, the flag position in the indication information is set to 0; if the attribute prediction mode of the current point is the attribute prediction mode based on K neighboring points, the flag position in the indication information is set to 1. Decoding can obtain the attribute prediction mode of the current point based on the value of the flag bit in the indication information.
[0478] In one possible implementation, the encoding device can also determine the attribute prediction mode for the current point based on the type of the current point cloud. For example, the encoding device and the decoding device may agree to use an attribute prediction mode based on previous points for some types of point clouds, and to use an attribute prediction mode based on K neighboring points for other types of point clouds. In this way, the encoding device can determine the attribute prediction mode for the current point based on the type of the current point cloud.
[0479] In the embodiment of the present application, if the current point is a repeated point, the encoding device determines the attribute prediction mode of the current point based on the above steps. Then, the following step S202 is performed.
[0480] S202: The encoding device predicts the attribute information of the current point based on the attribute prediction mode of the current point to obtain the attribute prediction value of the current point.
[0481] In this embodiment of the present application, if the current point is a repeated point, the encoding device determines an attribute prediction mode for the current point from the attribute prediction mode based on the previous point and the attribute prediction modes based on the K neighboring points. The attribute prediction mode of the current point is then used to predict the attribute information of the current point to obtain the attribute prediction value of the current point.
[0482] The following introduces how the encoding device predicts the attribute information of the current point based on the attribute prediction mode of the current point.
[0483] In the embodiment of the present application, the encoding device predicts the attribute information of the current point based on the attribute prediction mode of the current point, mainly including the following situations:
[0484] Case 1: If the attribute prediction mode of the current point is the attribute prediction mode based on the previous point, then the above S202 includes the following steps S202-A1 to S202-A3:
[0485] S202-A1. The encoding device determines a type of attribute information of the current point cloud, where the type of attribute information includes at least one of single-component attribute information, multi-component attribute information, and multiple attribute information. The multiple attribute information includes at least one of the following: N1 types of single-component attribute information, N2 types of multi-component attribute information, N3 types of single-component attribute information, and N4 types of multi-component attribute information, where N1 and N2 are both positive integers greater than 1, and N3 and N4 are positive integers.
[0486] S202-A2: The encoding device determines an attribute prediction sub-mode for the current point based on the type of attribute information of the current point cloud, where the attribute prediction sub-mode includes at least one of a single-component attribute prediction mode and a multi-component attribute prediction mode.
[0487] S202-A3: The encoding device performs attribute prediction on the current point based on the attribute prediction sub-mode of the current point to obtain an attribute prediction value of the current point.
[0488] The following describes the specific process of the encoding device determining the attribute prediction sub-mode of the current point based on the type of attribute information of the current point cloud in the above S202-A2.
[0489] In the embodiment of the present application, the encoding device determines an attribute prediction sub-mode for the current point from at least one of a single-component attribute prediction mode and a multi-component attribute prediction mode based on the type of attribute information of the current point cloud.
[0490] The embodiment of the present application does not limit the specific methods of the single-component attribute prediction mode and the multi-component attribute prediction mode.
[0491] In one example, the single-component attribute prediction mode includes at least one of the following modes:
[0492] Mode 1, the attribute reconstruction value of the first attribute information of the previous point is determined as the attribute prediction value of the first attribute information of the current point, and the default symbol is determined as the residual symbol of the first attribute information of the current point, or a mode of encoding the residual symbol of the first attribute information, wherein the first attribute information is any single-component attribute information.
[0493] Mode 2: The default value is determined as the attribute prediction value of the first attribute information of the current point, and the default symbol is determined as the residual symbol of the first attribute information of the current point or the residual symbol of the first attribute information is encoded.
[0494] In some examples, the multi-component attribute prediction mode may refer to determining the attribute reconstruction values of one or more components of the M components of the second attribute information of the previous point as the attribute prediction values of one or more components of the second attribute information of the current point, where the second attribute information is any type of multi-component attribute information including M components, and M is a positive integer greater than 1.
[0495] In one example, the multi-component attribute prediction mode includes at least one of the following modes:
[0496] Mode 1: The attribute reconstruction values of the M components of the second attribute information of the previous point are determined as the attribute prediction values of the M components of the second attribute information of the current point, and the default symbol is determined as the residual symbol of the M components of the second attribute information of the current point. Alternatively, the default symbol is determined as the residual symbol of the M1 components in the second attribute information of the current point, and the residual symbols of the M2 components of the M components of the second attribute information of the current point excluding the M1 component are encoded. Alternatively, the residual symbols of the M components of the second attribute information of the current point are encoded in this mode, where M1 and M2 are both positive integers, and the sum of M1 and M2 is equal to M.
[0497] Mode 2: Determine the attribute reconstruction values of P components of the M components of the second attribute information of the previous point as the attribute prediction values of the P components of the second attribute information of the current point, determine the default value as the attribute prediction value of the MP components of the second attribute information of the current point, and determine the default symbol as the residual symbol of the M components of the second attribute information of the current point. Alternatively, determine the default symbol as the residual symbol of the P components of the second attribute information of the current point and encode the residual symbols of the MP components of the second attribute information of the current point, or encode the residual symbols of the M components of the second attribute information of the current point. P is a positive integer less than M.
[0498] Mode 3: The attribute reconstruction values of R components out of the M components of the second attribute information of the previous point are determined as the attribute prediction values of the R components of the second attribute information of the current point, and the attribute prediction method based on K neighboring points is used to determine them as the attribute prediction values of the MR components of the second attribute information of the current point, and the default symbol is determined as the residual symbol of the M components of the second attribute information of the current point, or the default symbol is determined as the residual symbol of the R components of the second attribute information of the current point, and the residual symbols of the MR components of the second attribute information of the current point are encoded, or the residual symbols of the M components of the second attribute information of the current point are encoded, and R is a positive integer less than M.
[0499] The embodiment of the present application does not limit the specific manner in which the encoding device determines the attribute prediction sub-mode of the current point based on the type of attribute information of the current point cloud.
[0500] In a possible implementation, if the type of the attribute information of the current point cloud is single-component attribute information, the single-component attribute prediction mode is determined as the attribute prediction sub-mode of the current point.
[0501] In a possible implementation, if the type of the attribute information of the current point cloud is multi-component attribute information, the encoding device determines the multi-component attribute prediction mode as the attribute prediction sub-mode of the current point.
[0502] It should be noted that the above examples only show several possible attribute prediction sub-patterns for the current point when the attribute information of the current point cloud is multi-component attribute information. The attribute prediction sub-patterns derived from the above possible attribute prediction sub-patterns can also be used as possible attribute prediction sub-patterns for the current point.
[0503] In one possible implementation, if the attribute information of the current point cloud is of multiple attribute information type, the encoding device determines an attribute prediction sub-mode for the current point from a single-component attribute prediction mode and a multi-component attribute prediction mode based on the multiple attribute information included in the current point cloud. For example, the encoding device may use the single-component attribute prediction mode to predict the single-component attribute information of the current point, and use the multi-component attribute prediction mode to predict the multi-component attribute information of the current point.
[0504] In some embodiments, the encoding device determines an attribute prediction sub-mode for the current point from a single-component attribute prediction mode and a multi-component attribute prediction mode based on multiple attribute information included in the current point cloud, including at least the following example methods:
[0505] Example 1: If the current point cloud includes N1 types of single-component attribute information, the encoding device determines the single-component attribute prediction mode as an attribute prediction sub-mode of at least one single-component attribute information among the N1 types of single-component attribute information of the current point.
[0506] Example 2: If the current point cloud includes N2 types of multi-component attribute information, the encoding device determines the multi-component attribute prediction mode as an attribute prediction sub-mode of at least one multi-component attribute information among the N2 types of multi-component attribute information of the current point.
[0507] Example 3: If the current point cloud includes N3 types of single-component attribute information and N4 types of multi-component attribute information, the encoding device determines the single-component attribute prediction mode as an attribute prediction sub-mode of at least one single-component attribute information among the N3 types of single-component attribute information, and / or determines the multi-component attribute prediction mode as an attribute prediction sub-mode of at least one multi-component attribute information among the N4 types of multi-component attribute information.
[0508] After the encoding device determines the attribute prediction sub-mode of the current point based on the above steps, it executes the above steps S202-A3 to perform attribute prediction on the current point based on the attribute prediction sub-mode of the current point to obtain the attribute prediction value of the current point.
[0509] The above describes the process of predicting the current point's attributes when the current point's attribute prediction mode is based on the previous point's attributes. Next, we will describe the current point's attribute prediction process when the current point's attribute prediction mode is based on the attributes of its K neighboring points, in conjunction with Case 2.
[0510] Case 2: If the attribute prediction mode of the current point is the attribute prediction mode based on K neighboring points, then the above S202 includes the following steps S202-B1 and S202-B2:
[0511] S202-B1. The encoding device selects K neighboring points from a set of candidate points for the current point.
[0512] S202-B2. The encoding device determines an attribute prediction value of the current point based on an attribute reconstruction value of at least one neighbor point among the K neighbor points.
[0513] The embodiment of the present application does not limit the specific manner in which the encoding device determines the attribute prediction value of the current point based on the attribute reconstruction value of at least one neighboring point among the K neighboring points.
[0514] In some embodiments, the encoding device directly determines the average value of the attribute reconstruction values of the K1 neighboring points as the attribute prediction value of the current point.
[0515] In some embodiments, the encoding device selects K1 neighbor points from the K neighbor points whose distance to the current point is less than or equal to a preset value, and determines the attribute prediction value of the current point based on the attribute reconstruction values of the K1 neighbor points, where K1 is a positive integer less than or equal to K.
[0516] In one example, the encoding device may determine the attribute reconstruction value of any one of the K1 neighboring points as the attribute prediction value of the current point.
[0517] In one example, the encoding device may determine the average value of the attribute reconstruction values of K1 neighboring points as the attribute prediction value of the current point.
[0518] In one example, the encoding device determines the weights of K1 neighbor points, and then determines the attribute prediction value of the current point based on the weights of the K1 neighbor points and the attribute reconstruction values of the K1 neighbor points.
[0519] The embodiment of the present application does not limit the specific method of determining the weights of the K1 neighbor points.
[0520] Since these K1 neighbor points are duplicates of the current point and their distance from the current point is 0, the weights of these K1 neighbor points cannot be determined based on the inverse of the distance.
[0521] In a possible implementation, the embodiment of the present application may set the weights of the K1 neighbor points to a preset value (eg, preset value = 1).
[0522] In one possible implementation, the embodiment of the present application may further set different weights for the K1 neighbor points. For example, completely different weights may be set for the K1 neighbor points, or different weights may be set for some of the K1 neighbor points, while the same weight may be set for some of the K1 neighbor points.
[0523] In one possible implementation, the encoding device may determine the weights of the K1 neighboring points based on the magnitudes of the attribute reconstruction values of the K1 neighboring points. For example, a larger attribute reconstruction value of a neighboring point corresponds to a larger weight, and a smaller attribute reconstruction value of a neighboring point corresponds to a smaller weight.
[0524] In one example, the encoding device determines the weights of K1 neighbor points and the weights of K-K1 neighbor points among the K neighbor points, and based on the weights of each neighbor point among the K neighbor points, determines the weighted average of the attribute reconstruction values of the K neighbor points as the attribute prediction value of the current point.
[0525] The above embodiment describes the process of determining the attribute prediction value of the current point when the attribute prediction mode of the current point is based on the attribute prediction mode of the previous point, and also describes the process of determining the attribute prediction value of the current point when the attribute prediction mode of the current point is based on the attribute prediction mode of K neighboring points. Next, the following step S203 is executed.
[0526] S203: The encoding device encodes the attribute information of the current point based on the attribute prediction value of the current point.
[0527] In this embodiment of the present application, if the current point is a repeated point, the encoding device determines the attribute prediction value of the current point based on the above steps. Then, based on the attribute information and the attribute prediction value of the current point, the attribute residual value of the current point is determined, and the attribute residual value of the current point is encoded to obtain a bitstream.
[0528] When encoding the attribute residual value of the current point, the encoding device encodes the absolute value and the residual sign of the attribute residual value of the current point.
[0529] In some embodiments, the encoding device may determine whether to encode the residual sign of the attribute residual value of the current point based on the attribute prediction sub-mode of the current point.
[0530] For example, if the attribute prediction sub-mode of the current point includes a single-component attribute prediction mode, the encoding device determines the default symbol as the residual symbol of the single-component attribute information (e.g., the first attribute information) of the current point, thereby skipping encoding the residual symbol of the single-component attribute information of the current point. Alternatively, the encoding device encodes the residual symbol of the single-component attribute information of the current point.
[0531] For another example, if the attribute prediction sub-mode of the current point includes mode 1 in the multi-component attribute prediction mode, the encoding device determines the default symbol as the residual symbol of the M1 components in the multi-component attribute information of the current point (e.g., the second attribute information), and encodes the residual symbols of the M2 components of the M components of the second attribute information of the current point, excluding the M1 component. Alternatively, the encoding device determines the default symbol as the residual symbol of the M components of the second attribute information of the current point. Alternatively, the encoding device encodes the residual symbols of the M components of the second attribute information of the current point.
[0532] For another example, if the attribute prediction sub-mode of the current point includes mode 2 of the multi-component attribute prediction mode, the encoding device determines the default symbol as the residual symbol of the P components of the second attribute information of the current point, and encodes the residual symbol of the MP components of the second attribute information of the current point. Alternatively, the encoding device determines the default symbol as the residual symbol of the M components of the second attribute information of the current point. Alternatively, the encoding device encodes the residual symbol of the M components of the second attribute information of the current point.
[0533] For another example, if the attribute prediction sub-mode of the current point includes mode 3 in the multi-component attribute prediction mode, the encoding device determines the default symbol as the residual symbol of the R components of the second attribute information of the current point, and encodes the residual symbol of the MR components of the second attribute information of the current point. Alternatively, the encoding device determines the default symbol as the residual symbol of the M components of the second attribute information of the current point. Alternatively, the encoding device encodes the residual symbol of the M components of the second attribute information of the current point.
[0534] It should be understood that the point cloud attribute encoding method in the encoding device is the inverse process of the point cloud attribute decoding method in the decoding device described above. The steps in the point cloud attribute encoding method in the encoding device described above can refer to the corresponding steps in the point cloud attribute decoding method in the decoding device. To avoid repetition, they are not repeated here.
[0535] The point cloud attribute encoding method provided by the embodiment of the present application can realize the rapid and effective prediction and encoding of the attribute information of repeated points in the point cloud. Specifically, if the current point is a repeated point in the current point cloud, the encoding device determines the attribute prediction mode of the current point, wherein the attribute prediction mode includes at least one of the attribute prediction mode based on the previous point and the attribute prediction mode based on the K neighboring points, wherein the previous point is the attribute-encoded point that is located before the current point in the attribute encoding order of the current point cloud, and the K neighboring points are the K attribute-encoded points that are the nearest neighbors of the current point; then, based on the attribute prediction mode of the current point, the attribute information of the current point is predicted to obtain the attribute prediction value of the current point; and then, based on the attribute prediction value of the current point, the attribute encoding of the current point is performed. In this way, the prediction and encoding of the attribute information of the repeated points can be realized, thereby improving the attribute encoding performance of the point cloud.
[0536] 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.
[0537] It should also be understood that in the various method embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. 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.
[0538] The method embodiment of the present application is described in detail above in conjunction with Figures 5 to 6 , and the device embodiment of the present application is described in detail below in conjunction with Figures 7 to 9 .
[0539] Figure 7 is a schematic block diagram of a point cloud attribute decoding device according to an embodiment of the present application. The device 10 is applied to a processor device, which may be a decoding device or a part of a decoding device.
[0540] As shown in FIG7 , the point cloud attribute decoding device 10 may include:
[0541] A prediction mode determination unit 11 is configured to determine an attribute prediction mode for the current point if the current point whose attributes are to be decoded is a repeated point in the current point cloud, the attribute prediction mode comprising at least one of an attribute prediction mode based on a preceding point and an attribute prediction mode based on K neighboring points, wherein the preceding point is an attribute-decoded point preceding the current point in the attribute decoding order of the current point cloud, and the K neighboring points are K attribute-decoded points that are the nearest neighbors of the current point, where K is a positive integer;
[0542] A prediction unit 12 is configured to predict the attribute information of the current point based on the attribute prediction mode of the current point to obtain an attribute prediction value of the current point;
[0543] The reconstruction unit 13 is configured to determine the attribute reconstruction value of the current point based on the attribute prediction value of the current point.
[0544] In some embodiments, if the attribute prediction mode of the current point is the attribute prediction mode based on the previous point, the prediction unit 12 is specifically used to determine the attribute prediction sub-mode of the current point, and the attribute prediction sub-mode includes at least one of a single-component attribute prediction mode and a multi-component attribute prediction mode; based on the attribute prediction sub-mode of the current point, the attribute prediction of the current point is performed to obtain the attribute prediction value of the current point.
[0545] In some embodiments, the prediction unit 12 is specifically used to determine the type of attribute information of the current point cloud, the type of attribute information includes at least one of single-component attribute information, multi-component attribute information and multiple attribute information, the single-component attribute information refers to attribute information including one component, the multi-classification attribute information refers to attribute information including multiple components, and the multiple attribute information includes at least one of the following: N1 types of single-component attribute information, N2 types of multi-component attribute information, N3 types of single-component attribute information and N4 types of multi-component attribute information, N1 and N2 are both positive integers greater than 1, and N3 and N4 are positive integers; based on the type of attribute information of the current point cloud, the attribute prediction sub-mode of the current point is determined.
[0546] In some embodiments, the prediction unit 12 is specifically used to determine the single-component attribute prediction mode as the attribute prediction sub-mode of the current point if the type of the attribute information of the current point cloud is the single-component attribute information; determine the multi-component attribute prediction mode as the attribute prediction sub-mode of the current point if the type of the attribute information of the current point cloud is the multi-component attribute information; if the type of the attribute information of the current point cloud is the multiple attribute information, determine the attribute prediction sub-mode of the current point from the single-component attribute prediction mode and the multi-component attribute prediction mode based on the multiple attribute information included in the current point cloud.
[0547] In some embodiments, the prediction unit 12 is specifically used to, if the current point cloud includes N1 types of single-component attribute information, determine the single-component attribute prediction mode as an attribute prediction sub-mode of at least one single-component attribute information among the N1 types of single-component attribute information of the current point; if the current point cloud includes N2 types of multi-component attribute information, determine the multi-component attribute prediction mode as an attribute prediction sub-mode of at least one multi-component attribute information among the N2 types of multi-component attribute information of the current point; if the current point cloud includes N3 types of single-component attribute information and N4 types of multi-component attribute information, determine the single-component attribute prediction mode as an attribute prediction sub-mode of at least one single-component attribute information among the N3 types of single-component attribute information, and / or determine the multi-component attribute prediction mode as an attribute prediction sub-mode of at least one multi-component attribute information among the N4 types of multi-component attribute information.
[0548] In some embodiments, the reconstruction unit 13 is specifically used to decode the code stream, determine the absolute value of the attribute residual value of the current point; determine the residual sign of the attribute residual value of the current point based on the attribute prediction sub-mode of the current point; obtain the attribute residual value of the current point based on the absolute value and residual sign of the attribute residual value; obtain the attribute reconstruction value of the current point based on the attribute residual value and the attribute prediction value of the current point.
[0549] In some embodiments, the single-component attribute prediction mode includes at least one of the following: determining the attribute reconstruction value of the first attribute information of the previous point as the attribute prediction value of the first attribute information of the current point, and determining the default symbol as the residual symbol of the first attribute information of the current point, or decoding the residual symbol of the first attribute information, where the first attribute information is single-component attribute information; or, determining the default value as the attribute prediction value of the first attribute information of the current point, and determining the default symbol as the residual symbol of the first attribute information of the current point, or, decoding the residual symbol of the first attribute information.
[0550] In some embodiments, the multi-component attribute prediction mode is to determine the attribute reconstruction values of one or more components of the M components of the second attribute information of the previous point as the attribute prediction values of one or more components of the second attribute information of the current point, where the second attribute information is multi-component attribute information including M components, and M is a positive integer greater than 1.
[0551] In some embodiments, the multi-component attribute prediction mode includes at least one of the following: determining the attribute reconstruction values of the M components of the second attribute information of the previous point as the attribute prediction values of the M components of the second attribute information of the current point, and determining the default symbol as the residual symbol of the M components of the second attribute information of the current point, or determining the default symbol as the residual symbol of the M1 components in the second attribute information of the current point, and decoding the residual symbols of the M2 components of the M components of the second attribute information of the current point except the M1 component, or decoding the residual symbols of the M components of the second attribute information of the current point, wherein M1 and M2 are both positive integers, and the sum of M1 and M2 is equal to M; or determining the attribute reconstruction values of P components in the M components of the second attribute information of the previous point as the attribute prediction values of the P components of the second attribute information of the current point, determining the default value as the attribute prediction value of the MP components of the second attribute information of the current point, and determining the default symbol as the second attribute of the current point. The residual symbols of the M components of the second attribute information of the current point are determined as the residual symbols of the P components of the second attribute information of the current point, or the default symbol is determined as the residual symbols of the P components of the second attribute information of the current point, and the residual symbols of the MP components of the second attribute information of the current point are decoded, or the residual symbols of the M components of the second attribute information of the current point are decoded, and P is a positive integer less than M; or the attribute reconstruction values of R components of the M components of the second attribute information of the previous point are determined as the attribute prediction values of the R components of the second attribute information of the current point, and the attribute prediction method based on K neighboring points is used to determine them as the attribute prediction values of MR components of the second attribute information of the current point, and the default symbol is determined as the residual symbols of the M components of the second attribute information of the current point, or the default symbol is determined as the residual symbols of the R components of the second attribute information of the current point, and the residual symbols of the MR components of the second attribute information of the current point are decoded, or the residual symbols of the M components of the second attribute information of the current point are decoded, and R is a positive integer less than M.
[0552] In some embodiments, the prediction mode determination unit 11 is further used to determine the distance between the current point and the decoded points in the current point cloud, and determine whether the current point is the duplicate point based on the distance; or, determine whether the current point is a duplicate point based on the geometric coordinates of the current point and the geometric coordinates of the decoded points in the current point cloud; or, determine whether the current point is a duplicate point based on the sorting code of the current point and the sorting code of the decoded points in the current point cloud, wherein the sorting code is a codeword obtained by converting the geometric coordinates of the points in the point cloud during point cloud sorting.
[0553] In some embodiments, if the current point cloud includes multiple attribute information, the prediction mode determination unit 11 is specifically used to determine the geometric distance between the current point and the alternative point based on the geometric information of the current point and the geometric information of the alternative point; determine the attribute distance between the current point and the alternative point based on the attribute information of the current point and the attribute information of the alternative point; determine the comprehensive distance between the current point and the alternative point based on the geometric distance and the attribute information; and determine the distance between the current point and the alternative point based on the comprehensive distance.
[0554] In some embodiments, if the attribute prediction mode of the current point is the attribute prediction mode based on K neighboring points, the prediction unit 12 is specifically used to select K neighboring points from the candidate point set of the current point; and determine the attribute prediction value of the current point based on the attribute reconstruction value of at least one neighboring point among the K neighboring points.
[0555] In some embodiments, the prediction unit 12 is specifically used to determine the average value of the attribute reconstruction values of the K neighbor points as the attribute prediction value of the current point; or, select K1 neighbor points whose distance from the current point is less than or equal to a preset value from the K neighbor points, and determine the attribute prediction value of the current point based on the attribute reconstruction values of the K1 neighbor points, where K1 is a positive integer less than or equal to K.
[0556] In some embodiments, the prediction unit 12 is specifically used to determine the average value of the attribute reconstruction values of the K1 neighbor points as the attribute prediction value of the current point; or, determine the weight of the K1 neighbor point among the K neighbor points, and determine the weighted average value of the attribute reconstruction values of the K1 neighbor points as the attribute prediction value of the current point; or, determine the weight of the K1 neighbor point among the K neighbor points and the weight of the K-K1 neighbor points, and based on the weight of each neighbor point among the K neighbor points, determine the weighted average value of the attribute reconstruction values of the K neighbor points as the attribute prediction value of the current point.
[0557] It should be understood that the apparatus 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 in detail here. Specifically, the apparatus shown in FIG7 can perform the embodiment of the method shown in FIG5 above, and the aforementioned and other operations and / or functions of each module in the apparatus are respectively for implementing the corresponding method embodiments of the decoding device. For the sake of brevity, they will not be described in detail here.
[0558] Fig. 8 is a schematic block diagram of a point cloud attribute encoding device according to an embodiment of the present application. The device 20 is applied to a processor device, which may be a decoding device or a part of an encoding device.
[0559] As shown in FIG8 , the point cloud attribute encoding device 20 may include:
[0560] a prediction mode determination unit 21 configured to determine an attribute prediction mode for the current point if a current point in a current point cloud whose attribute information is to be encoded is a repeated point in the current point cloud, the attribute prediction mode comprising at least one of an attribute prediction mode based on a preceding point and an attribute prediction mode based on K neighboring points, the preceding point being an attribute-encoded point preceding the current point in the attribute encoding order of the current point cloud, the K neighboring points being K attribute-encoded points nearest to the current point, and K being a positive integer;
[0561] A prediction unit 22 is configured to predict the attribute information of the current point based on the attribute prediction mode of the current point to obtain an attribute prediction value of the current point;
[0562] The encoding unit 23 is configured to encode the attribute information of the current point based on the attribute prediction value of the current point to obtain a code stream.
[0563] In some embodiments, the prediction mode determination unit 21 is further used to sort the points in the current point cloud based on the geometric information of the points in the current point cloud to obtain a first sort before determining whether the current point is a duplicate point; for the duplicate points in the first sort, the duplicate points in the first sort are sorted based on the attribute information of the duplicate points to obtain the attribute coding order of the current point cloud.
[0564] In some embodiments, the prediction mode determination unit 21 is specifically used to, if the attribute information of the duplicate points includes a single-component attribute information, sort the duplicate points in the first sorting according to the size of the single-component attribute information to obtain the attribute coding order of the current point cloud; if the attribute information of the duplicate points includes a multi-component attribute information, sort the duplicate points in the first sorting according to the size of the attribute information under one component in the multi-component attribute information to obtain the attribute coding order of the current point cloud, or, sort the duplicate points in the first sorting according to the size of the attribute information under each component of the multiple component attribute information to obtain the attribute coding order of the current point cloud; or,
[0565] If the attribute information of the repeated points includes N1 types of single-component attribute information, the repeated points in the first sorting are sorted according to the size of one type of single-component attribute information in the N1 types of single-component attribute information to obtain the attribute coding order of the current point cloud; or, the repeated points in the first sorting are sorted separately according to the size of the attribute information under each single component in the N1 types of single-component attribute information to obtain the attribute coding order corresponding to the N1 types of single-component attribute information of the current point cloud, where N1 is a positive integer greater than 1; or,
[0566] If the attribute information of the duplicate points includes N2 kinds of multi-component attribute information, the duplicate points in the first sorting are sorted according to the size of the attribute information under one component of the i-th multi-component attribute information in the N2 kinds of multi-component attribute information to obtain the attribute coding order of the current point cloud; or, the duplicate points in the first sorting are sorted separately according to the size of the attribute information under one component of each multi-component in the N2 kinds of multi-component attribute information to obtain the attribute coding order corresponding to the N2 kinds of attribute information of the current point cloud, where N2 is a positive integer greater than 1, and i is a positive integer less than or equal to N2; or, the duplicate points in the first sorting are sorted separately according to the size of the attribute information under each component of each multi-component in the N2 kinds of multi-component attribute information to obtain the attribute coding order corresponding to each component of the N2 kinds of attribute information of the current point cloud, where N2 is a positive integer greater than 1, and i is a positive integer less than or equal to N2; or,
[0567] If the attribute information of the duplicate points includes N3 types of single-component attribute information and N4 types of multi-component attribute information, the duplicate points in the first sorting are sorted separately according to the size of one or each type of single-component attribute information among the N3 types of single-component attribute information, and / or according to the size of the attribute information under one component or each component of one or each type of multi-component attribute information among the N4 types of multi-component attribute information, to obtain the attribute coding order of the current point cloud, where N3 and N4 are positive integers.
[0568] 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, they will not be described here. Specifically, the device shown in Figure 8 can execute the method embodiment shown in Figure 6 above, and the aforementioned and other operations and / or functions of each module in the device are respectively for implementing the method embodiment corresponding to the encoding device. For the sake of brevity, they will not be described here.
[0569] The apparatus of the embodiment of the present application is described above from the perspective of functional modules in conjunction with the accompanying drawings. It should be understood that the functional module can be implemented in hardware form, can be implemented by instructions in software form, or can be implemented by a combination of hardware and software modules. Specifically, the steps of the method embodiment in the embodiment of the present application can be completed by the hardware integrated logic circuit and / or software form instructions in the processor, and the steps of the method disclosed in the embodiment of the present application can be directly embodied as being executed by a hardware decoding processor, or can be executed by a combination of hardware and software modules in the decoding processor. Optionally, the software module 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.
[0570] Figure 9 is a schematic block diagram of an electronic device provided in an embodiment of the present application. The electronic device in Figure 9 can be the above-mentioned point cloud encoding device or the point cloud decoding device.
[0571] As shown in FIG9 , the electronic device 30 may include:
[0572] The memory 31 and the processor 32 are configured to store a computer program 33 and transmit the program code 33 to the processor 32. In other words, the processor 32 can call and run the computer program 33 from the memory 31 to implement the method in the embodiment of the present application.
[0573] For example, the processor 32 may be configured to execute the steps of the method 200 according to the instructions in the computer program 33 .
[0574] In some embodiments of the present application, the processor 32 may include but is not limited to:
[0575] 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.
[0576] In some embodiments of the present application, the memory 31 includes but is not limited to:
[0577] 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).
[0578] In some embodiments of the present application, the computer program 33 may be divided into one or more modules, which are stored in the memory 31 and executed by the processor 32 to implement the method for recording a page provided by the present application. The one or more modules may be a series of computer program instruction segments capable of performing specific functions, and the instruction segments are used to describe the execution process of the computer program 33 in the electronic device 30.
[0579] As shown in FIG9 , the electronic device 30 may further include:
[0580] The transceiver 34 may be connected to the processor 32 or the memory 31 .
[0581] The processor 32 may control the transceiver 34 to communicate with other devices. Specifically, the processor 32 may send information or data to other devices or receive information or data sent by other devices. The transceiver 34 may include a transmitter and a receiver. The transceiver 34 may further include one or more antennas.
[0582] 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.
[0583] According to one aspect of the present application, a computer storage medium is provided, on which a computer program is stored. When the computer program is executed by a computer, the computer is enabled to perform the method of the above-mentioned method embodiment. Alternatively, the present application also provides a computer program product containing instructions. When the computer is executed by the instructions, the computer is enabled to perform the method of the above-mentioned method embodiment.
[0584] According to another aspect of the present application, a computer program product or computer program is provided, the computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the method of the above-described method embodiment.
[0585] 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 attribute decoding method, characterized in that: Applied to a processor device, the method includes: If the current point whose attribute is to be decoded is a repeated point in the current point cloud, an attribute prediction mode of the current point is determined, where the attribute prediction mode includes at least one of an attribute prediction mode based on a previous point and an attribute prediction mode based on K neighboring points. The previous point is an attribute-decoded point that precedes the current point in the attribute decoding order of the current point cloud, and the K neighboring points are the K attribute-decoded points that are the nearest neighbors of the current point, where K is a positive integer. Predicting the attribute information of the current point based on the attribute prediction mode of the current point to obtain the attribute prediction value of the current point; Based on the attribute prediction value of the current point, a reconstructed attribute value of the current point is determined.
2. The method according to claim 1, characterized in that If the attribute prediction mode of the current point is the attribute prediction mode based on the previous point, then predicting the attribute information of the current point based on the attribute prediction mode of the current point to obtain the attribute prediction value of the current point includes: determining an attribute prediction submode for the current point, the attribute prediction submode comprising at least one of a single-component attribute prediction mode and a multi-component attribute prediction mode; Based on the attribute prediction sub-mode of the current point, attribute prediction is performed on the current point to obtain an attribute prediction value of the current point.
3. The method according to claim 2, characterized in that The determining of the attribute prediction sub-mode of the current point includes: Determining a type of attribute information of the current point cloud, the type of attribute information including at least one of single-component attribute information, multi-component attribute information, and multiple attribute information, the single-component attribute information refers to attribute information including one component, the multi-classification attribute information refers to attribute information including multiple components, and the multiple attribute information includes at least one of the following: N1 types of single-component attribute information, N2 types of multi-component attribute information, N3 types of single-component attribute information, and N4 types of multi-component attribute information, where N1 and N2 are both positive integers greater than 1, and N3 and N4 are positive integers; An attribute prediction sub-mode of the current point is determined based on the type of attribute information of the current point cloud.
4. The method according to claim 3, characterized in that The determining of the attribute prediction sub-mode of the current point based on the type of attribute information of the current point cloud includes: If the type of the attribute information of the current point cloud is the single-component attribute information, determining the single-component attribute prediction mode as the attribute prediction sub-mode of the current point; If the type of the attribute information of the current point cloud is the multi-component attribute information, determining the multi-component attribute prediction mode as the attribute prediction sub-mode of the current point; If the type of the attribute information of the current point cloud is the multiple attribute information, then based on the multiple attribute information included in the current point cloud, the attribute prediction sub-mode of the current point is determined from the single-component attribute prediction mode and the multi-component attribute prediction mode.
5. The method according to claim 4, characterized in that The determining, based on the multiple attribute information included in the current point cloud, an attribute prediction sub-mode of the current point from the single-component attribute prediction mode and the multi-component attribute prediction mode, includes: If the current point cloud includes N1 types of single-component attribute information, determining the single-component attribute prediction mode as an attribute prediction submode of at least one single-component attribute information among the N1 types of single-component attribute information of the current point; If the current point cloud includes N2 types of multi-component attribute information, determining the multi-component attribute prediction mode as an attribute prediction sub-mode of at least one multi-component attribute information among the N2 types of multi-component attribute information of the current point; If the current point cloud includes N3 types of single-component attribute information and N4 types of multi-component attribute information, the single-component attribute prediction mode is determined as an attribute prediction sub-mode of at least one single-component attribute information among the N3 types of single-component attribute information, and / or the multi-component attribute prediction mode is determined as an attribute prediction sub-mode of at least one multi-component attribute information among the N4 types of multi-component attribute information.
6. The method according to any one of claims 2 to 5, characterized in that: The determining the attribute reconstruction value of the current point based on the attribute prediction value of the current point includes: Decoding the code stream to determine the absolute value of the attribute residual value of the current point; Determining a residual sign of an attribute residual value of the current point based on the attribute prediction sub-mode of the current point; Obtaining the attribute residual value of the current point based on the absolute value and the residual sign of the attribute residual value; Based on the attribute residual value and the attribute prediction value of the current point, the attribute reconstruction value of the current point is obtained.
7. The method according to any one of claims 2 to 6, characterized in that: The single-component attribute prediction mode includes at least one of the following: Determining the attribute reconstruction value of the first attribute information of the previous point as the attribute prediction value of the first attribute information of the current point, and determining the default symbol as the residual symbol of the first attribute information of the current point, or the residual symbol of decoding the first attribute information, where the first attribute information is single-component attribute information; or, A default value is determined as the attribute prediction value of the first attribute information of the current point, and a default symbol is determined as the residual symbol of the first attribute information of the current point, or the residual symbol of the first attribute information is decoded.
8. The method according to any one of claims 2 to 7, characterized in that: The multi-component attribute prediction mode is to determine the attribute reconstruction values of one or more components of the M components of the second attribute information of the previous point as the attribute prediction values of one or more components of the second attribute information of the current point, where the second attribute information is multi-component attribute information including M components, and M is a positive integer greater than 1.
9. The method according to any one of claims 2 to 8, characterized in that: The multi-component attribute prediction mode includes at least one of the following: Determine the attribute reconstruction values of the M components of the second attribute information of the previous point as the attribute prediction values of the M components of the second attribute information of the current point, and determine the default symbol as the residual symbol of the M components of the second attribute information of the current point, or determine the default symbol as the residual symbol of the M1 components in the second attribute information of the current point, and decode the residual symbols of the M2 components of the M components of the second attribute information of the current point excluding the M1 component, or decode the residual symbols of the M components of the second attribute information of the current point, where M1 and M2 are both positive integers, and the sum of M1 and M2 is equal to M; or, Determine the attribute reconstruction values of P components among the M components of the second attribute information of the previous point as the attribute prediction values of the P components of the second attribute information of the current point, determine the default value as the attribute prediction value of the MP components of the second attribute information of the current point, and determine the default symbol as the residual symbol of the M components of the second attribute information of the current point, or determine the default symbol as the residual symbol of the P components of the second attribute information of the current point, and decode the residual symbols of the MP components of the second attribute information of the current point, or decode the residual symbols of the M components of the second attribute information of the current point, where P is a positive integer less than M; or, The attribute reconstruction values of R components out of the M components of the second attribute information of the previous point are determined as the attribute prediction values of the R components of the second attribute information of the current point, and the attribute prediction method based on K neighboring points is adopted to determine them as the attribute prediction values of the MR components of the second attribute information of the current point, and the default symbol is determined as the residual symbol of the M components of the second attribute information of the current point, or the default symbol is determined as the residual symbol of the R components of the second attribute information of the current point, and the residual symbols of the MR components of the second attribute information of the current point are decoded, or the residual symbols of the M components of the second attribute information of the current point are decoded, and R is a positive integer less than M.
10. The method according to any one of claims 1 to 9, characterized in that Determining whether the current point is a repeated point includes: determining a distance between the current point and a decoded point in the current point cloud, and determining whether the current point is the duplicate point based on the distance; or Determining whether the current point is a duplicate point based on the geometric coordinates of the current point and the geometric coordinates of decoded points in the current point cloud; or Based on the sorting code of the current point and the sorting codes of decoded points in the current point cloud, it is determined whether the current point is a duplicate point, wherein the sorting code is a codeword obtained by converting the geometric coordinates of the points in the point cloud during point cloud sorting.
11. The method according to claim 10, characterized in that If the current point cloud includes multiple attribute information, determining the distance between the current point and a candidate point in the candidate point set for the current point includes: Determining a geometric distance between the current point and the candidate point based on the geometric information of the current point and the geometric information of the candidate point; Determining an attribute distance between the current point and the candidate point based on the attribute information of the current point and the attribute information of the candidate point; Determining a comprehensive distance between the current point and the candidate point based on the geometric distance and the attribute information; Based on the comprehensive distance, the distance between the current point and the candidate point is determined.
12. The method according to any one of claims 1 to 11, characterized in that If the attribute prediction mode of the current point is the attribute prediction mode based on K neighboring points, then predicting the attribute information of the current point based on the attribute prediction mode of the current point to obtain the attribute prediction value of the current point includes: Select K neighboring points from the candidate point set of the current point; The attribute prediction value of the current point is determined based on the attribute reconstruction value of at least one neighbor point among the K neighbor points.
13. The method according to claim 12, characterized in that The determining the attribute prediction value of the current point based on the attribute reconstruction value of at least one neighbor point among the K neighbor points includes: Determine the average value of the attribute reconstruction values of the K neighboring points as the attribute prediction value of the current point; or K1 neighbor points whose distance to the current point is less than or equal to a preset value are selected from the K neighbor points, and the attribute prediction value of the current point is determined based on the attribute reconstruction values of the K1 neighbor points, where K1 is a positive integer less than or equal to K.
14. The method according to claim 13, characterized in that The determining the attribute prediction value of the current point based on the attribute reconstruction values of the K1 neighboring points includes: Determine the average value of the attribute reconstruction values of the K1 neighboring points as the attribute prediction value of the current point; or Determine the weights of K1 neighbor points among the K neighbor points, and determine the weighted average of the attribute reconstruction values of the K1 neighbor points as the attribute prediction value of the current point; or Determine the weights of K1 neighbor points and K-K1 neighbor points among the K neighbor points, and based on the weight of each neighbor point among the K neighbor points, determine the weighted average of the attribute reconstruction values of the K neighbor points as the attribute prediction value of the current point.
15. A point cloud attribute encoding method, characterized in that: Applied to a processor device, the method includes: If a current point in a current point cloud whose attribute information is to be encoded is a repeated point in the current point cloud, determining an attribute prediction mode for the current point, the attribute prediction mode including at least one of an attribute prediction mode based on a preceding point and an attribute prediction mode based on K neighboring points, the preceding point being an attribute-encoded point preceding the current point in the attribute encoding order of the current point cloud, the K neighboring points being K attribute-encoded points nearest to the current point, where K is a positive integer; Predicting the attribute information of the current point based on the attribute prediction mode of the current point to obtain the attribute prediction value of the current point; Based on the attribute prediction value of the current point, the attribute information of the current point is encoded to obtain a code stream.
16. A point cloud attribute decoding device, characterized in that: Applied to a processor device, the apparatus comprises: a prediction mode determination unit, configured to determine an attribute prediction mode for the current point if the current point whose attributes are to be decoded is a repeated point in the current point cloud, the attribute prediction mode comprising at least one of an attribute prediction mode based on a preceding point and an attribute prediction mode based on K neighboring points, the preceding point being an attribute-decoded point preceding the current point in the attribute decoding order of the current point cloud, the K neighboring points being K attribute-decoded points nearest to the current point, where K is a positive integer; A prediction unit, configured to predict attribute information of the current point based on an attribute prediction mode of the current point to obtain an attribute prediction value of the current point; The reconstruction unit is configured to determine a property reconstruction value of the current point based on the property prediction value of the current point.
17. A point cloud attribute encoding device, characterized in that: Applied to a processor device, the apparatus comprises: a prediction mode determining unit, configured to determine, if a current point in a current point cloud whose attribute information is to be encoded is a repeated point in the current point cloud, an attribute prediction mode for the current point, the attribute prediction mode comprising at least one of an attribute prediction mode based on a preceding point and an attribute prediction mode based on K neighboring points, the preceding point being an attribute-encoded point preceding the current point in an attribute encoding order of the current point cloud, the K neighboring points being K attribute-encoded points nearest to the current point, where K is a positive integer; A prediction unit, configured to predict attribute information of the current point based on an attribute prediction mode of the current point to obtain an attribute prediction value of the current point; The encoding unit is configured to encode the attribute information of the current point based on the attribute prediction value of the current point to obtain a code stream.
18. A computer device comprising a processor and a memory; The memory is used to store computer programs; The processor is configured to execute the computer program to implement the method according to any one of claims 1 to 14 or 15 to 17.
19. A readable storage medium, characterized in that The readable storage medium stores a program or instruction, and when the program or instruction is executed by the processor, the decoding method according to any one of claims 1 to 14 is implemented, or the encoding method according to claim 15 is implemented to generate and store a code stream.
20. A computer program product, characterized in that The method comprises computer instructions, which, when executed by a processor, implement the decoding method according to any one of claims 1 to 14, or implement the encoding method according to claim 15.