Point cloud processing method, apparatus, device, and medium
By using prediction tree coding technology to perform secondary prediction on the geometric residual signal in point cloud coding, the problem of excessive bit count caused by excessively large geometric residual values in point cloud coding is solved, thus improving the encoding and decoding efficiency of point cloud data.
Patent Information
- Application Number
- CN202210691565.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-18
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2042-06-18
AI Technical Summary
In existing point cloud encoding, the large dynamic range of point clouds leads to excessively large geometric residual values, which in turn results in an excessive number of bits being used for encoding, thus reducing the encoding and decoding efficiency of point cloud data.
By acquiring the coding pattern information of the point cloud, the geometric residual signal is predicted a second time using the prediction tree coding technique, thereby reducing the value of the residual code and improving the efficiency of geometric encoding and decoding.
Without affecting the reconstruction of individual points in the point cloud, the geometric encoding and decoding efficiency of the point cloud is improved, and the transmission efficiency of the point cloud data is increased.
Smart Images

Figure CN115100302B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to point cloud encoding technology, and in particular to a point cloud processing method and device, equipment and medium. BACKGROUND
[0002] A point cloud is a set of discrete points in space that express the spatial structure and surface attributes of a three-dimensional object or scene, and the point cloud can be applied in virtual reality (VR) games, computer-aided design (CAD), three-dimensional point cloud remote presentation, and three-dimensional reconstruction of biological tissues.
[0003] At present, before transmitting a point cloud, an encoding end usually needs to perform encoding processing on the point cloud, and the encoded point cloud is transmitted to a decoding end. After receiving the encoded point cloud, the decoding end can perform decoding processing on the encoded point cloud to reconstruct the point cloud data of each point in the point cloud. In existing point cloud encoding, the geometric residual information in the point cloud data of each point in the point cloud needs to be encoded. Since the dynamic range of the point cloud is large, the geometric residual value is too large, and thus the number of bits occupied by encoding is too large, which reduces the encoding and decoding efficiency of the point cloud data. SUMMARY
[0004] The embodiments of the present application provide a point cloud processing method, device, equipment and medium, which can improve the geometric encoding and decoding efficiency of the point cloud.
[0005] In one aspect, the embodiments of the present application provide a point cloud processing method, comprising:
[0006] obtaining encoding mode information of a point cloud;
[0007] performing decoding processing on a to-be-decoded point in the point cloud according to the encoding mode information, to obtain second residual information of the to-be-decoded point in each of K directions; K is a positive integer;
[0008] determining first residual information of the to-be-decoded point in each of the K directions based on the second residual information of the to-be-decoded point in each of the K directions; a second residual value in the second residual information is less than or equal to a first residual value in the first residual information;
[0009] reconstructing geometric information of the to-be-decoded point according to the first residual information of the to-be-decoded point in each of the K directions.
[0010] In one aspect, the embodiments of the present application provide a point cloud processing method, comprising:
[0011] determining encoding mode information of a point cloud;
[0012] obtaining first residual information of a to-be-encoded point in the point cloud in each of K directions; K is a positive integer;
[0013] determine the first residual information of the to-be-encoded point in each of the K directions based on the first residual information of the to-be-encoded point in each of the K directions; a first residual value in the first residual information is greater than or equal to a second residual value in the second residual information;
[0014] encode the second residual information of the to-be-encoded point in each of the K directions according to the encoding mode information.
[0015] An embodiment of the present application provides a point cloud processing device, which comprises:
[0016] an obtaining module, configured to obtain encoding mode information of a point cloud;
[0017] a decoding module, configured to decode a to-be-decoded point in the point cloud according to the encoding mode information, and obtain second residual information of the to-be-decoded point in each of K directions; K is a positive integer;
[0018] The decoding module is further configured to determine first residual information of the to-be-decoded point in each of the K directions based on the second residual information of the to-be-decoded point in each of the K directions; a second residual value in the second residual information is less than or equal to a first residual value in the first residual information;
[0019] a reconstructing module, configured to reconstruct geometric information of the to-be-decoded point according to the first residual information of the to-be-decoded point in each of the K directions.
[0020] An embodiment of the present application provides a point cloud processing device, which comprises:
[0021] a determining module, configured to determine encoding mode information of a point cloud;
[0022] a residual information obtaining module, configured to obtain first residual information of a to-be-encoded point in each of K directions in the point cloud; K is a positive integer;
[0023] The residual information obtaining module is further configured to determine second residual information of the to-be-encoded point in each of the K directions based on the first residual information of the to-be-encoded point in each of the K directions; a first residual value in the first residual information is greater than or equal to a second residual value in the second residual information;
[0024] an encoding module, configured to encode the second residual information of the to-be-encoded point in each of the K directions according to the encoding mode information.
[0025] The embodiment of the present application provides a computer device, including a memory and a processor, the memory is connected with the processor, the memory is used for storing a computer program, and the processor is used for calling the computer program, so that the computer device executes the method provided in the above-mentioned aspect of the embodiment of the present application.
[0026] The embodiment of the present application provides a computer readable storage medium, and the computer readable storage medium stores a computer program. The computer program is suitable for being loaded and executed by a processor, so that a computer device with the processor executes the method provided in the above-mentioned aspect of the embodiment of the present application.
[0027] According to an aspect of the present application, a computer program product or computer program is provided, which includes 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 the processor executes the computer instructions, so that the computer device executes the method provided in the above-mentioned aspect.
[0028] In the embodiment of the present application, in the decoding process of the point cloud, the encoding mode information of the point cloud can be obtained, the decoding processing is performed on the to-be-decoded point in the point cloud based on the encoding mode information, the second residual information of the to-be-decoded point can be obtained, and then the first residual information is determined based on the second residual information. The geometric information of the to-be-decoded point can be reconstructed through the first residual information, and the first created residual value in the second residual information is less than or equal to the first residual value in the first residual information. In the point cloud decoding process, after the second residual information is obtained through decoding, the second residual information is inversely predicted through the correlation of the geometric residual information of the to-be-decoded point in the K directions, so that the geometric decoding efficiency of the point cloud can be improved. BRIEF DESCRIPTION OF DRAWINGS
[0029] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed in the embodiment or prior art description will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without creative labor.
[0030] Figure 1 is a schematic diagram of an architecture of a point cloud processing system provided by the embodiment of the present application;
[0031] Figure 2 is a schematic diagram of an encoding framework of a point cloud provided by the embodiment of the present application;
[0032] Figure 3 is a schematic diagram of determining a bounding box of a point cloud provided by the embodiment of the present application;
[0033] Figure 4 is a schematic diagram of an octree coding structure provided by an embodiment of the present application;
[0034] Figure 5 is a schematic diagram of a prediction tree coding structure provided by an embodiment of the present application;
[0035] Figure 6 is another schematic diagram of a prediction tree coding structure provided by an embodiment of the present application;
[0036] Figure 7 is a schematic diagram of a point cloud processing method provided by an embodiment of the present application;
[0037] Figure 8 is another schematic diagram of a point cloud processing method provided by an embodiment of the present application;
[0038] Figure 9 is a schematic diagram of a point cloud processing apparatus provided by an embodiment of the present application;
[0039] Figure 10 is another schematic diagram of a point cloud processing apparatus provided by an embodiment of the present application;
[0040] Figure 11 is a schematic diagram of a computer device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0041] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without any creative work fall within the scope of protection of the present application.
[0042] The embodiments of the present application relate to point cloud processing technology. Point cloud refers to a set of discrete points that are irregularly distributed in space and express the spatial structure and surface attributes of a three-dimensional object or scene. Point clouds can be divided into different categories according to different classification standards. For example, according to the acquisition method of point clouds, they can be divided into dense point clouds and sparse point clouds. For another example, according to the time sequence type of point clouds, they can be divided into static point clouds and dynamic point clouds.
[0043] The point cloud data is a specific recording form of the point cloud, and the point cloud data of each point in the point cloud can include geometric information (for example, three-dimensional position information) and attribute information; wherein the geometric information of each point in the point cloud can be the Cartesian three-dimensional coordinate data of the point, and the attribute information of each point in the point cloud can include but is not limited to at least one of the following: color information, material information, and laser reflection intensity information. Generally, each point in the point cloud can have the same number of attribute information; for example, each point in the point cloud can have two attribute information of color information and laser reflection intensity information; or each point in the point cloud can have three attribute information of color information, material information, and laser reflection intensity information.
[0044] The point cloud data can be obtained in the following ways: 1. generated by a computer device. The computer device can generate the point cloud data according to a virtual three-dimensional object and a virtual three-dimensional scene. 2. obtained by three-dimensional (3-Dimension, 3D) laser scanning. The 3D laser scanning can obtain the point cloud data of a three-dimensional object or a three-dimensional scene in a static real world, and can obtain millions of point cloud data per second. 3. obtained by measuring with a 3D camera device. The 3D camera device (for example, a group of cameras or a camera device with multiple lenses and sensors) can collect a visual scene of a real world to obtain the point cloud data of the visual scene of the real world, and can obtain the point cloud data of a three-dimensional object or a three-dimensional scene in a dynamic real world. 4. obtained by a medical device to obtain the point cloud data of a biological tissue organ. In the medical field, the point cloud data of a biological tissue organ can be obtained by a magnetic resonance imaging (Magnetic Resonance Imaging, MRI), a computed tomography (Computed Tomography, CT), and electromagnetic positioning information.
[0045] The embodiments of the present application can also be combined with cloud computing, cloud storage and other technologies in cloud technology. Cloud computing is a computing mode that distributes computing tasks on a resource pool formed by a large number of computers, so that various application systems can obtain computing power, storage space and information services according to needs. Cloud computing can provide strong computing support for point cloud encoding and decoding processes, which can greatly improve the geometric encoding and decoding efficiency of the point cloud.
[0046] Cloud Storage is a new concept extended and developed on the basis of the concept of cloud computing. A distributed cloud storage system (hereinafter referred to as a storage system) refers to a storage system that, through functions such as cluster application, grid technology, and distributed storage file system, collects a large number of various types of storage devices (storage devices are also referred to as storage nodes) in a network through application software or application interfaces to work together to provide data storage and business access functions to the outside. Cloud storage can provide strong storage support for point cloud encoding and decoding stages, thereby reducing the data storage pressure of point cloud in the encoding and decoding process, and further improving the data processing efficiency.
[0047] Please refer to Figure 1 , Figure 1 is an architecture diagram of a point cloud processing system provided by an embodiment of the present application. The point cloud system can include an encoding device and a decoding device. The encoding device can be an electronic device used by a provider of point cloud, which can be a terminal or a server. The decoding device can be an electronic device used by a user of point cloud, which can be a terminal or a server. The encoding device and the decoding device can be connected through wired or wireless communication mode, so that the encoding device and the decoding device can transmit data.
[0048] The terminal can include, but is not limited to, a smart phone, a tablet computer, a notebook computer, a palm computer, a mobile internet device (MID), a wearable device (such as a smart watch, a smart bracelet, etc.), a smart voice interaction device, a smart home appliance (such as a smart television, etc.), a vehicle-mounted device, a VR device (such as a VR headset, a VR glasses, etc.), and the like. The server can be a standalone physical server, a server cluster or a distributed system composed of multiple physical servers, a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDNs, and big data and artificial intelligence platforms, and the like.
[0049] The point cloud processing process includes a data processing process on the encoding device side and a data processing process on the decoding device side.
[0050] (1) Point cloud data (geometric information and attribute information of each point in the point cloud) acquisition process.
[0051] The encoding device can obtain point cloud data by capturing a visual scene of the real world through a capturing device, or generating point cloud data through a computer device, etc. The point cloud data obtained in this way can be referred to as a data source, and the present application does not limit the acquisition method of point cloud data.
[0052] In an implementation, the capturing device can be a hardware component arranged in the encoding device, for example, the capturing device is a camera, a sensor, etc. of the terminal. The capturing device can also be a hardware device connected to the encoding device, for example, a camera connected to the server, etc. The capturing device is used to provide the content production device with a point cloud data acquisition service. The capturing device can include, but is not limited to, any one of the following: a camera device, a sensor device, a scanning device; wherein the camera device can include a normal camera, a stereo camera, a light field camera, etc.; the sensor device can include a laser device, a radar device, etc.; the scanning device can include a 3D laser scanning device, etc. The number of capturing devices can be multiple, and these capturing devices are deployed at some specific positions in a real space to simultaneously capture point cloud data at different angles in the space, and the captured point cloud data is kept synchronized in time and space. In another implementation, the computer device can generate point cloud data according to the virtual three-dimensional object and the virtual three-dimensional scene. Due to different acquisition methods of point cloud data, the compression encoding method corresponding to the point cloud data acquired by different methods can also be different.
[0053] (2) Point cloud data encoding and packaging process.
[0054] The encoder in the encoding device can encode the point cloud data according to the type of the point cloud data by using a corresponding point cloud compression (PCC) method to obtain a compressed code stream of the point cloud data. The point cloud compression method can include, but is not limited to, Geometry-based Point Cloud Compression (G-PCC) in Moving Picture Expert Group (MPEG) or Point Cloud Compression (AVS-PCC) in Audio Video Coding Standard (AVS).
[0055] It should be noted that, since the point cloud data includes the geometric information and the attribute information of each point in the point cloud, the encoding device can encode the geometric information of each point in the point cloud by using the encoder to obtain a geometric bit stream, and can encode the attribute information of each point in the point cloud to obtain an attribute bit stream. The geometric bit stream and the attribute bit stream can be combined into a compressed code stream corresponding to the point cloud. In the compressed code stream, the encoding of the attribute information of each point in the point cloud and the encoding of the geometric information can be one-to-one corresponding in sequence.
[0056] The encoding process of the geometry information of each point in the point cloud is mainly for geometry residual information of each point in the point cloud. The geometry residual information can be a residual value with a sign carried by each point in the point cloud in each direction (x, y, and z directions). The encoding process of the geometry residual information can be divided into an encoding process of an unsigned residual value (which can be an absolute value of the residual value with a sign carried) and an encoding process of residual sign bit information, that is, independent encoding of a value and a sign. The geometry bit stream encoded by the encoding device can include the encoding of the unsigned residual value corresponding to each point in the point cloud and the encoding of the residual sign bit information corresponding to each point in the point cloud. In the geometry bit stream, the encoding of the unsigned residual value and the encoding of the residual sign bit information can also be one-to-one corresponding in sequence.
[0057] Optionally, the encoding device can also encapsulate the encoded compression code stream to obtain one or more encapsulation files. The one or more encapsulation files can be transmitted to the decoding device through the output interface of the encoding device, or can be transmitted to the storage module for storage.
[0058] (3) The encapsulation file of the point cloud data is unpacked and decoded.
[0059] The decoding device can obtain the one or more encapsulation files transmitted by the output interface of the encoding device through the input interface, or obtain the one or more encapsulation files from the storage module. The unpacking process of the encapsulation file by the decoding device is inverse to the file encapsulation process of the decoding device. The decoding device unpacks the encapsulation file of the point cloud according to the file format requirement of the point cloud to obtain the compression code stream. The decoding process of the decoding device is inverse to the encoding process of the encoding device. The decoding device decodes the geometry bit stream in the compression code stream and decodes the attribute bit stream in the compression code stream to reconstruct the point cloud data of each point in the point cloud. The decoding process of the geometry bit stream by the decoding device can analyze the encoding of the residual sign bit information and the encoding of the unsigned residual value. The unpacking process of the encapsulation file and the decoding process of the encoding bit stream can be performed by the decoder in the decoding device.
[0060] (4) The rendering process of the point cloud data.
[0061] The decoding device can render the point cloud decoded from the compression code stream. The rendering is completed to realize the presentation of the visual scene corresponding to the point cloud. The content after the rendering can be displayed in the display module of the decoding device.
[0062] It can be understood that different encoding methods can have different encoding frameworks. The present application relates to the geometry information encoding process in point cloud encoding, which can be applied to all point cloud encoding methods involving geometry information encoding, and the present application does not limit this.
[0063] For the convenience of understanding, the coding framework of G-PCC is described below by taking G-PCC coding mode as an example. As shown in FIG. 1, G-PCC can be divided into a geometry information coding process and an attribute information coding process. In the geometry information coding process, the geometry information of each point in the point cloud is coded to obtain a geometry bitstream; in the attribute information coding process, the attribute information of each point in the point cloud is coded to obtain an attribute bitstream; the geometry bitstream and the attribute bitstream jointly constitute a compressed code stream of the point cloud. Figure 2
[0064] Among them, for the geometry information coding process, the main operations and processes can be referred to the following description:
[0065] ① Pre-processing: can include transform coordinates and voxelize. Through the operation of scaling and translation, the point cloud data in three-dimensional space is converted into integer form, and its minimum geometric position is moved to the coordinate origin.
[0066] ② Geometry encoding: geometry encoding can include two modes, which are octree-based geometry encoding and trisoup-based geometry encoding, and the two encoding modes can be used under different conditions. Among them:
[0067] Octree-based geometry encoding: octree is a tree data structure, which uniformly divides the pre-set bounding box in three-dimensional space, and each node has eight child nodes. By using "1" and "0" to indicate whether each child node of the octree is occupied or not, occupancy code information is obtained as the code stream of the point cloud geometry information. Among them, the bounding box can refer to the smallest cuboid containing all points in the point cloud, and its specific implementation mode can be referred to the description in the embodiment corresponding to Figure 3 ; the coding structure of octree can be referred to the description in the embodiment corresponding to Figure 4 .
[0068] Trisoup-based geometry encoding: the point cloud is divided into blocks of a certain size, the intersection points of the edges of the point cloud surface in the block are located, and triangles are constructed. The compression of geometry information is realized by encoding the intersection point positions.
[0069] ③Geometry Quantization: The quantization precision is usually determined by a quantization parameter (QP). The larger the QP value, the larger the range of the coefficients that will be quantized to the same output, thus usually resulting in larger distortion and lower bit rate. Conversely, the smaller the QP value, the smaller the range of the coefficients that will be quantized to the same output, thus usually resulting in smaller distortion and higher bit rate. In the process of point cloud encoding, geometry quantization can be achieved by the coordinate information of each point in the point cloud, as shown in FIG. 8, and geometry quantization can be achieved by the constructed geometry prediction tree. Figure 2
[0070] ④Geometry Entropy Encoding: Statistical compression encoding is performed on the occupancy code information of the octree, and finally the binary (0 or 1) compressed code stream is output. Statistical encoding is a lossless encoding method that can effectively reduce the bit rate required to express the same signal. The commonly used statistical encoding method is content adaptive binary arithmetic coding (CABAC), as shown in FIG. 9, which is a geometry arithmetic coding. Figure 2
[0071] In the process of attribute information encoding, the main operations and processes can be referred to the following description:
[0072] ①Recoloring: In the case of lossy encoding, the encoding end (also referred to as an encoding device) decodes and reconstructs the geometry information after the geometry information is encoded, i.e., restores the geometry information of each point in the point cloud. The attribute information of one or more neighboring points in the original point cloud is found as the attribute information of the reconstructed point.
[0073] ②Transform: The attribute transform encoding can include three modes, namely predicting transform, lifting transform, and region adaptive hierarchical transform (RAHT), which can be used under different conditions. Among them:
[0074] Predictive Transform Coding: According to the distance selection sub-point set, the point cloud is divided into multiple different levels (Level of Detail, LoD), realizing the rough-to-fine point cloud representation. The adjacent layers can realize the top-down prediction, that is, the attribute information of the points introduced in the fine layer is predicted by the adjacent points in the rough layer, and the corresponding residual signal is obtained. Among them, the point cloud data of the bottom layer is encoded as reference information.
[0075] Elevated Transform Coding: On the basis of LoD adjacent layer prediction, the weight update strategy of the neighborhood points is introduced, and finally the prediction attribute value of each point is obtained, and the corresponding residual signal is obtained.
[0076] Hierarchical Region Adaptive Transform Coding: The attribute information is converted into the transform domain through RAHT transform, which is called transform coefficient. Among them, the RAHT transform is carried out on the basis of the hierarchical structure obtained by octree division of the point cloud data in the point cloud, and the transform is carried out from the bottom layer of the octree.
[0077] ③Attribute Quantization: The degree of quantization is usually determined by the quantization parameter. In predictive transform coding and elevated transform coding, the quantized residual value is entropy coded; in RAHT transform, the quantized transform coefficient is entropy coded.
[0078] ④Attribute Entropy Coding: The quantized attribute residual signal or transform coefficient is generally compressed using run length coding and arithmetic coding. The corresponding coding mode, quantization parameter and other information are also encoded by the entropy encoder. As shown in the following formula (1), attribute entropy coding can use attribute arithmetic coding, that is, arithmetic coding is used to encode the quantized attribute residual signal or transform coefficient. Figure 2
[0079] Based on the above-described geometric information encoding process and attribute information encoding process, the encoding process of each point in the point cloud can be completed, and a compressed bitstream composed of a geometric bitstream and an attribute bitstream is generated. The compressed bitstream can be transmitted to the decoding end (decoding device), and the point cloud decoding process of the decoding end can be referred to the following description:
[0080] Point cloud decoding refers to the process of decoding the compressed bitstream obtained from point cloud encoding to reconstruct the point cloud. Specifically, point cloud decoding is the process of reconstructing the geometric and attribute information of each point in the point cloud based on the geometric bitstream and attribute bitstream in the compressed bitstream. After obtaining the compressed bitstream at the decoding end, for the geometric bitstream, entropy decoding is first performed to obtain the quantized geometric information of each point in the point cloud, and then inverse quantization is performed to reconstruct the geometric information of each point in the point cloud. For the attribute bitstream, entropy decoding is first performed to obtain the quantized prediction residual information or quantized transform coefficients of each point in the point cloud; then, the quantized prediction residual information is inverse quantized to obtain the reconstructed residual information, and the quantized transform coefficients are inverse quantized to obtain the reconstructed transform coefficients. The reconstructed transform coefficients are then inversely transformed to obtain the reconstructed residual information. Based on the reconstructed residual information of each point in the point cloud, the attribute information of each point in the point cloud can be reconstructed. The reconstructed attribute information of each point in the point cloud is then matched one-to-one with the reconstructed geometric information in sequence to reconstruct the point cloud.
[0081] In the point cloud processing scheme proposed in the embodiments of this application, it is possible to... Figure 2 In the geometric information encoding process shown, the geometric residual signal (which can be called the second residual information) generated by the geometric prediction tree is used for secondary prediction. That is, based on the information correlation of the geometric residual signal encoded by the prediction tree, the value of the residual encoding is reduced as much as possible, thereby improving the geometric encoding efficiency without affecting the reconstruction of single points in the point cloud. Similarly, the point cloud processing scheme proposed in the embodiments of this application is also applicable to the decoding end, which can improve the geometric decoding efficiency.
[0082] The following describes the basic technologies involved in the point cloud processing method proposed in the embodiments of this application:
[0083] (1) Preprocessing:
[0084] The floating-point coordinates of each point in the input point cloud are represented as (x... n ,y n ,z n ), n = 0, ..., N-1, where N is the number of points in the point cloud, and the coordinates of the points are (x, y, y). min ,y min ,z min ) and coordinates (x) max ,y max ,z max The following is represented:
[0085] x min =min(x 0 ,x 1 ,…,x N-1 )
[0086] y min =min(y 0 ,y1 ,…,y N-1 )
[0087] z min =min(z 0 ,z 1 ,…,z N-1 )
[0088] x max =max(x 0 ,x 1 ,…,x N-1 )
[0089] y max =max(y 0 ,y 1 ,…,y N-1 )
[0090] z max =max(z 0 ,z 1 ,…,z N-1 )
[0091] wherein the function min(s 0 ,s 1 ,…,s N-1 ) represents taking the minimum value in the N points contained in the current input point cloud, and the function max(s 0 ,s 1 ,…,s N-1 ) represents taking the maximum value in the N points contained in the current input point cloud, and the s here can be any coordinate value of the coordinates x, y, z.
[0092] See Figure 3 , Figure 3 is a schematic diagram of determining a bounding box of a point cloud provided by an embodiment of the present application. As shown in Figure 3 , the bounding box can be used to represent the minimum cuboid that can contain all the points in the input point cloud, and the origin coordinates (x origin , y origin , z origin ) of the bounding box can be calculated as follows:
[0093] x origin =int(floor(x min ))
[0094] y origin =int(floor(y min ))
[0095] z origin =int(floor(z min ))
[0096] The size of the bounding box in x, y, z directions can be calculated as follows:
[0097] BoudingBoxSize x = int(x max -x origin )+1
[0098] BoudingBoxSize y = int(y max -y origin )+1
[0099] BoudingBoxSize z = int(z max -z origin )+1
[0100] Wherein, int(s) is an integer function, and the floor(s) function returns the maximum integer value less than or equal to s.
[0101] (2) Octree coding:
[0102] The octree is a tree data structure, and at present, the octree structure is mainly used to divide the point cloud in G-PCC or AVS-PCC. For point cloud data in three-dimensional space, the octree division method is to uniformly divide the pre-set bounding box layer by layer, and each node has eight child nodes. Whether each child node in the octree is occupied or not is indicated by "1" and "0".
[0103] Please refer to Figure 4 , Figure 4 An octree coding structure diagram provided by an embodiment of the present application. By dividing the bounding box containing all points in the point cloud, the octree corresponding to the point cloud is obtained, as shown in the area 40a shown in Figure 4 Each sub-area in the area 40a can be considered as a child node of the octree, and the filled sub-area can be used to indicate that the child node is occupied, and therefore can be represented as "1"; the unfilled sub-area can be used to indicate that the child node is not occupied, and therefore can be represented as "0".
[0104] As shown in Figure 4 , the node 1, the node 2 and the node 3 in the area 40a are all occupied nodes, and by dividing the node 1, the occupancy code information "10000001" can be obtained; by dividing the node 2, the occupancy code information "00011000" can be obtained; by dividing the node 3, the occupancy code information "10001000" can be obtained. The obtained occupancy code information can be used as the code stream of the point cloud geometry information.
[0105] The octree is constructed based on a Morton sequence, i.e., three-dimensional coordinate information of point cloud data is converted into corresponding Morton codes by querying a Morton sequence table. According to the ordering of each bit of the Morton code, the corresponding points of each layer of the octree are obtained. The mainstream point cloud coding technology at present is to represent point cloud data by using octree division. For geometric information and attribute information, different processing procedures can be adopted.
[0106] (3) TSP (Traveling Salesman Problem, traveling salesman problem):
[0107] The TSP problem is a classic combinatorial optimization problem. The classic TSP can be described as follows: a salesman needs to go to several cities to sell goods. The salesman starts from a city, needs to go through all the cities, and then returns to the starting city. How should the route be selected to make the total journey shortest? From the perspective of graph theory, the problem is essentially to find a loop with the minimum weight in a complete undirected graph with weights. Since the feasible solution of the problem is the full permutation of all vertices, as the number of vertices increases, combinatorial explosion will occur, and it is an NP (Non-deterministic Polynomial, polynomial complexity of non-deterministic problem) complete problem, which has wide application in the fields of transportation, circuit board design, and logistics distribution. Early researchers used exact algorithms to solve the problem, and the commonly used methods include branch and bound method, linear programming method, dynamic programming method, etc. However, as the problem size increases, the exact algorithm will become useless, so in later research, domestic and foreign scholars focus on using approximate algorithms or heuristic algorithms, mainly including genetic algorithm, simulated annealing method, ant colony algorithm, tabu search algorithm, greedy algorithm, and neural network, etc., which are not limited in the present application.
[0108] For example, the TSP is modeled by using an undirected weighted graph, in which the cities are the vertices of the graph, the roads are the edges of the graph, and the distance of the road is the length of the edge. It is a minimization problem in which the start and end points are in a particular vertex, and each vertex is visited exactly once. Usually, the model is a complete graph (i.e., each pair of vertices is connected by an edge). If there is no path between two cities, a very long edge can be added to complete the graph without affecting the calculation of the optimal loop.
[0109] In the symmetric TSP problem, the distance between two cities is equal in both directions, forming an undirected graph. This symmetry reduces the number of solutions by half. In the asymmetric TSP problem, there may not be a path in both directions, or the distance in both directions may be different, forming a directed graph. Traffic accidents, one-way streets, and different prices for tickets to and from some cities are examples that break this symmetry.
[0110] (4) Prediction coding techniques:
[0111] The prediction relationship between corresponding signals can be generated by using the foregoing TSP. In the prediction tree, all points in the point cloud can be linked into a single prediction tree, and each point is predicted based on the signal value of the previous point. Specifically, the method can search for the nearest point in a limited range based on the starting point information, link the nearest point one by one, and link all points into a single-chain prediction tree. The unordered point cloud is arranged into an ordered structure based on the prediction tree, and each point takes the signal value of the previous point or multiple points as the prediction value, and encodes the residual value.
[0112] The method can be used for the entire original point cloud or for the point cloud data subset obtained by the octree subnode or other methods. In other words, the prediction tree in the embodiment of the application can correspond to all points in the point cloud, or correspond to a single subnode in the octree, or correspond to a subset of point cloud data in the point cloud determined by any other method, which is not limited in the application.
[0113] In the G-PCC, the prediction coding technique already exists, which uses the distance search between points to establish a prediction tree. As shown in Figure 5 , Figure 5 is a prediction tree coding structure diagram provided by an embodiment of the application. As shown in Figure 5 , the prediction tree coding structure can be the prediction tree coding structure in AVS, and the Figure 5 shown in the prediction tree is a single-chain prediction tree (including a root node and a leaf node, and the remaining nodes except the leaf node only have one subnode).
[0114] Please refer to Figure 6 , Figure 6 is another prediction tree coding structure diagram provided by an embodiment of the application. As shown in Figure 6 , the prediction tree coding structure can be the prediction tree coding structure in MPEG, and the Figure 6 shown in the prediction tree is a multi-chain prediction tree (including a root node and multiple leaf nodes, and the remaining nodes except the leaf nodes can have one or more subnodes, such as a branch node with one subnode, a branch node with two subnodes, a branch node with three subnodes, etc.).
[0115] In the prediction tree coding structure, each node is connected to other nodes, and indicates the number of linked points and one of the four prediction modes of each node. The four prediction modes are as follows:
[0116] 1) No prediction.
[0117] 2) parent point (one generation parent node) prediction, i.e. using the previous node for difference prediction; as shown for node 60d, node 60c is the parent point of node 60d. Figure 6
[0118] 3) parent point (one generation parent node) and grandparent point (two generation parent node) prediction; as shown for node 60d, node 60c is the parent point of node 60d, and node 60b is the grandparent point of node 60d. Figure 6
[0119] 4) parent point (one generation parent node), grandparent point (two generation parent node), and grand-grandparent point (three generation parent node) prediction; as shown for node 60d, node 60c is the parent point of node 60d, node 60b is the grandparent point of node 60d, and node 60a is the grand-grandparent point of node 60d. Figure 6
[0120] (5) Entropy coding techniques.
[0121] Entropy coding techniques are used to binarize and process the signed attribute prediction residuals or transform coefficients after quantization (in lossy case); the entropy coding techniques can include but are not limited to variable length coding, CABAC. Among them:
[0122] 1) Variable length coding: different length of codewords are used to represent the residuals or coefficients that need to be coded. The code length needs to be designed according to the probability of the symbol appearing. Commonly used include exponential Golomb and arithmetic coding.
[0123] 2) CABAC: CABAC can include the following steps:
[0124] ① Binarization: CABAC uses binary arithmetic coding, which means only two numbers (1 or 0) are coded. A non-binary numerical symbol, such as a transform coefficient or a motion vector, will first be binarized or converted into a binary codeword before arithmetic coding. This process is similar to converting a numerical value into a variable length codeword, but the binary codeword is further coded by the arithmetic coder before transmission.
[0125] ② Context model selection: the context model is a probability model, which is a model selected according to the statistics of the recently coded data symbols. This model keeps the probability of each "bin" being 1 or 0.
[0126] Arithmetic coding: an arithmetic encoder encodes each "bin" according to a selected probability model.
[0127] Probability update: the selected context model is updated according to the actual encoded value. For example, if the value of the "bin" is 1, the frequency count of 1 is increased.
[0128] Before the specific implementation process of the point cloud processing scheme is described, the syntax table involved in the embodiments of the present application is introduced, and the syntax table is shown in Table 1 as follows:
[0129] Table 1
[0130]
[0131] For example, the semantics of the syntax table shown in Table 1 is as follows: nodeIdx is used to indicate the current point to be encoded in the point cloud, or can be understood as the current to-be-encoded point generated by the geometry prediction tree. Geometric residual information (for example, second residual information); i is used to indicate the i-th direction of the to-be-encoded point.
[0132] ptn_residual_eq0_flag(residual value flag field) is used to indicate whether the current residual value (residual value in the i-th direction) is 0; when the ptn_residual_eq0_flag is set to 0, it indicates that the current residual value is 0, and when the ptn_residual_eq0_flag is set to 1, it indicates that the current residual value is a non-zero value.
[0133] ptn_residual_sign_flag(residual sign flag field) is used to indicate the sign bit information of the current residual value; when the ptn_residual_sign_flag is set to 0, it indicates that the current residual value is negative, and when the ptn_residual_sign_flag is set to 1, it indicates that the current residual value is non-negative.
[0134] ptn_residual_numbits(occupied bit number field) is used to indicate the number of bits occupied by the current to-be-encoded value, which can be the current residual value or the quotient value after the current residual value is taken modulo (for example, modulo 2).
[0135] ptn_residual_value_per(occupied bit value field) is used to indicate the value of each bit in the occupied bit number.
[0136] See Figure 7 , Figure 7is a flowchart of a point cloud processing method provided by an embodiment of the present application. It can be understood that the point cloud processing method can be executed by a computer device, which can be a decoding device as shown in Figure 1 The point cloud processing method corresponds to a decoding method. As shown in Figure 7 The point cloud processing method can include the following steps S101-S104:
[0137] Step S101: Obtain the encoding mode information of the point cloud.
[0138] In the point cloud decoding process, the encoding mode information of the point cloud can be obtained, which can include the encoding mode of a to-be-decoded point in the point cloud. The to-be-decoded point can be any point in the point cloud that has not been decoded. The multi-dimensional space coordinates of the to-be-decoded point can be three-dimensional space coordinates (including x, y, and z directions). Therefore, the encoding mode of the to-be-decoded point can be considered as the encoding mode of the to-be-decoded point in K directions, where K can be a positive integer, such as 1, 2, 3, …; the encoding mode of the to-be-decoded point in K directions can be the same or different, which is not limited by the present application. For ease of understanding, the present embodiment takes K as 3 (including x, y, and z directions in three-dimensional space coordinates, the x direction can also be referred to as the horizontal coordinate direction, the y direction can be referred to as the vertical coordinate direction, and the z direction can be referred to as the vertical coordinate direction), and the encoding mode of the to-be-decoded point in each direction is the same as an example for description.
[0139] The encoding mode information can be obtained in the following ways, but not limited to:
[0140] (1) The encoding end (encoding device) and the decoding end (decoding device) use the same encoding mode for all points in the point cloud by default. Specifically, the default encoding mode negotiated and set by the decoding end and the encoding end is obtained, and the default encoding mode is determined as the encoding mode information of the to-be-decoded point in the point cloud. The default encoding mode is the encoding mode of the to-be-decoded point in the point cloud, and is also the encoding mode commonly used by all points in the point cloud.
[0141] (2) The corresponding encoding mode information is parsed from the encoding parameter set or the encoding bitstream (which can be the aforementioned geometry bitstream) of the point cloud. Specifically, the encoding parameter set or the encoding bitstream of the point cloud can be parsed to obtain the encoding mode of the to-be-decoded point in the point cloud, and the encoding mode of the to-be-decoded point is determined as the encoding mode information of the point cloud. When the encoding parameter set contains mode information, the decoding end needs to parse the encoding parameter set to obtain the encoding mode information of the to-be-decoded point. When the encoding parameter set does not contain mode information, the encoding bitstream can be directly parsed to obtain the encoding mode information of the to-be-decoded point.
[0142] (3) The coding end and the decoding end determine the threshold value by default or parse the corresponding threshold value from the encoding parameter set or the encoding bitstream of the point cloud, and determine the corresponding encoding mode information. Specifically, the threshold value can be determined by negotiation between the coding end and the decoding end, or the threshold value can be parsed from the encoding parameter set or the encoding bitstream of the point cloud. Wherein:
[0143] ① When the threshold value includes a first threshold value (default parameter t1, t1> 0), the statistical characteristic information corresponding to the residual analysis information of the to-be-decoded point is obtained, and the encoding mode of the to-be-decoded point is determined based on the numerical comparison relationship between the statistical characteristic information and the first threshold value, and the encoding mode of the to-be-decoded point is determined as the encoding mode information.
[0144] Wherein, the residual analysis information of the to-be-decoded point can be the second residual information of the to-be-decoded point parsed, or the first residual information of the to-be-decoded point parsed, which is not limited in the present application. The second residual information in the decoding method corresponds to the residual information obtained by the encoding method (to be described in detail below) of the present application, and the first residual information is obtained by inverse prediction on the second residual information. The first residual information in the encoding method can refer to the real residual information obtained by the geometric prediction tree in the encoding process, and the second residual information can refer to the residual information obtained by secondary prediction in the direction of the correlation of the first residual information.
[0145] The statistical characteristic information can include but is not limited to: the average value of the residual analysis information of the to-be-decoded point in K directions, the minimum value of the residual analysis information of the to-be-decoded point in K directions, and the maximum value of the residual analysis information of the to-be-decoded point in K directions, etc. For example, when the statistical characteristic information is less than the first threshold value, the encoding mode (such as any one of full index method, non-zero full index method, single direction index method, and non-zero single direction index method) of the to-be-decoded point can be determined.
[0146] ② When the threshold value includes a second threshold value (default parameter t2, t2> 0), the length ratio information corresponding to the bounding box of the point cloud is obtained, and the encoding mode of the to-be-decoded point is determined based on the numerical comparison relationship between the length ratio information and the second threshold value, and the encoding mode of the to-be-decoded point is determined as the encoding mode information; the bounding box is used to represent the smallest cuboid containing all points of the point cloud. Wherein, the bounding box can refer to the bounding box corresponding to the geometric prediction tree, when the geometric prediction tree is the prediction tree of the whole point cloud, the bounding box can contain all points of the point cloud; when the geometric prediction tree is the prediction tree of a node in the octree, the bounding box can include the points corresponding to the node, etc.
[0147] In one or more embodiments, the side length information of the bounding box can be represented as [BBx, BBy, BBz], where BBx represents the side length information in the x direction, BBy represents the side length information in the y direction, and BBz represents the side length information in the z direction. For example, if BBx / BBz>t2 or BBy / BBz>t2, it can be determined that the encoding mode of the to-be-decoded point is a z-directional single-index or non-zero single-index method, etc.
[0148] ③ When the determination threshold includes a third threshold (a default parameter t3, t3>0) and a fourth threshold (a default parameter t4, t4>0), a threshold condition range is determined based on the third threshold and the fourth threshold, and the encoding mode of the to-be-decoded point in each of the K directions is determined according to the dependency between the quantization parameter of the to-be-decoded point and the threshold condition range, and the encoding mode of the to-be-decoded point is determined as the encoding mode information. The threshold condition range can be: less than the third threshold, or greater than the fourth threshold, or less than the third threshold and greater than the fourth threshold; if the quantization parameter is less than t3, or the quantization parameter is greater than t4, or both, it indicates that the quantization parameter belongs to the threshold condition range, and the encoding mode of the to-be-decoded point (such as any one of the full-index method, the non-zero full-index method, the single-index method, and the non-zero single-index method) can be determined.
[0149] Step S102, decoding processing is performed on the to-be-decoded point in the point cloud according to the encoding mode information, to obtain second residual information of the to-be-decoded point in each of the K directions.
[0150] The decoding processing can include residual value decoding and residual sign decoding. The residual value decoding is performed on the to-be-decoded point in the point cloud according to the encoding mode information, to obtain second residual values of the to-be-decoded point in each of the K directions. The residual sign decoding is performed on the to-be-decoded point, to obtain residual sign bit information of the to-be-decoded point in each of the K directions. The second residual information of the to-be-decoded point in each of the K directions is determined based on the second residual values of the to-be-decoded point in each of the K directions and the residual sign bit information of the to-be-decoded point in each of the K directions. The second residual information can be residual information obtained after geometric entropy decoding of the encoding code stream of the point cloud.
[0151] It should be noted that the residual value decoding and the residual sign decoding are independent. The residual sign decoding can be processed during the execution of step S102. Alternatively, the decoding processing in step S102 can be residual value decoding only, and the residual sign decoding can be processed during the execution of step S103. Alternatively, the residual sign decoding can be processed after the execution of step S103. The decoding timing of the residual sign decoding is not limited in the present application.
[0152] In one or more embodiments, the residual value of the to-be-decoded point can be parsed as zero according to the coding mode information, such as the to-be-decoded point being coded as specific identification information (indicating that the residual value of the to-be-decoded point in the i-th direction is 0) in the i-th direction, and based on the identification information, it can be parsed that the residual value of the to-be-decoded point in the i-th direction is zero, that is, the predicted geometry information can be directly used as the reconstructed geometry information of the to-be-decoded point in the i-th direction, i being a positive integer less than or equal to K.
[0153] In one or more embodiments, the residual value of the to-be-decoded point can be parsed as zero according to the coding mode information, such as the to-be-decoded point being coded as specific identification information (indicating that the residual value of the to-be-decoded point in the i-th direction is 0) in the i-th direction, and based on the identification information, it can be parsed that the residual value of the to-be-decoded point in the i-th direction is zero, that is, the predicted geometry information can be directly used as the reconstructed geometry information of the to-be-decoded point in the i-th direction, i being a positive integer less than or equal to K.
[0154] Based on the coding mode information, the target number of bits B occupied by the to-be-decoded point in the non-zero direction can be determined, and the target number of bits B can be considered as the number of bits originally occupied by the second residual value. Based on the target number of bits B, the occupied bit value field (ptn_residual_value_per) of the to-be-decoded point in the non-zero direction is parsed bit by bit to obtain the second residual value A' of the to-be-decoded point in the non-zero direction. For example, if the i-th direction is a non-zero direction (i is less than or equal to K), after the target number of bits B occupied by the to-be-decoded point in the i-th direction is parsed, the second residual value A'[i] of the to-be-decoded point in the i-th direction can be obtained by parsing ptn_residual_value_per[i] bit by bit.
[0155] It can be understood that the first reconstructed residual value of the to-be-decoded point in the zero direction can be defaulted as 0, and then after obtaining the first reconstructed residual value of the to-be-decoded point in the non-zero direction, it also means that the second residual value of the to-be-decoded point in each direction of the K directions has been obtained.
[0156] In one or more embodiments, for a to-be-decoded point, the number of non-zero directions corresponding to the to-be-decoded point can be denoted as M1, M1 is a positive integer less than or equal to K, and M1 can also be considered as the number of non-zero residual values in the residual values (here, the residual values can refer to second residual values) of each direction of K directions of the to-be-decoded point.
[0157] Wherein, the process of determining the target number of occupied bits B of the to-be-decoded point in the non-zero direction based on the encoding mode information can include: sequentially analyzing the number of occupied bits fields (ptn_residual_numbits) of the to-be-decoded point in the M1 non-zero directions, and obtaining the candidate number of occupied bits B' of the to-be-decoded point in the M1 non-zero directions. Wherein, the candidate number of occupied bits B' can be considered as the actual number of bits occupied by the second residual values in the encoding process; when the K directions include x, y, z directions, the candidate number of occupied bits of each direction of the K directions of the to-be-decoded point can be denoted as B'x, B'y, B'z, wherein B'x can represent the candidate number of occupied bits of the to-be-decoded point in the x direction, B'y can represent the candidate number of occupied bits of the to-be-decoded point in the y direction, and B'z can represent the candidate number of occupied bits of the to-be-decoded point in the z direction. It can be understood that if the x direction in the K directions is a zero direction and the y and z directions are non-zero directions, it can be determined that the candidate number of occupied bits B'x is zero and B'y and B'z are non-zero values.
[0158] Further, the target number of occupied bits B of the to-be-decoded point in the non-zero direction can be determined according to the candidate number of occupied bits B' of the to-be-decoded point in the non-zero direction, and the implementation manner can include but is not limited to any one of the following:
[0159] (1) The candidate number of occupied bits B' obtained by analysis is the target number of occupied bits B, that is, B=B'. For example, for the i-th non-zero direction, the candidate number of occupied bits B'[i] in the i-th direction is the target number of occupied bits B[i] in the i-th direction, that is, B[i]=B'[i].
[0160] (2) The non-zero full index method is used to determine the target number of occupied bits B of the to-be-decoded point in the non-zero direction. Specifically, based on the number M1 of non-zero directions, the bit index flag field (minBitFlag) corresponding to the to-be-decoded point is analyzed to obtain the first non-zero direction indicated by the minimum number of occupied bits B'min. The minimum number of occupied bits B'min can refer to the minimum value of the M1 candidate numbers of occupied bits corresponding to the to-be-decoded point, and the specific steps can be described as follows:
[0161] When M1=K, a bit index identification bit field (minBitFlag) is parsed, which can be used to indicate the first non-zero direction corresponding to the minimum occupied bit number B'min. In this case, the bit index identification bit field needs to occupy 2 bits.
[0162] If the bit index identification bit field corresponding to the to-be-decoded point is a first identification value (minBitFlag=00), it is determined that the first non-zero direction indicated by the minimum occupied bit number B'min is the horizontal coordinate direction (x direction); that is, minBitFlag=00, B'min=B'x, and in this case, the first non-zero direction indicated by B'min is the x direction.
[0163] If the bit index identification bit field corresponding to the to-be-decoded point is a second identification value (minBitFlag=01), it is determined that the first non-zero direction indicated by the minimum occupied bit number B'min is the vertical coordinate direction (y direction); that is, minBitFlag=01, B'min=B'y, and in this case, the first non-zero direction indicated by B'min is the y direction.
[0164] If the bit index identification bit field corresponding to the to-be-decoded point is a third identification value (minBitFlag=10), it is determined that the third non-zero direction indicated by the minimum occupied bit number B'min is the vertical coordinate direction (z direction); that is, minBitFlag=10, B'min=B'z, and in this case, the first non-zero direction indicated by B'min is the z direction.
[0165] When M1=K-1, a bit index identification bit minBitFlag is parsed, which can be used to indicate the first non-zero direction corresponding to the minimum occupied bit number B'min. In this case, the bit index identification bit field needs to occupy 1 bit.
[0166] If the M1 non-zero directions include the longitudinal coordinate direction and the vertical coordinate direction (the x direction is a zero direction), and the bit index identification bit field corresponding to the to-be-decoded point is the fourth identification value (minBitFlag=0), it is determined that the first non-zero direction indicated by the minimum occupied bit number B'min is the longitudinal coordinate direction. If the M1 non-zero directions include the longitudinal coordinate direction and the vertical coordinate direction (the x direction is a zero direction), and the bit index identification bit field corresponding to the to-be-decoded point is the fifth identification value (minBitFlag=1), it is determined that the first non-zero direction indicated by the minimum occupied bit number B'min is the vertical coordinate direction. That is, B'x=0 (the x direction is a zero direction, and the y and z directions are non-zero directions), minBitFlag=0 (the fourth identification value), B'min=B'y, at this time, the first non-zero direction indicated by B'min is the y direction; minBitFlag=1 (the fifth identification value), B'min=B'z, at this time, the first non-zero direction indicated by B'min is the z direction.
[0167] If the M1 non-zero directions include the horizontal coordinate direction and the vertical coordinate direction (the y direction is a zero direction), and the bit index identification bit field corresponding to the to-be-decoded point is the fourth identification value (minBitFlag=0), it is determined that the first non-zero direction indicated by the minimum occupied bit number B'min is the horizontal coordinate direction. If the M1 non-zero directions include the horizontal coordinate direction and the vertical coordinate direction (the y direction is a zero direction), and the bit index identification bit field corresponding to the to-be-decoded point is the fifth identification value (minBitFlag=1), it is determined that the first non-zero direction indicated by the minimum occupied bit number B'min is the vertical coordinate direction. That is, B'y=0 (the y direction is a zero direction, and the x and z directions are non-zero directions), minBitFlag=0 (the fourth identification value), B'min=B'x, at this time, the first non-zero direction indicated by B'min is the x direction; minBitFlag=1 (the fifth identification value), B'min=B'z, at this time, the first non-zero direction indicated by B'min is the z direction.
[0168] If the M1 non-zero directions include the horizontal coordinate direction and the vertical coordinate direction (z direction is a zero direction), and the bit index identification bit field corresponding to the to-be-decoded point is the fourth identification value (minBitFlag=0), it is determined that the first non-zero direction indicated by the minimum occupied bit number B'min is the horizontal coordinate direction; if the M1 non-zero directions include the horizontal coordinate direction and the vertical coordinate direction, and the bit index identification bit field corresponding to the to-be-decoded point is the fifth identification value (minBitFlag=1), it is determined that the first non-zero direction indicated by the minimum occupied bit number B'min is the vertical coordinate direction; that is, B'z=0 (z direction is a zero direction, and x and y directions are non-zero directions), minBitFlag=0 (fourth identification value), B'min=B'x, at this time, the first non-zero direction indicated by B'min is the x direction; minBitFlag=1 (fifth identification value), B'min=B'y, at this time, the first non-zero direction indicated by B'min is the y direction.
[0169] ③When M1<K-1, the bit index identification bit minBitFlag is not parsed. Specifically, when M1<K-1, the parsing of the bit index identification bit field corresponding to the to-be-decoded point is stopped, and the candidate occupied bit number B' of the to-be-decoded point in the M1 non-zero directions is determined as the target occupied bit number B of the to-be-decoded point in the M non-zero directions.
[0170] Further, the sum of the minimum occupied bit number B'min and the remaining non-zero directions (second non-zero directions) other than the first non-zero direction is calculated as the target occupied bit number B in the second non-zero direction, that is, B=B'+B'min, and the target occupied bit number B in the first non-zero direction is the corresponding candidate occupied bit number B'. Specifically, the remaining non-zero directions other than the first non-zero direction in the M1 non-zero directions can be determined as the second non-zero direction, the target occupied bit number of the to-be-decoded point in the first non-zero direction is determined based on the minimum occupied bit number B'min, for example, B'min+e can represent the target occupied bit number in the first non-zero direction, e can take a value of 1 or other values, which are not limited in the present application; the sum of the candidate occupied bit number of the to-be-decoded point in the second non-zero direction and the minimum occupied bit number B'min is determined as the target occupied bit number B of the to-be-decoded point in the second non-zero direction (B=B'+B'min). For ease of understanding, the present embodiment is described by taking e=1 as an example.
[0171] It should be noted that, in addition to the above-described manner, the manner of determining the target occupied bit number B from the candidate occupied bit number B' can also include full indexing, single-direction indexing, non-zero single-direction indexing, and the like. The implementation steps of these manners can be referred to the description in the subsequent step S103, which will not be described here.
[0172] In one or more embodiments, taking the i-th direction in M1 non-zero directions as an example, assuming that the coding mode information indicates that the current to-be-decoded point is in the i-th direction, the coding mode is the mode after the second residual value of the to-be-decoded point in the i-th direction is calculated by taking remainder (for ease of understanding, it can be referred to as the first remainder coding mode), the residual value decoding process in the first remainder coding mode can include: parsing the occupation bit number field (ptn_residual_numbits[i]) of the to-be-decoded point in the i-th direction to obtain the target occupation bit number B[i] of the to-be-decoded point in the i-th direction (here, the target occupation bit number B[i] can be determined by any one of the foregoing manners); parsing the value of B[i] bits (the value of B[i] bits ptn_residual_value_per[i]) in the occupation bit value field of the to-be-decoded point in the i-th direction to obtain the residual quotient A1[i] of the to-be-decoded point in the i-th direction; parsing the residual remainder field (ptn_residual_abs_remaining[i]) corresponding to the to-be-decoded point in the i-th direction to obtain the residual remainder A2[i] of the to-be-decoded point in the i-th direction; determining the second residual value A'[i] of the to-be-decoded point in the i-th direction according to the residual quotient A1[i] and the residual remainder A2[i] (A[i] = A1[i] × d + A2[i]), wherein d represents the divisor in the remainder calculation, for example, the remainder calculation is remainder after division by 2, then d = 2.
[0173] Optionally, assuming that the coding mode information indicates that the coding mode of the current to-be-decoded point in the i-th direction is a mode coded after performing remainder calculation on the candidate number of bits occupied by the second residual value of the to-be-decoded point in the i-th direction (for the convenience of understanding, it can be referred to as a second remainder coding mode), the residual value decoding process in the second remainder coding mode can include: parsing the number of bits occupied field (that is, ptn_residual_numbits[i]) corresponding to the to-be-decoded point in the i-th direction to obtain the quotient number B1[i] of the to-be-decoded point in the i-th direction; parsing the number of bits remaining field (that is, ptn_numbits_remaining[i]) corresponding to the to-be-decoded point in the i-th direction to obtain the remainder number B2[i] of the to-be-decoded point in the i-th direction; determining the number of bits B3[i] occupied by the to-be-decoded point in the i-th direction according to the quotient number B1[i] and the remainder number B2[i] (B3[i] = B1[i] x d + B2[i]), where d represents the divisor in the remainder calculation, for example, the remainder calculation is remainder calculation by 2, and d = 2.
[0174] It should be noted that the coding mode information can also be used to indicate that the coding mode of the to-be-decoded point in the i-th direction is a mode coded after performing remainder calculation on the second residual value of the to-be-decoded point in the i-th direction and then performing remainder calculation on the candidate number of bits occupied by the second residual value of the to-be-decoded point in the i-th direction (which can be referred to as a third remainder coding mode), and the residual value decoding process in the third remainder coding mode can combine the residual value decoding processes in the first remainder coding mode and the second remainder coding mode, which will not be described here.
[0175] The implementation manner of the residual sign decoding of the to-be-decoded point can include but is not limited to any one of the following:
[0176] (1) Directly parsing the sign bit of the to-be-decoded point in each direction. Specifically, parsing the residual sign flag field (ptn_residual_sign_flag) of the to-be-decoded point in each direction to obtain the residual sign bit information of the to-be-decoded point in each direction; wherein when the residual sign flag field of the to-be-decoded point in the i-th direction is set to a target value (for example, value 1), the residual sign bit information in the i-th direction is non-negative; when the residual sign flag field of the to-be-decoded point in the i-th direction is not set to the target value (for example, value 0), the residual sign bit information in the i-th direction is negative; i is a positive integer less than or equal to K.
[0177] (2) parsing a sign identification bit field signFlag, the sign identification bit field signFlag being used to indicate a sign association relationship between the current to-be-decoded point and a previous point. Specifically, parsing a sign identification bit field (signFlag) of each direction of the to-be-decoded point in K directions to obtain a sign association relationship of each direction of the to-be-decoded point and the previous point in the K directions, and determining residual sign bit information of each direction of the to-be-decoded point in the K directions based on the sign association relationship;
[0178] When the sign identification bit field of the to-be-decoded point in the i-th direction is set to a target value (signFlag = 1), the residual sign bit information of the to-be-decoded point and the previous point in the i-th direction is the same; when the sign identification bit field of the to-be-decoded point in the i-th direction is not set to the target value (signFlag = 0), the residual sign bit information of the to-be-decoded point and the previous point in the i-th direction is different, and the previous point is a point in the point cloud that has been completed decoding.
[0179] Step S103, determining first residual information of each direction of the to-be-decoded point in the K directions based on second residual information of each direction of the to-be-decoded point in the K directions; a second residual value in the second residual information is less than or equal to a first residual value in the first residual information.
[0180] The second residual information can include a second residual value A' and residual sign bit information, and when the first residual information of each direction of the to-be-decoded point in the K directions is determined based on the second residual information of each direction of the to-be-decoded point in the K directions, the residual sign bit information in the second residual information remains unchanged, and only the second residual value A' needs to be processed to obtain the first residual value A, and then the first residual value A and the residual sign bit information can be determined as the first residual information; in other words, the first residual information includes the first residual value A and the residual sign bit information, and the second residual value A' in the second residual information is less than or equal to the first residual value A in the first residual information, that is, in the encoding process of the to-be-decoded point, the first residual value A can be predicted twice to reduce the encoding value of the residual value, and the geometric decoding efficiency of the to-be-decoded point can be improved.
[0181] The second residual value A' of each direction of the to-be-decoded point in the K directions can be denoted as A'x, A'y, and A'z, where A'x can represent the second residual value of the to-be-decoded point in the x direction, A'y can represent the second residual value of the to-be-decoded point in the y direction, and A'z can represent the second residual value of the to-be-decoded point in the z direction. The implementation of determining the first residual value A based on the second residual value A' can include but is not limited to any one of the following:
[0182] (1) The parsed residual absolute value information (second residual value A') is the actual residual value information (first residual value A), that is, A = A'.
[0183] (2) The full index method is used, and the specific steps are as follows:
[0184] ① Parse the residual index identification bit field (2-bit index identification bit minResFlag) corresponding to the to-be-decoded point to obtain the reference direction indicated by the minimum residual value A'min in the K second residual values corresponding to the to-be-decoded point. In other words, parsing the residual index identification bit field (minResFlag) is used to indicate the reference direction corresponding to the minimum residual value A'min.
[0185] Wherein, when the residual index identification bit field is the first identification value (minResFlag = 00), the reference direction is the horizontal coordinate direction, that is, when minResFlag = 00, A'min = A'x; when the residual index identification bit field is the second identification value (minResFlag = 01), the reference direction is the vertical coordinate direction, that is, when minResFlag = 01, A'min = A'y; when the residual index identification bit field is the third identification value, the reference direction is the vertical coordinate direction, that is, when minResFlag = 10, A'min = A'z.
[0186] ② Calculate the sum of the second residual values A' and A'min in the remaining two directions other than the reference direction as the first residual value A in the current direction. Specifically, determine the remaining directions in the K directions other than the reference direction as non-reference directions, determine the first residual value of the to-be-decoded point in the reference direction based on the minimum residual value A'min, such as A'min+1; determine the sum of the second residual value of the to-be-decoded point in the non-reference direction and the minimum residual value A'min as the first residual value of the to-be-decoded point in the non-reference direction.
[0187] Wherein, when minResFlag = 00, the reference direction is the x direction, and the non-reference directions are the y direction and the z direction, at this time, the first residual value in the x direction is Ax = A'x+1 (A'min = A'x), the first residual value in the y direction is Ay = A'y+A'min, and the first residual value in the z direction is Az = A'z+A'min.
[0188] When minResFlag = 01, the first residual value in the x direction is Ax = A'x+A'min, the first residual value in the y direction is Ay = A'y+1, and the first residual value in the z direction is Az = A'z+A'min.
[0189] When minResFlag = 10, the first residual value in the x direction is Ax = A'x + A'min, the first residual value in the y direction is Ay = A'y + A'min, and the first residual value in the z direction is Az = A'z + 1.
[0190] (3) A non-zero full index method is adopted. Specifically, based on the number M1 of non-zero directions of the to-be-decoded point in the K directions, a residual index identification bit field corresponding to the to-be-decoded point is parsed to obtain a third non-zero direction indicated by a minimum residual value A'min, the minimum residual value A'min being the minimum value of M1 second residual values corresponding to the to-be-decoded point. The specific steps can be described as follows:
[0191] ① When M1 = K, a residual index identification bit field (minResFlag) occupying 2 bits (2 bits) is parsed, which can be used to indicate the third non-zero direction corresponding to the minimum residual value A'min.
[0192] minResFlag = 00 (first identification value), A'min = A'x, and the third non-zero direction corresponding to the minimum residual value A'min is the x direction;
[0193] minResFlag = 01 (second identification value), A'min = A'y, and the third non-zero direction corresponding to the minimum residual value A'min is the y direction;
[0194] minResFlag = 10 (third identification value), A'min = A'z, and the third non-zero direction corresponding to the minimum residual value A'min is the z direction.
[0195] ② When M1 = K-1, a residual index identification bit field (minResFlag) occupying 1 bit is parsed, which can be used to indicate the third non-zero direction corresponding to the minimum residual value A'min.
[0196] A'x = 0 (the x direction is a zero direction, and the y and z directions are non-zero directions), minResFlag = 0 (fourth identification value), A'min = A'y, and the third non-zero direction corresponding to A'min is the y direction; minResFlag = 1 (fifth identification value), A'min = A'z, and the third non-zero direction corresponding to A'min is the z direction.
[0197] A'y = 0 (the y direction is a zero direction, and the x and z directions are non-zero directions), minResFlag = 0, A'min = A'x, and the third non-zero direction corresponding to A'min is the x direction; minResFlag = 1, A'min = A'z, and the third non-zero direction corresponding to A'min is the z direction.
[0198] A'z=0(z direction is zero direction, x, y direction is non-zero direction), minResFlag=0, A'min=A'x, at this time the third non-zero direction corresponding to A'min is x direction; minResFlag=1, A'min=A'y, at this time the third non-zero direction corresponding to A'min is y direction.
[0199] ③When M1K-1, the residual index identification bit field (minResFlag) is not used, and the field minResFlag does not need to be parsed.
[0200] Further, the sum of the remaining non-zero directions (the fourth non-zero direction) and A'min is calculated as the first residual value A in the fourth non-zero direction, and the first residual value A in the third non-zero direction corresponding to A'min is A'+1. Specifically, the remaining directions in the M1 non-zero directions except the third non-zero direction are determined as the fourth non-zero direction, the first residual value (A=A'+1) of the to-be-decoded point in the third non-zero direction is determined based on the minimum residual value A'min; the sum of the second residual value of the to-be-decoded point in the fourth non-zero direction and the minimum residual value A'min is determined as the first residual value (A=A'+A'min) of the to-be-decoded point in the fourth non-zero direction.
[0201] (4) Single-direction index method is used, and the specific steps are as follows:
[0202] ①In the K directions, a default reference direction commonly negotiated by the decoding end and the encoding end is determined, and the second residual value of the to-be-decoded point in the reference direction can be referred to as a reference value (denoted as A'base); the directions in the K directions except the reference direction can be determined as non-reference directions.
[0203] ②The residual index identification bit field minResFlag occupying 1 bit (bit) is parsed, and the residual index identification bit field minResFlag at this time can be used to indicate whether the reference value A'base is the minimum value, that is, whether the reference value A'base is the minimum residual value A'min in the second residual value of the to-be-decoded point in each direction of the K directions.
[0204] minResFlag=0 (fourth identification value), indicating that the current reference value A'base is not the minimum residual value A'min; minResFlag=1 (fifth identification value), indicating that the current reference value A'base is the minimum residual value A'min, and at this time A'min=A'base.
[0205] ③ Calculate the second residual value in each direction. minResFlag = 0, A = A' + 1 (e = 1), the second residual value in each direction plus a value of 1 can be used as the first residual value; minResFlag = 1, the first residual value in the non-reference direction is A = A' + A'min, and the first residual value in the reference direction is A = A' + 1.
[0206] The foregoing steps ② and ③ can be summarized as follows: if the residual index identification bit field (minResFlag) corresponding to the to-be-decoded point is parsed as a fourth identification value (value 0), it is determined that the second residual value (i.e., the reference value A'base) of the to-be-decoded point in the reference direction is not the minimum residual value A'min, and the sum of the second residual value A' of the to-be-decoded point and a fixed value e can be determined as the first residual value A of the to-be-decoded point; if the residual index identification bit field (minResFlag) corresponding to the to-be-decoded point is parsed as a fifth identification value (value 1), it is determined that the second residual value of the to-be-decoded point in the reference direction is the minimum residual value A'min (i.e., A'min = A'base), and the first residual value in the reference direction of the to-be-decoded point is determined based on the minimum residual value A'min, that is, A'min + 1, and the sum of the second residual value A' of the to-be-decoded point in the non-reference direction and the minimum residual value A'min is determined as the first residual value A of the to-be-decoded point in the non-reference direction.
[0207] (5) The non-zero single-direction index method is adopted, and the specific steps are described as follows:
[0208] ① A default reference direction is determined among the K directions, which is negotiated by the decoding end and the encoding end, and the second residual value in the reference direction can be referred to as a reference value (denoted as A'base); the directions other than the reference direction among the K directions can be determined as non-reference directions.
[0209] ② Determine whether the reference value A'base is zero, if the reference value A'base is zero, the to-be-decoded point does not use the index flag (i.e., the residual index identification bit field minResFlag).
[0210] ③ If the reference value A'base is a non-zero value, parse the residual index identification bit field minResFlag occupying 1 bit, at this time the residual index identification bit field minResFlag can be used to indicate whether the reference value A'base is the minimum residual value A'min in the second residual value of each direction of the to-be-decoded point among the K directions.
[0211] Wherein, the subsequent steps of the non-zero single-direction index method can refer to the steps ② and ③ in the foregoing single-direction index method, which will not be described here.
[0212] In summary, when the second residual value of the to-be-decoded point in the reference direction (i.e., the reference value A'base) is a non-zero value, if the parsed residual index identification bit field corresponding to the to-be-decoded point is the fourth identification value (minResFlag = 0), it indicates that the reference value A'base is not the minimum residual value A'min, and thus the sum of the second residual value of the to-be-decoded point and the fixed value e can be determined as the first residual value of the to-be-decoded point; when the second residual value of the to-be-decoded point in the reference direction is a non-zero value, if the parsed residual index identification bit field corresponding to the to-be-decoded point is the fifth identification value (minResFlag = 1), it is determined that the second residual value of the to-be-decoded point in the reference direction is the minimum residual value A'min, the first residual value of the to-be-decoded point in the reference direction is determined based on the minimum residual value A'min (A'min + 1), and the sum of the second residual value of the to-be-decoded point in the non-reference direction and the minimum residual value A'min is determined as the first residual value of the to-be-decoded point in the non-reference direction.
[0213] It should be noted that in the decoding process of the to-be-decoded point, the steps in the various implementation manners described above can be used alone or in combination, and the present application does not limit this. The second residual information and the first residual information obtained at the decoding end are both reconstructed residual information after decoding processing according to the encoding mode information.
[0214] In step S104, the geometric information of the to-be-decoded point is reconstructed according to the first residual information of the to-be-decoded point in each of the K directions.
[0215] After obtaining the first residual information, the geometric information of the to-be-decoded point can be reconstructed based on the first residual information. For example, the predicted geometric information of the to-be-decoded point in each of the K directions can be obtained, and the geometric information of the to-be-decoded point is reconstructed based on the first residual information and the predicted geometric information of the to-be-decoded point in each of the K directions. The predicted geometric information of the to-be-decoded point can be obtained by geometric prediction tree, specifically, the geometric prediction tree of the point cloud can be used to reflect the connection relationship between the to-be-decoded points in the point cloud, and can be used to indicate the prediction mode (i.e., the prediction mode mentioned in the introduction of the prediction encoding technology) of the to-be-decoded points in the point cloud, so that the to-be-decoded point can be predicted according to the prediction mode of the to-be-decoded point to obtain the predicted geometric information of the to-be-decoded point.
[0216] In the decoding process of the point cloud, the encoding mode information of the point cloud can be acquired, the to-be-decoded point in the point cloud is decoded based on the encoding mode information, the second residual information of the to-be-decoded point can be obtained, and then the first residual information is determined based on the second residual information. The geometry information of the to-be-decoded point can be reconstructed through the first residual information, and the first created residual value in the second residual information is less than or equal to the first residual value in the first residual information. In the point cloud decoding process, the second residual information is inversely predicted through the correlation of the geometry residual information of the to-be-decoded point in the K directions, and the geometry decoding efficiency of the point cloud can be improved.
[0217] Please refer to Figure 8 , Figure 8 is a flowchart of another point cloud processing method provided in the embodiments of the present application. It can be understood that the point cloud processing method can be executed by a computer device, which can be an encoding device as shown in Figure 1 , and the point cloud processing method can be an encoding method. As shown in Figure 8 , the point cloud processing method can include the following steps S201 to S204:
[0218] Step S201, determining the encoding mode information of the point cloud.
[0219] In the point cloud encoding process, the encoding mode information of the point cloud can be determined first. The encoding mode information can include the encoding mode of the to-be-encoded point in the point cloud. The to-be-encoded point can be any point in the point cloud that has not been encoded. The geometry information of the to-be-encoded point can be a three-dimensional space coordinate (including x, y, and z directions).
[0220] The way of determining the encoding mode information can include but is not limited to any of the following:
[0221] (1) The encoding end and the decoding end default that all points in the point cloud use the same encoding mode. Specifically, a default encoding mode negotiated and set by the decoding end and the encoding end is acquired, and the default encoding mode is determined as the encoding mode information of the point cloud. The default encoding mode is the encoding mode of the to-be-encoded point in the point cloud, and can also be used as the encoding mode 0 commonly used by all points in the point cloud.
[0222] (2) The encoding mode information is set and written into the encoding parameter set or the encoding (which can be the aforementioned geometry bit stream) of the point cloud. Specifically, the encoding mode of each direction in the K directions is determined for the to-be-encoded point in the point cloud, the encoding mode of each direction in the K directions is determined as the encoding mode information of the point cloud, and the encoding mode information is written into the encoding parameter set or the encoding bit stream of the point cloud.
[0223] (3) Obtain a decision threshold value set by the decoding end and the encoding end in common negotiation, and determine the corresponding encoding mode information based on the decision threshold value. Wherein:
[0224] ① When the decision threshold value includes a first threshold value (a set default parameter t1, t1>0), obtain the statistical characteristic information corresponding to the first residual value of the to-be-encoded point, determine the encoding mode of each direction of the to-be-encoded point in K directions based on the numerical comparison relationship between the statistical characteristic information and the first threshold value, and determine the encoding mode of each direction of the to-be-encoded point in K directions as the encoding mode information.
[0225] Wherein, the first residual value of the to-be-encoded point can be the unsigned residual value generated by the geometric prediction tree (the aforementioned prediction tree encoding structure). The statistical characteristic information can include but is not limited to: the average value of the first residual value of the to-be-encoded point in each direction of K directions, the minimum value of the first residual value of the to-be-encoded point in each direction of K directions, and the maximum value of the first residual value of the to-be-encoded point in each direction of K directions, etc. For example, when the statistical characteristic information is less than the first threshold value, the encoding mode of each direction of the to-be-encoded point in K directions (such as any one of full index method, non-zero full index method, single-direction index method, and non-zero single-direction index method) can be determined.
[0226] ② When the decision threshold value includes a second threshold value (a set default parameter t2, t2>0), obtain the edge length ratio value information corresponding to the bounding box of the point cloud, determine the encoding mode of each direction of the to-be-encoded point in K directions based on the numerical comparison relationship between the edge length ratio value information and the second threshold value, and determine the encoding mode of each direction of the to-be-encoded point in K directions as the encoding mode information; the bounding box is used to represent the smallest cuboid containing all points of the point cloud. Wherein, the bounding box can refer to the bounding box corresponding to the geometric prediction tree, when the geometric prediction tree is the prediction tree of the entire point cloud, the bounding box can contain all points of the point cloud; when the geometric prediction tree is the prediction tree of a node in the octree, the bounding box can include the points corresponding to the node, etc.
[0227] In one or more embodiments, the edge length information of the bounding box can be represented as [BBx, BBy, BBz], BBx represents the edge length information in the x direction, BBy represents the edge length information in the y direction, and BBz represents the edge length information in the z direction. If BBx / BBz>t2 or BBy / BBz>t2, the encoding mode of each direction of the to-be-encoded point in K directions can be determined as the single-direction index or non-zero single-direction index method in the z direction, etc.
[0228] ③ When the determination threshold value comprises a third threshold value (a set default parameter t3, t3>0) and a fourth threshold value (a set default parameter t4, t4>0), a threshold condition range is determined based on the third threshold value and the fourth threshold value, and the encoding mode of the to-be-encoded point in each of the K directions is determined according to the dependency between the quantization parameter of the to-be-encoded point and the threshold condition range, and the encoding mode of the to-be-encoded point in each of the K directions is determined as the encoding mode information. The threshold condition range can be: less than the third threshold value, or greater than the fourth threshold value, or less than the third threshold value and greater than the fourth threshold value. If the quantization parameter is less than t3, or the quantization parameter is greater than t4, or both conditions are met, it indicates that the quantization parameter belongs to the threshold condition range, and the encoding mode of the to-be-encoded point in each of the K directions (such as any one of the full index method, the non-zero full index method, the single index method, and the non-zero single index method) can be determined.
[0229] In step S202, first residual information of the to-be-encoded point in each of the K directions is obtained.
[0230] Specifically, in the point cloud encoding stage, a geometry prediction tree corresponding to the point cloud can be constructed, and the first residual information of the to-be-encoded point in each of the K directions is obtained based on the geometry prediction tree. The first residual information of the to-be-encoded point in the i-th direction includes a first residual value of the to-be-encoded point in the i-th direction and residual sign bit information of the to-be-encoded point in the i-th direction. When the first residual value of the to-be-encoded point in the i-th direction is zero, the subsequent operation can be omitted, and the first residual value in the i-th direction is directly encoded as specific identification information.
[0231] It should be noted that the construction of the geometry prediction tree can refer to the aforementioned prediction encoding technology, which will not be described here. Of course, in addition to the aforementioned prediction mode in the prediction encoding technology, any other prediction mode can also be used, which is not limited in the present application.
[0232] In step S203, second residual information of the to-be-encoded point in each of the K directions is determined based on the first residual information of the to-be-encoded point in each of the K directions. The first residual value in the first residual information is greater than or equal to the second residual value in the second residual information.
[0233] Specifically, after obtaining the first residual information generated by the geometry prediction tree, the first residual information can be used to predict the second residual information of the to-be-encoded point in each of the K directions based on the correlation of the first residual information in the front and rear sequences or in each of the K directions. The second residual value in the second residual information is less than or equal to the first residual value in the first residual information, so as to reduce the residual encoding value of the to-be-encoded point as much as possible, and improve the geometry encoding efficiency of the point cloud without affecting the reconstruction of the single point of the point cloud.
[0234] The first residual information in each direction includes a first residual value and residual sign bit information in the direction. When the first residual information is twice predicted, the first residual value is mainly predicted, and the residual sign bit information in the twice prediction remains unchanged. The process of determining the second residual information from the first residual information can be regarded as the process of determining the second residual value from the first residual value. The first residual value is determined by the geometric prediction tree and can be used for point cloud reconstruction in the decoding stage, which corresponds to the first residual value in the decoding stage. The second residual value is the actual residual value that needs to be encoded, which corresponds to the second residual value in the decoding stage.
[0235] Suppose the first residual values of the to-be-encoded point in K directions (including x, y, and z directions) are represented as Ax, Ay, and Az, where Ax represents the first residual value of the to-be-encoded point in the x direction, Ay represents the first residual value of the to-be-encoded point in the y direction, and Az represents the first residual value of the to-be-encoded point in the z direction. The implementation of determining the second residual value based on the first residual value can include but is not limited to any one of the following:
[0236] (1) The first residual value is not processed, and the first residual value is directly used as the encoded second residual value, i.e., A'(first residual value) = A(second residual value).
[0237] (2) The full index method is used, and the specific steps are described as follows:
[0238] ① Obtain the minimum value of the first residual values of the to-be-encoded point in each direction, and record it as Amin; in other words, obtain the minimum residual value Amin of the first residual value of the to-be-encoded point in each direction of the K directions. At this time, the minimum residual value Amin can be zero or a non-zero value.
[0239] ② Set a residual index flag field (minResFlag) for the minimum residual value Amin. The residual index flag field is used to indicate the direction (for ease of understanding, it can be called the reference direction) of the minimum residual value Amin. At this time, the residual index flag field needs to occupy 2 bits.
[0240] Wherein, the residual index identification bit field is set to the first identification value (minResFlag=00), the reference direction corresponding to the minimum residual value Amin is the horizontal coordinate direction (x direction), that is, minResFlag=00, Amin=Ax; the residual index identification bit field is the second identification value minResFlag=01, the reference direction corresponding to the minimum residual value Amin is the vertical coordinate direction (y direction), that is, minResFlag=01, Amin=Ay; the residual index identification bit field is the first identification value (minResFlag=10), the reference direction is the vertical coordinate direction (z direction), that is, minResFlag=10, Amin=Az.
[0241] ③Calculate the difference between the first residual value of the remaining two directions other than the reference direction and Amin as the second residual value A' of the current direction. Specifically, the remaining directions in the K directions other than the reference direction are determined as non-reference directions, and the second residual value of the reference direction of the to-be-encoded point is determined based on the minimum residual value Amin, such as Amin-e, e can take a value of 1; the difference between the first residual value of the to-be-encoded point in the non-reference direction and the minimum residual value Amin is determined as the second residual value of the to-be-encoded point in the non-reference direction.
[0242] Wherein, when minResFlag=00, the reference direction is the x direction, and the non-reference direction is the y direction and the z direction, at this time the second residual value in the x direction is A'x=Ax-1(Amin=Ax), the second residual value in the y direction is A'y=Ay-Amin, and the second residual value in the z direction is A'z=Az-Amin.
[0243] When minResFlag=01, the reference direction is the y direction, and the non-reference direction is the x direction and the z direction, at this time the second residual value in the x direction is A'x=Ax-Amin, the second residual value in the y direction is A'y=1(Amin=Ay), and the second residual value in the z direction is A'z=Az-Amin.
[0244] When minResFlag=10, the reference direction is the z direction, and the non-reference direction is the x direction and the y direction, at this time the second residual value in the x direction is A'x=Ax-Amin, the second residual value in the y direction is A'y=Ay-Amin, and the second residual value in the z direction is A'z=1(Amin=Az).
[0245] (3) Adopt non-zero full index method.
[0246] The non-zero minimum value of the first residual value of the to-be-encoded point in each direction of the K directions is determined as the minimum residual value Amin.
[0247] obtain a number M2 of non-zero residual values in the K first residual values corresponding to the to-be-encoded point, set a residual index identification bit field (minResFlag, which can also be referred to as a minimum value index identification bit field) for a minimum residual value Amin based on the number M2, the residual index identification bit field being used to indicate a fifth non-zero direction corresponding to the minimum residual value Amin, the M2 non-zero residual values corresponding to M2 non-zero directions, and M2 being a positive integer less than or equal to K. In other words, based on the number M2 of non-zero residual values, a residual index identification bit field (minResFlag) is defined, and specific steps can be described as follows:
[0248] ① When M2 = K (the number of non-zero residual values is K), a residual index identification bit field (minResFlag) occupying 2 bits (2 bits) can be set, and the residual index identification bit field is used to indicate the fifth non-zero direction corresponding to the minimum residual value Amin.
[0249] If the residual index identification bit field corresponding to the to-be-encoded point is set to a first identification value (minResFlag = 00), it is determined that the fifth non-zero direction corresponding to the minimum residual value Amin is the horizontal coordinate direction (x direction), that is, minResFlag = 00 and Amin = Ax.
[0250] If the residual index identification bit field corresponding to the to-be-encoded point is set to a second identification value (minResFlag = 10), it is determined that the fifth non-zero direction corresponding to the minimum residual value Amin is the vertical coordinate direction (y direction), that is, minResFlag = 01 and Amin = Ay.
[0251] If the residual index identification bit field corresponding to the to-be-encoded point is set to a third identification value (minResFlag = 10), it is determined that the fifth non-zero direction corresponding to the minimum residual value Amin is the vertical coordinate direction (z direction), that is, minResFlag = 10 and Amin = Az.
[0252] ② When M2 = K-1, a residual index identification bit field (minResFlag) occupying 1 bit can be set, and the residual index identification bit field is used to indicate the fifth non-zero direction corresponding to the minimum residual value Amin.
[0253] If the M2 non-zero directions include the longitudinal coordinate direction and the vertical coordinate direction, and the residual index identification bit field is set to the fourth identification value (minResFlag=0), the fifth non-zero direction corresponding to the minimum residual value Amin is determined as the longitudinal coordinate direction (y direction); if the M2 non-zero directions include the longitudinal coordinate direction and the vertical coordinate direction, and the residual index identification bit field is set to the fifth identification value (minResFlag=1), the fifth non-zero direction corresponding to the minimum residual value Amin is determined as the vertical coordinate direction (z direction); that is, Ax=0 (the x direction is a zero direction, and the y and z directions are non-zero directions), minResFlag=0 (the fourth identification value), Amin=Ay, and at this time the fifth non-zero direction corresponding to Amin is the y direction; minResFlag=1 (the fifth identification value), Amin=Az, and at this time the fifth non-zero direction corresponding to Amin is the z direction.
[0254] If the M2 non-zero directions include the horizontal coordinate direction and the vertical coordinate direction, and the residual index identification bit field is set to the fourth identification value, the fifth non-zero direction corresponding to the minimum residual value Amin is determined as the horizontal coordinate direction; if the M2 non-zero directions include the horizontal coordinate direction and the vertical coordinate direction, and the residual index identification bit field is set to the fifth identification value, the fifth non-zero direction corresponding to the minimum residual value Amin is determined as the vertical coordinate direction; that is, Ay=0 (the y direction is a zero direction, and the x and z directions are non-zero directions), minResFlag=0 (the fourth identification value), Amin=Ax, and at this time the fifth non-zero direction corresponding to Amin is the x direction; minResFlag=1 (the fifth identification value), Amin=Az, and at this time the fifth non-zero direction corresponding to Amin is the z direction.
[0255] If the M2 non-zero directions include the horizontal coordinate direction and the longitudinal coordinate direction, and the residual index identification bit field is set to the fourth identification value, the fifth non-zero direction corresponding to the minimum residual value Amin is determined as the horizontal coordinate direction; if the M2 non-zero directions include the horizontal coordinate direction and the longitudinal coordinate direction, and the residual index identification bit field is set to the fifth identification value, the fifth non-zero direction corresponding to the minimum residual value Amin is determined as the horizontal coordinate direction; that is, Az=0 (the z direction is a zero direction, and the x and y directions are non-zero directions), minResFlag=0 (the fourth identification value), Amin=Ax, and at this time the fifth non-zero direction corresponding to Amin is the x direction; minResFlag=1 (the fifth identification value), Amin=Ay, and at this time the fifth non-zero direction corresponding to Amin is the y direction.
[0256] ③ When M2
[0257] Further, the difference between the remaining directions (the sixth non-zero direction) other than the fifth non-zero direction and Amin is calculated as the second residual value (A' = A-Amin) in the sixth non-zero direction, and the second residual value in the fifth non-zero direction corresponding to Amin is A' = A-1. Specifically, the remaining directions in the M2 non-zero directions other than the fifth non-zero direction are determined as the sixth non-zero direction, the second residual value of the to-be-encoded point in the fifth non-zero direction is determined based on the minimum residual value Amin, A' = A-1; and the difference between the first residual value of the to-be-encoded point in the sixth non-zero direction and the minimum residual value Amin is determined as the second residual value of the to-be-encoded point in the sixth non-zero direction (A' = A-Amin).
[0258] (4) The single-index method can include: determining a reference direction in the K directions, and determining the directions other than the reference direction in the K directions as non-reference directions; if the first residual value of the to-be-encoded point in the reference direction is not the minimum residual value Amin of the to-be-encoded point, setting the residual index identification bit field of the to-be-encoded point to a fourth identification value (minResFlag = 0), and determining the difference between the first residual value of the to-be-encoded point and a fixed value e (which can be 1) as the second residual value of the to-be-encoded point (A' = A-1). If the first residual value of the to-be-encoded point in the reference direction is the minimum residual value Amin of the to-be-encoded point, setting the residual index identification bit field of the to-be-encoded point to a fifth identification value (minResFlag = 1), determining the second residual value of the to-be-encoded point in the reference direction based on the minimum residual value Amin (A' = A-1), and determining the difference between the first residual value of the to-be-encoded point in the non-reference direction and the minimum residual value Amin as the second residual value of the to-be-encoded point in the non-reference direction (A' = A-Amin).
[0259] The specific steps of the single-index method are described as follows:
[0260] ① A certain direction is determined as a reference direction, and the first residual value of the reference direction can be denoted as a reference residual value Abase, that is, a reference direction is determined in the K directions.
[0261] ② It is judged whether the reference residual value Abase is the minimum residual value Amin in the first residual values of the to-be-encoded node in each direction of the K directions.
[0262] ③ A residual index identification bit field (minResFlag) occupying 1 bit is set, and the residual index identification bit field at this time can be used to indicate whether the reference residual value Abase is the minimum residual value Amin.
[0263] minResFlag=0 (the fourth identification value), indicating that the current reference residual value Abase is not the minimum residual value A'min; minResFlag=1 (the fifth identification value), indicating that the current reference residual value Abase is the minimum residual value Amin, and Amin=Abase at this time.
[0264] ④Calculate the second residual value in each direction.
[0265] minResFlag=0, the reference residual value Abase is not the minimum residual value A'min, and the first residual value of the to-be-encoded point can be used as the encoded second residual value, i.e., A'=A;
[0266] minResFlag=1, the reference residual value Abase is the minimum residual value A'min, and the second residual value of the to-be-encoded point in the non-reference direction can be represented as A'=A-Amin, and the second residual value of the to-be-encoded point in the reference direction is A'=A-1.
[0267] (5) The non-zero single-direction index method can include: determining a reference direction in K directions, determining the directions other than the reference direction in the K directions as non-reference directions, and determining the first residual value of the to-be-encoded point in the reference direction as the reference residual value Abase; if the reference residual value is a non-zero value, and the reference residual value is not the minimum residual value Amin of the to-be-encoded point, the residual index identification bit field of the to-be-encoded point is set to the fourth identification value (minResFlag=0), and the difference between the first residual value of the to-be-encoded point and the value e is determined as the second residual value of the to-be-encoded point (A'=A-1) ; if the reference residual value is a non-zero value, and the reference residual value is the minimum residual value Amin of the to-be-encoded point, the residual index identification bit field of the to-be-encoded point is set to the fifth identification value (minResFlag=1), the second residual value of the to-be-encoded point in the reference direction is determined based on the minimum residual value Amin (A'=A-1), and the difference between the first residual value of the to-be-encoded point in the non-reference direction and the minimum residual value Amin is determined as the second residual value of the to-be-encoded point in the non-reference direction (A'=A-Amin). If the reference residual value is zero, the residual index identification bit field is not used.
[0268] The specific steps are as follows:
[0269] ①Determine a direction as the reference direction, and the first residual value of the reference direction can be recorded as the reference residual value Abase, i.e., determine the reference direction in K directions.
[0270] ②Determine whether the reference residual value Abase is zero, if the reference residual value Abase is zero, the residual index identification bit field (minResFlag) is not used.
[0271] If the reference residual value Abase is zero, it is determined whether the reference residual value Abase is the minimum residual value Amin in the first residual values of each of the K directions of the node to be encoded.
[0272] The subsequent steps of the non-zero single-index method can refer to steps ③ and ④ in the aforementioned single-index method, which will not be described here.
[0273] In step S204, the second residual information of each of the K directions of the node to be encoded is encoded according to the encoding mode information.
[0274] The second residual information of each of the K directions of the node to be encoded can include the second residual value and the residual sign bit information of the corresponding direction, and the encoding process of the second residual information can include the encoding process of the second residual value and the encoding process of the residual sign bit information. That is, the second residual value of each of the K directions of the node to be encoded can be encoded, and the residual sign bit information of each of the K directions of the node to be encoded can be encoded according to the encoding mode information.
[0275] In one or more embodiments, the encoding process of the second residual value can include: performing a logarithmic operation on the non-zero residual value in the second residual value of each of the K directions of the node to be encoded to obtain the target occupied bit number B of each of the K directions of the node to be encoded. For example, the target occupied bit number B of each of the K directions of the node to be encoded can be encoded by the formula B = ceil (log2(A')), which can be denoted as Bx, By, and Bz; wherein the ceil function is a rounding up function, which is used to return the smallest integer greater than or equal to the expression log2(A'), Bx represents the target occupied bit number of the x direction of the node to be encoded, By represents the target occupied bit number of the y direction of the node to be encoded, and Bz represents the target occupied bit number of the z direction of the node to be encoded.
[0276] Further, based on the target occupied bit number B of each of the K directions of the node to be encoded, the candidate occupied bit number B' of each of the K directions of the node to be encoded is determined, and the value corresponding to each bit in the candidate occupied bit number of each of the K directions of the node to be encoded is encoded based on the occupied bit value field (ptn_residual_value_per[i]).
[0277] The implementation of determining the candidate occupied bit number B' based on the target occupied bit number B can include but is not limited to any one of the following:
[0278] (1) The target occupied bit number B is not processed, and the target occupied bit number B is taken as the candidate occupied bit number B', that is, B' = B.
[0279] (2) A non-zero full index method is adopted, which can include: based on the number M2 of non-zero residual values in the K first residual values corresponding to the to-be-encoded point, setting a bit index identification bit field (minBitFlag) for the to-be-encoded point; the bit index identification bit field is used to indicate the seventh non-zero direction corresponding to the minimum occupied bit number Bmin, the minimum occupied bit number Bmin is the minimum value in the K target occupied bit numbers corresponding to the to-be-encoded point, the M2 non-zero residual values correspond to M2 non-zero directions, and M2 is a positive integer less than or equal to K. Wherein:
[0280] ① When M2 = K, a bit index identification bit field (minBitFlag) occupying 2 bits can be set, when the bit index identification bit field is set to a first identification value (minBitFlag = 00), the seventh non-zero direction corresponding to the minimum occupied bit number Bmin is the x direction, that is, minBitFlag = 00, Bmin = Bx.
[0281] When the bit index identification bit field is set to a second identification value (minBitFlag = 01), the seventh non-zero direction corresponding to the minimum occupied bit number Bmin is the y direction, that is, minBitFlag = 01, Bmin = By.
[0282] When the bit index identification bit field is set to a third identification value (minBitFlag = 10), the seventh non-zero direction corresponding to the minimum occupied bit number Bmin is the z direction, that is, minBitFlag = 10, Bmin = Bz.
[0283] ② When M2 = K-1, a bit index identification bit field (minBitFlag) occupying 1 bit is set, Bx = 0 (the x direction is a zero direction, and the y and z directions are non-zero directions), minBitFlag = 0 (a fourth identification value), Bmin = By, at this time the seventh non-zero direction corresponding to Bmin is the y direction; minBitFlag = 1 (a fifth identification value), Bmin = Bz, at this time the seventh non-zero direction corresponding to Bmin is the z direction.
[0284] By = 0, minBitFlag = 0 (the y direction is a zero direction, and the x and z directions are non-zero directions), Bmin = Bx, at this time the seventh non-zero direction corresponding to Bmin is the x direction; minBitFlag = 1, Bmin = Bz, at this time the seventh non-zero direction corresponding to Bmin is the z direction.
[0285] Bz=0 (z direction is zero direction, x, y direction is non-zero direction), minBitFlag=0, Bmin=Bx, at this time the seventh non-zero direction corresponding to Bmin is x direction; minBitFlag=1, Bmin=By, at this time the seventh non-zero direction corresponding to Bmin is y direction.
[0286] ③When M2K-1, the bit index identification bit field (minBitFlag) is not used.
[0287] Further, the remaining directions in the M2 non-zero directions except the seventh non-zero direction are determined as the eighth non-zero direction, the candidate occupied bit number of the to-be-encoded point in the seventh non-zero direction is determined based on the minimum occupied bit number Bmin, that is, B'=B-e (e takes the value of 1); the difference between the target occupied bit number of the to-be-encoded point in the eighth non-zero direction and the minimum occupied bit number Bmin is determined as the candidate occupied bit number of the to-be-encoded point in the eighth non-zero direction, that is, B'=B-Bmin.
[0288] In one or more embodiments, taking the i-th direction in the M2 non-zero directions as an example, assuming that the coding mode information indicates that the coding mode of the current to-be-encoded point in the i-th direction is a mode after taking remainder calculation on the second residual value of the to-be-encoded point in the i-th direction (for the convenience of understanding, it can be referred to as the first remainder coding mode), the coding process in the first remainder coding mode can include: taking remainder calculation on the second residual value A'[i] of the to-be-encoded point in the i-th non-zero direction to obtain the residual quotient A'1[i] and the residual remainder A'2[i] (A'[i] = A'1[i] × d + A'2[i]); determining the candidate occupied bit number B'[i] of the residual quotient A'1[i], using the occupied bit number field corresponding to the i-th direction of the to-be-encoded point (i.e. ptn_residual_numbits[i]) to represent the candidate occupied bit number B'[i], and encoding the occupied bit number field; using the residual remainder field corresponding to the i-th direction of the to-be-encoded point (i.e. ptn_residual_abs_remaining[i]) to represent the residual remainder A'2[i], and encoding the residual remainder field; using the B'[i] bit elements in the occupied bit number field corresponding to the i-th direction of the to-be-encoded point (B'[i] bit elements in ptn_residual_value_per[k]) to represent the value of each bit in the B'[i] bit occupied by the residual quotient A'1[i], and encoding the B'[i] bit elements in the occupied bit value field. Wherein, d represents the divisor in the remainder calculation, for example, the remainder calculation is remainder after division by 2, then d = 2. In this way, the second residual value is coded after taking remainder calculation, which can further reduce the amount of coding data and further improve the geometry coding efficiency of the point cloud.
[0289] Optionally, assuming that the coding mode information indicates that the coding mode of the current to-be-encoded point in the i-th direction is a mode that encodes the candidate number of bits occupied by the second residual value of the to-be-decoded point in the i-th direction after performing the remainder calculation (for the sake of understanding, it can be referred to as a second remainder coding mode), the coding processing process in the second remainder coding mode can include: determining the candidate number of bits B'[i] occupied by the second residual value A'[i] of the to-be-encoded point in the i-th direction; performing the remainder calculation on the candidate number of bits B'[i] to obtain a quotient number B'1[i] and a remainder number B'2[i] (B'[i] = B'1[i] x d + B'2[i]); using the number of bits occupied field (ptn_residual_numbits[i]) corresponding to the i-th direction of the to-be-decoded point to represent the quotient number B'1[i], and encoding the number of bits occupied field; using the number of bits remaining field (ptn_numbits_remaining[i]) corresponding to the i-th direction of the to-be-decoded point to represent the remainder number B'2[i], and encoding the number of bits remaining field; using the B'[i] bit element in the number of bits value field (the B'[i] bit element in ptn_residual_value_per[i]) corresponding to the i-th direction of the to-be-decoded point to represent the number of each bit in the B'[i] bits occupied by the residual value of the to-be-decoded point in the i-th direction, and encoding the B'[i] bit element in the number of bits value field; wherein d represents the divisor in the remainder calculation, for example, the remainder calculation is remainder division by 2, and d = 2. In this way, the candidate number of bits occupied by the second residual value is encoded after the remainder calculation, which can reduce the amount of encoded data and further improve the geometric coding efficiency of the point cloud.
[0290] It should be noted that the coding mode information can also be used to indicate that the coding mode of the to-be-encoded point in the i-th direction is a mode that encodes the second residual value of the to-be-decoded point in the i-th direction after performing the remainder calculation, and then encodes the candidate number of bits occupied by the second residual value of the to-be-decoded point in the i-th direction after performing the remainder calculation (which can be referred to as a third remainder coding mode). The coding processing process in the third remainder coding mode can combine the coding processing process in the first remainder coding mode and the coding processing process in the second remainder coding mode, which will not be described here.
[0291] In one or more embodiments, the implementation of the coding processing process of the residual sign bit information can include but is not limited to any one of the following:
[0292] (1) directly encode the residual sign bit information. Specifically, based on the residual sign bit information of the to-be-encoded point in each of the K directions, a residual sign flag field of the to-be-encoded point in each of the K directions is set, and the value of the residual sign flag field in each of the K directions is encoded;
[0293] When the residual sign bit information of the to-be-encoded point in the i-th direction is non-negative, the residual sign flag field of the to-be-encoded point in the i-th direction is set to a target value (ptn_residual_sign_flag = 1); when the residual sign bit information of the to-be-encoded point in the i-th direction is negative, the residual sign flag field of the to-be-encoded point in the i-th direction is set to a non-target value (ptn_residual_sign_flag = 0).
[0294] (2) set a sign identification bit field signFlag, which is used to indicate the sign association relationship between the current to-be-encoded point and the previous point. Specifically, according to the sign association relationship of the to-be-encoded point and the previous point in each of the K directions, a sign identification bit field of the to-be-encoded point in each of the K directions is set, and the value of the sign identification bit field in each of the K directions is encoded;
[0295] When the residual sign bit information of the to-be-encoded point and the previous point in the i-th direction is the same, the sign identification bit field of the to-be-encoded point in the i-th direction is set to a target value (signFlag = 1); when the residual sign bit information of the to-be-encoded point and the previous point in the i-th direction is different, the sign identification bit field of the to-be-encoded point in the i-th direction is set to a non-target value (signFlag = 0); the previous point is a point in the point cloud that has been encoded.
[0296] It should be noted that in the encoding process of the to-be-encoded point, the steps in the various implementation manners described above can be used alone or in combination, and the present application does not limit this. After the second residual information (including the second residual value and the residual sign bit information) is encoded at the encoding end, a geometry bit stream can be obtained, which can be transmitted to the decoding end.
[0297] In the encoding process of the point cloud, the encoding mode information of the point cloud can be determined; the first residual information of each direction of K directions of a to-be-encoded point in the point cloud is obtained based on the geometric prediction tree; then the first residual information of each direction of K directions of the to-be-encoded point is further predicted twice to obtain the second residual information of each direction of K directions of the to-be-encoded point; the first residual value in the first residual information is greater than or equal to the second residual value in the second residual information; and the second residual information of each direction of K directions of the to-be-encoded point is encoded according to the encoding mode information. By using the correlation degree of the first residual value of the to-be-encoded point in the front and back sequences or each direction, the residual encoding value can be reduced, and the geometric encoding efficiency can be improved. The second residual value or the candidate occupied bit number can be encoded by using the remainder encoding, the residual encoding value can be further reduced, and the geometric encoding efficiency can be further improved without affecting the single-point reconstruction of the point cloud.
[0298] Please refer to Figure 9 , Figure 9 is a structural schematic diagram of a point cloud processing device provided by an embodiment of the present application; the point cloud processing device can be a computer program (including program code) running in a decoding device, for example, the point cloud processing device is an application software in the decoding device. Please refer to Figure 9 , the point cloud processing device 1 can include an acquisition module 11, a decoding module 12, and a reconstruction module 13.
[0299] The acquisition module 11 is configured to acquire the encoding mode information of the point cloud.
[0300] The decoding module 12 is configured to decode the to-be-decoded point in the point cloud according to the encoding mode information to obtain the second residual information of each direction of K directions of the to-be-decoded point; K is a positive integer.
[0301] The decoding module 12 is further configured to determine the first residual information of each direction of K directions of the to-be-decoded point based on the second residual information of each direction of K directions of the to-be-decoded point; the second residual value in the second residual information is less than or equal to the first residual value in the first residual information.
[0302] The reconstruction module 13 is configured to reconstruct the geometric information of the to-be-decoded point according to the first residual information of each direction of K directions of the to-be-decoded point.
[0303] In one or more embodiments, the acquisition module 11 is specifically configured to:
[0304] acquire a default encoding mode set by negotiation of the decoding end and the encoding end, and determine the default encoding mode as the encoding mode information of the point cloud; the default encoding mode is the encoding mode of the to-be-decoded point in the point cloud.
[0305] Or, the obtaining module 11 is specifically configured to:
[0306] obtain an encoding encapsulation file of the point cloud; the encoding encapsulation file comprises an encoding parameter set or an encoding bitstream;
[0307] parse the encoding encapsulation file to obtain an encoding mode of a to-be-decoded point in the point cloud, and determine the encoding mode of the to-be-decoded point as the encoding mode information of the point cloud.
[0308] Or, the obtaining module 11 is specifically configured to:
[0309] obtain a determination threshold corresponding to the point cloud; the determination threshold is determined by the encoding end and the decoding end in common, or the determination threshold is parsed from the encoding parameter set or the encoding bitstream of the point cloud;
[0310] when the determination threshold comprises a first threshold, obtain statistical characteristic information corresponding to the residual analysis information of the to-be-decoded point, determine the encoding mode of the to-be-decoded point based on a numerical comparison relationship between the statistical characteristic information and the first threshold, and determine the encoding mode of the to-be-decoded point as the encoding mode information;
[0311] when the determination threshold comprises a second threshold, obtain edge length ratio information corresponding to a bounding box of the point cloud, determine the encoding mode of the to-be-decoded point based on a numerical comparison relationship between the edge length ratio information and the second threshold, and determine the encoding mode of the to-be-decoded point as the encoding mode information; the bounding box is used to represent a minimum cuboid containing all points in the point cloud;
[0312] when the determination threshold comprises a third threshold and a fourth threshold, determine a threshold condition range based on the third threshold and the fourth threshold, determine the encoding mode of the to-be-decoded point according to a dependency relationship between a quantization parameter of the to-be-decoded point and the threshold condition range, and determine the encoding mode of the to-be-decoded point as the encoding mode information.
[0313] In one or more embodiments, the decoding process comprises residual value decoding and residual symbol decoding; the decoding module 12 decodes the to-be-decoded point in the point cloud according to the encoding mode information to obtain second residual information of the to-be-decoded point in each of the K directions, which can comprise:
[0314] perform residual value decoding on the to-be-decoded point in the point cloud according to the encoding mode information to obtain second residual values of the to-be-decoded point in each of the K directions;
[0315] perform residual symbol decoding on the to-be-decoded point to obtain residual symbol bit information of the to-be-decoded point in each of the K directions;
[0316] determining the second residual value of the to-be-decoded point in each of the K directions based on the second residual value of the to-be-decoded point in each of the K directions and the residual sign bit information of the to-be-decoded point in each of the K directions.
[0317] In one or more embodiments, the decoding module 12 can perform residual value decoding on the to-be-decoded point in the point cloud according to the encoding mode information, and the determining the second residual value of the to-be-decoded point in each of the K directions can include:
[0318] determining the non-zero directions of the to-be-decoded point in the point cloud based on the residual value flag field in the encoding mode information; when the residual value flag field of the to-be-decoded point in the ith direction is set to a target value, the ith direction is a non-zero direction, and i is a positive integer less than or equal to K;
[0319] determining the target number of occupied bits of the to-be-decoded point in the non-zero direction by analyzing the number of occupied bits field of the to-be-decoded point in the non-zero direction;
[0320] analyzing the number of occupied bits value field of the to-be-decoded point in the non-zero direction based on the target number of occupied bits to obtain the second residual value of the to-be-decoded point in the non-zero direction.
[0321] In one or more embodiments, the number of non-zero directions is M1, and M1 is a positive integer less than or equal to K;
[0322] The decoding module 12 can determine the target number of occupied bits of the to-be-decoded point in the non-zero direction by analyzing the number of occupied bits field of the to-be-decoded point in the non-zero direction, which can include:
[0323] sequentially analyzing the number of occupied bits field of the to-be-decoded point in the M1 non-zero directions to obtain the candidate number of occupied bits of the to-be-decoded point in the M1 non-zero directions;
[0324] analyzing the bit index identification bit field corresponding to the to-be-decoded point to obtain the first non-zero direction indicated by the minimum number of occupied bits B'min; the minimum number of occupied bits B'min is the minimum value of the M1 candidate numbers of occupied bits corresponding to the to-be-decoded point;
[0325] determining the second non-zero directions from the remaining directions in the M1 non-zero directions except for the first non-zero direction, and determining the target number of occupied bits of the to-be-decoded point in the first non-zero direction based on the minimum number of occupied bits B'min;
[0326] determining the target number of occupied bits of the to-be-decoded point in the second non-zero direction as the sum of the candidate number of occupied bits of the to-be-decoded point in the second non-zero direction and the minimum number of occupied bits B'min.
[0327] In one or more embodiments, M1 is equal to K; the decoding module 12 parses the bit index identification bit field corresponding to the to-be-decoded point to obtain the first non-zero direction indicated by the minimum occupied bit number B'min, which can include:
[0328] If the bit index identification bit field corresponding to the to-be-decoded point is a first identification value, it is determined that the first non-zero direction indicated by the minimum occupied bit number B'min is the horizontal coordinate direction;
[0329] If the bit index identification bit field corresponding to the to-be-decoded point is a second identification value, it is determined that the first non-zero direction indicated by the minimum occupied bit number B'min is the vertical coordinate direction;
[0330] If the bit index identification bit field corresponding to the to-be-decoded point is a third identification value, it is determined that the third non-zero direction indicated by the minimum occupied bit number B'min is the vertical coordinate direction.
[0331] In one or more embodiments, M1 is equal to K-1; the decoding module 12 parses the bit index identification bit field corresponding to the to-be-decoded point to obtain the first non-zero direction indicated by the minimum occupied bit number B'min, which can include:
[0332] If the M1 non-zero directions include the vertical coordinate direction and the vertical coordinate direction, and the bit index identification bit field corresponding to the to-be-decoded point is a fourth identification value, it is determined that the first non-zero direction indicated by the minimum occupied bit number B'min is the vertical coordinate direction;
[0333] If the M1 non-zero directions include the horizontal coordinate direction and the vertical coordinate direction, and the bit index identification bit field corresponding to the to-be-decoded point is a fourth identification value, it is determined that the first non-zero direction indicated by the minimum occupied bit number B'min is the horizontal coordinate direction;
[0334] If the M1 non-zero directions include the horizontal coordinate direction and the vertical coordinate direction, and the bit index identification bit field corresponding to the to-be-decoded point is a fourth identification value, it is determined that the first non-zero direction indicated by the minimum occupied bit number B'min is the horizontal coordinate direction.
[0335] In one or more embodiments, M1 is less than K-1; the decoding module 12 is further configured to:
[0336] Stop parsing the bit index identification bit field corresponding to the to-be-decoded point, and determine the candidate occupied bit number of the to-be-decoded point in the M1 non-zero directions as the target occupied bit number of the to-be-decoded point in the M1 non-zero directions.
[0337] In one or more embodiments, the decoding module 12 decodes the residual value of the to-be-decoded point in the point cloud according to the encoding mode information to obtain the second residual value of each direction of the to-be-decoded point in the K directions, which can include:
[0338] determining, based on the residual value flag field in the coding mode information, a non-zero direction of the to-be-decoded point in the K directions in the point cloud; when the residual value flag field in the i-th direction of the to-be-decoded point is set to a target value, the i-th direction is the non-zero direction, i is a positive integer less than or equal to K;
[0339] parsing the occupied bit number field of the to-be-decoded point in the i-th direction to obtain a target occupied bit number B[i] of the to-be-decoded point in the i-th direction;
[0340] parsing the value of the occupied bit value field of the to-be-decoded point in the i-th direction to obtain a residual quotient A1[i] of the to-be-decoded point in the i-th direction;
[0341] parsing the residual remainder field corresponding to the i-th direction of the to-be-decoded point to obtain a residual remainder A2[i] of the to-be-decoded point in the i-th direction;
[0342] determining a second residual value A'[i] of the to-be-decoded point in the i-th direction according to the residual quotient A1[i] and the residual remainder A2[i].
[0343] In one or more embodiments, the decoding module 12 performs residual sign decoding on the to-be-decoded point to obtain residual sign bit information of the to-be-decoded point in each of the K directions, which can include:
[0344] parsing the residual sign flag field of the to-be-decoded point in each of the K directions to obtain the residual sign bit information of the to-be-decoded point in each of the K directions;
[0345] wherein, when the residual sign flag field in the i-th direction is set to a target value, the residual sign bit information of the to-be-decoded point in the i-th direction is non-negative; when the residual sign flag field in the i-th direction is not set to the target value, the residual sign bit information of the to-be-decoded point in the i-th direction is negative; i is a positive integer less than or equal to K.
[0346] In one or more embodiments, the decoding module 12 performs residual sign decoding on the to-be-decoded point to obtain residual sign bit information of the to-be-decoded point in each of the K directions, which can include:
[0347] parsing the sign identification bit field of the to-be-decoded point in each of the K directions to obtain a sign association relationship between the to-be-decoded point and a previous point in each of the K directions, and determining the residual sign bit information of the to-be-decoded point in each of the K directions based on the sign association relationship;
[0348] wherein, when the sign identification bit field of the to-be-decoded point in the i-th direction is set to the target value, the residual sign bit information of the to-be-decoded point and the previous point in the i-th direction is the same; when the sign identification bit field of the to-be-decoded point in the i-th direction is not set to the target value, the residual sign bit information of the to-be-decoded point and the previous point in the i-th direction is different; the previous point is a point in the point cloud that has completed decoding, and i is a positive integer less than or equal to K.
[0349] In one or more embodiments, the second residual information includes a second residual value and residual sign bit information; and the decoding module 12 determines the first residual information of the to-be-decoded point in each of the K directions based on the second residual information of the to-be-decoded point in each of the K directions can include:
[0350] parsing the residual index identification bit field corresponding to the to-be-decoded point to obtain a reference direction indicated by a minimum residual value A'min; the minimum residual value A'min is the minimum value of the K second residual values corresponding to the to-be-decoded point;
[0351] determining the remaining directions in the K directions except the reference direction as non-reference directions, and determining the first residual value of the to-be-decoded point in the reference direction based on the minimum residual value A'min;
[0352] determining the sum of the second residual value of the to-be-decoded point in the non-reference direction and the minimum residual value A'min as the first residual value of the to-be-decoded point in the non-reference direction;
[0353] determining the first residual information of the to-be-decoded point in each of the K directions based on the first residual value of the to-be-decoded point in the reference direction, the first residual value of the to-be-decoded point in the non-reference direction, and the residual sign bit information in the second residual information;
[0354] wherein, when the residual index identification bit field is the first identification value, the reference direction is the horizontal coordinate direction; when the residual index identification bit field is the second identification value, the reference direction is the vertical coordinate direction; and when the residual index identification bit field is the third identification value, the reference direction is the vertical coordinate direction.
[0355] In one or more embodiments, the second residual information includes a second residual value and residual sign bit information; and the decoding module 12 determines the first residual information of the to-be-decoded point in each of the K directions based on the second residual information of the to-be-decoded point in each of the K directions can include:
[0356] based on the number M1 of non-zero directions in the K directions of the to-be-decoded point, parsing the residual index identification bit field corresponding to the to-be-decoded point to obtain a third non-zero direction indicated by a minimum residual value A'min; the minimum residual value A'min is the minimum value of the M1 second residual values corresponding to the to-be-decoded point, and M1 is a positive integer less than or equal to K.
[0357] determining a first residual value of the to-be-decoded point in the third non-zero direction based on the minimum residual value A'min;
[0358] determining a first residual value of the to-be-decoded point in the fourth non-zero direction based on a sum of a second residual value of the to-be-decoded point in the fourth non-zero direction and the minimum residual value A'min;
[0359] determining the first residual information of each of the K directions of the to-be-decoded point based on the first residual value of the to-be-decoded point in the third non-zero direction, the first residual value of the to-be-decoded point in the fourth non-zero direction, and residual sign bit information in the second residual information.
[0360] In one or more embodiments, M1 is equal to K, and the decoding module 12 parses a residual index identification bit field corresponding to the to-be-decoded point to obtain the third non-zero direction indicated by the minimum residual value A'min, which can include:
[0361] If the residual index identification bit field corresponding to the to-be-decoded point is a first identification value, the first non-zero direction indicated by the minimum residual value A'min is determined to be the horizontal coordinate direction;
[0362] If the residual index identification bit field corresponding to the to-be-decoded point is a second identification value, the first non-zero direction indicated by the minimum residual value A'min is determined to be the vertical coordinate direction;
[0363] If the residual index identification bit field corresponding to the to-be-decoded point is a third identification value, the third non-zero direction indicated by the minimum residual value A'min is determined to be the vertical coordinate direction.
[0364] In one or more embodiments, M1 is equal to K-1, and the decoding module 12 parses a residual index identification bit field corresponding to the to-be-decoded point to obtain the third non-zero direction indicated by the minimum residual value A'min, which can include:
[0365] If the M1 non-zero directions include the vertical coordinate direction and the vertical coordinate direction, and the residual index identification bit field corresponding to the to-be-decoded point is a fourth identification value, the first non-zero direction indicated by the minimum residual value A'min is determined to be the vertical coordinate direction;
[0366] If the M1 non-zero directions include the horizontal coordinate direction and the vertical coordinate direction, and the residual index identification bit field corresponding to the to-be-decoded point is a fourth identification value, the first non-zero direction indicated by the minimum residual value A'min is determined to be the horizontal coordinate direction;
[0367] If the M1 non-zero directions include the horizontal coordinate direction and the vertical coordinate direction, and the residual index identification bit field corresponding to the to-be-decoded point is the fourth identification value, it is determined that the first non-zero direction indicated by the minimum residual value A'min is the horizontal coordinate direction.
[0368] In one or more embodiments, M1 is less than K-1; the decoding module 12 is further configured to:
[0369] Stop parsing the residual index identification bit field corresponding to the to-be-decoded point, and determine the second residual value of the to-be-decoded point in the M1 non-zero directions as the first residual value of the to-be-decoded point in the M1 non-zero directions.
[0370] In one or more embodiments, the second residual information includes the second residual value and the residual sign bit information; the decoding module 12 determines the first residual information of the to-be-decoded point in each direction of the K directions based on the second residual information of the to-be-decoded point in each direction of the K directions can include:
[0371] Determining a default reference direction in the K directions that is commonly negotiated by the decoding end and the encoding end, and determining the directions other than the reference direction in the K directions as non-reference directions;
[0372] If the residual index identification bit field corresponding to the to-be-decoded point is the fourth identification value, it is determined that the second residual value of the to-be-decoded point in the reference direction is not the minimum residual value A'min, and the first residual value of the to-be-decoded point is determined based on the second residual value of the to-be-decoded point;
[0373] If the residual index identification bit field corresponding to the to-be-decoded point is the fifth identification value, it is determined that the second residual value of the to-be-decoded point in the reference direction is the minimum residual value A'min, and the first residual value of the to-be-decoded point in the reference direction is determined based on the minimum residual value A'min, and the sum of the second residual value of the to-be-decoded point in the non-reference direction and the minimum residual value A'min is determined as the first residual value of the to-be-decoded point in the non-reference direction;
[0374] Determine the first residual information of the to-be-decoded point in each direction of the K directions based on the first residual value of the to-be-decoded point in each direction of the K directions and the residual sign bit information in the second residual information.
[0375] In one or more embodiments, the second residual information includes the second residual value and the residual sign bit information; the decoding module 12 determines the first residual information of the to-be-decoded point in each direction of the K directions based on the second residual information of the to-be-decoded point in each direction of the K directions can include:
[0376] Determining a default reference direction in the K directions that is commonly negotiated by the decoding end and the encoding end, and determining the directions other than the reference direction in the K directions as non-reference directions;
[0377] When the second residual value of the to-be-decoded point in the reference direction is a non-zero value, if the residual index identification bit field corresponding to the to-be-decoded point is parsed as the fourth identification value, the first residual value of the to-be-decoded point is determined based on the second residual value of the to-be-decoded point;
[0378] When the second residual value of the to-be-decoded point in the reference direction is a non-zero value, if the residual index identification bit field corresponding to the to-be-decoded point is parsed as the fifth identification value, the second residual value of the to-be-decoded point in the reference direction is determined as the minimum residual value A'min, the first residual value of the to-be-decoded point in the reference direction is determined based on the minimum residual value A'min, and the sum of the second residual value of the to-be-decoded point in the non-reference direction and the minimum residual value A'min is determined as the first residual value of the to-be-decoded point in the non-reference direction;
[0379] The first residual information of the to-be-decoded point in each of the K directions is determined based on the first residual value of the to-be-decoded point in each of the K directions and the residual sign bit information in the second residual information.
[0380] In one or more embodiments, the decoding module 12 is further configured to, when the second residual value of the to-be-decoded point in the reference direction is zero, determine that the residual index identification bit field is not used for the to-be-decoded point.
[0381] According to the embodiments of the present application, Figure 9 The units in the point cloud processing apparatus 1 shown in the above embodiments can be combined into one or several other units respectively or all, or some of the units can be further split into a plurality of units with smaller functions to constitute, which can realize the same operation without affecting the realization of the technical effects of the embodiments of the present application. The above units are divided based on logical functions. In actual applications, the functions of one unit can also be realized by a plurality of units, or the functions of a plurality of units can be realized by one unit. In other embodiments of the present application, the point cloud processing apparatus 1 can also include other units, and in actual applications, these functions can also be realized by other units, and can be realized by a plurality of units in cooperation.
[0382] In the decoding process of the point cloud, the encoding mode information of the point cloud can be obtained, the to-be-decoded point in the point cloud is decoded based on the encoding mode information, the second residual information of the to-be-decoded point can be obtained, and then the first residual information is determined based on the second residual information. The geometric information of the to-be-decoded point can be reconstructed through the first residual information, and the first residual value in the second residual information is less than or equal to the first residual value in the first residual information. In the decoding process of the point cloud, the second residual information is inversely predicted through the correlation of the geometric residual information of the to-be-decoded point in each of the K directions, which can improve the geometric decoding efficiency of the point cloud.
[0383] Please refer to Figure 10 , Figure 10 is another structural schematic diagram of a point cloud processing apparatus provided by an embodiment of the present application; the point cloud processing apparatus can be a computer program (including program code) running in an encoding device, for example, the point cloud processing apparatus is an application software in the encoding device. Please refer to Figure 10 , the point cloud processing apparatus 2 can include a determination module 21, a residual information acquisition module 22, and an encoding module 23.
[0384] The determination module 21 is configured to determine the encoding mode information of the point cloud.
[0385] The residual information acquisition module 22 is configured to acquire first residual information of each of K directions of a to-be-encoded point in the point cloud; K is a positive integer.
[0386] The residual information acquisition module 22 is further configured to determine second residual information of each of the K directions of the to-be-encoded point based on the first residual information of each of the K directions of the to-be-encoded point; a first residual value in the first residual information is greater than or equal to a second residual value in the second residual information.
[0387] The encoding module 23 is configured to perform encoding processing on the second residual information of each of the K directions of the to-be-encoded point according to the encoding mode information.
[0388] In one or more embodiments, the determination module 21 is specifically configured to:
[0389] acquire a default encoding mode set by negotiation of the decoding end and the encoding end, and determine the default encoding mode as the encoding mode information of the point cloud; the default encoding mode is an encoding mode of each of the K directions of the to-be-encoded point in the point cloud.
[0390] Alternatively, the determination module 21 is specifically configured to:
[0391] determine an encoding mode of each of the K directions for the to-be-encoded point in the point cloud, determine the encoding mode of each of the K directions as the encoding mode information of the point cloud, and write the encoding mode information into an encoding parameter set or an encoding bitstream of the point cloud.
[0392] Alternatively, the determination module 21 is specifically configured to:
[0393] acquire a determination threshold set by negotiation of the decoding end and the encoding end.
[0394] When the determination threshold includes a first threshold, acquire statistical characteristic information corresponding to the first residual value of the to-be-encoded point, determine the encoding mode of the to-be-encoded point based on a numerical comparison relationship between the statistical characteristic information and the first threshold, and determine the encoding mode of the to-be-encoded point as the encoding mode information of the point cloud.
[0395] When the determination threshold comprises the second threshold, edge length ratio information corresponding to a bounding box of the point cloud is obtained, the encoding mode of the to-be-encoded point is determined based on a numerical comparison relationship between the edge length ratio information and the second threshold, and the encoding mode of the to-be-encoded point is determined as the encoding mode information; the bounding box is used to represent a minimum cuboid containing all points of the point cloud;
[0396] When the determination threshold comprises the third threshold and the fourth threshold, a threshold condition range is determined based on the third threshold and the fourth threshold, the encoding mode of the to-be-encoded point is determined according to a dependency relationship between the quantization parameter of the to-be-encoded point and the threshold condition range, and the encoding mode of the to-be-encoded point is determined as the encoding mode information.
[0397] The determination threshold and the encoding mode information are written into an encoding parameter set or an encoding bitstream of the point cloud.
[0398] In one or more embodiments, the residual information obtaining module 22 obtaining the first residual information of the to-be-encoded point in the point cloud in each of the K directions can include:
[0399] A geometry prediction tree corresponding to the point cloud is constructed, and the first residual information of the to-be-encoded point in the point cloud in each of the K directions is obtained based on the geometry prediction tree;
[0400] The first residual information of the to-be-encoded point in the i-th direction includes a first residual value of the to-be-encoded point in the i-th direction and residual sign bit information of the to-be-encoded point in the i-th direction; when the first residual value of the to-be-encoded point in the i-th direction is zero, the first residual value in the i-th direction is encoded as the identification information.
[0401] In one or more embodiments, the residual information obtaining module 22 determining the second residual information of the to-be-encoded point in each of the K directions based on the first residual information of the to-be-encoded point in each of the K directions can include:
[0402] A minimum residual value Amin in the first residual value of the to-be-encoded point in each of the K directions is obtained, and a residual index identification bit field is set for the minimum residual value Amin; the residual index identification bit field is used to indicate a reference direction corresponding to the minimum residual value Amin;
[0403] The remaining directions except the reference direction in the K directions are determined as non-reference directions, and the second residual value of the to-be-encoded point in the reference direction is determined based on the minimum residual value Amin;
[0404] The difference between the first residual value of the to-be-encoded point in the non-reference direction and the minimum residual value Amin is determined as the second residual value of the to-be-encoded point in the non-reference direction;
[0405] determine the second residual information of the to-be-encoded point in each of the K directions based on the second residual value of the to-be-encoded point in the reference direction, the second residual value of the to-be-encoded point in the non-reference direction, and the residual sign bit information in the first residual information;
[0406] wherein the reference direction is the horizontal coordinate direction when the residual index identification bit field is set to the first identification value; the reference direction is the vertical coordinate direction when the residual index identification bit field is set to the second identification value; and the reference direction is the vertical coordinate direction when the residual index identification bit field is set to the first identification value.
[0407] In one or more embodiments, the residual information obtaining module 22 can determine the second residual information of the to-be-encoded point in each of the K directions based on the first residual information of the to-be-encoded point in each of the K directions, which can include:
[0408] determining the non-zero minimum value in the first residual values of the to-be-encoded point in each of the K directions as the minimum residual value Amin;
[0409] obtaining the number M2 of non-zero residual values in the K first residual values corresponding to the to-be-encoded point, and setting the residual index identification bit field based on the number M2 for the minimum residual value Amin; the residual index identification bit field is used to indicate the fifth non-zero direction corresponding to the minimum residual value Amin, the M2 non-zero residual values correspond to M2 non-zero directions, and M2 is a positive integer less than or equal to K;
[0410] determining the remaining directions except the fifth non-zero direction in the M2 non-zero directions as the sixth non-zero directions, and determining the second residual value of the to-be-encoded point in the fifth non-zero direction based on the minimum residual value Amin;
[0411] determining the difference between the first residual value of the to-be-encoded point in the sixth non-zero direction and the minimum residual value Amin as the second residual value of the to-be-encoded point in the sixth non-zero direction;
[0412] determining the second residual information of the to-be-encoded point in each of the K directions based on the second residual value of the to-be-encoded point in the fifth non-zero direction, the second residual value of the to-be-encoded point in the sixth non-zero direction, and the residual sign bit information in the first residual information.
[0413] In one or more embodiments, M2 is equal to K; and the residual information obtaining module 22 is further configured to:
[0414] if the residual index identification bit field corresponding to the to-be-encoded point is set to the first identification value, then the fifth non-zero direction corresponding to the minimum residual value Amin is determined to be the horizontal coordinate direction;
[0415] If the residual index identification bit field corresponding to the to-be-encoded point is set to the second identification value, it is determined that the fifth non-zero direction corresponding to the minimum residual value Amin is the longitudinal coordinate direction;
[0416] If the residual index identification bit field corresponding to the to-be-encoded point is set to the third identification value, it is determined that the fifth non-zero direction corresponding to the minimum residual value Amin is the vertical coordinate direction.
[0417] In one or more embodiments, M2 is equal to K-1; the residual information acquisition module 22 is further configured to:
[0418] If the M2 non-zero directions include the longitudinal coordinate direction and the vertical coordinate direction, and the residual index identification bit field is set to the fourth identification value, it is determined that the fifth non-zero direction corresponding to the minimum residual value Amin is the longitudinal coordinate direction;
[0419] If the M2 non-zero directions include the horizontal coordinate direction and the vertical coordinate direction, and the residual index identification bit field is set to the fourth identification value, it is determined that the fifth non-zero direction corresponding to the minimum residual value Amin is the horizontal coordinate direction;
[0420] If the M2 non-zero directions include the horizontal coordinate direction and the longitudinal coordinate direction, and the residual index identification bit field is set to the fourth identification value, it is determined that the fifth non-zero direction corresponding to the minimum residual value Amin is the horizontal coordinate direction.
[0421] In one or more embodiments, when M2 is less than K-1, the to-be-encoded point does not use the residual index identification bit field.
[0422] In one or more embodiments, the residual information acquisition module 22 determines the second residual information of the to-be-encoded point in each of the K directions based on the first residual information of the to-be-encoded point in each of the K directions can include:
[0423] Determining a reference direction among the K directions, and determining the directions other than the reference direction among the K directions as non-reference directions;
[0424] If the first residual value of the to-be-encoded point in the reference direction is not the minimum residual value Amin of the to-be-encoded point, the residual index identification bit field of the to-be-encoded point is set to the fourth identification value, and the second residual value of the to-be-encoded point is determined based on the first residual value of the to-be-encoded point;
[0425] If the first residual value of the to-be-encoded point in the reference direction is the minimum residual value Amin of the to-be-encoded point, the residual index identification bit field of the to-be-encoded point is set to the fifth identification value, the second residual value of the to-be-encoded point in the reference direction is determined based on the minimum residual value Amin, and the difference between the first residual value of the to-be-encoded point in the non-reference direction and the minimum residual value Amin is determined as the second residual value of the to-be-encoded point in the non-reference direction;
[0426] determining the second residual information of the to-be-encoded point in each of the K directions based on the second residual value of the to-be-encoded point in each of the K directions and the residual sign bit information in the first residual information.
[0427] In one or more embodiments, the residual information obtaining module 22 can determine the second residual information of the to-be-encoded point in each of the K directions based on the first residual information of the to-be-encoded point in each of the K directions, which can include:
[0428] determining a reference direction among the K directions, determining the directions other than the reference direction among the K directions as non-reference directions, and determining the first residual value of the to-be-encoded point in the reference direction as a reference residual value;
[0429] if the reference residual value is a non-zero value and the reference residual value is not the minimum residual value Amin of the to-be-encoded point, setting the residual index identification bit field of the to-be-encoded point to a fourth identification value, and determining the second residual value of the to-be-encoded point based on the first residual value of the to-be-encoded point;
[0430] if the reference residual value is a non-zero value and the reference residual value is the minimum residual value Amin of the to-be-encoded point, setting the residual index identification bit field of the to-be-encoded point to a fifth identification value, determining the second residual value of the to-be-encoded point in the reference direction based on the minimum residual value Amin, and determining the second residual value of the to-be-encoded point in the non-reference direction as the difference between the first residual value of the to-be-encoded point in the non-reference direction and the minimum residual value Amin;
[0431] determining the second residual information of the to-be-encoded point in each of the K directions based on the second residual value of the to-be-encoded point in each of the K directions and the residual sign bit information in the first residual information.
[0432] In one or more embodiments, the residual information obtaining module 22 is further configured to:
[0433] if the reference residual value is zero, determining that the to-be-encoded point does not use the residual index identification bit field.
[0434] In one or more embodiments, the encoding module 23 is specifically configured to:
[0435] encoding the second residual value of the to-be-encoded point in each of the K directions according to the encoding mode information;
[0436] encoding the residual sign bit information of the to-be-encoded point in each of the K directions.
[0437] In one or more embodiments, the encoding module 23 can encode the second residual value of the to-be-encoded point in each of the K directions according to the encoding mode information, which can include:
[0438] performing a logarithm operation on the non-zero residual values in the second residual values of the to-be-encoded point in each of the K directions to obtain a target occupied bit number of the to-be-encoded point in each of the K directions;
[0439] determining a candidate occupied bit number of the to-be-encoded point in each of the K directions based on the target occupied bit number of the to-be-encoded point in each of the K directions;
[0440] encoding, based on the occupied bit number value field, a value corresponding to each bit in the candidate occupied bit number of the to-be-encoded point in each of the K directions.
[0441] In one or more embodiments, the encoding module 23 can determine the candidate occupied bit number of the to-be-encoded point in each of the K directions based on the target occupied bit number of the to-be-encoded point in each of the K directions, which can include:
[0442] based on the number M2 of non-zero residual values in the K first residual values corresponding to the to-be-encoded point, setting a bit index identification bit field for the to-be-encoded point; the bit index identification bit field is used to indicate a seventh non-zero direction corresponding to a minimum occupied bit number Bmin, the minimum occupied bit number Bmin is the minimum value in the K target occupied bit numbers corresponding to the to-be-encoded point, the M2 non-zero residual values correspond to M2 non-zero directions, and M2 is a positive integer less than or equal to K;
[0443] determining the remaining directions except the seventh non-zero direction among the M2 non-zero directions as eighth non-zero directions, and determining the candidate occupied bit number of the to-be-encoded point in the seventh non-zero direction based on the minimum occupied bit number Bmin;
[0444] determining the difference between the target occupied bit number of the to-be-encoded point in the eighth non-zero direction and the minimum occupied bit number Bmin as the candidate occupied bit number of the to-be-encoded point in the eighth non-zero direction.
[0445] In one or more embodiments, the encoding module 23 can encode the second residual values of the to-be-encoded point in each of the K directions according to the encoding mode information, which can include:
[0446] determining M2 non-zero directions in the K directions of the to-be-encoded point; the first residual values of the to-be-encoded point in the M2 non-zero directions are non-zero residual values, and M2 is a positive integer less than or equal to K;
[0447] performing a modulo operation on the second residual value A'[i] of the to-be-encoded point in the ith non-zero direction to obtain a residual quotient A'1[i] and a residual remainder A'2[i]; i is a positive integer less than M2;
[0448] determining a candidate number of occupied bit positions B'[i] of the residual quotient A'1[i], representing the candidate number of occupied bit positions B'[i] by a number of occupied bit positions field corresponding to the to-be-encoded point in the i-th direction, and encoding the number of occupied bit positions field;
[0449] representing the residual remainder A'2[i] by a residual remainder field corresponding to the to-be-encoded point in the i-th direction, and encoding the residual remainder field;
[0450] representing a value of each bit of the B'[i] bit positions occupied by the residual quotient A'1[i] by a B'[i] bit element in the number of occupied bit positions field corresponding to the to-be-encoded point in the i-th direction, and encoding the B'[i] bit element in the number of occupied bit positions value field.
[0451] In one or more embodiments, the encoding module 23 can encode the residual sign bit information of the to-be-encoded point in each of the K directions can include:
[0452] based on the residual sign bit information of the to-be-encoded point in each of the K directions, setting a residual sign flag field of the to-be-encoded point in each of the K directions, and encoding a value of the residual sign flag field in each of the K directions;
[0453] wherein when the residual sign bit information of the to-be-encoded point in the i-th direction is non-negative, the residual sign flag field of the to-be-encoded point in the i-th direction is set to a target value; when the residual sign bit information of the to-be-encoded point in the i-th direction is negative, the residual sign flag field of the to-be-encoded point in the i-th direction is set to a non-target value; i is a positive integer less than or equal to K.
[0454] In one or more embodiments, the encoding module 23 can encode the residual sign bit information of the to-be-encoded point in each of the K directions can include:
[0455] based on the residual sign bit information of the to-be-encoded point in each of the K directions, setting a residual sign flag field of the to-be-encoded point in each of the K directions, and encoding a value of the residual sign flag field in each of the K directions;
[0456] wherein when the residual sign bit information of the to-be-encoded point in the i-th direction is non-negative, the residual sign flag field of the to-be-encoded point in the i-th direction is set to a target value; when the residual sign bit information of the to-be-encoded point in the i-th direction is negative, the residual sign flag field of the to-be-encoded point in the i-th direction is set to a non-target value; i is a positive integer less than or equal to K.
[0457] According to the embodiments of the present application, Figure 10The units in the point cloud processing apparatus 2 shown can be combined into one or several other units respectively or all, or some of the units can be further split into multiple units with smaller functions to form, which can achieve the same operation without affecting the implementation of the technical effects of the embodiments of the present application. The above units are divided based on logical functions. In actual applications, the functions of a unit can also be implemented by multiple units, or the functions of multiple units can be implemented by one unit. In other embodiments of the present application, the point cloud processing apparatus 2 can also include other units. In actual applications, these functions can also be assisted by other units, and can be implemented by multiple units in cooperation.
[0458] In the embodiments of the present application, in the encoding process of the point cloud, the encoding mode information of the point cloud can be determined; the first residual information of each direction of K directions of the to-be-encoded point in the point cloud based on the geometric prediction tree can be obtained; then the first residual information of each direction of K directions of the to-be-encoded point can be further predicted twice to obtain the second residual information of each direction of K directions of the to-be-encoded point; the first residual value in the first residual information is greater than or equal to the second residual value in the second residual information; and the second residual information of each direction of K directions of the to-be-encoded point is encoded according to the encoding mode information. By using the correlation degree of the first residual value of the to-be-encoded point in the front and back sequences or each direction, the residual encoding value can be reduced, and the geometric encoding efficiency can be improved. The second residual value or the candidate occupied bit number can be encoded by using the remainder encoding, which can further reduce the residual encoding value, and on the basis of not affecting the single point reconstruction of the point cloud, the geometric encoding efficiency can be further improved.
[0459] Further, please refer to Figure 11 , Figure 11 is a structural schematic diagram of a computer device provided by an embodiment of the present application. As shown in Figure 11As shown, the computer device 1000 can be a user terminal, and can also be a server, which is not limited in the present application. For ease of understanding, the computer device is taken as an example of a user terminal, which can include a processor 1001, a network interface 1004 and a memory 1005. In addition, the computer device 1000 can further include a user interface 1003 and at least one communication bus 1002. The communication bus 1002 is used to realize the connection and communication between the components. The user interface 1003 can further include a standard wired interface and a wireless interface. The network interface 1004 can optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 can be a high-speed RAM memory, or a non-volatile memory such as at least one disk memory. The memory 1005 can also be at least one storage device located away from the aforementioned processor 1001. For example Figure 11 As shown, the memory 1005 as a computer readable storage medium can include an operating system, a network communication module, a user interface module and a device control application.
[0460] The network interface 1004 in the computer device 1000 can also provide network communication functions, and the optional user interface 1003 can further include a display screen (Display) and a keyboard (Keyboard). Figure 11 As shown in the computer device 1000, the network interface 1004 can provide network communication functions, and the user interface 1003 is mainly used to provide an interface for user input.
[0461] When the computer device 1000 is a decoding device, the processor 1001 can be used to call the device control application stored in the memory 1005 to realize:
[0462] obtain the encoding mode information of the point cloud;
[0463] decode the to-be-decoded point in the point cloud according to the encoding mode information to obtain second residual information of each of K directions of the to-be-decoded point; K is a positive integer;
[0464] determine first residual information of each of the K directions of the to-be-decoded point based on the second residual information of each of the K directions of the to-be-decoded point; a second residual value in the second residual information is less than or equal to a first residual value in the first residual information;
[0465] reconstruct the geometric information of the to-be-decoded point according to the first residual information of each of the K directions of the to-be-decoded point.
[0466] When the computer device 1000 is an encoding device, the processor 1001 can be configured to invoke a device control application stored in the memory 1005 to implement:
[0467] determine the encoding mode information of the point cloud;
[0468] obtain first residual information of each of the K directions of the to-be-encoded point in the point cloud; K is a positive integer;
[0469] determine second residual information of each of the K directions of the to-be-encoded point based on the first residual information of each of the K directions of the to-be-encoded point; a first residual value in the first residual information is greater than or equal to a second residual value in the second residual information;
[0470] perform encoding processing on the second residual information of each of the K directions of the to-be-encoded point according to the encoding mode information.
[0471] It should be understood that the computer device 1000 described in the embodiments of the present application can perform the description of the point cloud processing method in the foregoing Figure 7 or Figure 8 corresponding embodiments, and can also perform the description of the point cloud processing apparatus 1 in the foregoing Figure 9 corresponding embodiments, or the description of the point cloud processing apparatus 2 in the foregoing Figure 10 corresponding embodiments, and thus will not be described here again. In addition, the description of the beneficial effects of using the same method will also not be described again.
[0472] In addition, it should be noted that the embodiments of the present application also provide a computer readable storage medium, and the computer readable storage medium stores the computer program executed by the point cloud processing apparatus 1 or the cloud processing apparatus 2 mentioned in the foregoing, and the computer program includes computer instructions, and when the processor executes the computer instructions, the description of the point cloud processing method in the foregoing Figure 7 or Figure 8 corresponding embodiments can be performed, and thus will not be described here again. In addition, the description of the beneficial effects of using the same method will also not be described again. For technical details of the computer readable storage medium embodiments involved in the present application, please refer to the description of the method embodiments of the present application. As an example, the computer instructions can be deployed on one computing device for execution, or on multiple computing devices located in one place for execution, or on multiple computing devices distributed in multiple places and interconnected through a communication network for execution, and the multiple computing devices distributed in multiple places and interconnected through a communication network can constitute a blockchain system.
[0473] In addition, it should be noted that the embodiments of the present application also provide a computer program product or computer program, which can include computer instructions that can be stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer readable storage medium, and the processor can execute the computer instructions to enable the computer device to perform the foregoing Figure 7 or Figure 8 The description of the point cloud processing method in the corresponding embodiments will not be repeated here. In addition, the description of the beneficial effects of using the same method will also not be repeated. For technical details not disclosed in the computer program product or computer program embodiments involved in the present application, please refer to the description of the method embodiments of the present application.
[0474] It should be noted that for the foregoing various method embodiments, in order to simply describe, they are all expressed as a series of action combinations, but those skilled in the art should know that the present application is not limited by the order of the described actions, because according to the present application, some steps can be performed in other order or simultaneously. Secondly, those skilled in the art should know that the embodiments described in the specification all belong to preferred embodiments, and the actions and modules involved are not necessarily necessary for the present application.
[0475] The steps in the method embodiments of the present application can be adjusted in order, combined and deleted according to actual needs.
[0476] The modules in the device embodiments of the present application can be combined, divided and deleted according to actual needs.
[0477] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by a computer program instructing related hardware, and the computer program can be stored in a computer readable storage medium. When the program is executed, it can include the processes of the above-mentioned embodiments of the method. The storage medium can be a magnetic disc, an optical disc, a read-only memory (ROM) or a random access memory (RAM), etc.
[0478] The above only discloses the preferred embodiments of the present application, and of course cannot limit the scope of the rights of the present application, so the equivalent changes made according to the claims of the present application still fall within the scope covered by the present application.
Claims
1. A method of point cloud processing, the method comprising: The method comprises: obtaining coding mode information of the point cloud; decoding a to-be-decoded point in the point cloud according to the coding mode information, to obtain second residual information of the to-be-decoded point in each of K directions; K is a positive integer, and the second residual information is residual information obtained after geometric entropy decoding of a coding bitstream of the point cloud; determining first residual information of the to-be-decoded point in each of the K directions based on the second residual information of the to-be-decoded point in each of the K directions; a second residual value in the second residual information is less than or equal to a first residual value in the first residual information, and the first residual information is obtained by anti-predicting the second residual information according to relevance of the second residual information in each of the K directions; reconstructing geometric information of the to-be-decoded point according to the first residual information of the to-be-decoded point in each of the K directions.
2. The method of claim 1, wherein, The obtaining of the coding mode information of the point cloud comprises: obtaining a default coding mode negotiated by a decoding end and a coding end, and determining the default coding mode as the coding mode information of the point cloud; the default coding mode is a coding mode of a to-be-decoded point in the point cloud; or parsing a coding parameter set or a coding bitstream of the point cloud to obtain a coding mode of the to-be-decoded point in each of the K directions, and determining the coding mode of the to-be-decoded point as the coding mode information of the point cloud.
3. The method of claim 1, wherein, The obtaining of the coding mode information of the point cloud comprises: obtaining a determination threshold corresponding to the point cloud; the determination threshold is negotiated by the coding end and the decoding end, or the determination threshold is parsed from the coding parameter set or the coding bitstream of the point cloud; when the determination threshold comprises a first threshold, obtaining statistical characteristic information corresponding to residual parsing information of a to-be-decoded point, determining a coding mode of the to-be-decoded point based on a numerical comparison relationship between the statistical characteristic information and the first threshold, and determining the coding mode of the to-be-decoded point as the coding mode information; when the determination threshold comprises a second threshold, obtaining edge length ratio information corresponding to a bounding box of the point cloud, determining a coding mode of the to-be-decoded point based on a numerical comparison relationship between the edge length ratio information and the second threshold, and determining the coding mode of the to-be-decoded point as the coding mode information; the bounding box is used to represent a minimum cuboid containing all points in the point cloud; when the determination threshold comprises a third threshold and a fourth threshold, determining a threshold condition range based on the third threshold and the fourth threshold, determining a coding mode of the to-be-decoded point according to a dependency relationship between a quantization parameter of the to-be-decoded point and the threshold condition range, and determining the coding mode of the to-be-decoded point as the coding mode information.
4. The method of claim 1, wherein, The decoding process comprises residual value decoding and residual sign decoding. The decoding of the to-be-decoded point in the point cloud according to the coding mode information comprises: decoding, according to the coding mode information, a residual value of a to-be-decoded point in the point cloud to obtain a second residual value of the to-be-decoded point in each direction of the K directions; performing residual sign decoding on the to-be-decoded point to obtain residual sign bit information of the to-be-decoded point in each direction of the K directions; determining, based on the second residual value of the to-be-decoded point in each direction of the K directions and the residual sign bit information of the to-be-decoded point in each direction of the K directions, second residual information of the to-be-decoded point in each direction of the K directions.
5. The method of claim 4, wherein, The decoding, according to the coding mode information, a residual value of a to-be-decoded point in the point cloud to obtain a second residual value of the to-be-decoded point in each direction of the K directions, comprises: determining a non-zero direction of the to-be-decoded point in the K directions; wherein when a residual value flag field of the to-be-decoded point in an i-th direction is set to a target value, the i-th direction is a non-zero direction, i is a positive integer less than or equal to K; determining, by analyzing an occupied bit number field of the to-be-decoded point in the non-zero direction, a target occupied bit number of the to-be-decoded point in the non-zero direction; based on the target occupied bit number, analyzing an occupied bit value field of the to-be-decoded point in the non-zero direction to obtain the second residual value of the to-be-decoded point in the non-zero direction.
6. The method of claim 5, wherein, The number of non-zero directions is M1, and M1 is a positive integer less than or equal to K. The determining, by analyzing an occupied bit number field of the to-be-decoded point in the non-zero direction, a target occupied bit number of the to-be-decoded point in the non-zero direction, comprises: analyzing, in sequence, the occupied bit number field of the to-be-decoded point in the M1 non-zero directions to obtain candidate occupied bit numbers of the to-be-decoded point in the M1 non-zero directions; analyzing a bit index identification bit field corresponding to the to-be-decoded point to obtain a first non-zero direction indicated by a minimum occupied bit number B'min; the minimum occupied bit number B'min is the minimum value of the M1 candidate occupied bit numbers corresponding to the to-be-decoded point; determining a second non-zero direction from the remaining directions in the M1 non-zero directions except the first non-zero direction, and determining the target occupied bit number of the to-be-decoded point in the first non-zero direction based on the minimum occupied bit number B'min; determining, as the target occupied bit number of the to-be-decoded point in the second non-zero direction, a sum of the candidate occupied bit number of the to-be-decoded point in the second non-zero direction and the minimum occupied bit number B'min.
7. The method of claim 4, wherein, The decoding, according to the coding mode information, a residual value of a to-be-decoded point in the point cloud to obtain a second residual value of the to-be-decoded point in each direction of the K directions, comprises: determining, based on a residual value flag field in the coding mode information, a non-zero direction of the to-be-decoded point in the K directions in the point cloud; when a value of the residual value flag field in an i-th direction is a target value, the i-th direction is the non-zero direction, i being a positive integer less than or equal to K; parsing a bit number field of occupancy in the i-th direction of the to-be-decoded point to obtain a target bit number B[i] of occupancy in the i-th direction of the to-be-decoded point; parsing a value of B[i] bits in a bit value field of occupancy in the i-th direction of the to-be-decoded point to obtain a residual quotient A1[i] in the i-th direction of the to-be-decoded point; parsing a residual remainder field corresponding to the i-th direction of the to-be-decoded point to obtain a residual remainder A2[i] in the i-th direction of the to-be-decoded point; determining a second residual value A'[i] in the i-th direction of the to-be-decoded point according to the residual quotient A1[i] and the residual remainder A2[i].
8. The method of claim 4, wherein, The residual sign decoding of the to-be-decoded point to obtain the residual sign bit information of each direction in the K directions includes: parsing a residual sign flag field of each direction in the K directions of the to-be-decoded point to obtain the residual sign bit information of each direction in the K directions of the to-be-decoded point; wherein, when the residual sign flag field in the i-th direction is set to the target value, the residual sign bit information of the to-be-decoded point in the i-th direction is non-negative; when the residual sign flag field in the i-th direction is not set to the target value, the residual sign bit information of the to-be-decoded point in the i-th direction is negative; i is a positive integer less than or equal to K.
9. The method of claim 4, wherein, The residual sign decoding of the to-be-decoded point to obtain the residual sign bit information of each direction in the K directions includes: parsing a sign identification bit field of each direction in the K directions of the to-be-decoded point to obtain a sign association relationship between the to-be-decoded point and a previous point in each direction in the K directions, and determining the residual sign bit information of each direction in the K directions of the to-be-decoded point based on the sign association relationship; wherein, when the sign identification bit field in the i-th direction of the to-be-decoded point is set to the target value, the residual sign bit information of the to-be-decoded point and the previous point in the i-th direction is the same; when the sign identification bit field in the i-th direction of the to-be-decoded point is not set to the target value, the residual sign bit information of the to-be-decoded point and the previous point in the i-th direction is different; the previous point is a point in the point cloud that has been decoded, and i is a positive integer less than or equal to K.
10. The method of claim 1, wherein, The second residual information includes a second residual value and residual sign bit information; The determination of the first residual information of each direction in the K directions of the to-be-decoded point based on the second residual information of each direction in the K directions of the to-be-decoded point includes: parsing a residual index identification bit field corresponding to the to-be-decoded point to obtain a reference direction indicated by a minimum residual value A'min; the minimum residual value A'min is the minimum value of K second residual values corresponding to the to-be-decoded point; determining the remaining directions in the K directions except the reference direction as non-reference directions, and determining a first residual value of the to-be-decoded point in the reference direction based on the minimum residual value A'min; determining a sum of the second residual value of the to-be-decoded point in the non-reference direction and the minimum residual value A'min as the first residual value of the to-be-decoded point in the non-reference direction; determining first residual information of the to-be-decoded point in each of the K directions based on the first residual value of the to-be-decoded point in the reference direction, the first residual value of the to-be-decoded point in the non-reference direction, and residual sign bit information in the second residual information. The reference direction is a horizontal coordinate direction when the residual index identification bit field is a first identification value; the reference direction is a vertical coordinate direction when the residual index identification bit field is a second identification value; and the reference direction is a vertical coordinate direction when the residual index identification bit field is a third identification value.
11. The method of claim 1, wherein, The second residual information includes a second residual value and residual sign bit information. The determining the first residual information of the to-be-decoded point in each of the K directions based on the second residual information of the to-be-decoded point in each of the K directions includes: parsing a residual index identification bit field corresponding to the to-be-decoded point to obtain a third non-zero direction indicated by a minimum residual value A'min based on a number M1 of non-zero directions in the K directions corresponding to the to-be-decoded point; the minimum residual value A'min is the minimum value of M1 second residual values corresponding to the to-be-decoded point, and M1 is a positive integer less than or equal to K; determining the remaining directions in the M1 non-zero directions except the third non-zero direction as fourth non-zero directions, and determining a first residual value of the to-be-decoded point in the third non-zero direction based on the minimum residual value A'min; determining a sum of the second residual value of the to-be-decoded point in the fourth non-zero direction and the minimum residual value A'min as the first residual value of the to-be-decoded point in the fourth non-zero direction; determining first residual information of the to-be-decoded point in each of the K directions based on the first residual value of the to-be-decoded point in the third non-zero direction, the first residual value of the to-be-decoded point in the fourth non-zero direction, and residual sign bit information in the second residual information.
12. The method of claim 11, wherein, M1 is equal to K; the parsing the residual index identification bit field corresponding to the to-be-decoded point to obtain the third non-zero direction indicated by the minimum residual value A'min includes: if the residual index identification bit field corresponding to the to-be-decoded point is a first identification value, determining the first non-zero direction indicated by the minimum residual value A'min as a horizontal coordinate direction; If the residual index identification bit field corresponding to the to-be-decoded point is the second identification value, it is determined that the first non-zero direction indicated by the minimum residual value A'min is the longitudinal coordinate direction; If the residual index identification bit field corresponding to the to-be-decoded point is the third identification value, it is determined that the third non-zero direction indicated by the minimum residual value A'min is the vertical coordinate direction.
13. The method of claim 11, wherein, M1 is equal to K-1; The parsing of the residual index identification bit field corresponding to the to-be-decoded point to obtain the third non-zero direction indicated by the minimum residual value A'min includes: If the M1 non-zero directions include the longitudinal coordinate direction and the vertical coordinate direction, and the residual index identification bit field corresponding to the to-be-decoded point is the fourth identification value, it is determined that the first non-zero direction indicated by the minimum residual value A'min is the longitudinal coordinate direction; If the M1 non-zero directions include the horizontal coordinate direction and the vertical coordinate direction, and the residual index identification bit field corresponding to the to-be-decoded point is the fourth identification value, it is determined that the first non-zero direction indicated by the minimum residual value A'min is the horizontal coordinate direction; If the M1 non-zero directions include the horizontal coordinate direction and the longitudinal coordinate direction, and the residual index identification bit field corresponding to the to-be-decoded point is the fourth identification value, it is determined that the first non-zero direction indicated by the minimum residual value A'min is the horizontal coordinate direction.
14. The method of claim 11, wherein, M1 is less than K-1; the method further includes: stopping parsing the residual index identification bit field corresponding to the to-be-decoded point, and determining the second residual value of the to-be-decoded point in the M1 non-zero directions as the first residual value of the to-be-decoded point in the M1 non-zero directions.
15. The method of claim 1, wherein, The second residual information includes a second residual value and residual sign bit information; The determination of the first residual information of the to-be-decoded point in each direction of the K directions based on the second residual information of the to-be-decoded point in each direction of the K directions includes: determining a default reference direction commonly negotiated by the decoding end and the encoding end among the K directions, and determining the directions other than the reference direction among the K directions as non-reference directions; If the residual index identification bit field corresponding to the to-be-decoded point is the fourth identification value, it is determined that the second residual value of the to-be-decoded point in the reference direction is not the minimum residual value A'min, and the first residual value of the to-be-decoded point is determined based on the second residual value of the to-be-decoded point; If the residual index identification bit field corresponding to the to-be-decoded point is the fifth identification value, it is determined that the second residual value of the to-be-decoded point in the reference direction is the minimum residual value A'min, the first residual value of the to-be-decoded point in the reference direction is determined based on the minimum residual value A'min, and the sum of the second residual value of the to-be-decoded point in the non-reference direction and the minimum residual value A'min is determined as the first residual value of the to-be-decoded point in the non-reference direction; The determination of the first residual information of the to-be-decoded point in each direction of the K directions based on the first residual value of the to-be-decoded point in each direction of the K directions and the residual sign bit information in the second residual information.
16. The method of claim 1, wherein, The second residual information comprises a second residual value and residual sign bit information; The first residual information of the to-be-decoded point in each of the K directions is determined based on the second residual information of the to-be-decoded point in each of the K directions. A default reference direction is determined by the decoding end and the encoding end in the K directions, and directions other than the reference direction in the K directions are determined as non-reference directions; When the second residual value of the to-be-decoded point in the reference direction is a non-zero value, if the residual index identification bit field corresponding to the to-be-decoded point is parsed as a fourth identification value, the first residual value of the to-be-decoded point is determined based on the second residual value of the to-be-decoded point; When the second residual value of the to-be-decoded point in the reference direction is a non-zero value, if the residual index identification bit field corresponding to the to-be-decoded point is parsed as a fifth identification value, the second residual value of the to-be-decoded point in the reference direction is determined as a minimum residual value A'min, the first residual value of the to-be-decoded point in the reference direction is determined based on the minimum residual value A'min, and the sum of the second residual value of the to-be-decoded point in the non-reference direction and the minimum residual value A'min is determined as the first residual value of the to-be-decoded point in the non-reference direction; The first residual information of the to-be-decoded point in each of the K directions is determined based on the first residual value of the to-be-decoded point in each of the K directions and the residual sign bit information in the second residual information.
17. A method of point cloud processing, the method comprising: It comprises: determining the encoding mode information of the point cloud; constructing a geometric prediction tree corresponding to the point cloud, and obtaining the first residual information of a to-be-encoded point in the point cloud in each of K directions based on the geometric prediction tree; K is a positive integer; determining the second residual information of the to-be-encoded point in each of the K directions based on the first residual information of the to-be-encoded point in each of the K directions; The first residual value in the first residual information is greater than or equal to the second residual value in the second residual information, and the second residual information is obtained by performing secondary prediction on the first residual information based on the correlation of the first residual information in each of the K directions; According to the encoding mode information, the second residual information of the to-be-encoded point in each of the K directions is encoded.
18. The method of claim 17, wherein, The first residual information of the to-be-encoded point in the i-th direction comprises a first residual value of the to-be-encoded point in the i-th direction and residual sign bit information of the to-be-encoded point in the i-th direction; When the first residual value of the to-be-encoded point in the i-th direction is zero, the first residual value in the i-th direction is encoded as identification information.
19. The method of claim 18, wherein, The second residual information of the to-be-encoded point in each of the K directions is determined based on the first residual information of the to-be-encoded point in each of the K directions. obtaining a minimum residual value Amin in the first residual values of the to-be-encoded point in each of the K directions, setting a residual index identification bit field for the minimum residual value Amin; the residual index identification bit field is used to indicate a reference direction corresponding to the minimum residual value Amin; determining the remaining directions except the reference direction in the K directions as non-reference directions, and determining a second residual value of the to-be-encoded point in the reference direction based on the minimum residual value Amin; determining a difference between the first residual value of the to-be-encoded point in the non-reference direction and the minimum residual value Amin as a second residual value of the to-be-encoded point in the non-reference direction; determining second residual information of the to-be-encoded point in each of the K directions based on the second residual value of the to-be-encoded point in the reference direction, the second residual value of the to-be-encoded point in the non-reference direction, and residual sign bit information in the first residual information. When the residual index identification bit field is set to a first identification value, the reference direction is the horizontal coordinate direction; when the residual index identification bit field is set to a second identification value, the reference direction is the vertical coordinate direction; and when the residual index identification bit field is set to the first identification value, the reference direction is the vertical coordinate direction.
20. The method of claim 18, wherein, The determining of the second residual information of the to-be-encoded point in each of the K directions based on the first residual information of the to-be-encoded point in each of the K directions includes: determining a non-zero minimum value in the first residual values of the to-be-encoded point in each of the K directions as a minimum residual value Amin; obtaining a number M2 of non-zero residual values in the K first residual values corresponding to the to-be-encoded point, and setting a residual index identification bit field for the minimum residual value Amin based on the number M2; the residual index identification bit field is used to indicate a fifth non-zero direction corresponding to the minimum residual value Amin, M2 non-zero directions corresponding to M2 non-zero residual values, and M2 being a positive integer less than or equal to K; determining the remaining directions except the fifth non-zero direction in the M2 non-zero directions as sixth non-zero directions, and determining a second residual value of the to-be-encoded point in the fifth non-zero direction based on the minimum residual value Amin; determining a difference between the first residual value of the to-be-encoded point in the sixth non-zero direction and the minimum residual value Amin as a second residual value of the to-be-encoded point in the sixth non-zero direction; determining second residual information of the to-be-encoded point in each of the K directions based on the second residual value of the to-be-encoded point in the fifth non-zero direction, the second residual value of the to-be-encoded point in the sixth non-zero direction, and residual sign bit information in the first residual information.
21. The method of claim 18, wherein, The determining of the second residual information of the to-be-encoded point in each of the K directions based on the first residual information of the to-be-encoded point in each of the K directions includes: determining a reference direction among the K directions, and determining the directions other than the reference direction among the K directions as non-reference directions; if the first residual value of the to-be-encoded point in the reference direction is not the minimum residual value Amin of the to-be-encoded point, setting the residual index identification bit field of the to-be-encoded point to a fourth identification value, determining the second residual value of the to-be-encoded point based on the first residual value of the to-be-encoded point; if the first residual value of the to-be-encoded point in the reference direction is the minimum residual value Amin of the to-be-encoded point, setting the residual index identification bit field of the to-be-encoded point to a fifth identification value, determining the second residual value of the to-be-encoded point in the reference direction based on the minimum residual value Amin, and determining the second residual value of the to-be-encoded point in the non-reference direction as the difference between the first residual value of the to-be-encoded point in the non-reference direction and the minimum residual value Amin; determining the second residual information of the to-be-encoded point in each of the K directions based on the second residual value of the to-be-encoded point in each of the K directions and the residual sign bit information in the first residual information.
22. The method according to any one of claims 17 to 21, characterized in that, The encoding processing of the second residual information of the to-be-encoded point in each of the K directions according to the encoding mode information comprises: encoding the second residual value of the to-be-encoded point in each of the K directions according to the encoding mode information; encoding the residual sign bit information of the to-be-encoded point in each of the K directions.
23. The method of claim 22, wherein, The encoding of the second residual value of the to-be-encoded point in each of the K directions according to the encoding mode information comprises: performing logarithmic operation on the non-zero residual value in the second residual value of the to-be-encoded point in each of the K directions to obtain the target occupied bit number of the to-be-encoded point in each of the K directions; determining the candidate occupied bit number of the to-be-encoded point in each of the K directions based on the target occupied bit number of the to-be-encoded point in each of the K directions; encoding the value corresponding to each bit in the candidate occupied bit number of the to-be-encoded point in each of the K directions based on the occupied bit value field.
24. The method of claim 23, wherein, The determination of the candidate occupied bit number of the to-be-encoded point in each of the K directions based on the target occupied bit number of the to-be-encoded point in each of the K directions comprises: setting a bit index identification bit field for the to-be-encoded point based on the number M2 of non-zero residual values in the K first residual values corresponding to the to-be-encoded point; the bit index identification bit field is used to indicate the seventh non-zero direction corresponding to the minimum occupied bit number Bmin, the minimum occupied bit number Bmin is the minimum value in the K target occupied bit numbers corresponding to the to-be-encoded point, the M2 non-zero residual values correspond to M2 non-zero directions, and M2 is a positive integer less than or equal to K; determining a seventh non-zero direction from the M2 non-zero directions, and determining a candidate number of occupied bits of the to-be-encoded point in the seventh non-zero direction based on the minimum number of occupied bits Bmin; determining a difference between a target number of occupied bits of the to-be-encoded point in the eighth non-zero direction and the minimum number of occupied bits Bmin as the candidate number of occupied bits of the to-be-encoded point in the eighth non-zero direction.
25. The method of claim 22, wherein, The encoding, according to the encoding mode information, of the second residual value of the to-be-encoded point in each of the K directions includes: determining M2 non-zero directions from the K directions, wherein the first residual value of the to-be-encoded point in the M2 non-zero directions is a non-zero residual value, and M2 is a positive integer less than or equal to K; performing modulo operation on the second residual value A'[i] of the to-be-encoded point in the i-th non-zero direction to obtain a residual quotient A'1[i] and a residual remainder A'2[i]; i is a positive integer less than M2; determining a candidate number of occupied bits B'[i] of the residual quotient A'1[i], representing the candidate number of occupied bits B'[i] by using a number of occupied bits field corresponding to the i-th direction of the to-be-encoded point, and encoding the number of occupied bits field; representing the residual remainder A'2[i] by using a residual remainder field corresponding to the i-th direction of the to-be-encoded point, and encoding the residual remainder field; representing a value of each bit of B'[i] bits occupied by the residual quotient A'1[i] by using B'[i] bit elements in the number of occupied bits field corresponding to the i-th direction of the to-be-encoded point, and encoding the B'[i] bit elements in the number of occupied bit value field.
26. The method of claim 22, wherein, The encoding of the residual sign bit information of the to-be-encoded point in each of the K directions includes: setting a sign identification bit field of the to-be-encoded point in each of the K directions according to a sign association relationship between the to-be-encoded point and a previous point in each of the K directions, and encoding a value of the sign identification bit field in each of the K directions; wherein, when the residual sign bit information of the to-be-encoded point and the previous point in the i-th direction is the same, the sign identification bit field of the to-be-encoded point in the i-th direction is set to a target value; when the residual sign bit information of the to-be-encoded point and the previous point in the i-th direction is different, the sign identification bit field of the to-be-encoded point in the i-th direction is set to a non-target value; the previous point is a point in the point cloud that has been encoded, and i is a positive integer less than or equal to K.
27. A point cloud processing apparatus, comprising: The method includes: an obtaining module configured to obtain encoding mode information of a point cloud; a decoding module configured to decode, according to the encoding mode information, a to-be-decoded point in the point cloud to obtain second residual information of the to-be-decoded point in each of K directions; K is a positive integer, and the second residual information is residual information obtained by performing geometric entropy decoding on an encoding bitstream of the point cloud. The decoding module is further configured to determine first residual information of each of the K directions of the to-be-decoded point based on the second residual information of each of the K directions of the to-be-decoded point. The second residual value in the second residual information is less than or equal to the first residual value in the first residual information, and the first residual information is obtained by performing inverse prediction on the second residual information according to the correlation of the second residual information of each of the K directions. The reconstruction module is configured to reconstruct the geometric information of the to-be-decoded point based on the first residual information of each of the K directions of the to-be-decoded point.
28. A point cloud processing apparatus, comprising: The method comprises the following steps: The determining module is configured to determine the encoding mode information of the point cloud. The residual information obtaining module is configured to construct a geometric prediction tree corresponding to the point cloud, and obtain first residual information of each of K directions of a to-be-encoded point in the point cloud based on the geometric prediction tree; K is a positive integer. The residual information obtaining module is further configured to determine second residual information of each of the K directions of the to-be-encoded point based on the first residual information of each of the K directions of the to-be-encoded point. The first residual value in the first residual information is greater than or equal to the second residual value in the second residual information, and the second residual information is obtained by performing secondary prediction on the first residual information using the correlation of the first residual information of each of the K directions. The encoding module is configured to perform encoding processing on the second residual information of each of the K directions of the to-be-encoded point according to the encoding mode information.
29. A computer device, comprising: The computer device comprises a memory and a processor. The memory is connected to the processor, and the memory is configured to store a computer program, and the processor is configured to call the computer program to enable the computer device to perform the method in any one of claims 1 to 16 or perform the method in any one of claims 17 to 26.
30. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program is adapted to be loaded and executed by the processor to enable the computer device with the processor to perform the method in any one of claims 1 to 16 or perform the method in any one of claims 17 to 26.
31. A computer program product, characterised in that, The computer program product comprises computer instructions, and the computer instructions are executed by the processor to implement the method in any one of claims 1 to 16 or perform the method in any one of claims 17 to 26.
Citation Information
Patent Citations
Method and apparatus for inter-channel prediction and transform for point-cloud attribute coding
CN112188197A
Point cloud data encoding method, point cloud data decoding method, point cloud data processing method and point cloud data processing device
CN114598891A